id,java,python,cpp,java_test,python_test,cpp_test LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K{ static int f_gold ( int k , String s1 , String s2 ) { int n = s1 . length ( ) ; int m = s2 . length ( ) ; int lcs [ ] [ ] = new int [ n + 1 ] [ m + 1 ] ; int cnt [ ] [ ] = new int [ n + 1 ] [ m + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= m ; j ++ ) { lcs [ i ] [ j ] = Math . max ( lcs [ i - 1 ] [ j ] , lcs [ i ] [ j - 1 ] ) ; if ( s1 . charAt ( i - 1 ) == s2 . charAt ( j - 1 ) ) cnt [ i ] [ j ] = cnt [ i - 1 ] [ j - 1 ] + 1 ; if ( cnt [ i ] [ j ] >= k ) { for ( int a = k ; a <= cnt [ i ] [ j ] ; a ++ ) lcs [ i ] [ j ] = Math . max ( lcs [ i ] [ j ] , lcs [ i - a ] [ j - a ] + a ) ; } } } return lcs [ n ] [ m ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(4); param0.add(2); param0.add(3); param0.add(5); param0.add(2); param0.add(3); param0.add(3); param0.add(1); param0.add(2); param0.add(2); List param1 = new ArrayList<>(); param1.add(""aggayxysdfa""); param1.add(""55571659965107""); param1.add(""01011011100""); param1.add(""aggasdfa""); param1.add(""5710246551""); param1.add(""0100010""); param1.add(""aabcaaaa""); param1.add(""1219""); param1.add(""111000011""); param1.add(""wiC oD""); List param2 = new ArrayList<>(); param2.add(""aggajxaaasdfa""); param2.add(""390286654154""); param2.add(""0000110001000""); param2.add(""aggajasdfaxy""); param2.add(""79032504084062""); param2.add(""10100000""); param2.add(""baaabcd""); param2.add(""3337119582""); param2.add(""011""); param2.add(""csiuGOUwE""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( k , s1 , s2 ) : n = len ( s1 ) m = len ( s2 ) lcs = [ [ 0 for x in range ( m + 1 ) ] for y in range ( n + 1 ) ] cnt = [ [ 0 for x in range ( m + 1 ) ] for y in range ( n + 1 ) ] for i in range ( 1 , n + 1 ) : for j in range ( 1 , m + 1 ) : lcs [ i ] [ j ] = max ( lcs [ i - 1 ] [ j ] , lcs [ i ] [ j - 1 ] ) if ( s1 [ i - 1 ] == s2 [ j - 1 ] ) : cnt [ i ] [ j ] = cnt [ i - 1 ] [ j - 1 ] + 1 ; if ( cnt [ i ] [ j ] >= k ) : for a in range ( k , cnt [ i ] [ j ] + 1 ) : lcs [ i ] [ j ] = max ( lcs [ i ] [ j ] , lcs [ i - a ] [ j - a ] + a ) return lcs [ n ] [ m ] "," using namespace std; int f_gold ( int k, string s1, string s2 ) { int n = s1 . length ( ); int m = s2 . length ( ); int lcs [ n + 1 ] [ m + 1 ]; int cnt [ n + 1 ] [ m + 1 ]; memset ( lcs, 0, sizeof ( lcs ) ); memset ( cnt, 0, sizeof ( cnt ) ); for ( int i = 1; i <= n; i ++ ) { for ( int j = 1; j <= m; j ++ ) { lcs [ i ] [ j ] = max ( lcs [ i - 1 ] [ j ], lcs [ i ] [ j - 1 ] ); if ( s1 [ i - 1 ] == s2 [ j - 1 ] ) cnt [ i ] [ j ] = cnt [ i - 1 ] [ j - 1 ] + 1; if ( cnt [ i ] [ j ] >= k ) { for ( int a = k; a <= cnt [ i ] [ j ]; a ++ ) lcs [ i ] [ j ] = max ( lcs [ i ] [ j ], lcs [ i - a ] [ j - a ] + a ); } } } return lcs [ n ] [ m ]; } int main() { int n_success = 0; vector param0 {4,2,3,5,2,3,3,1,2,2}; vector param1 {""aggayxysdfa"",""55571659965107"",""01011011100"",""aggasdfa"",""5710246551"",""0100010"",""aabcaaaa"",""1219"",""111000011"",""wiC oD""}; vector param2 {""aggajxaaasdfa"",""390286654154"",""0000110001000"",""aggajasdfaxy"",""79032504084062"",""10100000"",""baaabcd"",""3337119582"",""011"",""csiuGOUwE""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (4,'aggayxysdfa','aggajxaaasdfa',), (2,'55571659965107','390286654154',), (3,'01011011100','0000110001000',), (5,'aggasdfa','aggajasdfaxy',), (2,'5710246551','79032504084062',), (3,'0100010','10100000',), (3,'aabcaaaa','baaabcd',), (1,'1219','3337119582',), (2,'111000011','011',), (2,'wiC oD','csiuGOUwE',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_CHARACTERS_STRING_DISTANCE_ENGLISH_ALPHABETS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_CHARACTERS_STRING_DISTANCE_ENGLISH_ALPHABETS{ static int f_gold ( String str ) { int result = 0 ; int n = str . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) if ( Math . abs ( str . charAt ( i ) - str . charAt ( j ) ) == Math . abs ( i - j ) ) result ++ ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""smnKL""); param0.add(""270083""); param0.add(""0""); param0.add(""kcZdsz""); param0.add(""483544224""); param0.add(""000011""); param0.add(""WysGCirMwKBzP""); param0.add(""3366""); param0.add(""110""); param0.add(""NlaMkpCjUgg""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str1 ) : result = 0 ; n = len ( str1 ) for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : if ( abs ( ord ( str1 [ i ] ) - ord ( str1 [ j ] ) ) == abs ( i - j ) ) : result += 1 ; return result ; "," using namespace std; int f_gold ( string str ) { int result = 0; int n = str . length ( ); for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( abs ( str [ i ] - str [ j ] ) == abs ( i - j ) ) result ++; return result; } int main() { int n_success = 0; vector param0 {""smnKL"",""270083"",""0"",""kcZdsz"",""483544224"",""000011"",""WysGCirMwKBzP"",""3366"",""110"",""NlaMkpCjUgg""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('smnKL',), ('270083',), ('0',), ('kcZdsz',), ('483544224',), ('000011',), ('WysGCirMwKBzP',), ('3366',), ('110',), ('NlaMkpCjUgg',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", RECURSIVE_PROGRAM_PRIME_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class RECURSIVE_PROGRAM_PRIME_NUMBER{ static boolean f_gold ( int n , int i ) { if ( n <= 2 ) return ( n == 2 ) ? true : false ; if ( n % i == 0 ) return false ; if ( i * i > n ) return true ; return f_gold ( n , i + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(3); param0.add(7); param0.add(89); param0.add(97); param0.add(41); param0.add(73); param0.add(95); param0.add(69); param0.add(20); param0.add(30); List param1 = new ArrayList<>(); param1.add(2); param1.add(2); param1.add(2); param1.add(2); param1.add(2); param1.add(2); param1.add(2); param1.add(2); param1.add(2); param1.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ",," using namespace std; bool f_gold ( int n, int i = 2 ) { if ( n <= 2 ) return ( n == 2 ) ? true : false; if ( n % i == 0 ) return false; if ( i * i > n ) return true; return f_gold ( n, i + 1 ); } int main() { int n_success = 0; vector param0 {3,7,89,97,41,73,95,69,20,30}; vector param1 {2,2,2,2,2,2,2,2,2,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",,, COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE{ static int f_gold ( String S , String T ) { int m = T . length ( ) ; int n = S . length ( ) ; if ( m > n ) return 0 ; int mat [ ] [ ] = new int [ m + 1 ] [ n + 1 ] ; for ( int i = 1 ; i <= m ; i ++ ) mat [ i ] [ 0 ] = 0 ; for ( int j = 0 ; j <= n ; j ++ ) mat [ 0 ] [ j ] = 1 ; for ( int i = 1 ; i <= m ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { if ( T . charAt ( i - 1 ) != S . charAt ( j - 1 ) ) mat [ i ] [ j ] = mat [ i ] [ j - 1 ] ; else mat [ i ] [ j ] = mat [ i ] [ j - 1 ] + mat [ i - 1 ] [ j - 1 ] ; } } return mat [ m ] [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""banana""); param0.add(""49597223""); param0.add(""1000010000011""); param0.add(""BTlzufK""); param0.add(""3474007""); param0.add(""0010""); param0.add(""dKHhoTD""); param0.add(""9123259723""); param0.add(""11001000111110""); param0.add(""iY WJlIZ""); List param1 = new ArrayList<>(); param1.add(""ban""); param1.add(""42""); param1.add(""010""); param1.add(""lf RS""); param1.add(""370""); param1.add(""00000""); param1.add(""doT""); param1.add(""123""); param1.add(""0""); param1.add(""iI""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( S , T ) : m = len ( T ) n = len ( S ) if m > n : return 0 mat = [ [ 0 for _ in range ( n + 1 ) ] for __ in range ( m + 1 ) ] for i in range ( 1 , m + 1 ) : mat [ i ] [ 0 ] = 0 for j in range ( n + 1 ) : mat [ 0 ] [ j ] = 1 for i in range ( 1 , m + 1 ) : for j in range ( 1 , n + 1 ) : if T [ i - 1 ] != S [ j - 1 ] : mat [ i ] [ j ] = mat [ i ] [ j - 1 ] else : mat [ i ] [ j ] = ( mat [ i ] [ j - 1 ] + mat [ i - 1 ] [ j - 1 ] ) return mat [ m ] [ n ] "," using namespace std; int f_gold ( string S, string T ) { int m = T . length ( ), n = S . length ( ); if ( m > n ) return 0; int mat [ m + 1 ] [ n + 1 ]; for ( int i = 1; i <= m; i ++ ) mat [ i ] [ 0 ] = 0; for ( int j = 0; j <= n; j ++ ) mat [ 0 ] [ j ] = 1; for ( int i = 1; i <= m; i ++ ) { for ( int j = 1; j <= n; j ++ ) { if ( T [ i - 1 ] != S [ j - 1 ] ) mat [ i ] [ j ] = mat [ i ] [ j - 1 ]; else mat [ i ] [ j ] = mat [ i ] [ j - 1 ] + mat [ i - 1 ] [ j - 1 ]; } } return mat [ m ] [ n ]; } int main() { int n_success = 0; vector param0 {""banana"",""49597223"",""1000010000011"",""BTlzufK"",""3474007"",""0010"",""dKHhoTD"",""9123259723"",""11001000111110"",""iY WJlIZ""}; vector param1 {""ban"",""42"",""010"",""lf"",""370"",""00000"",""doT"",""123"",""0"",""iI""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('banana','ban',), ('49597223','42',), ('1000010000011','010',), ('BTlzufK','EpsVuzP lf',), ('3474007','370',), ('0010','00000',), ('dKHhoTD','doT',), ('9123259723','123',), ('11001000111110','0',), ('iY WJlIZ','iI',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_WHETHER_TWO_STRINGS_ARE_ANAGRAM_OF_EACH_OTHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_TWO_STRINGS_ARE_ANAGRAM_OF_EACH_OTHER{ static boolean f_gold ( char [ ] str1 , char [ ] str2 ) { int n1 = str1 . length ; int n2 = str2 . length ; if ( n1 != n2 ) return false ; Arrays . sort ( str1 ) ; Arrays . sort ( str2 ) ; for ( int i = 0 ; i < n1 ; i ++ ) if ( str1 [ i ] != str2 [ i ] ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""LISTEN""); param0.add(""TRIANGLE""); param0.add(""test""); param0.add(""night""); param0.add(""Inch""); param0.add(""Dusty""); param0.add(""GJLMOOSTTXaabceefgllpwz""); param0.add(""41658699122772743330""); param0.add(""0000000000000000000000001111111111111111111""); param0.add(""ERioPYDqgTSz bVCW""); List param1 = new ArrayList<>(); param1.add(""SILENT""); param1.add(""INTEGRAL""); param1.add(""ttew""); param1.add(""thing""); param1.add(""Study""); param1.add(""1""); param1.add(""EJRXYajoy""); param1.add(""9931020""); param1.add(""0000000000000000000001111111111111111111111""); param1.add(""GLajZE""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i).toCharArray(),param1.get(i).toCharArray()) == f_gold(param0.get(i).toCharArray(),param1.get(i).toCharArray())) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str1 , str2 ) : n1 = len ( str1 ) n2 = len ( str2 ) if n1 != n2 : return 0 str1 = sorted ( str1 ) str2 = sorted ( str2 ) for i in range ( 0 , n1 ) : if str1 [ i ] != str2 [ i ] : return 0 return 1 ",,," if __name__ == '__main__': param = [ (['LISTEN'],['SILENT'],), (['TRIANGLE'],['INTEGRAL'],), (['test'],['ttew'],), (['night'],['thing'],), (['Inch'],['Study'],), (['Dusty'],['1'],), (['GJLMOOSTTXaabceefgllpwz'],['EJRXYajoy'],), (['41658699122772743330'],['9931020'],), (['0000000000000000000000001111111111111111111'],['0000000000000000000001111111111111111111111'],), (['ERioPYDqgTSz bVCW'],['GLajZE'],) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBERS_CAN_CONSTRUCTED_USING_TWO_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBERS_CAN_CONSTRUCTED_USING_TWO_NUMBERS{ static int f_gold ( int n , int x , int y ) { boolean [ ] arr = new boolean [ n + 1 ] ; if ( x <= n ) arr [ x ] = true ; if ( y <= n ) arr [ y ] = true ; int result = 0 ; for ( int i = Math . min ( x , y ) ; i <= n ; i ++ ) { if ( arr [ i ] ) { if ( i + x <= n ) arr [ i + x ] = true ; if ( i + y <= n ) arr [ i + y ] = true ; result ++ ; } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(23); param0.add(56); param0.add(30); param0.add(51); param0.add(21); param0.add(69); param0.add(12); param0.add(44); param0.add(99); param0.add(46); List param1 = new ArrayList<>(); param1.add(16); param1.add(95); param1.add(63); param1.add(89); param1.add(99); param1.add(63); param1.add(69); param1.add(52); param1.add(65); param1.add(58); List param2 = new ArrayList<>(); param2.add(16); param2.add(6); param2.add(1); param2.add(46); param2.add(38); param2.add(50); param2.add(73); param2.add(9); param2.add(10); param2.add(37); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , x , y ) : arr = [ False for i in range ( n + 2 ) ] if ( x <= n ) : arr [ x ] = True if ( y <= n ) : arr [ y ] = True result = 0 for i in range ( min ( x , y ) , n + 1 ) : if ( arr [ i ] ) : if ( i + x <= n ) : arr [ i + x ] = True if ( i + y <= n ) : arr [ i + y ] = True result = result + 1 return result "," using namespace std; int f_gold ( int n, int x, int y ) { vector < bool > arr ( n + 1, false ); if ( x <= n ) arr [ x ] = true; if ( y <= n ) arr [ y ] = true; int result = 0; for ( int i = min ( x, y ); i <= n; i ++ ) { if ( arr [ i ] ) { if ( i + x <= n ) arr [ i + x ] = true; if ( i + y <= n ) arr [ i + y ] = true; result ++; } } return result; } int main() { int n_success = 0; vector param0 {23,56,30,51,21,69,12,44,99,46}; vector param1 {16,95,63,89,99,63,69,52,65,58}; vector param2 {16,6,1,46,38,50,73,9,10,37}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (23,16,16,), (56,95,6,), (30,63,1,), (51,89,46,), (21,99,38,), (69,63,50,), (12,69,73,), (44,52,9,), (99,65,10,), (46,58,37,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_PAIRWISE_PRODUCTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_PAIRWISE_PRODUCTS{ static int f_gold ( int n ) { int sum = 0 ; for ( int i = 1 ; i <= n ; i ++ ) for ( int j = i ; j <= n ; j ++ ) sum = sum + i * j ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(21); param0.add(32); param0.add(16); param0.add(38); param0.add(9); param0.add(3); param0.add(5); param0.add(46); param0.add(45); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sm = 0 for i in range ( 1 , n + 1 ) : for j in range ( i , n + 1 ) : sm = sm + i * j return sm "," using namespace std; long long int f_gold ( int n ) { long long int sum = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = i; j <= n; j ++ ) sum = sum + i * j; return sum; } int main() { int n_success = 0; vector param0 {21,32,16,38,9,3,5,46,45,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (21,), (32,), (16,), (38,), (9,), (3,), (5,), (46,), (45,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SET_BITS_IN_AN_INTEGER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SET_BITS_IN_AN_INTEGER{ static int f_gold ( int n ) { int count = 0 ; while ( n > 0 ) { count += n & 1 ; n >>= 1 ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(58); param0.add(92); param0.add(73); param0.add(52); param0.add(24); param0.add(14); param0.add(58); param0.add(11); param0.add(8); param0.add(52); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : count = 0 while ( n ) : count += n & 1 n >>= 1 return count "," using namespace std; unsigned int f_gold ( unsigned int n ) { unsigned int count = 0; while ( n ) { count += n & 1; n >>= 1; } return count; } int main() { int n_success = 0; vector param0 {58,92,73,52,24,14,58,11,8,52}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (58,), (92,), (73,), (52,), (24,), (14,), (58,), (11,), (8,), (52,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_PALINDROME_SUBSEQUENCE_SPACE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_PALINDROME_SUBSEQUENCE_SPACE{ static int f_gold ( String s ) { int n = s . length ( ) ; int a [ ] = new int [ n ] ; for ( int i = n - 1 ; i >= 0 ; i -- ) { int back_up = 0 ; for ( int j = i ; j < n ; j ++ ) { if ( j == i ) a [ j ] = 1 ; else if ( s . charAt ( i ) == s . charAt ( j ) ) { int temp = a [ j ] ; a [ j ] = back_up + 2 ; back_up = temp ; } else { back_up = a [ j ] ; a [ j ] = Math . max ( a [ j - 1 ] , a [ j ] ) ; } } } return a [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add("" E""); param0.add(""0845591950""); param0.add(""00101011""); param0.add(""pLSvlwrACvFaoT""); param0.add(""7246""); param0.add(""1010101100000""); param0.add(""obPkcLSFp""); param0.add(""914757557818""); param0.add(""1""); param0.add(""PKvUWIQ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : n = len ( s ) a = [ 0 ] * n for i in range ( n - 1 , - 1 , - 1 ) : back_up = 0 for j in range ( i , n ) : if j == i : a [ j ] = 1 elif s [ i ] == s [ j ] : temp = a [ j ] a [ j ] = back_up + 2 back_up = temp else : back_up = a [ j ] a [ j ] = max ( a [ j - 1 ] , a [ j ] ) return a [ n - 1 ] "," using namespace std; int f_gold ( string & s ) { int n = s . length ( ); int a [ n ]; for ( int i = n - 1; i >= 0; i -- ) { int back_up = 0; for ( int j = i; j < n; j ++ ) { if ( j == i ) a [ j ] = 1; else if ( s [ i ] == s [ j ] ) { int temp = a [ j ]; a [ j ] = back_up + 2; back_up = temp; } else { back_up = a [ j ]; a [ j ] = max ( a [ j - 1 ], a [ j ] ); } } } return a [ n - 1 ]; } int main() { int n_success = 0; vector param0 {"" E"",""0845591950"",""00101011"",""pLSvlwrACvFaoT"",""7246"",""1010101100000"",""obPkcLSFp"",""914757557818"",""1"",""PKvUWIQ""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (' E',), ('0845591950',), ('00101011',), ('pLSvlwrACvFaoT',), ('7246',), ('1010101100000',), ('obPkcLSFp',), ('914757557818',), ('1',), ('PKvUWIQ',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_EVEN_LENGTH_SUBSTRING_SUM_FIRST_SECOND_HALF," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_EVEN_LENGTH_SUBSTRING_SUM_FIRST_SECOND_HALF{ static int f_gold ( String str ) { int n = str . length ( ) ; int maxlen = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j += 2 ) { int length = j - i + 1 ; int leftsum = 0 , rightsum = 0 ; for ( int k = 0 ; k < length / 2 ; k ++ ) { leftsum += ( str . charAt ( i + k ) - '0' ) ; rightsum += ( str . charAt ( i + k + length / 2 ) - '0' ) ; } if ( leftsum == rightsum && maxlen < length ) maxlen = length ; } } return maxlen ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""yQHVDWxcfsazM""); param0.add(""7889372253""); param0.add(""00""); param0.add(""N""); param0.add(""178791892313""); param0.add(""110111101111""); param0.add(""Ba""); param0.add(""320901509""); param0.add(""11""); param0.add("" HCUbvi""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, DYCK_PATH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYCK_PATH{ public static int f_gold ( int n ) { int res = 1 ; for ( int i = 0 ; i < n ; ++ i ) { res *= ( 2 * n - i ) ; res /= ( i + 1 ) ; } return res / ( n + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(72); param0.add(90); param0.add(61); param0.add(28); param0.add(70); param0.add(13); param0.add(7); param0.add(98); param0.add(99); param0.add(67); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : res = 1 for i in range ( 0 , n ) : res *= ( 2 * n - i ) res /= ( i + 1 ) return res / ( n + 1 ) "," using namespace std; int f_gold ( unsigned int n ) { int res = 1; for ( int i = 0; i < n; ++ i ) { res *= ( 2 * n - i ); res /= ( i + 1 ); } return res / ( n + 1 ); } int main() { int n_success = 0; vector param0 {72,90,61,28,70,13,7,98,99,67}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (72,), (90,), (61,), (28,), (70,), (13,), (7,), (98,), (99,), (67,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRINT_A_CLOSEST_STRING_THAT_DOES_NOT_CONTAIN_ADJACENT_DUPLICATES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRINT_A_CLOSEST_STRING_THAT_DOES_NOT_CONTAIN_ADJACENT_DUPLICATES{ public static String f_gold ( String s1 ) { int n = s1 . length ( ) ; char [ ] s = s1 . toCharArray ( ) ; for ( int i = 1 ; i < n ; i ++ ) { if ( s [ i ] == s [ i - 1 ] ) { s [ i ] = 'a' ; while ( s [ i ] == s [ i - 1 ] || ( i + 1 < n && s [ i ] == s [ i + 1 ] ) ) s [ i ] ++ ; i ++ ; } } return ( new String ( s ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""cHcZCdkbIMGUYe""); param0.add(""2292016725711""); param0.add(""10110111100010""); param0.add(""wHso xGbBY""); param0.add(""21884""); param0.add(""0""); param0.add(""I""); param0.add(""716213436""); param0.add(""101""); param0.add(""HXdDbjcyPc""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; string f_gold ( string s ) { int n = s . length ( ); for ( int i = 1; i < n; i ++ ) { if ( s [ i ] == s [ i - 1 ] ) { s [ i ] = 'a'; while ( s [ i ] == s [ i - 1 ] || ( i + 1 < n && s [ i ] == s [ i + 1 ] ) ) s [ i ] ++; i ++; } } return s; } int main() { int n_success = 0; vector param0 {""cHcZCdkbIMGUYe"",""2292016725711"",""10110111100010"",""wHso xGbBY"",""21884"",""0"",""I"",""716213436"",""101"",""HXdDbjcyPc""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, OVERLAPPING_SUM_TWO_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class OVERLAPPING_SUM_TWO_ARRAY{ static int f_gold ( int [ ] A , int [ ] B , int n ) { HashMap < Integer , Integer > hash = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( hash . containsKey ( A [ i ] ) ) hash . put ( A [ i ] , 1 + hash . get ( A [ i ] ) ) ; else hash . put ( A [ i ] , 1 ) ; if ( hash . containsKey ( B [ i ] ) ) hash . put ( B [ i ] , 1 + hash . get ( B [ i ] ) ) ; else hash . put ( B [ i ] , 1 ) ; } int sum = 0 ; for ( Map . Entry entry : hash . entrySet ( ) ) { if ( Integer . parseInt ( ( entry . getValue ( ) ) . toString ( ) ) == 1 ) sum += Integer . parseInt ( ( entry . getKey ( ) ) . toString ( ) ) ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{13,31,63,75,90,92,94,98}); param0.add(new int[]{-20}); param0.add(new int[]{0,0,0,1,1,1}); param0.add(new int[]{47,71,9,64,66,99,7,44,75,84,88,49,95,56,3,90,73,2}); param0.add(new int[]{-76,-72,-70,-60,-44,-38,-38,-26,-16,-10,-4,-2,4,18,30,38,54,56,64,66,68,70,72,82,84}); param0.add(new int[]{0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,1,1}); param0.add(new int[]{3,4,4,6,11,13,14,18,30,30,34,39,40,45,46,50,51,56,60,61,66,68,72,79,79,82,83,87,89,91,91,92,92,93,94}); param0.add(new int[]{-14,12,98,34,58,-70,6,52,-50,96,-6}); param0.add(new int[]{0,0,0,1,1,1,1,1}); param0.add(new int[]{34,85,60,55,38,69,21,43,39,83,10,71,73,15,94,59,83,39,29,31,61,9,11,27,71,90,18,11,4,3,97,43,58,50,35,42,70,33,98,61,32,32,12,29}); List param1 = new ArrayList<>(); param1.add(new int[]{14,16,20,28,32,55,56,56}); param1.add(new int[]{60}); param1.add(new int[]{0,0,1,1,1,1}); param1.add(new int[]{8,27,21,40,99,8,52,37,72,50,61,82,88,71,27,84,38,35}); param1.add(new int[]{-80,-64,-50,-44,-34,-26,-24,-22,-6,-2,2,2,12,24,34,44,48,50,52,70,76,82,86,94,96}); param1.add(new int[]{0,0,0,1,1,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0}); param1.add(new int[]{3,7,15,15,21,23,30,32,35,38,38,41,41,41,44,45,49,52,60,60,63,66,66,70,72,74,74,75,79,81,87,88,89,93,96}); param1.add(new int[]{50,-22,-82,40,-80,30,-58,-64,60,6,-28}); param1.add(new int[]{0,0,1,1,1,1,1,1}); param1.add(new int[]{74,10,95,67,59,17,32,87,87,12,22,45,50,35,25,51,10,86,75,4,74,43,92,63,60,28,32,72,66,61,43,48,20,89,55,59,22,85,73,43,7,65,53,98}); List param2 = new ArrayList<>(); param2.add(6); param2.add(0); param2.add(5); param2.add(16); param2.add(16); param2.add(17); param2.add(22); param2.add(9); param2.add(5); param2.add(34); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int A [ ], int B [ ], int n ) { unordered_map < int, int > hash; for ( int i = 0; i < n; i ++ ) { hash [ A [ i ] ] ++; hash [ B [ i ] ] ++; } int sum = 0; for ( auto x : hash ) if ( x . second == 1 ) sum += x . first; return sum; } int main() { int n_success = 0; vector> param0 {{13,31,63,75,90,92,94,98},{-20},{0,0,0,1,1,1},{47,71,9,64,66,99,7,44,75,84,88,49,95,56,3,90,73,2},{-76,-72,-70,-60,-44,-38,-38,-26,-16,-10,-4,-2,4,18,30,38,54,56,64,66,68,70,72,82,84},{0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,1,1},{3,4,4,6,11,13,14,18,30,30,34,39,40,45,46,50,51,56,60,61,66,68,72,79,79,82,83,87,89,91,91,92,92,93,94},{-14,12,98,34,58,-70,6,52,-50,96,-6},{0,0,0,1,1,1,1,1},{34,85,60,55,38,69,21,43,39,83,10,71,73,15,94,59,83,39,29,31,61,9,11,27,71,90,18,11,4,3,97,43,58,50,35,42,70,33,98,61,32,32,12,29}}; vector> param1 {{14,16,20,28,32,55,56,56},{60},{0,0,1,1,1,1},{8,27,21,40,99,8,52,37,72,50,61,82,88,71,27,84,38,35},{-80,-64,-50,-44,-34,-26,-24,-22,-6,-2,2,2,12,24,34,44,48,50,52,70,76,82,86,94,96},{0,0,0,1,1,0,1,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0},{3,7,15,15,21,23,30,32,35,38,38,41,41,41,44,45,49,52,60,60,63,66,66,70,72,74,74,75,79,81,87,88,89,93,96},{50,-22,-82,40,-80,30,-58,-64,60,6,-28},{0,0,1,1,1,1,1,1},{74,10,95,67,59,17,32,87,87,12,22,45,50,35,25,51,10,86,75,4,74,43,92,63,60,28,32,72,66,61,43,48,20,89,55,59,22,85,73,43,7,65,53,98}}; vector param2 {6,0,5,16,16,17,22,9,5,34}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MOBILE_NUMERIC_KEYPAD_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MOBILE_NUMERIC_KEYPAD_PROBLEM{ static int f_gold ( char keypad [ ] [ ] , int n ) { if ( keypad == null || n <= 0 ) return 0 ; if ( n == 1 ) return 10 ; int [ ] odd = new int [ 10 ] ; int [ ] even = new int [ 10 ] ; int i = 0 , j = 0 , useOdd = 0 , totalCount = 0 ; for ( i = 0 ; i <= 9 ; i ++ ) odd [ i ] = 1 ; for ( j = 2 ; j <= n ; j ++ ) { useOdd = 1 - useOdd ; if ( useOdd == 1 ) { even [ 0 ] = odd [ 0 ] + odd [ 8 ] ; even [ 1 ] = odd [ 1 ] + odd [ 2 ] + odd [ 4 ] ; even [ 2 ] = odd [ 2 ] + odd [ 1 ] + odd [ 3 ] + odd [ 5 ] ; even [ 3 ] = odd [ 3 ] + odd [ 2 ] + odd [ 6 ] ; even [ 4 ] = odd [ 4 ] + odd [ 1 ] + odd [ 5 ] + odd [ 7 ] ; even [ 5 ] = odd [ 5 ] + odd [ 2 ] + odd [ 4 ] + odd [ 8 ] + odd [ 6 ] ; even [ 6 ] = odd [ 6 ] + odd [ 3 ] + odd [ 5 ] + odd [ 9 ] ; even [ 7 ] = odd [ 7 ] + odd [ 4 ] + odd [ 8 ] ; even [ 8 ] = odd [ 8 ] + odd [ 0 ] + odd [ 5 ] + odd [ 7 ] + odd [ 9 ] ; even [ 9 ] = odd [ 9 ] + odd [ 6 ] + odd [ 8 ] ; } else { odd [ 0 ] = even [ 0 ] + even [ 8 ] ; odd [ 1 ] = even [ 1 ] + even [ 2 ] + even [ 4 ] ; odd [ 2 ] = even [ 2 ] + even [ 1 ] + even [ 3 ] + even [ 5 ] ; odd [ 3 ] = even [ 3 ] + even [ 2 ] + even [ 6 ] ; odd [ 4 ] = even [ 4 ] + even [ 1 ] + even [ 5 ] + even [ 7 ] ; odd [ 5 ] = even [ 5 ] + even [ 2 ] + even [ 4 ] + even [ 8 ] + even [ 6 ] ; odd [ 6 ] = even [ 6 ] + even [ 3 ] + even [ 5 ] + even [ 9 ] ; odd [ 7 ] = even [ 7 ] + even [ 4 ] + even [ 8 ] ; odd [ 8 ] = even [ 8 ] + even [ 0 ] + even [ 5 ] + even [ 7 ] + even [ 9 ] ; odd [ 9 ] = even [ 9 ] + even [ 6 ] + even [ 8 ] ; } } totalCount = 0 ; if ( useOdd == 1 ) { for ( i = 0 ; i <= 9 ; i ++ ) totalCount += even [ i ] ; } else { for ( i = 0 ; i <= 9 ; i ++ ) totalCount += odd [ i ] ; } return totalCount ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[][]{new char[]{' ','A','C','K','R','R','V','c','d','i','i','j','m','o','q','q','r','r','v','v','x','z'},new char[]{'B','D','I','M','N','Q','R','Z','c','f','i','j','j','l','l','n','p','q','s','t','t','w'},new char[]{'A','F','F','G','H','J','K','K','N','V','V','b','c','c','g','i','j','l','l','s','t','y'},new char[]{' ','A','B','B','E','H','I','J','J','P','Q','T','U','V','Z','c','c','j','p','w','y','z'},new char[]{' ',' ','A','C','F','G','H','M','N','R','R','V','c','i','j','o','p','p','q','r','w','y'},new char[]{' ',' ','C','C','D','H','I','J','K','O','S','X','Y','f','h','h','o','p','p','u','u','w'},new char[]{'B','C','D','H','M','M','Q','Q','R','S','X','Z','e','e','e','j','k','l','m','o','v','w'},new char[]{'A','C','C','D','H','H','I','J','L','L','L','M','N','S','U','c','d','f','f','s','u','y'},new char[]{'A','B','D','D','I','J','K','L','L','M','P','S','S','Y','b','e','h','j','m','o','q','s'},new char[]{' ','B','E','H','H','J','M','P','S','T','U','V','Z','d','j','m','m','p','q','v','w','w'},new char[]{'B','E','F','G','H','M','M','M','N','O','Q','R','T','V','a','c','g','g','i','s','x','y'},new char[]{'A','E','G','J','O','R','R','S','T','W','a','b','f','h','h','i','m','n','s','u','v','y'},new char[]{'B','D','E','H','I','I','K','M','N','P','Q','S','a','e','i','j','m','o','p','r','x','z'},new char[]{'A','G','I','K','K','L','O','P','U','U','X','X','Z','a','c','f','g','i','l','o','o','v'},new char[]{' ',' ','E','H','J','J','L','M','N','O','P','S','S','X','c','f','g','r','u','v','x','z'},new char[]{'C','E','F','F','H','H','I','K','M','M','U','Z','e','e','h','h','h','j','k','k','p','r'},new char[]{' ',' ',' ','C','G','I','J','O','O','P','T','V','Y','b','j','n','o','o','s','u','w','x'},new char[]{'A','D','F','F','H','H','N','R','S','W','W','Y','Y','b','f','i','k','o','u','y','y','z'},new char[]{' ','C','G','I','I','L','P','S','X','Y','d','d','f','g','g','k','m','o','r','r','r','x'},new char[]{'F','I','J','N','P','P','Q','Q','R','X','Y','a','b','h','h','j','l','m','n','p','r','y'},new char[]{' ','C','D','E','F','L','Q','Q','V','c','g','h','k','k','l','l','n','o','p','r','u','x'},new char[]{' ','A','G','K','L','M','T','U','U','W','Z','a','f','i','k','k','n','n','p','q','v','z'}}); param0.add(new char[][]{new char[]{'3','5','1','5','6','7','7','3','0','4','7','6','1','4','0','6','3','4','1','3','1','2','9','8','7','8','0','2','7','6','1','0','3','8','0','5','9','3','9','9','8','6'},new char[]{'0','3','8','5','0','2','0','6','1','8','7','2','8','6','0','3','9','4','9','5','7','4','3','7','4','3','8','6','1','5','4','8','0','8','3','2','7','7','6','9','7','9'},new char[]{'6','7','1','1','7','2','5','3','2','8','4','7','8','6','1','5','2','1','6','5','7','6','8','6','8','8','1','6','3','1','1','7','1','6','4','9','2','8','2','6','3','4'},new char[]{'8','7','9','2','0','6','6','6','2','3','1','4','8','2','3','5','5','9','2','8','0','3','2','7','2','0','2','7','0','6','5','8','2','9','3','9','8','1','9','7','9','7'},new char[]{'9','8','1','5','0','9','9','7','7','8','4','1','8','0','4','6','7','0','5','8','6','5','6','5','1','4','0','4','3','4','6','7','6','7','3','5','4','5','6','7','1','1'},new char[]{'4','4','4','9','8','8','7','5','3','1','8','4','8','1','0','4','9','8','9','5','2','7','5','3','4','8','2','4','7','5','0','3','6','2','5','6','3','1','9','4','8','9'},new char[]{'7','2','7','6','2','8','8','8','1','1','5','4','6','5','3','0','3','7','4','0','0','2','4','1','8','0','0','7','6','4','7','1','8','8','1','8','8','2','3','1','7','2'},new char[]{'2','7','5','8','7','6','2','9','9','0','6','1','7','8','1','3','3','1','5','7','9','8','2','0','7','6','0','0','1','1','5','8','6','7','7','9','9','0','4','4','3','4'},new char[]{'0','9','9','0','5','4','9','9','3','0','3','1','5','9','9','5','3','0','2','3','9','9','7','8','5','4','6','4','2','8','7','0','2','3','6','5','2','6','0','6','5','7'},new char[]{'1','1','4','1','4','2','7','1','9','7','9','9','4','4','2','7','6','8','2','6','7','3','1','8','0','5','3','0','3','9','0','4','7','9','6','8','1','7','0','3','2','4'},new char[]{'6','3','1','3','2','9','5','5','4','7','2','4','7','6','9','2','0','1','2','1','4','3','8','4','9','8','9','7','7','6','8','2','4','5','3','0','1','3','0','1','0','9'},new char[]{'5','9','4','2','1','5','0','2','6','6','0','8','3','0','3','3','3','0','7','8','0','7','7','4','3','0','6','9','6','2','2','2','8','3','7','2','4','0','0','4','5','2'},new char[]{'3','1','1','6','2','9','7','0','3','2','8','0','5','2','2','9','9','2','8','3','5','7','4','2','8','7','8','0','4','9','7','8','0','3','2','2','1','5','1','4','9','1'},new char[]{'6','4','8','2','4','2','5','4','0','1','0','9','0','3','0','6','4','8','6','7','9','3','0','1','6','9','5','7','5','2','9','4','7','0','6','4','1','4','4','1','3','5'},new char[]{'6','7','8','2','9','5','0','2','6','5','4','9','4','7','8','4','6','7','6','5','1','3','8','1','7','5','9','3','9','4','0','6','5','6','9','8','4','6','9','9','0','2'},new char[]{'6','9','2','4','3','7','2','5','8','6','3','6','3','6','7','2','6','8','6','4','3','9','6','2','1','3','1','8','8','9','6','2','0','2','2','9','3','6','4','4','8','7'},new char[]{'1','4','5','5','7','2','3','8','3','6','9','3','3','4','4','2','3','7','5','5','2','8','7','2','7','6','0','5','1','4','1','5','5','0','4','8','7','8','1','4','2','6'},new char[]{'5','6','8','0','0','6','3','8','3','8','2','0','8','5','4','4','0','0','8','5','8','9','1','3','3','1','1','2','9','9','1','2','1','3','5','8','7','9','3','1','3','5'},new char[]{'9','6','7','4','9','0','2','8','9','4','3','6','4','1','8','3','1','8','0','4','4','2','1','2','9','8','3','6','7','3','9','5','7','9','1','4','6','1','4','5','4','0'},new char[]{'5','7','4','0','6','7','8','3','6','5','8','1','4','9','9','2','7','7','4','2','8','0','8','3','2','7','3','5','7','4','4','1','3','5','1','9','6','1','0','9','5','4'},new char[]{'3','4','0','0','3','2','2','2','9','7','5','5','1','8','4','7','9','0','7','4','1','9','3','7','3','9','5','0','3','6','6','8','8','4','1','8','2','3','9','5','3','3'},new char[]{'7','0','6','2','5','2','1','8','1','4','4','8','9','0','3','0','3','1','9','0','8','0','1','0','3','7','6','6','3','9','4','3','4','4','1','4','7','2','9','5','8','3'},new char[]{'7','5','7','9','8','8','3','4','3','2','5','2','4','6','5','6','1','6','0','4','9','6','8','0','3','3','2','1','1','8','9','5','3','8','3','0','4','7','7','9','2','6'},new char[]{'6','3','9','7','5','8','5','1','1','6','6','0','8','3','2','7','3','0','4','5','1','2','3','0','4','2','8','4','1','1','0','2','3','2','5','6','3','0','1','2','2','5'},new char[]{'8','7','2','1','4','9','6','5','2','0','9','1','0','8','6','9','7','3','4','5','6','7','2','8','3','0','1','9','5','4','4','1','6','4','0','5','1','5','7','8','2','4'},new char[]{'4','8','1','1','7','0','8','0','2','1','8','2','2','7','6','2','3','5','2','5','5','5','9','3','4','9','4','9','8','8','0','1','6','7','7','5','7','5','9','3','6','1'},new char[]{'5','8','6','8','0','7','3','1','9','2','3','5','5','5','0','9','2','2','2','8','7','7','6','7','6','7','4','3','9','8','3','9','3','5','7','1','3','1','4','0','7','1'},new char[]{'9','2','6','8','8','6','8','4','8','6','7','7','7','0','2','6','5','1','5','3','8','0','5','6','5','4','9','4','6','0','0','7','2','2','1','1','0','5','1','2','5','1'},new char[]{'1','8','4','3','2','6','1','8','3','6','5','5','1','5','9','8','0','2','8','9','4','2','1','9','6','5','1','2','5','4','6','7','3','8','7','3','2','4','7','6','6','0'},new char[]{'9','2','9','7','5','6','4','9','5','4','8','5','2','4','0','5','5','1','0','9','3','6','4','0','9','4','2','7','5','1','3','4','8','3','7','4','2','8','3','0','2','8'},new char[]{'8','4','4','7','5','7','3','2','8','9','5','5','2','3','8','3','3','8','0','4','9','5','9','8','5','9','1','9','4','3','9','7','4','3','0','9','3','1','3','1','3','9'},new char[]{'9','3','7','7','4','9','1','1','8','9','2','1','2','4','1','0','9','2','8','8','9','7','2','6','0','4','3','6','2','1','4','7','6','2','4','0','8','5','1','6','2','1'},new char[]{'6','8','7','3','6','4','3','9','3','7','1','5','0','5','5','1','7','9','3','9','8','9','9','6','6','3','1','2','2','2','0','7','8','4','7','3','6','2','2','1','9','6'},new char[]{'1','3','1','5','7','5','2','5','3','4','0','7','6','8','5','9','7','1','0','3','3','8','2','9','7','2','4','8','6','3','1','3','3','0','7','1','5','9','0','9','8','1'},new char[]{'4','1','6','2','2','3','9','7','6','5','6','5','3','0','8','4','3','0','6','8','7','4','1','4','2','3','2','2','1','0','0','5','3','4','0','8','4','8','4','9','0','0'},new char[]{'2','1','1','4','8','0','6','9','7','0','9','4','7','6','1','1','5','2','0','6','9','2','0','2','7','3','3','0','5','2','6','3','0','1','8','3','5','5','3','9','8','5'},new char[]{'1','3','2','8','8','7','7','2','6','3','8','8','5','6','7','0','1','7','7','8','5','1','9','5','2','5','7','2','2','5','9','6','0','3','1','2','2','2','3','0','1','9'},new char[]{'2','5','0','6','4','0','1','6','9','7','0','6','7','4','9','1','0','2','5','5','7','0','2','0','8','0','6','2','6','8','1','1','0','6','4','4','0','6','5','8','7','3'},new char[]{'9','7','8','6','0','3','7','5','7','5','6','0','5','6','3','9','6','3','2','6','0','0','6','5','8','3','7','3','7','3','5','2','4','9','4','1','0','7','9','7','6','2'},new char[]{'3','0','7','5','1','4','8','7','9','9','0','7','6','8','6','0','5','8','0','8','9','4','8','1','3','1','8','6','0','5','1','7','3','4','7','6','4','2','8','6','1','7'},new char[]{'4','2','8','1','1','3','2','6','5','1','9','1','2','8','8','8','2','6','2','5','6','0','7','5','2','0','9','3','0','1','4','1','1','0','0','3','9','3','4','8','8','3'},new char[]{'9','1','9','0','9','4','0','8','4','9','7','6','7','6','0','7','1','1','7','4','9','0','0','7','3','2','8','1','6','9','7','2','0','1','6','1','9','8','9','7','5','3'}}); param0.add(new char[][]{new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1'}}); param0.add(new char[][]{new char[]{'b','q','b','D','t','y','Z','G','d','r','R','R','z','A','Y','H','D','Q','X','U','o','a','S','P','S','c','W','r','I','y','E','x','E','k','l','F','M','G','z','T','I','E','D','K','M','l'},new char[]{'V','m','W','M','l','H','l','j','f','S','k','g','O','W','S','R','I','L','J','Z','V','X','w','l','K','s','F','o','X','k','a','L','K','H',' ','E','x','b','Z','w','Z','Y','U','y','I','Q'},new char[]{'I','o','s','A','f','Z','C','o','X','b','d','s',' ','Y','Q','U','C','T','K','r','Q','U','P','C','w','R','e','s','L','A','j','g','p','B','I','W','L','e','w','b','R','z','Y','M','M','E'},new char[]{'k','Y','v','L','f','x','v','l','C','g','J','V','l','q','p','x','z','A','J','h','V','i','h','r','Z','i',' ','y','M','k','p','q','X','M','U','W','v','v','P','L','n','j','r','O','k',' '},new char[]{'K','k','K','Z','X','W','e',' ','x','u','r','l','l','z','V','e','K','z','y','x','f','v','n','f','K','p','b','I','C','p','b','V','R','t','n','t','m','A','F','J','U','M','n','g','M','W'},new char[]{'a','e','x','A','U','V','P','W','W','l','p',' ','o','L','X','E','g','k','Y','W','P','Y','B','t','Z','m','V','Z','O','z','o','O','m','s','x','O','L','q','Z','E','y','B','l','h','h','T'},new char[]{'c','x','R','R','x','S','R','y','J','Y','e','F','X','x','h','L','N','Q','j','X','s','H','Z','M','Q','b','Q','h','x','R','Y','C','r','D','b','O','l','W','J','I','A','P','x','D','T','c'},new char[]{'Y','s','B','N','B','g','e','h','l','y','N','s','a','f','k','p','C','Q','c','U','A','N','w','V','z','F','j','M','F','g','q','x','r','l','e','Y','T','z',' ','a','n','n','x','p','m','J'},new char[]{'v','O','a','A','E','q','L','P',' ','w','l','G','k','f','M','A','k','i','f','D','z','A','J','Y','b','g','a','h','e','S','Q','H','c','f','I','S','X','Y','J','g','f','n','G','J','r','S'},new char[]{' ','S','w','G','b','v','z','U','l','k','a','w','y','D','Q','v','c','T','S','S','n','M','m','j','U','X','a','k','O','A','T','a','U','u','y','s','W','j','k','n','a','V','X','N','D','C'},new char[]{'Z','o','O','a','z','M','X','k','m','X','J','w','y','d','j','c','Q','E','E','i','g','q','U','v','C','k','y','t','T','A','o','u','o','e','J','c','c','d','i','o','b','A','h','g','y','Y'},new char[]{'O','j','F','A','f','t','J','u','V','J','P','Z','C','c','c','y','G','s','W','X','O','g','q','l','z','L','p','U','o','A','k','v','q','v','I','W','k','r','m','Y','i','V','Y','c','P','S'},new char[]{'N',' ','W','k','z','o','V','w','M','a','q','c','P','D','x','O','M','y',' ','B','y','L','V','E','j','i','C','k',' ',' ','c','K','c','h','y','K','c','G','Q','h','B','i','L','Q','P','s'},new char[]{'X','p','y','I','W','F','F','o','W','g','A','H','a','H','X','F','d','Y','I','x','n','r','s','c','B','L','o','B','C','o','G','v','T','q','A','Z','a','Z','d','S','B','S','F','I','m','C'},new char[]{'F','t','c','w','E','X','s','F','e','J','h','Y','f','g','d','f','N','X','G','l','n','M','L','k','P','Y','M',' ','U','X','n','s','o','F','R','g','E','I','G','P','x','f','h','K','b','k'},new char[]{'a','p','j','Q','X','p','h','R','g','U','O','x','X','k','v','m','o','E','Z','Z','W','v','k','l','o','O','N','P','Q','k','A','K','c','l','w','a','k','Z','d','T','S','t','K','L','x','k'},new char[]{'t','f','V','Q','X','e','s','f','o','N','U','z','y','K','F',' ','A','V','W','A','j','C','T','G','z','K','j',' ','I','w','h','Q','t','I','m','V','h','M','L','Q','J','g','p','x','P','i'},new char[]{'X','Q','b','i','T','A','R','f','c','r','K','t','J','E','Z','d','W','O','G','X','u','I','z',' ','m','H','s','P','d','s','k','m','E','K','Y','H','L','b','Z','y','I','c','p','y','Y','T'},new char[]{'P','g','C','T','i','Z','s','s','r','E','L','P','T','o','r','g','x','c','U','b','o','l','H','H','k','b','N','e','S','E','U','c','g','V','E','V','l','L',' ','I','h','M','L','z','P','e'},new char[]{'l','i','O','F','S','e','Z','j','y','J','p','c','q','j','Q','E','j','d','u','S','N','Y','R',' ','F','I','f','u','d','t','u','Q','J','v','i','x','A','d','k','v','H','Z','B','u','o','k'},new char[]{'V','p','B','h','M','a','p','n','z','L','s','g','c','G','T','X','a','X','s','h','O','x','h','s','x','N',' ','O','w','F','v','M','W','u','c','Y','x','x','H','P','T','h','s','W','w','l'},new char[]{'B','f','k','U','j','b','X','J','z','y','w','B','n','f','x','N','Y','l','Q','h','t','v','U','y','I','G','q','T','a','i','N','p','e','Z','Y','Q','B','G','e','N','V','s','E','U','B','h'},new char[]{'q','Y','r','w','t','G','G','M','F',' ','e','u','E','g','s','D','c','h','L','G','x','u','V','j','u','U','i','m','Y','J','L','P','h','X','p','P','F','f','O','u','U','H','Y','I','A','X'},new char[]{'v',' ','W','A','e','t','Y','t','I','s','w','M',' ','E','R','K','x','i','O','w','h','e','f','N','i','N','v','q','F','u','A','c','e','s','p','N','j','G','q','W','q','U','J','b','V','i'},new char[]{'p','Y','p','f','I','N','S','C','J','p','O','O','s','V','s','Z','y','s','l','o','b','e','L','J','m','W','g','P','x','l','W','N','a','T','m','D','p','p','l','P','E','V','c','O','T','Z'},new char[]{'x',' ','v','X','T','s','i','A','J','q','H','P','x','q','Y','n','s','i','W','z','Y','q','a','Z','t','M','s','A','q','e','W','V','g','y','x','n','E','p','x','t','q','R','T','m','h','m'},new char[]{'M','u','D','R','R','h','B','f',' ','H','b','l','q','X','f','b','r','e','v','D','m','T','v','l','g','l','z','y','A','O','i','G','Q','l','K','G','H','G','S','b','a','b','k','p','g','R'},new char[]{'G','Q','P','e','P','r','K','U','l','g','X','q','I','O','U','y','V','Z','t','Q','g','d','T','J','q','w','z','L','V','p','e','X','x','D','k','R','P','U','L','z','a','L','L','Q','z','D'},new char[]{'j','W','Q','E','P','V','f','p','w','n','U','j','Z','P','f','v','R','r','h','z','r','l','T','P','U','f','v','A','B','k','b','n','o','h','j','K','h','r','f','q','x','E','U','g','d','C'},new char[]{'C','v','D',' ','K','d','d','D','d','f','U','F','l','x','E','D','Q','L','W','X','E','E','X','T','M','C','e','B','x','o','C','f','d','o','F','T','J','F','G','l','k','x','u','q','N','t'},new char[]{'l','d','P','k','N','w','t','C','u','n','f','Z','B','A','Z','z','z','v','Z','s','n','f','Y','c','s','j','e','M','E','i','N','Y','D','k','k','n','j','X','q','T','T','G','S','d','t','d'},new char[]{'c','c','G','d','y','T','E','w','k','R','d','N','S','M','L','p','H','F','C','L','n','l','C','M','L','u','k',' ','X','E','L','J','L','G','l','H','l','r','p','v','D','T','r','L','v','e'},new char[]{'t','A','s','J','M','b','P','a','p','G','q','p','i','d','b','C','S','w','c','N','m','A','C','m','f','T','P','z','U','L','o','V','N','M','G','h','V','h','U','S','I','N','f','H','L','f'},new char[]{'q','V','Z','j','s','c','T','n','U','l','E','V','c','s','J','n','q','b','c','h','e','x','H','G','k','U','P','U','T','W','n','t','p','i','b','u','b','H','s','D','L','Y','Z','u','P','w'},new char[]{'s','F','O','t','J','e','f','P','l','l','v','G','B','J','i','b','i','r','P','x','a','i','X','T','G','G','a','k','d','Z','L','Y','U','r','b','p','t','k','L','t','x','T','k','v','a','k'},new char[]{'c','s','B','Z','d','h','d','P','w','D','a','c','G','M','T','u','U','O','T','w','a','o','x','V','J','g','N','w','w','f','g','u','j','p','G','T','w','X','J','p','M','y','o','G','m','w'},new char[]{'w','j','K','u','K','d','N','I','w','E',' ','K','K','c','x','U','A','A','v','F','z','a','z','C','V','W','A','o','m','Z','i','U','F','e','p','w','O','A','T','u','a','P','l','y','w','J'},new char[]{'b','M','e','h','S','Q','c','G','D','A','I','H','g','f','E','j','x','u','P','p','p','d','V','F','D','L','L','g','H','h','n','Q','K','L','g','K','y','Y','u','A','g','W','t','J','X','F'},new char[]{'k','J','l','X','J','m','e','Y','d','Z','L','W','r','W','T','J','G','f',' ','s','j','j','P','h','k','x','k','k','B','N','j','h','s','o','b','m','u','O','i','D','c','B','a','h','B','Y'},new char[]{'L','l','R','Z','f','j','G','E','j','g','X','S','P','H','T','a','c','Y','b','r','N','N','R','n','d','j','H','M','X','A','V','G','c','r','l','v','F','e','z','k','z','Q','r','F','L','H'},new char[]{'U','o','Y','O','n','J','c','i','j','a','j','H','O','u','S','m','K','y','i','T','v','j',' ','v','H','f','r','q','F','a','l','u','F','E','p','b','V',' ','m','O','M','E','f','Q','t','T'},new char[]{' ','B','H','i','H','c','T',' ','K','u','d','C','F','F','S','v','Z','A','b','t','r','G','I','F','p','L','G','N','h','y','m','b','z','V','G','D','p','K','p','C','X','y','w','c','z','K'},new char[]{'P','q','o','M','T','U','o','r','A','h','S','q','T','s','V','u','c','N','v','E','r','X','k','v','M','p','Q','d','Y','Q','J','c','L','M','r','Z','D','k','V','u','G',' ','Y','O','i','x'},new char[]{'V','x','o','G','T','g','G','N','A','q','p','l','K','t','j','n','C','U','c','b','q','q','c','C','w','x','B','C','t','V','z','y','y','o','U','E','O','X','j','V','r','y','t','n','R','H'},new char[]{'Z','O','w','z','v','K','U','c','N','M','h','W','Y','Z','g','k','h','o','K','B','K','q','u','P','z','v','j','u','z','P','B','y','p','Y','U','W','Z','I','c','m','W','J','c','l',' ','O'},new char[]{'Q','A','B','Z','C','D','N','i','W','E','W','V','Z','k','A','D','z','Z','I','t','Y','K','u','T','u','q','p','V','P','y','o','e','Y','x','d','L','P','L','p','Z','E','N','r','c','K','Z'}}); param0.add(new char[][]{new char[]{'1','1','1','1','2','2','3','3','3','4','4','5','5','6','7','7','7','8','8','9','9'},new char[]{'0','0','1','1','1','2','3','4','5','6','6','6','6','6','6','6','7','7','8','8','9'},new char[]{'0','0','0','0','0','1','1','2','2','2','3','3','4','5','5','5','5','6','7','7','8'},new char[]{'0','1','1','2','2','2','2','2','3','3','4','4','5','5','6','6','7','7','7','9','9'},new char[]{'0','0','1','1','2','2','2','3','3','3','4','4','4','4','4','6','7','7','8','8','9'},new char[]{'0','0','0','0','1','1','2','3','3','3','3','4','4','4','5','7','8','8','8','9','9'},new char[]{'0','0','0','0','0','0','1','1','2','3','4','5','5','6','6','7','7','8','8','9','9'},new char[]{'0','2','2','2','4','4','4','4','4','5','5','5','6','6','7','7','7','8','8','9','9'},new char[]{'0','0','1','2','3','3','3','4','4','5','5','5','7','7','7','8','8','8','9','9','9'},new char[]{'0','0','1','2','2','3','4','4','4','4','4','5','6','6','6','7','8','8','9','9','9'},new char[]{'0','0','1','1','1','1','1','2','2','2','2','3','4','4','5','5','6','6','8','8','9'},new char[]{'0','0','1','2','2','2','3','3','5','5','5','6','7','7','7','7','7','8','8','9','9'},new char[]{'0','0','1','1','1','3','5','5','5','5','6','6','6','6','6','7','7','8','8','9','9'},new char[]{'0','0','1','2','2','2','2','2','2','3','3','5','5','5','6','7','8','8','9','9','9'},new char[]{'0','0','0','0','2','3','5','5','5','5','5','6','6','6','7','7','7','7','7','8','9'},new char[]{'0','0','1','2','2','3','3','3','4','4','4','5','5','5','6','6','6','7','7','8','9'},new char[]{'0','0','0','0','1','1','3','3','3','4','4','5','5','6','7','8','8','8','9','9','9'},new char[]{'0','0','1','1','1','1','1','2','2','3','5','5','6','6','6','7','7','7','7','8','8'},new char[]{'0','1','1','1','1','2','2','4','4','4','4','4','5','5','6','7','7','8','8','9','9'},new char[]{'1','1','2','2','3','3','4','5','5','5','5','6','6','7','7','7','8','8','8','9','9'},new char[]{'0','0','0','0','2','2','2','3','3','4','5','5','5','5','5','5','6','7','7','7','9'}}); param0.add(new char[][]{new char[]{'0','1','0','1','1','1','0','1','1','0','1','0','0','0','1','1','1','1','0','0','0','1','1','1','0','1','1','1','1','1','0','0','0','1','1','1','1','0','1'},new char[]{'1','0','0','0','1','0','1','1','0','0','0','0','1','0','0','0','1','1','0','0','0','1','0','0','1','0','1','1','1','1','0','0','0','0','0','0','0','1','0'},new char[]{'0','1','1','0','1','0','1','1','0','0','0','1','0','1','1','0','1','0','0','1','0','1','0','1','1','1','0','1','0','0','0','1','0','0','1','1','1','0','0'},new char[]{'0','1','1','0','0','1','1','1','0','0','0','1','1','1','1','1','0','1','0','1','1','0','0','0','1','1','0','0','1','1','1','1','0','0','0','0','1','1','0'},new char[]{'1','1','1','1','1','0','0','0','1','0','1','1','0','1','1','0','0','1','1','1','1','0','1','0','0','0','0','0','1','0','0','1','0','0','1','0','0','1','1'},new char[]{'1','0','1','0','0','1','1','1','1','0','1','1','0','0','0','0','1','0','0','1','0','1','0','1','1','1','1','0','0','1','0','0','1','1','0','1','0','1','0'},new char[]{'0','0','0','0','1','1','0','1','0','1','0','1','1','1','1','1','0','1','1','0','1','0','0','1','0','1','0','0','0','0','1','1','1','1','0','0','0','1','1'},new char[]{'1','0','0','1','1','1','1','0','0','0','1','0','0','1','0','0','0','0','1','0','1','0','0','0','0','1','1','0','1','1','0','1','0','0','0','0','1','0','0'},new char[]{'0','0','1','1','1','1','0','1','0','1','1','1','1','0','1','1','0','0','0','0','0','0','0','1','0','1','1','0','1','0','0','0','1','1','0','1','1','1','1'},new char[]{'1','0','0','1','1','0','1','1','0','0','0','1','1','0','1','0','1','0','0','0','0','1','1','1','0','1','1','0','0','1','0','0','0','1','1','0','1','0','0'},new char[]{'0','0','0','1','0','0','1','1','0','0','1','0','0','1','0','0','0','0','1','1','0','1','0','0','1','0','1','0','1','0','1','1','0','0','0','1','0','0','1'},new char[]{'1','0','0','1','0','0','0','0','1','1','1','0','1','1','1','0','0','0','0','0','0','1','0','1','0','1','0','1','1','1','1','0','1','0','1','1','0','1','0'},new char[]{'0','0','1','0','0','0','1','1','1','1','1','0','1','1','1','1','0','0','1','0','0','0','0','1','0','1','1','0','0','1','1','1','0','0','0','1','1','0','0'},new char[]{'0','1','0','1','0','0','0','0','1','1','1','1','0','0','0','0','1','1','1','0','0','0','0','0','0','1','0','1','1','1','1','0','0','1','0','0','0','0','0'},new char[]{'0','0','0','0','1','1','0','0','1','1','0','0','0','1','1','0','1','0','0','0','0','1','0','0','1','1','1','0','0','1','1','1','1','0','1','0','1','1','1'},new char[]{'1','1','0','1','1','0','0','0','0','0','0','1','0','1','0','0','0','1','1','0','1','1','0','0','1','0','0','1','0','0','0','0','1','0','1','0','1','0','1'},new char[]{'0','0','0','1','1','1','1','1','1','1','1','1','1','1','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','0','1','0','0','1','1','1','1','1','0'},new char[]{'1','1','0','1','1','1','0','0','1','1','0','0','1','0','1','1','0','1','1','0','0','1','1','0','0','1','0','0','0','0','0','1','0','0','0','1','0','1','1'},new char[]{'0','0','1','0','1','0','0','0','0','0','1','0','0','1','1','1','0','1','0','0','0','0','0','1','0','0','0','0','1','0','1','1','1','0','1','1','1','0','0'},new char[]{'1','1','0','1','0','0','1','1','1','1','0','0','1','0','0','0','1','1','1','0','1','0','1','0','1','1','1','1','1','0','0','0','1','0','0','0','1','1','1'},new char[]{'1','0','0','1','1','1','0','0','1','1','1','1','1','0','0','0','0','0','1','0','1','0','0','0','0','1','0','0','1','1','0','1','1','0','1','0','0','0','0'},new char[]{'0','0','1','1','0','1','1','1','0','0','0','1','1','1','1','1','0','1','1','1','1','0','1','0','1','0','1','1','1','0','0','1','0','1','1','1','1','0','0'},new char[]{'0','1','0','1','1','1','1','1','0','0','1','1','0','1','0','1','1','0','0','0','1','0','0','1','0','1','0','0','1','0','0','0','1','1','1','1','1','1','1'},new char[]{'0','1','1','1','1','0','1','1','0','0','1','0','0','1','1','0','1','0','0','0','1','1','0','0','0','0','0','1','1','0','1','1','0','1','1','1','0','0','1'},new char[]{'0','0','0','1','0','0','1','0','1','0','0','1','0','1','1','0','1','0','1','1','0','0','0','0','1','0','1','0','0','1','0','1','1','1','1','0','0','0','1'},new char[]{'1','0','0','1','0','1','0','1','0','0','1','1','1','0','0','0','1','0','1','1','0','1','1','1','0','0','1','1','0','1','1','0','1','1','0','0','1','1','0'},new char[]{'0','0','1','0','1','1','0','0','1','1','1','0','0','1','1','1','0','1','0','0','0','0','1','1','1','1','1','0','0','1','0','1','0','0','1','0','1','0','0'},new char[]{'1','1','0','0','1','1','1','0','0','1','0','1','1','1','0','0','0','0','0','1','0','1','0','1','1','0','1','1','1','0','0','1','0','0','1','0','1','1','1'},new char[]{'0','1','0','0','1','1','0','1','1','0','1','0','1','1','0','0','1','1','1','1','1','1','1','1','1','1','0','1','0','0','0','0','0','1','1','0','1','0','1'},new char[]{'1','0','1','0','1','1','0','0','0','1','1','0','0','0','0','1','1','0','0','0','0','0','0','1','1','0','1','0','1','1','1','0','0','0','0','1','1','1','0'},new char[]{'1','0','1','0','1','0','1','0','0','1','1','1','0','1','1','1','1','0','0','1','0','1','0','0','0','1','1','0','1','1','1','0','1','0','0','0','0','0','1'},new char[]{'1','1','0','0','1','0','0','1','1','1','1','0','0','0','0','0','0','1','1','0','0','1','0','0','1','1','1','0','0','0','1','1','1','1','1','1','1','0','0'},new char[]{'1','0','0','1','1','0','1','1','0','0','0','0','0','1','0','0','1','1','1','1','1','1','0','0','0','1','1','1','1','0','0','1','1','0','1','1','1','0','1'},new char[]{'0','1','0','0','0','1','0','1','0','0','1','0','1','0','1','1','0','1','0','1','1','0','0','0','0','0','1','1','0','1','1','0','1','1','0','0','1','1','1'},new char[]{'1','0','1','1','1','1','1','1','0','0','1','0','1','0','1','0','0','1','0','0','0','0','1','1','0','1','0','1','0','1','1','1','1','1','1','0','0','1','0'},new char[]{'0','1','1','1','0','1','0','1','1','0','0','0','1','0','0','0','1','0','0','0','0','1','0','0','0','0','0','1','1','1','0','1','1','0','1','1','1','1','1'},new char[]{'1','1','1','0','1','1','0','0','0','0','1','1','0','1','1','0','1','0','0','1','0','0','1','1','1','0','1','1','0','1','1','1','0','1','1','0','0','0','1'},new char[]{'0','1','0','0','0','1','1','1','1','1','1','1','0','0','1','1','0','1','0','0','1','1','1','0','0','1','0','0','0','0','1','0','1','0','1','0','1','1','0'},new char[]{'1','1','0','1','1','0','0','1','1','1','0','1','1','0','1','1','0','0','1','1','1','1','0','0','0','0','0','0','0','1','0','0','0','1','0','0','1','1','1'}}); param0.add(new char[][]{new char[]{'B','D','D','E','H','H','J','M','M','M','M','N','O','O','P','R','S','T','U','U','W','W','Z','Z','b','c','c','e','f','g','j','k','k','n','o','r','t','u','v'},new char[]{' ','A','A','A','C','C','D','D','E','F','H','J','J','K','L','L','N','T','T','U','W','Y','Z','c','f','g','i','i','k','k','m','n','o','p','r','r','u','v','x'},new char[]{' ','A','A','C','D','E','G','H','K','K','L','Q','S','U','V','Z','a','d','e','g','i','i','j','n','o','o','p','p','q','s','s','t','t','w','x','x','x','y','z'},new char[]{' ','B','D','E','G','H','H','H','H','K','M','O','O','R','R','S','S','U','V','X','a','a','d','e','e','f','h','i','j','p','p','q','q','q','s','w','w','y','z'},new char[]{' ','A','A','C','E','F','G','H','J','J','K','M','O','S','S','U','X','Y','Z','b','d','f','g','h','i','j','k','l','n','q','q','s','s','t','u','u','v','y','z'},new char[]{'H','H','H','H','J','J','K','M','N','S','U','U','V','V','V','W','Y','a','b','c','c','e','f','f','f','h','k','l','m','q','q','s','t','v','v','w','w','y','z'},new char[]{'A','B','D','G','H','I','J','J','L','M','N','P','Q','S','T','T','X','X','X','Y','Z','a','c','d','d','d','i','k','l','m','n','p','q','q','t','w','x','y','y'},new char[]{' ','B','B','C','E','F','G','H','I','I','I','J','J','K','M','N','O','O','P','Q','S','T','W','Y','Y','a','c','d','h','h','i','j','k','o','o','s','z','z','z'},new char[]{' ','A','C','C','D','E','E','E','F','H','H','M','M','N','N','R','T','W','Z','Z','d','e','h','h','j','j','k','m','n','o','p','r','s','s','t','w','x','x','x'},new char[]{'A','D','I','M','P','Q','U','U','Y','Y','Z','Z','Z','a','b','c','e','f','f','f','g','g','h','h','i','i','j','m','n','o','p','q','r','u','u','u','w','x','z'},new char[]{' ','A','A','A','B','C','E','F','G','H','J','Q','R','S','U','U','V','W','Y','Z','a','b','b','d','g','j','k','l','l','m','n','n','o','s','s','u','w','w','w'},new char[]{' ','A','B','C','E','E','E','H','J','J','K','M','N','P','R','U','U','V','W','a','e','f','k','k','k','l','l','m','n','n','o','o','o','q','r','r','t','u','x'},new char[]{' ','B','B','E','F','F','H','O','O','P','P','Q','R','S','T','X','a','a','a','b','e','f','g','i','j','m','n','p','r','t','t','t','u','v','v','w','x','x','z'},new char[]{' ','A','B','C','D','E','E','G','H','J','J','J','K','K','M','P','Q','R','R','W','X','X','Z','a','a','e','h','i','j','k','q','q','r','r','s','u','x','x','y'},new char[]{' ','B','I','I','J','J','K','N','O','P','P','R','U','X','Z','Z','Z','b','d','f','f','h','h','h','j','k','k','n','n','o','o','p','q','s','t','v','w','x','z'},new char[]{' ',' ','B','E','K','L','M','N','Q','Q','R','S','T','U','V','V','V','W','X','Y','Z','a','b','e','e','g','i','i','m','n','o','p','s','u','u','v','w','x','z'},new char[]{'E','E','E','E','J','K','K','M','N','P','Q','S','S','V','W','W','W','X','Y','c','c','d','e','f','h','n','n','p','q','r','s','t','u','v','x','x','y','z','z'},new char[]{' ',' ',' ','E','E','F','F','G','G','H','J','L','O','Q','R','R','T','V','W','Y','Y','Z','Z','c','f','g','h','h','j','l','q','q','q','t','v','x','x','y','y'},new char[]{'B','D','G','G','H','J','J','K','M','Q','S','S','T','T','T','U','V','Z','Z','a','b','d','e','g','g','h','h','l','l','n','o','s','u','u','v','v','w','x','y'},new char[]{' ',' ','B','B','B','C','D','D','E','I','L','M','O','O','P','P','Q','R','R','R','R','R','U','a','b','c','d','e','g','k','l','l','n','n','n','p','p','r','r'},new char[]{' ',' ','B','E','E','F','G','L','M','N','N','O','P','R','R','S','S','S','T','T','Y','Y','Z','a','a','b','d','e','f','j','j','k','l','l','m','o','o','p','y'},new char[]{'A','B','E','E','H','H','I','J','J','N','O','P','Q','R','V','V','W','W','X','X','Y','Z','Z','g','i','j','j','m','n','o','q','r','r','s','s','s','s','t','x'},new char[]{' ','G','J','L','M','M','Q','Q','Q','S','U','W','W','Y','Z','Z','a','b','f','h','i','i','l','l','m','n','o','p','p','p','q','q','q','s','s','t','u','v','w'},new char[]{'B','B','D','E','E','H','I','J','K','K','L','S','T','V','X','b','b','b','d','d','g','h','h','h','i','i','k','l','m','m','n','o','v','w','x','x','x','z','z'},new char[]{'B','C','C','C','D','D','E','F','J','K','M','N','O','O','Q','Q','R','R','R','S','T','U','V','W','W','a','b','f','g','i','m','n','n','n','p','p','p','u','v'},new char[]{' ','B','D','F','F','H','J','J','M','M','N','T','U','c','d','e','e','j','j','j','l','l','m','m','n','n','o','p','p','p','s','t','t','v','v','w','y','y','y'},new char[]{' ','A','A','B','D','G','H','H','H','I','K','N','O','P','R','S','T','Y','Y','a','b','c','e','f','g','h','j','j','j','m','n','o','s','s','u','u','x','x','z'},new char[]{' ',' ','F','G','G','J','N','N','P','S','S','S','T','T','X','Z','a','d','e','f','f','h','i','j','k','m','m','n','r','s','s','t','v','w','x','x','x','z','z'},new char[]{'B','B','D','I','J','L','M','M','N','P','P','Q','S','U','X','X','X','Y','Z','a','b','e','e','f','g','i','j','l','m','o','q','r','r','t','v','w','w','w','w'},new char[]{' ','A','B','C','D','D','E','F','F','H','I','J','J','M','N','N','O','S','U','V','W','W','e','g','h','h','i','j','j','o','p','q','q','r','t','v','v','x','y'},new char[]{' ','A','A','C','C','D','D','D','E','G','I','J','O','Q','S','S','S','T','T','V','X','Y','Y','b','i','k','l','l','m','n','p','t','v','w','w','x','x','y','z'},new char[]{'A','A','D','F','G','H','I','L','N','P','Q','S','T','U','V','W','W','X','Y','Z','b','c','f','g','g','g','j','j','j','l','q','s','s','v','v','w','x','y','z'},new char[]{'B','H','I','J','K','K','L','L','M','N','N','N','P','P','S','T','U','V','W','W','a','a','a','a','b','j','j','k','m','n','p','u','u','u','v','w','x','y','z'},new char[]{'B','B','D','D','D','E','G','H','I','I','I','L','N','N','O','P','R','R','R','S','V','V','Y','Z','a','b','h','k','l','m','n','o','p','p','q','r','s','x','z'},new char[]{'A','B','B','G','G','H','J','J','L','M','M','N','N','P','P','P','R','S','T','X','Z','d','d','f','f','j','j','j','l','l','l','m','r','r','u','v','v','x','x'},new char[]{' ','B','B','C','E','G','J','J','K','L','N','O','Q','R','T','T','V','V','X','X','b','e','f','i','i','k','m','n','o','o','p','s','s','u','u','w','x','x','x'},new char[]{'A','A','A','B','B','E','H','H','H','I','J','J','N','Q','Q','R','R','U','V','X','a','b','d','d','e','e','g','g','k','k','l','n','n','p','q','q','v','w','x'},new char[]{'B','B','B','C','C','D','E','F','H','I','I','K','N','N','P','P','P','U','W','X','Z','c','e','h','h','i','j','l','p','p','r','r','r','r','v','w','x','x','y'},new char[]{' ',' ','B','C','C','D','E','E','H','L','O','P','P','S','T','V','Y','Y','Y','c','d','e','e','f','h','h','h','j','k','l','m','n','r','s','s','u','x','y','y'}}); param0.add(new char[][]{new char[]{'8','0','3','3','7','7','3','5','4','9','6','9','4','6','9'},new char[]{'8','7','2','2','6','9','6','0','0','6','8','1','6','1','5'},new char[]{'2','0','5','1','8','0','0','2','9','4','1','4','8','0','2'},new char[]{'9','9','9','5','1','8','9','5','8','7','2','9','4','0','4'},new char[]{'1','6','7','1','7','4','7','4','6','4','3','8','0','4','9'},new char[]{'2','7','9','6','1','2','2','9','0','7','2','3','2','0','9'},new char[]{'9','5','3','3','6','1','3','1','3','4','3','4','1','5','9'},new char[]{'1','6','5','2','6','7','1','8','6','6','2','2','6','7','6'},new char[]{'5','3','8','0','3','6','3','2','1','2','3','8','1','0','2'},new char[]{'2','2','6','8','0','6','5','9','9','3','9','5','8','6','4'},new char[]{'4','1','0','3','9','1','0','8','3','4','0','9','0','6','8'},new char[]{'1','7','9','6','6','1','7','2','5','9','5','2','1','1','8'},new char[]{'7','7','4','5','2','6','4','3','4','9','1','4','3','7','2'},new char[]{'1','3','0','5','9','2','2','6','2','4','0','7','2','6','1'},new char[]{'0','4','4','2','6','9','5','4','3','2','6','5','6','4','0'}}); param0.add(new char[][]{new char[]{'0','0','0','0','0','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','1','1','1','1'},new char[]{'0','0','0','0','0','0','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','0','1','1','1'},new char[]{'0','0','0','0','0','0','0','0','1','1','1','1'},new char[]{'0','0','0','0','0','0','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','1','1','1','1','1','1','1'},new char[]{'0','0','0','0','0','0','0','1','1','1','1','1'},new char[]{'0','0','0','0','0','1','1','1','1','1','1','1'}}); param0.add(new char[][]{new char[]{'u','V','l','L','o','i','o','L','S','D','S','u','Z','E','s','q','P','X','d','v','W','J','p','r','e','j','F','l','Z','U','R','Y','M','C','S','C','Q','A'},new char[]{'w','p','O','x','a','v','Q','Z','n','Q','j','t','N',' ','n','u','y','x','E','r','d','e','g','e','H','Z','b','s','A','R','x','h','v','X','x','K','P','M'},new char[]{'y','D','z','t','g','L','B','N','i','g','E','l','P','q','j','m','c','X','b','X','Z','w','s','Z','F','p','r','P','o','p','Y','R','w','n','y','n','t','C'},new char[]{'b','v','G','K','J','u','w','q','x','b','O','Z','b','v','E','O','o','j','W','d','r','z','X','K','r','O','m','S','V','D','m','O','j','O','J','L','z','S'},new char[]{'Z','O','X','A','d','N','V','t','f','z','q','H','O','Z','b','T','W','B','u','K','P','y','w','z','p','M','Z','P','l','y','J','G','i','C','r','y','s','v'},new char[]{'k','R','i','z','A','l','J','X','C','i','P','A','y','y','a','E','V','s','a','P','r','Y','D','n','o','w','M',' ','W','m','W','H','a','v','j','g','Y','m'},new char[]{'M','y','N','A','R','u','e','N','H','a','s','E','Q','b','d','E','s','X','f','G','N','x','h','i','u','U','M','U','s','u','N','f','u','o','C','s','S','P'},new char[]{'h','C','v','L','H','h','Y','Y','F','S','d','Q','h','V','V','U','g','C','s','X','E','t','e','M','F','w','U','e','C','J','Y','R','o','a','W','L','k','K'},new char[]{'k','H','J','T','s','F','y','C','O','J','O','B','m','B','e','G','l','g','y','J','y','u','F','E','B',' ','B','Z','a','e','v','u','U','J','l','C','k','v'},new char[]{'d','y','V','Z','t','X','n','v','O','s','E','L','Z','x','x','p','w','W','S','n','G','y','q','o','B','X','f','r','n','T','y','p','J','j','I','w','r','s'},new char[]{'h','y','p','j','r','D','j','H','t','X','q','K','N','j','h','v','K','r','j','J','A','u','D','f','J','n','q','w','P','w','i','s','G','s','t','D','r','A'},new char[]{'f','I','v','M','x','K','O','i','p','y','o','Z','Y','s','V','f','i','V','x','K','p','a','L','V','r','B','v','d','M','e','X','h','F','S','p','Z','J','I'},new char[]{'H','V','a','a','i','k','D','e','Z','i','h','v','A','G','N','Q','r','e','A','q','n','a','z','N','b','y','R','z','c','I','A','h','z','o','F','w','p','h'},new char[]{'X','z','K','b','z','E','u','E','h','L','X','K','Q','r','f','Z','k','p','S','b','l','N','M','u','f','z','p','f','Q','U','q','g','F','K','D','Q','H','K'},new char[]{'S','U','o','u','z','G','q','w','N','B','c','u','k','n','v','S','O','Z','I','F','T','Z','D','g','w','K','G','C','B','M','e','W','r','v','l','t','t','u'},new char[]{'P','e','m','H','W','b','s','C','j','U','E','a','J','o','G',' ','H','T','f','j','N','N','E','u','W','O','X','e','m','w',' ','f','U','Y','N','X','I','j'},new char[]{' ','v','q','O','d','p','d','Q','N','A','v','u','o','q',' ','S','H','b','M','J','b','G','L','N','w','r','G','Q','E','R','y','a','k','S','W','I','P','d'},new char[]{'N','z','F','X','x','J','q','G','Z','Z','E',' ','q','M','L','B','y','k','h','R','e','R','N','p','D','K','n','g','E','w','P','v','J','P',' ','q','N','s'},new char[]{'u','Q','F','j','r','I','X','C','E','R','R','E','D','p','n','a','X','Q','J','F','F','x','s','P','o','a','t','f','S','n','P','S','k','s','j','M','L','l'},new char[]{'F',' ','n','P','P','N','D',' ','N','W','G','m','p','P','R','L','b','c','q','O','k','Y','p','I','b','P','Y','Y','F','c','p','W','e','R','k','j','V','h'},new char[]{'Q','J','g','D','S','U','m','z','M','n','a','V','q','P','X','w','s','v','J','J','h','n','J','d','Z','M','v','M','h','Q',' ','W','V','s','O','A','x','j'},new char[]{'N','i','m','F','H','C',' ','x',' ','t','g','q','j','d','n','g','l','U','k','U','q','h','A','c','u','o','U','z','D','N','p','R','K','k','T','i','D','i'},new char[]{'P','r','W','S','s','U','k','l','e','s','W','d','Y','q','p','Q','z','F','Z','s','x','h','J','q','B','F','R','m','l','f','H','U','d','V','o','b','t','B'},new char[]{'R','q','m','q','h','q','i','P','N','O','q','i','V','O','n','K','J','d','E','b','V','O','u','S','l','u','A','k','d','r','x','g','y','U','A','q','p','d'},new char[]{'r','h','h','L','j','d','b','o','v','D','d','M','f','y','Q','V',' ','j','a','T','X','a','t','I','Z','A','P','l','Y','j','c','A','A','e','r','H','u','f'},new char[]{'a','Y','J','J','k','L','x','l','O','n','J','I','l','x','V','S','S','l','D','E','m','d',' ','j','Q','L','t','c','o','D','z','A','x','u','F','E','v','a'},new char[]{'o','K','F','V','L','G','t','A','d','b','P','F','K','N','J','e','B','T','H','n','D','b','m','T','L','S','n','D','b','s','I','t','O','a','m','a','A','n'},new char[]{'L','o','z','L','a','d','T','D','d','S','D','a','m','z','y','y','A','j','v','H','F','t','A','f','G','E',' ','x',' ','m','L','I','O','Z','C','y','X','x'},new char[]{' ','I','i','s','E','N','m','k','l','n','s','s','P','M','x','i','I','K','k','m','k','X','n','W','k','F','D','c','l','d','n','o','H','T','B','g','S','v'},new char[]{'g','p','d','A','Y','b','L','P','v','j','O','C','s','g','J','m','P','d','H','c','h','U','P','J','h','c','f','W','l','K','F','T','s','Z','n','v',' ','p'},new char[]{'O','H','J','y','B','c','M','Q','F','k','S','o','b','M','c','i','K','l','a','Y','v','O','U','R','B','o','H','g','o',' ','H','l','g','e','L','x','M','z'},new char[]{'q','u','A','O','u','f','r','U','F','g','f','g','R','E','W','H','n','e','N','Z','y','M','j','L','T','b','v','N','u','X','E','y','g','Y',' ','n','T','r'},new char[]{'k','n','F','B','X','t','j','a','b','I','C','O','R','h','c','C','F','E','l','Y','s','D','p','j','J',' ','y','u','x','q',' ','P','J','P','t','g','X','j'},new char[]{'M','u','Q','x','r','n','U','w','w',' ','H','P',' ','V','X','Y','t','Z','F','H','X','N','y','E','j','I','Q','P',' ','y','e','I','o','b','j','E','p','G'},new char[]{'n','d','T','f','a','D','s','i','b','m','K','h','c','G','I','p','d','x','I','G','B','q','k','A','B','M','g','S','t','K','b','m','m','u','k',' ','U','Z'},new char[]{'C','v','L','k','x','L',' ','m','x','P','C','X','n','w','d','E','O','D','Q','i','A','p','K','r','n','Y','T','v','K','O','M','w','p','P','R','X','I','g'},new char[]{'l','M','d','j','M','d','y','x',' ','o','E','t','X','w','c','H','r','q','d','Q','I','g','T','F','t','q','A','e','m','y','G','t','v','G','r','x','g','H'},new char[]{'T','f','N','W','K','T','b','O','J','B','a','d','l','y','s','s','W','D','t','z','D','c','k','l','e','Q','A','J','J','k','M','G','F','S','C','N','x','X'}}); List param1 = new ArrayList<>(); param1.add(13); param1.add(39); param1.add(15); param1.add(31); param1.add(11); param1.add(20); param1.add(38); param1.add(8); param1.add(6); param1.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( keypad , n ) : if ( not keypad or n <= 0 ) : return 0 if ( n == 1 ) : return 10 odd = [ 0 ] * 10 even = [ 0 ] * 10 i = 0 j = 0 useOdd = 0 totalCount = 0 for i in range ( 10 ) : odd [ i ] = 1 for j in range ( 2 , n + 1 ) : useOdd = 1 - useOdd if ( useOdd == 1 ) : even [ 0 ] = odd [ 0 ] + odd [ 8 ] even [ 1 ] = odd [ 1 ] + odd [ 2 ] + odd [ 4 ] even [ 2 ] = odd [ 2 ] + odd [ 1 ] + odd [ 3 ] + odd [ 5 ] even [ 3 ] = odd [ 3 ] + odd [ 2 ] + odd [ 6 ] even [ 4 ] = odd [ 4 ] + odd [ 1 ] + odd [ 5 ] + odd [ 7 ] even [ 5 ] = odd [ 5 ] + odd [ 2 ] + odd [ 4 ] + odd [ 8 ] + odd [ 6 ] even [ 6 ] = odd [ 6 ] + odd [ 3 ] + odd [ 5 ] + odd [ 9 ] even [ 7 ] = odd [ 7 ] + odd [ 4 ] + odd [ 8 ] even [ 8 ] = odd [ 8 ] + odd [ 0 ] + odd [ 5 ] + odd [ 7 ] + odd [ 9 ] even [ 9 ] = odd [ 9 ] + odd [ 6 ] + odd [ 8 ] else : odd [ 0 ] = even [ 0 ] + even [ 8 ] odd [ 1 ] = even [ 1 ] + even [ 2 ] + even [ 4 ] odd [ 2 ] = even [ 2 ] + even [ 1 ] + even [ 3 ] + even [ 5 ] odd [ 3 ] = even [ 3 ] + even [ 2 ] + even [ 6 ] odd [ 4 ] = even [ 4 ] + even [ 1 ] + even [ 5 ] + even [ 7 ] odd [ 5 ] = even [ 5 ] + even [ 2 ] + even [ 4 ] + even [ 8 ] + even [ 6 ] odd [ 6 ] = even [ 6 ] + even [ 3 ] + even [ 5 ] + even [ 9 ] odd [ 7 ] = even [ 7 ] + even [ 4 ] + even [ 8 ] odd [ 8 ] = even [ 8 ] + even [ 0 ] + even [ 5 ] + even [ 7 ] + even [ 9 ] odd [ 9 ] = even [ 9 ] + even [ 6 ] + even [ 8 ] totalCount = 0 if ( useOdd == 1 ) : for i in range ( 10 ) : totalCount += even [ i ] else : for i in range ( 10 ) : totalCount += odd [ i ] return totalCount ",,," if __name__ == '__main__': param = [ ([[' ', 'A', 'C', 'K', 'R', 'R', 'V', 'c', 'd', 'i', 'i', 'j', 'm', 'o', 'q', 'q', 'r', 'r', 'v', 'v', 'x', 'z'], ['B', 'D', 'I', 'M', 'N', 'Q', 'R', 'Z', 'c', 'f', 'i', 'j', 'j', 'l', 'l', 'n', 'p', 'q', 's', 't', 't', 'w'], ['A', 'F', 'F', 'G', 'H', 'J', 'K', 'K', 'N', 'V', 'V', 'b', 'c', 'c', 'g', 'i', 'j', 'l', 'l', 's', 't', 'y'], [' ', 'A', 'B', 'B', 'E', 'H', 'I', 'J', 'J', 'P', 'Q', 'T', 'U', 'V', 'Z', 'c', 'c', 'j', 'p', 'w', 'y', 'z'], [' ', ' ', 'A', 'C', 'F', 'G', 'H', 'M', 'N', 'R', 'R', 'V', 'c', 'i', 'j', 'o', 'p', 'p', 'q', 'r', 'w', 'y'], [' ', ' ', 'C', 'C', 'D', 'H', 'I', 'J', 'K', 'O', 'S', 'X', 'Y', 'f', 'h', 'h', 'o', 'p', 'p', 'u', 'u', 'w'], ['B', 'C', 'D', 'H', 'M', 'M', 'Q', 'Q', 'R', 'S', 'X', 'Z', 'e', 'e', 'e', 'j', 'k', 'l', 'm', 'o', 'v', 'w'], ['A', 'C', 'C', 'D', 'H', 'H', 'I', 'J', 'L', 'L', 'L', 'M', 'N', 'S', 'U', 'c', 'd', 'f', 'f', 's', 'u', 'y'], ['A', 'B', 'D', 'D', 'I', 'J', 'K', 'L', 'L', 'M', 'P', 'S', 'S', 'Y', 'b', 'e', 'h', 'j', 'm', 'o', 'q', 's'], [' ', 'B', 'E', 'H', 'H', 'J', 'M', 'P', 'S', 'T', 'U', 'V', 'Z', 'd', 'j', 'm', 'm', 'p', 'q', 'v', 'w', 'w'], ['B', 'E', 'F', 'G', 'H', 'M', 'M', 'M', 'N', 'O', 'Q', 'R', 'T', 'V', 'a', 'c', 'g', 'g', 'i', 's', 'x', 'y'], ['A', 'E', 'G', 'J', 'O', 'R', 'R', 'S', 'T', 'W', 'a', 'b', 'f', 'h', 'h', 'i', 'm', 'n', 's', 'u', 'v', 'y'], ['B', 'D', 'E', 'H', 'I', 'I', 'K', 'M', 'N', 'P', 'Q', 'S', 'a', 'e', 'i', 'j', 'm', 'o', 'p', 'r', 'x', 'z'], ['A', 'G', 'I', 'K', 'K', 'L', 'O', 'P', 'U', 'U', 'X', 'X', 'Z', 'a', 'c', 'f', 'g', 'i', 'l', 'o', 'o', 'v'], [' ', ' ', 'E', 'H', 'J', 'J', 'L', 'M', 'N', 'O', 'P', 'S', 'S', 'X', 'c', 'f', 'g', 'r', 'u', 'v', 'x', 'z'], ['C', 'E', 'F', 'F', 'H', 'H', 'I', 'K', 'M', 'M', 'U', 'Z', 'e', 'e', 'h', 'h', 'h', 'j', 'k', 'k', 'p', 'r'], [' ', ' ', ' ', 'C', 'G', 'I', 'J', 'O', 'O', 'P', 'T', 'V', 'Y', 'b', 'j', 'n', 'o', 'o', 's', 'u', 'w', 'x'], ['A', 'D', 'F', 'F', 'H', 'H', 'N', 'R', 'S', 'W', 'W', 'Y', 'Y', 'b', 'f', 'i', 'k', 'o', 'u', 'y', 'y', 'z'], [' ', 'C', 'G', 'I', 'I', 'L', 'P', 'S', 'X', 'Y', 'd', 'd', 'f', 'g', 'g', 'k', 'm', 'o', 'r', 'r', 'r', 'x'], ['F', 'I', 'J', 'N', 'P', 'P', 'Q', 'Q', 'R', 'X', 'Y', 'a', 'b', 'h', 'h', 'j', 'l', 'm', 'n', 'p', 'r', 'y'], [' ', 'C', 'D', 'E', 'F', 'L', 'Q', 'Q', 'V', 'c', 'g', 'h', 'k', 'k', 'l', 'l', 'n', 'o', 'p', 'r', 'u', 'x'], [' ', 'A', 'G', 'K', 'L', 'M', 'T', 'U', 'U', 'W', 'Z', 'a', 'f', 'i', 'k', 'k', 'n', 'n', 'p', 'q', 'v', 'z']],13,), ([['3', '5', '1', '5', '6', '7', '7', '3', '0', '4', '7', '6', '1', '4', '0', '6', '3', '4', '1', '3', '1', '2', '9', '8', '7', '8', '0', '2', '7', '6', '1', '0', '3', '8', '0', '5', '9', '3', '9', '9', '8', '6'], ['0', '3', '8', '5', '0', '2', '0', '6', '1', '8', '7', '2', '8', '6', '0', '3', '9', '4', '9', '5', '7', '4', '3', '7', '4', '3', '8', '6', '1', '5', '4', '8', '0', '8', '3', '2', '7', '7', '6', '9', '7', '9'], ['6', '7', '1', '1', '7', '2', '5', '3', '2', '8', '4', '7', '8', '6', '1', '5', '2', '1', '6', '5', '7', '6', '8', '6', '8', '8', '1', '6', '3', '1', '1', '7', '1', '6', '4', '9', '2', '8', '2', '6', '3', '4'], ['8', '7', '9', '2', '0', '6', '6', '6', '2', '3', '1', '4', '8', '2', '3', '5', '5', '9', '2', '8', '0', '3', '2', '7', '2', '0', '2', '7', '0', '6', '5', '8', '2', '9', '3', '9', '8', '1', '9', '7', '9', '7'], ['9', '8', '1', '5', '0', '9', '9', '7', '7', '8', '4', '1', '8', '0', '4', '6', '7', '0', '5', '8', '6', '5', '6', '5', '1', '4', '0', '4', '3', '4', '6', '7', '6', '7', '3', '5', '4', '5', '6', '7', '1', '1'], ['4', '4', '4', '9', '8', '8', '7', '5', '3', '1', '8', '4', '8', '1', '0', '4', '9', '8', '9', '5', '2', '7', '5', '3', '4', '8', '2', '4', '7', '5', '0', '3', '6', '2', '5', '6', '3', '1', '9', '4', '8', '9'], ['7', '2', '7', '6', '2', '8', '8', '8', '1', '1', '5', '4', '6', '5', '3', '0', '3', '7', '4', '0', '0', '2', '4', '1', '8', '0', '0', '7', '6', '4', '7', '1', '8', '8', '1', '8', '8', '2', '3', '1', '7', '2'], ['2', '7', '5', '8', '7', '6', '2', '9', '9', '0', '6', '1', '7', '8', '1', '3', '3', '1', '5', '7', '9', '8', '2', '0', '7', '6', '0', '0', '1', '1', '5', '8', '6', '7', '7', '9', '9', '0', '4', '4', '3', '4'], ['0', '9', '9', '0', '5', '4', '9', '9', '3', '0', '3', '1', '5', '9', '9', '5', '3', '0', '2', '3', '9', '9', '7', '8', '5', '4', '6', '4', '2', '8', '7', '0', '2', '3', '6', '5', '2', '6', '0', '6', '5', '7'], ['1', '1', '4', '1', '4', '2', '7', '1', '9', '7', '9', '9', '4', '4', '2', '7', '6', '8', '2', '6', '7', '3', '1', '8', '0', '5', '3', '0', '3', '9', '0', '4', '7', '9', '6', '8', '1', '7', '0', '3', '2', '4'], ['6', '3', '1', '3', '2', '9', '5', '5', '4', '7', '2', '4', '7', '6', '9', '2', '0', '1', '2', '1', '4', '3', '8', '4', '9', '8', '9', '7', '7', '6', '8', '2', '4', '5', '3', '0', '1', '3', '0', '1', '0', '9'], ['5', '9', '4', '2', '1', '5', '0', '2', '6', '6', '0', '8', '3', '0', '3', '3', '3', '0', '7', '8', '0', '7', '7', '4', '3', '0', '6', '9', '6', '2', '2', '2', '8', '3', '7', '2', '4', '0', '0', '4', '5', '2'], ['3', '1', '1', '6', '2', '9', '7', '0', '3', '2', '8', '0', '5', '2', '2', '9', '9', '2', '8', '3', '5', '7', '4', '2', '8', '7', '8', '0', '4', '9', '7', '8', '0', '3', '2', '2', '1', '5', '1', '4', '9', '1'], ['6', '4', '8', '2', '4', '2', '5', '4', '0', '1', '0', '9', '0', '3', '0', '6', '4', '8', '6', '7', '9', '3', '0', '1', '6', '9', '5', '7', '5', '2', '9', '4', '7', '0', '6', '4', '1', '4', '4', '1', '3', '5'], ['6', '7', '8', '2', '9', '5', '0', '2', '6', '5', '4', '9', '4', '7', '8', '4', '6', '7', '6', '5', '1', '3', '8', '1', '7', '5', '9', '3', '9', '4', '0', '6', '5', '6', '9', '8', '4', '6', '9', '9', '0', '2'], ['6', '9', '2', '4', '3', '7', '2', '5', '8', '6', '3', '6', '3', '6', '7', '2', '6', '8', '6', '4', '3', '9', '6', '2', '1', '3', '1', '8', '8', '9', '6', '2', '0', '2', '2', '9', '3', '6', '4', '4', '8', '7'], ['1', '4', '5', '5', '7', '2', '3', '8', '3', '6', '9', '3', '3', '4', '4', '2', '3', '7', '5', '5', '2', '8', '7', '2', '7', '6', '0', '5', '1', '4', '1', '5', '5', '0', '4', '8', '7', '8', '1', '4', '2', '6'], ['5', '6', '8', '0', '0', '6', '3', '8', '3', '8', '2', '0', '8', '5', '4', '4', '0', '0', '8', '5', '8', '9', '1', '3', '3', '1', '1', '2', '9', '9', '1', '2', '1', '3', '5', '8', '7', '9', '3', '1', '3', '5'], ['9', '6', '7', '4', '9', '0', '2', '8', '9', '4', '3', '6', '4', '1', '8', '3', '1', '8', '0', '4', '4', '2', '1', '2', '9', '8', '3', '6', '7', '3', '9', '5', '7', '9', '1', '4', '6', '1', '4', '5', '4', '0'], ['5', '7', '4', '0', '6', '7', '8', '3', '6', '5', '8', '1', '4', '9', '9', '2', '7', '7', '4', '2', '8', '0', '8', '3', '2', '7', '3', '5', '7', '4', '4', '1', '3', '5', '1', '9', '6', '1', '0', '9', '5', '4'], ['3', '4', '0', '0', '3', '2', '2', '2', '9', '7', '5', '5', '1', '8', '4', '7', '9', '0', '7', '4', '1', '9', '3', '7', '3', '9', '5', '0', '3', '6', '6', '8', '8', '4', '1', '8', '2', '3', '9', '5', '3', '3'], ['7', '0', '6', '2', '5', '2', '1', '8', '1', '4', '4', '8', '9', '0', '3', '0', '3', '1', '9', '0', '8', '0', '1', '0', '3', '7', '6', '6', '3', '9', '4', '3', '4', '4', '1', '4', '7', '2', '9', '5', '8', '3'], ['7', '5', '7', '9', '8', '8', '3', '4', '3', '2', '5', '2', '4', '6', '5', '6', '1', '6', '0', '4', '9', '6', '8', '0', '3', '3', '2', '1', '1', '8', '9', '5', '3', '8', '3', '0', '4', '7', '7', '9', '2', '6'], ['6', '3', '9', '7', '5', '8', '5', '1', '1', '6', '6', '0', '8', '3', '2', '7', '3', '0', '4', '5', '1', '2', '3', '0', '4', '2', '8', '4', '1', '1', '0', '2', '3', '2', '5', '6', '3', '0', '1', '2', '2', '5'], ['8', '7', '2', '1', '4', '9', '6', '5', '2', '0', '9', '1', '0', '8', '6', '9', '7', '3', '4', '5', '6', '7', '2', '8', '3', '0', '1', '9', '5', '4', '4', '1', '6', '4', '0', '5', '1', '5', '7', '8', '2', '4'], ['4', '8', '1', '1', '7', '0', '8', '0', '2', '1', '8', '2', '2', '7', '6', '2', '3', '5', '2', '5', '5', '5', '9', '3', '4', '9', '4', '9', '8', '8', '0', '1', '6', '7', '7', '5', '7', '5', '9', '3', '6', '1'], ['5', '8', '6', '8', '0', '7', '3', '1', '9', '2', '3', '5', '5', '5', '0', '9', '2', '2', '2', '8', '7', '7', '6', '7', '6', '7', '4', '3', '9', '8', '3', '9', '3', '5', '7', '1', '3', '1', '4', '0', '7', '1'], ['9', '2', '6', '8', '8', '6', '8', '4', '8', '6', '7', '7', '7', '0', '2', '6', '5', '1', '5', '3', '8', '0', '5', '6', '5', '4', '9', '4', '6', '0', '0', '7', '2', '2', '1', '1', '0', '5', '1', '2', '5', '1'], ['1', '8', '4', '3', '2', '6', '1', '8', '3', '6', '5', '5', '1', '5', '9', '8', '0', '2', '8', '9', '4', '2', '1', '9', '6', '5', '1', '2', '5', '4', '6', '7', '3', '8', '7', '3', '2', '4', '7', '6', '6', '0'], ['9', '2', '9', '7', '5', '6', '4', '9', '5', '4', '8', '5', '2', '4', '0', '5', '5', '1', '0', '9', '3', '6', '4', '0', '9', '4', '2', '7', '5', '1', '3', '4', '8', '3', '7', '4', '2', '8', '3', '0', '2', '8'], ['8', '4', '4', '7', '5', '7', '3', '2', '8', '9', '5', '5', '2', '3', '8', '3', '3', '8', '0', '4', '9', '5', '9', '8', '5', '9', '1', '9', '4', '3', '9', '7', '4', '3', '0', '9', '3', '1', '3', '1', '3', '9'], ['9', '3', '7', '7', '4', '9', '1', '1', '8', '9', '2', '1', '2', '4', '1', '0', '9', '2', '8', '8', '9', '7', '2', '6', '0', '4', '3', '6', '2', '1', '4', '7', '6', '2', '4', '0', '8', '5', '1', '6', '2', '1'], ['6', '8', '7', '3', '6', '4', '3', '9', '3', '7', '1', '5', '0', '5', '5', '1', '7', '9', '3', '9', '8', '9', '9', '6', '6', '3', '1', '2', '2', '2', '0', '7', '8', '4', '7', '3', '6', '2', '2', '1', '9', '6'], ['1', '3', '1', '5', '7', '5', '2', '5', '3', '4', '0', '7', '6', '8', '5', '9', '7', '1', '0', '3', '3', '8', '2', '9', '7', '2', '4', '8', '6', '3', '1', '3', '3', '0', '7', '1', '5', '9', '0', '9', '8', '1'], ['4', '1', '6', '2', '2', '3', '9', '7', '6', '5', '6', '5', '3', '0', '8', '4', '3', '0', '6', '8', '7', '4', '1', '4', '2', '3', '2', '2', '1', '0', '0', '5', '3', '4', '0', '8', '4', '8', '4', '9', '0', '0'], ['2', '1', '1', '4', '8', '0', '6', '9', '7', '0', '9', '4', '7', '6', '1', '1', '5', '2', '0', '6', '9', '2', '0', '2', '7', '3', '3', '0', '5', '2', '6', '3', '0', '1', '8', '3', '5', '5', '3', '9', '8', '5'], ['1', '3', '2', '8', '8', '7', '7', '2', '6', '3', '8', '8', '5', '6', '7', '0', '1', '7', '7', '8', '5', '1', '9', '5', '2', '5', '7', '2', '2', '5', '9', '6', '0', '3', '1', '2', '2', '2', '3', '0', '1', '9'], ['2', '5', '0', '6', '4', '0', '1', '6', '9', '7', '0', '6', '7', '4', '9', '1', '0', '2', '5', '5', '7', '0', '2', '0', '8', '0', '6', '2', '6', '8', '1', '1', '0', '6', '4', '4', '0', '6', '5', '8', '7', '3'], ['9', '7', '8', '6', '0', '3', '7', '5', '7', '5', '6', '0', '5', '6', '3', '9', '6', '3', '2', '6', '0', '0', '6', '5', '8', '3', '7', '3', '7', '3', '5', '2', '4', '9', '4', '1', '0', '7', '9', '7', '6', '2'], ['3', '0', '7', '5', '1', '4', '8', '7', '9', '9', '0', '7', '6', '8', '6', '0', '5', '8', '0', '8', '9', '4', '8', '1', '3', '1', '8', '6', '0', '5', '1', '7', '3', '4', '7', '6', '4', '2', '8', '6', '1', '7'], ['4', '2', '8', '1', '1', '3', '2', '6', '5', '1', '9', '1', '2', '8', '8', '8', '2', '6', '2', '5', '6', '0', '7', '5', '2', '0', '9', '3', '0', '1', '4', '1', '1', '0', '0', '3', '9', '3', '4', '8', '8', '3'], ['9', '1', '9', '0', '9', '4', '0', '8', '4', '9', '7', '6', '7', '6', '0', '7', '1', '1', '7', '4', '9', '0', '0', '7', '3', '2', '8', '1', '6', '9', '7', '2', '0', '1', '6', '1', '9', '8', '9', '7', '5', '3']],39,), ([['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['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', '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'], ['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', '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'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1']],15,), ([['b', 'q', 'b', 'D', 't', 'y', 'Z', 'G', 'd', 'r', 'R', 'R', 'z', 'A', 'Y', 'H', 'D', 'Q', 'X', 'U', 'o', 'a', 'S', 'P', 'S', 'c', 'W', 'r', 'I', 'y', 'E', 'x', 'E', 'k', 'l', 'F', 'M', 'G', 'z', 'T', 'I', 'E', 'D', 'K', 'M', 'l'], ['V', 'm', 'W', 'M', 'l', 'H', 'l', 'j', 'f', 'S', 'k', 'g', 'O', 'W', 'S', 'R', 'I', 'L', 'J', 'Z', 'V', 'X', 'w', 'l', 'K', 's', 'F', 'o', 'X', 'k', 'a', 'L', 'K', 'H', ' ', 'E', 'x', 'b', 'Z', 'w', 'Z', 'Y', 'U', 'y', 'I', 'Q'], ['I', 'o', 's', 'A', 'f', 'Z', 'C', 'o', 'X', 'b', 'd', 's', ' ', 'Y', 'Q', 'U', 'C', 'T', 'K', 'r', 'Q', 'U', 'P', 'C', 'w', 'R', 'e', 's', 'L', 'A', 'j', 'g', 'p', 'B', 'I', 'W', 'L', 'e', 'w', 'b', 'R', 'z', 'Y', 'M', 'M', 'E'], ['k', 'Y', 'v', 'L', 'f', 'x', 'v', 'l', 'C', 'g', 'J', 'V', 'l', 'q', 'p', 'x', 'z', 'A', 'J', 'h', 'V', 'i', 'h', 'r', 'Z', 'i', ' ', 'y', 'M', 'k', 'p', 'q', 'X', 'M', 'U', 'W', 'v', 'v', 'P', 'L', 'n', 'j', 'r', 'O', 'k', ' '], ['K', 'k', 'K', 'Z', 'X', 'W', 'e', ' ', 'x', 'u', 'r', 'l', 'l', 'z', 'V', 'e', 'K', 'z', 'y', 'x', 'f', 'v', 'n', 'f', 'K', 'p', 'b', 'I', 'C', 'p', 'b', 'V', 'R', 't', 'n', 't', 'm', 'A', 'F', 'J', 'U', 'M', 'n', 'g', 'M', 'W'], ['a', 'e', 'x', 'A', 'U', 'V', 'P', 'W', 'W', 'l', 'p', ' ', 'o', 'L', 'X', 'E', 'g', 'k', 'Y', 'W', 'P', 'Y', 'B', 't', 'Z', 'm', 'V', 'Z', 'O', 'z', 'o', 'O', 'm', 's', 'x', 'O', 'L', 'q', 'Z', 'E', 'y', 'B', 'l', 'h', 'h', 'T'], ['c', 'x', 'R', 'R', 'x', 'S', 'R', 'y', 'J', 'Y', 'e', 'F', 'X', 'x', 'h', 'L', 'N', 'Q', 'j', 'X', 's', 'H', 'Z', 'M', 'Q', 'b', 'Q', 'h', 'x', 'R', 'Y', 'C', 'r', 'D', 'b', 'O', 'l', 'W', 'J', 'I', 'A', 'P', 'x', 'D', 'T', 'c'], ['Y', 's', 'B', 'N', 'B', 'g', 'e', 'h', 'l', 'y', 'N', 's', 'a', 'f', 'k', 'p', 'C', 'Q', 'c', 'U', 'A', 'N', 'w', 'V', 'z', 'F', 'j', 'M', 'F', 'g', 'q', 'x', 'r', 'l', 'e', 'Y', 'T', 'z', ' ', 'a', 'n', 'n', 'x', 'p', 'm', 'J'], ['v', 'O', 'a', 'A', 'E', 'q', 'L', 'P', ' ', 'w', 'l', 'G', 'k', 'f', 'M', 'A', 'k', 'i', 'f', 'D', 'z', 'A', 'J', 'Y', 'b', 'g', 'a', 'h', 'e', 'S', 'Q', 'H', 'c', 'f', 'I', 'S', 'X', 'Y', 'J', 'g', 'f', 'n', 'G', 'J', 'r', 'S'], [' ', 'S', 'w', 'G', 'b', 'v', 'z', 'U', 'l', 'k', 'a', 'w', 'y', 'D', 'Q', 'v', 'c', 'T', 'S', 'S', 'n', 'M', 'm', 'j', 'U', 'X', 'a', 'k', 'O', 'A', 'T', 'a', 'U', 'u', 'y', 's', 'W', 'j', 'k', 'n', 'a', 'V', 'X', 'N', 'D', 'C'], ['Z', 'o', 'O', 'a', 'z', 'M', 'X', 'k', 'm', 'X', 'J', 'w', 'y', 'd', 'j', 'c', 'Q', 'E', 'E', 'i', 'g', 'q', 'U', 'v', 'C', 'k', 'y', 't', 'T', 'A', 'o', 'u', 'o', 'e', 'J', 'c', 'c', 'd', 'i', 'o', 'b', 'A', 'h', 'g', 'y', 'Y'], ['O', 'j', 'F', 'A', 'f', 't', 'J', 'u', 'V', 'J', 'P', 'Z', 'C', 'c', 'c', 'y', 'G', 's', 'W', 'X', 'O', 'g', 'q', 'l', 'z', 'L', 'p', 'U', 'o', 'A', 'k', 'v', 'q', 'v', 'I', 'W', 'k', 'r', 'm', 'Y', 'i', 'V', 'Y', 'c', 'P', 'S'], ['N', ' ', 'W', 'k', 'z', 'o', 'V', 'w', 'M', 'a', 'q', 'c', 'P', 'D', 'x', 'O', 'M', 'y', ' ', 'B', 'y', 'L', 'V', 'E', 'j', 'i', 'C', 'k', ' ', ' ', 'c', 'K', 'c', 'h', 'y', 'K', 'c', 'G', 'Q', 'h', 'B', 'i', 'L', 'Q', 'P', 's'], ['X', 'p', 'y', 'I', 'W', 'F', 'F', 'o', 'W', 'g', 'A', 'H', 'a', 'H', 'X', 'F', 'd', 'Y', 'I', 'x', 'n', 'r', 's', 'c', 'B', 'L', 'o', 'B', 'C', 'o', 'G', 'v', 'T', 'q', 'A', 'Z', 'a', 'Z', 'd', 'S', 'B', 'S', 'F', 'I', 'm', 'C'], ['F', 't', 'c', 'w', 'E', 'X', 's', 'F', 'e', 'J', 'h', 'Y', 'f', 'g', 'd', 'f', 'N', 'X', 'G', 'l', 'n', 'M', 'L', 'k', 'P', 'Y', 'M', ' ', 'U', 'X', 'n', 's', 'o', 'F', 'R', 'g', 'E', 'I', 'G', 'P', 'x', 'f', 'h', 'K', 'b', 'k'], ['a', 'p', 'j', 'Q', 'X', 'p', 'h', 'R', 'g', 'U', 'O', 'x', 'X', 'k', 'v', 'm', 'o', 'E', 'Z', 'Z', 'W', 'v', 'k', 'l', 'o', 'O', 'N', 'P', 'Q', 'k', 'A', 'K', 'c', 'l', 'w', 'a', 'k', 'Z', 'd', 'T', 'S', 't', 'K', 'L', 'x', 'k'], ['t', 'f', 'V', 'Q', 'X', 'e', 's', 'f', 'o', 'N', 'U', 'z', 'y', 'K', 'F', ' ', 'A', 'V', 'W', 'A', 'j', 'C', 'T', 'G', 'z', 'K', 'j', ' ', 'I', 'w', 'h', 'Q', 't', 'I', 'm', 'V', 'h', 'M', 'L', 'Q', 'J', 'g', 'p', 'x', 'P', 'i'], ['X', 'Q', 'b', 'i', 'T', 'A', 'R', 'f', 'c', 'r', 'K', 't', 'J', 'E', 'Z', 'd', 'W', 'O', 'G', 'X', 'u', 'I', 'z', ' ', 'm', 'H', 's', 'P', 'd', 's', 'k', 'm', 'E', 'K', 'Y', 'H', 'L', 'b', 'Z', 'y', 'I', 'c', 'p', 'y', 'Y', 'T'], ['P', 'g', 'C', 'T', 'i', 'Z', 's', 's', 'r', 'E', 'L', 'P', 'T', 'o', 'r', 'g', 'x', 'c', 'U', 'b', 'o', 'l', 'H', 'H', 'k', 'b', 'N', 'e', 'S', 'E', 'U', 'c', 'g', 'V', 'E', 'V', 'l', 'L', ' ', 'I', 'h', 'M', 'L', 'z', 'P', 'e'], ['l', 'i', 'O', 'F', 'S', 'e', 'Z', 'j', 'y', 'J', 'p', 'c', 'q', 'j', 'Q', 'E', 'j', 'd', 'u', 'S', 'N', 'Y', 'R', ' ', 'F', 'I', 'f', 'u', 'd', 't', 'u', 'Q', 'J', 'v', 'i', 'x', 'A', 'd', 'k', 'v', 'H', 'Z', 'B', 'u', 'o', 'k'], ['V', 'p', 'B', 'h', 'M', 'a', 'p', 'n', 'z', 'L', 's', 'g', 'c', 'G', 'T', 'X', 'a', 'X', 's', 'h', 'O', 'x', 'h', 's', 'x', 'N', ' ', 'O', 'w', 'F', 'v', 'M', 'W', 'u', 'c', 'Y', 'x', 'x', 'H', 'P', 'T', 'h', 's', 'W', 'w', 'l'], ['B', 'f', 'k', 'U', 'j', 'b', 'X', 'J', 'z', 'y', 'w', 'B', 'n', 'f', 'x', 'N', 'Y', 'l', 'Q', 'h', 't', 'v', 'U', 'y', 'I', 'G', 'q', 'T', 'a', 'i', 'N', 'p', 'e', 'Z', 'Y', 'Q', 'B', 'G', 'e', 'N', 'V', 's', 'E', 'U', 'B', 'h'], ['q', 'Y', 'r', 'w', 't', 'G', 'G', 'M', 'F', ' ', 'e', 'u', 'E', 'g', 's', 'D', 'c', 'h', 'L', 'G', 'x', 'u', 'V', 'j', 'u', 'U', 'i', 'm', 'Y', 'J', 'L', 'P', 'h', 'X', 'p', 'P', 'F', 'f', 'O', 'u', 'U', 'H', 'Y', 'I', 'A', 'X'], ['v', ' ', 'W', 'A', 'e', 't', 'Y', 't', 'I', 's', 'w', 'M', ' ', 'E', 'R', 'K', 'x', 'i', 'O', 'w', 'h', 'e', 'f', 'N', 'i', 'N', 'v', 'q', 'F', 'u', 'A', 'c', 'e', 's', 'p', 'N', 'j', 'G', 'q', 'W', 'q', 'U', 'J', 'b', 'V', 'i'], ['p', 'Y', 'p', 'f', 'I', 'N', 'S', 'C', 'J', 'p', 'O', 'O', 's', 'V', 's', 'Z', 'y', 's', 'l', 'o', 'b', 'e', 'L', 'J', 'm', 'W', 'g', 'P', 'x', 'l', 'W', 'N', 'a', 'T', 'm', 'D', 'p', 'p', 'l', 'P', 'E', 'V', 'c', 'O', 'T', 'Z'], ['x', ' ', 'v', 'X', 'T', 's', 'i', 'A', 'J', 'q', 'H', 'P', 'x', 'q', 'Y', 'n', 's', 'i', 'W', 'z', 'Y', 'q', 'a', 'Z', 't', 'M', 's', 'A', 'q', 'e', 'W', 'V', 'g', 'y', 'x', 'n', 'E', 'p', 'x', 't', 'q', 'R', 'T', 'm', 'h', 'm'], ['M', 'u', 'D', 'R', 'R', 'h', 'B', 'f', ' ', 'H', 'b', 'l', 'q', 'X', 'f', 'b', 'r', 'e', 'v', 'D', 'm', 'T', 'v', 'l', 'g', 'l', 'z', 'y', 'A', 'O', 'i', 'G', 'Q', 'l', 'K', 'G', 'H', 'G', 'S', 'b', 'a', 'b', 'k', 'p', 'g', 'R'], ['G', 'Q', 'P', 'e', 'P', 'r', 'K', 'U', 'l', 'g', 'X', 'q', 'I', 'O', 'U', 'y', 'V', 'Z', 't', 'Q', 'g', 'd', 'T', 'J', 'q', 'w', 'z', 'L', 'V', 'p', 'e', 'X', 'x', 'D', 'k', 'R', 'P', 'U', 'L', 'z', 'a', 'L', 'L', 'Q', 'z', 'D'], ['j', 'W', 'Q', 'E', 'P', 'V', 'f', 'p', 'w', 'n', 'U', 'j', 'Z', 'P', 'f', 'v', 'R', 'r', 'h', 'z', 'r', 'l', 'T', 'P', 'U', 'f', 'v', 'A', 'B', 'k', 'b', 'n', 'o', 'h', 'j', 'K', 'h', 'r', 'f', 'q', 'x', 'E', 'U', 'g', 'd', 'C'], ['C', 'v', 'D', ' ', 'K', 'd', 'd', 'D', 'd', 'f', 'U', 'F', 'l', 'x', 'E', 'D', 'Q', 'L', 'W', 'X', 'E', 'E', 'X', 'T', 'M', 'C', 'e', 'B', 'x', 'o', 'C', 'f', 'd', 'o', 'F', 'T', 'J', 'F', 'G', 'l', 'k', 'x', 'u', 'q', 'N', 't'], ['l', 'd', 'P', 'k', 'N', 'w', 't', 'C', 'u', 'n', 'f', 'Z', 'B', 'A', 'Z', 'z', 'z', 'v', 'Z', 's', 'n', 'f', 'Y', 'c', 's', 'j', 'e', 'M', 'E', 'i', 'N', 'Y', 'D', 'k', 'k', 'n', 'j', 'X', 'q', 'T', 'T', 'G', 'S', 'd', 't', 'd'], ['c', 'c', 'G', 'd', 'y', 'T', 'E', 'w', 'k', 'R', 'd', 'N', 'S', 'M', 'L', 'p', 'H', 'F', 'C', 'L', 'n', 'l', 'C', 'M', 'L', 'u', 'k', ' ', 'X', 'E', 'L', 'J', 'L', 'G', 'l', 'H', 'l', 'r', 'p', 'v', 'D', 'T', 'r', 'L', 'v', 'e'], ['t', 'A', 's', 'J', 'M', 'b', 'P', 'a', 'p', 'G', 'q', 'p', 'i', 'd', 'b', 'C', 'S', 'w', 'c', 'N', 'm', 'A', 'C', 'm', 'f', 'T', 'P', 'z', 'U', 'L', 'o', 'V', 'N', 'M', 'G', 'h', 'V', 'h', 'U', 'S', 'I', 'N', 'f', 'H', 'L', 'f'], ['q', 'V', 'Z', 'j', 's', 'c', 'T', 'n', 'U', 'l', 'E', 'V', 'c', 's', 'J', 'n', 'q', 'b', 'c', 'h', 'e', 'x', 'H', 'G', 'k', 'U', 'P', 'U', 'T', 'W', 'n', 't', 'p', 'i', 'b', 'u', 'b', 'H', 's', 'D', 'L', 'Y', 'Z', 'u', 'P', 'w'], ['s', 'F', 'O', 't', 'J', 'e', 'f', 'P', 'l', 'l', 'v', 'G', 'B', 'J', 'i', 'b', 'i', 'r', 'P', 'x', 'a', 'i', 'X', 'T', 'G', 'G', 'a', 'k', 'd', 'Z', 'L', 'Y', 'U', 'r', 'b', 'p', 't', 'k', 'L', 't', 'x', 'T', 'k', 'v', 'a', 'k'], ['c', 's', 'B', 'Z', 'd', 'h', 'd', 'P', 'w', 'D', 'a', 'c', 'G', 'M', 'T', 'u', 'U', 'O', 'T', 'w', 'a', 'o', 'x', 'V', 'J', 'g', 'N', 'w', 'w', 'f', 'g', 'u', 'j', 'p', 'G', 'T', 'w', 'X', 'J', 'p', 'M', 'y', 'o', 'G', 'm', 'w'], ['w', 'j', 'K', 'u', 'K', 'd', 'N', 'I', 'w', 'E', ' ', 'K', 'K', 'c', 'x', 'U', 'A', 'A', 'v', 'F', 'z', 'a', 'z', 'C', 'V', 'W', 'A', 'o', 'm', 'Z', 'i', 'U', 'F', 'e', 'p', 'w', 'O', 'A', 'T', 'u', 'a', 'P', 'l', 'y', 'w', 'J'], ['b', 'M', 'e', 'h', 'S', 'Q', 'c', 'G', 'D', 'A', 'I', 'H', 'g', 'f', 'E', 'j', 'x', 'u', 'P', 'p', 'p', 'd', 'V', 'F', 'D', 'L', 'L', 'g', 'H', 'h', 'n', 'Q', 'K', 'L', 'g', 'K', 'y', 'Y', 'u', 'A', 'g', 'W', 't', 'J', 'X', 'F'], ['k', 'J', 'l', 'X', 'J', 'm', 'e', 'Y', 'd', 'Z', 'L', 'W', 'r', 'W', 'T', 'J', 'G', 'f', ' ', 's', 'j', 'j', 'P', 'h', 'k', 'x', 'k', 'k', 'B', 'N', 'j', 'h', 's', 'o', 'b', 'm', 'u', 'O', 'i', 'D', 'c', 'B', 'a', 'h', 'B', 'Y'], ['L', 'l', 'R', 'Z', 'f', 'j', 'G', 'E', 'j', 'g', 'X', 'S', 'P', 'H', 'T', 'a', 'c', 'Y', 'b', 'r', 'N', 'N', 'R', 'n', 'd', 'j', 'H', 'M', 'X', 'A', 'V', 'G', 'c', 'r', 'l', 'v', 'F', 'e', 'z', 'k', 'z', 'Q', 'r', 'F', 'L', 'H'], ['U', 'o', 'Y', 'O', 'n', 'J', 'c', 'i', 'j', 'a', 'j', 'H', 'O', 'u', 'S', 'm', 'K', 'y', 'i', 'T', 'v', 'j', ' ', 'v', 'H', 'f', 'r', 'q', 'F', 'a', 'l', 'u', 'F', 'E', 'p', 'b', 'V', ' ', 'm', 'O', 'M', 'E', 'f', 'Q', 't', 'T'], [' ', 'B', 'H', 'i', 'H', 'c', 'T', ' ', 'K', 'u', 'd', 'C', 'F', 'F', 'S', 'v', 'Z', 'A', 'b', 't', 'r', 'G', 'I', 'F', 'p', 'L', 'G', 'N', 'h', 'y', 'm', 'b', 'z', 'V', 'G', 'D', 'p', 'K', 'p', 'C', 'X', 'y', 'w', 'c', 'z', 'K'], ['P', 'q', 'o', 'M', 'T', 'U', 'o', 'r', 'A', 'h', 'S', 'q', 'T', 's', 'V', 'u', 'c', 'N', 'v', 'E', 'r', 'X', 'k', 'v', 'M', 'p', 'Q', 'd', 'Y', 'Q', 'J', 'c', 'L', 'M', 'r', 'Z', 'D', 'k', 'V', 'u', 'G', ' ', 'Y', 'O', 'i', 'x'], ['V', 'x', 'o', 'G', 'T', 'g', 'G', 'N', 'A', 'q', 'p', 'l', 'K', 't', 'j', 'n', 'C', 'U', 'c', 'b', 'q', 'q', 'c', 'C', 'w', 'x', 'B', 'C', 't', 'V', 'z', 'y', 'y', 'o', 'U', 'E', 'O', 'X', 'j', 'V', 'r', 'y', 't', 'n', 'R', 'H'], ['Z', 'O', 'w', 'z', 'v', 'K', 'U', 'c', 'N', 'M', 'h', 'W', 'Y', 'Z', 'g', 'k', 'h', 'o', 'K', 'B', 'K', 'q', 'u', 'P', 'z', 'v', 'j', 'u', 'z', 'P', 'B', 'y', 'p', 'Y', 'U', 'W', 'Z', 'I', 'c', 'm', 'W', 'J', 'c', 'l', ' ', 'O'], ['Q', 'A', 'B', 'Z', 'C', 'D', 'N', 'i', 'W', 'E', 'W', 'V', 'Z', 'k', 'A', 'D', 'z', 'Z', 'I', 't', 'Y', 'K', 'u', 'T', 'u', 'q', 'p', 'V', 'P', 'y', 'o', 'e', 'Y', 'x', 'd', 'L', 'P', 'L', 'p', 'Z', 'E', 'N', 'r', 'c', 'K', 'Z']],31,), ([['1', '1', '1', '1', '2', '2', '3', '3', '3', '4', '4', '5', '5', '6', '7', '7', '7', '8', '8', '9', '9'], ['0', '0', '1', '1', '1', '2', '3', '4', '5', '6', '6', '6', '6', '6', '6', '6', '7', '7', '8', '8', '9'], ['0', '0', '0', '0', '0', '1', '1', '2', '2', '2', '3', '3', '4', '5', '5', '5', '5', '6', '7', '7', '8'], ['0', '1', '1', '2', '2', '2', '2', '2', '3', '3', '4', '4', '5', '5', '6', '6', '7', '7', '7', '9', '9'], ['0', '0', '1', '1', '2', '2', '2', '3', '3', '3', '4', '4', '4', '4', '4', '6', '7', '7', '8', '8', '9'], ['0', '0', '0', '0', '1', '1', '2', '3', '3', '3', '3', '4', '4', '4', '5', '7', '8', '8', '8', '9', '9'], ['0', '0', '0', '0', '0', '0', '1', '1', '2', '3', '4', '5', '5', '6', '6', '7', '7', '8', '8', '9', '9'], ['0', '2', '2', '2', '4', '4', '4', '4', '4', '5', '5', '5', '6', '6', '7', '7', '7', '8', '8', '9', '9'], ['0', '0', '1', '2', '3', '3', '3', '4', '4', '5', '5', '5', '7', '7', '7', '8', '8', '8', '9', '9', '9'], ['0', '0', '1', '2', '2', '3', '4', '4', '4', '4', '4', '5', '6', '6', '6', '7', '8', '8', '9', '9', '9'], ['0', '0', '1', '1', '1', '1', '1', '2', '2', '2', '2', '3', '4', '4', '5', '5', '6', '6', '8', '8', '9'], ['0', '0', '1', '2', '2', '2', '3', '3', '5', '5', '5', '6', '7', '7', '7', '7', '7', '8', '8', '9', '9'], ['0', '0', '1', '1', '1', '3', '5', '5', '5', '5', '6', '6', '6', '6', '6', '7', '7', '8', '8', '9', '9'], ['0', '0', '1', '2', '2', '2', '2', '2', '2', '3', '3', '5', '5', '5', '6', '7', '8', '8', '9', '9', '9'], ['0', '0', '0', '0', '2', '3', '5', '5', '5', '5', '5', '6', '6', '6', '7', '7', '7', '7', '7', '8', '9'], ['0', '0', '1', '2', '2', '3', '3', '3', '4', '4', '4', '5', '5', '5', '6', '6', '6', '7', '7', '8', '9'], ['0', '0', '0', '0', '1', '1', '3', '3', '3', '4', '4', '5', '5', '6', '7', '8', '8', '8', '9', '9', '9'], ['0', '0', '1', '1', '1', '1', '1', '2', '2', '3', '5', '5', '6', '6', '6', '7', '7', '7', '7', '8', '8'], ['0', '1', '1', '1', '1', '2', '2', '4', '4', '4', '4', '4', '5', '5', '6', '7', '7', '8', '8', '9', '9'], ['1', '1', '2', '2', '3', '3', '4', '5', '5', '5', '5', '6', '6', '7', '7', '7', '8', '8', '8', '9', '9'], ['0', '0', '0', '0', '2', '2', '2', '3', '3', '4', '5', '5', '5', '5', '5', '5', '6', '7', '7', '7', '9']],11,), ([['0', '1', '0', '1', '1', '1', '0', '1', '1', '0', '1', '0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1', '1', '1', '0', '0', '0', '1', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '1', '0', '1', '1', '0', '0', '0', '0', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '0'], ['0', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '1', '1', '0', '1', '0', '0', '1', '0', '1', '0', '1', '1', '1', '0', '1', '0', '0', '0', '1', '0', '0', '1', '1', '1', '0', '0'], ['0', '1', '1', '0', '0', '1', '1', '1', '0', '0', '0', '1', '1', '1', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '1', '1', '0'], ['1', '1', '1', '1', '1', '0', '0', '0', '1', '0', '1', '1', '0', '1', '1', '0', '0', '1', '1', '1', '1', '0', '1', '0', '0', '0', '0', '0', '1', '0', '0', '1', '0', '0', '1', '0', '0', '1', '1'], ['1', '0', '1', '0', '0', '1', '1', '1', '1', '0', '1', '1', '0', '0', '0', '0', '1', '0', '0', '1', '0', '1', '0', '1', '1', '1', '1', '0', '0', '1', '0', '0', '1', '1', '0', '1', '0', '1', '0'], ['0', '0', '0', '0', '1', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '0', '1', '1', '0', '1', '0', '0', '1', '0', '1', '0', '0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '1', '1'], ['1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '0', '0', '0', '1', '0', '1', '0', '0', '0', '0', '1', '1', '0', '1', '1', '0', '1', '0', '0', '0', '0', '1', '0', '0'], ['0', '0', '1', '1', '1', '1', '0', '1', '0', '1', '1', '1', '1', '0', '1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '0', '1', '1', '0', '1', '0', '0', '0', '1', '1', '0', '1', '1', '1', '1'], ['1', '0', '0', '1', '1', '0', '1', '1', '0', '0', '0', '1', '1', '0', '1', '0', '1', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '0', '0', '1', '0', '0', '0', '1', '1', '0', '1', '0', '0'], ['0', '0', '0', '1', '0', '0', '1', '1', '0', '0', '1', '0', '0', '1', '0', '0', '0', '0', '1', '1', '0', '1', '0', '0', '1', '0', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '0', '1'], ['1', '0', '0', '1', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '0', '1', '0', '1', '1', '0', '1', '0'], ['0', '0', '1', '0', '0', '0', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '0', '0', '1', '0', '0', '0', '0', '1', '0', '1', '1', '0', '0', '1', '1', '1', '0', '0', '0', '1', '1', '0', '0'], ['0', '1', '0', '1', '0', '0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0', '1', '0', '1', '1', '1', '1', '0', '0', '1', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '0', '1', '1', '0', '1', '0', '0', '0', '0', '1', '0', '0', '1', '1', '1', '0', '0', '1', '1', '1', '1', '0', '1', '0', '1', '1', '1'], ['1', '1', '0', '1', '1', '0', '0', '0', '0', '0', '0', '1', '0', '1', '0', '0', '0', '1', '1', '0', '1', '1', '0', '0', '1', '0', '0', '1', '0', '0', '0', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '0', '1', '0', '0', '1', '1', '1', '1', '1', '0'], ['1', '1', '0', '1', '1', '1', '0', '0', '1', '1', '0', '0', '1', '0', '1', '1', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '0', '0', '0', '0', '0', '1', '0', '0', '0', '1', '0', '1', '1'], ['0', '0', '1', '0', '1', '0', '0', '0', '0', '0', '1', '0', '0', '1', '1', '1', '0', '1', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '1', '0', '1', '1', '1', '0', '1', '1', '1', '0', '0'], ['1', '1', '0', '1', '0', '0', '1', '1', '1', '1', '0', '0', '1', '0', '0', '0', '1', '1', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '0', '0', '0', '1', '0', '0', '0', '1', '1', '1'], ['1', '0', '0', '1', '1', '1', '0', '0', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '1', '0', '1', '0', '0', '0', '0', '1', '0', '0', '1', '1', '0', '1', '1', '0', '1', '0', '0', '0', '0'], ['0', '0', '1', '1', '0', '1', '1', '1', '0', '0', '0', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '0', '1', '0', '1', '0', '1', '1', '1', '0', '0', '1', '0', '1', '1', '1', '1', '0', '0'], ['0', '1', '0', '1', '1', '1', '1', '1', '0', '0', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '1', '0', '0', '1', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '0', '1', '1', '0', '0', '1', '0', '0', '1', '1', '0', '1', '0', '0', '0', '1', '1', '0', '0', '0', '0', '0', '1', '1', '0', '1', '1', '0', '1', '1', '1', '0', '0', '1'], ['0', '0', '0', '1', '0', '0', '1', '0', '1', '0', '0', '1', '0', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '0', '1', '0', '1', '0', '0', '1', '0', '1', '1', '1', '1', '0', '0', '0', '1'], ['1', '0', '0', '1', '0', '1', '0', '1', '0', '0', '1', '1', '1', '0', '0', '0', '1', '0', '1', '1', '0', '1', '1', '1', '0', '0', '1', '1', '0', '1', '1', '0', '1', '1', '0', '0', '1', '1', '0'], ['0', '0', '1', '0', '1', '1', '0', '0', '1', '1', '1', '0', '0', '1', '1', '1', '0', '1', '0', '0', '0', '0', '1', '1', '1', '1', '1', '0', '0', '1', '0', '1', '0', '0', '1', '0', '1', '0', '0'], ['1', '1', '0', '0', '1', '1', '1', '0', '0', '1', '0', '1', '1', '1', '0', '0', '0', '0', '0', '1', '0', '1', '0', '1', '1', '0', '1', '1', '1', '0', '0', '1', '0', '0', '1', '0', '1', '1', '1'], ['0', '1', '0', '0', '1', '1', '0', '1', '1', '0', '1', '0', '1', '1', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '0', '0', '0', '0', '0', '1', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '0', '1', '1', '0', '0', '0', '0', '0', '0', '1', '1', '0', '1', '0', '1', '1', '1', '0', '0', '0', '0', '1', '1', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '0', '1', '1', '1', '0', '1', '1', '1', '1', '0', '0', '1', '0', '1', '0', '0', '0', '1', '1', '0', '1', '1', '1', '0', '1', '0', '0', '0', '0', '0', '1'], ['1', '1', '0', '0', '1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '1', '0', '0', '1', '1', '1', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '0', '0'], ['1', '0', '0', '1', '1', '0', '1', '1', '0', '0', '0', '0', '0', '1', '0', '0', '1', '1', '1', '1', '1', '1', '0', '0', '0', '1', '1', '1', '1', '0', '0', '1', '1', '0', '1', '1', '1', '0', '1'], ['0', '1', '0', '0', '0', '1', '0', '1', '0', '0', '1', '0', '1', '0', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '0', '0', '1', '1', '0', '1', '1', '0', '1', '1', '0', '0', '1', '1', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '0', '0', '1', '0', '1', '0', '1', '0', '0', '1', '0', '0', '0', '0', '1', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '1', '0', '0', '1', '0'], ['0', '1', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '0', '0', '1', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '0', '1', '1', '1', '1', '1'], ['1', '1', '1', '0', '1', '1', '0', '0', '0', '0', '1', '1', '0', '1', '1', '0', '1', '0', '0', '1', '0', '0', '1', '1', '1', '0', '1', '1', '0', '1', '1', '1', '0', '1', '1', '0', '0', '0', '1'], ['0', '1', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '0', '0', '1', '1', '0', '1', '0', '0', '1', '1', '1', '0', '0', '1', '0', '0', '0', '0', '1', '0', '1', '0', '1', '0', '1', '1', '0'], ['1', '1', '0', '1', '1', '0', '0', '1', '1', '1', '0', '1', '1', '0', '1', '1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '1', '0', '0', '1', '1', '1']],20,), ([['B', 'D', 'D', 'E', 'H', 'H', 'J', 'M', 'M', 'M', 'M', 'N', 'O', 'O', 'P', 'R', 'S', 'T', 'U', 'U', 'W', 'W', 'Z', 'Z', 'b', 'c', 'c', 'e', 'f', 'g', 'j', 'k', 'k', 'n', 'o', 'r', 't', 'u', 'v'], [' ', 'A', 'A', 'A', 'C', 'C', 'D', 'D', 'E', 'F', 'H', 'J', 'J', 'K', 'L', 'L', 'N', 'T', 'T', 'U', 'W', 'Y', 'Z', 'c', 'f', 'g', 'i', 'i', 'k', 'k', 'm', 'n', 'o', 'p', 'r', 'r', 'u', 'v', 'x'], [' ', 'A', 'A', 'C', 'D', 'E', 'G', 'H', 'K', 'K', 'L', 'Q', 'S', 'U', 'V', 'Z', 'a', 'd', 'e', 'g', 'i', 'i', 'j', 'n', 'o', 'o', 'p', 'p', 'q', 's', 's', 't', 't', 'w', 'x', 'x', 'x', 'y', 'z'], [' ', 'B', 'D', 'E', 'G', 'H', 'H', 'H', 'H', 'K', 'M', 'O', 'O', 'R', 'R', 'S', 'S', 'U', 'V', 'X', 'a', 'a', 'd', 'e', 'e', 'f', 'h', 'i', 'j', 'p', 'p', 'q', 'q', 'q', 's', 'w', 'w', 'y', 'z'], [' ', 'A', 'A', 'C', 'E', 'F', 'G', 'H', 'J', 'J', 'K', 'M', 'O', 'S', 'S', 'U', 'X', 'Y', 'Z', 'b', 'd', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'q', 'q', 's', 's', 't', 'u', 'u', 'v', 'y', 'z'], ['H', 'H', 'H', 'H', 'J', 'J', 'K', 'M', 'N', 'S', 'U', 'U', 'V', 'V', 'V', 'W', 'Y', 'a', 'b', 'c', 'c', 'e', 'f', 'f', 'f', 'h', 'k', 'l', 'm', 'q', 'q', 's', 't', 'v', 'v', 'w', 'w', 'y', 'z'], ['A', 'B', 'D', 'G', 'H', 'I', 'J', 'J', 'L', 'M', 'N', 'P', 'Q', 'S', 'T', 'T', 'X', 'X', 'X', 'Y', 'Z', 'a', 'c', 'd', 'd', 'd', 'i', 'k', 'l', 'm', 'n', 'p', 'q', 'q', 't', 'w', 'x', 'y', 'y'], [' ', 'B', 'B', 'C', 'E', 'F', 'G', 'H', 'I', 'I', 'I', 'J', 'J', 'K', 'M', 'N', 'O', 'O', 'P', 'Q', 'S', 'T', 'W', 'Y', 'Y', 'a', 'c', 'd', 'h', 'h', 'i', 'j', 'k', 'o', 'o', 's', 'z', 'z', 'z'], [' ', 'A', 'C', 'C', 'D', 'E', 'E', 'E', 'F', 'H', 'H', 'M', 'M', 'N', 'N', 'R', 'T', 'W', 'Z', 'Z', 'd', 'e', 'h', 'h', 'j', 'j', 'k', 'm', 'n', 'o', 'p', 'r', 's', 's', 't', 'w', 'x', 'x', 'x'], ['A', 'D', 'I', 'M', 'P', 'Q', 'U', 'U', 'Y', 'Y', 'Z', 'Z', 'Z', 'a', 'b', 'c', 'e', 'f', 'f', 'f', 'g', 'g', 'h', 'h', 'i', 'i', 'j', 'm', 'n', 'o', 'p', 'q', 'r', 'u', 'u', 'u', 'w', 'x', 'z'], [' ', 'A', 'A', 'A', 'B', 'C', 'E', 'F', 'G', 'H', 'J', 'Q', 'R', 'S', 'U', 'U', 'V', 'W', 'Y', 'Z', 'a', 'b', 'b', 'd', 'g', 'j', 'k', 'l', 'l', 'm', 'n', 'n', 'o', 's', 's', 'u', 'w', 'w', 'w'], [' ', 'A', 'B', 'C', 'E', 'E', 'E', 'H', 'J', 'J', 'K', 'M', 'N', 'P', 'R', 'U', 'U', 'V', 'W', 'a', 'e', 'f', 'k', 'k', 'k', 'l', 'l', 'm', 'n', 'n', 'o', 'o', 'o', 'q', 'r', 'r', 't', 'u', 'x'], [' ', 'B', 'B', 'E', 'F', 'F', 'H', 'O', 'O', 'P', 'P', 'Q', 'R', 'S', 'T', 'X', 'a', 'a', 'a', 'b', 'e', 'f', 'g', 'i', 'j', 'm', 'n', 'p', 'r', 't', 't', 't', 'u', 'v', 'v', 'w', 'x', 'x', 'z'], [' ', 'A', 'B', 'C', 'D', 'E', 'E', 'G', 'H', 'J', 'J', 'J', 'K', 'K', 'M', 'P', 'Q', 'R', 'R', 'W', 'X', 'X', 'Z', 'a', 'a', 'e', 'h', 'i', 'j', 'k', 'q', 'q', 'r', 'r', 's', 'u', 'x', 'x', 'y'], [' ', 'B', 'I', 'I', 'J', 'J', 'K', 'N', 'O', 'P', 'P', 'R', 'U', 'X', 'Z', 'Z', 'Z', 'b', 'd', 'f', 'f', 'h', 'h', 'h', 'j', 'k', 'k', 'n', 'n', 'o', 'o', 'p', 'q', 's', 't', 'v', 'w', 'x', 'z'], [' ', ' ', 'B', 'E', 'K', 'L', 'M', 'N', 'Q', 'Q', 'R', 'S', 'T', 'U', 'V', 'V', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'e', 'e', 'g', 'i', 'i', 'm', 'n', 'o', 'p', 's', 'u', 'u', 'v', 'w', 'x', 'z'], ['E', 'E', 'E', 'E', 'J', 'K', 'K', 'M', 'N', 'P', 'Q', 'S', 'S', 'V', 'W', 'W', 'W', 'X', 'Y', 'c', 'c', 'd', 'e', 'f', 'h', 'n', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'x', 'y', 'z', 'z'], [' ', ' ', ' ', 'E', 'E', 'F', 'F', 'G', 'G', 'H', 'J', 'L', 'O', 'Q', 'R', 'R', 'T', 'V', 'W', 'Y', 'Y', 'Z', 'Z', 'c', 'f', 'g', 'h', 'h', 'j', 'l', 'q', 'q', 'q', 't', 'v', 'x', 'x', 'y', 'y'], ['B', 'D', 'G', 'G', 'H', 'J', 'J', 'K', 'M', 'Q', 'S', 'S', 'T', 'T', 'T', 'U', 'V', 'Z', 'Z', 'a', 'b', 'd', 'e', 'g', 'g', 'h', 'h', 'l', 'l', 'n', 'o', 's', 'u', 'u', 'v', 'v', 'w', 'x', 'y'], [' ', ' ', 'B', 'B', 'B', 'C', 'D', 'D', 'E', 'I', 'L', 'M', 'O', 'O', 'P', 'P', 'Q', 'R', 'R', 'R', 'R', 'R', 'U', 'a', 'b', 'c', 'd', 'e', 'g', 'k', 'l', 'l', 'n', 'n', 'n', 'p', 'p', 'r', 'r'], [' ', ' ', 'B', 'E', 'E', 'F', 'G', 'L', 'M', 'N', 'N', 'O', 'P', 'R', 'R', 'S', 'S', 'S', 'T', 'T', 'Y', 'Y', 'Z', 'a', 'a', 'b', 'd', 'e', 'f', 'j', 'j', 'k', 'l', 'l', 'm', 'o', 'o', 'p', 'y'], ['A', 'B', 'E', 'E', 'H', 'H', 'I', 'J', 'J', 'N', 'O', 'P', 'Q', 'R', 'V', 'V', 'W', 'W', 'X', 'X', 'Y', 'Z', 'Z', 'g', 'i', 'j', 'j', 'm', 'n', 'o', 'q', 'r', 'r', 's', 's', 's', 's', 't', 'x'], [' ', 'G', 'J', 'L', 'M', 'M', 'Q', 'Q', 'Q', 'S', 'U', 'W', 'W', 'Y', 'Z', 'Z', 'a', 'b', 'f', 'h', 'i', 'i', 'l', 'l', 'm', 'n', 'o', 'p', 'p', 'p', 'q', 'q', 'q', 's', 's', 't', 'u', 'v', 'w'], ['B', 'B', 'D', 'E', 'E', 'H', 'I', 'J', 'K', 'K', 'L', 'S', 'T', 'V', 'X', 'b', 'b', 'b', 'd', 'd', 'g', 'h', 'h', 'h', 'i', 'i', 'k', 'l', 'm', 'm', 'n', 'o', 'v', 'w', 'x', 'x', 'x', 'z', 'z'], ['B', 'C', 'C', 'C', 'D', 'D', 'E', 'F', 'J', 'K', 'M', 'N', 'O', 'O', 'Q', 'Q', 'R', 'R', 'R', 'S', 'T', 'U', 'V', 'W', 'W', 'a', 'b', 'f', 'g', 'i', 'm', 'n', 'n', 'n', 'p', 'p', 'p', 'u', 'v'], [' ', 'B', 'D', 'F', 'F', 'H', 'J', 'J', 'M', 'M', 'N', 'T', 'U', 'c', 'd', 'e', 'e', 'j', 'j', 'j', 'l', 'l', 'm', 'm', 'n', 'n', 'o', 'p', 'p', 'p', 's', 't', 't', 'v', 'v', 'w', 'y', 'y', 'y'], [' ', 'A', 'A', 'B', 'D', 'G', 'H', 'H', 'H', 'I', 'K', 'N', 'O', 'P', 'R', 'S', 'T', 'Y', 'Y', 'a', 'b', 'c', 'e', 'f', 'g', 'h', 'j', 'j', 'j', 'm', 'n', 'o', 's', 's', 'u', 'u', 'x', 'x', 'z'], [' ', ' ', 'F', 'G', 'G', 'J', 'N', 'N', 'P', 'S', 'S', 'S', 'T', 'T', 'X', 'Z', 'a', 'd', 'e', 'f', 'f', 'h', 'i', 'j', 'k', 'm', 'm', 'n', 'r', 's', 's', 't', 'v', 'w', 'x', 'x', 'x', 'z', 'z'], ['B', 'B', 'D', 'I', 'J', 'L', 'M', 'M', 'N', 'P', 'P', 'Q', 'S', 'U', 'X', 'X', 'X', 'Y', 'Z', 'a', 'b', 'e', 'e', 'f', 'g', 'i', 'j', 'l', 'm', 'o', 'q', 'r', 'r', 't', 'v', 'w', 'w', 'w', 'w'], [' ', 'A', 'B', 'C', 'D', 'D', 'E', 'F', 'F', 'H', 'I', 'J', 'J', 'M', 'N', 'N', 'O', 'S', 'U', 'V', 'W', 'W', 'e', 'g', 'h', 'h', 'i', 'j', 'j', 'o', 'p', 'q', 'q', 'r', 't', 'v', 'v', 'x', 'y'], [' ', 'A', 'A', 'C', 'C', 'D', 'D', 'D', 'E', 'G', 'I', 'J', 'O', 'Q', 'S', 'S', 'S', 'T', 'T', 'V', 'X', 'Y', 'Y', 'b', 'i', 'k', 'l', 'l', 'm', 'n', 'p', 't', 'v', 'w', 'w', 'x', 'x', 'y', 'z'], ['A', 'A', 'D', 'F', 'G', 'H', 'I', 'L', 'N', 'P', 'Q', 'S', 'T', 'U', 'V', 'W', 'W', 'X', 'Y', 'Z', 'b', 'c', 'f', 'g', 'g', 'g', 'j', 'j', 'j', 'l', 'q', 's', 's', 'v', 'v', 'w', 'x', 'y', 'z'], ['B', 'H', 'I', 'J', 'K', 'K', 'L', 'L', 'M', 'N', 'N', 'N', 'P', 'P', 'S', 'T', 'U', 'V', 'W', 'W', 'a', 'a', 'a', 'a', 'b', 'j', 'j', 'k', 'm', 'n', 'p', 'u', 'u', 'u', 'v', 'w', 'x', 'y', 'z'], ['B', 'B', 'D', 'D', 'D', 'E', 'G', 'H', 'I', 'I', 'I', 'L', 'N', 'N', 'O', 'P', 'R', 'R', 'R', 'S', 'V', 'V', 'Y', 'Z', 'a', 'b', 'h', 'k', 'l', 'm', 'n', 'o', 'p', 'p', 'q', 'r', 's', 'x', 'z'], ['A', 'B', 'B', 'G', 'G', 'H', 'J', 'J', 'L', 'M', 'M', 'N', 'N', 'P', 'P', 'P', 'R', 'S', 'T', 'X', 'Z', 'd', 'd', 'f', 'f', 'j', 'j', 'j', 'l', 'l', 'l', 'm', 'r', 'r', 'u', 'v', 'v', 'x', 'x'], [' ', 'B', 'B', 'C', 'E', 'G', 'J', 'J', 'K', 'L', 'N', 'O', 'Q', 'R', 'T', 'T', 'V', 'V', 'X', 'X', 'b', 'e', 'f', 'i', 'i', 'k', 'm', 'n', 'o', 'o', 'p', 's', 's', 'u', 'u', 'w', 'x', 'x', 'x'], ['A', 'A', 'A', 'B', 'B', 'E', 'H', 'H', 'H', 'I', 'J', 'J', 'N', 'Q', 'Q', 'R', 'R', 'U', 'V', 'X', 'a', 'b', 'd', 'd', 'e', 'e', 'g', 'g', 'k', 'k', 'l', 'n', 'n', 'p', 'q', 'q', 'v', 'w', 'x'], ['B', 'B', 'B', 'C', 'C', 'D', 'E', 'F', 'H', 'I', 'I', 'K', 'N', 'N', 'P', 'P', 'P', 'U', 'W', 'X', 'Z', 'c', 'e', 'h', 'h', 'i', 'j', 'l', 'p', 'p', 'r', 'r', 'r', 'r', 'v', 'w', 'x', 'x', 'y'], [' ', ' ', 'B', 'C', 'C', 'D', 'E', 'E', 'H', 'L', 'O', 'P', 'P', 'S', 'T', 'V', 'Y', 'Y', 'Y', 'c', 'd', 'e', 'e', 'f', 'h', 'h', 'h', 'j', 'k', 'l', 'm', 'n', 'r', 's', 's', 'u', 'x', 'y', 'y']],38,), ([['8', '0', '3', '3', '7', '7', '3', '5', '4', '9', '6', '9', '4', '6', '9'], ['8', '7', '2', '2', '6', '9', '6', '0', '0', '6', '8', '1', '6', '1', '5'], ['2', '0', '5', '1', '8', '0', '0', '2', '9', '4', '1', '4', '8', '0', '2'], ['9', '9', '9', '5', '1', '8', '9', '5', '8', '7', '2', '9', '4', '0', '4'], ['1', '6', '7', '1', '7', '4', '7', '4', '6', '4', '3', '8', '0', '4', '9'], ['2', '7', '9', '6', '1', '2', '2', '9', '0', '7', '2', '3', '2', '0', '9'], ['9', '5', '3', '3', '6', '1', '3', '1', '3', '4', '3', '4', '1', '5', '9'], ['1', '6', '5', '2', '6', '7', '1', '8', '6', '6', '2', '2', '6', '7', '6'], ['5', '3', '8', '0', '3', '6', '3', '2', '1', '2', '3', '8', '1', '0', '2'], ['2', '2', '6', '8', '0', '6', '5', '9', '9', '3', '9', '5', '8', '6', '4'], ['4', '1', '0', '3', '9', '1', '0', '8', '3', '4', '0', '9', '0', '6', '8'], ['1', '7', '9', '6', '6', '1', '7', '2', '5', '9', '5', '2', '1', '1', '8'], ['7', '7', '4', '5', '2', '6', '4', '3', '4', '9', '1', '4', '3', '7', '2'], ['1', '3', '0', '5', '9', '2', '2', '6', '2', '4', '0', '7', '2', '6', '1'], ['0', '4', '4', '2', '6', '9', '5', '4', '3', '2', '6', '5', '6', '4', '0']],8,), ([['0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1']],6,), ([['u', 'V', 'l', 'L', 'o', 'i', 'o', 'L', 'S', 'D', 'S', 'u', 'Z', 'E', 's', 'q', 'P', 'X', 'd', 'v', 'W', 'J', 'p', 'r', 'e', 'j', 'F', 'l', 'Z', 'U', 'R', 'Y', 'M', 'C', 'S', 'C', 'Q', 'A'], ['w', 'p', 'O', 'x', 'a', 'v', 'Q', 'Z', 'n', 'Q', 'j', 't', 'N', ' ', 'n', 'u', 'y', 'x', 'E', 'r', 'd', 'e', 'g', 'e', 'H', 'Z', 'b', 's', 'A', 'R', 'x', 'h', 'v', 'X', 'x', 'K', 'P', 'M'], ['y', 'D', 'z', 't', 'g', 'L', 'B', 'N', 'i', 'g', 'E', 'l', 'P', 'q', 'j', 'm', 'c', 'X', 'b', 'X', 'Z', 'w', 's', 'Z', 'F', 'p', 'r', 'P', 'o', 'p', 'Y', 'R', 'w', 'n', 'y', 'n', 't', 'C'], ['b', 'v', 'G', 'K', 'J', 'u', 'w', 'q', 'x', 'b', 'O', 'Z', 'b', 'v', 'E', 'O', 'o', 'j', 'W', 'd', 'r', 'z', 'X', 'K', 'r', 'O', 'm', 'S', 'V', 'D', 'm', 'O', 'j', 'O', 'J', 'L', 'z', 'S'], ['Z', 'O', 'X', 'A', 'd', 'N', 'V', 't', 'f', 'z', 'q', 'H', 'O', 'Z', 'b', 'T', 'W', 'B', 'u', 'K', 'P', 'y', 'w', 'z', 'p', 'M', 'Z', 'P', 'l', 'y', 'J', 'G', 'i', 'C', 'r', 'y', 's', 'v'], ['k', 'R', 'i', 'z', 'A', 'l', 'J', 'X', 'C', 'i', 'P', 'A', 'y', 'y', 'a', 'E', 'V', 's', 'a', 'P', 'r', 'Y', 'D', 'n', 'o', 'w', 'M', ' ', 'W', 'm', 'W', 'H', 'a', 'v', 'j', 'g', 'Y', 'm'], ['M', 'y', 'N', 'A', 'R', 'u', 'e', 'N', 'H', 'a', 's', 'E', 'Q', 'b', 'd', 'E', 's', 'X', 'f', 'G', 'N', 'x', 'h', 'i', 'u', 'U', 'M', 'U', 's', 'u', 'N', 'f', 'u', 'o', 'C', 's', 'S', 'P'], ['h', 'C', 'v', 'L', 'H', 'h', 'Y', 'Y', 'F', 'S', 'd', 'Q', 'h', 'V', 'V', 'U', 'g', 'C', 's', 'X', 'E', 't', 'e', 'M', 'F', 'w', 'U', 'e', 'C', 'J', 'Y', 'R', 'o', 'a', 'W', 'L', 'k', 'K'], ['k', 'H', 'J', 'T', 's', 'F', 'y', 'C', 'O', 'J', 'O', 'B', 'm', 'B', 'e', 'G', 'l', 'g', 'y', 'J', 'y', 'u', 'F', 'E', 'B', ' ', 'B', 'Z', 'a', 'e', 'v', 'u', 'U', 'J', 'l', 'C', 'k', 'v'], ['d', 'y', 'V', 'Z', 't', 'X', 'n', 'v', 'O', 's', 'E', 'L', 'Z', 'x', 'x', 'p', 'w', 'W', 'S', 'n', 'G', 'y', 'q', 'o', 'B', 'X', 'f', 'r', 'n', 'T', 'y', 'p', 'J', 'j', 'I', 'w', 'r', 's'], ['h', 'y', 'p', 'j', 'r', 'D', 'j', 'H', 't', 'X', 'q', 'K', 'N', 'j', 'h', 'v', 'K', 'r', 'j', 'J', 'A', 'u', 'D', 'f', 'J', 'n', 'q', 'w', 'P', 'w', 'i', 's', 'G', 's', 't', 'D', 'r', 'A'], ['f', 'I', 'v', 'M', 'x', 'K', 'O', 'i', 'p', 'y', 'o', 'Z', 'Y', 's', 'V', 'f', 'i', 'V', 'x', 'K', 'p', 'a', 'L', 'V', 'r', 'B', 'v', 'd', 'M', 'e', 'X', 'h', 'F', 'S', 'p', 'Z', 'J', 'I'], ['H', 'V', 'a', 'a', 'i', 'k', 'D', 'e', 'Z', 'i', 'h', 'v', 'A', 'G', 'N', 'Q', 'r', 'e', 'A', 'q', 'n', 'a', 'z', 'N', 'b', 'y', 'R', 'z', 'c', 'I', 'A', 'h', 'z', 'o', 'F', 'w', 'p', 'h'], ['X', 'z', 'K', 'b', 'z', 'E', 'u', 'E', 'h', 'L', 'X', 'K', 'Q', 'r', 'f', 'Z', 'k', 'p', 'S', 'b', 'l', 'N', 'M', 'u', 'f', 'z', 'p', 'f', 'Q', 'U', 'q', 'g', 'F', 'K', 'D', 'Q', 'H', 'K'], ['S', 'U', 'o', 'u', 'z', 'G', 'q', 'w', 'N', 'B', 'c', 'u', 'k', 'n', 'v', 'S', 'O', 'Z', 'I', 'F', 'T', 'Z', 'D', 'g', 'w', 'K', 'G', 'C', 'B', 'M', 'e', 'W', 'r', 'v', 'l', 't', 't', 'u'], ['P', 'e', 'm', 'H', 'W', 'b', 's', 'C', 'j', 'U', 'E', 'a', 'J', 'o', 'G', ' ', 'H', 'T', 'f', 'j', 'N', 'N', 'E', 'u', 'W', 'O', 'X', 'e', 'm', 'w', ' ', 'f', 'U', 'Y', 'N', 'X', 'I', 'j'], [' ', 'v', 'q', 'O', 'd', 'p', 'd', 'Q', 'N', 'A', 'v', 'u', 'o', 'q', ' ', 'S', 'H', 'b', 'M', 'J', 'b', 'G', 'L', 'N', 'w', 'r', 'G', 'Q', 'E', 'R', 'y', 'a', 'k', 'S', 'W', 'I', 'P', 'd'], ['N', 'z', 'F', 'X', 'x', 'J', 'q', 'G', 'Z', 'Z', 'E', ' ', 'q', 'M', 'L', 'B', 'y', 'k', 'h', 'R', 'e', 'R', 'N', 'p', 'D', 'K', 'n', 'g', 'E', 'w', 'P', 'v', 'J', 'P', ' ', 'q', 'N', 's'], ['u', 'Q', 'F', 'j', 'r', 'I', 'X', 'C', 'E', 'R', 'R', 'E', 'D', 'p', 'n', 'a', 'X', 'Q', 'J', 'F', 'F', 'x', 's', 'P', 'o', 'a', 't', 'f', 'S', 'n', 'P', 'S', 'k', 's', 'j', 'M', 'L', 'l'], ['F', ' ', 'n', 'P', 'P', 'N', 'D', ' ', 'N', 'W', 'G', 'm', 'p', 'P', 'R', 'L', 'b', 'c', 'q', 'O', 'k', 'Y', 'p', 'I', 'b', 'P', 'Y', 'Y', 'F', 'c', 'p', 'W', 'e', 'R', 'k', 'j', 'V', 'h'], ['Q', 'J', 'g', 'D', 'S', 'U', 'm', 'z', 'M', 'n', 'a', 'V', 'q', 'P', 'X', 'w', 's', 'v', 'J', 'J', 'h', 'n', 'J', 'd', 'Z', 'M', 'v', 'M', 'h', 'Q', ' ', 'W', 'V', 's', 'O', 'A', 'x', 'j'], ['N', 'i', 'm', 'F', 'H', 'C', ' ', 'x', ' ', 't', 'g', 'q', 'j', 'd', 'n', 'g', 'l', 'U', 'k', 'U', 'q', 'h', 'A', 'c', 'u', 'o', 'U', 'z', 'D', 'N', 'p', 'R', 'K', 'k', 'T', 'i', 'D', 'i'], ['P', 'r', 'W', 'S', 's', 'U', 'k', 'l', 'e', 's', 'W', 'd', 'Y', 'q', 'p', 'Q', 'z', 'F', 'Z', 's', 'x', 'h', 'J', 'q', 'B', 'F', 'R', 'm', 'l', 'f', 'H', 'U', 'd', 'V', 'o', 'b', 't', 'B'], ['R', 'q', 'm', 'q', 'h', 'q', 'i', 'P', 'N', 'O', 'q', 'i', 'V', 'O', 'n', 'K', 'J', 'd', 'E', 'b', 'V', 'O', 'u', 'S', 'l', 'u', 'A', 'k', 'd', 'r', 'x', 'g', 'y', 'U', 'A', 'q', 'p', 'd'], ['r', 'h', 'h', 'L', 'j', 'd', 'b', 'o', 'v', 'D', 'd', 'M', 'f', 'y', 'Q', 'V', ' ', 'j', 'a', 'T', 'X', 'a', 't', 'I', 'Z', 'A', 'P', 'l', 'Y', 'j', 'c', 'A', 'A', 'e', 'r', 'H', 'u', 'f'], ['a', 'Y', 'J', 'J', 'k', 'L', 'x', 'l', 'O', 'n', 'J', 'I', 'l', 'x', 'V', 'S', 'S', 'l', 'D', 'E', 'm', 'd', ' ', 'j', 'Q', 'L', 't', 'c', 'o', 'D', 'z', 'A', 'x', 'u', 'F', 'E', 'v', 'a'], ['o', 'K', 'F', 'V', 'L', 'G', 't', 'A', 'd', 'b', 'P', 'F', 'K', 'N', 'J', 'e', 'B', 'T', 'H', 'n', 'D', 'b', 'm', 'T', 'L', 'S', 'n', 'D', 'b', 's', 'I', 't', 'O', 'a', 'm', 'a', 'A', 'n'], ['L', 'o', 'z', 'L', 'a', 'd', 'T', 'D', 'd', 'S', 'D', 'a', 'm', 'z', 'y', 'y', 'A', 'j', 'v', 'H', 'F', 't', 'A', 'f', 'G', 'E', ' ', 'x', ' ', 'm', 'L', 'I', 'O', 'Z', 'C', 'y', 'X', 'x'], [' ', 'I', 'i', 's', 'E', 'N', 'm', 'k', 'l', 'n', 's', 's', 'P', 'M', 'x', 'i', 'I', 'K', 'k', 'm', 'k', 'X', 'n', 'W', 'k', 'F', 'D', 'c', 'l', 'd', 'n', 'o', 'H', 'T', 'B', 'g', 'S', 'v'], ['g', 'p', 'd', 'A', 'Y', 'b', 'L', 'P', 'v', 'j', 'O', 'C', 's', 'g', 'J', 'm', 'P', 'd', 'H', 'c', 'h', 'U', 'P', 'J', 'h', 'c', 'f', 'W', 'l', 'K', 'F', 'T', 's', 'Z', 'n', 'v', ' ', 'p'], ['O', 'H', 'J', 'y', 'B', 'c', 'M', 'Q', 'F', 'k', 'S', 'o', 'b', 'M', 'c', 'i', 'K', 'l', 'a', 'Y', 'v', 'O', 'U', 'R', 'B', 'o', 'H', 'g', 'o', ' ', 'H', 'l', 'g', 'e', 'L', 'x', 'M', 'z'], ['q', 'u', 'A', 'O', 'u', 'f', 'r', 'U', 'F', 'g', 'f', 'g', 'R', 'E', 'W', 'H', 'n', 'e', 'N', 'Z', 'y', 'M', 'j', 'L', 'T', 'b', 'v', 'N', 'u', 'X', 'E', 'y', 'g', 'Y', ' ', 'n', 'T', 'r'], ['k', 'n', 'F', 'B', 'X', 't', 'j', 'a', 'b', 'I', 'C', 'O', 'R', 'h', 'c', 'C', 'F', 'E', 'l', 'Y', 's', 'D', 'p', 'j', 'J', ' ', 'y', 'u', 'x', 'q', ' ', 'P', 'J', 'P', 't', 'g', 'X', 'j'], ['M', 'u', 'Q', 'x', 'r', 'n', 'U', 'w', 'w', ' ', 'H', 'P', ' ', 'V', 'X', 'Y', 't', 'Z', 'F', 'H', 'X', 'N', 'y', 'E', 'j', 'I', 'Q', 'P', ' ', 'y', 'e', 'I', 'o', 'b', 'j', 'E', 'p', 'G'], ['n', 'd', 'T', 'f', 'a', 'D', 's', 'i', 'b', 'm', 'K', 'h', 'c', 'G', 'I', 'p', 'd', 'x', 'I', 'G', 'B', 'q', 'k', 'A', 'B', 'M', 'g', 'S', 't', 'K', 'b', 'm', 'm', 'u', 'k', ' ', 'U', 'Z'], ['C', 'v', 'L', 'k', 'x', 'L', ' ', 'm', 'x', 'P', 'C', 'X', 'n', 'w', 'd', 'E', 'O', 'D', 'Q', 'i', 'A', 'p', 'K', 'r', 'n', 'Y', 'T', 'v', 'K', 'O', 'M', 'w', 'p', 'P', 'R', 'X', 'I', 'g'], ['l', 'M', 'd', 'j', 'M', 'd', 'y', 'x', ' ', 'o', 'E', 't', 'X', 'w', 'c', 'H', 'r', 'q', 'd', 'Q', 'I', 'g', 'T', 'F', 't', 'q', 'A', 'e', 'm', 'y', 'G', 't', 'v', 'G', 'r', 'x', 'g', 'H'], ['T', 'f', 'N', 'W', 'K', 'T', 'b', 'O', 'J', 'B', 'a', 'd', 'l', 'y', 's', 's', 'W', 'D', 't', 'z', 'D', 'c', 'k', 'l', 'e', 'Q', 'A', 'J', 'J', 'k', 'M', 'G', 'F', 'S', 'C', 'N', 'x', 'X']],32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_VALID_SEQUENCE_DIVISIBLE_M_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_VALID_SEQUENCE_DIVISIBLE_M_1{ static int f_gold ( int n , int index , int modulo , int M , int arr [ ] , int dp [ ] [ ] ) { modulo = ( ( modulo % M ) + M ) % M ; if ( index == n ) { if ( modulo == 0 ) { return 1 ; } return 0 ; } if ( dp [ index ] [ modulo ] != - 1 ) { return dp [ index ] [ modulo ] ; } int placeAdd = f_gold ( n , index + 1 , modulo + arr [ index ] , M , arr , dp ) ; int placeMinus = f_gold ( n , index + 1 , modulo - arr [ index ] , M , arr , dp ) ; int res = placeAdd ; dp [ index ] [ modulo ] = res ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(19); param0.add(14); param0.add(5); param0.add(8); param0.add(14); param0.add(16); param0.add(24); param0.add(7); param0.add(35); param0.add(8); List param1 = new ArrayList<>(); param1.add(29); param1.add(17); param1.add(7); param1.add(10); param1.add(12); param1.add(21); param1.add(26); param1.add(7); param1.add(35); param1.add(5); List param2 = new ArrayList<>(); param2.add(20); param2.add(13); param2.add(6); param2.add(10); param2.add(16); param2.add(17); param2.add(24); param2.add(7); param2.add(33); param2.add(8); List param3 = new ArrayList<>(); param3.add(19); param3.add(17); param3.add(8); param3.add(8); param3.add(19); param3.add(18); param3.add(21); param3.add(7); param3.add(22); param3.add(6); List param4 = new ArrayList<>(); param4.add(new int[]{1,2,2,3,6,15,16,17,20,21,27,28,28,29,44,47,53,53,54,59,60,60,66,68,78,79,80,84,87,91,92,97}); param4.add(new int[]{68,-86,-98,40,-6,-16,-98,50,46,-34,74,-8,-70,-18,-58,92,12,98,34,6,54,70}); param4.add(new int[]{0,0,0,0,0,1,1,1,1,1}); param4.add(new int[]{8,8,80,15,73,51,44,98,99,59,73,42}); param4.add(new int[]{-88,-82,-78,-72,-70,-54,-32,-32,-10,-8,8,14,16,22,26,26,28,30,34,34,62,62,76,88}); param4.add(new int[]{0,1,0,1,1,0,0,0,0,0,1,0,1,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1}); param4.add(new int[]{4,8,8,16,22,23,28,32,38,45,48,50,52,54,55,64,70,75,75,76,83,87,88,89,94,94,95}); param4.add(new int[]{-56,-66,-60,94,44,-92,18,-26,-88,46,-24,-8,-46,78}); param4.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param4.add(new int[]{80,95,34,51,95,68,55,65,60}); List param5 = new ArrayList<>(); param5.add(new int[][]{new int[]{4,7,9,11,16,22,22,24,31,35,36,37,44,46,47,50,52,56,59,62,62,63,65,65,67,67,72,74,74,79,92,92},new int[]{6,10,12,16,17,21,23,25,25,25,27,30,32,39,39,40,46,47,47,62,78,79,79,84,86,87,88,88,90,91,93,95},new int[]{2,3,8,9,12,12,27,28,32,33,33,38,39,40,43,43,46,47,48,48,56,58,62,72,77,77,78,89,93,94,97,98},new int[]{2,3,3,6,12,13,14,14,17,19,19,19,20,23,27,43,48,52,53,54,60,65,65,67,67,67,68,74,75,78,88,90},new int[]{1,3,13,16,21,23,30,30,35,37,37,42,43,47,47,49,50,52,60,61,67,68,73,78,78,79,80,82,83,89,95,97},new int[]{2,4,6,10,11,16,24,33,34,35,40,40,47,50,51,55,62,64,68,70,70,73,75,81,85,85,89,91,92,93,93,94},new int[]{3,5,11,11,15,19,20,25,26,27,27,36,37,44,56,60,64,64,68,74,76,76,77,78,80,84,87,91,92,94,95,96},new int[]{2,2,9,14,16,20,20,27,28,29,32,33,35,46,53,54,55,57,61,62,63,63,69,74,84,87,88,90,93,93,98,98},new int[]{4,5,9,12,14,20,21,22,25,26,32,33,33,35,36,38,45,51,54,58,60,61,67,69,70,75,75,77,80,89,90,94},new int[]{2,8,18,18,20,23,24,29,31,32,33,34,35,41,41,47,48,49,52,55,61,65,65,66,69,69,76,85,89,91,94,94},new int[]{6,10,12,14,14,32,32,34,35,39,39,44,44,50,52,52,54,56,58,60,60,62,65,69,69,71,77,83,83,86,92,92},new int[]{2,8,15,19,21,27,32,41,46,47,48,49,51,51,63,65,67,72,73,76,77,77,82,82,83,85,87,88,91,92,94,98},new int[]{6,7,13,14,14,14,15,21,23,29,30,30,37,44,45,45,48,48,57,67,67,68,70,71,71,72,78,86,86,91,97,99},new int[]{4,5,12,12,13,14,14,16,18,20,21,24,24,25,25,26,33,40,47,49,51,61,64,64,68,74,81,83,83,87,89,94},new int[]{3,8,9,14,16,17,30,33,39,40,40,43,45,46,47,49,51,54,55,56,59,60,63,79,79,83,94,94,95,98,99,99},new int[]{4,6,7,9,9,10,16,17,18,21,30,33,36,37,37,39,42,53,57,66,69,70,73,77,81,82,82,84,87,88,92,99},new int[]{2,2,5,6,6,7,12,13,13,17,22,24,24,27,27,29,35,36,39,39,43,44,45,64,71,72,73,82,82,85,93,98},new int[]{1,5,8,9,12,13,22,29,30,31,36,36,40,40,41,42,52,55,57,58,61,61,61,65,76,78,82,86,86,89,94,96},new int[]{1,3,3,5,9,10,19,19,20,24,34,40,42,42,46,46,48,53,53,58,64,68,72,73,81,86,88,89,90,92,93,95},new int[]{1,1,5,5,15,19,22,23,27,29,33,41,44,44,48,51,56,56,71,77,79,79,82,82,84,86,87,90,90,91,93,98},new int[]{2,4,8,13,14,22,23,27,28,29,37,37,38,41,47,47,48,50,51,53,54,55,57,63,65,69,75,77,77,79,82,97},new int[]{4,9,10,18,20,23,24,27,39,40,41,41,42,43,45,58,58,64,66,67,68,69,74,81,83,83,84,84,86,87,90,98},new int[]{1,8,9,11,15,15,18,24,25,31,31,33,34,35,35,43,47,52,56,58,58,67,69,70,71,74,77,82,85,89,89,90},new int[]{1,3,8,8,12,12,16,21,22,25,25,25,29,31,31,31,34,34,35,35,36,37,37,42,43,55,55,59,67,72,74,85},new int[]{2,4,6,9,12,14,18,22,23,23,26,36,36,41,44,51,51,53,56,59,59,59,60,61,68,68,74,77,93,94,94,96},new int[]{1,2,5,11,12,14,19,28,33,34,37,37,38,38,38,47,49,59,62,67,71,73,73,74,80,83,84,85,89,90,92,99},new int[]{1,5,10,19,24,36,41,47,48,57,59,59,60,62,65,65,67,70,71,77,79,79,81,81,82,83,87,89,91,91,95,97},new int[]{7,10,10,10,17,18,29,29,30,31,32,32,37,38,44,50,59,59,62,63,63,73,74,80,80,81,84,85,85,89,98,99},new int[]{1,7,9,14,19,22,26,29,30,34,40,43,44,45,45,46,49,58,62,63,67,76,78,79,82,84,93,94,95,97,98,98},new int[]{5,6,8,9,12,14,22,31,34,36,38,43,46,47,48,48,50,52,54,57,67,68,68,72,75,77,79,80,92,96,97,98},new int[]{8,10,15,15,15,19,21,24,25,27,30,34,36,43,44,45,50,51,54,55,57,58,59,63,69,69,73,75,87,94,96,96},new int[]{3,4,12,13,13,16,16,19,29,32,40,43,48,49,55,58,61,64,65,66,66,69,71,72,75,83,85,88,89,90,94,96}}); param5.add(new int[][]{new int[]{-30,10,-22,92,-46,58,-12,-42,64,12,6,12,-34,-20,6,-90,-60,78,90,-72,-30,2},new int[]{-72,-60,22,-22,-12,6,80,-34,8,-66,20,-72,-34,-30,14,-54,86,96,-20,-76,34,-64},new int[]{52,8,28,-74,78,-92,-78,6,56,-76,98,4,-46,80,36,54,-70,68,-88,68,-84,-94},new int[]{94,84,60,44,-46,-44,94,60,14,76,82,84,56,68,54,46,-42,16,-46,32,-76,-6},new int[]{-8,-88,70,-48,62,4,70,-62,34,-48,48,-82,-16,60,14,-10,-56,4,-22,-96,44,22},new int[]{-34,-70,-16,-94,-22,2,-20,10,-42,52,18,-74,-84,-56,72,-24,64,-90,68,-90,60,-70},new int[]{28,-86,-52,-58,-2,-96,32,-90,88,98,-66,78,-44,-6,-44,46,-16,-76,48,-20,-68,-70},new int[]{-88,-88,-16,24,-96,-32,20,-92,-50,40,26,12,-76,50,-90,-96,6,8,-56,74,30,-46},new int[]{40,-74,-18,-36,-50,82,-72,-74,-38,16,86,56,58,80,74,4,-16,-14,-78,36,-8,-16},new int[]{-44,-18,-14,94,-4,-98,-4,-32,-84,-54,38,78,-74,62,76,30,22,24,34,42,94,-84},new int[]{60,-26,-12,14,-26,42,60,12,74,-26,66,60,32,32,-70,22,50,84,-14,-2,62,50},new int[]{-38,-28,-8,62,10,18,-78,-68,70,88,-4,24,88,-32,44,-46,58,-90,18,-32,42,32},new int[]{2,-14,62,84,-18,76,-94,-66,-64,-58,-54,40,74,32,-78,-46,44,-16,-40,32,-66,-82},new int[]{-46,26,92,96,-34,-88,-84,82,20,-12,62,92,32,66,38,66,38,-50,68,-56,-44,72},new int[]{-30,-40,-56,46,36,12,-58,-36,-36,66,-80,-24,34,-96,0,-46,-38,88,36,92,-74,-40},new int[]{-10,-54,96,-58,80,-64,-88,60,24,14,-58,30,74,64,66,96,-66,86,66,76,-90,-28},new int[]{34,6,60,62,-10,-34,58,-38,92,-28,-88,-36,84,94,2,36,22,-38,66,36,36,22},new int[]{92,64,64,-8,14,88,-64,34,-26,44,44,10,-2,-80,-50,-90,70,36,-50,32,18,72},new int[]{26,52,-88,-72,-52,78,64,-34,-96,-68,76,-50,-28,-84,22,16,40,84,-16,80,-48,38},new int[]{16,-94,-74,30,-82,24,38,8,-68,26,-96,-36,90,56,20,24,-42,-76,-20,24,76,10},new int[]{74,56,-46,84,-84,80,-26,90,-42,22,78,26,56,-12,62,-12,-30,-20,-52,42,52,-56},new int[]{34,-86,-18,-60,-64,60,-98,78,34,-40,10,-36,48,98,94,38,-32,46,-52,34,-74,60}}); param5.add(new int[][]{new int[]{0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0},new int[]{0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1},new int[]{0,0,0,0,0,1,1,1,1,1}}); param5.add(new int[][]{new int[]{89,45,59,5,12,1,54,1,25,40,25,45},new int[]{94,83,22,94,13,16,98,46,37,94,99,59},new int[]{7,92,73,68,63,10,45,75,56,77,66,79},new int[]{37,91,18,45,35,35,66,75,82,14,88,88},new int[]{16,44,53,11,41,41,44,53,19,11,3,99},new int[]{80,89,67,90,58,65,9,15,76,4,43,8},new int[]{39,51,95,87,68,88,84,27,15,77,95,84},new int[]{54,67,79,17,81,4,18,10,37,96,15,42},new int[]{19,49,6,4,37,50,43,83,89,44,74,21},new int[]{75,19,30,32,20,67,1,85,3,31,76,78},new int[]{94,25,26,97,28,74,96,81,36,33,21,25},new int[]{19,72,42,88,41,20,1,18,92,5,82,18}}); param5.add(new int[][]{new int[]{-96,-74,-68,-56,-40,-26,-22,-18,-6,-2,6,6,18,18,20,22,26,30,32,40,52,52,70,70},new int[]{-96,-92,-90,-90,-72,-70,-64,-52,-50,-44,-40,-32,-30,-28,-24,-18,-16,-4,14,18,28,36,50,70},new int[]{-96,-62,-60,-54,-52,-40,-36,-2,6,6,6,8,12,14,18,34,36,44,62,66,66,78,86,88},new int[]{-90,-78,-64,-58,-56,-50,-40,-32,-32,-12,0,0,16,18,26,28,30,38,40,44,48,72,84,98},new int[]{-88,-46,-34,0,10,12,16,20,26,38,48,48,50,60,60,62,66,72,72,74,84,88,94,98},new int[]{-96,-94,-88,-80,-76,-66,-62,-36,-20,-16,-6,-6,-2,0,0,18,20,24,36,40,72,76,86,98},new int[]{-66,-52,-44,-32,-28,-20,-6,-4,10,18,22,24,26,38,40,44,44,48,48,58,84,90,94,94},new int[]{-86,-78,-54,-52,-46,-38,-34,14,24,26,34,34,40,46,50,50,62,72,72,82,84,86,92,94},new int[]{-98,-84,-70,-68,-66,-60,-28,-10,4,10,16,34,34,44,46,48,52,56,56,56,60,84,84,88},new int[]{-96,-92,-82,-80,-76,-54,-52,-46,-46,-30,-26,-26,-20,-16,-10,-10,-4,26,30,32,34,78,78,86},new int[]{-92,-90,-76,-64,-50,-48,-46,-42,-36,-30,-24,-20,-14,-4,12,16,22,30,40,40,48,60,86,92},new int[]{-86,-82,-72,-46,-46,-42,-34,-34,-22,-20,-20,-14,-10,-2,-2,28,50,50,52,58,78,80,84,94},new int[]{-92,-90,-74,-64,-64,-56,-52,-50,-46,-46,-32,-26,-22,-4,-2,10,16,32,34,38,58,58,60,86},new int[]{-94,-88,-66,-58,-56,-50,-42,-30,-28,-24,-22,-12,-10,-8,0,16,24,26,30,38,44,52,80,98},new int[]{-98,-82,-74,-64,-60,-52,-48,-38,-36,-24,-20,-20,-18,26,26,36,44,44,50,50,54,78,80,96},new int[]{-84,-68,-66,-62,-60,-52,-50,-40,-36,-28,-8,-6,2,18,26,32,42,50,62,66,68,72,80,98},new int[]{-92,-90,-82,-72,-72,-58,-54,-40,-38,-34,-28,-22,-6,-6,0,0,2,6,18,44,68,70,72,74},new int[]{-92,-64,-64,-60,-58,-52,-50,-12,-8,-8,-4,-2,14,14,16,18,22,28,38,38,42,66,90,90},new int[]{-72,-70,-68,-56,-42,-40,-38,-32,-32,-22,-20,-20,-10,-10,0,24,24,34,72,80,88,92,94,96},new int[]{-84,-80,-58,-38,-32,-30,-16,-14,4,10,10,14,18,20,24,26,30,34,36,40,58,70,72,92},new int[]{-88,-78,-68,-66,-50,-42,-36,-36,-18,-14,-10,-6,-6,-2,2,6,16,18,40,68,72,76,86,94},new int[]{-82,-70,-64,-56,-52,-32,-10,-4,8,16,28,40,46,56,56,58,66,68,70,74,76,80,80,86},new int[]{-98,-90,-80,-78,-76,-74,-72,-64,-62,-42,-30,-14,-8,2,12,24,42,44,72,74,76,94,94,98},new int[]{-94,-90,-86,-82,-58,-50,-44,-20,-18,0,18,26,36,38,44,50,52,54,56,64,68,78,82,86}}); param5.add(new int[][]{new int[]{0,1,1,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,0,1,0,0,1,1,1,1,1,1},new int[]{0,0,0,1,0,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,1,1,1,0},new int[]{1,0,0,0,1,0,1,0,0,0,0,0,0,1,0,1,1,1,1,1,0,1,1,1,0,1,0,1},new int[]{0,1,0,0,0,1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,0,1,0},new int[]{0,1,1,0,0,0,1,1,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,0},new int[]{0,0,1,0,1,1,1,0,0,1,0,0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,1,0},new int[]{0,0,1,1,1,0,1,1,1,1,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,1,1},new int[]{1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,0,1},new int[]{1,1,0,0,1,0,0,1,0,1,1,0,1,0,0,0,0,1,1,1,0,1,0,1,0,0,1,0},new int[]{0,0,0,1,1,0,1,1,1,1,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,1,0},new int[]{1,0,0,0,1,0,1,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,0,0,1,1},new int[]{1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,1,1},new int[]{1,1,1,1,1,1,1,0,0,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,0,1,1},new int[]{0,1,0,1,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,1,0,1,0,1,1,1,0,1},new int[]{0,1,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,1,0,1,0},new int[]{0,0,1,1,0,0,0,0,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1},new int[]{0,0,1,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0},new int[]{1,0,0,1,1,1,1,0,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,0,0,0,0,1},new int[]{1,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,0,1,0,0,1,1,1,0,0,1,1,1},new int[]{1,1,1,1,0,1,0,1,0,0,1,1,0,0,0,1,0,1,0,1,1,0,0,0,0,0,0,0},new int[]{1,0,1,0,0,0,1,0,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,0,1},new int[]{0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0,1},new int[]{0,1,1,0,0,0,0,0,0,1,1,0,1,0,1,1,1,0,1,0,0,1,0,0,0,0,0,1},new int[]{1,1,0,0,1,1,0,1,1,0,0,1,1,0,1,0,1,0,1,0,1,0,0,1,1,1,0,1},new int[]{0,0,0,0,1,1,0,0,0,0,1,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,0,0},new int[]{0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,1,1},new int[]{1,0,0,1,0,0,0,1,0,0,1,0,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,0},new int[]{0,1,1,0,1,0,0,0,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,0,0,1,0}}); param5.add(new int[][]{new int[]{1,3,5,8,8,16,16,18,19,26,28,33,33,35,35,41,42,43,47,51,65,66,73,84,87,95,99},new int[]{1,3,3,21,26,29,31,40,40,43,51,53,54,62,62,65,74,75,77,77,79,81,81,84,84,92,95},new int[]{7,9,10,12,13,14,19,27,30,44,46,47,51,53,58,59,65,73,78,84,84,86,88,91,92,98,99},new int[]{5,15,15,21,24,25,31,34,47,53,53,58,60,60,69,74,75,75,76,78,79,81,86,87,88,91,97},new int[]{5,16,19,20,22,25,32,37,37,40,43,46,50,55,56,58,59,60,61,64,67,72,85,88,91,91,96},new int[]{5,6,10,14,16,19,22,25,26,31,38,41,43,45,52,56,59,66,69,78,82,87,87,88,89,92,99},new int[]{3,11,15,18,22,25,31,37,37,38,38,44,47,50,51,52,68,70,78,81,83,84,89,90,95,95,98},new int[]{3,6,8,10,13,21,22,22,22,22,23,26,33,42,49,49,50,66,72,73,75,78,83,84,92,93,99},new int[]{8,10,11,16,17,26,32,45,52,53,53,63,64,65,69,71,72,72,74,77,81,82,87,94,96,96,96},new int[]{3,4,8,11,21,25,26,31,33,35,35,38,42,43,48,50,50,61,62,63,67,67,70,79,80,84,97},new int[]{2,14,15,16,21,30,30,32,32,40,41,41,42,45,45,46,46,52,61,63,78,79,80,81,86,93,97},new int[]{4,5,5,6,7,16,16,18,20,22,23,28,30,35,38,43,63,67,72,77,82,85,85,87,87,91,92},new int[]{4,8,10,11,27,30,31,39,47,49,52,62,67,69,71,71,72,75,79,79,80,84,84,87,95,95,99},new int[]{16,17,21,24,26,32,43,43,46,49,53,56,64,72,81,82,85,85,90,90,92,92,93,95,95,97,99},new int[]{4,4,6,12,12,13,16,26,31,31,35,40,40,50,51,54,56,57,60,62,64,64,86,90,91,99,99},new int[]{13,13,16,17,18,20,21,21,23,24,25,25,27,32,33,34,45,45,64,76,77,78,78,83,88,90,97},new int[]{2,4,5,6,6,11,17,18,35,36,42,52,52,54,55,57,58,70,70,72,81,86,87,87,89,97,99},new int[]{2,5,5,10,10,13,25,27,29,29,29,30,42,48,48,52,56,57,62,64,65,66,68,76,85,89,91},new int[]{7,15,27,32,40,44,49,49,63,65,67,69,70,70,71,71,73,74,80,84,84,85,88,89,92,95,97},new int[]{4,9,10,14,27,30,30,36,37,38,39,41,44,45,46,50,52,60,62,63,68,76,77,81,82,88,94},new int[]{5,6,9,10,11,19,24,26,30,31,34,46,47,54,56,56,59,62,66,71,79,87,89,90,92,99,99},new int[]{3,5,6,6,15,21,23,28,32,50,50,56,65,66,75,76,82,85,85,87,88,90,93,94,97,97,99},new int[]{10,13,13,15,16,19,21,26,30,51,55,59,60,61,63,66,67,77,77,83,87,89,89,90,92,97,99},new int[]{8,10,10,11,12,13,16,25,31,33,34,36,36,44,48,58,62,67,73,75,76,80,84,89,91,96,98},new int[]{10,12,22,25,28,29,40,41,42,47,48,50,55,58,62,72,72,72,76,79,81,82,85,94,95,98,99},new int[]{4,5,6,7,9,15,22,23,26,27,31,33,34,37,47,52,52,54,54,56,63,72,84,91,92,99,99},new int[]{17,18,22,25,31,36,36,36,36,37,42,45,46,51,51,62,68,73,83,87,88,90,91,92,95,96,97}}); param5.add(new int[][]{new int[]{32,-72,-76,-6,4,-42,-82,-6,-52,24,88,8,78,82},new int[]{-20,18,-68,48,-64,40,-26,22,80,-52,-98,-28,-6,-76},new int[]{-68,20,-52,-90,-78,96,-20,56,-28,-88,-80,60,30,38},new int[]{-12,58,48,58,-78,14,-36,82,-66,-52,36,-26,90,-90},new int[]{-76,24,-46,-2,-76,-62,-50,-64,72,-52,-62,84,-20,12},new int[]{-66,-8,40,20,-56,-42,90,32,40,-8,-28,78,76,-78},new int[]{-82,38,28,-26,-72,-96,-60,-66,28,94,10,-30,24,-90},new int[]{66,-14,24,80,-38,-4,52,-94,-40,26,6,58,40,-74},new int[]{72,78,62,-40,-30,-4,-82,66,-32,6,-72,0,56,42},new int[]{74,62,16,-4,36,-38,-30,-18,32,-76,12,-52,40,98},new int[]{-88,52,-10,96,12,68,-12,86,4,-84,-54,-90,92,54},new int[]{68,44,-30,-90,52,-96,-44,48,-80,2,12,24,58,-74},new int[]{-78,-24,86,14,-76,46,82,14,6,-10,56,-70,20,80},new int[]{80,38,10,-76,-82,26,32,74,6,76,14,88,24,90}}); param5.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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}}); param5.add(new int[][]{new int[]{32,76,68,57,32,74,11,94,55},new int[]{53,76,86,95,82,62,51,37,84},new int[]{73,35,43,64,94,53,79,61,20},new int[]{25,5,34,35,84,44,76,20,21},new int[]{18,60,47,2,26,24,80,29,63},new int[]{76,15,47,88,50,90,57,10,14},new int[]{84,17,77,25,28,1,6,19,15},new int[]{22,10,30,53,32,83,28,49,62},new int[]{73,75,57,84,1,93,80,44,55}}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , index , modulo , M , arr , dp ) : modulo = ( ( modulo % M ) + M ) % M if ( index == n ) : if ( modulo == 0 ) : return 1 return 0 if ( dp [ index ] [ modulo ] != - 1 ) : return dp [ index ] [ modulo ] placeAdd = f_gold ( n , index + 1 , modulo + arr [ index ] , M , arr , dp ) placeMinus = f_gold ( n , index + 1 , modulo - arr [ index ] , M , arr , dp ) res = bool ( placeAdd or placeMinus ) dp [ index ] [ modulo ] = res return res ",,," if __name__ == '__main__': param = [ (19,29,20,19,[1, 2, 2, 3, 6, 15, 16, 17, 20, 21, 27, 28, 28, 29, 44, 47, 53, 53, 54, 59, 60, 60, 66, 68, 78, 79, 80, 84, 87, 91, 92, 97],[[4, 7, 9, 11, 16, 22, 22, 24, 31, 35, 36, 37, 44, 46, 47, 50, 52, 56, 59, 62, 62, 63, 65, 65, 67, 67, 72, 74, 74, 79, 92, 92], [6, 10, 12, 16, 17, 21, 23, 25, 25, 25, 27, 30, 32, 39, 39, 40, 46, 47, 47, 62, 78, 79, 79, 84, 86, 87, 88, 88, 90, 91, 93, 95], [2, 3, 8, 9, 12, 12, 27, 28, 32, 33, 33, 38, 39, 40, 43, 43, 46, 47, 48, 48, 56, 58, 62, 72, 77, 77, 78, 89, 93, 94, 97, 98], [2, 3, 3, 6, 12, 13, 14, 14, 17, 19, 19, 19, 20, 23, 27, 43, 48, 52, 53, 54, 60, 65, 65, 67, 67, 67, 68, 74, 75, 78, 88, 90], [1, 3, 13, 16, 21, 23, 30, 30, 35, 37, 37, 42, 43, 47, 47, 49, 50, 52, 60, 61, 67, 68, 73, 78, 78, 79, 80, 82, 83, 89, 95, 97], [2, 4, 6, 10, 11, 16, 24, 33, 34, 35, 40, 40, 47, 50, 51, 55, 62, 64, 68, 70, 70, 73, 75, 81, 85, 85, 89, 91, 92, 93, 93, 94], [3, 5, 11, 11, 15, 19, 20, 25, 26, 27, 27, 36, 37, 44, 56, 60, 64, 64, 68, 74, 76, 76, 77, 78, 80, 84, 87, 91, 92, 94, 95, 96], [2, 2, 9, 14, 16, 20, 20, 27, 28, 29, 32, 33, 35, 46, 53, 54, 55, 57, 61, 62, 63, 63, 69, 74, 84, 87, 88, 90, 93, 93, 98, 98], [4, 5, 9, 12, 14, 20, 21, 22, 25, 26, 32, 33, 33, 35, 36, 38, 45, 51, 54, 58, 60, 61, 67, 69, 70, 75, 75, 77, 80, 89, 90, 94], [2, 8, 18, 18, 20, 23, 24, 29, 31, 32, 33, 34, 35, 41, 41, 47, 48, 49, 52, 55, 61, 65, 65, 66, 69, 69, 76, 85, 89, 91, 94, 94], [6, 10, 12, 14, 14, 32, 32, 34, 35, 39, 39, 44, 44, 50, 52, 52, 54, 56, 58, 60, 60, 62, 65, 69, 69, 71, 77, 83, 83, 86, 92, 92], [2, 8, 15, 19, 21, 27, 32, 41, 46, 47, 48, 49, 51, 51, 63, 65, 67, 72, 73, 76, 77, 77, 82, 82, 83, 85, 87, 88, 91, 92, 94, 98], [6, 7, 13, 14, 14, 14, 15, 21, 23, 29, 30, 30, 37, 44, 45, 45, 48, 48, 57, 67, 67, 68, 70, 71, 71, 72, 78, 86, 86, 91, 97, 99], [4, 5, 12, 12, 13, 14, 14, 16, 18, 20, 21, 24, 24, 25, 25, 26, 33, 40, 47, 49, 51, 61, 64, 64, 68, 74, 81, 83, 83, 87, 89, 94], [3, 8, 9, 14, 16, 17, 30, 33, 39, 40, 40, 43, 45, 46, 47, 49, 51, 54, 55, 56, 59, 60, 63, 79, 79, 83, 94, 94, 95, 98, 99, 99], [4, 6, 7, 9, 9, 10, 16, 17, 18, 21, 30, 33, 36, 37, 37, 39, 42, 53, 57, 66, 69, 70, 73, 77, 81, 82, 82, 84, 87, 88, 92, 99], [2, 2, 5, 6, 6, 7, 12, 13, 13, 17, 22, 24, 24, 27, 27, 29, 35, 36, 39, 39, 43, 44, 45, 64, 71, 72, 73, 82, 82, 85, 93, 98], [1, 5, 8, 9, 12, 13, 22, 29, 30, 31, 36, 36, 40, 40, 41, 42, 52, 55, 57, 58, 61, 61, 61, 65, 76, 78, 82, 86, 86, 89, 94, 96], [1, 3, 3, 5, 9, 10, 19, 19, 20, 24, 34, 40, 42, 42, 46, 46, 48, 53, 53, 58, 64, 68, 72, 73, 81, 86, 88, 89, 90, 92, 93, 95], [1, 1, 5, 5, 15, 19, 22, 23, 27, 29, 33, 41, 44, 44, 48, 51, 56, 56, 71, 77, 79, 79, 82, 82, 84, 86, 87, 90, 90, 91, 93, 98], [2, 4, 8, 13, 14, 22, 23, 27, 28, 29, 37, 37, 38, 41, 47, 47, 48, 50, 51, 53, 54, 55, 57, 63, 65, 69, 75, 77, 77, 79, 82, 97], [4, 9, 10, 18, 20, 23, 24, 27, 39, 40, 41, 41, 42, 43, 45, 58, 58, 64, 66, 67, 68, 69, 74, 81, 83, 83, 84, 84, 86, 87, 90, 98], [1, 8, 9, 11, 15, 15, 18, 24, 25, 31, 31, 33, 34, 35, 35, 43, 47, 52, 56, 58, 58, 67, 69, 70, 71, 74, 77, 82, 85, 89, 89, 90], [1, 3, 8, 8, 12, 12, 16, 21, 22, 25, 25, 25, 29, 31, 31, 31, 34, 34, 35, 35, 36, 37, 37, 42, 43, 55, 55, 59, 67, 72, 74, 85], [2, 4, 6, 9, 12, 14, 18, 22, 23, 23, 26, 36, 36, 41, 44, 51, 51, 53, 56, 59, 59, 59, 60, 61, 68, 68, 74, 77, 93, 94, 94, 96], [1, 2, 5, 11, 12, 14, 19, 28, 33, 34, 37, 37, 38, 38, 38, 47, 49, 59, 62, 67, 71, 73, 73, 74, 80, 83, 84, 85, 89, 90, 92, 99], [1, 5, 10, 19, 24, 36, 41, 47, 48, 57, 59, 59, 60, 62, 65, 65, 67, 70, 71, 77, 79, 79, 81, 81, 82, 83, 87, 89, 91, 91, 95, 97], [7, 10, 10, 10, 17, 18, 29, 29, 30, 31, 32, 32, 37, 38, 44, 50, 59, 59, 62, 63, 63, 73, 74, 80, 80, 81, 84, 85, 85, 89, 98, 99], [1, 7, 9, 14, 19, 22, 26, 29, 30, 34, 40, 43, 44, 45, 45, 46, 49, 58, 62, 63, 67, 76, 78, 79, 82, 84, 93, 94, 95, 97, 98, 98], [5, 6, 8, 9, 12, 14, 22, 31, 34, 36, 38, 43, 46, 47, 48, 48, 50, 52, 54, 57, 67, 68, 68, 72, 75, 77, 79, 80, 92, 96, 97, 98], [8, 10, 15, 15, 15, 19, 21, 24, 25, 27, 30, 34, 36, 43, 44, 45, 50, 51, 54, 55, 57, 58, 59, 63, 69, 69, 73, 75, 87, 94, 96, 96], [3, 4, 12, 13, 13, 16, 16, 19, 29, 32, 40, 43, 48, 49, 55, 58, 61, 64, 65, 66, 66, 69, 71, 72, 75, 83, 85, 88, 89, 90, 94, 96]],), (14,17,13,17,[68, -86, -98, 40, -6, -16, -98, 50, 46, -34, 74, -8, -70, -18, -58, 92, 12, 98, 34, 6, 54, 70],[[-30, 10, -22, 92, -46, 58, -12, -42, 64, 12, 6, 12, -34, -20, 6, -90, -60, 78, 90, -72, -30, 2], [-72, -60, 22, -22, -12, 6, 80, -34, 8, -66, 20, -72, -34, -30, 14, -54, 86, 96, -20, -76, 34, -64], [52, 8, 28, -74, 78, -92, -78, 6, 56, -76, 98, 4, -46, 80, 36, 54, -70, 68, -88, 68, -84, -94], [94, 84, 60, 44, -46, -44, 94, 60, 14, 76, 82, 84, 56, 68, 54, 46, -42, 16, -46, 32, -76, -6], [-8, -88, 70, -48, 62, 4, 70, -62, 34, -48, 48, -82, -16, 60, 14, -10, -56, 4, -22, -96, 44, 22], [-34, -70, -16, -94, -22, 2, -20, 10, -42, 52, 18, -74, -84, -56, 72, -24, 64, -90, 68, -90, 60, -70], [28, -86, -52, -58, -2, -96, 32, -90, 88, 98, -66, 78, -44, -6, -44, 46, -16, -76, 48, -20, -68, -70], [-88, -88, -16, 24, -96, -32, 20, -92, -50, 40, 26, 12, -76, 50, -90, -96, 6, 8, -56, 74, 30, -46], [40, -74, -18, -36, -50, 82, -72, -74, -38, 16, 86, 56, 58, 80, 74, 4, -16, -14, -78, 36, -8, -16], [-44, -18, -14, 94, -4, -98, -4, -32, -84, -54, 38, 78, -74, 62, 76, 30, 22, 24, 34, 42, 94, -84], [60, -26, -12, 14, -26, 42, 60, 12, 74, -26, 66, 60, 32, 32, -70, 22, 50, 84, -14, -2, 62, 50], [-38, -28, -8, 62, 10, 18, -78, -68, 70, 88, -4, 24, 88, -32, 44, -46, 58, -90, 18, -32, 42, 32], [2, -14, 62, 84, -18, 76, -94, -66, -64, -58, -54, 40, 74, 32, -78, -46, 44, -16, -40, 32, -66, -82], [-46, 26, 92, 96, -34, -88, -84, 82, 20, -12, 62, 92, 32, 66, 38, 66, 38, -50, 68, -56, -44, 72], [-30, -40, -56, 46, 36, 12, -58, -36, -36, 66, -80, -24, 34, -96, 0, -46, -38, 88, 36, 92, -74, -40], [-10, -54, 96, -58, 80, -64, -88, 60, 24, 14, -58, 30, 74, 64, 66, 96, -66, 86, 66, 76, -90, -28], [34, 6, 60, 62, -10, -34, 58, -38, 92, -28, -88, -36, 84, 94, 2, 36, 22, -38, 66, 36, 36, 22], [92, 64, 64, -8, 14, 88, -64, 34, -26, 44, 44, 10, -2, -80, -50, -90, 70, 36, -50, 32, 18, 72], [26, 52, -88, -72, -52, 78, 64, -34, -96, -68, 76, -50, -28, -84, 22, 16, 40, 84, -16, 80, -48, 38], [16, -94, -74, 30, -82, 24, 38, 8, -68, 26, -96, -36, 90, 56, 20, 24, -42, -76, -20, 24, 76, 10], [74, 56, -46, 84, -84, 80, -26, 90, -42, 22, 78, 26, 56, -12, 62, -12, -30, -20, -52, 42, 52, -56], [34, -86, -18, -60, -64, 60, -98, 78, 34, -40, 10, -36, 48, 98, 94, 38, -32, 46, -52, 34, -74, 60]],), (5,7,6,8,[0, 0, 0, 0, 0, 1, 1, 1, 1, 1],[[0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [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, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]],), (8,10,10,8,[8, 8, 80, 15, 73, 51, 44, 98, 99, 59, 73, 42],[[89, 45, 59, 5, 12, 1, 54, 1, 25, 40, 25, 45], [94, 83, 22, 94, 13, 16, 98, 46, 37, 94, 99, 59], [7, 92, 73, 68, 63, 10, 45, 75, 56, 77, 66, 79], [37, 91, 18, 45, 35, 35, 66, 75, 82, 14, 88, 88], [16, 44, 53, 11, 41, 41, 44, 53, 19, 11, 3, 99], [80, 89, 67, 90, 58, 65, 9, 15, 76, 4, 43, 8], [39, 51, 95, 87, 68, 88, 84, 27, 15, 77, 95, 84], [54, 67, 79, 17, 81, 4, 18, 10, 37, 96, 15, 42], [19, 49, 6, 4, 37, 50, 43, 83, 89, 44, 74, 21], [75, 19, 30, 32, 20, 67, 1, 85, 3, 31, 76, 78], [94, 25, 26, 97, 28, 74, 96, 81, 36, 33, 21, 25], [19, 72, 42, 88, 41, 20, 1, 18, 92, 5, 82, 18]],), (14,12,16,19,[-88, -82, -78, -72, -70, -54, -32, -32, -10, -8, 8, 14, 16, 22, 26, 26, 28, 30, 34, 34, 62, 62, 76, 88],[[-96, -74, -68, -56, -40, -26, -22, -18, -6, -2, 6, 6, 18, 18, 20, 22, 26, 30, 32, 40, 52, 52, 70, 70], [-96, -92, -90, -90, -72, -70, -64, -52, -50, -44, -40, -32, -30, -28, -24, -18, -16, -4, 14, 18, 28, 36, 50, 70], [-96, -62, -60, -54, -52, -40, -36, -2, 6, 6, 6, 8, 12, 14, 18, 34, 36, 44, 62, 66, 66, 78, 86, 88], [-90, -78, -64, -58, -56, -50, -40, -32, -32, -12, 0, 0, 16, 18, 26, 28, 30, 38, 40, 44, 48, 72, 84, 98], [-88, -46, -34, 0, 10, 12, 16, 20, 26, 38, 48, 48, 50, 60, 60, 62, 66, 72, 72, 74, 84, 88, 94, 98], [-96, -94, -88, -80, -76, -66, -62, -36, -20, -16, -6, -6, -2, 0, 0, 18, 20, 24, 36, 40, 72, 76, 86, 98], [-66, -52, -44, -32, -28, -20, -6, -4, 10, 18, 22, 24, 26, 38, 40, 44, 44, 48, 48, 58, 84, 90, 94, 94], [-86, -78, -54, -52, -46, -38, -34, 14, 24, 26, 34, 34, 40, 46, 50, 50, 62, 72, 72, 82, 84, 86, 92, 94], [-98, -84, -70, -68, -66, -60, -28, -10, 4, 10, 16, 34, 34, 44, 46, 48, 52, 56, 56, 56, 60, 84, 84, 88], [-96, -92, -82, -80, -76, -54, -52, -46, -46, -30, -26, -26, -20, -16, -10, -10, -4, 26, 30, 32, 34, 78, 78, 86], [-92, -90, -76, -64, -50, -48, -46, -42, -36, -30, -24, -20, -14, -4, 12, 16, 22, 30, 40, 40, 48, 60, 86, 92], [-86, -82, -72, -46, -46, -42, -34, -34, -22, -20, -20, -14, -10, -2, -2, 28, 50, 50, 52, 58, 78, 80, 84, 94], [-92, -90, -74, -64, -64, -56, -52, -50, -46, -46, -32, -26, -22, -4, -2, 10, 16, 32, 34, 38, 58, 58, 60, 86], [-94, -88, -66, -58, -56, -50, -42, -30, -28, -24, -22, -12, -10, -8, 0, 16, 24, 26, 30, 38, 44, 52, 80, 98], [-98, -82, -74, -64, -60, -52, -48, -38, -36, -24, -20, -20, -18, 26, 26, 36, 44, 44, 50, 50, 54, 78, 80, 96], [-84, -68, -66, -62, -60, -52, -50, -40, -36, -28, -8, -6, 2, 18, 26, 32, 42, 50, 62, 66, 68, 72, 80, 98], [-92, -90, -82, -72, -72, -58, -54, -40, -38, -34, -28, -22, -6, -6, 0, 0, 2, 6, 18, 44, 68, 70, 72, 74], [-92, -64, -64, -60, -58, -52, -50, -12, -8, -8, -4, -2, 14, 14, 16, 18, 22, 28, 38, 38, 42, 66, 90, 90], [-72, -70, -68, -56, -42, -40, -38, -32, -32, -22, -20, -20, -10, -10, 0, 24, 24, 34, 72, 80, 88, 92, 94, 96], [-84, -80, -58, -38, -32, -30, -16, -14, 4, 10, 10, 14, 18, 20, 24, 26, 30, 34, 36, 40, 58, 70, 72, 92], [-88, -78, -68, -66, -50, -42, -36, -36, -18, -14, -10, -6, -6, -2, 2, 6, 16, 18, 40, 68, 72, 76, 86, 94], [-82, -70, -64, -56, -52, -32, -10, -4, 8, 16, 28, 40, 46, 56, 56, 58, 66, 68, 70, 74, 76, 80, 80, 86], [-98, -90, -80, -78, -76, -74, -72, -64, -62, -42, -30, -14, -8, 2, 12, 24, 42, 44, 72, 74, 76, 94, 94, 98], [-94, -90, -86, -82, -58, -50, -44, -20, -18, 0, 18, 26, 36, 38, 44, 50, 52, 54, 56, 64, 68, 78, 82, 86]],), (16,21,17,18,[0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1],[[0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1], [0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0], [0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1], [0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1], [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0]],), (24,26,24,21,[4, 8, 8, 16, 22, 23, 28, 32, 38, 45, 48, 50, 52, 54, 55, 64, 70, 75, 75, 76, 83, 87, 88, 89, 94, 94, 95],[[1, 3, 5, 8, 8, 16, 16, 18, 19, 26, 28, 33, 33, 35, 35, 41, 42, 43, 47, 51, 65, 66, 73, 84, 87, 95, 99], [1, 3, 3, 21, 26, 29, 31, 40, 40, 43, 51, 53, 54, 62, 62, 65, 74, 75, 77, 77, 79, 81, 81, 84, 84, 92, 95], [7, 9, 10, 12, 13, 14, 19, 27, 30, 44, 46, 47, 51, 53, 58, 59, 65, 73, 78, 84, 84, 86, 88, 91, 92, 98, 99], [5, 15, 15, 21, 24, 25, 31, 34, 47, 53, 53, 58, 60, 60, 69, 74, 75, 75, 76, 78, 79, 81, 86, 87, 88, 91, 97], [5, 16, 19, 20, 22, 25, 32, 37, 37, 40, 43, 46, 50, 55, 56, 58, 59, 60, 61, 64, 67, 72, 85, 88, 91, 91, 96], [5, 6, 10, 14, 16, 19, 22, 25, 26, 31, 38, 41, 43, 45, 52, 56, 59, 66, 69, 78, 82, 87, 87, 88, 89, 92, 99], [3, 11, 15, 18, 22, 25, 31, 37, 37, 38, 38, 44, 47, 50, 51, 52, 68, 70, 78, 81, 83, 84, 89, 90, 95, 95, 98], [3, 6, 8, 10, 13, 21, 22, 22, 22, 22, 23, 26, 33, 42, 49, 49, 50, 66, 72, 73, 75, 78, 83, 84, 92, 93, 99], [8, 10, 11, 16, 17, 26, 32, 45, 52, 53, 53, 63, 64, 65, 69, 71, 72, 72, 74, 77, 81, 82, 87, 94, 96, 96, 96], [3, 4, 8, 11, 21, 25, 26, 31, 33, 35, 35, 38, 42, 43, 48, 50, 50, 61, 62, 63, 67, 67, 70, 79, 80, 84, 97], [2, 14, 15, 16, 21, 30, 30, 32, 32, 40, 41, 41, 42, 45, 45, 46, 46, 52, 61, 63, 78, 79, 80, 81, 86, 93, 97], [4, 5, 5, 6, 7, 16, 16, 18, 20, 22, 23, 28, 30, 35, 38, 43, 63, 67, 72, 77, 82, 85, 85, 87, 87, 91, 92], [4, 8, 10, 11, 27, 30, 31, 39, 47, 49, 52, 62, 67, 69, 71, 71, 72, 75, 79, 79, 80, 84, 84, 87, 95, 95, 99], [16, 17, 21, 24, 26, 32, 43, 43, 46, 49, 53, 56, 64, 72, 81, 82, 85, 85, 90, 90, 92, 92, 93, 95, 95, 97, 99], [4, 4, 6, 12, 12, 13, 16, 26, 31, 31, 35, 40, 40, 50, 51, 54, 56, 57, 60, 62, 64, 64, 86, 90, 91, 99, 99], [13, 13, 16, 17, 18, 20, 21, 21, 23, 24, 25, 25, 27, 32, 33, 34, 45, 45, 64, 76, 77, 78, 78, 83, 88, 90, 97], [2, 4, 5, 6, 6, 11, 17, 18, 35, 36, 42, 52, 52, 54, 55, 57, 58, 70, 70, 72, 81, 86, 87, 87, 89, 97, 99], [2, 5, 5, 10, 10, 13, 25, 27, 29, 29, 29, 30, 42, 48, 48, 52, 56, 57, 62, 64, 65, 66, 68, 76, 85, 89, 91], [7, 15, 27, 32, 40, 44, 49, 49, 63, 65, 67, 69, 70, 70, 71, 71, 73, 74, 80, 84, 84, 85, 88, 89, 92, 95, 97], [4, 9, 10, 14, 27, 30, 30, 36, 37, 38, 39, 41, 44, 45, 46, 50, 52, 60, 62, 63, 68, 76, 77, 81, 82, 88, 94], [5, 6, 9, 10, 11, 19, 24, 26, 30, 31, 34, 46, 47, 54, 56, 56, 59, 62, 66, 71, 79, 87, 89, 90, 92, 99, 99], [3, 5, 6, 6, 15, 21, 23, 28, 32, 50, 50, 56, 65, 66, 75, 76, 82, 85, 85, 87, 88, 90, 93, 94, 97, 97, 99], [10, 13, 13, 15, 16, 19, 21, 26, 30, 51, 55, 59, 60, 61, 63, 66, 67, 77, 77, 83, 87, 89, 89, 90, 92, 97, 99], [8, 10, 10, 11, 12, 13, 16, 25, 31, 33, 34, 36, 36, 44, 48, 58, 62, 67, 73, 75, 76, 80, 84, 89, 91, 96, 98], [10, 12, 22, 25, 28, 29, 40, 41, 42, 47, 48, 50, 55, 58, 62, 72, 72, 72, 76, 79, 81, 82, 85, 94, 95, 98, 99], [4, 5, 6, 7, 9, 15, 22, 23, 26, 27, 31, 33, 34, 37, 47, 52, 52, 54, 54, 56, 63, 72, 84, 91, 92, 99, 99], [17, 18, 22, 25, 31, 36, 36, 36, 36, 37, 42, 45, 46, 51, 51, 62, 68, 73, 83, 87, 88, 90, 91, 92, 95, 96, 97]],), (7,7,7,7,[-56, -66, -60, 94, 44, -92, 18, -26, -88, 46, -24, -8, -46, 78],[[32, -72, -76, -6, 4, -42, -82, -6, -52, 24, 88, 8, 78, 82], [-20, 18, -68, 48, -64, 40, -26, 22, 80, -52, -98, -28, -6, -76], [-68, 20, -52, -90, -78, 96, -20, 56, -28, -88, -80, 60, 30, 38], [-12, 58, 48, 58, -78, 14, -36, 82, -66, -52, 36, -26, 90, -90], [-76, 24, -46, -2, -76, -62, -50, -64, 72, -52, -62, 84, -20, 12], [-66, -8, 40, 20, -56, -42, 90, 32, 40, -8, -28, 78, 76, -78], [-82, 38, 28, -26, -72, -96, -60, -66, 28, 94, 10, -30, 24, -90], [66, -14, 24, 80, -38, -4, 52, -94, -40, 26, 6, 58, 40, -74], [72, 78, 62, -40, -30, -4, -82, 66, -32, 6, -72, 0, 56, 42], [74, 62, 16, -4, 36, -38, -30, -18, 32, -76, 12, -52, 40, 98], [-88, 52, -10, 96, 12, 68, -12, 86, 4, -84, -54, -90, 92, 54], [68, 44, -30, -90, 52, -96, -44, 48, -80, 2, 12, 24, 58, -74], [-78, -24, 86, 14, -76, 46, 82, 14, 6, -10, 56, -70, 20, 80], [80, 38, 10, -76, -82, 26, 32, 74, 6, 76, 14, 88, 24, 90]],), (35,35,33,22,[0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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]],), (8,5,8,6,[80, 95, 34, 51, 95, 68, 55, 65, 60],[[32, 76, 68, 57, 32, 74, 11, 94, 55], [53, 76, 86, 95, 82, 62, 51, 37, 84], [73, 35, 43, 64, 94, 53, 79, 61, 20], [25, 5, 34, 35, 84, 44, 76, 20, 21], [18, 60, 47, 2, 26, 24, 80, 29, 63], [76, 15, 47, 88, 50, 90, 57, 10, 14], [84, 17, 77, 25, 28, 1, 6, 19, 15], [22, 10, 30, 53, 32, 83, 28, 49, 62], [73, 75, 57, 84, 1, 93, 80, 44, 55]],) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { Map < Integer , Integer > mp = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( mp . containsKey ( arr [ i ] ) ) { mp . put ( arr [ i ] , mp . get ( arr [ i ] ) + 1 ) ; } else { mp . put ( arr [ i ] , 1 ) ; } } int max_count = 0 , min_count = n ; for ( Map . Entry < Integer , Integer > x : mp . entrySet ( ) ) { max_count = Math . max ( max_count , x . getValue ( ) ) ; min_count = Math . min ( min_count , x . getValue ( ) ) ; } return ( max_count - min_count ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,23,24,39,53,55,57,59,60,68,87}); param0.add(new int[]{-76,46,50,90,-98,98,8,-14,24,-70,-86,-44,-88,-60,76,-16,-24,24,52,-94,-44,-76,60,-12,-70,10,90,70,64,-4,-88,28,62,74,-30,64,-78,-54,14,62,40,76,-26,26}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{61,48,24,48,26,49,90,88,55,4,49}); param0.add(new int[]{-94,-80,-76,-72,-66,-62,-62,-60,-58,-48,-46,-42,-30,-20,-12,0,8,22,30,36,52,58,64,64,66,66,70,74,78,84,84,92,94,96}); param0.add(new int[]{1,1,0,1,1,1,0,0,0,0,1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,1}); param0.add(new int[]{4,9,20,22,24,29,30,34,51,54,55,60,76,94,99}); param0.add(new int[]{2,46,72,0,60,32,24,-12,-54,86,-78,8,10,22,98,4,-56,-94,52,30,16,-14,80,96,22,86,6,-34,92,-50,0,-6,16,32,58,-74,-16,-70,-88,70,-16}); param0.add(new int[]{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}); param0.add(new int[]{76,63,32,60,35,16,36,56,30,32,79,21,56,40,93,54,30,89,20,74,95,1,74,18,57,59,13}); List param1 = new ArrayList<>(); param1.add(7); param1.add(37); param1.add(19); param1.add(6); param1.add(30); param1.add(33); param1.add(11); param1.add(22); param1.add(33); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hm; for ( int i = 0; i < n; i ++ ) hm [ arr [ i ] ] ++; int max_count = 0, min_count = n; for ( auto x : hm ) { max_count = max ( max_count, x . second ); min_count = min ( min_count, x . second ); } return ( max_count - min_count ); } int main() { int n_success = 0; vector> param0 {{2,3,23,24,39,53,55,57,59,60,68,87},{-76,46,50,90,-98,98,8,-14,24,-70,-86,-44,-88,-60,76,-16,-24,24,52,-94,-44,-76,60,-12,-70,10,90,70,64,-4,-88,28,62,74,-30,64,-78,-54,14,62,40,76,-26,26},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{61,48,24,48,26,49,90,88,55,4,49},{-94,-80,-76,-72,-66,-62,-62,-60,-58,-48,-46,-42,-30,-20,-12,0,8,22,30,36,52,58,64,64,66,66,70,74,78,84,84,92,94,96},{1,1,0,1,1,1,0,0,0,0,1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,1},{4,9,20,22,24,29,30,34,51,54,55,60,76,94,99},{2,46,72,0,60,32,24,-12,-54,86,-78,8,10,22,98,4,-56,-94,52,30,16,-14,80,96,22,86,6,-34,92,-50,0,-6,16,32,58,-74,-16,-70,-88,70,-16},{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},{76,63,32,60,35,16,36,56,30,32,79,21,56,40,93,54,30,89,20,74,95,1,74,18,57,59,13}}; vector param1 {7,37,19,6,30,33,11,22,33,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, WAYS_TRANSFORMING_ONE_STRING_REMOVING_0_CHARACTERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WAYS_TRANSFORMING_ONE_STRING_REMOVING_0_CHARACTERS{ static int f_gold ( String a , String b ) { int n = a . length ( ) , m = b . length ( ) ; if ( m == 0 ) { return 1 ; } int dp [ ] [ ] = new int [ m + 1 ] [ n + 1 ] ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = i ; j < n ; j ++ ) { if ( i == 0 ) { if ( j == 0 ) { dp [ i ] [ j ] = ( a . charAt ( j ) == b . charAt ( i ) ) ? 1 : 0 ; } else if ( a . charAt ( j ) == b . charAt ( i ) ) { dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + 1 ; } else { dp [ i ] [ j ] = dp [ i ] [ j - 1 ] ; } } else if ( a . charAt ( j ) == b . charAt ( i ) ) { dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i - 1 ] [ j - 1 ] ; } else { dp [ i ] [ j ] = dp [ i ] [ j - 1 ] ; } } } return dp [ m - 1 ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""abcccdf""); param0.add(""aabba""); param0.add(""aabsdfljk""); param0.add(""IONiqV""); param0.add(""9667771256770""); param0.add(""10001011""); param0.add(""fczbDtMDT""); param0.add(""298746088""); param0.add(""01100011000""); param0.add(""Qk""); List param1 = new ArrayList<>(); param1.add(""abccdf""); param1.add(""ab""); param1.add(""aa""); param1.add(""XKbBiGZ""); param1.add(""50915176""); param1.add(""01""); param1.add(""FbX""); param1.add(""29888""); param1.add(""0""); param1.add(""""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : n = len ( a ) m = len ( b ) if m == 0 : return 1 dp = [ [ 0 ] * ( n + 1 ) for _ in range ( m + 1 ) ] for i in range ( m ) : for j in range ( i , n ) : if i == 0 : if j == 0 : if a [ j ] == b [ i ] : dp [ i ] [ j ] = 1 else : dp [ i ] [ j ] = 0 elif a [ j ] == b [ i ] : dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + 1 else : dp [ i ] [ j ] = dp [ i ] [ j - 1 ] else : if a [ j ] == b [ i ] : dp [ i ] [ j ] = ( dp [ i ] [ j - 1 ] + dp [ i - 1 ] [ j - 1 ] ) else : dp [ i ] [ j ] = dp [ i ] [ j - 1 ] return dp [ m - 1 ] [ n - 1 ] "," using namespace std; int f_gold ( string a, string b ) { int n = a . size ( ), m = b . size ( ); if ( m == 0 ) return 1; int dp [ m + 1 ] [ n + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 0; i < m; i ++ ) { for ( int j = i; j < n; j ++ ) { if ( i == 0 ) { if ( j == 0 ) dp [ i ] [ j ] = ( a [ j ] == b [ i ] ) ? 1 : 0; else if ( a [ j ] == b [ i ] ) dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + 1; else dp [ i ] [ j ] = dp [ i ] [ j - 1 ]; } else { if ( a [ j ] == b [ i ] ) dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = dp [ i ] [ j - 1 ]; } } } return dp [ m - 1 ] [ n - 1 ]; } int main() { int n_success = 0; vector param0 {""abcccdf"",""aabba"",""aabsdfljk"",""IONiqV"",""9667771256770"",""10001011"",""fczbDtMDT"",""298746088"",""01100011000"",""Qk""}; vector param1 {""abccdf"",""ab"",""aa"",""XKbBiGZ"",""50915176"",""01"",""FbX"",""29888"",""0"",""""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('abcccdf','abccdf',), ('aabba','ab',), ('aabsdfljk','aa',), ('IONiqV','XKbBiGZ',), ('9667771256770','50915176',), ('10001011','01',), ('fczbDtMDT','FbX',), ('298746088','29888',), ('01100011000','0',), ('Qk','',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MARKOV_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MARKOV_MATRIX{ static boolean f_gold ( double m [ ] [ ] ) { for ( int i = 0 ; i < m . length ; i ++ ) { double sum = 0 ; for ( int j = 0 ; j < m [ i ] . length ; j ++ ) sum = sum + m [ i ] [ j ] ; if ( sum != 1 ) return false ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new double[][]{new double[]{ 0, 0, 1 }, new double[]{ 0.5, 0, 0.5 }, new double[]{ 1, 0, 0 }}); param0.add(new double[][]{new double[]{ 0, 0, 1 }, new double[]{ 0.5, 0, 0.51 }, new double[]{ 1, 0, 0 }}); param0.add(new double[][]{new double[]{ 0, 0, 0.9 }, new double[]{ 1, 0, 0.1 }, new double[]{ 0, 1, 0 }}); param0.add(new double[][]{new double[]{}}); param0.add(new double[][]{new double[]{ 0, 1 }, new double[]{ 0.9, 0.1}, new double[]{ 0, 1}}); param0.add(new double[][]{new double[]{ 1 }}); param0.add(new double[][]{new double[]{1800.5208165864472,5129.668497755772,4091.578454432755,9520.788540775387,9012.789443327169,5479.787317916788,4846.101760095075,9310.645104102381,6862.485564868333,6537.037513320974,7943.016882755804},new double[]{8081.404685413337,2775.350842660207,3624.18060172129,320.5505410412923,896.5298358859519,9778.851990348234,8093.842945978867,5513.194168934705,3238.213662532161,2068.183825530009,8922.404213665432,2564.415908565606,9541.992473376376,3500.695185589028,7425.292941600525,1035.1769706476443,1993.3236514377372,7516.6428866994665,7036.757321520528,4521.722941224576,6046.954992856951,1480.947630193744,2468.314968942801,6721.875264461492,729.3668691453537,7013.1702771055125,620.7860776027774,4073.8164568995426,6637.935131989998,4970.880129282128,8491.291538095455,6017.257595728452,8758.321951108288,7450.774705441449,2430.104778991052,7653.421788466134,9867.846002930755,9025.832543077806,3130.4709292949738},new double[]{4092.6187809701687,3682.191052666517,6210.3251142981435,7559.705041866003,8083.3992753238235,7027.888848387021,322.813354455147,6396.660665360345},new double[]{6712.595190644637,3351.7854488023168,3596.9007070939974,7383.906373292954,6925.055360334225,6564.096130017967,9810.727474966703,1812.3875023392943,7582.083184537618,6792.011378435494,6737.106729773401,5165.155358877282,7694.499267616087,3564.5292718018964,8125.369501443796,7515.428339325206,3373.5371602639975,8145.31715886053,6297.6183870619725,489.2402023933884,9562.673985208492,6553.732669130852,7196.924911915597,9239.272829887721,5855.3831715786055,9570.600140348652,6684.3117497126605,9977.065074407292,9210.767097725591,3456.1818868411087},new double[]{4472.26489764256,7298.311171623871,6184.798212074516,5645.069795561799,9113.123076453292,5537.618956455394,2142.794697171854,8370.190271064876,5972.2448507765475,6299.8293468991715,7388.052824286836,735.079089195314,4216.330577355761,928.9766117855969,1935.1190718709943,5606.352487792576,9764.404560908582,5301.250390178857,2250.0545430370357,8159.5544835139635,1327.0903534461743,7505.6753057440255,9918.714694238013,8827.139931812451,1859.1883736005789,8018.161213209266,7984.370920859778,288.30827861459517,1461.0614788611754,2690.173572057434,8427.499467578928,4724.15901701013,4457.387382560547,9993.904502656509},new double[]{2842.9663139830186,8957.4584498927,8686.31672019927,4832.99654565389},new double[]{1477.392902127036,7189.591229360169,8822.61208105902,4851.411807703794,9600.384550545641,5836.4581179869165,2366.7307632417446,9442.85367113618,9848.096373489492,3805.2945900367695,2741.21016804169,7787.421240650287,5163.029236960128,3839.164193518556,8999.926058466983,5787.032859796697,7669.921381103829,7893.275228211627,1051.182564195985,7017.888839448166,5215.123486606644,5208.568127672256,1134.2054935790945,7573.233029924398,6060.282198006302,1395.7596136070006,3653.7960603925126,244.94506756705502,3594.7042035479526,6272.774300983842,4043.3735550683537,2274.103544548338,4022.0181987353485,9109.556771757481,4286.57480001852,6721.662297331347,6105.99828625709,8758.359235513371,1658.875171187041,2024.5696201552444},new double[]{5912.554579767912,5341.080476025451,4305.59603125092,9800.436262778925,8097.160534980595,493.9680676037761,4047.191664109233,6070.216899309564,5697.682730828276,9448.806800500452,7698.114392101278,7020.216498152797,7091.797827878821,3273.5516687760546,3685.5162670409804,2210.2161977720316,7182.207804931318,3265.217158812098,1798.8408452362914,9318.266496779846,2859.486203159565,4314.215039310549,8313.026936365693},new double[]{8911.686558511605,5660.199086800985,6475.525180381277,4040.3172648744144,5708.611042449874,9524.099373256367,7030.627120796817,783.4145757917787,9713.798324426925,5284.149579386235,986.5900188717991,2567.146044707662,2034.3874533234496,7853.582414512236,5610.18808118777,9372.679297083534,1227.8195252860025,8558.328099907549,5800.797131024546,1345.9810037159548,8059.092655056248,1007.7145561634637,1867.8280914974055,8073.000957658564}}); param0.add(new double[][]{new double[]{9784.847472945596,1467.4849690692215,326.01056399299114,3577.1820356491303,3413.7335834614014,5621.398199278954,75.70726246875714,3072.65108747655,7278.353400799695,4703.166022097605,9423.746532838595,9651.338090892916,7908.363875282913,2112.03821823538,1975.7721197648048,1044.0925741602891,8579.267990348524,3350.769942053501,5299.788699272214,7928.710248719408,8396.62857032498,3836.1908586465343,8012.249410750618,7828.91833852811,1917.7798073113083,5120.386576342888,3678.786128839827,4600.911873999521,9497.461077450645,3000.203085004004,7858.544769795873,8325.214884003173,2451.061402910233,647.2264467569499,7282.170138249182,2285.3064693716783,5922.10840378214,6916.751327338277,7063.312743282037,6645.4394853366075,5500.794550321606,7493.492320906113,7206.786508904741,2686.298332703524,2538.8761292983,7253.98778369984},new double[]{4241.304996916518,483.6596378334046,2763.9580150656075,1405.7652499741057,258.3758368726019,6614.609227113464,2961.514732472338,9474.777783117728,2912.5365535711267,5242.8884354914,2501.548861500482,6531.229223937745,4140.476002883762,132.56892540437048,3020.289197641887,5554.185397774308,8773.09782632125,5011.890905582158,8392.625753242448,7800.7407071334765,4421.736562443395,52.49756244802284,7333.792465191643,1840.7462281638009,7908.087535935016,3036.262276198375,3509.2829531181924,7645.618711034763,5397.717763289013,3243.612078360748,34.14499888319544,3384.2995707615296,4853.062855850027,2223.4821740514067,7479.5354594110395,5969.120408179362,5192.807647536894,3509.0771162909696,7334.4495826109105,4987.315435971069,6816.016561595986,442.4714082796233,65.9273693936524,9593.436472709476,2670.0620305702496,4952.745706389296,6867.130101433143},new double[]{1926.3801797530411,4684.089278792868,1544.945305609513,712.4317947088488,6354.9413872948935,2717.619315479798,6846.354537398023,3775.3936214538207,6375.903394134439,1363.1538350088424,2277.399819529351,4091.6667790722695,3659.9052193584657,3149.203276820165,7595.555393770957,5372.782288919421,8515.657623246656,3159.662631217324,4043.737445094111,1842.2411676778072,9713.005101273826,2832.78160742499,4589.20341066574,9043.00917767472},new double[]{3498.6444148809305,2140.852698797143,4510.872710314036,2990.179189617128,7420.541642401762,1033.9572862948598},new double[]{2794.437679786802,3463.1871053331233,9732.829396187464,663.0832249897201,5276.910560721226,481.59416166211446,2090.2478003682513,4558.692561388009,8758.39373387397,4610.715817786542,9921.398649289273,1682.6982416319624,3585.6795224563066,3977.0601543964967,9993.300034767055,8757.889303531827,1287.4604767598673,9265.34884519963,9590.296620414523,3376.6132678108816,795.8613040403706,6807.576250770766,6498.575499062116,3521.0998180866904,818.8610607244495,1889.8998767199425,3567.5388991226396,3904.860163650392,7927.945627565823,5684.632085876909,2665.280318592044,3200.1780479713084,4080.5659548739804,4423.8860644441,2026.9544154357254,6542.038761607715,371.810846991496,9089.128291277799,7033.856907920886,1925.889920294268,7735.925631486304},new double[]{650.8667327357808,4738.836852826164,3985.4301749766173,1955.6572393313954,3810.217150006002,8241.6067168621,2457.8677884976973,5043.061693161945,4098.220705621862,8311.523429129516,2613.3577094067405,8951.447431099867,3413.493711945631,195.07449236425666,3526.5261452758646,5987.082440383985,7672.683285206186,8940.181891567034,8715.378318384124,1609.9269146079098,5147.181463101181,3305.462535094599,9965.648218377532,3910.7964252545266,8068.070848658828,4992.46105696117,116.74465555125413,3636.501190685493,6298.365303023811,758.4342724419646,9850.35171473097,6154.099626143185,6627.416733525318,2147.4459586732773,4542.271637456006,6116.269798885344,1404.5680346185973,5378.69792918011},new double[]{283.30445322594545,1212.7329453006353,6176.516523951887,7361.713020934436,446.2529292320283,3573.9634384317155,2866.7667140384456,716.9415721666761,2066.5957334633813,8494.234070043816,6193.876480036603},new double[]{2136.416496948584,4757.490297134756,1761.236114129905,9672.92860361088,292.470289758332,2616.287787938537,2448.153310489565,8852.291381698386,9393.592818697269,1859.3755772816644,7576.3934917486795,2082.9223147752805,2503.5367105046867,6532.795825292272,9756.064172800725},new double[]{2016.9598997834726,9246.468446682007,7917.631622499911,7530.075198225538,1619.9210624035043,8192.289210321009,111.78933513454669,1304.2859282076513,752.9875736889525,805.8026634404869,3551.4066295443845,5397.733935371496,4669.6567467481555,4794.75142820851,4543.875056844882,3805.9629250337543,5742.679148326456,3813.8720700893437,5210.151412919032,5556.602949642819,2200.424210202666,5908.92594615778,13.819841484519202,1329.454109503373,3028.833109958248,8592.293540323464,9978.59670979421,3605.121961455566,5381.409564276148,1891.7229437227568,625.9300378157828,2758.668754886496,6051.709933922486,6457.36281514481,5548.754777623672},new double[]{8850.151741072603,6337.421968969598,6419.680943286824,9156.134838807471,8322.880320938539,5346.094263229739,8840.13035584083,4662.998040082982,5049.325678804513,6885.637071688473,4883.744421558373,2324.765558938434,995.0281814899331,4461.416494281927,9543.834187148504,784.6027172885606,4558.569173648864,7373.848141952878,9152.707277929396,3448.6407116186224,3753.543292707031,4293.096821412292},new double[]{1409.0526006258365,816.3081240623837,2140.41426162899,728.4924219143152,2193.525472941873,4035.7606724635307,6500.846781261058,5527.736115595666,2134.0180018693986,6779.435167553661,1806.1545644495725,9627.301890803697},new double[]{2371.0568858922543,3268.660813251466,1707.0991863723361,5378.8673760312895,4595.50873089922,2635.8908557704995,691.8444475043295,1624.4384043918103,8928.107824993145,6825.313895904731,8182.165500835241,2451.226122788347,7782.688704839678,6441.579872434251,4321.009439314746,4899.256098629653,5519.087620918876,45.86639299398176,429.87376466871564,6270.117082341795,6415.83724491815,590.2483422808136,2744.8282476562367,3286.420684963404,9655.583401408132,5203.85048223821,8915.078884333285,2608.1519486714988,886.3789741564909,6130.506796586644,6650.901924046862,6646.892160204216,3289.49925972008,5166.474954280374,6759.760310020064,5274.430205929131,5227.164076346812,8287.373511433061,8205.14217850992,3862.4949439064203,7981.66493597097,3621.863491818439,1773.8539613657788,7194.120248679593,6717.104192113617,9016.56618386249},new double[]{4918.488645705508,4863.9376793380325,7980.4716752546,8867.75386799514,7286.076902807735,6413.32763495569,7345.819132709017,610.4954669263795,6823.681549442864,1375.05106487004,5238.380502512437,2773.5771144536634,1491.8279295443392,7856.576929303261,6541.511110001304,9898.82817639193,2431.5435459289947,2730.7902667354133,9195.287603503173,6925.56268238798,5431.128027542276,8702.555149921645,6465.507768740284,9314.270576749725,6272.806736480676,3446.023537244589,6842.356648227475,5788.729554244277,1502.222414850204,5144.345936259722,6576.536519145917,2388.5817800660634,9895.843552802167,8863.44954106686,8659.39270167813,6782.724020047004,6901.026465987045},new double[]{9835.349971287455,1349.9943677780557,9305.006231475043,7682.072854084074,7772.435685418998,6457.172433005703,2271.0896412754787,147.3581960989412,5040.667292338796,5347.141489987937,3007.9371262367195},new double[]{6024.724622587527,1333.55102363379,7543.244958334469,9460.475824602792,5402.777961971936,8618.077786578586,7680.609290490088,5356.651624620611,3081.6630316517667,9965.820175569215,7449.902533219914,2376.8033440694426,2121.6403598925017,5899.797061644942,8738.967016335799,6819.82087022954},new double[]{3658.3990216338057,5939.885133721119,6112.535663798665,4603.757105062263,3601.7182918941257,2699.3894158179332,7634.713427911456,1785.935936680989,6282.120568441831,5216.58891069557,5607.715652949593,5173.8490353923025,7091.689227700492,7231.192245003612,8164.945945372898,691.0808086432995,8884.363372959273,880.702711513005,2983.6539638181393,7041.501334247409,2686.9984210291477,6039.4806880060305,4397.578815778263,4727.811059409236,8382.722608048367,9206.150345275291,172.2170912991472,2020.4702767795213,5489.448690729701,2451.26584431948,3295.4350676203826,4629.077813268916,343.6354616846271,5913.229158529008,2178.835131759951,8464.236722574358,598.6751867838647,1890.7273951970649,9233.763123524577,3511.4462447810624,7198.449866811291,7009.77653163331,8249.84422453666,4282.457347563149,2271.24825809504,5764.120163554731,5765.436670299819,8908.501071223765,2586.0376485095303},new double[]{4178.517530004291,8230.813420124246,1482.5779208939982,9884.823630994786,7654.976401516819,7172.9744832796405,6743.457935859208,2332.0202265026755,6512.820966135465,7899.27033659936,6446.637651589306,3660.9711365100516,6983.0340219305535,8514.370249450678,1743.2333221598017,5103.440073973708,9266.372786086862,4118.043957388042,5646.298272664013,5981.854812259621,3200.6662612242185,6635.177996178426,9679.83767911182,3226.414516089032,9037.63040871817,1667.244125906292,437.75555568785876,8080.445197603589,7182.504146702597,8450.080668876279,5837.320531337393,375.1630048786392,6609.658242430057,4138.324209656617,4978.355962743171},new double[]{6943.097108273823,8155.800311882496,881.1561722205652,6892.581313027855,8870.412782607324,8669.932116289347,570.9050959816841,3403.556267239408,6454.311530504761,1789.7908209345858,7910.710586936548,5812.846543860358,6168.21145124294,2131.0842431388164,2770.4029575820955,1574.8495056694844,8538.95214350614,3406.107386087113,2908.900240552177,9882.928919376212,2844.4878840063193,43.21457208309343,7278.594953930636,9356.662142497536,6209.878587941289,3990.0985725352966,414.3501395268456,8619.011907510358,6999.1215509988015,2882.9851019850194},new double[]{9844.923038076766,6980.156846171918,3950.1442565126367,3157.4009365459556,5223.187529515773,4385.453833112532,5325.893429872211,3353.2248195726265,2442.165605224922,3655.8385765512303,3898.449238531656,8850.04098103363,6831.015148578976,4445.821672553541,9928.380860823137,9561.952605608369,1591.1130291936638,5403.707165706667,2275.6687548872,887.1665703941445,1270.6708733832606,15.351416031957887,6885.875136030228,9550.622085409022,769.7305357431617,4632.5188789504755,3118.15405662019,7553.524447042849,4528.6508356550885,6481.3993346127445,6479.947453700064,5346.224605722107,7272.600816935826,261.5836192208221,5155.049534248697,5501.689301147346,417.6298514208843,2176.1185299140107,6866.720403076896,2801.874422363495,6539.364493633207,2948.3952227572686,3413.699419210543,8937.812262772239,260.2567282196444,9974.652627956628,3607.8218449527135,4313.257989389619,5126.9798391913355},new double[]{6633.663300606726,1812.9942057781057,1654.7655510188663,8405.163469784291,1953.9035308876119,8957.383693535636,1421.2991902099047,9264.40639576394,8150.024375652974,2257.3830199676427,2479.3344627483484,4043.056101781555,9247.05324493969,7363.206663924256,8490.180569522778,2927.295097067805,3679.2436731106004,3838.815927824232,3115.4209839633218,7612.651962526704,7076.710446359618,825.7143449578574,9864.274122425695,9647.78655096705,7548.744154086509,9815.450355850051,8653.699152037381,4050.238822185216,5272.888444100065,6951.384129122965,1394.39534640736,7755.935683847396,5317.102211979815},new double[]{8829.674867773414,6689.896932346349,1968.0933078351115,4809.007582058182,6069.87219516547,9766.476615420386,8993.904574223372,281.1877463140244,5576.660306049759,7140.548946726968,2518.194869927194,2172.7143296254435,5507.955541433988,5420.491404996137,8394.755280403098,4012.132315372791,6389.889892691528,717.5893819573375,2875.0684389259386,5280.900234755885,8161.863197586057,3926.09778356536,7022.709269632878,106.07736204608864,2617.3249490483054,8109.0289788950895,4083.165322330473,5420.617161522736,4445.31100910545,9393.19511825442,176.7904030369116,514.69093147267,7614.2873289591125,6264.256156371076,1595.849249955039,4210.816847220884,127.47354248535902,9212.920824942166,2676.3018953846185,7651.925841175547,4176.854241193708,3254.032717531873,5064.677632904187},new double[]{2933.30773145417,7167.004460596055,6730.0751341762925,1612.3416038398664,9996.385398599057},new double[]{1469.1245592389023,738.4910375434861,5091.743233692105,4943.243843219373,8276.601429613058,2099.0155722034933,1123.1905308985645,8721.083497458614,9900.434613544232,7607.245058601638,5384.468994284775,7529.134743235198,6837.595578988219,4384.871356847701,63.287732870004334,2024.4193945797394,5173.262923609003,5685.6159554472,1043.3138744199034,6561.322154461737,5043.419149196029,1528.205177909735,8635.632452899306,6625.361243781218,1138.9370493081663,8600.196985866145,1988.3249787645564,2698.6573886862807,3376.856288948763,9380.474940630262,3444.5098538813136,7264.095443784668,9446.89932278781,8424.493192525451,9315.526779885298,1047.4543557980887,3662.6853228335076,3828.4452182545315,6635.496292334783,7667.419322235606,35.21225339409906,2963.565449291854,9156.290265259724,7727.156188255046},new double[]{8444.782911920447,1531.875281624423,1699.8134908798013,7098.064080652596,1705.6887525781183,4769.810129535693,4765.399059911866,3365.3409651977972,9969.592937121795,5626.5051907189345,9397.353074698978,3239.97430286867,3201.0073584794072,2131.5074414166947,5957.610797969433,1768.6186313252672,5616.852203640092},new double[]{5673.7710445882185,1647.625614019551,5656.936125270759,1461.1781245051013,6574.86009082487,6774.466975453835,3556.387873542125,6549.504662488484,886.9791309380082,3820.027258607421,5024.250405254414,3506.088366609631,2328.582902932946,3679.112881703358,3462.9919828067,3160.911388035562,1846.9062209575804,7117.953023727776,4143.612558015889,3572.534316888979,319.14170051129065,1991.6701484666844,4560.568775382851,8901.408228818616,6935.299537774818,8511.84810818133,3234.869691027137,1295.0435896601964,8851.889516538351,2489.8888199410617,2150.116130246351,4658.446390325435,5811.264860869128,685.8607919672866,5378.0726932806465,9702.618375935705,9289.55238058894,5269.520454210251,7499.026434764086,6002.394709230661},new double[]{5531.687229932249,5270.626911688324,6624.91325164783,9195.735161525663,9266.277822312304,9275.612244101923,8173.831391641886,1019.8131750228023,3540.52480573109,4983.413349807722,130.21910681093928,9770.440852859852,9084.150791955952,2173.294809269972,2626.817132323017,5925.181708485516,4528.1824472864855,8068.031788501554,3141.2705598953207,3367.1318650759276,4202.813507746614,4921.654402545408,6179.504202375986,405.8037182681518,9118.07199473433,2364.02187704932,7528.315731917878,938.6323242878248,4866.461999667605,9592.4230672652,7487.79868696995,8665.033290573028,2575.202765522496,6907.965979702926,9796.688661165712,9809.595158621196,141.61358495260566,2879.523431694646,9399.935781123395,8148.891111247624,6176.39610921895,5458.065535590684,9057.109293696058,4091.3715908046956,7455.832236582406,8438.475825901112},new double[]{9744.238368205903,7257.463958276382,3501.640602033552,5097.35039463446,8356.088347682142,1013.494789934316,7760.657819535339,2812.190929226328,2095.6075816074826,1500.6497868172942,1593.50863029047,7654.141363404645,3036.4929462046775,1264.0074125211331,7295.376768297045,4806.278483546197,7588.593079677283,862.8315269726494,9602.080432568271,8490.755890338718,6964.467603996281,846.0767010844494,3356.979090302684,8907.430974420711,2398.102582887749,4278.797398815162,830.7948679651822,2273.3942290608734,2275.2588065251434,2776.5976090708787,8490.43423277904,7033.653179624773,7101.244630276114,3462.954058628571}}); param0.add(new double[][]{new double[]{6241.900245829036,6667.025729021001,5691.351954033881,571.7284163476577,599.5121330777808,6243.463062193512,6717.298231363792,3608.7492690924137,9032.092398160055,5926.293767824268,6210.655170074396,4474.741994028476,1861.945257692308,1779.876008485327,5869.991094563328,5423.461312062491,1370.6862587942037,6873.167245632268,7649.546578266097,2351.8399326106596,1989.178556111051,422.20373285440036,2925.774069473833,6272.788011818715,8279.978442600892,5970.172054492473,6285.440742792799,7304.627499347196,372.4523079479392,2940.8339544890937,7317.6400210247875,5166.330426233502,8284.813081839371,4712.766186568946,7997.385423676035},new double[]{6452.611650019052,6533.207730947289,8807.075741968045,9613.017513620158,7551.372353415147,3814.9462465572815,3178.498657329026,807.6312013168241,629.477046023933,5989.092355191663},new double[]{1305.6504233275512,1205.5849470621283,2131.0955750784424,6257.637312213648,8633.528791950788,736.2226708854236,5119.414303257056,8804.172116612383,2288.600322833193,6674.881539883841,5432.169377077389,9984.06868017292,7926.301399413941,2449.424127914216,1688.0860689625322,260.6488247313743,1178.8654972754252,2073.6854863269373,5529.394205300341,7653.727965408834,569.9328536601145,1224.9369795814468,7797.080337878472,1005.767754018665,3090.0776894453675,455.9069614769562,9044.51867916772,1718.965140003418,6583.579031677243,4791.924601541926,7018.857860820445,9808.375188561504,1320.5685001544575,329.7136763666042,6342.892026874494,8972.682821764105,4668.29063954748,6946.344862709311,9805.303722784838,2973.069105760632,6985.874880236632,9545.021104493411,9719.80028292283,7198.598793755461},new double[]{5331.89188600143,3188.443349871333,221.02133512022948,880.68828138539,1515.4027709793838,7930.966870782095,9507.713752644831,4313.160757690817,3846.72384161552,1655.681262068367,55.170275874311116,2949.6754977555197,1910.1840751659095,4244.735303329609,8121.260273473295,3860.8176185770503,4750.489350886882,1467.6363234444666,465.8560983548199,4940.401342901576,5809.536778997865,4565.245203215682},new double[]{6828.767147722977,128.93271215892787,3797.8224655761874,8079.884381341665},new double[]{4517.275715047743,8940.097122408839,7281.039946934588,27.728369323011258,3740.264596087575,4874.93591726158,8043.314070462276,5166.097047074663,4925.980878654775,3648.0727223990084,3791.9876484136016,2912.2565199145156,3834.847575889263,1354.5777786291524,9765.026115064547,7549.4703666134255,1936.525418831999,1478.6811488485152,893.3329941262602,3586.843418684723,7367.442903319976,5813.70155527669,8396.79082639397,8247.306407746588,6074.220118587592,5634.113567301089},new double[]{7096.526417346024,7299.596512835649,6326.555025996232,3505.971650102451,4088.5960369402806,6348.481260870844,1022.4660759645033,6479.299624221714,8255.83540280519,5318.646177823633,385.5360954127318,1742.7901571985306,383.9634977990947},new double[]{8312.439822931368,7693.173653102019,9684.846018395066,5436.851517291458,2240.2570185572104,8549.76817377781,2863.1071822119657,2364.4898333606247,8387.6366465958,235.49213883719779,5635.75381122587,8824.638572201757,5855.982086624727,9390.895322287037,9729.264148554501,7581.889326800262,7539.671214598107,8212.126365277514,3414.4707187305257,2186.9037265717116,148.32911299373586,3907.974409916858,1171.2309102908814,8222.6799813232,9643.24040317058,8560.840012204286,8605.631358897996},new double[]{2080.1073040550423,2877.2637236850574,3818.077902160524,2477.6928693570053,7555.588606535247,3270.181723572487,4332.255274782373,6344.623935872137,7847.221150939287,1112.3530198820374,6944.858605401434,8337.745136833113,5061.397976451156,9552.075051082322,203.72691830435886,1225.1921990053638,3211.0942488406326,1276.8268581899101,7670.342953764469,4181.706551221689,1406.5485053574666,7060.566377790574,25.700288190759757,8334.288430677061,2867.655518166218,9739.933759812533,310.29910419946293,2246.3458997758767,8825.811097236192,8480.717272229293,8484.35331937365,9453.101358520635,5368.758902198425,6711.186412720251,4527.55608166248,9086.130657920075,1931.1440358139143,5924.407535867492,5380.415819375357},new double[]{3846.753290795024,1732.6441416861594,4543.440737272442,7218.242312741953,6321.872177360868,6764.197557825947,3503.1296065699958,4159.706453642625,2760.640834432676,6725.738873358718,593.3134928627992,6645.189779519307,1452.3664747870412,6717.461512638625,9729.597277117091,3076.719110299966,135.3391256749814,7528.0224422840265,6012.289608040301,4014.73128472828,1071.8528463489108,4668.170320820327,9114.25103505039,751.3155545422634,8509.699032980909,8679.657328254336,4057.877122536042,7402.240832613551,4542.251198006061,3308.334311294533,5502.399907436886,4604.392185814295,9896.08110125432,6017.690628500904,8830.375455102685,9694.940638011103,1270.5221941729205,3630.751473478894,6743.2106963398455,4667.728606843594,4731.991841183002,8993.050057035647,4536.511085240959,4828.172159143931,9631.71972231329,3019.3395883885764,5681.601206319076,5189.918716253909,9457.451025038778},new double[]{9858.490575174568,7707.905607803832,5021.584175638065,2126.0930665803635,1093.0428368047963,3745.011847594666,9771.166318207452,472.61146441024306,4008.6772252631677,1585.794170199577,483.33570777268295,5227.284291977262,3565.305570733922,9644.097132819306,829.7755761930725,6055.538965298497,175.36201751864766,3413.0217400469296,2640.2753174918603,9155.091839148372,2204.147217534156,9646.824594662883,5535.653721601298,6999.1296089517145,2052.106730093315,8765.774235212373,5618.504221894872,1823.101083855152,6450.228448742152,3709.0840347005037,2562.8685396231153,9404.89205337425,8223.893813893073},new double[]{2933.9119028337823,1670.1502558318027,6087.785052928502,5830.496579124935,6012.667523752366,8605.549463703592,8391.896202104264,6781.779546376485,8722.263881711979,5244.490064787881,7941.369082757103,9725.010319453018,5820.878548931412,6412.693111293454,8686.079007513366,4832.8557027198185,1971.5020676134554,4713.00315718324,23.95004735105899,2043.0266876244518,1744.4110544238877,9582.30503057717,1370.9954690178238,4895.774712815934,308.82987894597204,4401.248882448594,1374.6357709485146,4959.382604347441,3218.244984172339,1034.0450323702598,6737.440724743908,634.1304172158091,4999.24253043374,6330.331284021177,9139.827275144382},new double[]{6997.489257897447,6806.800562474949,3902.9309997574023,6376.073892981555,1670.3644171585763,7131.487894217919,1408.3540095032376,412.2056336025215,4304.210459722586,3124.575744335187,7828.129832271993,2643.8811253771487,6873.465900546271,6509.248773293544,579.0570266395179,9394.219664404045,8578.463028905046,3835.6538352530943,6162.595716602937,9170.955208900608,2407.4357214948327},new double[]{4870.0107594261635,3324.1339614958356,5932.348671574118,7765.827307806859,2031.094134376461,6089.677488554667,1434.5229583013374,1396.7772537825929,7054.601057121471,1148.3122565408987,7728.834323176571,4487.6592414211855,5517.523660019319,5899.975978067698,3265.7994047891757,7871.939795019093,9946.250158526567,5665.668416355023,6987.594052558873,5279.374685773946,9511.549579080132,431.7493942707229,3461.0964351048756,309.70060280253506,8983.523425189924,2456.575385065778,1265.8660899152085},new double[]{8529.096294439394,2980.465082017305,1247.057568565425,1683.7901051144765,2346.8054018979224,5410.236203075452,9768.449536539629,754.8137030947732,4162.952453094405,6112.1743131963,273.037880594309,808.4213368212689,4615.3391439094175,8759.276596590496,8992.405678183211,3879.2595073552816,7503.976937076325,2178.3774847327077,9626.995412254648,4762.384453793243,4304.784074817238,1051.1728645390829,4006.2527490710277,9709.333274524432,3201.6798740910435,2478.8484504271014,3115.7977329178675,1663.9006122470812,9723.917944178913,8904.652104789036,4893.318186460499,1308.7180114241014,6679.899715892782,5764.6618025963535,3532.443421003797,3583.4289228422845,9154.05602075901,4110.438471296866,547.2737136121641,8607.280965840293,6844.321723607965,7456.603075966929,3281.0807490473303,2789.154901361526,782.2666839299308,4682.115076692754,8304.025574969566},new double[]{7867.432895770139,7142.481633795158,616.3828766647327},new double[]{3387.3802798770657,7144.366061237613,9860.806002618854,8079.830027999986,960.6136403709353,3649.091708134886,2944.5665577603286,4517.417094476161,4018.920033033857,2443.3697424046786,5216.456010749324,8490.246719274373,5191.955006675276,7368.537038688761,1669.5608867539668,3879.493413167572,9889.474876929211,9992.481486612269,3660.7510158002187,8138.870105890437,4698.871535878607,8170.396330191924,2996.6723471223313,3207.835113478479,7602.8165060169995,8428.482452334038,3854.3925110712416,4292.9644291593695,3257.118330538692,3205.1510927519776,2351.8971372001183,7927.634015142587,2271.416178727619,5279.455156231754,9528.477679256916},new double[]{4809.558214848555,6512.113001668395,4126.780341230375,8132.839211158911,3910.846617356295,3156.911078233957,6491.515503128564,6847.145249167793,6321.306375289207},new double[]{5132.246799974731,6370.43772475688,758.3383190726755,3822.1912772556598,8392.762450933264,6840.7826438867105,906.171738227003,3924.4554022145207,4394.162240587243,2168.1300970892626,4967.331263775884,3161.0163687093864,5567.720858829881,7250.935239567056,3349.9827470371847,7062.4877637767795,8205.045407756192,2845.672970275027,3632.275199296913,6278.2813550024985,3311.7990092854398,1244.3732947943565,125.2291572270614,966.8954156959719,594.1764921541792,665.1263367721838,6373.084192169837,2661.853212656231,4270.594558825736,3354.1377968170336,4191.810824563139,1447.4469824976234,6100.290756172702,7643.94222186592,8064.262463824555,4159.99596569145,314.409524232685,9662.847377558683,1963.453914000497,3833.110525685618,1382.4852909355711,5216.451524604983,1923.6243302753153,9366.946960746385,7010.521276782435,6438.24964953168,6613.800664284052},new double[]{383.97664429939414,6189.259103225889,223.53430583521904,6482.472343800064,2428.333587831151,9818.068366530008,9781.347438012055},new double[]{3898.2961108062773,9291.534494677917,7317.398922809986,6426.207629331639,6967.6541718465505,3752.1475543957704,9733.352111551661,5361.463573450924,7189.933607605151,8777.4997082165,2824.233126142458,7816.366398242133,877.4402752427968,6056.868857289174,2182.6819683042677,1280.1579204947611,4436.555287965954,1661.3145376490336,2092.423589364817,8260.380550864431,5966.315646458932,2432.5698050980773,2739.185628046621,7245.886255806842,268.77157782930425,1233.0706867884178,5943.957524802674,7405.470958601446,501.9242163945048,2971.016181534857,7782.648869979246,9913.953451407731},new double[]{2235.11258828775,9865.00539197128,8231.382920563366,2952.921926617926,2929.760559635134,9595.450532333396,6384.407369365793,9412.122783013581,175.63593700402947,9514.63820403047,371.6559244036188,7825.43779507584},new double[]{5590.251121718374,1407.730019930593,6933.377338234666,538.4946470584406,3654.1200805880903,5562.66912969946,8950.192777377413,312.53390952430624,1975.0088926924968,8822.979565516376,6368.251716233585,3094.0902834724347,2238.6087134777144},new double[]{8225.011588911006,447.0286611190544,2531.794580124993,5786.881077286801,399.8362563738822,1165.8075770758226,2026.1937515817751,196.0265843025899,9049.138866114914,9141.277243142813,1800.317527008992,688.9468968954048,1037.703653911477,5719.273573098196,8613.212547189436,447.6345582866159,2408.581086134727,338.52365298329136,8235.860036451202,8121.796753653178,836.9094638861175,8.520867197108206,4628.612686002925,4344.374163287639,9274.546442753306,2372.0278182942657,3812.8030782577302,3816.980924729987,9211.587577868697,6548.961092866181,7683.6400177831965,7210.282733624986,8488.116010841984,102.69806692702055,7549.429474892514,6546.469769481529,6756.096944305571,8869.645061932615,6320.84551678245,720.6570295438963,9866.068905769132,475.1409373336379,2798.0614694422534,9503.48700738789,8161.54971021859,1975.2144598311195,3184.9270319596735,7500.649344847348,2844.260413115036},new double[]{2214.984180049143,9727.826331483277,7671.809203158182,2004.4891504845953,512.5558446894618,3765.2938342348407,831.8376948644524,4359.633550677039,3161.4136806221513,7426.701730205041},new double[]{6151.439311123929,8562.409749844177,139.99318421840434,2266.860770807414,5297.3617285961345,6076.901805064366,3547.03069618111,1096.5089121097703,6608.441477711436,8666.842749849327,1964.6619061874371,9606.368642264752,7790.148934891385,633.3946589981099,3781.3793526328354,6340.4956514955,5472.202059979498,5763.352374526418,1576.1085832246936,5536.915866053031,2880.5928523811176,4004.5592639781657,1666.2604767999255,6223.937189676776,8128.506855231704,5905.0244628740575,1954.6037073995114,7090.29168428198,5371.213723343435,9349.180160309432,1526.9429567895588,556.8638591150853,6433.413998565571,2525.8470467800466,3589.839806422006,6087.283736251727},new double[]{7911.322186291536,5780.619078872976,2943.817961220151,4381.303592508306,5014.256467510416,8988.614196928396,1582.6519734764588,6647.652615108409,877.1562024007295,1358.4933337219384},new double[]{1406.4943067285296,73.1155948257911,5031.850371822942,9438.22435420941,5108.465505806064,1042.4364006211772,1314.8948841112551,3329.40053119417,1146.2165867620633,4715.847078578909,3456.824393156518,2196.2603568035543,29.439396941270957,1270.3641942313304,4177.467361294353,1746.6041587714087,5911.9535732701015,6454.244236090103,2688.3784140475386,5617.285110191332,5303.427954073207,4387.293331306137,611.7548697546293,8811.91974824338,7078.516064797247,7901.196772955747,1924.5406523846564,4774.936619560966,7355.620204940925},new double[]{6035.935933113421,1226.8040806777858,5523.165617454097,8836.579142603414,1113.4671947565266,8213.4907263991,7745.084802654282,6340.957509377881,415.03468684295774,6608.493692843055,7044.121740102962,8825.803590215197,4881.442071527774,3642.575044234495},new double[]{6626.512216159988,308.96301872390785,8388.25754694902,5486.470145073442,997.4133362297155,4392.157919012072,8252.447545916273,8907.78626494242,3842.258839697337,3161.5035951132877,8956.139755168353,4045.1642497512407,4844.111745415444,7848.103760574075,4494.6730721434515,6180.269049242508,7409.033590289328,985.7402365643653,7196.726412389427},new double[]{269.77648903710906,1126.2237816718923},new double[]{2040.8906107327562,3413.4874201388643,489.57760152147813,3076.601982325039,9102.021349349618,1200.7208827667926,699.6162509403681,3101.634796437868,3701.554108779237,2411.9592533702184,9068.483763610337,4673.493274371369,1056.6528905404548,6871.406578573134,7815.186266363301,899.8258379586932,7810.1777339325,1923.2736881495427,4907.3553254635835,36.26787738972514,9500.035076375627,4385.290183219543,7381.672654939276,4931.537531704371,9805.425209816323},new double[]{5022.436273571402,1197.1797908028402,2513.282515620119,7293.5846831339295,7864.075502303563,2488.338611262899,6965.7072214240725,662.562087608145,4890.8534220629,5960.8202659888675,6913.129571853039,4416.960377812348,8846.58033596835,6414.317693274189,4127.7024306320955,6366.8329968171465,9450.85060725369,5628.414242086556,192.2829859747388,7182.850802625099,63.242532136027485,2300.6925952920365,8846.636183933997,3146.563889171922,3754.3555017824315,5770.426368716938},new double[]{5173.830964715877,9890.226777233238,1098.9324114713784,364.69864035620805,7723.254271184315,5517.0747971463215,6972.82355850263,4377.688324442222,3927.513417754829,4505.799939384594,7355.8915738696105,1411.590170602457,4931.86251176953,986.90822558536,8508.137950915048,2684.400565521672,7897.155849168546,8674.145789673083,2086.0891380332114,7705.480883689803,4665.449845287386,6076.212330681365,9407.328687432935,5689.684512793414,1831.0823727388226,6617.606692308336,5668.947544401989,8930.611145243207,8224.113654367518,8359.300795112244,3864.5610824686105,9390.681712139136,2815.184988367545},new double[]{2602.1776608357204},new double[]{3407.007216757638,5724.919154311412,9384.166952517773,9690.602472466697},new double[]{8102.976838398982,8849.784140503656,7407.679966884767,9836.701623369934,1872.432781723563,7281.574637677118,8845.592713310316,6876.737462800879,7233.376167426852,9591.734515742108,7484.535374322941,6180.868036361612,28.122053896075805,4850.750074639563,2077.221298467284,8422.360632110873,5304.079773970775,5150.322617258653,7715.594320512252,8676.906084883474,7063.087615208,4508.300896683666,1870.212325326055,1855.075140914788,9334.738195960335,1656.1473401916626,9367.672340533432,8863.981457613274,6546.8262011327115,9347.669364392037,4747.065472443352,5745.848959644722,9360.338955845944,2937.7200808032158},new double[]{6482.8595704273275,8499.749853293006,8440.713898627073,8891.227554738834,3180.022519782436,7880.759241944946,6056.006933773436,5912.350437476278,699.4588114039491,886.0079001140298,1822.0626664815043,381.420906591744,2607.676451122073,3181.804873120423,8202.497429425099,6359.467064904772,1496.8293150201127,6518.407076371044,9320.042455571478,2666.589843222107,3625.619379089742,7276.918882277939,1184.0298425253427,5821.374205476385,6630.175663663377,3266.1551529734134,6400.107810482856,9315.153890473555},new double[]{1696.949632803242,6995.182554254953,4565.512300553068,1555.3469991121383,3041.5235799893594,4512.822786172634,3333.4924190545357,1059.10366673576,7496.936219842324},new double[]{671.3629839557877,2236.177889510651,5329.515026552306,2048.8616958059147,5268.330992320453,7702.435041792674,2049.848128237071,6051.912730570009,2654.641081175706,6731.628675509916,245.1033485342835,7262.8856488773345,3833.741123694605,9584.561119746415,9459.311341921759,4189.750168909049,3206.6744841142604,6161.937614136377,1550.3029984999139,7403.993593415656,1347.1793632618455,8322.590251110072,659.5491192120628,9343.3284201924},new double[]{2952.3815506071505},new double[]{9115.411311885711,6190.606498203099,4032.1155657850204,7875.049545423708,9466.12681849252,5594.839737431558,8428.888075075625,1941.9962664072598,9032.133764189743,4804.826796327835,4821.763408431451,8570.546357430994,3087.060817370136,2488.6336685063193,917.2654167233518,237.61057335929036,3926.491893192462,9982.873336882416,5210.955793121945,9577.59684717213,562.8793455645009,9974.932039818228,4114.927049501123},new double[]{9536.842393889692,1523.764350514798,4576.664144907182,5555.333574049817,556.0702052726873,5695.790313120072,2940.1550048338086,8906.823029982179,9247.57985609783,5670.479097671544,1563.240912825089,2058.2368149628714,2586.2473296422704,8548.765615315135,6932.512942785251,4001.355017761662,8043.0396628980825,9741.137424824428,1872.3820437759841,7653.178445488161,4468.503690875622,6444.766160470187}}); param0.add(new double[][]{new double[]{9387.34729535443,7898.461949606736,6843.664771769185},new double[]{8854.224557496666,3138.5658050816055,7767.530379809834,7516.323745513028,2207.2409217929144,8693.6916056422,4885.133223819916,8144.646738094058,9472.851132664124,7362.5846712389975,5315.360555945713,1617.4039470690004},new double[]{1687.9209124872664,8464.46411568592,3447.047038096602,6532.400295186251},new double[]{7446.299482513876,5930.804673782114,8777.469690431497,3199.603818228027,615.6806451195662,9000.507773811101,793.3778314067674,9665.503543616267,1423.2311942967624,9058.320927066101,1099.8137862184076,4415.691600581443,8530.398535354901,8250.714975402603,9059.795084829342,90.4120532143693,9022.111328994652,6322.358533615018,9206.94022358282,4798.187993893735,4187.978740159638,8014.734995401485,693.8891854382779,4251.830314994714,6697.295656397563,6335.49700736744,8610.683236059502,6298.635031818236,4038.554993329112,6360.121170960482,4022.0110051334914,1122.5234950192687,6992.0496911377295,2883.123124720399},new double[]{1056.4492709914664,8567.000947158875,217.69313002310332,3254.5002663085174,4601.802558945174,4466.4132948941005,6128.946430118579,148.94225409799898,3118.1375747804864,196.52645396098012,4504.754960546661,9199.006855218553,6614.3828800036,2571.8878153978885,8796.432276470714,7918.001506620834,9596.031561565336,3214.753044787861,9309.630430539835,7439.472072880434,9619.018552587135,4063.006735339747,6358.964169833173,3840.2035380176226,8937.716360911025,1209.3175096114285,1721.522884166612,5216.987384793819,8684.378443881262,5495.2611059262845,2264.1919806259802,1252.543743534026,655.3386733986899,1855.3310449288451,4847.535649990685,997.5111777751711,1053.7363758500662,8535.863237331658,8822.043281415563,3018.8030141675526,503.60316905774914,6032.498466876322,7916.5948041773745,597.6478813730379},new double[]{8684.361358839811,6833.710635677209,2301.7133776801625,275.89397954013384,5627.0885508326655,5749.889984495326,2725.9411491042106,2263.60838765113,3220.8714827441454,2126.1813280018205,6336.34207671731,7815.580881958889,7692.190120063231,1706.9068872384219,7089.19633065844,154.21143066395416,6379.487447831323,6113.035840785786,9292.147103114716,7285.722660158631,4056.822238980331,4410.131230785889,6277.964120928899,8029.2274137176,7759.516664347943,7600.10262069633,6539.162345662414},new double[]{5216.963504767812,6022.3717055600055,875.1699166517468,2976.028433448088,4133.081572570095,3599.4478354607086,1431.019590353102,8171.597170603135,6676.016342458662,7869.493915359824,3017.0303643295547,8547.37163325604,6113.115846890411,72.11597385577306,2408.6468365371115,7992.691113660823,3225.521291389316,5285.023809224858,9981.08193760831,4245.283394786782,9350.710916404942,156.5062811839235,3809.4842218626645,6715.87477975451,4829.110054128289,8193.308772328679,2368.3570505600337,2988.323558107737,8440.90610248902},new double[]{593.9952608207976,9015.387427783953,2400.016721913174,6206.8118144856235,3732.352088196729,1992.9549547278602,866.736134350522},new double[]{6669.381677531302,27.319788257704758,2637.01567068781,3235.943943964311,8162.7447842874735,7427.830546891691,5632.948554742142,5789.085625226065,7072.633727802251,9801.627019837071,481.0860962500385,1929.617450695501,455.0942830517457,7426.258332777612,5315.1712596605685,2377.1485177101213,9147.659669601951,7469.859392568566,2119.6650171808783,7181.008454540089,2241.378497924079,3691.445448003328,7223.51362443932,791.8386282872325,1645.1957081534508,1079.432157932666,3581.8213870239433,1271.6267364206535,6918.799700879627,7066.402451269379,4548.9501257795355,7771.868819145048},new double[]{9581.38150545251,3410.336533530417,2856.7662356133615,2419.0079032541657,950.0224986377892,8837.283092999793,3913.2155959905404,6636.031805779068,7592.195244455631,7420.490147940853,4471.464810532584,2152.5663872694968,9950.003125615844,5917.471879140231,5763.089927390933,7213.237810657768,337.1997863178189,1856.5229771467207,6717.1769095465,3208.231458475995,7184.886781951437,458.4789706683656,6045.885158102913,2424.9990349388263,2896.116810748228,2319.061652740508,2047.4513457389999,6294.492404013903,3334.9834269859025,7368.8970490832635,284.72641721660307,9420.83255298125,9859.380369000763},new double[]{9169.208331579337,6500.7756467671825,4122.966937565739,1544.64347471575,9324.722480784405,8587.01517312793,3984.021827632204,8450.161731137936},new double[]{9258.381063410341,3512.2061527605874,9078.094037081228,8366.947143769201,6274.399530708722,1273.2656720112545,4407.4473886892565,3277.961980926288,6762.275884363325,2485.552997462922,7147.186755311224,6006.1456642302965,648.4562629752044,6627.708061728291,6708.785422640259,875.7117573180994,8684.281779960153,2439.6863224086796,7798.5461247933945,9839.935322794892},new double[]{4370.801958830066,612.4579958308252,6622.693946746825,3699.7853080311447,8397.106214715017,6938.451771935569,964.9701499567243,4097.361978551648,1123.8931687029296,1755.6273056704908,293.17328676051966,6467.777619293823,989.4719132734375,4055.8581179604757,5256.550613502351,1299.925024671782,4789.230643713135,1563.6991704648951,3267.9045898051118,7864.694377084369,1772.628562638382,9651.531346111839,2274.1630302924764,7933.6236919572975,3121.1596560775,8866.91589613497,6246.988735967703,7121.760563780332,4865.089575698644,8281.00498147027,5085.228034421677},new double[]{6404.378481173949,5131.811344485618,4610.269533313499,6136.038498844168,3243.653004693182,8675.223981532241,9075.233149089272,3285.9284650507925,5252.767520217068,9165.91955653066,692.8358131662837,2003.3532713768775},new double[]{2179.555844128038,7795.173390996032,1584.5811576718384,8026.3344366294705,7862.970621698384,7076.0766099803195,3362.8799147016252,1096.8494981635213,2497.3787517671985,6467.47480827266,8147.807275391677,474.7811361711152,3849.1485728177986,8819.114225613455,3643.8263413318837,7149.719973775268,319.94128606343986,351.5817455597814,3887.537481097733},new double[]{6182.269817013097,9932.80710355981,4375.52604490935},new double[]{5497.83023528442,7000.943515738341,9141.649955676245,3984.347222137875,5881.395660547033,432.8745332071515,1390.0548010976754,7169.852370963141,9638.074566266574,8268.269302387289,993.340087420359,8926.312495484106,9963.77867525507,86.23903812557066,6629.0543612085285,7763.969523740677,8484.748606467938,82.25115949979434,8993.610527478002,6335.178529611683,5767.486565260309,6874.79423820253,8047.152345465804,820.8184154530907,7791.514421602571,9961.965504789934,1979.4243726517634,6485.2608094874095,4213.721428033255,6607.888206233299,9702.017369245692,9974.535801268215,4696.642031529939,8132.563081807331,7622.293125092784,1834.6931258898423,7391.987759206572,6500.344830172746,136.48971242386287,4200.133204789978,2785.920779496308,804.8994719309643,2345.9269659084016,8357.06549748538},new double[]{2766.311825930985,247.82286534360765,9210.351083194728,3753.627957345187,7962.917152771212,1751.698129255792,9212.829728137283,682.3310004536054,5741.1142555813885,9761.752456788918,7812.1571286188055,3437.793780763595,7186.784717752445,191.24402764638003,6395.160525892249,5448.899650841235,6448.336342731541,2049.0552692066512,1934.8055240768304,4150.412336537698,3905.3898304258137,2943.1925104202073,7517.903523696381,5241.783668695016,9328.846774552487,7128.137571342247,3454.0132065648754,784.9234765927349,7219.1905595332155,835.6442343664172,5656.669533993148,2383.4909026049236,2681.736245406704,6966.710606643402},new double[]{2063.497842840252,5822.371347317983,5703.419199291243,6524.047902146878,2296.7642952695332},new double[]{1763.4495330058685,934.5148677695203,1619.0205544392566,959.1621826615526,4280.521969824521,1369.5693371906193,3273.1818661012935,5115.8434116212275,5985.42152117378,9527.615090861202,3354.904782657736,7101.616336504692,9762.728037978632,1269.78383882561,4875.059489948114,1497.16737837024,2422.0980602965283,5716.250236875847,6321.505597383554,1340.667838547893,8443.00252703888,3735.8841178907255,4899.856671866332,6720.5246060937625,7750.968585550362,4238.977841764919,5788.14965570911,7274.903802452901,3595.0484545350714},new double[]{9686.865788633631,8233.772964679154,660.7508618276447,6306.683868508095,8498.953442175642,8114.077760774463,1104.754624226918,311.0692755307476,2531.60881014545,8451.28820029444,3200.6570105366095,2869.6853746417128,1238.5022469776386,231.89892573873271,7233.737255599893,8333.686335655733,3494.76478845981,6358.858772951813,1592.5661835891135},new double[]{8729.302351090198,6384.546837461195,7171.290584657766,5957.659783638356,9085.037001227132,5768.356633124855,8327.482562249292,5395.921276883439,1861.2599624881498,4765.111906737132,3378.3810534074432,9947.647762912382,6959.705326382867,3716.9948860458167,3062.662164010396,4763.191664464988,7812.697916882337,7917.498627199334,8870.650688899828,5065.742181053909,2624.806153972363,2975.0483110771174,4364.205465054759,3188.4425422580866,8720.977081893758,1459.87953565746,4572.8264886204215,2324.1540757260946,5840.324208567349,659.1512944086209,6387.2382456619625,1706.1961811177118,4070.0269992801395,6180.002343467976,1707.116403493727,1552.491504085135,1627.8271363780805,710.7568621692617,2873.2219438669295,6894.1926098992,345.15307520545105,3662.3233518062393},new double[]{3211.713546228133,7896.40777964658,5300.8078149063485,6851.224397907975,5696.065461614853,5114.791911160674,2564.1730817028897,935.5405348126611,5153.847785482536,4577.349093295708,669.4749252740984,6331.618429957198,9752.5524618502,4348.913289388088,5360.501700968088,1947.5177649733143,8717.345541701521,2764.158876222086,8439.468669204629,4053.560412732092,7445.1623077869335,2681.809445597795,227.24520795759483,5796.36709151562,1742.0265345346274,8771.734793785536,7678.398207518567,5661.038366465821,3269.4432986394963,8668.907656759158,1676.1950842333351,5480.716778416091},new double[]{936.6238554926199,4417.071383868515,6954.953579576183,5108.719616062134,7182.39821842807,893.3269681291046,9329.321095066078,4580.047117025584,8767.112017513396,5860.985413993845,8199.847852762732,1222.4269503900243,6936.2060001009595,8505.84929950005,9178.71060254381,3564.7845125447475,5204.125789379878,746.5779862826249,3612.5357492902167,8863.338857356202,3207.8067128192033,6411.350131694356},new double[]{6971.463246366584,8656.829488481588,4716.397759444882,1871.0559596524602,1400.7186558055407,7972.157112200225,2785.2894228904734,1230.437360694544,8007.762276598806,2879.918281682995,7129.5575876408775,1804.8918776007638,9866.87453607941,8137.058205998907,9310.146806768604,8140.789040813295,6053.202509221739,1291.6766981885764,5042.499167167728,6617.2901410157865,5184.765799310381,8442.95630985222,5949.8689231126455,5292.165955504016,2849.4937899043603,4906.261299495095,966.3171571506301,8454.562916281682,7489.005406107537,3920.8761213857024,8798.627174192734,2997.865499624235,1711.347679688806,4027.298254353501,2665.297130518587,4207.206327946828,2414.3945246142307,4847.717343608347,1070.5167501685087,1704.8851914439756,8171.119375036566,3723.606800733539,142.2932030262325,9127.383634043443,7118.072266257432},new double[]{339.52074175386815,6222.346927985851,7378.5920594735,6483.541708564634,362.64537232048144,7138.700983753719,2240.2956832486807,2513.294144642031,5297.54986666968,7336.701719593464,8533.030287569201,5619.9926655639065,6020.148727640418,9972.565222705252,2138.7215246647575},new double[]{9334.18747439277,2305.316444035084,1496.1818919744728,2631.664575282966,1560.644447319053,8017.229344306232,6842.526322961845,2122.802524963182,1925.0851490635769,2446.861091468323,9263.77307980419,1483.1424881051537,5287.2562923501,9035.859888041217,8023.375373059005,1509.7451515868177,5603.488799339734,6952.921883793975,2520.825724984489,4774.46952604118,3150.932309635256,9437.021148222304,5408.13867691267,9230.165088724967,7807.315410083818,5405.386628850249,1262.2511910367418,697.3644405937873,698.5354770211683,1350.5821712909406,5683.304986640956,9411.453890399667,7917.412705783028,8454.459445136355,7206.496995251545,4184.077101861108,6457.784133948724,7829.579341560543,9782.181419945555,3072.675129166752},new double[]{8633.9400207655,9053.67914423705,9081.024953660442,2853.802978909221,7098.6377709172775,6442.001286495734,5352.453679308428,6033.86163930825,5295.367200513826,2677.067926657917,7715.416997612096,3788.755738261852,9546.352816383147,2191.2027293058445,5191.987053619508,7361.459537716426,7500.956977764495,370.7365519990435,2962.269562256985,661.6552510251239,1609.4504154422318,3988.587061330161,2398.369174193682,1708.5280616204134,2284.260481124326,1232.8130458617104,7282.24314102055,6095.510118039444,8316.544395798997,4280.1892659343575,8407.096352421157,3773.58249506053,5866.478536674913,1059.4976355232154,4198.072679613927,4234.325659104923,5473.390130450675,2776.1105772896135,1674.2483340926185,9810.681965224623,8123.877611121171,2880.6804254366057,611.8050413036724},new double[]{2993.2135939667937,6516.371756368651,3243.954240688501,1707.4419839480238,6117.910093882588,2728.1465292580765,6634.197180792388,4372.280063161229,9906.755136519236,5628.301297423993,4325.8026028396025,5809.6193319701715,4537.666496279663,5195.153570340511,1449.7797935032452,5993.770275452789},new double[]{4543.424826252607,8348.648362364054,804.5165023634681,1729.8028197600313,1522.5403036030073,3062.049396246639,5614.200983933174,5394.364801574996,6082.364911270015,7322.660128770181,105.67616713120897,3780.024680250308,2043.1384239018603,1911.4871928662747,6600.417413983897,5725.222210135139,3159.2736284331845,7911.867143170885,6910.232736464181,5082.363943676784,398.9266438123795,6600.002726524873,9718.957727352494,373.35598181310934,1769.8440978937858,1423.7660839786836,6709.319258322703,8863.059005113284,8818.99294307518,6869.765112779014,2299.7066087856288},new double[]{5904.333165248659,3737.2540517941134,3234.8010931379345},new double[]{8741.274694147212,8142.366348649237,7178.080069844503},new double[]{9806.546398158205,4111.328970709272,1297.6979885312844,6671.312196519337,919.8636669576166,3674.7691763561584,9558.015583014578,179.15421355732875,6633.7786907057525,5145.041583744364,9650.732970966015,2262.287535355311,4078.381954659066,9352.614142347535,979.6245727881725,1961.1517367115562,671.592570513081,4430.339128069768,2945.127026543707,6308.61484052264,639.7007227096851,5329.702461652472,4258.603814362332,2386.0945919632636,7582.27847122242,531.7809464507307,619.6474357889825,9850.258845427983,3376.8188352510665,1443.5852603295095,5965.538654258386},new double[]{4064.611605775853},new double[]{8699.678950267016,2638.8791938900504,9864.32576829143,9545.45934752491},new double[]{8967.277929781716,158.487360223436,2706.512848604518,7632.722968650326,9493.606876017158,722.3053012762348,6964.558269251513,3890.6533336777193,7324.280695126543,2114.987955696953,6493.602831666873,7861.736242257294,4577.950198510346,1258.5279257186965,8413.280602583125,9809.221728733319,9999.85897125298,2687.9513051743697,4310.701528942745,8308.434209993517,4632.868040691614,1557.6045146848705,2024.6772936559332,4584.237100857744,1162.3893821891406,9006.014395722459,8980.135554758763,9645.94750029713,5807.972419276929,9641.914592343957,6119.365848988399,8925.074625708212},new double[]{3961.038699627797,7941.386171416613,8497.2079090036,950.7156317300869,1002.2655576124373},new double[]{4770.970512462653,5751.274214977394,7374.385304920768,6583.555487016266,1354.1896365063787},new double[]{9019.53955445245,6116.076908287135,8146.602392879152,72.65131447226403,1516.6254211993412,8039.461012121285,5038.821843934121,8391.976024847978,456.503039225048,2670.191490719758,3515.763578768253,1092.421155822273,6164.620640238656,545.5694373578046,4279.737736096799,495.9879677990009,4625.2520594959715},new double[]{1439.336923533866,1302.3118323967053,167.48167583331974,6295.610633433874,6721.42085515711,6293.501666300752,443.10543686137737,5790.080920213072,8246.409203016145,1090.7269189639735,3732.488593915935,2911.804873618257,9941.921987305477,3792.731907876411,4534.224944059517,1472.278357602025,5275.2635084540525,859.5210260889396,9597.694442577425,4899.437560961888,3899.188565008336,291.1982655390333,7689.693286997743,8893.026162327125,4327.722294090344,5068.436180974043,5900.3279123267785,7465.30143721741,7167.568894492006,4383.153760951697,6514.683704147853,3810.559736196162,2522.446986633412,8028.80881494865,8593.830034608267,7739.336291343238,2193.260515869928,4073.821932851648,7770.88670948187,7663.446075181924,5361.707839001343,5038.736484800433,6054.88382711972,8169.620671795285,9367.954744778806,2939.9653782874825,9453.300074929695,2797.1126437886173},new double[]{1566.286547919663,8936.617547502176,9231.73742747379,5926.868366854842,9103.397262654895,8368.856835536099,7101.186219987764,7810.498315791292,7975.613043686254,6534.1573199897975,3221.878461550536,8047.027853088147,4308.07219595293},new double[]{4698.9398220605735,1381.493549044479,2511.354007653047,1792.9062150709663,3433.3984663747965,6310.645731404196,9282.773595893277,1436.72903578846,4255.664980727647,5442.018955197633,9070.360569097147,997.3894557292784,6111.892651874234,9341.385608723269,478.81757295908267,1351.2651210460015,1523.9132106506759,7642.007210066544,8023.924071903322},new double[]{6975.216490755457,545.726967916269,7829.418625853173,285.96897390028687,1788.3485134839195}}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( m ) : for i in range ( 0 , len ( m ) ) : sm = 0 for j in range ( 0 , len ( m [ i ] ) ) : sm = sm + m [ i ] [ j ] if ( sm != 1 ) : return False return True ",,," if __name__ == '__main__': param = [ ([[ 0, 0, 1 ], [ 0.5, 0, 0.5 ], [ 1, 0, 0 ]],), ([[ 0, 0, 1 ], [ 0.5, 0, 0.51 ], [ 1, 0, 0 ]],), ([[ 0, 0, 0.9 ], [ 1, 0, 0.1 ], [ 0, 1, 0 ]],), ([[]],), ([[ 0, 1 ], [ 0.9, 0.1], [ 0, 1]],), ([[ 1 ]],), ([[1800.5208165864472, 5129.668497755772, 4091.578454432755, 9520.788540775387, 9012.789443327169, 5479.787317916788, 4846.101760095075, 9310.645104102381, 6862.485564868333, 6537.037513320974, 7943.016882755804], [8081.404685413337, 2775.350842660207, 3624.18060172129, 320.5505410412923, 896.5298358859519, 9778.851990348234, 8093.842945978867, 5513.194168934705, 3238.213662532161, 2068.183825530009, 8922.404213665432, 2564.415908565606, 9541.992473376376, 3500.695185589028, 7425.292941600525, 1035.1769706476443, 1993.3236514377372, 7516.6428866994665, 7036.757321520528, 4521.722941224576, 6046.954992856951, 1480.947630193744, 2468.314968942801, 6721.875264461492, 729.3668691453537, 7013.1702771055125, 620.7860776027774, 4073.8164568995426, 6637.935131989998, 4970.880129282128, 8491.291538095455, 6017.257595728452, 8758.321951108288, 7450.774705441449, 2430.104778991052, 7653.421788466134, 9867.846002930755, 9025.832543077806, 3130.4709292949738], [4092.6187809701687, 3682.191052666517, 6210.3251142981435, 7559.705041866003, 8083.3992753238235, 7027.888848387021, 322.813354455147, 6396.660665360345], [6712.595190644637, 3351.7854488023168, 3596.9007070939974, 7383.906373292954, 6925.055360334225, 6564.096130017967, 9810.727474966703, 1812.3875023392943, 7582.083184537618, 6792.011378435494, 6737.106729773401, 5165.155358877282, 7694.499267616087, 3564.5292718018964, 8125.369501443796, 7515.428339325206, 3373.5371602639975, 8145.31715886053, 6297.6183870619725, 489.2402023933884, 9562.673985208492, 6553.732669130852, 7196.924911915597, 9239.272829887721, 5855.3831715786055, 9570.600140348652, 6684.3117497126605, 9977.065074407292, 9210.767097725591, 3456.1818868411087], [4472.26489764256, 7298.311171623871, 6184.798212074516, 5645.069795561799, 9113.123076453292, 5537.618956455394, 2142.794697171854, 8370.190271064876, 5972.2448507765475, 6299.8293468991715, 7388.052824286836, 735.079089195314, 4216.330577355761, 928.9766117855969, 1935.1190718709943, 5606.352487792576, 9764.404560908582, 5301.250390178857, 2250.0545430370357, 8159.5544835139635, 1327.0903534461743, 7505.6753057440255, 9918.714694238013, 8827.139931812451, 1859.1883736005789, 8018.161213209266, 7984.370920859778, 288.30827861459517, 1461.0614788611754, 2690.173572057434, 8427.499467578928, 4724.15901701013, 4457.387382560547, 9993.904502656509], [2842.9663139830186, 8957.4584498927, 8686.31672019927, 4832.99654565389], [1477.392902127036, 7189.591229360169, 8822.61208105902, 4851.411807703794, 9600.384550545641, 5836.4581179869165, 2366.7307632417446, 9442.85367113618, 9848.096373489492, 3805.2945900367695, 2741.21016804169, 7787.421240650287, 5163.029236960128, 3839.164193518556, 8999.926058466983, 5787.032859796697, 7669.921381103829, 7893.275228211627, 1051.182564195985, 7017.888839448166, 5215.123486606644, 5208.568127672256, 1134.2054935790945, 7573.233029924398, 6060.282198006302, 1395.7596136070006, 3653.7960603925126, 244.94506756705502, 3594.7042035479526, 6272.774300983842, 4043.3735550683537, 2274.103544548338, 4022.0181987353485, 9109.556771757481, 4286.57480001852, 6721.662297331347, 6105.99828625709, 8758.359235513371, 1658.875171187041, 2024.5696201552444], [5912.554579767912, 5341.080476025451, 4305.59603125092, 9800.436262778925, 8097.160534980595, 493.9680676037761, 4047.191664109233, 6070.216899309564, 5697.682730828276, 9448.806800500452, 7698.114392101278, 7020.216498152797, 7091.797827878821, 3273.5516687760546, 3685.5162670409804, 2210.2161977720316, 7182.207804931318, 3265.217158812098, 1798.8408452362914, 9318.266496779846, 2859.486203159565, 4314.215039310549, 8313.026936365693], [8911.686558511605, 5660.199086800985, 6475.525180381277, 4040.3172648744144, 5708.611042449874, 9524.099373256367, 7030.627120796817, 783.4145757917787, 9713.798324426925, 5284.149579386235, 986.5900188717991, 2567.146044707662, 2034.3874533234496, 7853.582414512236, 5610.18808118777, 9372.679297083534, 1227.8195252860025, 8558.328099907549, 5800.797131024546, 1345.9810037159548, 8059.092655056248, 1007.7145561634637, 1867.8280914974055, 8073.000957658564]],), ([[9784.847472945596, 1467.4849690692215, 326.01056399299114, 3577.1820356491303, 3413.7335834614014, 5621.398199278954, 75.70726246875714, 3072.65108747655, 7278.353400799695, 4703.166022097605, 9423.746532838595, 9651.338090892916, 7908.363875282913, 2112.03821823538, 1975.7721197648048, 1044.0925741602891, 8579.267990348524, 3350.769942053501, 5299.788699272214, 7928.710248719408, 8396.62857032498, 3836.1908586465343, 8012.249410750618, 7828.91833852811, 1917.7798073113083, 5120.386576342888, 3678.786128839827, 4600.911873999521, 9497.461077450645, 3000.203085004004, 7858.544769795873, 8325.214884003173, 2451.061402910233, 647.2264467569499, 7282.170138249182, 2285.3064693716783, 5922.10840378214, 6916.751327338277, 7063.312743282037, 6645.4394853366075, 5500.794550321606, 7493.492320906113, 7206.786508904741, 2686.298332703524, 2538.8761292983, 7253.98778369984], [4241.304996916518, 483.6596378334046, 2763.9580150656075, 1405.7652499741057, 258.3758368726019, 6614.609227113464, 2961.514732472338, 9474.777783117728, 2912.5365535711267, 5242.8884354914, 2501.548861500482, 6531.229223937745, 4140.476002883762, 132.56892540437048, 3020.289197641887, 5554.185397774308, 8773.09782632125, 5011.890905582158, 8392.625753242448, 7800.7407071334765, 4421.736562443395, 52.49756244802284, 7333.792465191643, 1840.7462281638009, 7908.087535935016, 3036.262276198375, 3509.2829531181924, 7645.618711034763, 5397.717763289013, 3243.612078360748, 34.14499888319544, 3384.2995707615296, 4853.062855850027, 2223.4821740514067, 7479.5354594110395, 5969.120408179362, 5192.807647536894, 3509.0771162909696, 7334.4495826109105, 4987.315435971069, 6816.016561595986, 442.4714082796233, 65.9273693936524, 9593.436472709476, 2670.0620305702496, 4952.745706389296, 6867.130101433143], [1926.3801797530411, 4684.089278792868, 1544.945305609513, 712.4317947088488, 6354.9413872948935, 2717.619315479798, 6846.354537398023, 3775.3936214538207, 6375.903394134439, 1363.1538350088424, 2277.399819529351, 4091.6667790722695, 3659.9052193584657, 3149.203276820165, 7595.555393770957, 5372.782288919421, 8515.657623246656, 3159.662631217324, 4043.737445094111, 1842.2411676778072, 9713.005101273826, 2832.78160742499, 4589.20341066574, 9043.00917767472], [3498.6444148809305, 2140.852698797143, 4510.872710314036, 2990.179189617128, 7420.541642401762, 1033.9572862948598], [2794.437679786802, 3463.1871053331233, 9732.829396187464, 663.0832249897201, 5276.910560721226, 481.59416166211446, 2090.2478003682513, 4558.692561388009, 8758.39373387397, 4610.715817786542, 9921.398649289273, 1682.6982416319624, 3585.6795224563066, 3977.0601543964967, 9993.300034767055, 8757.889303531827, 1287.4604767598673, 9265.34884519963, 9590.296620414523, 3376.6132678108816, 795.8613040403706, 6807.576250770766, 6498.575499062116, 3521.0998180866904, 818.8610607244495, 1889.8998767199425, 3567.5388991226396, 3904.860163650392, 7927.945627565823, 5684.632085876909, 2665.280318592044, 3200.1780479713084, 4080.5659548739804, 4423.8860644441, 2026.9544154357254, 6542.038761607715, 371.810846991496, 9089.128291277799, 7033.856907920886, 1925.889920294268, 7735.925631486304], [650.8667327357808, 4738.836852826164, 3985.4301749766173, 1955.6572393313954, 3810.217150006002, 8241.6067168621, 2457.8677884976973, 5043.061693161945, 4098.220705621862, 8311.523429129516, 2613.3577094067405, 8951.447431099867, 3413.493711945631, 195.07449236425666, 3526.5261452758646, 5987.082440383985, 7672.683285206186, 8940.181891567034, 8715.378318384124, 1609.9269146079098, 5147.181463101181, 3305.462535094599, 9965.648218377532, 3910.7964252545266, 8068.070848658828, 4992.46105696117, 116.74465555125413, 3636.501190685493, 6298.365303023811, 758.4342724419646, 9850.35171473097, 6154.099626143185, 6627.416733525318, 2147.4459586732773, 4542.271637456006, 6116.269798885344, 1404.5680346185973, 5378.69792918011], [283.30445322594545, 1212.7329453006353, 6176.516523951887, 7361.713020934436, 446.2529292320283, 3573.9634384317155, 2866.7667140384456, 716.9415721666761, 2066.5957334633813, 8494.234070043816, 6193.876480036603], [2136.416496948584, 4757.490297134756, 1761.236114129905, 9672.92860361088, 292.470289758332, 2616.287787938537, 2448.153310489565, 8852.291381698386, 9393.592818697269, 1859.3755772816644, 7576.3934917486795, 2082.9223147752805, 2503.5367105046867, 6532.795825292272, 9756.064172800725], [2016.9598997834726, 9246.468446682007, 7917.631622499911, 7530.075198225538, 1619.9210624035043, 8192.289210321009, 111.78933513454669, 1304.2859282076513, 752.9875736889525, 805.8026634404869, 3551.4066295443845, 5397.733935371496, 4669.6567467481555, 4794.75142820851, 4543.875056844882, 3805.9629250337543, 5742.679148326456, 3813.8720700893437, 5210.151412919032, 5556.602949642819, 2200.424210202666, 5908.92594615778, 13.819841484519202, 1329.454109503373, 3028.833109958248, 8592.293540323464, 9978.59670979421, 3605.121961455566, 5381.409564276148, 1891.7229437227568, 625.9300378157828, 2758.668754886496, 6051.709933922486, 6457.36281514481, 5548.754777623672], [8850.151741072603, 6337.421968969598, 6419.680943286824, 9156.134838807471, 8322.880320938539, 5346.094263229739, 8840.13035584083, 4662.998040082982, 5049.325678804513, 6885.637071688473, 4883.744421558373, 2324.765558938434, 995.0281814899331, 4461.416494281927, 9543.834187148504, 784.6027172885606, 4558.569173648864, 7373.848141952878, 9152.707277929396, 3448.6407116186224, 3753.543292707031, 4293.096821412292], [1409.0526006258365, 816.3081240623837, 2140.41426162899, 728.4924219143152, 2193.525472941873, 4035.7606724635307, 6500.846781261058, 5527.736115595666, 2134.0180018693986, 6779.435167553661, 1806.1545644495725, 9627.301890803697], [2371.0568858922543, 3268.660813251466, 1707.0991863723361, 5378.8673760312895, 4595.50873089922, 2635.8908557704995, 691.8444475043295, 1624.4384043918103, 8928.107824993145, 6825.313895904731, 8182.165500835241, 2451.226122788347, 7782.688704839678, 6441.579872434251, 4321.009439314746, 4899.256098629653, 5519.087620918876, 45.86639299398176, 429.87376466871564, 6270.117082341795, 6415.83724491815, 590.2483422808136, 2744.8282476562367, 3286.420684963404, 9655.583401408132, 5203.85048223821, 8915.078884333285, 2608.1519486714988, 886.3789741564909, 6130.506796586644, 6650.901924046862, 6646.892160204216, 3289.49925972008, 5166.474954280374, 6759.760310020064, 5274.430205929131, 5227.164076346812, 8287.373511433061, 8205.14217850992, 3862.4949439064203, 7981.66493597097, 3621.863491818439, 1773.8539613657788, 7194.120248679593, 6717.104192113617, 9016.56618386249], [4918.488645705508, 4863.9376793380325, 7980.4716752546, 8867.75386799514, 7286.076902807735, 6413.32763495569, 7345.819132709017, 610.4954669263795, 6823.681549442864, 1375.05106487004, 5238.380502512437, 2773.5771144536634, 1491.8279295443392, 7856.576929303261, 6541.511110001304, 9898.82817639193, 2431.5435459289947, 2730.7902667354133, 9195.287603503173, 6925.56268238798, 5431.128027542276, 8702.555149921645, 6465.507768740284, 9314.270576749725, 6272.806736480676, 3446.023537244589, 6842.356648227475, 5788.729554244277, 1502.222414850204, 5144.345936259722, 6576.536519145917, 2388.5817800660634, 9895.843552802167, 8863.44954106686, 8659.39270167813, 6782.724020047004, 6901.026465987045], [9835.349971287455, 1349.9943677780557, 9305.006231475043, 7682.072854084074, 7772.435685418998, 6457.172433005703, 2271.0896412754787, 147.3581960989412, 5040.667292338796, 5347.141489987937, 3007.9371262367195], [6024.724622587527, 1333.55102363379, 7543.244958334469, 9460.475824602792, 5402.777961971936, 8618.077786578586, 7680.609290490088, 5356.651624620611, 3081.6630316517667, 9965.820175569215, 7449.902533219914, 2376.8033440694426, 2121.6403598925017, 5899.797061644942, 8738.967016335799, 6819.82087022954], [3658.3990216338057, 5939.885133721119, 6112.535663798665, 4603.757105062263, 3601.7182918941257, 2699.3894158179332, 7634.713427911456, 1785.935936680989, 6282.120568441831, 5216.58891069557, 5607.715652949593, 5173.8490353923025, 7091.689227700492, 7231.192245003612, 8164.945945372898, 691.0808086432995, 8884.363372959273, 880.702711513005, 2983.6539638181393, 7041.501334247409, 2686.9984210291477, 6039.4806880060305, 4397.578815778263, 4727.811059409236, 8382.722608048367, 9206.150345275291, 172.2170912991472, 2020.4702767795213, 5489.448690729701, 2451.26584431948, 3295.4350676203826, 4629.077813268916, 343.6354616846271, 5913.229158529008, 2178.835131759951, 8464.236722574358, 598.6751867838647, 1890.7273951970649, 9233.763123524577, 3511.4462447810624, 7198.449866811291, 7009.77653163331, 8249.84422453666, 4282.457347563149, 2271.24825809504, 5764.120163554731, 5765.436670299819, 8908.501071223765, 2586.0376485095303], [4178.517530004291, 8230.813420124246, 1482.5779208939982, 9884.823630994786, 7654.976401516819, 7172.9744832796405, 6743.457935859208, 2332.0202265026755, 6512.820966135465, 7899.27033659936, 6446.637651589306, 3660.9711365100516, 6983.0340219305535, 8514.370249450678, 1743.2333221598017, 5103.440073973708, 9266.372786086862, 4118.043957388042, 5646.298272664013, 5981.854812259621, 3200.6662612242185, 6635.177996178426, 9679.83767911182, 3226.414516089032, 9037.63040871817, 1667.244125906292, 437.75555568785876, 8080.445197603589, 7182.504146702597, 8450.080668876279, 5837.320531337393, 375.1630048786392, 6609.658242430057, 4138.324209656617, 4978.355962743171], [6943.097108273823, 8155.800311882496, 881.1561722205652, 6892.581313027855, 8870.412782607324, 8669.932116289347, 570.9050959816841, 3403.556267239408, 6454.311530504761, 1789.7908209345858, 7910.710586936548, 5812.846543860358, 6168.21145124294, 2131.0842431388164, 2770.4029575820955, 1574.8495056694844, 8538.95214350614, 3406.107386087113, 2908.900240552177, 9882.928919376212, 2844.4878840063193, 43.21457208309343, 7278.594953930636, 9356.662142497536, 6209.878587941289, 3990.0985725352966, 414.3501395268456, 8619.011907510358, 6999.1215509988015, 2882.9851019850194], [9844.923038076766, 6980.156846171918, 3950.1442565126367, 3157.4009365459556, 5223.187529515773, 4385.453833112532, 5325.893429872211, 3353.2248195726265, 2442.165605224922, 3655.8385765512303, 3898.449238531656, 8850.04098103363, 6831.015148578976, 4445.821672553541, 9928.380860823137, 9561.952605608369, 1591.1130291936638, 5403.707165706667, 2275.6687548872, 887.1665703941445, 1270.6708733832606, 15.351416031957887, 6885.875136030228, 9550.622085409022, 769.7305357431617, 4632.5188789504755, 3118.15405662019, 7553.524447042849, 4528.6508356550885, 6481.3993346127445, 6479.947453700064, 5346.224605722107, 7272.600816935826, 261.5836192208221, 5155.049534248697, 5501.689301147346, 417.6298514208843, 2176.1185299140107, 6866.720403076896, 2801.874422363495, 6539.364493633207, 2948.3952227572686, 3413.699419210543, 8937.812262772239, 260.2567282196444, 9974.652627956628, 3607.8218449527135, 4313.257989389619, 5126.9798391913355], [6633.663300606726, 1812.9942057781057, 1654.7655510188663, 8405.163469784291, 1953.9035308876119, 8957.383693535636, 1421.2991902099047, 9264.40639576394, 8150.024375652974, 2257.3830199676427, 2479.3344627483484, 4043.056101781555, 9247.05324493969, 7363.206663924256, 8490.180569522778, 2927.295097067805, 3679.2436731106004, 3838.815927824232, 3115.4209839633218, 7612.651962526704, 7076.710446359618, 825.7143449578574, 9864.274122425695, 9647.78655096705, 7548.744154086509, 9815.450355850051, 8653.699152037381, 4050.238822185216, 5272.888444100065, 6951.384129122965, 1394.39534640736, 7755.935683847396, 5317.102211979815], [8829.674867773414, 6689.896932346349, 1968.0933078351115, 4809.007582058182, 6069.87219516547, 9766.476615420386, 8993.904574223372, 281.1877463140244, 5576.660306049759, 7140.548946726968, 2518.194869927194, 2172.7143296254435, 5507.955541433988, 5420.491404996137, 8394.755280403098, 4012.132315372791, 6389.889892691528, 717.5893819573375, 2875.0684389259386, 5280.900234755885, 8161.863197586057, 3926.09778356536, 7022.709269632878, 106.07736204608864, 2617.3249490483054, 8109.0289788950895, 4083.165322330473, 5420.617161522736, 4445.31100910545, 9393.19511825442, 176.7904030369116, 514.69093147267, 7614.2873289591125, 6264.256156371076, 1595.849249955039, 4210.816847220884, 127.47354248535902, 9212.920824942166, 2676.3018953846185, 7651.925841175547, 4176.854241193708, 3254.032717531873, 5064.677632904187], [2933.30773145417, 7167.004460596055, 6730.0751341762925, 1612.3416038398664, 9996.385398599057], [1469.1245592389023, 738.4910375434861, 5091.743233692105, 4943.243843219373, 8276.601429613058, 2099.0155722034933, 1123.1905308985645, 8721.083497458614, 9900.434613544232, 7607.245058601638, 5384.468994284775, 7529.134743235198, 6837.595578988219, 4384.871356847701, 63.287732870004334, 2024.4193945797394, 5173.262923609003, 5685.6159554472, 1043.3138744199034, 6561.322154461737, 5043.419149196029, 1528.205177909735, 8635.632452899306, 6625.361243781218, 1138.9370493081663, 8600.196985866145, 1988.3249787645564, 2698.6573886862807, 3376.856288948763, 9380.474940630262, 3444.5098538813136, 7264.095443784668, 9446.89932278781, 8424.493192525451, 9315.526779885298, 1047.4543557980887, 3662.6853228335076, 3828.4452182545315, 6635.496292334783, 7667.419322235606, 35.21225339409906, 2963.565449291854, 9156.290265259724, 7727.156188255046], [8444.782911920447, 1531.875281624423, 1699.8134908798013, 7098.064080652596, 1705.6887525781183, 4769.810129535693, 4765.399059911866, 3365.3409651977972, 9969.592937121795, 5626.5051907189345, 9397.353074698978, 3239.97430286867, 3201.0073584794072, 2131.5074414166947, 5957.610797969433, 1768.6186313252672, 5616.852203640092], [5673.7710445882185, 1647.625614019551, 5656.936125270759, 1461.1781245051013, 6574.86009082487, 6774.466975453835, 3556.387873542125, 6549.504662488484, 886.9791309380082, 3820.027258607421, 5024.250405254414, 3506.088366609631, 2328.582902932946, 3679.112881703358, 3462.9919828067, 3160.911388035562, 1846.9062209575804, 7117.953023727776, 4143.612558015889, 3572.534316888979, 319.14170051129065, 1991.6701484666844, 4560.568775382851, 8901.408228818616, 6935.299537774818, 8511.84810818133, 3234.869691027137, 1295.0435896601964, 8851.889516538351, 2489.8888199410617, 2150.116130246351, 4658.446390325435, 5811.264860869128, 685.8607919672866, 5378.0726932806465, 9702.618375935705, 9289.55238058894, 5269.520454210251, 7499.026434764086, 6002.394709230661], [5531.687229932249, 5270.626911688324, 6624.91325164783, 9195.735161525663, 9266.277822312304, 9275.612244101923, 8173.831391641886, 1019.8131750228023, 3540.52480573109, 4983.413349807722, 130.21910681093928, 9770.440852859852, 9084.150791955952, 2173.294809269972, 2626.817132323017, 5925.181708485516, 4528.1824472864855, 8068.031788501554, 3141.2705598953207, 3367.1318650759276, 4202.813507746614, 4921.654402545408, 6179.504202375986, 405.8037182681518, 9118.07199473433, 2364.02187704932, 7528.315731917878, 938.6323242878248, 4866.461999667605, 9592.4230672652, 7487.79868696995, 8665.033290573028, 2575.202765522496, 6907.965979702926, 9796.688661165712, 9809.595158621196, 141.61358495260566, 2879.523431694646, 9399.935781123395, 8148.891111247624, 6176.39610921895, 5458.065535590684, 9057.109293696058, 4091.3715908046956, 7455.832236582406, 8438.475825901112], [9744.238368205903, 7257.463958276382, 3501.640602033552, 5097.35039463446, 8356.088347682142, 1013.494789934316, 7760.657819535339, 2812.190929226328, 2095.6075816074826, 1500.6497868172942, 1593.50863029047, 7654.141363404645, 3036.4929462046775, 1264.0074125211331, 7295.376768297045, 4806.278483546197, 7588.593079677283, 862.8315269726494, 9602.080432568271, 8490.755890338718, 6964.467603996281, 846.0767010844494, 3356.979090302684, 8907.430974420711, 2398.102582887749, 4278.797398815162, 830.7948679651822, 2273.3942290608734, 2275.2588065251434, 2776.5976090708787, 8490.43423277904, 7033.653179624773, 7101.244630276114, 3462.954058628571]],), ([[6241.900245829036, 6667.025729021001, 5691.351954033881, 571.7284163476577, 599.5121330777808, 6243.463062193512, 6717.298231363792, 3608.7492690924137, 9032.092398160055, 5926.293767824268, 6210.655170074396, 4474.741994028476, 1861.945257692308, 1779.876008485327, 5869.991094563328, 5423.461312062491, 1370.6862587942037, 6873.167245632268, 7649.546578266097, 2351.8399326106596, 1989.178556111051, 422.20373285440036, 2925.774069473833, 6272.788011818715, 8279.978442600892, 5970.172054492473, 6285.440742792799, 7304.627499347196, 372.4523079479392, 2940.8339544890937, 7317.6400210247875, 5166.330426233502, 8284.813081839371, 4712.766186568946, 7997.385423676035], [6452.611650019052, 6533.207730947289, 8807.075741968045, 9613.017513620158, 7551.372353415147, 3814.9462465572815, 3178.498657329026, 807.6312013168241, 629.477046023933, 5989.092355191663], [1305.6504233275512, 1205.5849470621283, 2131.0955750784424, 6257.637312213648, 8633.528791950788, 736.2226708854236, 5119.414303257056, 8804.172116612383, 2288.600322833193, 6674.881539883841, 5432.169377077389, 9984.06868017292, 7926.301399413941, 2449.424127914216, 1688.0860689625322, 260.6488247313743, 1178.8654972754252, 2073.6854863269373, 5529.394205300341, 7653.727965408834, 569.9328536601145, 1224.9369795814468, 7797.080337878472, 1005.767754018665, 3090.0776894453675, 455.9069614769562, 9044.51867916772, 1718.965140003418, 6583.579031677243, 4791.924601541926, 7018.857860820445, 9808.375188561504, 1320.5685001544575, 329.7136763666042, 6342.892026874494, 8972.682821764105, 4668.29063954748, 6946.344862709311, 9805.303722784838, 2973.069105760632, 6985.874880236632, 9545.021104493411, 9719.80028292283, 7198.598793755461], [5331.89188600143, 3188.443349871333, 221.02133512022948, 880.68828138539, 1515.4027709793838, 7930.966870782095, 9507.713752644831, 4313.160757690817, 3846.72384161552, 1655.681262068367, 55.170275874311116, 2949.6754977555197, 1910.1840751659095, 4244.735303329609, 8121.260273473295, 3860.8176185770503, 4750.489350886882, 1467.6363234444666, 465.8560983548199, 4940.401342901576, 5809.536778997865, 4565.245203215682], [6828.767147722977, 128.93271215892787, 3797.8224655761874, 8079.884381341665], [4517.275715047743, 8940.097122408839, 7281.039946934588, 27.728369323011258, 3740.264596087575, 4874.93591726158, 8043.314070462276, 5166.097047074663, 4925.980878654775, 3648.0727223990084, 3791.9876484136016, 2912.2565199145156, 3834.847575889263, 1354.5777786291524, 9765.026115064547, 7549.4703666134255, 1936.525418831999, 1478.6811488485152, 893.3329941262602, 3586.843418684723, 7367.442903319976, 5813.70155527669, 8396.79082639397, 8247.306407746588, 6074.220118587592, 5634.113567301089], [7096.526417346024, 7299.596512835649, 6326.555025996232, 3505.971650102451, 4088.5960369402806, 6348.481260870844, 1022.4660759645033, 6479.299624221714, 8255.83540280519, 5318.646177823633, 385.5360954127318, 1742.7901571985306, 383.9634977990947], [8312.439822931368, 7693.173653102019, 9684.846018395066, 5436.851517291458, 2240.2570185572104, 8549.76817377781, 2863.1071822119657, 2364.4898333606247, 8387.6366465958, 235.49213883719779, 5635.75381122587, 8824.638572201757, 5855.982086624727, 9390.895322287037, 9729.264148554501, 7581.889326800262, 7539.671214598107, 8212.126365277514, 3414.4707187305257, 2186.9037265717116, 148.32911299373586, 3907.974409916858, 1171.2309102908814, 8222.6799813232, 9643.24040317058, 8560.840012204286, 8605.631358897996], [2080.1073040550423, 2877.2637236850574, 3818.077902160524, 2477.6928693570053, 7555.588606535247, 3270.181723572487, 4332.255274782373, 6344.623935872137, 7847.221150939287, 1112.3530198820374, 6944.858605401434, 8337.745136833113, 5061.397976451156, 9552.075051082322, 203.72691830435886, 1225.1921990053638, 3211.0942488406326, 1276.8268581899101, 7670.342953764469, 4181.706551221689, 1406.5485053574666, 7060.566377790574, 25.700288190759757, 8334.288430677061, 2867.655518166218, 9739.933759812533, 310.29910419946293, 2246.3458997758767, 8825.811097236192, 8480.717272229293, 8484.35331937365, 9453.101358520635, 5368.758902198425, 6711.186412720251, 4527.55608166248, 9086.130657920075, 1931.1440358139143, 5924.407535867492, 5380.415819375357], [3846.753290795024, 1732.6441416861594, 4543.440737272442, 7218.242312741953, 6321.872177360868, 6764.197557825947, 3503.1296065699958, 4159.706453642625, 2760.640834432676, 6725.738873358718, 593.3134928627992, 6645.189779519307, 1452.3664747870412, 6717.461512638625, 9729.597277117091, 3076.719110299966, 135.3391256749814, 7528.0224422840265, 6012.289608040301, 4014.73128472828, 1071.8528463489108, 4668.170320820327, 9114.25103505039, 751.3155545422634, 8509.699032980909, 8679.657328254336, 4057.877122536042, 7402.240832613551, 4542.251198006061, 3308.334311294533, 5502.399907436886, 4604.392185814295, 9896.08110125432, 6017.690628500904, 8830.375455102685, 9694.940638011103, 1270.5221941729205, 3630.751473478894, 6743.2106963398455, 4667.728606843594, 4731.991841183002, 8993.050057035647, 4536.511085240959, 4828.172159143931, 9631.71972231329, 3019.3395883885764, 5681.601206319076, 5189.918716253909, 9457.451025038778], [9858.490575174568, 7707.905607803832, 5021.584175638065, 2126.0930665803635, 1093.0428368047963, 3745.011847594666, 9771.166318207452, 472.61146441024306, 4008.6772252631677, 1585.794170199577, 483.33570777268295, 5227.284291977262, 3565.305570733922, 9644.097132819306, 829.7755761930725, 6055.538965298497, 175.36201751864766, 3413.0217400469296, 2640.2753174918603, 9155.091839148372, 2204.147217534156, 9646.824594662883, 5535.653721601298, 6999.1296089517145, 2052.106730093315, 8765.774235212373, 5618.504221894872, 1823.101083855152, 6450.228448742152, 3709.0840347005037, 2562.8685396231153, 9404.89205337425, 8223.893813893073], [2933.9119028337823, 1670.1502558318027, 6087.785052928502, 5830.496579124935, 6012.667523752366, 8605.549463703592, 8391.896202104264, 6781.779546376485, 8722.263881711979, 5244.490064787881, 7941.369082757103, 9725.010319453018, 5820.878548931412, 6412.693111293454, 8686.079007513366, 4832.8557027198185, 1971.5020676134554, 4713.00315718324, 23.95004735105899, 2043.0266876244518, 1744.4110544238877, 9582.30503057717, 1370.9954690178238, 4895.774712815934, 308.82987894597204, 4401.248882448594, 1374.6357709485146, 4959.382604347441, 3218.244984172339, 1034.0450323702598, 6737.440724743908, 634.1304172158091, 4999.24253043374, 6330.331284021177, 9139.827275144382], [6997.489257897447, 6806.800562474949, 3902.9309997574023, 6376.073892981555, 1670.3644171585763, 7131.487894217919, 1408.3540095032376, 412.2056336025215, 4304.210459722586, 3124.575744335187, 7828.129832271993, 2643.8811253771487, 6873.465900546271, 6509.248773293544, 579.0570266395179, 9394.219664404045, 8578.463028905046, 3835.6538352530943, 6162.595716602937, 9170.955208900608, 2407.4357214948327], [4870.0107594261635, 3324.1339614958356, 5932.348671574118, 7765.827307806859, 2031.094134376461, 6089.677488554667, 1434.5229583013374, 1396.7772537825929, 7054.601057121471, 1148.3122565408987, 7728.834323176571, 4487.6592414211855, 5517.523660019319, 5899.975978067698, 3265.7994047891757, 7871.939795019093, 9946.250158526567, 5665.668416355023, 6987.594052558873, 5279.374685773946, 9511.549579080132, 431.7493942707229, 3461.0964351048756, 309.70060280253506, 8983.523425189924, 2456.575385065778, 1265.8660899152085], [8529.096294439394, 2980.465082017305, 1247.057568565425, 1683.7901051144765, 2346.8054018979224, 5410.236203075452, 9768.449536539629, 754.8137030947732, 4162.952453094405, 6112.1743131963, 273.037880594309, 808.4213368212689, 4615.3391439094175, 8759.276596590496, 8992.405678183211, 3879.2595073552816, 7503.976937076325, 2178.3774847327077, 9626.995412254648, 4762.384453793243, 4304.784074817238, 1051.1728645390829, 4006.2527490710277, 9709.333274524432, 3201.6798740910435, 2478.8484504271014, 3115.7977329178675, 1663.9006122470812, 9723.917944178913, 8904.652104789036, 4893.318186460499, 1308.7180114241014, 6679.899715892782, 5764.6618025963535, 3532.443421003797, 3583.4289228422845, 9154.05602075901, 4110.438471296866, 547.2737136121641, 8607.280965840293, 6844.321723607965, 7456.603075966929, 3281.0807490473303, 2789.154901361526, 782.2666839299308, 4682.115076692754, 8304.025574969566], [7867.432895770139, 7142.481633795158, 616.3828766647327], [3387.3802798770657, 7144.366061237613, 9860.806002618854, 8079.830027999986, 960.6136403709353, 3649.091708134886, 2944.5665577603286, 4517.417094476161, 4018.920033033857, 2443.3697424046786, 5216.456010749324, 8490.246719274373, 5191.955006675276, 7368.537038688761, 1669.5608867539668, 3879.493413167572, 9889.474876929211, 9992.481486612269, 3660.7510158002187, 8138.870105890437, 4698.871535878607, 8170.396330191924, 2996.6723471223313, 3207.835113478479, 7602.8165060169995, 8428.482452334038, 3854.3925110712416, 4292.9644291593695, 3257.118330538692, 3205.1510927519776, 2351.8971372001183, 7927.634015142587, 2271.416178727619, 5279.455156231754, 9528.477679256916], [4809.558214848555, 6512.113001668395, 4126.780341230375, 8132.839211158911, 3910.846617356295, 3156.911078233957, 6491.515503128564, 6847.145249167793, 6321.306375289207], [5132.246799974731, 6370.43772475688, 758.3383190726755, 3822.1912772556598, 8392.762450933264, 6840.7826438867105, 906.171738227003, 3924.4554022145207, 4394.162240587243, 2168.1300970892626, 4967.331263775884, 3161.0163687093864, 5567.720858829881, 7250.935239567056, 3349.9827470371847, 7062.4877637767795, 8205.045407756192, 2845.672970275027, 3632.275199296913, 6278.2813550024985, 3311.7990092854398, 1244.3732947943565, 125.2291572270614, 966.8954156959719, 594.1764921541792, 665.1263367721838, 6373.084192169837, 2661.853212656231, 4270.594558825736, 3354.1377968170336, 4191.810824563139, 1447.4469824976234, 6100.290756172702, 7643.94222186592, 8064.262463824555, 4159.99596569145, 314.409524232685, 9662.847377558683, 1963.453914000497, 3833.110525685618, 1382.4852909355711, 5216.451524604983, 1923.6243302753153, 9366.946960746385, 7010.521276782435, 6438.24964953168, 6613.800664284052], [383.97664429939414, 6189.259103225889, 223.53430583521904, 6482.472343800064, 2428.333587831151, 9818.068366530008, 9781.347438012055], [3898.2961108062773, 9291.534494677917, 7317.398922809986, 6426.207629331639, 6967.6541718465505, 3752.1475543957704, 9733.352111551661, 5361.463573450924, 7189.933607605151, 8777.4997082165, 2824.233126142458, 7816.366398242133, 877.4402752427968, 6056.868857289174, 2182.6819683042677, 1280.1579204947611, 4436.555287965954, 1661.3145376490336, 2092.423589364817, 8260.380550864431, 5966.315646458932, 2432.5698050980773, 2739.185628046621, 7245.886255806842, 268.77157782930425, 1233.0706867884178, 5943.957524802674, 7405.470958601446, 501.9242163945048, 2971.016181534857, 7782.648869979246, 9913.953451407731], [2235.11258828775, 9865.00539197128, 8231.382920563366, 2952.921926617926, 2929.760559635134, 9595.450532333396, 6384.407369365793, 9412.122783013581, 175.63593700402947, 9514.63820403047, 371.6559244036188, 7825.43779507584], [5590.251121718374, 1407.730019930593, 6933.377338234666, 538.4946470584406, 3654.1200805880903, 5562.66912969946, 8950.192777377413, 312.53390952430624, 1975.0088926924968, 8822.979565516376, 6368.251716233585, 3094.0902834724347, 2238.6087134777144], [8225.011588911006, 447.0286611190544, 2531.794580124993, 5786.881077286801, 399.8362563738822, 1165.8075770758226, 2026.1937515817751, 196.0265843025899, 9049.138866114914, 9141.277243142813, 1800.317527008992, 688.9468968954048, 1037.703653911477, 5719.273573098196, 8613.212547189436, 447.6345582866159, 2408.581086134727, 338.52365298329136, 8235.860036451202, 8121.796753653178, 836.9094638861175, 8.520867197108206, 4628.612686002925, 4344.374163287639, 9274.546442753306, 2372.0278182942657, 3812.8030782577302, 3816.980924729987, 9211.587577868697, 6548.961092866181, 7683.6400177831965, 7210.282733624986, 8488.116010841984, 102.69806692702055, 7549.429474892514, 6546.469769481529, 6756.096944305571, 8869.645061932615, 6320.84551678245, 720.6570295438963, 9866.068905769132, 475.1409373336379, 2798.0614694422534, 9503.48700738789, 8161.54971021859, 1975.2144598311195, 3184.9270319596735, 7500.649344847348, 2844.260413115036], [2214.984180049143, 9727.826331483277, 7671.809203158182, 2004.4891504845953, 512.5558446894618, 3765.2938342348407, 831.8376948644524, 4359.633550677039, 3161.4136806221513, 7426.701730205041], [6151.439311123929, 8562.409749844177, 139.99318421840434, 2266.860770807414, 5297.3617285961345, 6076.901805064366, 3547.03069618111, 1096.5089121097703, 6608.441477711436, 8666.842749849327, 1964.6619061874371, 9606.368642264752, 7790.148934891385, 633.3946589981099, 3781.3793526328354, 6340.4956514955, 5472.202059979498, 5763.352374526418, 1576.1085832246936, 5536.915866053031, 2880.5928523811176, 4004.5592639781657, 1666.2604767999255, 6223.937189676776, 8128.506855231704, 5905.0244628740575, 1954.6037073995114, 7090.29168428198, 5371.213723343435, 9349.180160309432, 1526.9429567895588, 556.8638591150853, 6433.413998565571, 2525.8470467800466, 3589.839806422006, 6087.283736251727], [7911.322186291536, 5780.619078872976, 2943.817961220151, 4381.303592508306, 5014.256467510416, 8988.614196928396, 1582.6519734764588, 6647.652615108409, 877.1562024007295, 1358.4933337219384], [1406.4943067285296, 73.1155948257911, 5031.850371822942, 9438.22435420941, 5108.465505806064, 1042.4364006211772, 1314.8948841112551, 3329.40053119417, 1146.2165867620633, 4715.847078578909, 3456.824393156518, 2196.2603568035543, 29.439396941270957, 1270.3641942313304, 4177.467361294353, 1746.6041587714087, 5911.9535732701015, 6454.244236090103, 2688.3784140475386, 5617.285110191332, 5303.427954073207, 4387.293331306137, 611.7548697546293, 8811.91974824338, 7078.516064797247, 7901.196772955747, 1924.5406523846564, 4774.936619560966, 7355.620204940925], [6035.935933113421, 1226.8040806777858, 5523.165617454097, 8836.579142603414, 1113.4671947565266, 8213.4907263991, 7745.084802654282, 6340.957509377881, 415.03468684295774, 6608.493692843055, 7044.121740102962, 8825.803590215197, 4881.442071527774, 3642.575044234495], [6626.512216159988, 308.96301872390785, 8388.25754694902, 5486.470145073442, 997.4133362297155, 4392.157919012072, 8252.447545916273, 8907.78626494242, 3842.258839697337, 3161.5035951132877, 8956.139755168353, 4045.1642497512407, 4844.111745415444, 7848.103760574075, 4494.6730721434515, 6180.269049242508, 7409.033590289328, 985.7402365643653, 7196.726412389427], [269.77648903710906, 1126.2237816718923], [2040.8906107327562, 3413.4874201388643, 489.57760152147813, 3076.601982325039, 9102.021349349618, 1200.7208827667926, 699.6162509403681, 3101.634796437868, 3701.554108779237, 2411.9592533702184, 9068.483763610337, 4673.493274371369, 1056.6528905404548, 6871.406578573134, 7815.186266363301, 899.8258379586932, 7810.1777339325, 1923.2736881495427, 4907.3553254635835, 36.26787738972514, 9500.035076375627, 4385.290183219543, 7381.672654939276, 4931.537531704371, 9805.425209816323], [5022.436273571402, 1197.1797908028402, 2513.282515620119, 7293.5846831339295, 7864.075502303563, 2488.338611262899, 6965.7072214240725, 662.562087608145, 4890.8534220629, 5960.8202659888675, 6913.129571853039, 4416.960377812348, 8846.58033596835, 6414.317693274189, 4127.7024306320955, 6366.8329968171465, 9450.85060725369, 5628.414242086556, 192.2829859747388, 7182.850802625099, 63.242532136027485, 2300.6925952920365, 8846.636183933997, 3146.563889171922, 3754.3555017824315, 5770.426368716938], [5173.830964715877, 9890.226777233238, 1098.9324114713784, 364.69864035620805, 7723.254271184315, 5517.0747971463215, 6972.82355850263, 4377.688324442222, 3927.513417754829, 4505.799939384594, 7355.8915738696105, 1411.590170602457, 4931.86251176953, 986.90822558536, 8508.137950915048, 2684.400565521672, 7897.155849168546, 8674.145789673083, 2086.0891380332114, 7705.480883689803, 4665.449845287386, 6076.212330681365, 9407.328687432935, 5689.684512793414, 1831.0823727388226, 6617.606692308336, 5668.947544401989, 8930.611145243207, 8224.113654367518, 8359.300795112244, 3864.5610824686105, 9390.681712139136, 2815.184988367545], [2602.1776608357204], [3407.007216757638, 5724.919154311412, 9384.166952517773, 9690.602472466697], [8102.976838398982, 8849.784140503656, 7407.679966884767, 9836.701623369934, 1872.432781723563, 7281.574637677118, 8845.592713310316, 6876.737462800879, 7233.376167426852, 9591.734515742108, 7484.535374322941, 6180.868036361612, 28.122053896075805, 4850.750074639563, 2077.221298467284, 8422.360632110873, 5304.079773970775, 5150.322617258653, 7715.594320512252, 8676.906084883474, 7063.087615208, 4508.300896683666, 1870.212325326055, 1855.075140914788, 9334.738195960335, 1656.1473401916626, 9367.672340533432, 8863.981457613274, 6546.8262011327115, 9347.669364392037, 4747.065472443352, 5745.848959644722, 9360.338955845944, 2937.7200808032158], [6482.8595704273275, 8499.749853293006, 8440.713898627073, 8891.227554738834, 3180.022519782436, 7880.759241944946, 6056.006933773436, 5912.350437476278, 699.4588114039491, 886.0079001140298, 1822.0626664815043, 381.420906591744, 2607.676451122073, 3181.804873120423, 8202.497429425099, 6359.467064904772, 1496.8293150201127, 6518.407076371044, 9320.042455571478, 2666.589843222107, 3625.619379089742, 7276.918882277939, 1184.0298425253427, 5821.374205476385, 6630.175663663377, 3266.1551529734134, 6400.107810482856, 9315.153890473555], [1696.949632803242, 6995.182554254953, 4565.512300553068, 1555.3469991121383, 3041.5235799893594, 4512.822786172634, 3333.4924190545357, 1059.10366673576, 7496.936219842324], [671.3629839557877, 2236.177889510651, 5329.515026552306, 2048.8616958059147, 5268.330992320453, 7702.435041792674, 2049.848128237071, 6051.912730570009, 2654.641081175706, 6731.628675509916, 245.1033485342835, 7262.8856488773345, 3833.741123694605, 9584.561119746415, 9459.311341921759, 4189.750168909049, 3206.6744841142604, 6161.937614136377, 1550.3029984999139, 7403.993593415656, 1347.1793632618455, 8322.590251110072, 659.5491192120628, 9343.3284201924], [2952.3815506071505], [9115.411311885711, 6190.606498203099, 4032.1155657850204, 7875.049545423708, 9466.12681849252, 5594.839737431558, 8428.888075075625, 1941.9962664072598, 9032.133764189743, 4804.826796327835, 4821.763408431451, 8570.546357430994, 3087.060817370136, 2488.6336685063193, 917.2654167233518, 237.61057335929036, 3926.491893192462, 9982.873336882416, 5210.955793121945, 9577.59684717213, 562.8793455645009, 9974.932039818228, 4114.927049501123], [9536.842393889692, 1523.764350514798, 4576.664144907182, 5555.333574049817, 556.0702052726873, 5695.790313120072, 2940.1550048338086, 8906.823029982179, 9247.57985609783, 5670.479097671544, 1563.240912825089, 2058.2368149628714, 2586.2473296422704, 8548.765615315135, 6932.512942785251, 4001.355017761662, 8043.0396628980825, 9741.137424824428, 1872.3820437759841, 7653.178445488161, 4468.503690875622, 6444.766160470187]],), ([[9387.34729535443, 7898.461949606736, 6843.664771769185], [8854.224557496666, 3138.5658050816055, 7767.530379809834, 7516.323745513028, 2207.2409217929144, 8693.6916056422, 4885.133223819916, 8144.646738094058, 9472.851132664124, 7362.5846712389975, 5315.360555945713, 1617.4039470690004], [1687.9209124872664, 8464.46411568592, 3447.047038096602, 6532.400295186251], [7446.299482513876, 5930.804673782114, 8777.469690431497, 3199.603818228027, 615.6806451195662, 9000.507773811101, 793.3778314067674, 9665.503543616267, 1423.2311942967624, 9058.320927066101, 1099.8137862184076, 4415.691600581443, 8530.398535354901, 8250.714975402603, 9059.795084829342, 90.4120532143693, 9022.111328994652, 6322.358533615018, 9206.94022358282, 4798.187993893735, 4187.978740159638, 8014.734995401485, 693.8891854382779, 4251.830314994714, 6697.295656397563, 6335.49700736744, 8610.683236059502, 6298.635031818236, 4038.554993329112, 6360.121170960482, 4022.0110051334914, 1122.5234950192687, 6992.0496911377295, 2883.123124720399], [1056.4492709914664, 8567.000947158875, 217.69313002310332, 3254.5002663085174, 4601.802558945174, 4466.4132948941005, 6128.946430118579, 148.94225409799898, 3118.1375747804864, 196.52645396098012, 4504.754960546661, 9199.006855218553, 6614.3828800036, 2571.8878153978885, 8796.432276470714, 7918.001506620834, 9596.031561565336, 3214.753044787861, 9309.630430539835, 7439.472072880434, 9619.018552587135, 4063.006735339747, 6358.964169833173, 3840.2035380176226, 8937.716360911025, 1209.3175096114285, 1721.522884166612, 5216.987384793819, 8684.378443881262, 5495.2611059262845, 2264.1919806259802, 1252.543743534026, 655.3386733986899, 1855.3310449288451, 4847.535649990685, 997.5111777751711, 1053.7363758500662, 8535.863237331658, 8822.043281415563, 3018.8030141675526, 503.60316905774914, 6032.498466876322, 7916.5948041773745, 597.6478813730379], [8684.361358839811, 6833.710635677209, 2301.7133776801625, 275.89397954013384, 5627.0885508326655, 5749.889984495326, 2725.9411491042106, 2263.60838765113, 3220.8714827441454, 2126.1813280018205, 6336.34207671731, 7815.580881958889, 7692.190120063231, 1706.9068872384219, 7089.19633065844, 154.21143066395416, 6379.487447831323, 6113.035840785786, 9292.147103114716, 7285.722660158631, 4056.822238980331, 4410.131230785889, 6277.964120928899, 8029.2274137176, 7759.516664347943, 7600.10262069633, 6539.162345662414], [5216.963504767812, 6022.3717055600055, 875.1699166517468, 2976.028433448088, 4133.081572570095, 3599.4478354607086, 1431.019590353102, 8171.597170603135, 6676.016342458662, 7869.493915359824, 3017.0303643295547, 8547.37163325604, 6113.115846890411, 72.11597385577306, 2408.6468365371115, 7992.691113660823, 3225.521291389316, 5285.023809224858, 9981.08193760831, 4245.283394786782, 9350.710916404942, 156.5062811839235, 3809.4842218626645, 6715.87477975451, 4829.110054128289, 8193.308772328679, 2368.3570505600337, 2988.323558107737, 8440.90610248902], [593.9952608207976, 9015.387427783953, 2400.016721913174, 6206.8118144856235, 3732.352088196729, 1992.9549547278602, 866.736134350522], [6669.381677531302, 27.319788257704758, 2637.01567068781, 3235.943943964311, 8162.7447842874735, 7427.830546891691, 5632.948554742142, 5789.085625226065, 7072.633727802251, 9801.627019837071, 481.0860962500385, 1929.617450695501, 455.0942830517457, 7426.258332777612, 5315.1712596605685, 2377.1485177101213, 9147.659669601951, 7469.859392568566, 2119.6650171808783, 7181.008454540089, 2241.378497924079, 3691.445448003328, 7223.51362443932, 791.8386282872325, 1645.1957081534508, 1079.432157932666, 3581.8213870239433, 1271.6267364206535, 6918.799700879627, 7066.402451269379, 4548.9501257795355, 7771.868819145048], [9581.38150545251, 3410.336533530417, 2856.7662356133615, 2419.0079032541657, 950.0224986377892, 8837.283092999793, 3913.2155959905404, 6636.031805779068, 7592.195244455631, 7420.490147940853, 4471.464810532584, 2152.5663872694968, 9950.003125615844, 5917.471879140231, 5763.089927390933, 7213.237810657768, 337.1997863178189, 1856.5229771467207, 6717.1769095465, 3208.231458475995, 7184.886781951437, 458.4789706683656, 6045.885158102913, 2424.9990349388263, 2896.116810748228, 2319.061652740508, 2047.4513457389999, 6294.492404013903, 3334.9834269859025, 7368.8970490832635, 284.72641721660307, 9420.83255298125, 9859.380369000763], [9169.208331579337, 6500.7756467671825, 4122.966937565739, 1544.64347471575, 9324.722480784405, 8587.01517312793, 3984.021827632204, 8450.161731137936], [9258.381063410341, 3512.2061527605874, 9078.094037081228, 8366.947143769201, 6274.399530708722, 1273.2656720112545, 4407.4473886892565, 3277.961980926288, 6762.275884363325, 2485.552997462922, 7147.186755311224, 6006.1456642302965, 648.4562629752044, 6627.708061728291, 6708.785422640259, 875.7117573180994, 8684.281779960153, 2439.6863224086796, 7798.5461247933945, 9839.935322794892], [4370.801958830066, 612.4579958308252, 6622.693946746825, 3699.7853080311447, 8397.106214715017, 6938.451771935569, 964.9701499567243, 4097.361978551648, 1123.8931687029296, 1755.6273056704908, 293.17328676051966, 6467.777619293823, 989.4719132734375, 4055.8581179604757, 5256.550613502351, 1299.925024671782, 4789.230643713135, 1563.6991704648951, 3267.9045898051118, 7864.694377084369, 1772.628562638382, 9651.531346111839, 2274.1630302924764, 7933.6236919572975, 3121.1596560775, 8866.91589613497, 6246.988735967703, 7121.760563780332, 4865.089575698644, 8281.00498147027, 5085.228034421677], [6404.378481173949, 5131.811344485618, 4610.269533313499, 6136.038498844168, 3243.653004693182, 8675.223981532241, 9075.233149089272, 3285.9284650507925, 5252.767520217068, 9165.91955653066, 692.8358131662837, 2003.3532713768775], [2179.555844128038, 7795.173390996032, 1584.5811576718384, 8026.3344366294705, 7862.970621698384, 7076.0766099803195, 3362.8799147016252, 1096.8494981635213, 2497.3787517671985, 6467.47480827266, 8147.807275391677, 474.7811361711152, 3849.1485728177986, 8819.114225613455, 3643.8263413318837, 7149.719973775268, 319.94128606343986, 351.5817455597814, 3887.537481097733], [6182.269817013097, 9932.80710355981, 4375.52604490935], [5497.83023528442, 7000.943515738341, 9141.649955676245, 3984.347222137875, 5881.395660547033, 432.8745332071515, 1390.0548010976754, 7169.852370963141, 9638.074566266574, 8268.269302387289, 993.340087420359, 8926.312495484106, 9963.77867525507, 86.23903812557066, 6629.0543612085285, 7763.969523740677, 8484.748606467938, 82.25115949979434, 8993.610527478002, 6335.178529611683, 5767.486565260309, 6874.79423820253, 8047.152345465804, 820.8184154530907, 7791.514421602571, 9961.965504789934, 1979.4243726517634, 6485.2608094874095, 4213.721428033255, 6607.888206233299, 9702.017369245692, 9974.535801268215, 4696.642031529939, 8132.563081807331, 7622.293125092784, 1834.6931258898423, 7391.987759206572, 6500.344830172746, 136.48971242386287, 4200.133204789978, 2785.920779496308, 804.8994719309643, 2345.9269659084016, 8357.06549748538], [2766.311825930985, 247.82286534360765, 9210.351083194728, 3753.627957345187, 7962.917152771212, 1751.698129255792, 9212.829728137283, 682.3310004536054, 5741.1142555813885, 9761.752456788918, 7812.1571286188055, 3437.793780763595, 7186.784717752445, 191.24402764638003, 6395.160525892249, 5448.899650841235, 6448.336342731541, 2049.0552692066512, 1934.8055240768304, 4150.412336537698, 3905.3898304258137, 2943.1925104202073, 7517.903523696381, 5241.783668695016, 9328.846774552487, 7128.137571342247, 3454.0132065648754, 784.9234765927349, 7219.1905595332155, 835.6442343664172, 5656.669533993148, 2383.4909026049236, 2681.736245406704, 6966.710606643402], [2063.497842840252, 5822.371347317983, 5703.419199291243, 6524.047902146878, 2296.7642952695332], [1763.4495330058685, 934.5148677695203, 1619.0205544392566, 959.1621826615526, 4280.521969824521, 1369.5693371906193, 3273.1818661012935, 5115.8434116212275, 5985.42152117378, 9527.615090861202, 3354.904782657736, 7101.616336504692, 9762.728037978632, 1269.78383882561, 4875.059489948114, 1497.16737837024, 2422.0980602965283, 5716.250236875847, 6321.505597383554, 1340.667838547893, 8443.00252703888, 3735.8841178907255, 4899.856671866332, 6720.5246060937625, 7750.968585550362, 4238.977841764919, 5788.14965570911, 7274.903802452901, 3595.0484545350714], [9686.865788633631, 8233.772964679154, 660.7508618276447, 6306.683868508095, 8498.953442175642, 8114.077760774463, 1104.754624226918, 311.0692755307476, 2531.60881014545, 8451.28820029444, 3200.6570105366095, 2869.6853746417128, 1238.5022469776386, 231.89892573873271, 7233.737255599893, 8333.686335655733, 3494.76478845981, 6358.858772951813, 1592.5661835891135], [8729.302351090198, 6384.546837461195, 7171.290584657766, 5957.659783638356, 9085.037001227132, 5768.356633124855, 8327.482562249292, 5395.921276883439, 1861.2599624881498, 4765.111906737132, 3378.3810534074432, 9947.647762912382, 6959.705326382867, 3716.9948860458167, 3062.662164010396, 4763.191664464988, 7812.697916882337, 7917.498627199334, 8870.650688899828, 5065.742181053909, 2624.806153972363, 2975.0483110771174, 4364.205465054759, 3188.4425422580866, 8720.977081893758, 1459.87953565746, 4572.8264886204215, 2324.1540757260946, 5840.324208567349, 659.1512944086209, 6387.2382456619625, 1706.1961811177118, 4070.0269992801395, 6180.002343467976, 1707.116403493727, 1552.491504085135, 1627.8271363780805, 710.7568621692617, 2873.2219438669295, 6894.1926098992, 345.15307520545105, 3662.3233518062393], [3211.713546228133, 7896.40777964658, 5300.8078149063485, 6851.224397907975, 5696.065461614853, 5114.791911160674, 2564.1730817028897, 935.5405348126611, 5153.847785482536, 4577.349093295708, 669.4749252740984, 6331.618429957198, 9752.5524618502, 4348.913289388088, 5360.501700968088, 1947.5177649733143, 8717.345541701521, 2764.158876222086, 8439.468669204629, 4053.560412732092, 7445.1623077869335, 2681.809445597795, 227.24520795759483, 5796.36709151562, 1742.0265345346274, 8771.734793785536, 7678.398207518567, 5661.038366465821, 3269.4432986394963, 8668.907656759158, 1676.1950842333351, 5480.716778416091], [936.6238554926199, 4417.071383868515, 6954.953579576183, 5108.719616062134, 7182.39821842807, 893.3269681291046, 9329.321095066078, 4580.047117025584, 8767.112017513396, 5860.985413993845, 8199.847852762732, 1222.4269503900243, 6936.2060001009595, 8505.84929950005, 9178.71060254381, 3564.7845125447475, 5204.125789379878, 746.5779862826249, 3612.5357492902167, 8863.338857356202, 3207.8067128192033, 6411.350131694356], [6971.463246366584, 8656.829488481588, 4716.397759444882, 1871.0559596524602, 1400.7186558055407, 7972.157112200225, 2785.2894228904734, 1230.437360694544, 8007.762276598806, 2879.918281682995, 7129.5575876408775, 1804.8918776007638, 9866.87453607941, 8137.058205998907, 9310.146806768604, 8140.789040813295, 6053.202509221739, 1291.6766981885764, 5042.499167167728, 6617.2901410157865, 5184.765799310381, 8442.95630985222, 5949.8689231126455, 5292.165955504016, 2849.4937899043603, 4906.261299495095, 966.3171571506301, 8454.562916281682, 7489.005406107537, 3920.8761213857024, 8798.627174192734, 2997.865499624235, 1711.347679688806, 4027.298254353501, 2665.297130518587, 4207.206327946828, 2414.3945246142307, 4847.717343608347, 1070.5167501685087, 1704.8851914439756, 8171.119375036566, 3723.606800733539, 142.2932030262325, 9127.383634043443, 7118.072266257432], [339.52074175386815, 6222.346927985851, 7378.5920594735, 6483.541708564634, 362.64537232048144, 7138.700983753719, 2240.2956832486807, 2513.294144642031, 5297.54986666968, 7336.701719593464, 8533.030287569201, 5619.9926655639065, 6020.148727640418, 9972.565222705252, 2138.7215246647575], [9334.18747439277, 2305.316444035084, 1496.1818919744728, 2631.664575282966, 1560.644447319053, 8017.229344306232, 6842.526322961845, 2122.802524963182, 1925.0851490635769, 2446.861091468323, 9263.77307980419, 1483.1424881051537, 5287.2562923501, 9035.859888041217, 8023.375373059005, 1509.7451515868177, 5603.488799339734, 6952.921883793975, 2520.825724984489, 4774.46952604118, 3150.932309635256, 9437.021148222304, 5408.13867691267, 9230.165088724967, 7807.315410083818, 5405.386628850249, 1262.2511910367418, 697.3644405937873, 698.5354770211683, 1350.5821712909406, 5683.304986640956, 9411.453890399667, 7917.412705783028, 8454.459445136355, 7206.496995251545, 4184.077101861108, 6457.784133948724, 7829.579341560543, 9782.181419945555, 3072.675129166752], [8633.9400207655, 9053.67914423705, 9081.024953660442, 2853.802978909221, 7098.6377709172775, 6442.001286495734, 5352.453679308428, 6033.86163930825, 5295.367200513826, 2677.067926657917, 7715.416997612096, 3788.755738261852, 9546.352816383147, 2191.2027293058445, 5191.987053619508, 7361.459537716426, 7500.956977764495, 370.7365519990435, 2962.269562256985, 661.6552510251239, 1609.4504154422318, 3988.587061330161, 2398.369174193682, 1708.5280616204134, 2284.260481124326, 1232.8130458617104, 7282.24314102055, 6095.510118039444, 8316.544395798997, 4280.1892659343575, 8407.096352421157, 3773.58249506053, 5866.478536674913, 1059.4976355232154, 4198.072679613927, 4234.325659104923, 5473.390130450675, 2776.1105772896135, 1674.2483340926185, 9810.681965224623, 8123.877611121171, 2880.6804254366057, 611.8050413036724], [2993.2135939667937, 6516.371756368651, 3243.954240688501, 1707.4419839480238, 6117.910093882588, 2728.1465292580765, 6634.197180792388, 4372.280063161229, 9906.755136519236, 5628.301297423993, 4325.8026028396025, 5809.6193319701715, 4537.666496279663, 5195.153570340511, 1449.7797935032452, 5993.770275452789], [4543.424826252607, 8348.648362364054, 804.5165023634681, 1729.8028197600313, 1522.5403036030073, 3062.049396246639, 5614.200983933174, 5394.364801574996, 6082.364911270015, 7322.660128770181, 105.67616713120897, 3780.024680250308, 2043.1384239018603, 1911.4871928662747, 6600.417413983897, 5725.222210135139, 3159.2736284331845, 7911.867143170885, 6910.232736464181, 5082.363943676784, 398.9266438123795, 6600.002726524873, 9718.957727352494, 373.35598181310934, 1769.8440978937858, 1423.7660839786836, 6709.319258322703, 8863.059005113284, 8818.99294307518, 6869.765112779014, 2299.7066087856288], [5904.333165248659, 3737.2540517941134, 3234.8010931379345], [8741.274694147212, 8142.366348649237, 7178.080069844503], [9806.546398158205, 4111.328970709272, 1297.6979885312844, 6671.312196519337, 919.8636669576166, 3674.7691763561584, 9558.015583014578, 179.15421355732875, 6633.7786907057525, 5145.041583744364, 9650.732970966015, 2262.287535355311, 4078.381954659066, 9352.614142347535, 979.6245727881725, 1961.1517367115562, 671.592570513081, 4430.339128069768, 2945.127026543707, 6308.61484052264, 639.7007227096851, 5329.702461652472, 4258.603814362332, 2386.0945919632636, 7582.27847122242, 531.7809464507307, 619.6474357889825, 9850.258845427983, 3376.8188352510665, 1443.5852603295095, 5965.538654258386], [4064.611605775853], [8699.678950267016, 2638.8791938900504, 9864.32576829143, 9545.45934752491], [8967.277929781716, 158.487360223436, 2706.512848604518, 7632.722968650326, 9493.606876017158, 722.3053012762348, 6964.558269251513, 3890.6533336777193, 7324.280695126543, 2114.987955696953, 6493.602831666873, 7861.736242257294, 4577.950198510346, 1258.5279257186965, 8413.280602583125, 9809.221728733319, 9999.85897125298, 2687.9513051743697, 4310.701528942745, 8308.434209993517, 4632.868040691614, 1557.6045146848705, 2024.6772936559332, 4584.237100857744, 1162.3893821891406, 9006.014395722459, 8980.135554758763, 9645.94750029713, 5807.972419276929, 9641.914592343957, 6119.365848988399, 8925.074625708212], [3961.038699627797, 7941.386171416613, 8497.2079090036, 950.7156317300869, 1002.2655576124373], [4770.970512462653, 5751.274214977394, 7374.385304920768, 6583.555487016266, 1354.1896365063787], [9019.53955445245, 6116.076908287135, 8146.602392879152, 72.65131447226403, 1516.6254211993412, 8039.461012121285, 5038.821843934121, 8391.976024847978, 456.503039225048, 2670.191490719758, 3515.763578768253, 1092.421155822273, 6164.620640238656, 545.5694373578046, 4279.737736096799, 495.9879677990009, 4625.2520594959715], [1439.336923533866, 1302.3118323967053, 167.48167583331974, 6295.610633433874, 6721.42085515711, 6293.501666300752, 443.10543686137737, 5790.080920213072, 8246.409203016145, 1090.7269189639735, 3732.488593915935, 2911.804873618257, 9941.921987305477, 3792.731907876411, 4534.224944059517, 1472.278357602025, 5275.2635084540525, 859.5210260889396, 9597.694442577425, 4899.437560961888, 3899.188565008336, 291.1982655390333, 7689.693286997743, 8893.026162327125, 4327.722294090344, 5068.436180974043, 5900.3279123267785, 7465.30143721741, 7167.568894492006, 4383.153760951697, 6514.683704147853, 3810.559736196162, 2522.446986633412, 8028.80881494865, 8593.830034608267, 7739.336291343238, 2193.260515869928, 4073.821932851648, 7770.88670948187, 7663.446075181924, 5361.707839001343, 5038.736484800433, 6054.88382711972, 8169.620671795285, 9367.954744778806, 2939.9653782874825, 9453.300074929695, 2797.1126437886173], [1566.286547919663, 8936.617547502176, 9231.73742747379, 5926.868366854842, 9103.397262654895, 8368.856835536099, 7101.186219987764, 7810.498315791292, 7975.613043686254, 6534.1573199897975, 3221.878461550536, 8047.027853088147, 4308.07219595293], [4698.9398220605735, 1381.493549044479, 2511.354007653047, 1792.9062150709663, 3433.3984663747965, 6310.645731404196, 9282.773595893277, 1436.72903578846, 4255.664980727647, 5442.018955197633, 9070.360569097147, 997.3894557292784, 6111.892651874234, 9341.385608723269, 478.81757295908267, 1351.2651210460015, 1523.9132106506759, 7642.007210066544, 8023.924071903322], [6975.216490755457, 545.726967916269, 7829.418625853173, 285.96897390028687, 1788.3485134839195]],) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHOCOLATE_DISTRIBUTION_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHOCOLATE_DISTRIBUTION_PROBLEM{ static int f_gold ( int arr [ ] , int n , int m ) { if ( m == 0 || n == 0 ) return 0 ; Arrays . sort ( arr ) ; if ( n < m ) return - 1 ; int min_diff = Integer . MAX_VALUE ; int first = 0 , last = 0 ; for ( int i = 0 ; i + m - 1 < n ; i ++ ) { int diff = arr [ i + m - 1 ] - arr [ i ] ; if ( diff < min_diff ) { min_diff = diff ; first = i ; last = i + m - 1 ; } } return ( arr [ last ] - arr [ first ] ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,5,11,23,33,35,39,51,52,56,74,76,76,79,85,88,93,98}); param0.add(new int[]{-42,76,-34,-74,16,4,88,-70,-88,-94,-24,4,-14,-56,56,-18,84,0,-48,-94,72,42,36,52,74,-84,-50,16,30}); param0.add(new int[]{0,0,1,1,1,1}); param0.add(new int[]{29,49,88,44,92,43,12,5,38,75,57,3,85,16,86,62,16,40,76,37,5,69,16,63,84,78,74,18,4,89,73,67,60}); param0.add(new int[]{-98,-80,-50,-44,-42,-36,-36,-28,-10,-8,-4,-2,2,10,18,18,26,32,36,56,80,86,88,90}); param0.add(new int[]{0,0,1,0,1,1,1,0,1,0,0,1,1,1,1,1}); param0.add(new int[]{13,15,62,65,87}); param0.add(new int[]{-50,58,78,28,4,18,-8,18,-88,-48,-26,-32,64,48,60,94,-92,48,-36,30,-80,-60,82,-62,32,-36,-76,-88,-60,22,-14,72,30}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{25,17,58,40,53,73,23,77,38}); List param1 = new ArrayList<>(); param1.add(16); param1.add(15); param1.add(5); param1.add(25); param1.add(16); param1.add(13); param1.add(3); param1.add(31); param1.add(9); param1.add(8); List param2 = new ArrayList<>(); param2.add(13); param2.add(28); param2.add(5); param2.add(18); param2.add(12); param2.add(14); param2.add(4); param2.add(17); param2.add(6); param2.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n , m ) : if ( m == 0 or n == 0 ) : return 0 arr.sort ( ) if ( n < m ) : return - 1 min_diff = sys.maxsize first = 0 last = 0 i = 0 while ( i + m - 1 < n ) : diff = arr [ i + m - 1 ] - arr [ i ] if ( diff < min_diff ) : min_diff = diff first = i last = i + m - 1 i += 1 return ( arr [ last ] - arr [ first ] ) "," using namespace std; int f_gold ( int arr [ ], int n, int m ) { if ( m == 0 || n == 0 ) return 0; sort ( arr, arr + n ); if ( n < m ) return - 1; int min_diff = INT_MAX; int first = 0, last = 0; for ( int i = 0; i + m - 1 < n; i ++ ) { int diff = arr [ i + m - 1 ] - arr [ i ]; if ( diff < min_diff ) { min_diff = diff; first = i; last = i + m - 1; } } return ( arr [ last ] - arr [ first ] ); } int main() { int n_success = 0; vector> param0 {{2,5,11,23,33,35,39,51,52,56,74,76,76,79,85,88,93,98},{-42,76,-34,-74,16,4,88,-70,-88,-94,-24,4,-14,-56,56,-18,84,0,-48,-94,72,42,36,52,74,-84,-50,16,30},{0,0,1,1,1,1},{29,49,88,44,92,43,12,5,38,75,57,3,85,16,86,62,16,40,76,37,5,69,16,63,84,78,74,18,4,89,73,67,60},{-98,-80,-50,-44,-42,-36,-36,-28,-10,-8,-4,-2,2,10,18,18,26,32,36,56,80,86,88,90},{0,0,1,0,1,1,1,0,1,0,0,1,1,1,1,1},{13,15,62,65,87},{-50,58,78,28,4,18,-8,18,-88,-48,-26,-32,64,48,60,94,-92,48,-36,30,-80,-60,82,-62,32,-36,-76,-88,-60,22,-14,72,30},{0,0,0,0,1,1,1,1,1,1,1},{25,17,58,40,53,73,23,77,38}}; vector param1 {16,15,5,25,16,13,3,31,9,8}; vector param2 {13,28,5,18,12,14,4,17,6,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 5, 11, 23, 33, 35, 39, 51, 52, 56, 74, 76, 76, 79, 85, 88, 93, 98],16,13,), ([-42, 76, -34, -74, 16, 4, 88, -70, -88, -94, -24, 4, -14, -56, 56, -18, 84, 0, -48, -94, 72, 42, 36, 52, 74, -84, -50, 16, 30],15,28,), ([0, 0, 1, 1, 1, 1],5,5,), ([29, 49, 88, 44, 92, 43, 12, 5, 38, 75, 57, 3, 85, 16, 86, 62, 16, 40, 76, 37, 5, 69, 16, 63, 84, 78, 74, 18, 4, 89, 73, 67, 60],25,18,), ([-98, -80, -50, -44, -42, -36, -36, -28, -10, -8, -4, -2, 2, 10, 18, 18, 26, 32, 36, 56, 80, 86, 88, 90],16,12,), ([0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1],13,14,), ([13, 15, 62, 65, 87],3,4,), ([-50, 58, 78, 28, 4, 18, -8, 18, -88, -48, -26, -32, 64, 48, 60, 94, -92, 48, -36, 30, -80, -60, 82, -62, 32, -36, -76, -88, -60, 22, -14, 72, 30],31,17,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],9,6,), ([25, 17, 58, 40, 53, 73, 23, 77, 38],8,6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS_1{ public static int f_gold ( int arr [ ] [ ] , int n ) { int d1 = 0 , d2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { d1 += arr [ i ] [ i ] ; d2 += arr [ i ] [ n - i - 1 ] ; } return Math . abs ( d1 - d2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,2,4,8,12,15,17,17,19,19,21,26,27,28,32,33,40,41,41,46,46,47,48,56,59,62,68,68,69,76,80,81,82,83,86,88,90,91,93,96,97},new int[]{3,7,8,9,10,13,16,18,20,22,22,24,26,27,31,33,33,34,37,43,45,46,46,46,47,49,50,51,55,57,67,75,75,83,87,87,90,90,92,93,97},new int[]{5,5,5,8,11,14,18,24,26,28,28,31,35,36,37,43,43,50,56,56,59,61,62,62,64,66,66,67,74,76,76,79,82,83,84,87,87,87,90,96,98},new int[]{4,13,13,20,21,22,22,29,30,31,35,38,38,39,41,42,43,43,51,56,56,63,65,66,74,79,80,82,84,84,86,87,87,89,91,92,92,94,94,96,99},new int[]{8,11,12,17,17,18,21,24,24,26,26,26,27,28,28,28,29,32,36,36,40,51,53,59,64,65,68,72,73,73,77,81,81,82,83,85,87,89,92,95,99},new int[]{1,3,6,7,7,8,9,9,12,13,13,14,15,17,20,20,21,27,36,36,40,44,51,51,55,57,62,68,68,70,81,82,87,89,90,93,94,97,97,98,99},new int[]{4,6,7,11,14,21,21,22,25,25,28,30,39,40,40,43,45,46,46,51,53,57,60,62,64,65,66,68,70,72,73,80,81,81,84,84,86,91,92,95,95},new int[]{1,1,3,5,5,9,11,11,11,13,16,17,20,28,31,31,36,37,38,38,41,42,44,47,49,53,54,58,60,67,68,70,72,72,76,80,81,82,87,88,99},new int[]{8,8,10,16,16,17,20,26,29,29,31,36,40,42,48,50,55,56,56,59,61,64,64,70,77,77,78,78,81,84,84,87,88,93,93,93,95,95,96,97,97},new int[]{2,2,5,7,9,10,11,14,15,15,16,16,22,23,26,26,31,32,33,36,42,49,51,53,56,58,61,75,76,77,77,80,80,82,82,83,84,85,90,90,94},new int[]{3,6,7,9,9,10,11,12,19,22,25,30,32,32,33,34,35,36,36,37,40,41,43,43,44,44,51,58,62,62,69,69,78,78,80,83,85,91,93,97,99},new int[]{1,4,5,7,7,7,15,16,17,18,21,21,26,31,36,39,39,47,49,53,56,59,60,63,63,64,64,66,69,70,77,79,80,80,82,84,86,87,89,98,98},new int[]{1,6,9,11,12,14,21,22,29,31,32,32,34,37,37,37,43,44,47,52,55,57,58,61,61,63,64,65,70,71,71,74,74,77,77,80,81,86,91,91,97},new int[]{1,3,4,10,10,19,20,20,21,21,23,27,27,33,35,36,36,41,41,42,49,51,51,51,54,56,59,61,61,66,67,77,81,82,82,82,85,87,93,94,95},new int[]{7,9,9,12,15,19,24,28,30,32,36,39,40,41,51,55,55,55,56,56,57,58,63,64,71,73,74,76,76,77,77,80,81,89,91,91,92,94,95,97,99},new int[]{2,2,6,11,13,15,16,17,18,21,24,30,30,33,34,35,36,40,41,44,46,47,51,52,53,53,55,56,60,62,68,73,77,78,79,83,85,91,94,96,96},new int[]{2,3,6,7,8,8,9,15,18,24,25,30,30,38,41,44,44,47,49,53,59,60,61,65,65,71,77,78,80,84,84,86,86,87,88,88,90,91,91,95,96},new int[]{1,10,11,16,16,16,25,26,28,31,31,32,33,34,34,36,37,38,46,50,52,55,56,58,61,62,67,71,72,75,77,83,84,84,85,87,88,95,96,97,99},new int[]{1,3,4,5,7,8,9,12,13,13,18,20,24,27,33,35,39,44,49,56,56,61,61,67,70,70,70,70,71,71,71,76,78,78,84,88,89,91,94,95,99},new int[]{1,1,4,5,6,7,11,16,20,22,23,27,35,36,39,39,44,46,46,49,51,51,52,55,56,56,58,65,70,77,78,82,82,82,84,88,89,96,98,98,99},new int[]{3,3,5,5,9,12,14,17,22,31,33,34,36,36,38,38,39,45,46,47,48,48,50,55,55,56,59,63,64,67,68,70,72,74,80,80,82,84,87,93,95},new int[]{4,8,16,17,17,18,18,23,24,27,28,32,36,39,40,42,45,48,48,52,52,53,55,56,57,57,66,67,68,70,71,74,74,74,75,77,80,81,84,92,92},new int[]{4,4,5,8,18,18,19,20,21,21,25,25,25,28,31,38,42,48,54,56,58,59,61,61,63,66,67,67,68,71,74,75,77,77,78,84,86,88,93,94,99},new int[]{3,5,5,8,10,12,13,20,21,22,25,33,38,39,41,44,47,47,48,49,50,52,59,62,64,65,67,68,69,70,70,75,78,79,80,81,83,84,87,90,99},new int[]{3,7,9,9,11,13,13,13,14,15,17,24,26,29,29,33,34,35,37,40,41,45,50,50,53,56,57,59,62,62,63,65,72,72,76,78,79,86,87,94,99},new int[]{2,2,6,7,12,13,13,13,15,16,17,18,22,23,24,24,27,28,34,40,40,42,43,48,49,52,53,54,55,57,60,66,71,71,71,73,74,93,96,96,97},new int[]{1,1,2,2,3,3,4,4,6,18,20,25,26,26,27,30,32,38,39,41,48,50,53,57,61,63,64,65,66,67,67,68,71,73,81,84,91,91,91,94,99},new int[]{2,3,3,4,5,7,10,11,12,13,14,14,14,15,16,17,17,18,26,27,40,41,42,43,47,47,48,48,55,63,64,75,78,83,83,87,88,89,92,98,98},new int[]{1,2,6,6,8,13,13,22,23,25,25,26,28,28,34,37,40,44,46,50,54,58,62,62,65,67,72,79,80,81,84,85,85,87,88,89,92,95,97,97,97},new int[]{3,4,6,6,11,12,12,15,19,20,22,26,34,37,41,44,52,56,56,60,69,69,70,71,72,72,73,79,79,83,85,90,90,91,93,94,95,96,97,98,99},new int[]{2,4,5,6,8,9,15,17,21,21,24,24,30,32,34,34,35,37,38,39,39,41,43,43,43,47,51,51,54,55,61,63,64,71,74,78,78,80,84,85,96},new int[]{2,2,7,8,9,9,9,10,14,14,14,15,20,21,26,26,27,28,29,36,37,39,40,40,41,45,48,49,61,62,66,67,69,70,71,75,75,76,80,90,97},new int[]{1,3,11,11,11,12,15,17,19,20,25,27,28,40,51,52,53,53,57,58,58,62,68,72,72,73,76,76,81,83,84,86,86,87,87,89,92,94,94,95,95},new int[]{7,7,8,13,16,16,23,23,24,24,30,33,37,38,39,42,48,52,53,54,56,56,64,64,65,66,66,68,70,71,72,72,78,81,83,85,86,87,90,90,92},new int[]{3,4,4,5,13,17,17,21,28,33,34,34,34,35,37,38,45,50,55,60,63,64,65,67,67,68,69,70,71,79,79,80,80,84,85,93,94,94,96,97,98},new int[]{10,13,15,17,19,20,21,21,22,29,29,30,35,39,39,44,44,47,49,49,50,50,52,53,55,57,57,59,60,61,64,67,69,72,75,78,80,87,88,89,98},new int[]{8,9,9,13,28,29,32,32,33,34,38,40,40,42,45,51,51,54,55,57,57,59,63,69,69,69,70,73,76,77,78,78,85,85,87,88,91,95,96,97,99},new int[]{2,5,7,8,14,17,19,20,21,24,25,28,29,32,33,37,44,45,52,54,58,58,62,62,63,63,65,65,71,72,74,81,86,86,91,91,91,93,93,96,98},new int[]{3,8,12,13,16,21,22,23,33,40,42,42,46,48,50,50,54,57,64,64,68,68,68,73,74,74,77,77,78,79,82,85,86,88,92,92,94,97,97,98,98},new int[]{5,6,7,8,9,12,13,19,19,27,29,34,36,38,39,41,43,44,47,49,50,53,57,57,59,61,62,65,65,68,75,77,80,81,82,84,85,88,89,92,94},new int[]{3,3,4,8,12,20,25,26,30,32,33,41,41,43,45,46,46,47,50,54,54,57,57,62,63,65,67,68,69,70,72,73,75,77,83,85,86,93,93,97,97}}); param0.add(new int[][]{new int[]{52,-18,-36,-28,-14,92,80,-48,28,-18,-46,76,-96,4,-50,-80,-40,34,36,-66,-66,48,-8,-36,10,26,-46,80,-22,-90,66,82,22,30,-32,96,30,-4,70,-92,90,-26,18,-48,72,-88},new int[]{14,-90,60,50,54,78,46,26,-46,94,46,42,-48,96,18,-84,42,16,-58,-96,-80,-66,-50,-32,-48,-8,34,42,40,34,12,-34,-94,18,60,30,-48,8,30,-24,10,-26,-12,-58,62,96},new int[]{-22,-24,-6,16,80,86,-30,-66,94,10,-42,0,-92,-28,82,-16,-94,-40,72,-76,66,-70,94,68,-20,-30,48,80,-96,-56,-70,-82,-22,-78,12,-20,-2,80,-96,-10,12,-10,32,66,26,22},new int[]{18,72,76,82,-20,-64,16,70,72,32,-34,-98,-22,24,-68,0,-14,-60,-66,16,-20,-40,-64,42,14,-70,-30,48,40,12,-82,-30,-36,-36,60,-48,78,-66,46,-52,68,-60,88,-10,-42,64},new int[]{58,-48,0,78,-74,84,-14,54,-68,48,84,-2,-74,-20,32,40,4,8,38,-24,58,56,76,-88,-18,90,-94,-64,-76,-8,-88,-20,-66,-4,-20,-70,34,66,12,8,-38,8,92,-98,-32,-44},new int[]{96,-20,6,-36,54,-82,-74,-98,-58,-32,-42,26,34,72,-98,-2,40,-90,16,-66,70,-10,36,-84,8,-22,-18,24,-92,12,34,30,-74,54,46,26,-52,-48,-86,78,16,-94,-12,-24,64,-42},new int[]{-74,-4,-70,-32,24,72,8,66,52,-34,-84,-70,82,-96,72,90,0,18,26,48,98,-92,-26,0,-78,-52,94,-12,-60,-54,16,98,96,-68,26,84,24,-28,42,-32,58,4,-78,46,-96,-2},new int[]{-74,-46,62,-52,-30,36,-52,64,66,4,18,76,8,82,90,72,-64,24,86,-46,72,58,-10,46,-8,-20,-18,-24,-4,52,96,44,-18,-84,-64,-56,76,54,-84,-12,-32,52,62,10,52,68},new int[]{-44,20,44,-20,94,76,94,-40,40,-74,-56,78,20,38,-56,-2,-34,-6,-24,-62,72,-36,42,32,56,24,38,6,8,-78,-64,-38,58,-98,16,38,92,-4,-38,-22,-62,96,34,64,-32,-98},new int[]{34,-96,-98,10,40,2,26,14,18,-12,-16,84,-74,0,-98,38,-48,18,22,-32,-52,-2,28,-50,64,10,80,6,20,0,66,80,96,14,20,-56,18,80,-16,74,-74,26,-70,58,74,32},new int[]{72,-52,2,-90,-56,98,-50,10,-60,84,24,-88,-98,-48,54,44,-84,10,-18,68,40,40,-46,-18,60,-58,-50,26,74,-24,-64,-70,44,-40,18,-88,-60,82,-60,26,-66,-68,46,60,92,84},new int[]{96,26,-46,94,-48,24,50,-10,24,-50,86,-76,-78,98,-28,-60,-62,-32,-74,-18,96,-44,-72,-56,12,-28,70,-16,48,-26,86,-24,44,56,82,-34,30,36,-34,92,-80,-50,-54,-20,-52,48},new int[]{74,-70,64,-98,-40,-14,-82,56,82,-16,-76,-56,22,64,-84,-48,44,70,30,56,-84,-80,-44,-30,-38,96,58,-18,56,-42,-54,20,-60,82,-94,-8,40,-16,-94,-70,30,-82,74,4,-36,-42},new int[]{24,-10,16,-4,50,-8,58,-24,-90,-90,52,16,96,74,36,-92,-28,-84,6,70,54,60,26,42,34,22,4,-48,-96,20,88,34,78,12,-62,-6,80,30,86,74,68,-18,42,-50,-80,32},new int[]{62,90,6,66,-26,-98,-80,46,-52,-22,10,-60,62,92,16,78,52,22,70,28,98,28,-94,70,-68,-84,32,-86,38,-6,-94,10,-4,-84,74,42,-10,-82,12,-6,-8,14,-30,72,18,12},new int[]{78,-18,56,90,-74,82,20,-90,26,40,-72,-46,-76,14,-58,58,30,-58,-62,-62,70,-4,-62,-64,-88,96,80,74,30,12,44,78,76,76,-48,-38,-12,22,-90,0,-26,28,88,80,38,66},new int[]{-58,10,22,-26,46,-48,-76,92,26,52,24,-30,56,-68,2,72,-44,34,-72,-24,34,64,72,-10,16,-26,0,60,18,-44,-18,-36,-94,38,22,80,-78,-78,-48,98,64,30,72,14,-22,22},new int[]{-30,82,38,-2,-60,-28,-4,-36,22,-64,48,-14,-26,-10,62,-10,-68,54,-6,-26,-32,-66,-84,-12,56,42,-64,14,86,76,-24,-36,38,98,56,-14,-52,44,-44,-88,-26,-10,14,-2,-12,-14},new int[]{-58,50,18,30,80,78,22,22,12,90,0,-20,50,20,82,-70,-26,-28,-90,58,-24,18,54,62,48,20,96,-10,72,70,-98,64,-56,42,76,58,-84,-62,40,-78,-22,-98,42,54,-34,10},new int[]{42,64,-40,-90,-8,-54,-42,80,-28,-18,8,28,-10,36,12,86,28,-16,66,10,6,86,60,-92,-92,-16,-84,-84,-50,76,-2,68,80,-62,54,-90,-96,48,2,-42,70,68,-24,92,14,-46},new int[]{-96,20,10,64,-66,84,-52,-74,-96,-88,-96,6,-32,-10,-40,-2,4,22,24,-60,-54,-62,-58,-30,-80,-94,-50,-72,74,50,84,-6,12,-28,46,64,-36,-52,-24,56,56,-16,80,-74,-94,50},new int[]{-66,62,46,-38,-50,78,2,96,-50,-2,-64,-86,-26,-4,-92,78,-16,64,-74,6,34,-54,40,62,-8,30,46,-88,68,52,46,84,-90,6,86,58,-70,86,54,80,-6,30,44,-6,2,42},new int[]{-44,-76,40,-30,-38,14,-24,-10,-28,-54,90,-64,66,88,62,94,-56,72,4,46,60,70,-92,-48,-62,-94,96,-40,74,-40,-28,-44,64,-54,14,-42,-74,-24,18,46,-48,60,16,-78,-74,-82},new int[]{-8,-94,-56,90,22,-36,-66,28,48,-28,92,38,-8,14,34,46,62,12,2,-38,-44,16,-66,-56,-74,98,92,-42,-42,-32,82,-42,-12,-76,18,54,16,0,92,12,96,86,94,-60,-62,-50},new int[]{-14,-88,-20,-60,36,-90,-24,90,-24,70,10,22,-10,-88,-90,-72,-60,-62,-58,98,24,-52,-70,82,84,24,94,-16,-70,-16,84,-34,72,-42,66,36,-38,-20,-22,12,-30,48,-2,-58,-26,56},new int[]{52,40,28,-48,-80,-58,50,34,-94,-24,-94,-24,-44,4,-90,84,84,-66,76,36,-62,-22,8,32,24,-86,-52,16,52,24,66,-16,38,54,56,92,84,-46,88,22,92,-58,-14,12,82,92},new int[]{-98,38,16,44,-10,32,68,-90,94,-16,-90,38,96,-82,68,-72,-80,-54,-68,0,58,-12,56,-46,68,4,-52,4,2,-96,-78,80,50,4,20,80,62,-40,-82,-22,90,44,88,68,-72,66},new int[]{-28,54,-12,96,94,40,10,-18,28,46,8,48,74,58,94,10,-30,-50,-2,-80,-22,-70,30,-16,26,78,-84,-50,-2,-66,-18,98,-94,-6,-2,-44,-48,2,78,94,-90,32,-90,-56,-90,0},new int[]{-36,-40,-28,94,-96,-16,8,12,94,52,52,-56,-66,86,-10,-68,38,-16,-72,94,-68,26,58,-74,22,-84,-50,-8,32,66,20,94,-44,-74,-72,-96,38,64,4,-72,-66,-54,44,92,-52,-62},new int[]{-98,-58,-82,-74,38,-6,-86,-98,-60,62,32,-64,12,80,-58,90,-76,-6,-98,78,-12,-20,68,-62,72,-72,90,-24,-84,-84,54,66,46,50,12,98,-4,-90,-46,12,28,76,-54,-24,-12,-26},new int[]{-48,-6,-18,80,-30,44,74,14,-54,64,-68,-2,14,-4,-68,-6,-78,-4,-30,-18,-32,-48,56,-48,-6,-46,34,-96,-44,-84,-34,-12,-20,72,-24,76,46,66,-24,-20,-8,92,92,54,64,2},new int[]{-30,26,-76,-38,-72,36,-32,-22,8,40,72,12,-58,6,-94,-70,-44,56,-88,76,50,-8,76,-74,2,54,-48,56,56,60,72,-30,-42,-54,-28,-80,-64,82,-32,-42,2,-32,-48,64,-66,26},new int[]{66,72,-98,-62,-18,-42,-50,-20,62,-96,-24,-90,-58,82,-76,0,-12,-66,-48,26,42,12,-8,46,-56,-16,-2,-94,16,90,-34,48,34,-44,-66,-70,44,66,6,74,50,96,32,64,82,-10},new int[]{84,48,94,32,44,26,64,24,28,88,42,-54,82,34,16,-14,-46,-94,-76,88,-38,42,-60,-8,4,-70,24,-60,-82,-96,40,20,98,-2,32,-24,54,52,-44,78,-58,-16,-32,56,-20,52},new int[]{34,-90,-10,-10,-8,-28,-34,46,-86,20,-90,-78,94,72,92,-4,-30,84,-32,84,16,94,92,-40,46,58,38,-8,14,58,58,38,0,-30,-30,-40,90,12,26,56,-62,40,8,16,70,4},new int[]{-32,88,70,26,30,62,-18,-50,-78,-18,40,-98,-84,-74,-68,22,8,6,-88,78,14,50,-34,-12,-58,78,32,-6,52,70,-98,32,6,-26,98,-82,-8,-88,-6,-6,84,-28,-68,78,68,12},new int[]{-2,4,82,94,72,-90,2,-8,16,76,-34,72,-26,-86,60,92,-32,82,-88,-42,14,50,94,-98,-50,-78,-86,68,-28,16,-18,-20,-6,-64,-82,68,-86,94,46,-2,78,-24,88,-82,-80,90},new int[]{40,-64,60,-14,98,98,84,34,-36,14,92,50,-30,-38,-28,68,-6,18,-36,-76,-20,-4,62,-6,-58,-50,48,-64,34,-96,76,68,66,86,-2,-90,80,-18,-68,-8,-64,-32,-14,-48,48,-2},new int[]{58,26,56,-88,-92,-10,-14,42,-96,40,24,32,16,38,34,98,54,-36,88,86,-74,40,-68,-26,-14,-74,-82,12,-48,-22,-36,98,-38,-30,-98,-34,-8,84,-34,-98,0,-76,24,-6,94,-64},new int[]{76,48,-14,70,-52,-34,4,-2,-8,84,2,14,16,-40,-90,-66,-22,40,-46,50,-66,-52,54,-68,48,46,-76,98,34,-94,26,62,-38,2,52,0,58,64,-96,52,4,58,70,-24,-96,50},new int[]{30,72,-88,-98,42,76,-52,-88,-32,-2,2,-84,-86,-34,-36,34,-38,-4,-60,-62,54,-52,92,86,6,98,76,38,-56,90,98,-10,66,88,-90,-54,-42,-22,-58,4,92,76,36,76,-68,4},new int[]{8,44,-2,-52,-76,34,-14,-42,-54,30,46,64,14,44,10,-14,-60,-18,16,-80,-6,-10,52,52,90,-88,98,-96,-36,18,-92,10,-52,74,-94,-46,36,-38,-12,66,34,-30,38,26,6,38},new int[]{-84,-22,4,-52,-12,40,-14,44,70,80,72,-16,-38,-44,16,-16,82,-90,-14,24,-98,92,52,-50,40,96,76,-16,-28,-28,28,10,0,-22,16,-62,-34,28,94,-72,20,-30,-20,40,-24,-76},new int[]{-62,98,-82,34,12,14,-64,-34,-70,-24,-34,-92,54,90,-66,-48,-52,-80,-72,-80,-46,-60,76,-2,58,-96,52,42,88,96,-58,-28,-4,48,66,-94,4,90,64,-52,62,80,-98,76,90,-64},new int[]{-88,-40,32,8,94,-12,98,-52,4,-14,52,-72,-4,-84,18,-96,74,80,-12,18,60,32,-68,-94,90,24,34,2,-70,90,52,28,92,58,-20,-52,26,-30,4,96,54,64,64,52,-24,40},new int[]{26,-84,-20,80,-82,40,68,-6,-44,48,48,-36,48,12,-92,-14,66,98,24,42,62,76,50,-62,-30,36,88,-30,-60,94,-44,70,36,-26,-44,-48,22,6,16,26,8,-4,54,-50,92,44}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,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}}); param0.add(new int[][]{new int[]{81,85,4,98,56,46,38,97,79,82,85,7,80,73,25,43,23,2,31,9,16,34,18,10,89},new int[]{22,46,32,7,21,64,50,94,48,44,44,74,34,70,14,16,50,46,84,55,14,71,46,92,38},new int[]{73,57,12,47,18,80,68,28,28,21,10,76,10,23,30,16,34,78,38,86,73,50,63,68,23},new int[]{32,49,77,70,75,40,3,18,23,69,51,36,73,64,54,8,44,55,63,97,37,83,97,5,92},new int[]{79,81,22,50,43,76,4,17,78,58,48,17,84,11,65,37,33,75,51,91,26,80,79,14,61},new int[]{73,21,41,90,65,33,41,63,58,78,71,8,41,2,56,88,78,56,70,36,94,16,40,40,24},new int[]{93,81,96,8,40,57,17,29,95,31,42,70,73,58,63,66,44,8,76,4,30,9,73,30,57},new int[]{60,65,25,64,74,5,58,33,50,64,59,18,78,18,80,81,46,18,71,13,13,27,14,4,96},new int[]{97,55,80,68,84,54,56,13,59,47,59,60,60,33,90,26,26,31,2,92,59,96,69,90,78},new int[]{17,57,22,75,4,25,11,46,48,81,10,44,46,90,54,47,28,10,89,12,44,37,36,59,37},new int[]{41,5,42,76,18,86,15,31,20,18,59,24,11,3,84,95,36,72,68,77,93,26,23,46,96},new int[]{57,2,76,61,78,77,68,57,74,23,80,89,58,76,89,1,21,37,38,89,10,23,65,81,24},new int[]{53,40,5,49,23,54,48,71,45,56,70,95,93,28,74,97,71,43,26,77,59,69,57,24,61},new int[]{8,94,80,64,93,48,15,13,9,28,22,89,46,32,39,88,25,94,61,94,41,96,18,33,68},new int[]{55,12,55,98,37,89,10,59,37,2,9,61,7,60,56,43,60,72,87,13,3,53,24,69,51},new int[]{81,44,2,90,81,75,56,15,23,16,51,80,72,77,88,54,6,66,18,15,23,50,95,3,10},new int[]{20,24,35,36,38,44,43,56,39,90,78,13,88,19,5,89,11,67,25,70,41,21,47,44,46},new int[]{1,58,92,87,51,24,53,71,79,25,62,74,8,69,32,73,68,26,12,84,7,4,21,11,64},new int[]{38,69,28,6,5,64,25,11,77,56,49,62,61,28,2,93,60,63,77,83,37,79,24,61,71},new int[]{59,21,91,87,47,14,49,70,8,67,25,13,73,24,28,46,94,75,45,18,64,16,45,97,72},new int[]{84,26,36,48,75,67,66,58,81,83,71,88,31,60,67,30,22,39,49,46,75,53,25,54,95},new int[]{37,14,8,10,99,13,27,16,17,29,28,14,11,55,40,68,7,58,27,6,33,27,28,36,6},new int[]{28,3,96,18,96,58,15,46,63,70,38,76,89,71,16,68,69,3,2,52,1,78,26,24,28},new int[]{98,37,55,48,7,9,40,97,73,46,38,9,56,14,73,33,38,3,48,81,66,91,14,55,41},new int[]{42,34,27,88,76,14,69,45,7,93,56,23,36,24,90,93,91,3,49,54,5,80,31,65,66}}); param0.add(new int[][]{new int[]{-68,-68,-50,-30,0,36,44,46,56,80},new int[]{-88,-84,-80,-54,-30,-16,44,80,80,82},new int[]{-78,-66,-46,-44,2,42,52,56,62,92},new int[]{-96,-80,-56,-32,-14,0,2,20,30,92},new int[]{-80,-78,-46,-16,-12,-6,26,66,72,98},new int[]{-62,-52,-52,-22,-12,2,10,42,90,96},new int[]{-88,-74,-74,-64,-54,-52,2,34,78,82},new int[]{-78,-26,8,14,42,42,76,78,86,96},new int[]{-78,-70,-68,-22,-12,20,58,60,84,98},new int[]{-98,-56,-48,-20,-20,10,48,60,60,86}}); param0.add(new int[][]{new int[]{0,0,1,1,0,1,1},new int[]{0,1,0,1,1,0,0},new int[]{1,1,1,1,0,1,0},new int[]{0,0,1,0,0,0,1},new int[]{1,0,1,0,0,0,0},new int[]{1,1,1,1,1,1,0},new int[]{1,0,0,1,1,0,1}}); param0.add(new int[][]{new int[]{4,5,8,14,14,15,16,18,18,19,21,23,30,31,33,36,38,39,40,45,47,50,55,57,59,59,62,63,63,68,69,70,70,73,73,77,80,81,83,85,88,90,91,97,97},new int[]{1,2,2,3,7,8,11,12,15,18,27,29,31,32,35,39,43,46,47,49,50,52,54,56,56,56,57,57,60,61,62,68,68,71,77,78,79,81,81,87,87,88,89,92,93},new int[]{1,7,11,15,16,18,27,27,29,29,29,31,34,39,43,44,47,52,52,55,55,56,62,68,70,72,73,73,75,76,77,78,81,84,84,87,87,88,89,90,91,91,94,96,98},new int[]{3,3,4,12,16,17,17,19,28,28,29,29,30,30,31,31,33,33,36,44,44,44,45,45,53,54,54,54,57,63,64,66,67,69,69,75,78,79,82,87,91,92,95,95,99},new int[]{1,1,2,5,6,9,10,11,16,17,18,20,24,25,25,26,26,26,28,29,30,35,36,36,46,47,53,57,58,58,61,61,62,71,73,75,80,81,87,87,89,90,91,96,99},new int[]{4,8,14,17,17,21,24,27,29,31,34,36,37,37,40,41,42,44,44,45,46,47,50,54,63,64,65,68,73,73,73,76,77,79,80,82,82,83,84,88,90,93,93,95,95},new int[]{1,5,9,10,10,12,13,15,16,17,17,24,25,26,29,32,34,36,37,43,44,49,53,54,54,56,57,65,70,72,72,76,77,78,78,80,80,80,83,86,90,90,94,96,97},new int[]{5,9,10,10,10,11,11,11,15,18,18,19,24,26,31,31,33,36,41,43,43,45,50,51,54,54,54,62,64,64,66,71,71,72,73,73,79,82,83,84,86,88,93,96,97},new int[]{1,3,7,9,9,10,13,15,16,22,22,24,24,26,34,36,38,38,39,40,40,41,43,45,49,53,58,60,64,67,69,70,75,77,80,81,84,84,85,85,86,89,93,97,99},new int[]{3,4,5,6,7,11,11,11,13,13,15,16,19,20,21,25,25,26,27,29,38,39,44,44,50,51,51,54,54,54,61,62,65,67,68,71,71,73,73,75,77,89,89,93,95},new int[]{3,5,8,13,14,15,20,23,25,25,27,28,28,29,37,38,41,42,44,45,47,48,50,54,61,64,64,71,72,74,76,76,79,79,79,80,81,81,82,83,84,95,95,95,96},new int[]{4,5,7,8,9,10,13,14,17,19,20,27,28,29,34,36,37,38,38,42,42,43,44,45,45,47,52,52,53,59,60,62,67,69,73,80,82,83,83,84,88,92,95,98,99},new int[]{1,6,8,10,14,14,15,17,20,20,20,20,22,34,36,42,43,47,47,48,52,53,55,56,57,59,61,65,67,69,73,74,77,78,81,81,82,84,84,84,91,93,94,98,98},new int[]{2,5,8,8,10,10,11,15,16,16,18,18,18,20,21,23,37,40,41,41,42,44,46,48,50,50,52,53,59,68,68,70,73,73,74,77,77,83,86,88,92,92,94,97,99},new int[]{3,4,6,6,10,11,12,13,13,15,15,17,22,23,25,28,30,37,42,43,44,46,46,52,52,53,57,57,58,58,58,59,60,60,60,63,63,67,69,69,73,74,74,75,87},new int[]{3,4,4,7,8,11,12,14,20,22,23,24,24,31,32,39,41,42,45,45,47,47,51,57,57,61,62,62,64,65,66,67,69,72,72,72,80,81,85,88,91,95,96,99,99},new int[]{3,5,6,8,8,8,11,12,15,17,19,19,19,22,22,23,26,27,30,34,35,36,38,46,51,51,55,59,62,62,65,66,71,73,75,77,78,86,89,90,94,95,96,96,96},new int[]{3,8,9,11,13,18,18,20,21,23,23,25,27,29,32,33,36,36,44,47,49,53,58,63,64,64,66,68,68,70,71,72,72,73,74,75,75,81,82,84,85,86,88,88,96},new int[]{3,5,5,7,16,16,18,18,19,20,28,31,32,35,37,38,39,39,48,49,54,60,61,67,68,70,75,75,77,78,81,82,83,83,86,87,88,89,91,91,93,97,97,97,97},new int[]{2,2,3,5,11,16,18,19,20,22,22,24,24,26,26,29,33,34,35,37,41,41,44,44,45,56,56,57,57,59,64,64,70,77,80,80,83,88,89,93,94,95,96,96,98},new int[]{1,3,5,6,12,16,18,21,22,23,26,29,33,37,39,40,43,46,47,53,57,57,60,61,63,63,64,65,66,67,71,71,72,72,77,81,84,85,87,93,94,95,96,97,99},new int[]{3,4,6,7,10,11,16,18,19,21,22,22,32,33,34,34,36,39,40,41,42,44,47,49,49,50,54,56,63,66,71,72,73,74,74,78,79,82,83,86,89,91,92,92,93},new int[]{3,4,4,5,8,15,16,19,19,20,31,32,34,34,39,40,42,45,45,47,48,48,49,52,55,60,62,62,64,68,70,73,73,74,75,77,77,81,81,83,86,90,91,94,94},new int[]{4,5,12,15,16,16,17,20,24,24,25,25,25,28,30,30,33,37,39,41,42,48,50,51,51,54,57,62,63,65,66,68,69,72,72,72,72,74,75,75,77,86,88,92,92},new int[]{2,3,7,7,8,11,11,12,12,14,17,17,17,21,21,23,27,27,30,31,33,36,45,46,48,48,49,51,53,55,58,59,61,65,68,69,71,84,84,84,90,94,97,98,99},new int[]{1,4,7,7,10,10,12,14,15,15,16,20,21,28,28,28,29,29,35,40,43,45,48,49,51,52,56,56,66,67,69,69,70,71,73,74,78,79,82,86,89,92,96,98,98},new int[]{4,5,6,9,9,9,13,15,17,23,23,28,33,34,34,35,35,40,42,43,46,50,52,55,57,60,64,67,72,72,75,75,77,77,79,79,81,81,82,86,86,90,91,95,97},new int[]{1,4,4,5,5,6,7,9,9,9,10,11,15,15,21,22,26,26,29,31,31,34,38,40,40,42,43,44,45,49,50,52,54,55,57,62,66,68,69,70,72,82,85,86,90},new int[]{3,4,6,8,8,9,10,11,15,22,22,26,26,27,29,31,37,38,41,41,43,43,47,47,48,50,53,54,55,56,60,63,63,67,68,70,71,75,76,84,87,87,91,95,98},new int[]{2,7,8,16,17,17,23,26,26,28,31,35,36,38,39,43,48,49,53,58,59,60,68,68,70,70,71,73,73,74,76,77,77,79,79,82,82,82,82,87,88,89,90,90,98},new int[]{3,3,10,12,16,17,20,21,22,24,25,27,28,31,32,33,34,35,35,38,39,40,42,45,48,51,52,54,56,61,63,63,66,67,68,69,74,75,76,78,79,87,91,91,92},new int[]{4,6,8,8,14,17,23,23,25,25,27,27,30,30,34,35,38,40,42,48,49,51,52,53,57,57,58,58,59,67,70,71,75,76,77,78,82,84,85,87,94,94,96,97,98},new int[]{2,4,4,4,4,6,8,10,13,14,15,18,20,23,24,26,27,29,33,35,39,40,41,42,46,48,49,52,56,62,64,68,71,76,77,77,78,79,84,92,94,95,95,97,98},new int[]{1,7,8,9,12,12,14,14,16,19,23,25,27,27,27,28,29,29,33,33,41,44,45,46,51,51,52,56,57,58,59,60,64,68,69,70,73,80,82,82,86,87,90,98,98},new int[]{2,5,18,19,20,23,26,27,33,36,45,46,51,52,53,56,58,60,63,68,71,71,72,73,75,76,76,80,80,81,81,84,87,89,91,92,92,92,93,93,94,95,98,98,99},new int[]{1,1,5,5,5,6,10,10,15,16,17,22,29,31,42,48,49,49,49,53,54,54,55,56,56,59,60,62,62,64,72,72,73,75,77,81,82,82,86,89,90,91,97,97,99},new int[]{3,5,8,9,10,13,14,14,16,26,26,29,30,32,36,37,42,42,44,45,45,47,47,49,52,53,54,57,58,62,63,64,65,65,67,69,69,69,70,75,76,76,80,86,86},new int[]{1,2,4,8,8,11,12,16,21,28,30,30,30,32,36,37,38,39,40,43,46,49,49,50,55,57,60,60,61,64,65,66,73,78,79,80,80,83,86,86,87,89,90,93,98},new int[]{8,8,11,14,16,16,17,23,24,29,31,38,38,39,40,40,48,51,60,60,62,65,65,67,67,68,70,71,73,73,74,75,78,79,80,81,83,83,86,87,91,92,93,93,98},new int[]{1,3,7,10,10,11,13,14,18,18,20,21,22,25,27,27,28,30,37,38,44,48,50,52,55,57,60,63,64,65,67,71,74,75,77,79,79,85,86,90,93,94,96,98,99},new int[]{1,4,7,11,13,15,15,16,19,21,25,27,38,43,43,48,48,49,49,52,53,54,56,57,61,61,64,64,65,66,68,68,69,70,71,71,73,76,81,83,91,94,95,96,99},new int[]{1,2,4,11,12,12,15,17,20,22,28,30,31,31,31,38,38,38,41,48,48,50,51,51,51,57,59,62,68,73,75,78,81,83,86,90,90,90,92,92,94,94,96,97,98},new int[]{3,7,11,11,13,13,13,20,20,23,24,25,30,31,31,31,34,34,36,39,42,42,47,56,57,60,65,65,66,72,72,73,73,75,75,78,79,83,87,87,93,93,95,96,99},new int[]{1,2,3,4,5,6,10,11,12,14,18,20,22,24,24,26,26,31,34,35,36,38,45,45,45,45,46,47,48,52,55,57,60,63,66,76,81,82,86,86,89,90,93,95,96},new int[]{2,2,5,8,13,16,22,23,27,28,30,31,36,39,40,45,46,49,51,54,57,57,57,58,59,60,61,63,67,70,70,72,74,75,75,81,82,85,86,88,91,92,92,93,99}}); param0.add(new int[][]{new int[]{-90,64,-52,-42,98,50,-60,-30,-34,-42,-58,-10,68,24,76,-32,14,-64,10,30,-8,74,-40,4,-34,48,8,74,54,-8,-86,34,-32,-10,-94,0,16,-6,-40,-94,-84},new int[]{68,62,98,88,98,-60,-84,0,32,-28,4,-6,84,-32,-40,-48,50,-88,2,42,-56,4,-46,-66,38,26,-80,82,74,-70,-4,-12,74,-32,-12,44,-94,-72,78,-62,16},new int[]{-76,-32,58,48,-38,-38,46,-74,12,-88,82,0,8,44,22,-68,34,48,74,4,48,-82,-96,40,-78,-80,26,22,36,-22,-36,88,10,14,-98,22,4,72,-72,10,56},new int[]{-26,-32,-86,86,22,-50,56,30,-30,-44,10,58,60,-82,8,50,-10,8,80,68,34,-14,-96,24,-8,-24,52,70,80,-90,-22,-62,-4,20,-30,-4,-38,90,18,58,36},new int[]{98,-2,62,-16,-48,78,14,24,90,12,-98,-40,-16,0,10,96,-90,56,8,10,-56,90,-46,-84,86,66,-16,84,-92,26,-84,-94,-22,-94,16,-68,-18,24,-50,-80,40},new int[]{-52,16,-58,10,-76,-90,-6,98,22,14,66,-16,-14,72,34,-90,-92,-34,42,-34,66,18,18,38,28,-30,-10,-50,46,50,-98,30,-80,-20,8,-82,-4,-10,-82,22,20},new int[]{68,14,62,-22,10,-78,-48,84,-96,96,-54,6,92,38,52,16,48,80,-28,46,64,20,80,-46,-88,-98,-46,-14,-28,40,78,96,-26,10,62,-82,-22,-76,82,-60,-72},new int[]{36,-30,-78,80,10,54,-60,-84,8,-54,22,96,36,-38,-10,56,-86,40,-62,-48,-18,78,-40,-86,36,46,74,66,-10,32,-98,-18,-82,-6,-34,88,4,-2,38,96,-90},new int[]{44,-54,-40,-4,68,-74,-12,22,16,32,-66,-92,-70,40,-34,58,68,-86,34,-40,-72,30,-52,56,-88,58,84,28,-88,64,36,26,52,88,-28,34,-28,-42,-88,46,-26},new int[]{58,56,24,22,-50,-26,44,-42,-80,-44,-96,58,-50,-40,-38,-32,34,84,0,-62,16,18,-10,94,8,50,-78,20,8,-16,-94,78,30,86,-4,-54,0,-44,56,46,30},new int[]{-44,2,14,56,-2,20,-14,20,24,-90,40,-90,-6,90,-22,-64,-64,-8,-58,62,-48,-84,-44,-78,80,68,-74,6,-42,52,14,40,2,-44,24,-76,-92,82,6,6,94},new int[]{80,-84,-8,90,-72,88,-58,98,30,-28,-84,-98,14,-90,2,50,26,-32,-16,50,-28,50,18,0,-42,56,58,68,6,-26,-78,24,70,-98,52,46,-52,92,52,38,28},new int[]{50,56,-92,-68,-2,76,82,-22,-86,-70,-4,84,-30,-68,4,58,-40,-68,-46,-92,68,-56,14,-12,-98,-36,76,54,14,12,18,-14,12,-28,14,2,2,-74,90,-34,-34},new int[]{-52,90,-52,26,-66,36,38,52,-38,-62,72,78,58,-50,-28,0,-30,6,-8,82,-30,42,84,28,40,74,58,12,62,-28,-66,68,34,72,-22,70,8,38,14,38,88},new int[]{66,-2,0,-74,-20,94,90,-30,8,-36,-54,-36,26,-96,6,-8,92,-6,-98,86,48,50,48,-92,88,-68,-6,-14,80,-38,36,74,-4,-34,86,-80,-82,42,-82,-54,-82},new int[]{54,82,-16,-4,-40,36,-30,-6,-2,62,-88,-6,22,44,-80,80,88,-2,28,-38,6,98,88,-34,60,-18,-52,-74,-28,-48,-18,-28,-18,-4,12,78,-8,20,-64,-98,-94},new int[]{68,-18,-98,42,-78,56,-26,-8,-56,74,2,-12,52,-62,26,-50,-34,32,-26,-80,20,22,30,-20,66,12,22,56,-38,-4,-46,74,-30,-8,-70,-90,80,8,-56,10,-66},new int[]{-32,-26,78,18,-84,82,-36,38,18,84,30,-10,30,-74,44,82,22,98,-30,-68,-42,-72,-24,-54,82,-90,-6,40,-94,86,84,-28,54,96,4,-48,42,68,-60,90,12},new int[]{82,94,-50,62,-94,76,-62,94,30,26,-46,-16,60,-12,-80,12,-26,-60,-32,74,10,8,84,2,-48,66,50,60,-28,84,30,-76,82,-70,52,82,-6,-92,50,-2,-64},new int[]{82,2,52,-86,-84,94,96,96,-96,-38,-64,12,74,-48,-38,48,62,-24,-98,-64,-42,62,-6,36,86,-80,-80,68,70,-18,-58,-66,64,2,-14,-34,8,10,76,54,-34},new int[]{-20,48,86,-68,-44,10,-56,68,14,-24,-10,-34,8,74,22,-76,-8,76,-54,-36,-16,-66,48,-24,60,-22,-48,0,-86,-56,-98,82,16,-32,78,90,-38,-30,-34,-8,-40},new int[]{72,74,72,20,84,0,-54,-36,28,-24,24,-16,-4,54,-88,98,-16,74,80,-60,62,48,-26,84,86,-2,40,38,84,62,-12,82,-34,-78,-64,-62,-20,-72,-70,-58,70},new int[]{88,-20,-38,-64,-74,-84,70,68,-8,50,64,-60,42,-34,-74,-98,22,-38,-4,-72,26,-84,84,48,-70,-96,42,-96,40,12,50,96,94,-82,58,-64,62,12,10,-86,96},new int[]{96,-54,80,-14,78,-66,28,86,-16,-14,-26,42,72,34,-26,28,56,82,-90,-20,-26,-58,-14,20,-24,-98,-18,-16,36,28,80,60,-58,56,-18,-66,56,-80,-74,90,64},new int[]{4,-60,-40,-16,-10,-32,-90,2,-96,70,-34,12,-24,20,66,92,96,70,74,-6,26,66,64,-82,-38,68,-98,-86,-82,-12,86,-90,68,46,-16,-22,-18,2,-30,94,-90},new int[]{22,-14,94,-22,58,-4,12,28,-80,-82,-84,56,-38,-78,-30,94,68,62,2,-16,-6,46,-96,14,58,2,-66,-88,-2,-26,-66,-42,4,60,-96,88,-14,70,-64,-44,58},new int[]{-52,58,38,-80,4,-4,-74,6,-68,-82,40,40,68,-56,-20,-74,-98,54,-32,56,-38,-40,98,-60,24,-76,52,-98,12,-24,-46,-82,0,-58,64,56,22,-16,84,0,26},new int[]{-26,32,-64,-12,18,0,22,-44,68,-72,-58,-28,38,-16,-94,58,22,-32,-80,-48,70,-56,48,56,-46,50,-36,94,-44,-64,32,-26,78,-90,98,-42,-30,32,-32,-2,46},new int[]{-2,-90,-74,-50,66,-34,-48,-10,-10,-88,-6,-88,-26,22,-18,-92,66,56,82,-46,-88,66,86,-94,30,50,-40,-18,-26,-30,38,74,-54,40,-64,16,34,98,60,-30,74},new int[]{-58,74,74,-8,54,-34,-6,-96,-80,-26,-84,40,-84,46,-44,-4,22,16,50,-48,-44,48,92,-52,-26,36,-42,54,-18,-94,44,-28,-24,66,-4,96,52,40,0,82,-84},new int[]{12,66,40,10,-70,52,44,76,-22,-64,-6,-28,14,-8,10,-54,18,-98,4,-42,34,-88,10,-8,84,0,62,98,-58,88,20,-78,-40,40,42,-52,-4,18,-40,-98,22},new int[]{-86,96,2,70,6,4,62,-22,-8,-50,-22,-16,2,-18,0,94,-60,-60,84,-96,0,68,-86,-16,-90,-64,-52,88,-58,-14,62,-94,-52,58,-38,38,18,94,-52,6,-56},new int[]{-56,-28,14,-4,-2,-20,14,-94,-76,-12,50,46,-6,54,-38,-94,-98,92,-94,-84,-98,58,84,-86,-88,52,36,42,88,-94,-20,2,-66,24,-18,-90,78,6,-70,-88,-88},new int[]{96,-70,14,-2,-48,-74,-62,92,90,-22,4,-6,40,68,34,-36,24,-24,88,66,-62,-18,48,70,-92,26,-30,6,-34,18,42,42,-32,34,92,36,-24,10,90,-74,90},new int[]{64,-98,72,76,2,40,38,94,-88,30,0,80,76,-38,-24,0,-8,36,16,32,-68,38,84,-88,80,-92,-54,92,-58,20,48,76,-26,6,40,8,-22,90,-66,-54,60},new int[]{-48,44,52,-30,78,-68,54,20,-38,-82,-6,48,-64,64,-34,-74,-70,54,60,62,88,44,-6,-82,94,-76,-46,-46,-82,18,-50,-12,32,34,76,66,-10,84,80,52,86},new int[]{40,-96,-34,70,38,10,28,14,-32,52,-94,48,92,56,26,-86,42,-36,-70,-18,86,-46,16,78,76,-40,-8,26,88,10,-26,-12,-64,82,-90,-10,-92,96,40,-52,82},new int[]{-76,54,-8,22,-84,36,76,16,14,-62,30,30,-92,-80,88,98,-64,-94,-26,10,46,46,-94,6,-18,98,-52,10,-14,-14,76,22,-90,78,26,-60,86,-56,-34,-46,50},new int[]{68,68,-4,22,22,66,18,86,38,-56,-26,44,56,-70,14,94,12,-40,-96,-22,88,54,58,-94,-6,64,92,80,70,-82,70,58,-56,-68,-38,-88,-84,-78,-94,60,-72},new int[]{-28,64,-78,-54,76,66,30,-74,36,6,-26,-84,48,22,36,96,-10,-16,18,58,-58,-58,6,-44,96,-34,48,26,6,-76,-36,30,-44,48,-36,66,-48,-10,-12,74,-70},new int[]{32,4,22,-48,8,78,-70,-78,-78,30,-70,76,-36,42,-12,72,-36,54,-50,90,82,76,-34,82,28,-30,10,34,52,74,-90,-60,-46,64,-68,-60,88,8,50,48,56}}); param0.add(new int[][]{new int[]{1,1,1,1},new int[]{0,0,0,1},new int[]{0,0,0,0},new int[]{0,1,1,1}}); param0.add(new int[][]{new int[]{96,94,33,75,69,69,91,26},new int[]{10,49,56,26,54,98,70,59},new int[]{12,39,29,62,49,76,43,55},new int[]{98,30,1,23,4,81,78,3},new int[]{82,14,46,85,89,5,11,64},new int[]{46,39,97,97,4,83,99,8},new int[]{48,50,62,64,94,79,84,12},new int[]{49,69,81,46,89,69,43,5}}); List param1 = new ArrayList<>(); param1.add(21); param1.add(36); param1.add(23); param1.add(15); param1.add(7); param1.add(5); param1.add(23); param1.add(37); param1.add(2); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : d1 = 0 d2 = 0 for i in range ( 0 , n ) : d1 = d1 + arr [ i ] [ i ] d2 = d2 + arr [ i ] [ n - i - 1 ] return abs ( d1 - d2 ) ",,," if __name__ == '__main__': param = [ ([[1, 2, 4, 8, 12, 15, 17, 17, 19, 19, 21, 26, 27, 28, 32, 33, 40, 41, 41, 46, 46, 47, 48, 56, 59, 62, 68, 68, 69, 76, 80, 81, 82, 83, 86, 88, 90, 91, 93, 96, 97], [3, 7, 8, 9, 10, 13, 16, 18, 20, 22, 22, 24, 26, 27, 31, 33, 33, 34, 37, 43, 45, 46, 46, 46, 47, 49, 50, 51, 55, 57, 67, 75, 75, 83, 87, 87, 90, 90, 92, 93, 97], [5, 5, 5, 8, 11, 14, 18, 24, 26, 28, 28, 31, 35, 36, 37, 43, 43, 50, 56, 56, 59, 61, 62, 62, 64, 66, 66, 67, 74, 76, 76, 79, 82, 83, 84, 87, 87, 87, 90, 96, 98], [4, 13, 13, 20, 21, 22, 22, 29, 30, 31, 35, 38, 38, 39, 41, 42, 43, 43, 51, 56, 56, 63, 65, 66, 74, 79, 80, 82, 84, 84, 86, 87, 87, 89, 91, 92, 92, 94, 94, 96, 99], [8, 11, 12, 17, 17, 18, 21, 24, 24, 26, 26, 26, 27, 28, 28, 28, 29, 32, 36, 36, 40, 51, 53, 59, 64, 65, 68, 72, 73, 73, 77, 81, 81, 82, 83, 85, 87, 89, 92, 95, 99], [1, 3, 6, 7, 7, 8, 9, 9, 12, 13, 13, 14, 15, 17, 20, 20, 21, 27, 36, 36, 40, 44, 51, 51, 55, 57, 62, 68, 68, 70, 81, 82, 87, 89, 90, 93, 94, 97, 97, 98, 99], [4, 6, 7, 11, 14, 21, 21, 22, 25, 25, 28, 30, 39, 40, 40, 43, 45, 46, 46, 51, 53, 57, 60, 62, 64, 65, 66, 68, 70, 72, 73, 80, 81, 81, 84, 84, 86, 91, 92, 95, 95], [1, 1, 3, 5, 5, 9, 11, 11, 11, 13, 16, 17, 20, 28, 31, 31, 36, 37, 38, 38, 41, 42, 44, 47, 49, 53, 54, 58, 60, 67, 68, 70, 72, 72, 76, 80, 81, 82, 87, 88, 99], [8, 8, 10, 16, 16, 17, 20, 26, 29, 29, 31, 36, 40, 42, 48, 50, 55, 56, 56, 59, 61, 64, 64, 70, 77, 77, 78, 78, 81, 84, 84, 87, 88, 93, 93, 93, 95, 95, 96, 97, 97], [2, 2, 5, 7, 9, 10, 11, 14, 15, 15, 16, 16, 22, 23, 26, 26, 31, 32, 33, 36, 42, 49, 51, 53, 56, 58, 61, 75, 76, 77, 77, 80, 80, 82, 82, 83, 84, 85, 90, 90, 94], [3, 6, 7, 9, 9, 10, 11, 12, 19, 22, 25, 30, 32, 32, 33, 34, 35, 36, 36, 37, 40, 41, 43, 43, 44, 44, 51, 58, 62, 62, 69, 69, 78, 78, 80, 83, 85, 91, 93, 97, 99], [1, 4, 5, 7, 7, 7, 15, 16, 17, 18, 21, 21, 26, 31, 36, 39, 39, 47, 49, 53, 56, 59, 60, 63, 63, 64, 64, 66, 69, 70, 77, 79, 80, 80, 82, 84, 86, 87, 89, 98, 98], [1, 6, 9, 11, 12, 14, 21, 22, 29, 31, 32, 32, 34, 37, 37, 37, 43, 44, 47, 52, 55, 57, 58, 61, 61, 63, 64, 65, 70, 71, 71, 74, 74, 77, 77, 80, 81, 86, 91, 91, 97], [1, 3, 4, 10, 10, 19, 20, 20, 21, 21, 23, 27, 27, 33, 35, 36, 36, 41, 41, 42, 49, 51, 51, 51, 54, 56, 59, 61, 61, 66, 67, 77, 81, 82, 82, 82, 85, 87, 93, 94, 95], [7, 9, 9, 12, 15, 19, 24, 28, 30, 32, 36, 39, 40, 41, 51, 55, 55, 55, 56, 56, 57, 58, 63, 64, 71, 73, 74, 76, 76, 77, 77, 80, 81, 89, 91, 91, 92, 94, 95, 97, 99], [2, 2, 6, 11, 13, 15, 16, 17, 18, 21, 24, 30, 30, 33, 34, 35, 36, 40, 41, 44, 46, 47, 51, 52, 53, 53, 55, 56, 60, 62, 68, 73, 77, 78, 79, 83, 85, 91, 94, 96, 96], [2, 3, 6, 7, 8, 8, 9, 15, 18, 24, 25, 30, 30, 38, 41, 44, 44, 47, 49, 53, 59, 60, 61, 65, 65, 71, 77, 78, 80, 84, 84, 86, 86, 87, 88, 88, 90, 91, 91, 95, 96], [1, 10, 11, 16, 16, 16, 25, 26, 28, 31, 31, 32, 33, 34, 34, 36, 37, 38, 46, 50, 52, 55, 56, 58, 61, 62, 67, 71, 72, 75, 77, 83, 84, 84, 85, 87, 88, 95, 96, 97, 99], [1, 3, 4, 5, 7, 8, 9, 12, 13, 13, 18, 20, 24, 27, 33, 35, 39, 44, 49, 56, 56, 61, 61, 67, 70, 70, 70, 70, 71, 71, 71, 76, 78, 78, 84, 88, 89, 91, 94, 95, 99], [1, 1, 4, 5, 6, 7, 11, 16, 20, 22, 23, 27, 35, 36, 39, 39, 44, 46, 46, 49, 51, 51, 52, 55, 56, 56, 58, 65, 70, 77, 78, 82, 82, 82, 84, 88, 89, 96, 98, 98, 99], [3, 3, 5, 5, 9, 12, 14, 17, 22, 31, 33, 34, 36, 36, 38, 38, 39, 45, 46, 47, 48, 48, 50, 55, 55, 56, 59, 63, 64, 67, 68, 70, 72, 74, 80, 80, 82, 84, 87, 93, 95], [4, 8, 16, 17, 17, 18, 18, 23, 24, 27, 28, 32, 36, 39, 40, 42, 45, 48, 48, 52, 52, 53, 55, 56, 57, 57, 66, 67, 68, 70, 71, 74, 74, 74, 75, 77, 80, 81, 84, 92, 92], [4, 4, 5, 8, 18, 18, 19, 20, 21, 21, 25, 25, 25, 28, 31, 38, 42, 48, 54, 56, 58, 59, 61, 61, 63, 66, 67, 67, 68, 71, 74, 75, 77, 77, 78, 84, 86, 88, 93, 94, 99], [3, 5, 5, 8, 10, 12, 13, 20, 21, 22, 25, 33, 38, 39, 41, 44, 47, 47, 48, 49, 50, 52, 59, 62, 64, 65, 67, 68, 69, 70, 70, 75, 78, 79, 80, 81, 83, 84, 87, 90, 99], [3, 7, 9, 9, 11, 13, 13, 13, 14, 15, 17, 24, 26, 29, 29, 33, 34, 35, 37, 40, 41, 45, 50, 50, 53, 56, 57, 59, 62, 62, 63, 65, 72, 72, 76, 78, 79, 86, 87, 94, 99], [2, 2, 6, 7, 12, 13, 13, 13, 15, 16, 17, 18, 22, 23, 24, 24, 27, 28, 34, 40, 40, 42, 43, 48, 49, 52, 53, 54, 55, 57, 60, 66, 71, 71, 71, 73, 74, 93, 96, 96, 97], [1, 1, 2, 2, 3, 3, 4, 4, 6, 18, 20, 25, 26, 26, 27, 30, 32, 38, 39, 41, 48, 50, 53, 57, 61, 63, 64, 65, 66, 67, 67, 68, 71, 73, 81, 84, 91, 91, 91, 94, 99], [2, 3, 3, 4, 5, 7, 10, 11, 12, 13, 14, 14, 14, 15, 16, 17, 17, 18, 26, 27, 40, 41, 42, 43, 47, 47, 48, 48, 55, 63, 64, 75, 78, 83, 83, 87, 88, 89, 92, 98, 98], [1, 2, 6, 6, 8, 13, 13, 22, 23, 25, 25, 26, 28, 28, 34, 37, 40, 44, 46, 50, 54, 58, 62, 62, 65, 67, 72, 79, 80, 81, 84, 85, 85, 87, 88, 89, 92, 95, 97, 97, 97], [3, 4, 6, 6, 11, 12, 12, 15, 19, 20, 22, 26, 34, 37, 41, 44, 52, 56, 56, 60, 69, 69, 70, 71, 72, 72, 73, 79, 79, 83, 85, 90, 90, 91, 93, 94, 95, 96, 97, 98, 99], [2, 4, 5, 6, 8, 9, 15, 17, 21, 21, 24, 24, 30, 32, 34, 34, 35, 37, 38, 39, 39, 41, 43, 43, 43, 47, 51, 51, 54, 55, 61, 63, 64, 71, 74, 78, 78, 80, 84, 85, 96], [2, 2, 7, 8, 9, 9, 9, 10, 14, 14, 14, 15, 20, 21, 26, 26, 27, 28, 29, 36, 37, 39, 40, 40, 41, 45, 48, 49, 61, 62, 66, 67, 69, 70, 71, 75, 75, 76, 80, 90, 97], [1, 3, 11, 11, 11, 12, 15, 17, 19, 20, 25, 27, 28, 40, 51, 52, 53, 53, 57, 58, 58, 62, 68, 72, 72, 73, 76, 76, 81, 83, 84, 86, 86, 87, 87, 89, 92, 94, 94, 95, 95], [7, 7, 8, 13, 16, 16, 23, 23, 24, 24, 30, 33, 37, 38, 39, 42, 48, 52, 53, 54, 56, 56, 64, 64, 65, 66, 66, 68, 70, 71, 72, 72, 78, 81, 83, 85, 86, 87, 90, 90, 92], [3, 4, 4, 5, 13, 17, 17, 21, 28, 33, 34, 34, 34, 35, 37, 38, 45, 50, 55, 60, 63, 64, 65, 67, 67, 68, 69, 70, 71, 79, 79, 80, 80, 84, 85, 93, 94, 94, 96, 97, 98], [10, 13, 15, 17, 19, 20, 21, 21, 22, 29, 29, 30, 35, 39, 39, 44, 44, 47, 49, 49, 50, 50, 52, 53, 55, 57, 57, 59, 60, 61, 64, 67, 69, 72, 75, 78, 80, 87, 88, 89, 98], [8, 9, 9, 13, 28, 29, 32, 32, 33, 34, 38, 40, 40, 42, 45, 51, 51, 54, 55, 57, 57, 59, 63, 69, 69, 69, 70, 73, 76, 77, 78, 78, 85, 85, 87, 88, 91, 95, 96, 97, 99], [2, 5, 7, 8, 14, 17, 19, 20, 21, 24, 25, 28, 29, 32, 33, 37, 44, 45, 52, 54, 58, 58, 62, 62, 63, 63, 65, 65, 71, 72, 74, 81, 86, 86, 91, 91, 91, 93, 93, 96, 98], [3, 8, 12, 13, 16, 21, 22, 23, 33, 40, 42, 42, 46, 48, 50, 50, 54, 57, 64, 64, 68, 68, 68, 73, 74, 74, 77, 77, 78, 79, 82, 85, 86, 88, 92, 92, 94, 97, 97, 98, 98], [5, 6, 7, 8, 9, 12, 13, 19, 19, 27, 29, 34, 36, 38, 39, 41, 43, 44, 47, 49, 50, 53, 57, 57, 59, 61, 62, 65, 65, 68, 75, 77, 80, 81, 82, 84, 85, 88, 89, 92, 94], [3, 3, 4, 8, 12, 20, 25, 26, 30, 32, 33, 41, 41, 43, 45, 46, 46, 47, 50, 54, 54, 57, 57, 62, 63, 65, 67, 68, 69, 70, 72, 73, 75, 77, 83, 85, 86, 93, 93, 97, 97]],21,), ([[52, -18, -36, -28, -14, 92, 80, -48, 28, -18, -46, 76, -96, 4, -50, -80, -40, 34, 36, -66, -66, 48, -8, -36, 10, 26, -46, 80, -22, -90, 66, 82, 22, 30, -32, 96, 30, -4, 70, -92, 90, -26, 18, -48, 72, -88], [14, -90, 60, 50, 54, 78, 46, 26, -46, 94, 46, 42, -48, 96, 18, -84, 42, 16, -58, -96, -80, -66, -50, -32, -48, -8, 34, 42, 40, 34, 12, -34, -94, 18, 60, 30, -48, 8, 30, -24, 10, -26, -12, -58, 62, 96], [-22, -24, -6, 16, 80, 86, -30, -66, 94, 10, -42, 0, -92, -28, 82, -16, -94, -40, 72, -76, 66, -70, 94, 68, -20, -30, 48, 80, -96, -56, -70, -82, -22, -78, 12, -20, -2, 80, -96, -10, 12, -10, 32, 66, 26, 22], [18, 72, 76, 82, -20, -64, 16, 70, 72, 32, -34, -98, -22, 24, -68, 0, -14, -60, -66, 16, -20, -40, -64, 42, 14, -70, -30, 48, 40, 12, -82, -30, -36, -36, 60, -48, 78, -66, 46, -52, 68, -60, 88, -10, -42, 64], [58, -48, 0, 78, -74, 84, -14, 54, -68, 48, 84, -2, -74, -20, 32, 40, 4, 8, 38, -24, 58, 56, 76, -88, -18, 90, -94, -64, -76, -8, -88, -20, -66, -4, -20, -70, 34, 66, 12, 8, -38, 8, 92, -98, -32, -44], [96, -20, 6, -36, 54, -82, -74, -98, -58, -32, -42, 26, 34, 72, -98, -2, 40, -90, 16, -66, 70, -10, 36, -84, 8, -22, -18, 24, -92, 12, 34, 30, -74, 54, 46, 26, -52, -48, -86, 78, 16, -94, -12, -24, 64, -42], [-74, -4, -70, -32, 24, 72, 8, 66, 52, -34, -84, -70, 82, -96, 72, 90, 0, 18, 26, 48, 98, -92, -26, 0, -78, -52, 94, -12, -60, -54, 16, 98, 96, -68, 26, 84, 24, -28, 42, -32, 58, 4, -78, 46, -96, -2], [-74, -46, 62, -52, -30, 36, -52, 64, 66, 4, 18, 76, 8, 82, 90, 72, -64, 24, 86, -46, 72, 58, -10, 46, -8, -20, -18, -24, -4, 52, 96, 44, -18, -84, -64, -56, 76, 54, -84, -12, -32, 52, 62, 10, 52, 68], [-44, 20, 44, -20, 94, 76, 94, -40, 40, -74, -56, 78, 20, 38, -56, -2, -34, -6, -24, -62, 72, -36, 42, 32, 56, 24, 38, 6, 8, -78, -64, -38, 58, -98, 16, 38, 92, -4, -38, -22, -62, 96, 34, 64, -32, -98], [34, -96, -98, 10, 40, 2, 26, 14, 18, -12, -16, 84, -74, 0, -98, 38, -48, 18, 22, -32, -52, -2, 28, -50, 64, 10, 80, 6, 20, 0, 66, 80, 96, 14, 20, -56, 18, 80, -16, 74, -74, 26, -70, 58, 74, 32], [72, -52, 2, -90, -56, 98, -50, 10, -60, 84, 24, -88, -98, -48, 54, 44, -84, 10, -18, 68, 40, 40, -46, -18, 60, -58, -50, 26, 74, -24, -64, -70, 44, -40, 18, -88, -60, 82, -60, 26, -66, -68, 46, 60, 92, 84], [96, 26, -46, 94, -48, 24, 50, -10, 24, -50, 86, -76, -78, 98, -28, -60, -62, -32, -74, -18, 96, -44, -72, -56, 12, -28, 70, -16, 48, -26, 86, -24, 44, 56, 82, -34, 30, 36, -34, 92, -80, -50, -54, -20, -52, 48], [74, -70, 64, -98, -40, -14, -82, 56, 82, -16, -76, -56, 22, 64, -84, -48, 44, 70, 30, 56, -84, -80, -44, -30, -38, 96, 58, -18, 56, -42, -54, 20, -60, 82, -94, -8, 40, -16, -94, -70, 30, -82, 74, 4, -36, -42], [24, -10, 16, -4, 50, -8, 58, -24, -90, -90, 52, 16, 96, 74, 36, -92, -28, -84, 6, 70, 54, 60, 26, 42, 34, 22, 4, -48, -96, 20, 88, 34, 78, 12, -62, -6, 80, 30, 86, 74, 68, -18, 42, -50, -80, 32], [62, 90, 6, 66, -26, -98, -80, 46, -52, -22, 10, -60, 62, 92, 16, 78, 52, 22, 70, 28, 98, 28, -94, 70, -68, -84, 32, -86, 38, -6, -94, 10, -4, -84, 74, 42, -10, -82, 12, -6, -8, 14, -30, 72, 18, 12], [78, -18, 56, 90, -74, 82, 20, -90, 26, 40, -72, -46, -76, 14, -58, 58, 30, -58, -62, -62, 70, -4, -62, -64, -88, 96, 80, 74, 30, 12, 44, 78, 76, 76, -48, -38, -12, 22, -90, 0, -26, 28, 88, 80, 38, 66], [-58, 10, 22, -26, 46, -48, -76, 92, 26, 52, 24, -30, 56, -68, 2, 72, -44, 34, -72, -24, 34, 64, 72, -10, 16, -26, 0, 60, 18, -44, -18, -36, -94, 38, 22, 80, -78, -78, -48, 98, 64, 30, 72, 14, -22, 22], [-30, 82, 38, -2, -60, -28, -4, -36, 22, -64, 48, -14, -26, -10, 62, -10, -68, 54, -6, -26, -32, -66, -84, -12, 56, 42, -64, 14, 86, 76, -24, -36, 38, 98, 56, -14, -52, 44, -44, -88, -26, -10, 14, -2, -12, -14], [-58, 50, 18, 30, 80, 78, 22, 22, 12, 90, 0, -20, 50, 20, 82, -70, -26, -28, -90, 58, -24, 18, 54, 62, 48, 20, 96, -10, 72, 70, -98, 64, -56, 42, 76, 58, -84, -62, 40, -78, -22, -98, 42, 54, -34, 10], [42, 64, -40, -90, -8, -54, -42, 80, -28, -18, 8, 28, -10, 36, 12, 86, 28, -16, 66, 10, 6, 86, 60, -92, -92, -16, -84, -84, -50, 76, -2, 68, 80, -62, 54, -90, -96, 48, 2, -42, 70, 68, -24, 92, 14, -46], [-96, 20, 10, 64, -66, 84, -52, -74, -96, -88, -96, 6, -32, -10, -40, -2, 4, 22, 24, -60, -54, -62, -58, -30, -80, -94, -50, -72, 74, 50, 84, -6, 12, -28, 46, 64, -36, -52, -24, 56, 56, -16, 80, -74, -94, 50], [-66, 62, 46, -38, -50, 78, 2, 96, -50, -2, -64, -86, -26, -4, -92, 78, -16, 64, -74, 6, 34, -54, 40, 62, -8, 30, 46, -88, 68, 52, 46, 84, -90, 6, 86, 58, -70, 86, 54, 80, -6, 30, 44, -6, 2, 42], [-44, -76, 40, -30, -38, 14, -24, -10, -28, -54, 90, -64, 66, 88, 62, 94, -56, 72, 4, 46, 60, 70, -92, -48, -62, -94, 96, -40, 74, -40, -28, -44, 64, -54, 14, -42, -74, -24, 18, 46, -48, 60, 16, -78, -74, -82], [-8, -94, -56, 90, 22, -36, -66, 28, 48, -28, 92, 38, -8, 14, 34, 46, 62, 12, 2, -38, -44, 16, -66, -56, -74, 98, 92, -42, -42, -32, 82, -42, -12, -76, 18, 54, 16, 0, 92, 12, 96, 86, 94, -60, -62, -50], [-14, -88, -20, -60, 36, -90, -24, 90, -24, 70, 10, 22, -10, -88, -90, -72, -60, -62, -58, 98, 24, -52, -70, 82, 84, 24, 94, -16, -70, -16, 84, -34, 72, -42, 66, 36, -38, -20, -22, 12, -30, 48, -2, -58, -26, 56], [52, 40, 28, -48, -80, -58, 50, 34, -94, -24, -94, -24, -44, 4, -90, 84, 84, -66, 76, 36, -62, -22, 8, 32, 24, -86, -52, 16, 52, 24, 66, -16, 38, 54, 56, 92, 84, -46, 88, 22, 92, -58, -14, 12, 82, 92], [-98, 38, 16, 44, -10, 32, 68, -90, 94, -16, -90, 38, 96, -82, 68, -72, -80, -54, -68, 0, 58, -12, 56, -46, 68, 4, -52, 4, 2, -96, -78, 80, 50, 4, 20, 80, 62, -40, -82, -22, 90, 44, 88, 68, -72, 66], [-28, 54, -12, 96, 94, 40, 10, -18, 28, 46, 8, 48, 74, 58, 94, 10, -30, -50, -2, -80, -22, -70, 30, -16, 26, 78, -84, -50, -2, -66, -18, 98, -94, -6, -2, -44, -48, 2, 78, 94, -90, 32, -90, -56, -90, 0], [-36, -40, -28, 94, -96, -16, 8, 12, 94, 52, 52, -56, -66, 86, -10, -68, 38, -16, -72, 94, -68, 26, 58, -74, 22, -84, -50, -8, 32, 66, 20, 94, -44, -74, -72, -96, 38, 64, 4, -72, -66, -54, 44, 92, -52, -62], [-98, -58, -82, -74, 38, -6, -86, -98, -60, 62, 32, -64, 12, 80, -58, 90, -76, -6, -98, 78, -12, -20, 68, -62, 72, -72, 90, -24, -84, -84, 54, 66, 46, 50, 12, 98, -4, -90, -46, 12, 28, 76, -54, -24, -12, -26], [-48, -6, -18, 80, -30, 44, 74, 14, -54, 64, -68, -2, 14, -4, -68, -6, -78, -4, -30, -18, -32, -48, 56, -48, -6, -46, 34, -96, -44, -84, -34, -12, -20, 72, -24, 76, 46, 66, -24, -20, -8, 92, 92, 54, 64, 2], [-30, 26, -76, -38, -72, 36, -32, -22, 8, 40, 72, 12, -58, 6, -94, -70, -44, 56, -88, 76, 50, -8, 76, -74, 2, 54, -48, 56, 56, 60, 72, -30, -42, -54, -28, -80, -64, 82, -32, -42, 2, -32, -48, 64, -66, 26], [66, 72, -98, -62, -18, -42, -50, -20, 62, -96, -24, -90, -58, 82, -76, 0, -12, -66, -48, 26, 42, 12, -8, 46, -56, -16, -2, -94, 16, 90, -34, 48, 34, -44, -66, -70, 44, 66, 6, 74, 50, 96, 32, 64, 82, -10], [84, 48, 94, 32, 44, 26, 64, 24, 28, 88, 42, -54, 82, 34, 16, -14, -46, -94, -76, 88, -38, 42, -60, -8, 4, -70, 24, -60, -82, -96, 40, 20, 98, -2, 32, -24, 54, 52, -44, 78, -58, -16, -32, 56, -20, 52], [34, -90, -10, -10, -8, -28, -34, 46, -86, 20, -90, -78, 94, 72, 92, -4, -30, 84, -32, 84, 16, 94, 92, -40, 46, 58, 38, -8, 14, 58, 58, 38, 0, -30, -30, -40, 90, 12, 26, 56, -62, 40, 8, 16, 70, 4], [-32, 88, 70, 26, 30, 62, -18, -50, -78, -18, 40, -98, -84, -74, -68, 22, 8, 6, -88, 78, 14, 50, -34, -12, -58, 78, 32, -6, 52, 70, -98, 32, 6, -26, 98, -82, -8, -88, -6, -6, 84, -28, -68, 78, 68, 12], [-2, 4, 82, 94, 72, -90, 2, -8, 16, 76, -34, 72, -26, -86, 60, 92, -32, 82, -88, -42, 14, 50, 94, -98, -50, -78, -86, 68, -28, 16, -18, -20, -6, -64, -82, 68, -86, 94, 46, -2, 78, -24, 88, -82, -80, 90], [40, -64, 60, -14, 98, 98, 84, 34, -36, 14, 92, 50, -30, -38, -28, 68, -6, 18, -36, -76, -20, -4, 62, -6, -58, -50, 48, -64, 34, -96, 76, 68, 66, 86, -2, -90, 80, -18, -68, -8, -64, -32, -14, -48, 48, -2], [58, 26, 56, -88, -92, -10, -14, 42, -96, 40, 24, 32, 16, 38, 34, 98, 54, -36, 88, 86, -74, 40, -68, -26, -14, -74, -82, 12, -48, -22, -36, 98, -38, -30, -98, -34, -8, 84, -34, -98, 0, -76, 24, -6, 94, -64], [76, 48, -14, 70, -52, -34, 4, -2, -8, 84, 2, 14, 16, -40, -90, -66, -22, 40, -46, 50, -66, -52, 54, -68, 48, 46, -76, 98, 34, -94, 26, 62, -38, 2, 52, 0, 58, 64, -96, 52, 4, 58, 70, -24, -96, 50], [30, 72, -88, -98, 42, 76, -52, -88, -32, -2, 2, -84, -86, -34, -36, 34, -38, -4, -60, -62, 54, -52, 92, 86, 6, 98, 76, 38, -56, 90, 98, -10, 66, 88, -90, -54, -42, -22, -58, 4, 92, 76, 36, 76, -68, 4], [8, 44, -2, -52, -76, 34, -14, -42, -54, 30, 46, 64, 14, 44, 10, -14, -60, -18, 16, -80, -6, -10, 52, 52, 90, -88, 98, -96, -36, 18, -92, 10, -52, 74, -94, -46, 36, -38, -12, 66, 34, -30, 38, 26, 6, 38], [-84, -22, 4, -52, -12, 40, -14, 44, 70, 80, 72, -16, -38, -44, 16, -16, 82, -90, -14, 24, -98, 92, 52, -50, 40, 96, 76, -16, -28, -28, 28, 10, 0, -22, 16, -62, -34, 28, 94, -72, 20, -30, -20, 40, -24, -76], [-62, 98, -82, 34, 12, 14, -64, -34, -70, -24, -34, -92, 54, 90, -66, -48, -52, -80, -72, -80, -46, -60, 76, -2, 58, -96, 52, 42, 88, 96, -58, -28, -4, 48, 66, -94, 4, 90, 64, -52, 62, 80, -98, 76, 90, -64], [-88, -40, 32, 8, 94, -12, 98, -52, 4, -14, 52, -72, -4, -84, 18, -96, 74, 80, -12, 18, 60, 32, -68, -94, 90, 24, 34, 2, -70, 90, 52, 28, 92, 58, -20, -52, 26, -30, 4, 96, 54, 64, 64, 52, -24, 40], [26, -84, -20, 80, -82, 40, 68, -6, -44, 48, 48, -36, 48, 12, -92, -14, 66, 98, 24, 42, 62, 76, 50, -62, -30, 36, 88, -30, -60, 94, -44, 70, 36, -26, -44, -48, 22, 6, 16, 26, 8, -4, 54, -50, 92, 44]],36,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 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,), ([[81, 85, 4, 98, 56, 46, 38, 97, 79, 82, 85, 7, 80, 73, 25, 43, 23, 2, 31, 9, 16, 34, 18, 10, 89], [22, 46, 32, 7, 21, 64, 50, 94, 48, 44, 44, 74, 34, 70, 14, 16, 50, 46, 84, 55, 14, 71, 46, 92, 38], [73, 57, 12, 47, 18, 80, 68, 28, 28, 21, 10, 76, 10, 23, 30, 16, 34, 78, 38, 86, 73, 50, 63, 68, 23], [32, 49, 77, 70, 75, 40, 3, 18, 23, 69, 51, 36, 73, 64, 54, 8, 44, 55, 63, 97, 37, 83, 97, 5, 92], [79, 81, 22, 50, 43, 76, 4, 17, 78, 58, 48, 17, 84, 11, 65, 37, 33, 75, 51, 91, 26, 80, 79, 14, 61], [73, 21, 41, 90, 65, 33, 41, 63, 58, 78, 71, 8, 41, 2, 56, 88, 78, 56, 70, 36, 94, 16, 40, 40, 24], [93, 81, 96, 8, 40, 57, 17, 29, 95, 31, 42, 70, 73, 58, 63, 66, 44, 8, 76, 4, 30, 9, 73, 30, 57], [60, 65, 25, 64, 74, 5, 58, 33, 50, 64, 59, 18, 78, 18, 80, 81, 46, 18, 71, 13, 13, 27, 14, 4, 96], [97, 55, 80, 68, 84, 54, 56, 13, 59, 47, 59, 60, 60, 33, 90, 26, 26, 31, 2, 92, 59, 96, 69, 90, 78], [17, 57, 22, 75, 4, 25, 11, 46, 48, 81, 10, 44, 46, 90, 54, 47, 28, 10, 89, 12, 44, 37, 36, 59, 37], [41, 5, 42, 76, 18, 86, 15, 31, 20, 18, 59, 24, 11, 3, 84, 95, 36, 72, 68, 77, 93, 26, 23, 46, 96], [57, 2, 76, 61, 78, 77, 68, 57, 74, 23, 80, 89, 58, 76, 89, 1, 21, 37, 38, 89, 10, 23, 65, 81, 24], [53, 40, 5, 49, 23, 54, 48, 71, 45, 56, 70, 95, 93, 28, 74, 97, 71, 43, 26, 77, 59, 69, 57, 24, 61], [8, 94, 80, 64, 93, 48, 15, 13, 9, 28, 22, 89, 46, 32, 39, 88, 25, 94, 61, 94, 41, 96, 18, 33, 68], [55, 12, 55, 98, 37, 89, 10, 59, 37, 2, 9, 61, 7, 60, 56, 43, 60, 72, 87, 13, 3, 53, 24, 69, 51], [81, 44, 2, 90, 81, 75, 56, 15, 23, 16, 51, 80, 72, 77, 88, 54, 6, 66, 18, 15, 23, 50, 95, 3, 10], [20, 24, 35, 36, 38, 44, 43, 56, 39, 90, 78, 13, 88, 19, 5, 89, 11, 67, 25, 70, 41, 21, 47, 44, 46], [1, 58, 92, 87, 51, 24, 53, 71, 79, 25, 62, 74, 8, 69, 32, 73, 68, 26, 12, 84, 7, 4, 21, 11, 64], [38, 69, 28, 6, 5, 64, 25, 11, 77, 56, 49, 62, 61, 28, 2, 93, 60, 63, 77, 83, 37, 79, 24, 61, 71], [59, 21, 91, 87, 47, 14, 49, 70, 8, 67, 25, 13, 73, 24, 28, 46, 94, 75, 45, 18, 64, 16, 45, 97, 72], [84, 26, 36, 48, 75, 67, 66, 58, 81, 83, 71, 88, 31, 60, 67, 30, 22, 39, 49, 46, 75, 53, 25, 54, 95], [37, 14, 8, 10, 99, 13, 27, 16, 17, 29, 28, 14, 11, 55, 40, 68, 7, 58, 27, 6, 33, 27, 28, 36, 6], [28, 3, 96, 18, 96, 58, 15, 46, 63, 70, 38, 76, 89, 71, 16, 68, 69, 3, 2, 52, 1, 78, 26, 24, 28], [98, 37, 55, 48, 7, 9, 40, 97, 73, 46, 38, 9, 56, 14, 73, 33, 38, 3, 48, 81, 66, 91, 14, 55, 41], [42, 34, 27, 88, 76, 14, 69, 45, 7, 93, 56, 23, 36, 24, 90, 93, 91, 3, 49, 54, 5, 80, 31, 65, 66]],15,), ([[-68, -68, -50, -30, 0, 36, 44, 46, 56, 80], [-88, -84, -80, -54, -30, -16, 44, 80, 80, 82], [-78, -66, -46, -44, 2, 42, 52, 56, 62, 92], [-96, -80, -56, -32, -14, 0, 2, 20, 30, 92], [-80, -78, -46, -16, -12, -6, 26, 66, 72, 98], [-62, -52, -52, -22, -12, 2, 10, 42, 90, 96], [-88, -74, -74, -64, -54, -52, 2, 34, 78, 82], [-78, -26, 8, 14, 42, 42, 76, 78, 86, 96], [-78, -70, -68, -22, -12, 20, 58, 60, 84, 98], [-98, -56, -48, -20, -20, 10, 48, 60, 60, 86]],7,), ([[0, 0, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0, 1]],5,), ([[4, 5, 8, 14, 14, 15, 16, 18, 18, 19, 21, 23, 30, 31, 33, 36, 38, 39, 40, 45, 47, 50, 55, 57, 59, 59, 62, 63, 63, 68, 69, 70, 70, 73, 73, 77, 80, 81, 83, 85, 88, 90, 91, 97, 97], [1, 2, 2, 3, 7, 8, 11, 12, 15, 18, 27, 29, 31, 32, 35, 39, 43, 46, 47, 49, 50, 52, 54, 56, 56, 56, 57, 57, 60, 61, 62, 68, 68, 71, 77, 78, 79, 81, 81, 87, 87, 88, 89, 92, 93], [1, 7, 11, 15, 16, 18, 27, 27, 29, 29, 29, 31, 34, 39, 43, 44, 47, 52, 52, 55, 55, 56, 62, 68, 70, 72, 73, 73, 75, 76, 77, 78, 81, 84, 84, 87, 87, 88, 89, 90, 91, 91, 94, 96, 98], [3, 3, 4, 12, 16, 17, 17, 19, 28, 28, 29, 29, 30, 30, 31, 31, 33, 33, 36, 44, 44, 44, 45, 45, 53, 54, 54, 54, 57, 63, 64, 66, 67, 69, 69, 75, 78, 79, 82, 87, 91, 92, 95, 95, 99], [1, 1, 2, 5, 6, 9, 10, 11, 16, 17, 18, 20, 24, 25, 25, 26, 26, 26, 28, 29, 30, 35, 36, 36, 46, 47, 53, 57, 58, 58, 61, 61, 62, 71, 73, 75, 80, 81, 87, 87, 89, 90, 91, 96, 99], [4, 8, 14, 17, 17, 21, 24, 27, 29, 31, 34, 36, 37, 37, 40, 41, 42, 44, 44, 45, 46, 47, 50, 54, 63, 64, 65, 68, 73, 73, 73, 76, 77, 79, 80, 82, 82, 83, 84, 88, 90, 93, 93, 95, 95], [1, 5, 9, 10, 10, 12, 13, 15, 16, 17, 17, 24, 25, 26, 29, 32, 34, 36, 37, 43, 44, 49, 53, 54, 54, 56, 57, 65, 70, 72, 72, 76, 77, 78, 78, 80, 80, 80, 83, 86, 90, 90, 94, 96, 97], [5, 9, 10, 10, 10, 11, 11, 11, 15, 18, 18, 19, 24, 26, 31, 31, 33, 36, 41, 43, 43, 45, 50, 51, 54, 54, 54, 62, 64, 64, 66, 71, 71, 72, 73, 73, 79, 82, 83, 84, 86, 88, 93, 96, 97], [1, 3, 7, 9, 9, 10, 13, 15, 16, 22, 22, 24, 24, 26, 34, 36, 38, 38, 39, 40, 40, 41, 43, 45, 49, 53, 58, 60, 64, 67, 69, 70, 75, 77, 80, 81, 84, 84, 85, 85, 86, 89, 93, 97, 99], [3, 4, 5, 6, 7, 11, 11, 11, 13, 13, 15, 16, 19, 20, 21, 25, 25, 26, 27, 29, 38, 39, 44, 44, 50, 51, 51, 54, 54, 54, 61, 62, 65, 67, 68, 71, 71, 73, 73, 75, 77, 89, 89, 93, 95], [3, 5, 8, 13, 14, 15, 20, 23, 25, 25, 27, 28, 28, 29, 37, 38, 41, 42, 44, 45, 47, 48, 50, 54, 61, 64, 64, 71, 72, 74, 76, 76, 79, 79, 79, 80, 81, 81, 82, 83, 84, 95, 95, 95, 96], [4, 5, 7, 8, 9, 10, 13, 14, 17, 19, 20, 27, 28, 29, 34, 36, 37, 38, 38, 42, 42, 43, 44, 45, 45, 47, 52, 52, 53, 59, 60, 62, 67, 69, 73, 80, 82, 83, 83, 84, 88, 92, 95, 98, 99], [1, 6, 8, 10, 14, 14, 15, 17, 20, 20, 20, 20, 22, 34, 36, 42, 43, 47, 47, 48, 52, 53, 55, 56, 57, 59, 61, 65, 67, 69, 73, 74, 77, 78, 81, 81, 82, 84, 84, 84, 91, 93, 94, 98, 98], [2, 5, 8, 8, 10, 10, 11, 15, 16, 16, 18, 18, 18, 20, 21, 23, 37, 40, 41, 41, 42, 44, 46, 48, 50, 50, 52, 53, 59, 68, 68, 70, 73, 73, 74, 77, 77, 83, 86, 88, 92, 92, 94, 97, 99], [3, 4, 6, 6, 10, 11, 12, 13, 13, 15, 15, 17, 22, 23, 25, 28, 30, 37, 42, 43, 44, 46, 46, 52, 52, 53, 57, 57, 58, 58, 58, 59, 60, 60, 60, 63, 63, 67, 69, 69, 73, 74, 74, 75, 87], [3, 4, 4, 7, 8, 11, 12, 14, 20, 22, 23, 24, 24, 31, 32, 39, 41, 42, 45, 45, 47, 47, 51, 57, 57, 61, 62, 62, 64, 65, 66, 67, 69, 72, 72, 72, 80, 81, 85, 88, 91, 95, 96, 99, 99], [3, 5, 6, 8, 8, 8, 11, 12, 15, 17, 19, 19, 19, 22, 22, 23, 26, 27, 30, 34, 35, 36, 38, 46, 51, 51, 55, 59, 62, 62, 65, 66, 71, 73, 75, 77, 78, 86, 89, 90, 94, 95, 96, 96, 96], [3, 8, 9, 11, 13, 18, 18, 20, 21, 23, 23, 25, 27, 29, 32, 33, 36, 36, 44, 47, 49, 53, 58, 63, 64, 64, 66, 68, 68, 70, 71, 72, 72, 73, 74, 75, 75, 81, 82, 84, 85, 86, 88, 88, 96], [3, 5, 5, 7, 16, 16, 18, 18, 19, 20, 28, 31, 32, 35, 37, 38, 39, 39, 48, 49, 54, 60, 61, 67, 68, 70, 75, 75, 77, 78, 81, 82, 83, 83, 86, 87, 88, 89, 91, 91, 93, 97, 97, 97, 97], [2, 2, 3, 5, 11, 16, 18, 19, 20, 22, 22, 24, 24, 26, 26, 29, 33, 34, 35, 37, 41, 41, 44, 44, 45, 56, 56, 57, 57, 59, 64, 64, 70, 77, 80, 80, 83, 88, 89, 93, 94, 95, 96, 96, 98], [1, 3, 5, 6, 12, 16, 18, 21, 22, 23, 26, 29, 33, 37, 39, 40, 43, 46, 47, 53, 57, 57, 60, 61, 63, 63, 64, 65, 66, 67, 71, 71, 72, 72, 77, 81, 84, 85, 87, 93, 94, 95, 96, 97, 99], [3, 4, 6, 7, 10, 11, 16, 18, 19, 21, 22, 22, 32, 33, 34, 34, 36, 39, 40, 41, 42, 44, 47, 49, 49, 50, 54, 56, 63, 66, 71, 72, 73, 74, 74, 78, 79, 82, 83, 86, 89, 91, 92, 92, 93], [3, 4, 4, 5, 8, 15, 16, 19, 19, 20, 31, 32, 34, 34, 39, 40, 42, 45, 45, 47, 48, 48, 49, 52, 55, 60, 62, 62, 64, 68, 70, 73, 73, 74, 75, 77, 77, 81, 81, 83, 86, 90, 91, 94, 94], [4, 5, 12, 15, 16, 16, 17, 20, 24, 24, 25, 25, 25, 28, 30, 30, 33, 37, 39, 41, 42, 48, 50, 51, 51, 54, 57, 62, 63, 65, 66, 68, 69, 72, 72, 72, 72, 74, 75, 75, 77, 86, 88, 92, 92], [2, 3, 7, 7, 8, 11, 11, 12, 12, 14, 17, 17, 17, 21, 21, 23, 27, 27, 30, 31, 33, 36, 45, 46, 48, 48, 49, 51, 53, 55, 58, 59, 61, 65, 68, 69, 71, 84, 84, 84, 90, 94, 97, 98, 99], [1, 4, 7, 7, 10, 10, 12, 14, 15, 15, 16, 20, 21, 28, 28, 28, 29, 29, 35, 40, 43, 45, 48, 49, 51, 52, 56, 56, 66, 67, 69, 69, 70, 71, 73, 74, 78, 79, 82, 86, 89, 92, 96, 98, 98], [4, 5, 6, 9, 9, 9, 13, 15, 17, 23, 23, 28, 33, 34, 34, 35, 35, 40, 42, 43, 46, 50, 52, 55, 57, 60, 64, 67, 72, 72, 75, 75, 77, 77, 79, 79, 81, 81, 82, 86, 86, 90, 91, 95, 97], [1, 4, 4, 5, 5, 6, 7, 9, 9, 9, 10, 11, 15, 15, 21, 22, 26, 26, 29, 31, 31, 34, 38, 40, 40, 42, 43, 44, 45, 49, 50, 52, 54, 55, 57, 62, 66, 68, 69, 70, 72, 82, 85, 86, 90], [3, 4, 6, 8, 8, 9, 10, 11, 15, 22, 22, 26, 26, 27, 29, 31, 37, 38, 41, 41, 43, 43, 47, 47, 48, 50, 53, 54, 55, 56, 60, 63, 63, 67, 68, 70, 71, 75, 76, 84, 87, 87, 91, 95, 98], [2, 7, 8, 16, 17, 17, 23, 26, 26, 28, 31, 35, 36, 38, 39, 43, 48, 49, 53, 58, 59, 60, 68, 68, 70, 70, 71, 73, 73, 74, 76, 77, 77, 79, 79, 82, 82, 82, 82, 87, 88, 89, 90, 90, 98], [3, 3, 10, 12, 16, 17, 20, 21, 22, 24, 25, 27, 28, 31, 32, 33, 34, 35, 35, 38, 39, 40, 42, 45, 48, 51, 52, 54, 56, 61, 63, 63, 66, 67, 68, 69, 74, 75, 76, 78, 79, 87, 91, 91, 92], [4, 6, 8, 8, 14, 17, 23, 23, 25, 25, 27, 27, 30, 30, 34, 35, 38, 40, 42, 48, 49, 51, 52, 53, 57, 57, 58, 58, 59, 67, 70, 71, 75, 76, 77, 78, 82, 84, 85, 87, 94, 94, 96, 97, 98], [2, 4, 4, 4, 4, 6, 8, 10, 13, 14, 15, 18, 20, 23, 24, 26, 27, 29, 33, 35, 39, 40, 41, 42, 46, 48, 49, 52, 56, 62, 64, 68, 71, 76, 77, 77, 78, 79, 84, 92, 94, 95, 95, 97, 98], [1, 7, 8, 9, 12, 12, 14, 14, 16, 19, 23, 25, 27, 27, 27, 28, 29, 29, 33, 33, 41, 44, 45, 46, 51, 51, 52, 56, 57, 58, 59, 60, 64, 68, 69, 70, 73, 80, 82, 82, 86, 87, 90, 98, 98], [2, 5, 18, 19, 20, 23, 26, 27, 33, 36, 45, 46, 51, 52, 53, 56, 58, 60, 63, 68, 71, 71, 72, 73, 75, 76, 76, 80, 80, 81, 81, 84, 87, 89, 91, 92, 92, 92, 93, 93, 94, 95, 98, 98, 99], [1, 1, 5, 5, 5, 6, 10, 10, 15, 16, 17, 22, 29, 31, 42, 48, 49, 49, 49, 53, 54, 54, 55, 56, 56, 59, 60, 62, 62, 64, 72, 72, 73, 75, 77, 81, 82, 82, 86, 89, 90, 91, 97, 97, 99], [3, 5, 8, 9, 10, 13, 14, 14, 16, 26, 26, 29, 30, 32, 36, 37, 42, 42, 44, 45, 45, 47, 47, 49, 52, 53, 54, 57, 58, 62, 63, 64, 65, 65, 67, 69, 69, 69, 70, 75, 76, 76, 80, 86, 86], [1, 2, 4, 8, 8, 11, 12, 16, 21, 28, 30, 30, 30, 32, 36, 37, 38, 39, 40, 43, 46, 49, 49, 50, 55, 57, 60, 60, 61, 64, 65, 66, 73, 78, 79, 80, 80, 83, 86, 86, 87, 89, 90, 93, 98], [8, 8, 11, 14, 16, 16, 17, 23, 24, 29, 31, 38, 38, 39, 40, 40, 48, 51, 60, 60, 62, 65, 65, 67, 67, 68, 70, 71, 73, 73, 74, 75, 78, 79, 80, 81, 83, 83, 86, 87, 91, 92, 93, 93, 98], [1, 3, 7, 10, 10, 11, 13, 14, 18, 18, 20, 21, 22, 25, 27, 27, 28, 30, 37, 38, 44, 48, 50, 52, 55, 57, 60, 63, 64, 65, 67, 71, 74, 75, 77, 79, 79, 85, 86, 90, 93, 94, 96, 98, 99], [1, 4, 7, 11, 13, 15, 15, 16, 19, 21, 25, 27, 38, 43, 43, 48, 48, 49, 49, 52, 53, 54, 56, 57, 61, 61, 64, 64, 65, 66, 68, 68, 69, 70, 71, 71, 73, 76, 81, 83, 91, 94, 95, 96, 99], [1, 2, 4, 11, 12, 12, 15, 17, 20, 22, 28, 30, 31, 31, 31, 38, 38, 38, 41, 48, 48, 50, 51, 51, 51, 57, 59, 62, 68, 73, 75, 78, 81, 83, 86, 90, 90, 90, 92, 92, 94, 94, 96, 97, 98], [3, 7, 11, 11, 13, 13, 13, 20, 20, 23, 24, 25, 30, 31, 31, 31, 34, 34, 36, 39, 42, 42, 47, 56, 57, 60, 65, 65, 66, 72, 72, 73, 73, 75, 75, 78, 79, 83, 87, 87, 93, 93, 95, 96, 99], [1, 2, 3, 4, 5, 6, 10, 11, 12, 14, 18, 20, 22, 24, 24, 26, 26, 31, 34, 35, 36, 38, 45, 45, 45, 45, 46, 47, 48, 52, 55, 57, 60, 63, 66, 76, 81, 82, 86, 86, 89, 90, 93, 95, 96], [2, 2, 5, 8, 13, 16, 22, 23, 27, 28, 30, 31, 36, 39, 40, 45, 46, 49, 51, 54, 57, 57, 57, 58, 59, 60, 61, 63, 67, 70, 70, 72, 74, 75, 75, 81, 82, 85, 86, 88, 91, 92, 92, 93, 99]],23,), ([[-90, 64, -52, -42, 98, 50, -60, -30, -34, -42, -58, -10, 68, 24, 76, -32, 14, -64, 10, 30, -8, 74, -40, 4, -34, 48, 8, 74, 54, -8, -86, 34, -32, -10, -94, 0, 16, -6, -40, -94, -84], [68, 62, 98, 88, 98, -60, -84, 0, 32, -28, 4, -6, 84, -32, -40, -48, 50, -88, 2, 42, -56, 4, -46, -66, 38, 26, -80, 82, 74, -70, -4, -12, 74, -32, -12, 44, -94, -72, 78, -62, 16], [-76, -32, 58, 48, -38, -38, 46, -74, 12, -88, 82, 0, 8, 44, 22, -68, 34, 48, 74, 4, 48, -82, -96, 40, -78, -80, 26, 22, 36, -22, -36, 88, 10, 14, -98, 22, 4, 72, -72, 10, 56], [-26, -32, -86, 86, 22, -50, 56, 30, -30, -44, 10, 58, 60, -82, 8, 50, -10, 8, 80, 68, 34, -14, -96, 24, -8, -24, 52, 70, 80, -90, -22, -62, -4, 20, -30, -4, -38, 90, 18, 58, 36], [98, -2, 62, -16, -48, 78, 14, 24, 90, 12, -98, -40, -16, 0, 10, 96, -90, 56, 8, 10, -56, 90, -46, -84, 86, 66, -16, 84, -92, 26, -84, -94, -22, -94, 16, -68, -18, 24, -50, -80, 40], [-52, 16, -58, 10, -76, -90, -6, 98, 22, 14, 66, -16, -14, 72, 34, -90, -92, -34, 42, -34, 66, 18, 18, 38, 28, -30, -10, -50, 46, 50, -98, 30, -80, -20, 8, -82, -4, -10, -82, 22, 20], [68, 14, 62, -22, 10, -78, -48, 84, -96, 96, -54, 6, 92, 38, 52, 16, 48, 80, -28, 46, 64, 20, 80, -46, -88, -98, -46, -14, -28, 40, 78, 96, -26, 10, 62, -82, -22, -76, 82, -60, -72], [36, -30, -78, 80, 10, 54, -60, -84, 8, -54, 22, 96, 36, -38, -10, 56, -86, 40, -62, -48, -18, 78, -40, -86, 36, 46, 74, 66, -10, 32, -98, -18, -82, -6, -34, 88, 4, -2, 38, 96, -90], [44, -54, -40, -4, 68, -74, -12, 22, 16, 32, -66, -92, -70, 40, -34, 58, 68, -86, 34, -40, -72, 30, -52, 56, -88, 58, 84, 28, -88, 64, 36, 26, 52, 88, -28, 34, -28, -42, -88, 46, -26], [58, 56, 24, 22, -50, -26, 44, -42, -80, -44, -96, 58, -50, -40, -38, -32, 34, 84, 0, -62, 16, 18, -10, 94, 8, 50, -78, 20, 8, -16, -94, 78, 30, 86, -4, -54, 0, -44, 56, 46, 30], [-44, 2, 14, 56, -2, 20, -14, 20, 24, -90, 40, -90, -6, 90, -22, -64, -64, -8, -58, 62, -48, -84, -44, -78, 80, 68, -74, 6, -42, 52, 14, 40, 2, -44, 24, -76, -92, 82, 6, 6, 94], [80, -84, -8, 90, -72, 88, -58, 98, 30, -28, -84, -98, 14, -90, 2, 50, 26, -32, -16, 50, -28, 50, 18, 0, -42, 56, 58, 68, 6, -26, -78, 24, 70, -98, 52, 46, -52, 92, 52, 38, 28], [50, 56, -92, -68, -2, 76, 82, -22, -86, -70, -4, 84, -30, -68, 4, 58, -40, -68, -46, -92, 68, -56, 14, -12, -98, -36, 76, 54, 14, 12, 18, -14, 12, -28, 14, 2, 2, -74, 90, -34, -34], [-52, 90, -52, 26, -66, 36, 38, 52, -38, -62, 72, 78, 58, -50, -28, 0, -30, 6, -8, 82, -30, 42, 84, 28, 40, 74, 58, 12, 62, -28, -66, 68, 34, 72, -22, 70, 8, 38, 14, 38, 88], [66, -2, 0, -74, -20, 94, 90, -30, 8, -36, -54, -36, 26, -96, 6, -8, 92, -6, -98, 86, 48, 50, 48, -92, 88, -68, -6, -14, 80, -38, 36, 74, -4, -34, 86, -80, -82, 42, -82, -54, -82], [54, 82, -16, -4, -40, 36, -30, -6, -2, 62, -88, -6, 22, 44, -80, 80, 88, -2, 28, -38, 6, 98, 88, -34, 60, -18, -52, -74, -28, -48, -18, -28, -18, -4, 12, 78, -8, 20, -64, -98, -94], [68, -18, -98, 42, -78, 56, -26, -8, -56, 74, 2, -12, 52, -62, 26, -50, -34, 32, -26, -80, 20, 22, 30, -20, 66, 12, 22, 56, -38, -4, -46, 74, -30, -8, -70, -90, 80, 8, -56, 10, -66], [-32, -26, 78, 18, -84, 82, -36, 38, 18, 84, 30, -10, 30, -74, 44, 82, 22, 98, -30, -68, -42, -72, -24, -54, 82, -90, -6, 40, -94, 86, 84, -28, 54, 96, 4, -48, 42, 68, -60, 90, 12], [82, 94, -50, 62, -94, 76, -62, 94, 30, 26, -46, -16, 60, -12, -80, 12, -26, -60, -32, 74, 10, 8, 84, 2, -48, 66, 50, 60, -28, 84, 30, -76, 82, -70, 52, 82, -6, -92, 50, -2, -64], [82, 2, 52, -86, -84, 94, 96, 96, -96, -38, -64, 12, 74, -48, -38, 48, 62, -24, -98, -64, -42, 62, -6, 36, 86, -80, -80, 68, 70, -18, -58, -66, 64, 2, -14, -34, 8, 10, 76, 54, -34], [-20, 48, 86, -68, -44, 10, -56, 68, 14, -24, -10, -34, 8, 74, 22, -76, -8, 76, -54, -36, -16, -66, 48, -24, 60, -22, -48, 0, -86, -56, -98, 82, 16, -32, 78, 90, -38, -30, -34, -8, -40], [72, 74, 72, 20, 84, 0, -54, -36, 28, -24, 24, -16, -4, 54, -88, 98, -16, 74, 80, -60, 62, 48, -26, 84, 86, -2, 40, 38, 84, 62, -12, 82, -34, -78, -64, -62, -20, -72, -70, -58, 70], [88, -20, -38, -64, -74, -84, 70, 68, -8, 50, 64, -60, 42, -34, -74, -98, 22, -38, -4, -72, 26, -84, 84, 48, -70, -96, 42, -96, 40, 12, 50, 96, 94, -82, 58, -64, 62, 12, 10, -86, 96], [96, -54, 80, -14, 78, -66, 28, 86, -16, -14, -26, 42, 72, 34, -26, 28, 56, 82, -90, -20, -26, -58, -14, 20, -24, -98, -18, -16, 36, 28, 80, 60, -58, 56, -18, -66, 56, -80, -74, 90, 64], [4, -60, -40, -16, -10, -32, -90, 2, -96, 70, -34, 12, -24, 20, 66, 92, 96, 70, 74, -6, 26, 66, 64, -82, -38, 68, -98, -86, -82, -12, 86, -90, 68, 46, -16, -22, -18, 2, -30, 94, -90], [22, -14, 94, -22, 58, -4, 12, 28, -80, -82, -84, 56, -38, -78, -30, 94, 68, 62, 2, -16, -6, 46, -96, 14, 58, 2, -66, -88, -2, -26, -66, -42, 4, 60, -96, 88, -14, 70, -64, -44, 58], [-52, 58, 38, -80, 4, -4, -74, 6, -68, -82, 40, 40, 68, -56, -20, -74, -98, 54, -32, 56, -38, -40, 98, -60, 24, -76, 52, -98, 12, -24, -46, -82, 0, -58, 64, 56, 22, -16, 84, 0, 26], [-26, 32, -64, -12, 18, 0, 22, -44, 68, -72, -58, -28, 38, -16, -94, 58, 22, -32, -80, -48, 70, -56, 48, 56, -46, 50, -36, 94, -44, -64, 32, -26, 78, -90, 98, -42, -30, 32, -32, -2, 46], [-2, -90, -74, -50, 66, -34, -48, -10, -10, -88, -6, -88, -26, 22, -18, -92, 66, 56, 82, -46, -88, 66, 86, -94, 30, 50, -40, -18, -26, -30, 38, 74, -54, 40, -64, 16, 34, 98, 60, -30, 74], [-58, 74, 74, -8, 54, -34, -6, -96, -80, -26, -84, 40, -84, 46, -44, -4, 22, 16, 50, -48, -44, 48, 92, -52, -26, 36, -42, 54, -18, -94, 44, -28, -24, 66, -4, 96, 52, 40, 0, 82, -84], [12, 66, 40, 10, -70, 52, 44, 76, -22, -64, -6, -28, 14, -8, 10, -54, 18, -98, 4, -42, 34, -88, 10, -8, 84, 0, 62, 98, -58, 88, 20, -78, -40, 40, 42, -52, -4, 18, -40, -98, 22], [-86, 96, 2, 70, 6, 4, 62, -22, -8, -50, -22, -16, 2, -18, 0, 94, -60, -60, 84, -96, 0, 68, -86, -16, -90, -64, -52, 88, -58, -14, 62, -94, -52, 58, -38, 38, 18, 94, -52, 6, -56], [-56, -28, 14, -4, -2, -20, 14, -94, -76, -12, 50, 46, -6, 54, -38, -94, -98, 92, -94, -84, -98, 58, 84, -86, -88, 52, 36, 42, 88, -94, -20, 2, -66, 24, -18, -90, 78, 6, -70, -88, -88], [96, -70, 14, -2, -48, -74, -62, 92, 90, -22, 4, -6, 40, 68, 34, -36, 24, -24, 88, 66, -62, -18, 48, 70, -92, 26, -30, 6, -34, 18, 42, 42, -32, 34, 92, 36, -24, 10, 90, -74, 90], [64, -98, 72, 76, 2, 40, 38, 94, -88, 30, 0, 80, 76, -38, -24, 0, -8, 36, 16, 32, -68, 38, 84, -88, 80, -92, -54, 92, -58, 20, 48, 76, -26, 6, 40, 8, -22, 90, -66, -54, 60], [-48, 44, 52, -30, 78, -68, 54, 20, -38, -82, -6, 48, -64, 64, -34, -74, -70, 54, 60, 62, 88, 44, -6, -82, 94, -76, -46, -46, -82, 18, -50, -12, 32, 34, 76, 66, -10, 84, 80, 52, 86], [40, -96, -34, 70, 38, 10, 28, 14, -32, 52, -94, 48, 92, 56, 26, -86, 42, -36, -70, -18, 86, -46, 16, 78, 76, -40, -8, 26, 88, 10, -26, -12, -64, 82, -90, -10, -92, 96, 40, -52, 82], [-76, 54, -8, 22, -84, 36, 76, 16, 14, -62, 30, 30, -92, -80, 88, 98, -64, -94, -26, 10, 46, 46, -94, 6, -18, 98, -52, 10, -14, -14, 76, 22, -90, 78, 26, -60, 86, -56, -34, -46, 50], [68, 68, -4, 22, 22, 66, 18, 86, 38, -56, -26, 44, 56, -70, 14, 94, 12, -40, -96, -22, 88, 54, 58, -94, -6, 64, 92, 80, 70, -82, 70, 58, -56, -68, -38, -88, -84, -78, -94, 60, -72], [-28, 64, -78, -54, 76, 66, 30, -74, 36, 6, -26, -84, 48, 22, 36, 96, -10, -16, 18, 58, -58, -58, 6, -44, 96, -34, 48, 26, 6, -76, -36, 30, -44, 48, -36, 66, -48, -10, -12, 74, -70], [32, 4, 22, -48, 8, 78, -70, -78, -78, 30, -70, 76, -36, 42, -12, 72, -36, 54, -50, 90, 82, 76, -34, 82, 28, -30, 10, 34, 52, 74, -90, -60, -46, 64, -68, -60, 88, 8, 50, 48, 56]],37,), ([[1, 1, 1, 1], [0, 0, 0, 1], [0, 0, 0, 0], [0, 1, 1, 1]],2,), ([[96, 94, 33, 75, 69, 69, 91, 26], [10, 49, 56, 26, 54, 98, 70, 59], [12, 39, 29, 62, 49, 76, 43, 55], [98, 30, 1, 23, 4, 81, 78, 3], [82, 14, 46, 85, 89, 5, 11, 64], [46, 39, 97, 97, 4, 83, 99, 8], [48, 50, 62, 64, 94, 79, 84, 12], [49, 69, 81, 46, 89, 69, 43, 5]],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX{ static int f_gold ( int mat [ ] [ ] , int n ) { int res = 0 ; for ( int i = 0 ; i < n ; i ++ ) if ( mat [ i ] [ i ] == mat [ i ] [ n - i - 1 ] ) res ++ ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{62}}); param0.add(new int[][]{new int[]{-56,-6,-12,64,36,12,-40,-38,14,68,62,-46,-30},new int[]{56,30,-18,-92,-10,76,6,64,14,-94,34,6,12},new int[]{-80,90,-40,2,-48,-28,58,86,-14,-50,-78,36,-96},new int[]{-92,84,-86,60,-18,18,24,-16,42,66,-10,-70,16},new int[]{68,12,78,8,-44,2,-76,4,4,8,24,-74,-60},new int[]{36,-34,90,-76,92,48,-6,-46,46,0,-8,-68,24},new int[]{54,-62,10,10,88,28,-92,-4,-92,-74,86,-52,24},new int[]{22,0,24,98,2,76,-76,-76,72,66,-88,28,48},new int[]{14,10,78,34,-64,88,48,-12,-8,80,-66,-4,-92},new int[]{-22,-68,44,92,42,20,34,-14,18,-34,-76,12,-12},new int[]{26,50,10,84,-54,-56,80,-24,42,-56,80,20,-52},new int[]{-2,-98,-46,34,-22,2,18,2,-80,70,26,38,-98},new int[]{-70,44,-54,-12,78,-10,-80,44,-34,16,-54,24,-36}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{64,13,62,37,41,79,13,99,82,90,42,83,94,22,55,35,38,49,83,12,20,92,69,27,21,97,26,25,87,47,60,20,71,80,46,57,36,9,87,39,67,13,34,75,48,41,54,12,26},new int[]{51,78,95,74,11,77,69,21,55,66,93,44,55,80,79,95,39,25,8,44,78,35,14,24,2,44,74,10,7,50,29,29,50,47,68,20,37,69,52,6,15,4,54,1,41,61,53,23,17},new int[]{53,35,55,27,25,62,59,43,10,1,57,97,60,19,4,74,59,30,1,88,81,66,56,7,79,7,87,61,83,18,20,97,68,8,21,84,48,4,89,46,19,93,4,80,95,69,59,19,63},new int[]{21,59,15,68,31,60,58,61,22,82,65,88,58,71,10,5,6,25,18,20,98,68,8,63,25,16,63,56,31,28,2,7,56,29,22,42,7,60,7,14,53,25,10,32,46,3,95,18,67},new int[]{15,28,19,88,66,26,2,49,8,58,40,51,7,2,61,29,27,67,73,4,70,78,84,60,99,20,67,1,44,16,27,71,95,75,99,81,46,22,18,81,35,1,80,88,34,25,26,57,32},new int[]{26,78,58,96,76,98,27,74,52,59,48,90,61,43,2,44,99,64,93,36,70,35,96,87,2,23,45,78,79,83,91,36,61,94,69,51,34,93,91,13,32,24,81,14,98,88,1,92,50},new int[]{18,5,12,94,10,40,95,87,90,58,11,13,82,3,83,1,86,37,94,75,92,2,65,6,11,52,5,3,76,16,30,91,96,24,25,49,3,78,90,41,65,42,49,46,28,39,97,1,11},new int[]{74,11,85,75,6,42,41,60,25,36,59,14,95,10,89,93,70,44,34,6,57,32,59,74,59,35,61,48,64,16,64,46,34,14,84,89,66,36,8,87,78,72,99,83,34,88,71,17,13},new int[]{23,28,65,90,23,29,89,11,13,75,37,53,76,76,28,63,22,82,74,73,17,21,54,19,65,17,23,11,28,60,16,19,55,83,48,14,8,84,40,91,96,72,16,79,80,60,17,92,94},new int[]{40,51,57,69,48,63,30,7,43,79,82,92,48,12,12,13,10,88,10,55,16,57,29,91,11,52,99,91,81,23,37,32,29,50,49,31,85,67,37,30,70,48,90,64,14,73,31,90,71},new int[]{15,51,10,81,51,47,52,69,3,55,87,94,54,79,33,29,18,41,37,76,65,68,36,83,88,13,22,74,70,21,88,75,41,71,76,69,76,22,57,27,91,4,30,96,82,71,57,90,55},new int[]{91,67,84,54,10,88,37,45,22,67,82,92,28,55,7,94,6,23,89,35,24,33,24,8,33,21,34,55,17,31,85,79,46,15,81,87,39,77,89,36,17,98,53,8,52,74,55,88,76},new int[]{5,28,79,7,68,20,99,83,74,66,32,86,13,5,76,32,98,20,26,90,83,55,92,20,32,38,20,11,18,27,76,18,8,93,62,75,45,53,98,2,37,56,72,68,35,45,75,94,12},new int[]{74,8,85,10,58,59,35,46,78,87,33,7,37,22,61,10,79,26,1,86,65,31,25,9,55,40,94,15,57,64,88,98,23,3,48,38,20,82,73,42,24,68,47,81,33,78,37,99,80},new int[]{66,29,59,85,53,93,30,27,51,39,82,66,97,27,31,42,19,46,25,71,33,90,31,45,53,77,27,79,74,37,6,57,86,11,21,37,80,77,6,17,57,39,61,49,23,74,72,10,12},new int[]{58,96,34,23,27,20,10,25,1,6,93,17,80,48,11,23,99,64,8,69,94,29,49,85,88,19,32,53,36,86,2,3,67,79,23,76,8,26,47,41,99,81,52,39,34,50,15,39,31},new int[]{31,27,87,26,85,60,45,36,89,51,10,33,60,82,29,23,71,16,68,90,3,24,36,59,26,53,71,84,23,89,64,74,8,51,89,16,78,72,70,19,83,73,52,34,8,55,87,88,27},new int[]{14,57,68,56,58,90,49,65,72,65,73,7,79,37,37,43,44,16,82,67,95,2,47,51,70,9,89,65,90,69,94,18,97,35,38,67,77,18,4,95,78,22,67,86,74,35,72,25,6},new int[]{36,20,73,37,38,25,96,92,83,61,51,80,59,22,41,14,90,7,94,25,31,30,85,14,58,68,10,60,44,80,96,43,82,47,31,83,19,70,7,34,54,43,74,52,37,46,42,49,82},new int[]{52,52,61,51,71,67,28,85,72,35,66,48,50,49,81,31,69,15,28,87,96,97,21,1,16,37,80,92,16,8,31,58,56,44,96,7,66,11,55,18,69,90,53,15,22,57,8,98,18},new int[]{85,30,77,51,48,29,46,76,27,42,34,4,56,28,46,97,57,20,69,24,76,54,58,46,12,71,27,6,77,17,35,49,84,1,61,57,66,63,52,42,66,21,84,23,18,28,71,18,27},new int[]{25,53,3,58,79,23,32,85,49,99,90,65,88,91,98,57,30,1,46,65,7,77,74,65,30,88,77,53,38,76,90,72,46,59,56,94,82,7,33,63,81,37,57,47,29,77,28,32,90},new int[]{79,94,9,36,56,25,72,21,73,96,11,73,20,31,79,50,95,9,36,63,8,50,57,2,91,1,84,74,41,71,73,97,36,18,69,57,49,55,95,89,36,83,96,23,60,15,61,75,72},new int[]{41,24,81,57,15,46,19,53,56,45,66,62,79,11,48,73,91,48,8,65,91,88,55,36,13,38,68,66,21,45,65,41,13,34,2,85,47,28,53,60,5,9,81,40,58,51,65,9,61},new int[]{68,8,55,2,80,75,83,35,24,58,33,66,67,18,24,16,14,50,61,8,13,18,58,75,68,77,47,69,61,39,36,26,92,67,59,43,44,25,19,68,86,46,83,22,32,17,22,86,44},new int[]{67,74,20,20,55,32,97,12,21,40,7,72,34,62,49,44,38,23,14,93,61,56,6,47,19,93,63,79,12,17,83,67,72,14,88,86,45,33,35,96,28,16,31,17,27,17,54,3,27},new int[]{30,28,83,88,86,45,62,94,25,60,98,55,73,92,29,32,37,2,13,26,50,93,82,77,31,59,91,52,52,42,70,31,92,46,19,59,79,87,62,25,22,57,11,40,46,29,60,57,37},new int[]{52,73,62,86,43,59,48,9,71,90,95,39,68,64,90,25,65,50,45,25,32,90,93,79,50,42,37,9,46,17,44,83,53,23,82,30,57,35,21,48,46,1,38,38,48,51,99,99,28},new int[]{71,15,96,82,95,23,68,39,4,30,49,58,1,91,57,23,15,59,98,36,64,7,72,45,69,49,25,3,65,12,57,28,34,41,14,61,55,84,32,70,93,12,74,67,50,45,17,60,55},new int[]{51,46,30,7,56,94,95,46,18,72,71,29,67,18,12,39,84,15,56,68,71,98,26,64,83,45,70,68,65,47,94,54,90,62,25,77,81,54,44,1,27,72,50,45,42,60,11,99,19},new int[]{85,67,94,8,11,67,24,97,22,41,45,56,4,59,14,95,60,35,52,38,73,2,67,54,37,15,88,53,20,20,98,94,69,44,48,6,3,22,1,97,78,20,64,99,39,60,64,48,97},new int[]{8,26,4,9,25,32,34,80,48,56,59,21,42,94,62,18,99,74,77,26,51,91,79,20,43,79,10,37,53,62,41,31,89,18,79,89,69,86,28,94,71,27,17,29,75,94,91,86,97},new int[]{49,81,5,68,41,85,73,58,47,36,93,56,85,97,92,14,95,30,94,5,95,61,11,46,99,88,30,1,5,99,83,25,91,79,60,74,91,22,19,21,75,87,98,75,80,40,47,21,21},new int[]{88,90,31,75,50,83,38,23,51,66,47,13,78,94,58,46,1,86,14,83,63,97,81,96,17,34,68,90,74,96,27,90,82,86,92,93,70,72,19,90,75,2,43,85,53,40,56,47,15},new int[]{55,26,54,52,66,72,79,80,30,42,35,48,67,94,95,9,76,53,42,11,9,52,1,81,35,86,27,83,71,22,50,30,32,35,43,65,96,75,81,37,21,43,51,57,78,48,62,98,66},new int[]{97,93,36,10,47,33,79,54,36,6,25,62,95,60,71,17,72,41,26,67,23,11,62,46,30,10,87,32,92,34,23,34,27,30,44,46,64,28,93,60,98,46,47,66,37,52,58,43,45},new int[]{98,59,98,53,80,39,88,30,86,95,24,10,55,90,27,78,16,8,59,14,36,36,66,95,75,73,7,83,81,75,26,96,49,42,82,75,20,7,50,92,89,12,46,92,36,94,48,59,95},new int[]{11,72,86,5,87,85,61,66,57,15,50,45,95,47,47,39,60,26,24,68,21,26,8,11,74,41,55,82,88,88,15,97,9,91,86,26,60,89,71,1,2,37,53,88,88,22,19,36,48},new int[]{90,10,35,43,40,38,58,19,63,36,80,86,4,13,26,19,77,49,68,72,80,42,57,58,12,88,67,54,73,55,53,68,6,60,65,98,42,81,38,11,79,90,3,35,81,87,95,99,25},new int[]{87,42,10,89,98,84,61,9,81,79,96,1,67,76,61,43,81,22,75,93,50,90,59,58,94,23,13,77,67,69,9,84,95,4,17,56,34,59,78,24,29,33,47,95,60,84,52,68,78},new int[]{50,57,35,13,11,96,43,27,78,52,22,73,27,58,6,20,51,57,66,2,92,55,88,64,64,22,95,58,53,54,44,91,32,21,84,22,58,64,35,68,14,68,99,94,55,26,75,8,59},new int[]{13,56,30,50,9,30,68,42,25,48,64,57,76,30,61,57,84,27,77,47,10,9,40,67,37,68,54,80,72,28,26,13,7,20,81,26,43,66,16,95,19,18,18,29,68,59,4,31,40},new int[]{8,68,45,50,46,5,64,34,57,99,90,35,50,19,2,39,61,81,67,95,42,14,31,82,36,42,73,16,67,48,65,22,65,88,84,84,91,76,36,43,33,68,70,7,41,92,3,10,37},new int[]{10,37,21,61,80,35,87,10,97,91,86,92,13,26,11,12,28,78,51,94,16,20,5,78,99,42,70,34,80,61,58,6,95,51,57,58,69,75,15,36,49,71,64,87,69,5,48,77,20},new int[]{8,80,16,89,60,95,60,48,17,60,91,24,40,46,25,44,64,2,90,9,8,66,36,63,89,76,5,34,79,20,18,50,9,25,17,94,95,84,84,98,90,44,27,18,96,65,38,17,18},new int[]{24,26,1,41,26,67,32,84,65,53,53,87,3,22,85,23,39,83,5,5,7,71,51,25,94,78,50,84,81,23,61,17,28,52,94,59,50,74,57,27,91,94,92,10,24,81,67,66,79},new int[]{78,64,98,56,21,88,2,86,43,17,84,55,1,23,47,56,15,92,28,84,48,13,58,48,18,97,30,63,91,95,28,85,3,38,17,18,32,65,33,6,78,63,42,96,68,49,75,76,98},new int[]{67,87,83,38,2,96,10,65,83,24,4,35,44,21,30,21,12,78,29,14,80,20,63,34,52,42,91,56,19,31,84,91,58,64,48,62,2,95,17,19,9,83,93,47,67,52,83,34,21},new int[]{60,48,17,82,88,76,45,26,97,33,39,41,98,28,1,46,27,31,32,30,79,76,19,98,24,39,5,24,99,65,16,27,19,49,50,76,39,21,59,4,71,59,74,58,92,81,60,70,81}}); param0.add(new int[][]{new int[]{18}}); param0.add(new int[][]{new int[]{0,1,0,0,1,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1,0,1,0,1,0,0,0,1,1,1},new int[]{1,0,1,1,1,0,1,0,0,0,0,0,1,1,1,1,1,1,1,0,1,0,0,1,1,0,0,0,1,1,0,1,0,0,1,1,0,1,0,1,1,1,0,0},new int[]{1,1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,0,0,1,1,1,1,1,0,1,0,0,1,1,1,0,1,1,1,1,1,0,1,0,1,1,0,0,0},new int[]{0,0,1,1,1,1,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0,1,1,0},new int[]{1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,1,1,0,0,0,1,1,0,1,0,0,0,0},new int[]{0,0,1,1,0,0,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,0,1,0,1,0,0,1,1,0,0,1},new int[]{1,1,0,0,1,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,1,0,0,0,1,0,0,1,0,0,1,1,1,1,1,1,1,1,0,1,0,0,1},new int[]{0,0,0,1,0,0,0,1,0,1,1,0,1,1,0,1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,1,0,1,0,1,1,1,0,0,1,1,0,1},new int[]{1,1,0,1,1,1,0,1,0,0,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1,0,1,0,0,1,0},new int[]{1,1,0,1,0,0,1,0,1,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,1,1},new int[]{0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,0,1,0},new int[]{0,1,0,0,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,1,0,0,0,1,1,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,0,0},new int[]{1,0,0,0,1,0,0,1,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,1,1},new int[]{0,0,0,1,1,1,1,1,1,0,1,1,0,0,0,1,0,0,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1},new int[]{1,1,0,1,1,1,1,1,0,1,0,1,0,1,1,1,0,0,0,0,0,1,1,1,1,0,1,0,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,1},new int[]{0,1,0,1,0,1,1,1,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,0,0,0,0},new int[]{1,0,1,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,0,0,0,0,0,0},new int[]{0,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,0,0,1},new int[]{1,0,1,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,1,1,1,0,1,0,0,1,1,1,1,0,0,0,0,1},new int[]{1,0,0,1,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1},new int[]{0,1,0,0,1,0,0,1,0,0,0,1,0,1,1,1,1,0,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,1,0,1,1,0,1,1,1,1},new int[]{0,0,1,1,1,0,1,1,0,1,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,1,1,1,0,1,1,0,1,0,0,0,1,1,1,1,0},new int[]{0,0,0,1,0,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0},new int[]{0,0,1,1,0,1,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,0,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,1,1},new int[]{1,1,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,1,1,0,0,0,0,0,1,0,0,1,1,0,1,1,1,0,1,1,1,0,1,1,0},new int[]{1,1,1,0,1,1,1,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,0,1,0,0},new int[]{1,1,0,0,0,0,0,1,0,1,1,0,1,0,1,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,1,1,1,0,0,1,1,0,0,1,1,1,1,0},new int[]{1,0,0,1,0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,1,0,1,0,0,0,1,1,0,0,0,0,0,1,1,0,0,1,1},new int[]{0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,1,0,1,1,1,1},new int[]{0,1,1,1,0,0,0,1,0,0,0,0,1,0,1,1,1,0,0,1,0,0,1,0,1,0,1,1,0,1,1,0,0,0,0,1,0,1,1,1,0,1,1,1},new int[]{0,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0,1,1,1,0,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,0,0,1,1,1,0,0,1,1},new int[]{0,1,0,1,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,1,1,1,0,1,0,0,1,1,0},new int[]{0,1,1,0,1,0,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1,1,0,0,1,0,0,0,0,1,1,0,1,0,0,1,1,0,1,1,1,1,0},new int[]{1,0,1,1,1,0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,1},new int[]{0,0,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,1,0,1,0,0},new int[]{1,0,0,1,0,1,0,1,0,1,1,0,0,0,0,0,0,1,1,1,1,0,0,1,1,0,0,1,1,1,0,0,1,1,1,1,1,0,0,1,0,1,0,1},new int[]{1,1,0,0,1,0,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,0,0,1},new int[]{0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,0,0,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,1,0,0},new int[]{1,1,1,1,1,0,0,1,0,1,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0},new int[]{0,1,0,1,1,0,0,0,1,1,0,0,1,0,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,1,0,0,0,1,1,0,1,1,0,1,0,0,1,0},new int[]{0,0,0,1,0,1,1,0,0,0,1,1,1,0,1,1,0,0,1,0,0,1,1,1,0,0,1,1,0,1,0,1,0,0,0,0,1,0,1,0,0,0,1,1},new int[]{1,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,1,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0},new int[]{0,1,1,0,0,1,0,0,0,1,0,1,0,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,0,0,0,0,1,1,1,1,0,1},new int[]{1,1,0,0,1,1,1,1,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,0,1,0,1,1,0,0,1,1}}); param0.add(new int[][]{new int[]{3,15,34,40,66,69,71,88},new int[]{6,14,42,43,51,52,58,72},new int[]{14,15,17,21,78,80,87,93},new int[]{7,15,19,20,25,31,68,69},new int[]{1,3,6,68,83,83,86,97},new int[]{17,30,52,54,58,79,81,83},new int[]{1,32,43,48,70,80,93,97},new int[]{3,5,12,47,49,52,74,78}}); param0.add(new int[][]{new int[]{-56,56,12,-42,38,-78,22,-30},new int[]{-24,-28,-80,-6,18,-2,76,-8},new int[]{-46,-74,-48,-98,32,52,60,48},new int[]{42,-46,-84,44,-86,72,8,70},new int[]{80,90,50,-26,-98,84,8,-52},new int[]{-78,-46,26,2,-30,-20,-8,18},new int[]{98,42,62,74,-30,-18,26,-42},new int[]{90,34,12,-88,-60,-92,-10,-60}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,1,1},new int[]{0,0,0,0,0,0,0,0,1},new int[]{0,0,0,0,0,0,0,1,1},new int[]{0,0,0,1,1,1,1,1,1},new int[]{0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1},new int[]{0,0,0,1,1,1,1,1,1},new int[]{0,0,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{14,22,81,76,33,79,91,2,42,5,11,94,9,49,25,93,44,25,71,66,25,30,57,55,25,10,76,34,90,55,54,41},new int[]{93,50,13,70,93,30,5,44,65,70,82,31,88,11,8,95,27,52,93,35,35,72,49,59,54,51,63,50,22,53,33,54},new int[]{69,1,38,60,78,26,48,16,32,82,74,80,74,84,13,58,46,84,84,39,16,84,20,81,10,52,32,33,28,23,64,52},new int[]{87,97,97,85,72,28,33,38,78,93,82,50,33,89,11,93,18,73,82,22,13,40,45,64,13,1,41,27,35,58,40,86},new int[]{59,71,95,38,59,97,86,84,17,52,61,37,24,40,99,88,91,51,7,32,30,2,61,64,65,1,97,86,78,22,67,10},new int[]{60,60,50,9,15,68,42,35,11,9,91,9,60,94,99,34,46,21,12,92,67,19,74,90,96,16,32,25,40,21,78,84},new int[]{88,44,57,46,1,48,15,91,85,47,52,57,82,37,28,88,35,85,66,17,88,69,91,46,44,38,20,39,27,44,47,94},new int[]{32,54,58,78,33,70,52,98,49,13,25,57,99,36,93,42,96,30,56,66,43,8,17,47,67,5,97,66,65,90,97,8},new int[]{32,37,20,6,56,42,36,49,56,66,91,37,3,50,56,80,49,80,57,11,68,32,76,92,45,27,63,28,21,74,31,80},new int[]{32,82,42,52,68,46,3,65,48,75,32,30,62,55,70,31,81,80,78,71,40,20,96,20,91,38,69,42,4,63,21,54},new int[]{91,99,6,10,30,30,98,73,48,33,58,75,52,55,65,4,78,28,90,18,30,97,69,34,64,6,64,83,5,26,77,51},new int[]{70,13,73,23,38,63,40,51,18,60,37,12,52,49,68,45,24,3,82,73,66,96,22,92,29,86,66,21,6,41,56,97},new int[]{42,55,69,3,21,42,44,8,69,86,41,65,62,40,21,56,92,40,60,91,9,66,32,3,16,97,36,10,56,36,65,51},new int[]{43,69,10,87,94,30,21,13,89,38,57,50,55,31,10,36,79,66,71,4,29,90,72,24,24,84,2,97,84,46,5,50},new int[]{14,5,93,73,7,57,29,7,13,53,19,20,15,69,4,61,20,89,4,91,84,91,11,41,67,51,20,22,26,57,82,12},new int[]{44,36,65,68,45,48,92,98,39,93,30,50,75,13,22,6,61,60,74,78,62,14,51,88,17,47,49,36,41,28,8,77},new int[]{73,28,20,71,44,84,58,40,44,12,8,16,70,36,34,3,89,24,15,23,19,53,67,81,5,31,37,91,63,9,12,58},new int[]{67,39,73,31,31,45,71,71,56,93,60,77,73,3,12,67,71,54,81,41,60,31,94,96,43,65,99,95,14,17,48,78},new int[]{95,64,57,19,83,76,74,47,80,60,90,72,21,67,66,67,34,53,86,79,2,83,76,66,19,66,86,82,82,25,1,86},new int[]{3,8,21,55,35,37,20,66,21,2,12,74,68,86,46,23,35,68,35,8,64,19,6,3,14,71,68,66,8,74,34,6},new int[]{32,21,43,18,61,11,88,4,99,59,40,33,86,95,44,52,97,40,31,72,86,86,20,54,77,56,77,52,88,76,58,4},new int[]{41,62,38,39,75,54,52,17,7,28,72,57,26,44,85,79,37,99,39,9,47,4,28,27,6,6,87,66,83,42,19,11},new int[]{53,31,97,12,33,12,98,18,68,15,40,40,19,77,20,37,20,42,95,75,84,86,50,86,34,91,74,50,20,30,56,39},new int[]{4,98,74,96,97,90,64,40,45,77,34,1,15,21,74,21,51,15,42,19,53,95,48,22,2,86,35,21,70,51,99,72},new int[]{71,12,90,92,38,43,40,8,51,65,79,16,5,39,75,95,2,62,50,46,44,97,15,14,81,65,71,17,69,44,41,90},new int[]{79,53,94,59,58,8,50,44,73,12,33,62,90,57,98,46,32,38,16,62,53,48,49,56,17,26,95,42,85,83,12,48},new int[]{43,86,56,15,13,92,83,55,85,61,53,27,16,24,42,1,95,42,20,83,46,90,46,67,58,55,32,84,40,19,7,28},new int[]{70,21,57,89,23,71,62,51,44,78,23,22,43,83,86,73,96,82,52,74,45,37,46,54,23,87,59,77,96,83,94,44},new int[]{65,73,74,45,55,37,84,64,29,35,86,13,14,38,28,94,39,91,6,66,28,96,74,48,93,71,95,91,25,33,97,28},new int[]{26,99,94,14,64,28,5,9,26,31,36,88,56,60,10,56,6,74,48,93,13,22,99,43,35,13,46,52,79,34,87,16},new int[]{90,21,62,63,17,14,78,40,64,35,46,92,68,49,1,91,90,8,60,52,34,81,73,62,75,16,33,40,1,61,88,75},new int[]{10,61,27,86,2,14,32,60,68,75,21,85,49,78,99,75,53,79,16,55,83,70,7,8,86,83,48,34,73,5,69,56}}); List param1 = new ArrayList<>(); param1.add(0); param1.add(10); param1.add(31); param1.add(48); param1.add(0); param1.add(40); param1.add(4); param1.add(4); param1.add(4); param1.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , n ) : res = 0 for i in range ( n ) : if mat [ i ] [ i ] == mat [ i ] [ n - i - 1 ] : res = res + 1 return res ",,," if __name__ == '__main__': param = [ ([[62]],0,), ([[-56, -6, -12, 64, 36, 12, -40, -38, 14, 68, 62, -46, -30], [56, 30, -18, -92, -10, 76, 6, 64, 14, -94, 34, 6, 12], [-80, 90, -40, 2, -48, -28, 58, 86, -14, -50, -78, 36, -96], [-92, 84, -86, 60, -18, 18, 24, -16, 42, 66, -10, -70, 16], [68, 12, 78, 8, -44, 2, -76, 4, 4, 8, 24, -74, -60], [36, -34, 90, -76, 92, 48, -6, -46, 46, 0, -8, -68, 24], [54, -62, 10, 10, 88, 28, -92, -4, -92, -74, 86, -52, 24], [22, 0, 24, 98, 2, 76, -76, -76, 72, 66, -88, 28, 48], [14, 10, 78, 34, -64, 88, 48, -12, -8, 80, -66, -4, -92], [-22, -68, 44, 92, 42, 20, 34, -14, 18, -34, -76, 12, -12], [26, 50, 10, 84, -54, -56, 80, -24, 42, -56, 80, 20, -52], [-2, -98, -46, 34, -22, 2, 18, 2, -80, 70, 26, 38, -98], [-70, 44, -54, -12, 78, -10, -80, 44, -34, 16, -54, 24, -36]],10,), ([[0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 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], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],31,), ([[64, 13, 62, 37, 41, 79, 13, 99, 82, 90, 42, 83, 94, 22, 55, 35, 38, 49, 83, 12, 20, 92, 69, 27, 21, 97, 26, 25, 87, 47, 60, 20, 71, 80, 46, 57, 36, 9, 87, 39, 67, 13, 34, 75, 48, 41, 54, 12, 26], [51, 78, 95, 74, 11, 77, 69, 21, 55, 66, 93, 44, 55, 80, 79, 95, 39, 25, 8, 44, 78, 35, 14, 24, 2, 44, 74, 10, 7, 50, 29, 29, 50, 47, 68, 20, 37, 69, 52, 6, 15, 4, 54, 1, 41, 61, 53, 23, 17], [53, 35, 55, 27, 25, 62, 59, 43, 10, 1, 57, 97, 60, 19, 4, 74, 59, 30, 1, 88, 81, 66, 56, 7, 79, 7, 87, 61, 83, 18, 20, 97, 68, 8, 21, 84, 48, 4, 89, 46, 19, 93, 4, 80, 95, 69, 59, 19, 63], [21, 59, 15, 68, 31, 60, 58, 61, 22, 82, 65, 88, 58, 71, 10, 5, 6, 25, 18, 20, 98, 68, 8, 63, 25, 16, 63, 56, 31, 28, 2, 7, 56, 29, 22, 42, 7, 60, 7, 14, 53, 25, 10, 32, 46, 3, 95, 18, 67], [15, 28, 19, 88, 66, 26, 2, 49, 8, 58, 40, 51, 7, 2, 61, 29, 27, 67, 73, 4, 70, 78, 84, 60, 99, 20, 67, 1, 44, 16, 27, 71, 95, 75, 99, 81, 46, 22, 18, 81, 35, 1, 80, 88, 34, 25, 26, 57, 32], [26, 78, 58, 96, 76, 98, 27, 74, 52, 59, 48, 90, 61, 43, 2, 44, 99, 64, 93, 36, 70, 35, 96, 87, 2, 23, 45, 78, 79, 83, 91, 36, 61, 94, 69, 51, 34, 93, 91, 13, 32, 24, 81, 14, 98, 88, 1, 92, 50], [18, 5, 12, 94, 10, 40, 95, 87, 90, 58, 11, 13, 82, 3, 83, 1, 86, 37, 94, 75, 92, 2, 65, 6, 11, 52, 5, 3, 76, 16, 30, 91, 96, 24, 25, 49, 3, 78, 90, 41, 65, 42, 49, 46, 28, 39, 97, 1, 11], [74, 11, 85, 75, 6, 42, 41, 60, 25, 36, 59, 14, 95, 10, 89, 93, 70, 44, 34, 6, 57, 32, 59, 74, 59, 35, 61, 48, 64, 16, 64, 46, 34, 14, 84, 89, 66, 36, 8, 87, 78, 72, 99, 83, 34, 88, 71, 17, 13], [23, 28, 65, 90, 23, 29, 89, 11, 13, 75, 37, 53, 76, 76, 28, 63, 22, 82, 74, 73, 17, 21, 54, 19, 65, 17, 23, 11, 28, 60, 16, 19, 55, 83, 48, 14, 8, 84, 40, 91, 96, 72, 16, 79, 80, 60, 17, 92, 94], [40, 51, 57, 69, 48, 63, 30, 7, 43, 79, 82, 92, 48, 12, 12, 13, 10, 88, 10, 55, 16, 57, 29, 91, 11, 52, 99, 91, 81, 23, 37, 32, 29, 50, 49, 31, 85, 67, 37, 30, 70, 48, 90, 64, 14, 73, 31, 90, 71], [15, 51, 10, 81, 51, 47, 52, 69, 3, 55, 87, 94, 54, 79, 33, 29, 18, 41, 37, 76, 65, 68, 36, 83, 88, 13, 22, 74, 70, 21, 88, 75, 41, 71, 76, 69, 76, 22, 57, 27, 91, 4, 30, 96, 82, 71, 57, 90, 55], [91, 67, 84, 54, 10, 88, 37, 45, 22, 67, 82, 92, 28, 55, 7, 94, 6, 23, 89, 35, 24, 33, 24, 8, 33, 21, 34, 55, 17, 31, 85, 79, 46, 15, 81, 87, 39, 77, 89, 36, 17, 98, 53, 8, 52, 74, 55, 88, 76], [5, 28, 79, 7, 68, 20, 99, 83, 74, 66, 32, 86, 13, 5, 76, 32, 98, 20, 26, 90, 83, 55, 92, 20, 32, 38, 20, 11, 18, 27, 76, 18, 8, 93, 62, 75, 45, 53, 98, 2, 37, 56, 72, 68, 35, 45, 75, 94, 12], [74, 8, 85, 10, 58, 59, 35, 46, 78, 87, 33, 7, 37, 22, 61, 10, 79, 26, 1, 86, 65, 31, 25, 9, 55, 40, 94, 15, 57, 64, 88, 98, 23, 3, 48, 38, 20, 82, 73, 42, 24, 68, 47, 81, 33, 78, 37, 99, 80], [66, 29, 59, 85, 53, 93, 30, 27, 51, 39, 82, 66, 97, 27, 31, 42, 19, 46, 25, 71, 33, 90, 31, 45, 53, 77, 27, 79, 74, 37, 6, 57, 86, 11, 21, 37, 80, 77, 6, 17, 57, 39, 61, 49, 23, 74, 72, 10, 12], [58, 96, 34, 23, 27, 20, 10, 25, 1, 6, 93, 17, 80, 48, 11, 23, 99, 64, 8, 69, 94, 29, 49, 85, 88, 19, 32, 53, 36, 86, 2, 3, 67, 79, 23, 76, 8, 26, 47, 41, 99, 81, 52, 39, 34, 50, 15, 39, 31], [31, 27, 87, 26, 85, 60, 45, 36, 89, 51, 10, 33, 60, 82, 29, 23, 71, 16, 68, 90, 3, 24, 36, 59, 26, 53, 71, 84, 23, 89, 64, 74, 8, 51, 89, 16, 78, 72, 70, 19, 83, 73, 52, 34, 8, 55, 87, 88, 27], [14, 57, 68, 56, 58, 90, 49, 65, 72, 65, 73, 7, 79, 37, 37, 43, 44, 16, 82, 67, 95, 2, 47, 51, 70, 9, 89, 65, 90, 69, 94, 18, 97, 35, 38, 67, 77, 18, 4, 95, 78, 22, 67, 86, 74, 35, 72, 25, 6], [36, 20, 73, 37, 38, 25, 96, 92, 83, 61, 51, 80, 59, 22, 41, 14, 90, 7, 94, 25, 31, 30, 85, 14, 58, 68, 10, 60, 44, 80, 96, 43, 82, 47, 31, 83, 19, 70, 7, 34, 54, 43, 74, 52, 37, 46, 42, 49, 82], [52, 52, 61, 51, 71, 67, 28, 85, 72, 35, 66, 48, 50, 49, 81, 31, 69, 15, 28, 87, 96, 97, 21, 1, 16, 37, 80, 92, 16, 8, 31, 58, 56, 44, 96, 7, 66, 11, 55, 18, 69, 90, 53, 15, 22, 57, 8, 98, 18], [85, 30, 77, 51, 48, 29, 46, 76, 27, 42, 34, 4, 56, 28, 46, 97, 57, 20, 69, 24, 76, 54, 58, 46, 12, 71, 27, 6, 77, 17, 35, 49, 84, 1, 61, 57, 66, 63, 52, 42, 66, 21, 84, 23, 18, 28, 71, 18, 27], [25, 53, 3, 58, 79, 23, 32, 85, 49, 99, 90, 65, 88, 91, 98, 57, 30, 1, 46, 65, 7, 77, 74, 65, 30, 88, 77, 53, 38, 76, 90, 72, 46, 59, 56, 94, 82, 7, 33, 63, 81, 37, 57, 47, 29, 77, 28, 32, 90], [79, 94, 9, 36, 56, 25, 72, 21, 73, 96, 11, 73, 20, 31, 79, 50, 95, 9, 36, 63, 8, 50, 57, 2, 91, 1, 84, 74, 41, 71, 73, 97, 36, 18, 69, 57, 49, 55, 95, 89, 36, 83, 96, 23, 60, 15, 61, 75, 72], [41, 24, 81, 57, 15, 46, 19, 53, 56, 45, 66, 62, 79, 11, 48, 73, 91, 48, 8, 65, 91, 88, 55, 36, 13, 38, 68, 66, 21, 45, 65, 41, 13, 34, 2, 85, 47, 28, 53, 60, 5, 9, 81, 40, 58, 51, 65, 9, 61], [68, 8, 55, 2, 80, 75, 83, 35, 24, 58, 33, 66, 67, 18, 24, 16, 14, 50, 61, 8, 13, 18, 58, 75, 68, 77, 47, 69, 61, 39, 36, 26, 92, 67, 59, 43, 44, 25, 19, 68, 86, 46, 83, 22, 32, 17, 22, 86, 44], [67, 74, 20, 20, 55, 32, 97, 12, 21, 40, 7, 72, 34, 62, 49, 44, 38, 23, 14, 93, 61, 56, 6, 47, 19, 93, 63, 79, 12, 17, 83, 67, 72, 14, 88, 86, 45, 33, 35, 96, 28, 16, 31, 17, 27, 17, 54, 3, 27], [30, 28, 83, 88, 86, 45, 62, 94, 25, 60, 98, 55, 73, 92, 29, 32, 37, 2, 13, 26, 50, 93, 82, 77, 31, 59, 91, 52, 52, 42, 70, 31, 92, 46, 19, 59, 79, 87, 62, 25, 22, 57, 11, 40, 46, 29, 60, 57, 37], [52, 73, 62, 86, 43, 59, 48, 9, 71, 90, 95, 39, 68, 64, 90, 25, 65, 50, 45, 25, 32, 90, 93, 79, 50, 42, 37, 9, 46, 17, 44, 83, 53, 23, 82, 30, 57, 35, 21, 48, 46, 1, 38, 38, 48, 51, 99, 99, 28], [71, 15, 96, 82, 95, 23, 68, 39, 4, 30, 49, 58, 1, 91, 57, 23, 15, 59, 98, 36, 64, 7, 72, 45, 69, 49, 25, 3, 65, 12, 57, 28, 34, 41, 14, 61, 55, 84, 32, 70, 93, 12, 74, 67, 50, 45, 17, 60, 55], [51, 46, 30, 7, 56, 94, 95, 46, 18, 72, 71, 29, 67, 18, 12, 39, 84, 15, 56, 68, 71, 98, 26, 64, 83, 45, 70, 68, 65, 47, 94, 54, 90, 62, 25, 77, 81, 54, 44, 1, 27, 72, 50, 45, 42, 60, 11, 99, 19], [85, 67, 94, 8, 11, 67, 24, 97, 22, 41, 45, 56, 4, 59, 14, 95, 60, 35, 52, 38, 73, 2, 67, 54, 37, 15, 88, 53, 20, 20, 98, 94, 69, 44, 48, 6, 3, 22, 1, 97, 78, 20, 64, 99, 39, 60, 64, 48, 97], [8, 26, 4, 9, 25, 32, 34, 80, 48, 56, 59, 21, 42, 94, 62, 18, 99, 74, 77, 26, 51, 91, 79, 20, 43, 79, 10, 37, 53, 62, 41, 31, 89, 18, 79, 89, 69, 86, 28, 94, 71, 27, 17, 29, 75, 94, 91, 86, 97], [49, 81, 5, 68, 41, 85, 73, 58, 47, 36, 93, 56, 85, 97, 92, 14, 95, 30, 94, 5, 95, 61, 11, 46, 99, 88, 30, 1, 5, 99, 83, 25, 91, 79, 60, 74, 91, 22, 19, 21, 75, 87, 98, 75, 80, 40, 47, 21, 21], [88, 90, 31, 75, 50, 83, 38, 23, 51, 66, 47, 13, 78, 94, 58, 46, 1, 86, 14, 83, 63, 97, 81, 96, 17, 34, 68, 90, 74, 96, 27, 90, 82, 86, 92, 93, 70, 72, 19, 90, 75, 2, 43, 85, 53, 40, 56, 47, 15], [55, 26, 54, 52, 66, 72, 79, 80, 30, 42, 35, 48, 67, 94, 95, 9, 76, 53, 42, 11, 9, 52, 1, 81, 35, 86, 27, 83, 71, 22, 50, 30, 32, 35, 43, 65, 96, 75, 81, 37, 21, 43, 51, 57, 78, 48, 62, 98, 66], [97, 93, 36, 10, 47, 33, 79, 54, 36, 6, 25, 62, 95, 60, 71, 17, 72, 41, 26, 67, 23, 11, 62, 46, 30, 10, 87, 32, 92, 34, 23, 34, 27, 30, 44, 46, 64, 28, 93, 60, 98, 46, 47, 66, 37, 52, 58, 43, 45], [98, 59, 98, 53, 80, 39, 88, 30, 86, 95, 24, 10, 55, 90, 27, 78, 16, 8, 59, 14, 36, 36, 66, 95, 75, 73, 7, 83, 81, 75, 26, 96, 49, 42, 82, 75, 20, 7, 50, 92, 89, 12, 46, 92, 36, 94, 48, 59, 95], [11, 72, 86, 5, 87, 85, 61, 66, 57, 15, 50, 45, 95, 47, 47, 39, 60, 26, 24, 68, 21, 26, 8, 11, 74, 41, 55, 82, 88, 88, 15, 97, 9, 91, 86, 26, 60, 89, 71, 1, 2, 37, 53, 88, 88, 22, 19, 36, 48], [90, 10, 35, 43, 40, 38, 58, 19, 63, 36, 80, 86, 4, 13, 26, 19, 77, 49, 68, 72, 80, 42, 57, 58, 12, 88, 67, 54, 73, 55, 53, 68, 6, 60, 65, 98, 42, 81, 38, 11, 79, 90, 3, 35, 81, 87, 95, 99, 25], [87, 42, 10, 89, 98, 84, 61, 9, 81, 79, 96, 1, 67, 76, 61, 43, 81, 22, 75, 93, 50, 90, 59, 58, 94, 23, 13, 77, 67, 69, 9, 84, 95, 4, 17, 56, 34, 59, 78, 24, 29, 33, 47, 95, 60, 84, 52, 68, 78], [50, 57, 35, 13, 11, 96, 43, 27, 78, 52, 22, 73, 27, 58, 6, 20, 51, 57, 66, 2, 92, 55, 88, 64, 64, 22, 95, 58, 53, 54, 44, 91, 32, 21, 84, 22, 58, 64, 35, 68, 14, 68, 99, 94, 55, 26, 75, 8, 59], [13, 56, 30, 50, 9, 30, 68, 42, 25, 48, 64, 57, 76, 30, 61, 57, 84, 27, 77, 47, 10, 9, 40, 67, 37, 68, 54, 80, 72, 28, 26, 13, 7, 20, 81, 26, 43, 66, 16, 95, 19, 18, 18, 29, 68, 59, 4, 31, 40], [8, 68, 45, 50, 46, 5, 64, 34, 57, 99, 90, 35, 50, 19, 2, 39, 61, 81, 67, 95, 42, 14, 31, 82, 36, 42, 73, 16, 67, 48, 65, 22, 65, 88, 84, 84, 91, 76, 36, 43, 33, 68, 70, 7, 41, 92, 3, 10, 37], [10, 37, 21, 61, 80, 35, 87, 10, 97, 91, 86, 92, 13, 26, 11, 12, 28, 78, 51, 94, 16, 20, 5, 78, 99, 42, 70, 34, 80, 61, 58, 6, 95, 51, 57, 58, 69, 75, 15, 36, 49, 71, 64, 87, 69, 5, 48, 77, 20], [8, 80, 16, 89, 60, 95, 60, 48, 17, 60, 91, 24, 40, 46, 25, 44, 64, 2, 90, 9, 8, 66, 36, 63, 89, 76, 5, 34, 79, 20, 18, 50, 9, 25, 17, 94, 95, 84, 84, 98, 90, 44, 27, 18, 96, 65, 38, 17, 18], [24, 26, 1, 41, 26, 67, 32, 84, 65, 53, 53, 87, 3, 22, 85, 23, 39, 83, 5, 5, 7, 71, 51, 25, 94, 78, 50, 84, 81, 23, 61, 17, 28, 52, 94, 59, 50, 74, 57, 27, 91, 94, 92, 10, 24, 81, 67, 66, 79], [78, 64, 98, 56, 21, 88, 2, 86, 43, 17, 84, 55, 1, 23, 47, 56, 15, 92, 28, 84, 48, 13, 58, 48, 18, 97, 30, 63, 91, 95, 28, 85, 3, 38, 17, 18, 32, 65, 33, 6, 78, 63, 42, 96, 68, 49, 75, 76, 98], [67, 87, 83, 38, 2, 96, 10, 65, 83, 24, 4, 35, 44, 21, 30, 21, 12, 78, 29, 14, 80, 20, 63, 34, 52, 42, 91, 56, 19, 31, 84, 91, 58, 64, 48, 62, 2, 95, 17, 19, 9, 83, 93, 47, 67, 52, 83, 34, 21], [60, 48, 17, 82, 88, 76, 45, 26, 97, 33, 39, 41, 98, 28, 1, 46, 27, 31, 32, 30, 79, 76, 19, 98, 24, 39, 5, 24, 99, 65, 16, 27, 19, 49, 50, 76, 39, 21, 59, 4, 71, 59, 74, 58, 92, 81, 60, 70, 81]],48,), ([[18]],0,), ([[0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0], [0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0], [1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1], [1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0], [1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1], [0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0], [1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1]],40,), ([[3, 15, 34, 40, 66, 69, 71, 88], [6, 14, 42, 43, 51, 52, 58, 72], [14, 15, 17, 21, 78, 80, 87, 93], [7, 15, 19, 20, 25, 31, 68, 69], [1, 3, 6, 68, 83, 83, 86, 97], [17, 30, 52, 54, 58, 79, 81, 83], [1, 32, 43, 48, 70, 80, 93, 97], [3, 5, 12, 47, 49, 52, 74, 78]],4,), ([[-56, 56, 12, -42, 38, -78, 22, -30], [-24, -28, -80, -6, 18, -2, 76, -8], [-46, -74, -48, -98, 32, 52, 60, 48], [42, -46, -84, 44, -86, 72, 8, 70], [80, 90, 50, -26, -98, 84, 8, -52], [-78, -46, 26, 2, -30, -20, -8, 18], [98, 42, 62, 74, -30, -18, 26, -42], [90, 34, 12, -88, -60, -92, -10, -60]],4,), ([[0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1]],4,), ([[14, 22, 81, 76, 33, 79, 91, 2, 42, 5, 11, 94, 9, 49, 25, 93, 44, 25, 71, 66, 25, 30, 57, 55, 25, 10, 76, 34, 90, 55, 54, 41], [93, 50, 13, 70, 93, 30, 5, 44, 65, 70, 82, 31, 88, 11, 8, 95, 27, 52, 93, 35, 35, 72, 49, 59, 54, 51, 63, 50, 22, 53, 33, 54], [69, 1, 38, 60, 78, 26, 48, 16, 32, 82, 74, 80, 74, 84, 13, 58, 46, 84, 84, 39, 16, 84, 20, 81, 10, 52, 32, 33, 28, 23, 64, 52], [87, 97, 97, 85, 72, 28, 33, 38, 78, 93, 82, 50, 33, 89, 11, 93, 18, 73, 82, 22, 13, 40, 45, 64, 13, 1, 41, 27, 35, 58, 40, 86], [59, 71, 95, 38, 59, 97, 86, 84, 17, 52, 61, 37, 24, 40, 99, 88, 91, 51, 7, 32, 30, 2, 61, 64, 65, 1, 97, 86, 78, 22, 67, 10], [60, 60, 50, 9, 15, 68, 42, 35, 11, 9, 91, 9, 60, 94, 99, 34, 46, 21, 12, 92, 67, 19, 74, 90, 96, 16, 32, 25, 40, 21, 78, 84], [88, 44, 57, 46, 1, 48, 15, 91, 85, 47, 52, 57, 82, 37, 28, 88, 35, 85, 66, 17, 88, 69, 91, 46, 44, 38, 20, 39, 27, 44, 47, 94], [32, 54, 58, 78, 33, 70, 52, 98, 49, 13, 25, 57, 99, 36, 93, 42, 96, 30, 56, 66, 43, 8, 17, 47, 67, 5, 97, 66, 65, 90, 97, 8], [32, 37, 20, 6, 56, 42, 36, 49, 56, 66, 91, 37, 3, 50, 56, 80, 49, 80, 57, 11, 68, 32, 76, 92, 45, 27, 63, 28, 21, 74, 31, 80], [32, 82, 42, 52, 68, 46, 3, 65, 48, 75, 32, 30, 62, 55, 70, 31, 81, 80, 78, 71, 40, 20, 96, 20, 91, 38, 69, 42, 4, 63, 21, 54], [91, 99, 6, 10, 30, 30, 98, 73, 48, 33, 58, 75, 52, 55, 65, 4, 78, 28, 90, 18, 30, 97, 69, 34, 64, 6, 64, 83, 5, 26, 77, 51], [70, 13, 73, 23, 38, 63, 40, 51, 18, 60, 37, 12, 52, 49, 68, 45, 24, 3, 82, 73, 66, 96, 22, 92, 29, 86, 66, 21, 6, 41, 56, 97], [42, 55, 69, 3, 21, 42, 44, 8, 69, 86, 41, 65, 62, 40, 21, 56, 92, 40, 60, 91, 9, 66, 32, 3, 16, 97, 36, 10, 56, 36, 65, 51], [43, 69, 10, 87, 94, 30, 21, 13, 89, 38, 57, 50, 55, 31, 10, 36, 79, 66, 71, 4, 29, 90, 72, 24, 24, 84, 2, 97, 84, 46, 5, 50], [14, 5, 93, 73, 7, 57, 29, 7, 13, 53, 19, 20, 15, 69, 4, 61, 20, 89, 4, 91, 84, 91, 11, 41, 67, 51, 20, 22, 26, 57, 82, 12], [44, 36, 65, 68, 45, 48, 92, 98, 39, 93, 30, 50, 75, 13, 22, 6, 61, 60, 74, 78, 62, 14, 51, 88, 17, 47, 49, 36, 41, 28, 8, 77], [73, 28, 20, 71, 44, 84, 58, 40, 44, 12, 8, 16, 70, 36, 34, 3, 89, 24, 15, 23, 19, 53, 67, 81, 5, 31, 37, 91, 63, 9, 12, 58], [67, 39, 73, 31, 31, 45, 71, 71, 56, 93, 60, 77, 73, 3, 12, 67, 71, 54, 81, 41, 60, 31, 94, 96, 43, 65, 99, 95, 14, 17, 48, 78], [95, 64, 57, 19, 83, 76, 74, 47, 80, 60, 90, 72, 21, 67, 66, 67, 34, 53, 86, 79, 2, 83, 76, 66, 19, 66, 86, 82, 82, 25, 1, 86], [3, 8, 21, 55, 35, 37, 20, 66, 21, 2, 12, 74, 68, 86, 46, 23, 35, 68, 35, 8, 64, 19, 6, 3, 14, 71, 68, 66, 8, 74, 34, 6], [32, 21, 43, 18, 61, 11, 88, 4, 99, 59, 40, 33, 86, 95, 44, 52, 97, 40, 31, 72, 86, 86, 20, 54, 77, 56, 77, 52, 88, 76, 58, 4], [41, 62, 38, 39, 75, 54, 52, 17, 7, 28, 72, 57, 26, 44, 85, 79, 37, 99, 39, 9, 47, 4, 28, 27, 6, 6, 87, 66, 83, 42, 19, 11], [53, 31, 97, 12, 33, 12, 98, 18, 68, 15, 40, 40, 19, 77, 20, 37, 20, 42, 95, 75, 84, 86, 50, 86, 34, 91, 74, 50, 20, 30, 56, 39], [4, 98, 74, 96, 97, 90, 64, 40, 45, 77, 34, 1, 15, 21, 74, 21, 51, 15, 42, 19, 53, 95, 48, 22, 2, 86, 35, 21, 70, 51, 99, 72], [71, 12, 90, 92, 38, 43, 40, 8, 51, 65, 79, 16, 5, 39, 75, 95, 2, 62, 50, 46, 44, 97, 15, 14, 81, 65, 71, 17, 69, 44, 41, 90], [79, 53, 94, 59, 58, 8, 50, 44, 73, 12, 33, 62, 90, 57, 98, 46, 32, 38, 16, 62, 53, 48, 49, 56, 17, 26, 95, 42, 85, 83, 12, 48], [43, 86, 56, 15, 13, 92, 83, 55, 85, 61, 53, 27, 16, 24, 42, 1, 95, 42, 20, 83, 46, 90, 46, 67, 58, 55, 32, 84, 40, 19, 7, 28], [70, 21, 57, 89, 23, 71, 62, 51, 44, 78, 23, 22, 43, 83, 86, 73, 96, 82, 52, 74, 45, 37, 46, 54, 23, 87, 59, 77, 96, 83, 94, 44], [65, 73, 74, 45, 55, 37, 84, 64, 29, 35, 86, 13, 14, 38, 28, 94, 39, 91, 6, 66, 28, 96, 74, 48, 93, 71, 95, 91, 25, 33, 97, 28], [26, 99, 94, 14, 64, 28, 5, 9, 26, 31, 36, 88, 56, 60, 10, 56, 6, 74, 48, 93, 13, 22, 99, 43, 35, 13, 46, 52, 79, 34, 87, 16], [90, 21, 62, 63, 17, 14, 78, 40, 64, 35, 46, 92, 68, 49, 1, 91, 90, 8, 60, 52, 34, 81, 73, 62, 75, 16, 33, 40, 1, 61, 88, 75], [10, 61, 27, 86, 2, 14, 32, 60, 68, 75, 21, 85, 49, 78, 99, 75, 53, 79, 16, 55, 83, 70, 7, 8, 86, 83, 48, 34, 73, 5, 69, 56]],24,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUBARRAY_WITH_GIVEN_SUM_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUBARRAY_WITH_GIVEN_SUM_1{ static int f_gold ( int arr [ ] , int n , int sum ) { int curr_sum = arr [ 0 ] , start = 0 , i ; for ( i = 1 ; i <= n ; i ++ ) { while ( curr_sum > sum && start < i - 1 ) { curr_sum = curr_sum - arr [ start ] ; start ++ ; } if ( curr_sum == sum ) { int p = i - 1 ; System . out . println ( ""Sum found between indexes "" + start + "" and "" + p ) ; return 1 ; } if ( i < n ) curr_sum = curr_sum + arr [ i ] ; } System . out . println ( ""No subarray found"" ) ; return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,7,8,8,23,24,28,32,48,53,56,62,69,77,81,82,84,87,88,90}); param0.add(new int[]{-62,-62,-80,-30,-80,44,-12,-76,16,-52,-86,72,32,-60,-70,-62,-78,-96,-18,40,-4,-18,-58,30,-70,6,0,-62,-66,20,92,-64,20,-48,48,-32,64,22,16,26}); param0.add(new int[]{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}); param0.add(new int[]{50,25,6,87,55,86,61,97,24,30,51,43,26,1,80,47,19,36,64,62,92,5,48,27,82,76,70,59,1,43,1,36,28,9,52,22,43}); param0.add(new int[]{-86,-76,-64,-22,-16,-8,4,6,8,32,38,60,68,74}); param0.add(new int[]{0,0,0,0,1,1,0,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0}); param0.add(new int[]{7,7,12,25,25,32,33,34,37,39,39,41,46,48,56,56,57,58,61,62,62,63,65,66,69,72,74,78,78,79,80,85,89,94,95,99}); param0.add(new int[]{98,-60}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{80,89,83,42,75,30,64,25,95,17,90,6,11,1,77,16,75,86,96,67,27,80,27}); List param1 = new ArrayList<>(); param1.add(16); param1.add(39); param1.add(40); param1.add(29); param1.add(7); param1.add(31); param1.add(22); param1.add(1); param1.add(8); param1.add(16); List param2 = new ArrayList<>(); param2.add(31); param2.add(44); param2.add(7); param2.add(105); param2.add(2); param2.add(10); param2.add(39); param2.add(98); param2.add(0); param2.add(108); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , sum ) : curr_sum = arr [ 0 ] start = 0 i = 1 while i <= n : while curr_sum > sum and start < i - 1 : curr_sum = curr_sum - arr [ start ] start += 1 if curr_sum == sum : print ( ""Sum found between indexes"" ) print ( ""%d and %d"" % ( start , i - 1 ) ) return 1 if i < n : curr_sum = curr_sum + arr [ i ] i += 1 print ( ""No subarray found"" ) return 0 "," using namespace std; int f_gold ( int arr [ ], int n, int sum ) { int curr_sum = arr [ 0 ], start = 0, i; for ( i = 1; i <= n; i ++ ) { while ( curr_sum > sum && start < i - 1 ) { curr_sum = curr_sum - arr [ start ]; start ++; } if ( curr_sum == sum ) { cout << ""Sum found between indexes "" << start << "" and "" << i - 1; return 1; } if ( i < n ) curr_sum = curr_sum + arr [ i ]; } cout << ""No subarray found""; return 0; } int main() { int n_success = 0; vector> param0 {{7,7,8,8,23,24,28,32,48,53,56,62,69,77,81,82,84,87,88,90},{-62,-62,-80,-30,-80,44,-12,-76,16,-52,-86,72,32,-60,-70,-62,-78,-96,-18,40,-4,-18,-58,30,-70,6,0,-62,-66,20,92,-64,20,-48,48,-32,64,22,16,26},{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},{50,25,6,87,55,86,61,97,24,30,51,43,26,1,80,47,19,36,64,62,92,5,48,27,82,76,70,59,1,43,1,36,28,9,52,22,43},{-86,-76,-64,-22,-16,-8,4,6,8,32,38,60,68,74},{0,0,0,0,1,1,0,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0},{7,7,12,25,25,32,33,34,37,39,39,41,46,48,56,56,57,58,61,62,62,63,65,66,69,72,74,78,78,79,80,85,89,94,95,99},{98,-60},{0,0,0,0,1,1,1,1,1,1},{80,89,83,42,75,30,64,25,95,17,90,6,11,1,77,16,75,86,96,67,27,80,27}}; vector param1 {16,39,40,29,7,31,22,1,8,16}; vector param2 {31,44,7,105,2,10,39,98,0,108}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 7, 8, 8, 23, 24, 28, 32, 48, 53, 56, 62, 69, 77, 81, 82, 84, 87, 88, 90],16,31,), ([-62, -62, -80, -30, -80, 44, -12, -76, 16, -52, -86, 72, 32, -60, -70, -62, -78, -96, -18, 40, -4, -18, -58, 30, -70, 6, 0, -62, -66, 20, 92, -64, 20, -48, 48, -32, 64, 22, 16, 26],39,44,), ([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],40,7,), ([50, 25, 6, 87, 55, 86, 61, 97, 24, 30, 51, 43, 26, 1, 80, 47, 19, 36, 64, 62, 92, 5, 48, 27, 82, 76, 70, 59, 1, 43, 1, 36, 28, 9, 52, 22, 43],29,105,), ([-86, -76, -64, -22, -16, -8, 4, 6, 8, 32, 38, 60, 68, 74],7,2,), ([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0],31,10,), ([7, 7, 12, 25, 25, 32, 33, 34, 37, 39, 39, 41, 46, 48, 56, 56, 57, 58, 61, 62, 62, 63, 65, 66, 69, 72, 74, 78, 78, 79, 80, 85, 89, 94, 95, 99],22,39,), ([98, -60],1,98,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1],8,0,), ([80, 89, 83, 42, 75, 30, 64, 25, 95, 17, 90, 6, 11, 1, 77, 16, 75, 86, 96, 67, 27, 80, 27],16,108,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HYPERCUBE_GRAPH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HYPERCUBE_GRAPH{ static int f_gold ( int n ) { if ( n == 1 ) return 2 ; return 2 * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(72); param0.add(28); param0.add(45); param0.add(41); param0.add(94); param0.add(97); param0.add(97); param0.add(36); param0.add(91); param0.add(84); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if n == 1 : return 2 return 2 * f_gold ( n - 1 ) "," using namespace std; int f_gold ( int n ) { if ( n == 1 ) return 2; return 2 * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {72,28,45,41,94,97,97,36,91,84}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (72,), (28,), (45,), (41,), (94,), (97,), (97,), (36,), (91,), (84,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HEXAGONAL_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HEXAGONAL_NUMBER{ static int f_gold ( int n ) { return n * ( 2 * n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(38); param0.add(44); param0.add(58); param0.add(10); param0.add(31); param0.add(53); param0.add(94); param0.add(64); param0.add(71); param0.add(59); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return n * ( 2 * n - 1 ) "," using namespace std; int f_gold ( int n ) { return n * ( 2 * n - 1 ); } int main() { int n_success = 0; vector param0 {38,44,58,10,31,53,94,64,71,59}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (38,), (44,), (58,), (10,), (31,), (53,), (94,), (64,), (71,), (59,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LEXICOGRAPHICALLY_NEXT_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEXICOGRAPHICALLY_NEXT_STRING{ public static String f_gold ( String str ) { if ( str == """" ) return ""a"" ; int i = str . length ( ) - 1 ; while ( str . charAt ( i ) == 'z' && i >= 0 ) i -- ; if ( i == - 1 ) str = str + 'a' ; else str = str . substring ( 0 , i ) + ( char ) ( ( int ) ( str . charAt ( i ) ) + 1 ) + str . substring ( i + 1 ) ; return str ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""amKIRzPiqLTIy""); param0.add(""68""); param0.add(""100""); param0.add(""f""); param0.add(""802205375""); param0.add(""0111""); param0.add(""GRjRYIvYwgua""); param0.add(""8139910006809""); param0.add(""100101""); param0.add(""rw""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : if ( s == "" "" ) : return ""a"" i = len ( s ) - 1 while ( s [ i ] == 'z' and i >= 0 ) : i -= 1 if ( i == - 1 ) : s = s + 'a' else : s = s.replace ( s [ i ] , chr ( ord ( s [ i ] ) + 1 ) , 1 ) return s "," using namespace std; string f_gold ( string s ) { if ( s == """" ) return ""a""; int i = s . length ( ) - 1; while ( s [ i ] == 'z' && i >= 0 ) i --; if ( i == - 1 ) s = s + 'a'; else s [ i ] ++; return s; } int main() { int n_success = 0; vector param0 {""amKIRzPiqLTIy"",""68"",""100"",""f"",""802205375"",""0111"",""GRjRYIvYwgua"",""8139910006809"",""100101"",""rw""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('amKIRzPiqLTIy',), ('68',), ('100',), ('f',), ('802205375',), ('0111',), ('GRjRYIvYwgua',), ('8139910006809',), ('100101',), ('rw',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT{ static boolean f_gold ( String str ) { int n = str . length ( ) ; int digitSum = 0 ; for ( int i = 0 ; i < n ; i ++ ) digitSum += ( str . charAt ( i ) - '0' ) ; return ( digitSum % 9 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""69354""); param0.add(""43347276812854""); param0.add(""0111111111""); param0.add(""9999918""); param0.add(""333""); param0.add(""1011011101""); param0.add(""1""); param0.add(""2284737""); param0.add(""011001""); param0.add(""cc""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string str ) { int n = str . length ( ); int digitSum = 0; for ( int i = 0; i < n; i ++ ) digitSum += ( str [ i ] - '0' ); return ( digitSum % 9 == 0 ); } int main() { int n_success = 0; vector param0 {""69354"",""43347276812854"",""0111111111"",""9999918"",""333"",""1011011101"",""1"",""2284737"",""011001"",""cc""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_THE_LARGEST_SUBARRAY_WITH_0_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_LARGEST_SUBARRAY_WITH_0_SUM{ static int f_gold ( int arr [ ] , int n ) { int max_len = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int curr_sum = 0 ; for ( int j = i ; j < n ; j ++ ) { curr_sum += arr [ j ] ; if ( curr_sum == 0 ) max_len = Math . max ( max_len , j - i + 1 ) ; } } return max_len ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,6,6,15,23,26,27,30,34,35,38,42,43,44,46,50,53,53,57,62,65,67,70,76,79,81,82,85,90}); param0.add(new int[]{72,-6,-24,-82,16,78,-82,38,-2,78,-60,40,26,-82,-32,-56,52,14,62,-18,-84,-94,48,54,2,-28}); param0.add(new int[]{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}); param0.add(new int[]{14,67,44,5,60,87,23,37,44,70,47,52,38,30,78,60,95,62,3,45,96,35,81,8,82,75,76,64,33,65,65,49,1,63,99,53,40,12,46,93,88,27,89,89,60,3,92,63}); param0.add(new int[]{-98,-98,-96,-86,-74,-74,-72,-70,-70,-66,-66,-66,-64,-64,-50,-50,-48,-38,-28,-24,-24,-18,-16,-14,-8,-6,-2,-2,10,28,32,38,42,54,54,62,68,84,88}); param0.add(new int[]{0,1,0,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0}); param0.add(new int[]{6,14,26,27,37,50,51,54,55,67,68,72,83,84,95,99}); param0.add(new int[]{-6,-96,-46,4,-50,-56,-34,6,-72,-68,92,88,-80,18,58,20,34,-22,-18,-90,-80,-24,-82,6,54,70,22,94}); param0.add(new int[]{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}); param0.add(new int[]{65,34,82,43,15,94,34,50,70,77,83,26,85,5}); List param1 = new ArrayList<>(); param1.add(19); param1.add(24); param1.add(18); param1.add(39); param1.add(25); param1.add(12); param1.add(10); param1.add(22); param1.add(45); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int max_len = 0; for ( int i = 0; i < n; i ++ ) { int curr_sum = 0; for ( int j = i; j < n; j ++ ) { curr_sum += arr [ j ]; if ( curr_sum == 0 ) max_len = max ( max_len, j - i + 1 ); } } return max_len; } int main() { int n_success = 0; vector> param0 {{1,2,6,6,15,23,26,27,30,34,35,38,42,43,44,46,50,53,53,57,62,65,67,70,76,79,81,82,85,90},{72,-6,-24,-82,16,78,-82,38,-2,78,-60,40,26,-82,-32,-56,52,14,62,-18,-84,-94,48,54,2,-28},{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},{14,67,44,5,60,87,23,37,44,70,47,52,38,30,78,60,95,62,3,45,96,35,81,8,82,75,76,64,33,65,65,49,1,63,99,53,40,12,46,93,88,27,89,89,60,3,92,63},{-98,-98,-96,-86,-74,-74,-72,-70,-70,-66,-66,-66,-64,-64,-50,-50,-48,-38,-28,-24,-24,-18,-16,-14,-8,-6,-2,-2,10,28,32,38,42,54,54,62,68,84,88},{0,1,0,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0},{6,14,26,27,37,50,51,54,55,67,68,72,83,84,95,99},{-6,-96,-46,4,-50,-56,-34,6,-72,-68,92,88,-80,18,58,20,34,-22,-18,-90,-80,-24,-82,6,54,70,22,94},{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},{65,34,82,43,15,94,34,50,70,77,83,26,85,5}}; vector param1 {19,24,18,39,25,12,10,22,45,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_BINOMIAL_COEFFICIENTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_BINOMIAL_COEFFICIENTS_1{ static int f_gold ( int n ) { return ( 1 << n ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(48); param0.add(42); param0.add(15); param0.add(75); param0.add(23); param0.add(41); param0.add(46); param0.add(99); param0.add(36); param0.add(53); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( 1 << n ) ; "," using namespace std; int f_gold ( int n ) { return ( 1 << n ); } int main() { int n_success = 0; vector param0 {48,42,15,75,23,41,46,99,36,53}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (48,), (42,), (15,), (75,), (23,), (41,), (46,), (99,), (36,), (53,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_SUBSEQUENCES_STRING_DIVISIBLE_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSEQUENCES_STRING_DIVISIBLE_N{ static int f_gold ( String str , int n ) { int len = str . length ( ) ; int dp [ ] [ ] = new int [ len ] [ n ] ; dp [ 0 ] [ ( str . charAt ( 0 ) - '0' ) % n ] ++ ; for ( int i = 1 ; i < len ; i ++ ) { dp [ i ] [ ( str . charAt ( i ) - '0' ) % n ] ++ ; for ( int j = 0 ; j < n ; j ++ ) { dp [ i ] [ j ] += dp [ i - 1 ] [ j ] ; dp [ i ] [ ( j * 10 + ( str . charAt ( i ) - '0' ) ) % n ] += dp [ i - 1 ] [ j ] ; } } return dp [ len - 1 ] [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""fYqkPLSWBgFy""); param0.add(""151587""); param0.add(""111111110""); param0.add(""JQJHaUkkTrt""); param0.add(""736592575580""); param0.add(""10""); param0.add(""L""); param0.add(""3476601""); param0.add(""0110001001""); param0.add(""YimayLFU""); List param1 = new ArrayList<>(); param1.add(55); param1.add(84); param1.add(9); param1.add(97); param1.add(68); param1.add(3); param1.add(74); param1.add(2); param1.add(53); param1.add(45); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string str, int n ) { int len = str . length ( ); int dp [ len ] [ n ]; memset ( dp, 0, sizeof ( dp ) ); dp [ 0 ] [ ( str [ 0 ] - '0' ) % n ] ++; for ( int i = 1; i < len; i ++ ) { dp [ i ] [ ( str [ i ] - '0' ) % n ] ++; for ( int j = 0; j < n; j ++ ) { dp [ i ] [ j ] += dp [ i - 1 ] [ j ]; dp [ i ] [ ( j * 10 + ( str [ i ] - '0' ) ) % n ] += dp [ i - 1 ] [ j ]; } } return dp [ len - 1 ] [ 0 ]; } int main() { int n_success = 0; vector param0 {""fYqkPLSWBgFy"",""151587"",""111111110"",""JQJHaUkkTrt"",""736592575580"",""10"",""L"",""3476601"",""0110001001"",""YimayLFU""}; vector param1 {55,84,9,97,68,3,74,2,53,45}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS{ static int f_gold ( int x , int y ) { while ( y != 0 ) { int carry = x & y ; x = x ^ y ; y = carry << 1 ; } return x ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(56); param0.add(17); param0.add(73); param0.add(75); param0.add(27); param0.add(61); param0.add(65); param0.add(22); param0.add(61); param0.add(97); List param1 = new ArrayList<>(); param1.add(60); param1.add(44); param1.add(96); param1.add(3); param1.add(54); param1.add(1); param1.add(63); param1.add(19); param1.add(9); param1.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y ) : while ( y != 0 ) : carry = x & y x = x ^ y y = carry << 1 return x "," using namespace std; int f_gold ( int x, int y ) { while ( y != 0 ) { int carry = x & y; x = x ^ y; y = carry << 1; } return x; } int main() { int n_success = 0; vector param0 {56,17,73,75,27,61,65,22,61,97}; vector param1 {60,44,96,3,54,1,63,19,9,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (56,60,), (17,44,), (73,96,), (75,3,), (27,54,), (61,1,), (65,63,), (22,19,), (61,9,), (97,23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_OPERATIONS_MAKE_STRINGAB_FREE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OPERATIONS_MAKE_STRINGAB_FREE{ static int f_gold ( char [ ] s ) { int b_count = 0 ; int res = 0 ; for ( int i = 0 ; i < s . length ; i ++ ) { if ( s [ s . length - i - 1 ] == 'a' ) { res = ( res + b_count ) ; b_count = ( b_count * 2 ) ; } else { b_count += 1 ; } } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'L','k','y'}); param0.add(new char[]{'1','0','9','5','7','4','6','0','4','8','0','1','4','1','8','9','1','5','4','4','8','0','5','8','9','8','1','9','7','0','4','2','5','2','4','6','6','5','3','1','1','0','6'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'A','L','a','l','G',' ','p','b'}); param0.add(new char[]{'0','1','1','1','2','2','4','5','5','5','6','6','6','7','9'}); param0.add(new char[]{'0'}); param0.add(new char[]{' ','A','B','B','B','B','D','G','G','H','H','H','I','I','J','J','J','L','M','N','O','Q','U','U','X','Y','Y','Z','Z','c','c','e','f','h','k','o','p','q','q','s','v','z'}); param0.add(new char[]{'2','5','7','5','2','3','9'}); param0.add(new char[]{'0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'a','z','M',' ','l','X','x','B','i','j'}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : b_count = 0 res = 0 for i in range ( len ( s ) ) : if s [ ~ i ] == 'a' : res = ( res + b_count ) b_count = ( b_count * 2 ) else : b_count += 1 return res ",,," if __name__ == '__main__': param = [ (['L', 'k', 'y'],), (['1', '0', '9', '5', '7', '4', '6', '0', '4', '8', '0', '1', '4', '1', '8', '9', '1', '5', '4', '4', '8', '0', '5', '8', '9', '8', '1', '9', '7', '0', '4', '2', '5', '2', '4', '6', '6', '5', '3', '1', '1', '0', '6'],), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],), (['A', 'L', 'a', 'l', 'G', ' ', 'p', 'b'],), (['0', '1', '1', '1', '2', '2', '4', '5', '5', '5', '6', '6', '6', '7', '9'],), (['0'],), ([' ', 'A', 'B', 'B', 'B', 'B', 'D', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'J', 'J', 'J', 'L', 'M', 'N', 'O', 'Q', 'U', 'U', 'X', 'Y', 'Y', 'Z', 'Z', 'c', 'c', 'e', 'f', 'h', 'k', 'o', 'p', 'q', 'q', 's', 'v', 'z'],), (['2', '5', '7', '5', '2', '3', '9'],), (['0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1'],), (['a', 'z', 'M', ' ', 'l', 'X', 'x', 'B', 'i', 'j'],) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SCHEDULE_JOBS_SERVER_GETS_EQUAL_LOAD," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SCHEDULE_JOBS_SERVER_GETS_EQUAL_LOAD{ static int f_gold ( int a [ ] , int b [ ] , int n ) { int i ; int s = 0 ; for ( i = 0 ; i < n ; i ++ ) s += ( a [ i ] + b [ i ] ) ; if ( n == 1 ) return a [ 0 ] + b [ 0 ] ; if ( s % n != 0 ) return - 1 ; int x = s / n ; for ( i = 0 ; i < n ; i ++ ) { if ( a [ i ] > x ) return - 1 ; if ( i > 0 ) { a [ i ] += b [ i - 1 ] ; b [ i - 1 ] = 0 ; } if ( a [ i ] == x ) continue ; int y = a [ i ] + b [ i ] ; if ( i + 1 < n ) y += b [ i + 1 ] ; if ( y == x ) { a [ i ] = y ; b [ i ] = 0 ; continue ; } if ( a [ i ] + b [ i ] == x ) { a [ i ] += b [ i ] ; b [ i ] = 0 ; continue ; } if ( i + 1 < n && a [ i ] + b [ i + 1 ] == x ) { a [ i ] += b [ i + 1 ] ; b [ i + 1 ] = 0 ; continue ; } return - 1 ; } for ( i = 0 ; i < n ; i ++ ) if ( b [ i ] != 0 ) return - 1 ; return x ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,9,16,18,20,23,24,25,25,26,29,30,35,40,41,43,44,46,53,53,56,56,58,60,62,70,80,80,80,82,86,90,92,92,95}); param0.add(new int[]{-24,70,-74,-90,72,50,-94,86,-58,-68,42,0,98,-70,-14,-32,6,74,64,-78,86,-42,-56,2,-34,-46,70,-62,50,-58,-58,42,86,96,-8,8,-22,-14,-14,98,2,98,-28}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{98,18,50,36,88,75,2,40,74,19,63,82,77,5,59,97,70,50,71,90,90,61,63,99}); param0.add(new int[]{-80,-64,-64,-64,-64,-62,-54,-48,-44,-44,-38,-30,-30,-26,-14,-12,-10,-6,-6,6,22,22,22,26,28,50,52,70,86,86,88,90}); param0.add(new int[]{0,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,0,0,1}); param0.add(new int[]{59,61,64}); param0.add(new int[]{98,92,28,42,-74,-36,40,-8,32,-22,-70,-22,-56,74,6,6,-62,46,34,2}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{72,97,79,21,83,2,31,59,6,11,79,97}); List param1 = new ArrayList<>(); param1.add(new int[]{3,15,16,16,18,26,30,32,32,35,37,41,42,43,48,49,49,54,55,57,65,66,67,67,68,83,85,89,89,90,91,93,96,97,99}); param1.add(new int[]{-26,36,48,48,-38,-86,90,-62,30,-4,82,16,32,-6,58,82,-66,-40,52,-78,94,-70,-80,-68,-58,-26,50,-78,-90,-48,-28,48,56,50,72,-22,-2,8,-94,92,-44,-66,-30}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param1.add(new int[]{93,25,16,42,55,61,69,68,95,28,40,90,1,86,76,40,13,47,71,4,64,54,84,45}); param1.add(new int[]{-96,-94,-80,-74,-64,-56,-52,-32,-30,-24,-12,-12,-8,-2,4,8,16,20,24,24,24,48,50,54,60,64,74,80,88,90,92,92}); param1.add(new int[]{1,1,1,0,1,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1}); param1.add(new int[]{22,59,85}); param1.add(new int[]{-62,-84,72,60,10,-18,-44,-22,14,0,76,72,96,-28,-24,52,-74,-30,16,66}); param1.add(new int[]{0,0,0,0,0,0,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}); param1.add(new int[]{27,71,87,36,73,37,80,34,57,17,88,52}); List param2 = new ArrayList<>(); param2.add(29); param2.add(34); param2.add(13); param2.add(16); param2.add(22); param2.add(20); param2.add(1); param2.add(18); param2.add(34); param2.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , n ) : s = 0 for i in range ( 0 , n ) : s += a [ i ] + b [ i ] if n == 1 : return a [ 0 ] + b [ 0 ] if s % n != 0 : return - 1 x = s // n for i in range ( 0 , n ) : if a [ i ] > x : return - 1 if i > 0 : a [ i ] += b [ i - 1 ] b [ i - 1 ] = 0 if a [ i ] == x : continue y = a [ i ] + b [ i ] if i + 1 < n : y += b [ i + 1 ] if y == x : a [ i ] = y b [ i ] = 0 if i + 1 < n : b [ i + 1 ] = 0 continue if a [ i ] + b [ i ] == x : a [ i ] += b [ i ] b [ i ] = 0 continue if i + 1 < n and a [ i ] + b [ i + 1 ] == x : a [ i ] += b [ i + 1 ] b [ i + 1 ] = 0 continue return - 1 for i in range ( 0 , n ) : if b [ i ] != 0 : return - 1 return x "," using namespace std; int f_gold ( int a [ ], int b [ ], int n ) { int i; long long int s = 0; for ( i = 0; i < n; i ++ ) s += ( a [ i ] + b [ i ] ); if ( n == 1 ) return a [ 0 ] + b [ 0 ]; if ( s % n != 0 ) return - 1; int x = s / n; for ( i = 0; i < n; i ++ ) { if ( a [ i ] > x ) return - 1; if ( i > 0 ) { a [ i ] += b [ i - 1 ]; b [ i - 1 ] = 0; } if ( a [ i ] == x ) continue; int y = a [ i ] + b [ i ]; if ( i + 1 < n ) y += b [ i + 1 ]; if ( y == x ) { a [ i ] = y; b [ i ] = b [ i + 1 ] = 0; continue; } if ( a [ i ] + b [ i ] == x ) { a [ i ] += b [ i ]; b [ i ] = 0; continue; } if ( i + 1 < n && a [ i ] + b [ i + 1 ] == x ) { a [ i ] += b [ i + 1 ]; b [ i + 1 ] = 0; continue; } return - 1; } for ( i = 0; i < n; i ++ ) if ( b [ i ] != 0 ) return - 1; return x; } int main() { int n_success = 0; vector> param0 {{4,9,16,18,20,23,24,25,25,26,29,30,35,40,41,43,44,46,53,53,56,56,58,60,62,70,80,80,80,82,86,90,92,92,95},{-24,70,-74,-90,72,50,-94,86,-58,-68,42,0,98,-70,-14,-32,6,74,64,-78,86,-42,-56,2,-34,-46,70,-62,50,-58,-58,42,86,96,-8,8,-22,-14,-14,98,2,98,-28},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{98,18,50,36,88,75,2,40,74,19,63,82,77,5,59,97,70,50,71,90,90,61,63,99},{-80,-64,-64,-64,-64,-62,-54,-48,-44,-44,-38,-30,-30,-26,-14,-12,-10,-6,-6,6,22,22,22,26,28,50,52,70,86,86,88,90},{0,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,1,1,0,0,1},{59,61,64},{98,92,28,42,-74,-36,40,-8,32,-22,-70,-22,-56,74,6,6,-62,46,34,2},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{72,97,79,21,83,2,31,59,6,11,79,97}}; vector> param1 {{3,15,16,16,18,26,30,32,32,35,37,41,42,43,48,49,49,54,55,57,65,66,67,67,68,83,85,89,89,90,91,93,96,97,99},{-26,36,48,48,-38,-86,90,-62,30,-4,82,16,32,-6,58,82,-66,-40,52,-78,94,-70,-80,-68,-58,-26,50,-78,-90,-48,-28,48,56,50,72,-22,-2,8,-94,92,-44,-66,-30},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{93,25,16,42,55,61,69,68,95,28,40,90,1,86,76,40,13,47,71,4,64,54,84,45},{-96,-94,-80,-74,-64,-56,-52,-32,-30,-24,-12,-12,-8,-2,4,8,16,20,24,24,24,48,50,54,60,64,74,80,88,90,92,92},{1,1,1,0,1,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1},{22,59,85},{-62,-84,72,60,10,-18,-44,-22,14,0,76,72,96,-28,-24,52,-74,-30,16,66},{0,0,0,0,0,0,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},{27,71,87,36,73,37,80,34,57,17,88,52}}; vector param2 {29,34,13,16,22,20,1,18,34,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 9, 16, 18, 20, 23, 24, 25, 25, 26, 29, 30, 35, 40, 41, 43, 44, 46, 53, 53, 56, 56, 58, 60, 62, 70, 80, 80, 80, 82, 86, 90, 92, 92, 95],[3, 15, 16, 16, 18, 26, 30, 32, 32, 35, 37, 41, 42, 43, 48, 49, 49, 54, 55, 57, 65, 66, 67, 67, 68, 83, 85, 89, 89, 90, 91, 93, 96, 97, 99],29,), ([-24, 70, -74, -90, 72, 50, -94, 86, -58, -68, 42, 0, 98, -70, -14, -32, 6, 74, 64, -78, 86, -42, -56, 2, -34, -46, 70, -62, 50, -58, -58, 42, 86, 96, -8, 8, -22, -14, -14, 98, 2, 98, -28],[-26, 36, 48, 48, -38, -86, 90, -62, 30, -4, 82, 16, 32, -6, 58, 82, -66, -40, 52, -78, 94, -70, -80, -68, -58, -26, 50, -78, -90, -48, -28, 48, 56, 50, 72, -22, -2, 8, -94, 92, -44, -66, -30],34,), ([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],13,), ([98, 18, 50, 36, 88, 75, 2, 40, 74, 19, 63, 82, 77, 5, 59, 97, 70, 50, 71, 90, 90, 61, 63, 99],[93, 25, 16, 42, 55, 61, 69, 68, 95, 28, 40, 90, 1, 86, 76, 40, 13, 47, 71, 4, 64, 54, 84, 45],16,), ([-80, -64, -64, -64, -64, -62, -54, -48, -44, -44, -38, -30, -30, -26, -14, -12, -10, -6, -6, 6, 22, 22, 22, 26, 28, 50, 52, 70, 86, 86, 88, 90],[-96, -94, -80, -74, -64, -56, -52, -32, -30, -24, -12, -12, -8, -2, 4, 8, 16, 20, 24, 24, 24, 48, 50, 54, 60, 64, 74, 80, 88, 90, 92, 92],22,), ([0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1],[1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1],20,), ([59, 61, 64],[22, 59, 85],1,), ([98, 92, 28, 42, -74, -36, 40, -8, 32, -22, -70, -22, -56, 74, 6, 6, -62, 46, 34, 2],[-62, -84, 72, 60, 10, -18, -44, -22, 14, 0, 76, 72, 96, -28, -24, 52, -74, -30, 16, 66],18,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],34,), ([72, 97, 79, 21, 83, 2, 31, 59, 6, 11, 79, 97],[27, 71, 87, 36, 73, 37, 80, 34, 57, 17, 88, 52],9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1{ static boolean f_gold ( int arr [ ] , int n ) { for ( int i = 0 ; i <= ( n - 2 ) / 2 ; i ++ ) { if ( arr [ 2 * i + 1 ] > arr [ i ] ) { return false ; } if ( 2 * i + 2 < n && arr [ 2 * i + 2 ] > arr [ i ] ) { return false ; } } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,2,2,7,10,14,24,38,42,50,59,60,72,73,79,83,89}); param0.add(new int[]{-48,98,96,-56,-2,58,52,-50,58,50,62,86,-26,-98,34,20,-28,56,-36}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{91,50,37}); param0.add(new int[]{-80,-26,0,0,6,14,22,76,82,88,98}); param0.add(new int[]{1,0}); param0.add(new int[]{9,24,24,33,48,50,55,61,69,79,83}); param0.add(new int[]{30,32,-82,-48,88,-24,74,2,90,98,68,82,32,-60,2,-94,18,14,46,50,-60,-74,-76,66,-76,-34,-20,82,-44,-62,34,48,-56,2,64,-78,-64,98,-10,-28,78,-42}); param0.add(new int[]{0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{38,74,99,75,44,75,24,70,78,74,60,59,34,27,7,23,19,95,4,35,38,22,46,1,44,20,52,1,96,57,5,76,49,1,37,35}); List param1 = new ArrayList<>(); param1.add(9); param1.add(9); param1.add(20); param1.add(2); param1.add(10); param1.add(1); param1.add(8); param1.add(27); param1.add(6); param1.add(31); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : for i in range ( int ( ( n - 2 ) / 2 ) + 1 ) : if arr [ 2 * i + 1 ] > arr [ i ] : return False if ( 2 * i + 2 < n and arr [ 2 * i + 2 ] > arr [ i ] ) : return False return True "," using namespace std; bool f_gold ( int arr [ ], int n ) { for ( int i = 0; i <= ( n - 2 ) / 2; i ++ ) { if ( arr [ 2 * i + 1 ] > arr [ i ] ) return false; if ( 2 * i + 2 < n && arr [ 2 * i + 2 ] > arr [ i ] ) return false; } return true; } int main() { int n_success = 0; vector> param0 {{2,2,2,7,10,14,24,38,42,50,59,60,72,73,79,83,89},{-48,98,96,-56,-2,58,52,-50,58,50,62,86,-26,-98,34,20,-28,56,-36},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{91,50,37},{-80,-26,0,0,6,14,22,76,82,88,98},{1,0},{9,24,24,33,48,50,55,61,69,79,83},{30,32,-82,-48,88,-24,74,2,90,98,68,82,32,-60,2,-94,18,14,46,50,-60,-74,-76,66,-76,-34,-20,82,-44,-62,34,48,-56,2,64,-78,-64,98,-10,-28,78,-42},{0,0,1,1,1,1,1,1,1,1,1,1},{38,74,99,75,44,75,24,70,78,74,60,59,34,27,7,23,19,95,4,35,38,22,46,1,44,20,52,1,96,57,5,76,49,1,37,35}}; vector param1 {9,9,20,2,10,1,8,27,6,31}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 2, 2, 7, 10, 14, 24, 38, 42, 50, 59, 60, 72, 73, 79, 83, 89],9,), ([-48, 98, 96, -56, -2, 58, 52, -50, 58, 50, 62, 86, -26, -98, 34, 20, -28, 56, -36],9,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],20,), ([91, 50, 37],2,), ([-80, -26, 0, 0, 6, 14, 22, 76, 82, 88, 98],10,), ([1, 0],1,), ([9, 24, 24, 33, 48, 50, 55, 61, 69, 79, 83],8,), ([30, 32, -82, -48, 88, -24, 74, 2, 90, 98, 68, 82, 32, -60, 2, -94, 18, 14, 46, 50, -60, -74, -76, 66, -76, -34, -20, 82, -44, -62, 34, 48, -56, 2, 64, -78, -64, 98, -10, -28, 78, -42],27,), ([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],6,), ([38, 74, 99, 75, 44, 75, 24, 70, 78, 74, 60, 59, 34, 27, 7, 23, 19, 95, 4, 35, 38, 22, 46, 1, 44, 20, 52, 1, 96, 57, 5, 76, 49, 1, 37, 35],31,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_DIGITS_REMOVED_MAKE_NUMBER_DIVISIBLE_3," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_DIGITS_REMOVED_MAKE_NUMBER_DIVISIBLE_3{ static int f_gold ( String num ) { int n = num . length ( ) ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += ( int ) ( num . charAt ( i ) ) ; if ( sum % 3 == 0 ) return 0 ; if ( n == 1 ) return - 1 ; for ( int i = 0 ; i < n ; i ++ ) if ( sum % 3 == ( num . charAt ( i ) - '0' ) % 3 ) return 1 ; if ( n == 2 ) return - 1 ; return 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""wVVe""); param0.add(""850390909067""); param0.add(""1110""); param0.add(""NRSAazejUS""); param0.add(""297975""); param0.add(""1""); param0.add(""ThYMuVOm""); param0.add(""1874418087476""); param0.add(""11011001001""); param0.add(""YJ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string num ) { int n = num . length ( ); int sum = accumulate ( begin ( num ), end ( num ), 0 ) - '0' * 1; if ( sum % 3 == 0 ) return 0; if ( n == 1 ) return - 1; for ( int i = 0; i < n; i ++ ) if ( sum % 3 == ( num [ i ] - '0' ) % 3 ) return 1; if ( n == 2 ) return - 1; return 2; } int main() { int n_success = 0; vector param0 {""wVVe"",""850390909067"",""1110"",""NRSAazejUS"",""297975"",""1"",""ThYMuVOm"",""1874418087476"",""11011001001"",""YJ""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MAXIMIZE_SUM_ARRII," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMIZE_SUM_ARRII{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += ( arr [ i ] * i ) ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,4,6,7,8,9,11,19,23,24,30,31,31,32,41,43,43,46,47,50,50,51,53,57,63,63,69,73,74,79,80,81,81,85,86,88,92,93,95,98,99}); param0.add(new int[]{90,66,-98,-42,-10,90,-6,76,-80,-62,-40,90,-34,-76,90,-42,80,-74,10,-78,-16,32,52,-82,-98,-68,12,92,72,-10,98,76,-52,-58,62,68,20,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{79,52,45,58,44,13,14,99,8,44,42,98,47,44}); param0.add(new int[]{-90,-88,-68,-66,-46,-42,-40,-20,-16,4,8,8,8,20,28,52,84,98}); param0.add(new int[]{1,1,0,0,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,0,1}); param0.add(new int[]{5,6,7,9,11,13,16,19,22,25,26,27,28,29,32,32,32,33,36,40,43,43,47,49,51,51,52,53,59,61,63,65,66,66,67,72,73,73,75,76,80,86,87,89,89,91,96,98,99}); param0.add(new int[]{26,34,-26,-14,40,-20,54,48,-20,28,68,-78,-32,-96,-12,70,-24,92,-14,64,64,40,-8,88,-98,-4,-22,52,32,-52,2,6,-66,-38,-90,-48,-6,-30,76,32,96,-34,-12}); param0.add(new int[]{0,0,1,1}); param0.add(new int[]{84,32,75,21,62,49,88,49,47,20,49,18,71,34,88,44,84}); List param1 = new ArrayList<>(); param1.add(22); param1.add(24); param1.add(13); param1.add(11); param1.add(14); param1.add(13); param1.add(42); param1.add(39); param1.add(3); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( ) sum = 0 for i in range ( n ) : sum += arr [ i ] * i return sum "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int sum = 0; for ( int i = 0; i < n; i ++ ) sum += ( arr [ i ] * i ); return sum; } int main() { int n_success = 0; vector> param0 {{2,3,4,6,7,8,9,11,19,23,24,30,31,31,32,41,43,43,46,47,50,50,51,53,57,63,63,69,73,74,79,80,81,81,85,86,88,92,93,95,98,99},{90,66,-98,-42,-10,90,-6,76,-80,-62,-40,90,-34,-76,90,-42,80,-74,10,-78,-16,32,52,-82,-98,-68,12,92,72,-10,98,76,-52,-58,62,68,20,-58},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{79,52,45,58,44,13,14,99,8,44,42,98,47,44},{-90,-88,-68,-66,-46,-42,-40,-20,-16,4,8,8,8,20,28,52,84,98},{1,1,0,0,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,0,1},{5,6,7,9,11,13,16,19,22,25,26,27,28,29,32,32,32,33,36,40,43,43,47,49,51,51,52,53,59,61,63,65,66,66,67,72,73,73,75,76,80,86,87,89,89,91,96,98,99},{26,34,-26,-14,40,-20,54,48,-20,28,68,-78,-32,-96,-12,70,-24,92,-14,64,64,40,-8,88,-98,-4,-22,52,32,-52,2,6,-66,-38,-90,-48,-6,-30,76,32,96,-34,-12},{0,0,1,1},{84,32,75,21,62,49,88,49,47,20,49,18,71,34,88,44,84}}; vector param1 {22,24,13,11,14,13,42,39,3,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 4, 6, 7, 8, 9, 11, 19, 23, 24, 30, 31, 31, 32, 41, 43, 43, 46, 47, 50, 50, 51, 53, 57, 63, 63, 69, 73, 74, 79, 80, 81, 81, 85, 86, 88, 92, 93, 95, 98, 99],22,), ([90, 66, -98, -42, -10, 90, -6, 76, -80, -62, -40, 90, -34, -76, 90, -42, 80, -74, 10, -78, -16, 32, 52, -82, -98, -68, 12, 92, 72, -10, 98, 76, -52, -58, 62, 68, 20, -58],24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],13,), ([79, 52, 45, 58, 44, 13, 14, 99, 8, 44, 42, 98, 47, 44],11,), ([-90, -88, -68, -66, -46, -42, -40, -20, -16, 4, 8, 8, 8, 20, 28, 52, 84, 98],14,), ([1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1],13,), ([5, 6, 7, 9, 11, 13, 16, 19, 22, 25, 26, 27, 28, 29, 32, 32, 32, 33, 36, 40, 43, 43, 47, 49, 51, 51, 52, 53, 59, 61, 63, 65, 66, 66, 67, 72, 73, 73, 75, 76, 80, 86, 87, 89, 89, 91, 96, 98, 99],42,), ([26, 34, -26, -14, 40, -20, 54, 48, -20, 28, 68, -78, -32, -96, -12, 70, -24, 92, -14, 64, 64, 40, -8, 88, -98, -4, -22, 52, 32, -52, 2, 6, -66, -38, -90, -48, -6, -30, 76, 32, 96, -34, -12],39,), ([0, 0, 1, 1],3,), ([84, 32, 75, 21, 62, 49, 88, 49, 47, 20, 49, 18, 71, 34, 88, 44, 84],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE{ static boolean f_gold ( int degree [ ] , int n ) { int deg_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { deg_sum += degree [ i ] ; } return ( 2 * ( n - 1 ) == deg_sum ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2, 3, 1, 1, 1}); param0.add(new int[]{2, 2, 1, 1, 2}); param0.add(new int[]{2, 2, 1, 1, 1}); param0.add(new int[]{0,0,0,3,3,4}); param0.add(new int[]{-10, 12, 2}); param0.add(new int[]{1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,1,1,0,1,1,0,0,0,1,0,1,1,1,1,1,1,0,1,1,1,0,1,0,0}); param0.add(new int[]{1,6,10,13,15,17,18,23,26,28,30,32,32,33,36,39,39,41,43,50,50,51,53,54,59,59,63,63,63,66,66,71,71,74,78,89,89,93}); param0.add(new int[]{66,-96,-14,74,-20}); param0.add(new int[]{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}); param0.add(new int[]{97,73,87,45,64,30,53,50,62,42,28,58,31,90}); List param1 = new ArrayList<>(); param1.add(5); param1.add(5); param1.add(5); param1.add(6); param1.add(3); param1.add(19); param1.add(30); param1.add(4); param1.add(31); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( degree , n ) : deg_sum = sum ( degree ) if ( 2 * ( n - 1 ) == deg_sum ) : return True else : return False "," using namespace std; bool f_gold ( int degree [ ], int n ) { int deg_sum = 0; for ( int i = 0; i < n; i ++ ) deg_sum += degree [ i ]; return ( 2 * ( n - 1 ) == deg_sum ); } int main() { int n_success = 0; vector> param0 { {2, 3, 1, 1, 1}, {2, 2, 1, 1, 2}, {2, 2, 1, 1, 1}, {0,0,0,3,3,4}, {-10, 12, 2}, {1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,1,1,0,1,1,0,0,0,1,0,1,1,1,1,1,1,0,1,1,1,0,1,0,0}, {1,6,10,13,15,17,18,23,26,28,30,32,32,33,36,39,39,41,43,50,50,51,53,54,59,59,63,63,63,66,66,71,71,74,78,89,89,93}, {66,-96,-14,74,-20}, {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}, {97,73,87,45,64,30,53,50,62,42,28,58,31,90}}; vector param1 {5,5,5,6,3,19,30,4,31,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 1, 1, 1],5,), ([2, 2, 1, 1, 2],5,), ([2, 2, 1, 1, 1],5,), ([0,0,0,3,3,4],6,), ([-10, 12, 2],3,), ([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0],19,), ([1, 6, 10, 13, 15, 17, 18, 23, 26, 28, 30, 32, 32, 33, 36, 39, 39, 41, 43, 50, 50, 51, 53, 54, 59, 59, 63, 63, 63, 66, 66, 71, 71, 74, 78, 89, 89, 93],30,), ([66, -96, -14, 74, -20],4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([97, 73, 87, 45, 64, 30, 53, 50, 62, 42, 28, 58, 31, 90],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_POINTS_INTERSECTION_N_CIRCLES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_POINTS_INTERSECTION_N_CIRCLES{ static int f_gold ( int n ) { return n * ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(30); param0.add(25); param0.add(69); param0.add(39); param0.add(14); param0.add(60); param0.add(89); param0.add(27); param0.add(29); param0.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return n * ( n - 1 ) ; "," using namespace std; int f_gold ( int n ) { return n * ( n - 1 ); } int main() { int n_success = 0; vector param0 {30,25,69,39,14,60,89,27,29,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (30,), (25,), (69,), (39,), (14,), (60,), (89,), (27,), (29,), (29,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M{ static int f_gold ( int A [ ] , int N , int M ) { int sum = 0 ; int ans = 0 ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = i + 1 ; j < N ; j ++ ) { for ( int k = j + 1 ; k < N ; k ++ ) { sum = A [ i ] + A [ j ] + A [ k ] ; if ( sum % M == 0 ) ans ++ ; } } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{14,35,56,70,88}); param0.add(new int[]{-50,-92,16,-68,-36}); param0.add(new int[]{0,0,0,1,1,1}); param0.add(new int[]{76,43,22,41,49,99,25,40,3,45,60,16,83,62,26,93,64,73,72,53,6,32,35,67,17}); param0.add(new int[]{-90,-86,-86,-66,-50,-48,-44,-42,-42,-38,-24,-22,-20,-18,-8,8,24,28,34,48,60,62,66,68,74,76,80,82,88}); param0.add(new int[]{1,1,1,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,1,0,1,1,0}); param0.add(new int[]{4,5,8,9,10,12,13,16,17,18,21,21,25,27,28,30,36,36,54,55,56,57,60,62,67,67,68,71,72,72,73,73,77,77,83,86,86,86,87,89,92,92,96,97,97,98}); param0.add(new int[]{-64,52,-32,38,8,-62,-56,20,72,-12,32,44}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{77,68,45,6,27,19,29,95,21,2,39,48,72,67,49,45,1,16,56,78,25,22,27,40,31,34,26,35,12}); List param1 = new ArrayList<>(); param1.add(3); param1.add(3); param1.add(4); param1.add(14); param1.add(24); param1.add(24); param1.add(24); param1.add(6); param1.add(12); param1.add(25); List param2 = new ArrayList<>(); param2.add(4); param2.add(4); param2.add(5); param2.add(21); param2.add(20); param2.add(30); param2.add(23); param2.add(6); param2.add(15); param2.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , N , M ) : sum = 0 ans = 0 for i in range ( 0 , N ) : for j in range ( i + 1 , N ) : for k in range ( j + 1 , N ) : sum = A [ i ] + A [ j ] + A [ k ] if ( sum % M == 0 ) : ans = ans + 1 return ans "," using namespace std; int f_gold ( int A [ ], int N, int M ) { int sum = 0; int ans = 0; for ( int i = 0; i < N; i ++ ) { for ( int j = i + 1; j < N; j ++ ) { for ( int k = j + 1; k < N; k ++ ) { sum = A [ i ] + A [ j ] + A [ k ]; if ( sum % M == 0 ) ans ++; } } } return ans; } int main() { int n_success = 0; vector> param0 {{14,35,56,70,88},{-50,-92,16,-68,-36},{0,0,0,1,1,1},{76,43,22,41,49,99,25,40,3,45,60,16,83,62,26,93,64,73,72,53,6,32,35,67,17},{-90,-86,-86,-66,-50,-48,-44,-42,-42,-38,-24,-22,-20,-18,-8,8,24,28,34,48,60,62,66,68,74,76,80,82,88},{1,1,1,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,1,0,1,1,0},{4,5,8,9,10,12,13,16,17,18,21,21,25,27,28,30,36,36,54,55,56,57,60,62,67,67,68,71,72,72,73,73,77,77,83,86,86,86,87,89,92,92,96,97,97,98},{-64,52,-32,38,8,-62,-56,20,72,-12,32,44},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{77,68,45,6,27,19,29,95,21,2,39,48,72,67,49,45,1,16,56,78,25,22,27,40,31,34,26,35,12}}; vector param1 {3,3,4,14,24,24,24,6,12,25}; vector param2 {4,4,5,21,20,30,23,6,15,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([14, 35, 56, 70, 88],3,4,), ([-50, -92, 16, -68, -36],3,4,), ([0, 0, 0, 1, 1, 1],4,5,), ([76, 43, 22, 41, 49, 99, 25, 40, 3, 45, 60, 16, 83, 62, 26, 93, 64, 73, 72, 53, 6, 32, 35, 67, 17],14,21,), ([-90, -86, -86, -66, -50, -48, -44, -42, -42, -38, -24, -22, -20, -18, -8, 8, 24, 28, 34, 48, 60, 62, 66, 68, 74, 76, 80, 82, 88],24,20,), ([1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0],24,30,), ([4, 5, 8, 9, 10, 12, 13, 16, 17, 18, 21, 21, 25, 27, 28, 30, 36, 36, 54, 55, 56, 57, 60, 62, 67, 67, 68, 71, 72, 72, 73, 73, 77, 77, 83, 86, 86, 86, 87, 89, 92, 92, 96, 97, 97, 98],24,23,), ([-64, 52, -32, 38, 8, -62, -56, 20, 72, -12, 32, 44],6,6,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,15,), ([77, 68, 45, 6, 27, 19, 29, 95, 21, 2, 39, 48, 72, 67, 49, 45, 1, 16, 56, 78, 25, 22, 27, 40, 31, 34, 26, 35, 12],25,25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_OF_WAYS_TO_PARTITION_A_SET_INTO_K_SUBSETS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_OF_WAYS_TO_PARTITION_A_SET_INTO_K_SUBSETS_1{ static int f_gold ( int n , int k ) { int [ ] [ ] dp = new int [ n + 1 ] [ k + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) dp [ i ] [ 0 ] = 0 ; for ( int i = 0 ; i <= k ; i ++ ) dp [ 0 ] [ k ] = 0 ; for ( int i = 1 ; i <= n ; i ++ ) for ( int j = 1 ; j <= k ; j ++ ) if ( j == 1 || i == j ) dp [ i ] [ j ] = 1 ; else dp [ i ] [ j ] = j * dp [ i - 1 ] [ j ] + dp [ i - 1 ] [ j - 1 ] ; return dp [ n ] [ k ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(84); param0.add(95); param0.add(67); param0.add(92); param0.add(97); param0.add(13); param0.add(37); param0.add(9); param0.add(10); param0.add(90); List param1 = new ArrayList<>(); param1.add(99); param1.add(64); param1.add(21); param1.add(22); param1.add(35); param1.add(77); param1.add(46); param1.add(92); param1.add(26); param1.add(94); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k ) : dp = [ [ 0 for i in range ( k + 1 ) ] for j in range ( n + 1 ) ] for i in range ( n + 1 ) : dp [ i ] [ 0 ] = 0 for i in range ( k + 1 ) : dp [ 0 ] [ k ] = 0 for i in range ( 1 , n + 1 ) : for j in range ( 1 , k + 1 ) : if ( j == 1 or i == j ) : dp [ i ] [ j ] = 1 else : dp [ i ] [ j ] = ( j * dp [ i - 1 ] [ j ] + dp [ i - 1 ] [ j - 1 ] ) return dp [ n ] [ k ] ",,," if __name__ == '__main__': param = [ (84,99,), (95,64,), (67,21,), (92,22,), (97,35,), (13,77,), (37,46,), (9,92,), (10,26,), (90,94,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LEONARDO_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEONARDO_NUMBER_1{ static int f_gold ( int n ) { int dp [ ] = new int [ n + 1 ] ; dp [ 0 ] = dp [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1 ; return dp [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(75); param0.add(76); param0.add(55); param0.add(14); param0.add(43); param0.add(10); param0.add(16); param0.add(30); param0.add(44); param0.add(65); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : dp = [ ] ; dp.append ( 1 ) ; dp.append ( 1 ) ; for i in range ( 2 , n + 1 ) : dp.append ( dp [ i - 1 ] + dp [ i - 2 ] + 1 ) ; return dp [ n ] ; "," using namespace std; int f_gold ( int n ) { int dp [ n + 1 ]; dp [ 0 ] = dp [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1; return dp [ n ]; } int main() { int n_success = 0; vector param0 {75,76,55,14,43,10,16,30,44,65}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (75,), (76,), (55,), (14,), (43,), (10,), (16,), (30,), (44,), (65,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_HEIGHT_PYRAMID_FROM_THE_GIVEN_ARRAY_OF_OBJECTS{ static int f_gold ( int [ ] boxes , int n ) { Arrays . sort ( boxes ) ; int ans = 1 ; int prev_width = boxes [ 0 ] ; int prev_count = 1 ; int curr_count = 0 ; int curr_width = 0 ; for ( int i = 1 ; i < n ; i ++ ) { curr_width += boxes [ i ] ; curr_count += 1 ; if ( curr_width > prev_width && curr_count > prev_count ) { prev_width = curr_width ; prev_count = curr_count ; curr_count = 0 ; curr_width = 0 ; ans ++ ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,8,11,11,14,19,25,27,41,42,46,52,53,54,55,58,59,62,63,66,67,69,74,75,77,81,83,84,88,88,93,93,94}); param0.add(new int[]{80,72,40,-78,-72,20,-28,-18,-96,14,20,-60,-56,-92,12,86,16,76,30,76,16}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{12,85,16,78,85,48,91,1,65,22,15,84,67,14,73,19,40,98,4,33,43,37,66,27,45,81,50,95,63,6,95,67,67,97,59,13,21,64,37,80}); param0.add(new int[]{-98,-92,-90,-88,-88,-74,-64,-64,-64,-62,-60,-52,-48,-46,-42,-42,-38,-34,-28,-26,-20,-20,-18,-4,0,2,2,6,18,18,18,20,24,24,26,32,40,46,58,66,74,78,90,96}); param0.add(new int[]{1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0}); param0.add(new int[]{8,12,13,13,13,16,16,17,19,20,22,23,26,29,29,30,31,37,38,39,39,41,45,45,46,49,49,53,56,62,62,66,67,68,68,69,69,73,77,78,82,85,85,88,88,97}); param0.add(new int[]{36,-30,-84,4,-20,-28,-88,72,40,46,-68,-8,18,-24,94,-64,-76,8,82,-6,-98,-70,82,60,-58,-98,86,34,-76,-44,-22,-26,90,20,-38,16,94,94,-78,-42,78,-74,2,8,-62}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{70,54,71,85,51,28,64,85,21,88,27,27,77,50,29,39,57,92,37,93,64,48,22,30,28,23,97,4,3,61,96}); List param1 = new ArrayList<>(); param1.add(22); param1.add(12); param1.add(35); param1.add(35); param1.add(30); param1.add(21); param1.add(26); param1.add(25); param1.add(26); param1.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( boxes , n ) : boxes.sort ( ) ans = 1 prev_width = boxes [ 0 ] prev_count = 1 curr_count = 0 curr_width = 0 for i in range ( 1 , n ) : curr_width += boxes [ i ] curr_count += 1 if ( curr_width > prev_width and curr_count > prev_count ) : prev_width = curr_width prev_count = curr_count curr_count = 0 curr_width = 0 ans += 1 return ans "," using namespace std; int f_gold ( int boxes [ ], int n ) { sort ( boxes, boxes + n ); int ans = 1; int prev_width = boxes [ 0 ]; int prev_count = 1; int curr_count = 0; int curr_width = 0; for ( int i = 1; i < n; i ++ ) { curr_width += boxes [ i ]; curr_count += 1; if ( curr_width > prev_width && curr_count > prev_count ) { prev_width = curr_width; prev_count = curr_count; curr_count = 0; curr_width = 0; ans ++; } } return ans; } int main() { int n_success = 0; vector> param0 {{7,8,11,11,14,19,25,27,41,42,46,52,53,54,55,58,59,62,63,66,67,69,74,75,77,81,83,84,88,88,93,93,94},{80,72,40,-78,-72,20,-28,-18,-96,14,20,-60,-56,-92,12,86,16,76,30,76,16},{0,0,0,0,0,0,0,0,0,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},{12,85,16,78,85,48,91,1,65,22,15,84,67,14,73,19,40,98,4,33,43,37,66,27,45,81,50,95,63,6,95,67,67,97,59,13,21,64,37,80},{-98,-92,-90,-88,-88,-74,-64,-64,-64,-62,-60,-52,-48,-46,-42,-42,-38,-34,-28,-26,-20,-20,-18,-4,0,2,2,6,18,18,18,20,24,24,26,32,40,46,58,66,74,78,90,96},{1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0},{8,12,13,13,13,16,16,17,19,20,22,23,26,29,29,30,31,37,38,39,39,41,45,45,46,49,49,53,56,62,62,66,67,68,68,69,69,73,77,78,82,85,85,88,88,97},{36,-30,-84,4,-20,-28,-88,72,40,46,-68,-8,18,-24,94,-64,-76,8,82,-6,-98,-70,82,60,-58,-98,86,34,-76,-44,-22,-26,90,20,-38,16,94,94,-78,-42,78,-74,2,8,-62},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{70,54,71,85,51,28,64,85,21,88,27,27,77,50,29,39,57,92,37,93,64,48,22,30,28,23,97,4,3,61,96}}; vector param1 {22,12,35,35,30,21,26,25,26,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 8, 11, 11, 14, 19, 25, 27, 41, 42, 46, 52, 53, 54, 55, 58, 59, 62, 63, 66, 67, 69, 74, 75, 77, 81, 83, 84, 88, 88, 93, 93, 94],22,), ([80, 72, 40, -78, -72, 20, -28, -18, -96, 14, 20, -60, -56, -92, 12, 86, 16, 76, 30, 76, 16],12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],35,), ([12, 85, 16, 78, 85, 48, 91, 1, 65, 22, 15, 84, 67, 14, 73, 19, 40, 98, 4, 33, 43, 37, 66, 27, 45, 81, 50, 95, 63, 6, 95, 67, 67, 97, 59, 13, 21, 64, 37, 80],35,), ([-98, -92, -90, -88, -88, -74, -64, -64, -64, -62, -60, -52, -48, -46, -42, -42, -38, -34, -28, -26, -20, -20, -18, -4, 0, 2, 2, 6, 18, 18, 18, 20, 24, 24, 26, 32, 40, 46, 58, 66, 74, 78, 90, 96],30,), ([1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0],21,), ([8, 12, 13, 13, 13, 16, 16, 17, 19, 20, 22, 23, 26, 29, 29, 30, 31, 37, 38, 39, 39, 41, 45, 45, 46, 49, 49, 53, 56, 62, 62, 66, 67, 68, 68, 69, 69, 73, 77, 78, 82, 85, 85, 88, 88, 97],26,), ([36, -30, -84, 4, -20, -28, -88, 72, 40, 46, -68, -8, 18, -24, 94, -64, -76, 8, 82, -6, -98, -70, 82, 60, -58, -98, 86, 34, -76, -44, -22, -26, 90, 20, -38, 16, 94, 94, -78, -42, 78, -74, 2, 8, -62],25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,), ([70, 54, 71, 85, 51, 28, 64, 85, 21, 88, 27, 27, 77, 50, 29, 39, 57, 92, 37, 93, 64, 48, 22, 30, 28, 23, 97, 4, 3, 61, 96],18,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_NUMBER_CHOCOLATES_DISTRIBUTED_EQUALLY_AMONG_K_STUDENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_NUMBER_CHOCOLATES_DISTRIBUTED_EQUALLY_AMONG_K_STUDENTS{ static int f_gold ( int arr [ ] , int n , int k ) { HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ; int [ ] sum = new int [ n ] ; int curr_rem ; int maxSum = 0 ; sum [ 0 ] = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) sum [ i ] = sum [ i - 1 ] + arr [ i ] ; for ( int i = 0 ; i < n ; i ++ ) { curr_rem = sum [ i ] % k ; if ( curr_rem == 0 ) { if ( maxSum < sum [ i ] ) maxSum = sum [ i ] ; } else if ( ! um . containsKey ( curr_rem ) ) um . put ( curr_rem , i ) ; else if ( maxSum < ( sum [ i ] - sum [ um . get ( curr_rem ) ] ) ) maxSum = sum [ i ] - sum [ um . get ( curr_rem ) ] ; } return ( maxSum / k ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,8,8,12,14,23,25,25,27,27,29,40,42,49,52,52,54,56,57,61,68,74,77,81,82,83,84,85,85,85,87,87,88,88,90,92,96,96}); param0.add(new int[]{-90,-34,26,-20,-12,-42,28,12,-6,58,-46,4,-30,-28,-14}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{58,81,36,2,51,71,77,34,91,82,47,4,91,83,26,96,3,6}); param0.add(new int[]{-92,-86,-82,-68,-60,-46,-40,-28,-26,-24,-2,-2,2,2,10,10,10,16,16,18,20,20,22,30,34,38,56,56,60,62,62,68,82,94,94,98}); param0.add(new int[]{0,1,0}); param0.add(new int[]{3,8,15,19,21,26,28,31,31,42,45,48,57,75,75,78,79,85,91,99}); param0.add(new int[]{-38,42,40,-60,-16,-36,44,60,-86,-38,30,-22,-30,-96,-66}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{95,38,91,75,43,95,23,36,51,4,38,53,52,58,55,3,19,22,84,9}); List param1 = new ArrayList<>(); param1.add(27); param1.add(8); param1.add(7); param1.add(16); param1.add(20); param1.add(2); param1.add(17); param1.add(12); param1.add(13); param1.add(14); List param2 = new ArrayList<>(); param2.add(32); param2.add(14); param2.add(9); param2.add(12); param2.add(31); param2.add(2); param2.add(16); param2.add(10); param2.add(16); param2.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : um , curr_rem , maxSum = { } , 0 , 0 sm = [ 0 ] * n sm [ 0 ] = arr [ 0 ] for i in range ( 1 , n ) : sm [ i ] = sm [ i - 1 ] + arr [ i ] for i in range ( n ) : curr_rem = sm [ i ] % k if ( not curr_rem and maxSum < sm [ i ] ) : maxSum = sm [ i ] elif ( not curr_rem in um ) : um [ curr_rem ] = i elif ( maxSum < ( sm [ i ] - sm [ um [ curr_rem ] ] ) ) : maxSum = sm [ i ] - sm [ um [ curr_rem ] ] return maxSum // k "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > um; int sum [ n ], curr_rem; int maxSum = 0; sum [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) sum [ i ] = sum [ i - 1 ] + arr [ i ]; for ( int i = 0; i < n; i ++ ) { curr_rem = sum [ i ] % k; if ( curr_rem == 0 ) { if ( maxSum < sum [ i ] ) maxSum = sum [ i ]; } else if ( um . find ( curr_rem ) == um . end ( ) ) um [ curr_rem ] = i; else if ( maxSum < ( sum [ i ] - sum [ um [ curr_rem ] ] ) ) maxSum = sum [ i ] - sum [ um [ curr_rem ] ]; } return ( maxSum / k ); } int main() { int n_success = 0; vector> param0 {{2,3,8,8,12,14,23,25,25,27,27,29,40,42,49,52,52,54,56,57,61,68,74,77,81,82,83,84,85,85,85,87,87,88,88,90,92,96,96},{-90,-34,26,-20,-12,-42,28,12,-6,58,-46,4,-30,-28,-14},{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{58,81,36,2,51,71,77,34,91,82,47,4,91,83,26,96,3,6},{-92,-86,-82,-68,-60,-46,-40,-28,-26,-24,-2,-2,2,2,10,10,10,16,16,18,20,20,22,30,34,38,56,56,60,62,62,68,82,94,94,98},{0,1,0},{3,8,15,19,21,26,28,31,31,42,45,48,57,75,75,78,79,85,91,99},{-38,42,40,-60,-16,-36,44,60,-86,-38,30,-22,-30,-96,-66},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{95,38,91,75,43,95,23,36,51,4,38,53,52,58,55,3,19,22,84,9}}; vector param1 {27,8,7,16,20,2,17,12,13,14}; vector param2 {32,14,9,12,31,2,16,10,16,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 8, 8, 12, 14, 23, 25, 25, 27, 27, 29, 40, 42, 49, 52, 52, 54, 56, 57, 61, 68, 74, 77, 81, 82, 83, 84, 85, 85, 85, 87, 87, 88, 88, 90, 92, 96, 96],27,32,), ([-90, -34, 26, -20, -12, -42, 28, 12, -6, 58, -46, 4, -30, -28, -14],8,14,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],7,9,), ([58, 81, 36, 2, 51, 71, 77, 34, 91, 82, 47, 4, 91, 83, 26, 96, 3, 6],16,12,), ([-92, -86, -82, -68, -60, -46, -40, -28, -26, -24, -2, -2, 2, 2, 10, 10, 10, 16, 16, 18, 20, 20, 22, 30, 34, 38, 56, 56, 60, 62, 62, 68, 82, 94, 94, 98],20,31,), ([0, 1, 0],2,2,), ([3, 8, 15, 19, 21, 26, 28, 31, 31, 42, 45, 48, 57, 75, 75, 78, 79, 85, 91, 99],17,16,), ([-38, 42, 40, -60, -16, -36, 44, 60, -86, -38, 30, -22, -30, -96, -66],12,10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],13,16,), ([95, 38, 91, 75, 43, 95, 23, 36, 51, 4, 38, 53, 52, 58, 55, 3, 19, 22, 84, 9],14,19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int count = 0 ; Arrays . sort ( arr ) ; for ( int i = 0 ; i < n - 1 ; i ++ ) if ( arr [ i ] != arr [ i + 1 ] && arr [ i ] != arr [ i + 1 ] - 1 ) count += arr [ i + 1 ] - arr [ i ] - 1 ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,4,5,7,7,9,13,15,18,19,25,27,27,29,32,36,48,51,53,53,55,65,66,67,72,74,74,76,77,79,80,81,82,83,83,86,87,97,98,98,99}); param0.add(new int[]{34,6,-16,-26,-80,-90,-74,16,-84,64,-8,14,-52,-26,-90,-84,94,92,-88,-84,72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{25,29,12,79,23,92,54,43,26,10,43,39,32,12,62,13,13}); param0.add(new int[]{-94,-86,-72,-64,-64,-58,-56,-56,-56,-56,-54,-54,-52,-42,-42,-40,-36,-32,-28,-22,-20,-18,-12,-8,-6,-4,0,2,4,10,16,30,32,48,48,60,70,74,76,84}); param0.add(new int[]{1,1,1,0,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,0,1,0,1,1,0,0,1,0,1,1,1,0}); param0.add(new int[]{4,5,8,12,16,16,17,20,20,23,26,26,27,28,32,34,40,40,41,41,44,45,47,49,51,52,54,57,60,62,63,64,66,68,69,70,71,76,77,80,80,80,90,91,92,94,96,98,99}); param0.add(new int[]{66,-46,-92,-40,76,74,10,20,56,-46,88,-18,48,96,-48,-86,38,-98,50,4,-52,-38,14,-48,96,16,-74,-26,80,14,-92,-60,-78,-68,96,-72,-44,-92,2,60,4,48,84,-92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{49,84,66}); List param1 = new ArrayList<>(); param1.add(30); param1.add(17); param1.add(24); param1.add(14); param1.add(35); param1.add(29); param1.add(42); param1.add(37); param1.add(17); param1.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : count = 0 arr.sort ( ) for i in range ( 0 , n - 1 ) : if ( arr [ i ] != arr [ i + 1 ] and arr [ i ] != arr [ i + 1 ] - 1 ) : count += arr [ i + 1 ] - arr [ i ] - 1 ; return count "," using namespace std; int f_gold ( int arr [ ], int n ) { int count = 0; sort ( arr, arr + n ); for ( int i = 0; i < n - 1; i ++ ) if ( arr [ i ] != arr [ i + 1 ] && arr [ i ] != arr [ i + 1 ] - 1 ) count += arr [ i + 1 ] - arr [ i ] - 1; return count; } int main() { int n_success = 0; vector> param0 {{4,4,5,7,7,9,13,15,18,19,25,27,27,29,32,36,48,51,53,53,55,65,66,67,72,74,74,76,77,79,80,81,82,83,83,86,87,97,98,98,99},{34,6,-16,-26,-80,-90,-74,16,-84,64,-8,14,-52,-26,-90,-84,94,92,-88,-84,72},{0,0,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,29,12,79,23,92,54,43,26,10,43,39,32,12,62,13,13},{-94,-86,-72,-64,-64,-58,-56,-56,-56,-56,-54,-54,-52,-42,-42,-40,-36,-32,-28,-22,-20,-18,-12,-8,-6,-4,0,2,4,10,16,30,32,48,48,60,70,74,76,84},{1,1,1,0,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,0,1,0,1,1,0,0,1,0,1,1,1,0},{4,5,8,12,16,16,17,20,20,23,26,26,27,28,32,34,40,40,41,41,44,45,47,49,51,52,54,57,60,62,63,64,66,68,69,70,71,76,77,80,80,80,90,91,92,94,96,98,99},{66,-46,-92,-40,76,74,10,20,56,-46,88,-18,48,96,-48,-86,38,-98,50,4,-52,-38,14,-48,96,16,-74,-26,80,14,-92,-60,-78,-68,96,-72,-44,-92,2,60,4,48,84,-92},{0,0,0,0,0,0,0,0,0,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},{49,84,66}}; vector param1 {30,17,24,14,35,29,42,37,17,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 4, 5, 7, 7, 9, 13, 15, 18, 19, 25, 27, 27, 29, 32, 36, 48, 51, 53, 53, 55, 65, 66, 67, 72, 74, 74, 76, 77, 79, 80, 81, 82, 83, 83, 86, 87, 97, 98, 98, 99],30,), ([34, 6, -16, -26, -80, -90, -74, 16, -84, 64, -8, 14, -52, -26, -90, -84, 94, 92, -88, -84, 72],17,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([25, 29, 12, 79, 23, 92, 54, 43, 26, 10, 43, 39, 32, 12, 62, 13, 13],14,), ([-94, -86, -72, -64, -64, -58, -56, -56, -56, -56, -54, -54, -52, -42, -42, -40, -36, -32, -28, -22, -20, -18, -12, -8, -6, -4, 0, 2, 4, 10, 16, 30, 32, 48, 48, 60, 70, 74, 76, 84],35,), ([1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0],29,), ([4, 5, 8, 12, 16, 16, 17, 20, 20, 23, 26, 26, 27, 28, 32, 34, 40, 40, 41, 41, 44, 45, 47, 49, 51, 52, 54, 57, 60, 62, 63, 64, 66, 68, 69, 70, 71, 76, 77, 80, 80, 80, 90, 91, 92, 94, 96, 98, 99],42,), ([66, -46, -92, -40, 76, 74, 10, 20, 56, -46, 88, -18, 48, 96, -48, -86, 38, -98, 50, 4, -52, -38, 14, -48, 96, 16, -74, -26, 80, 14, -92, -60, -78, -68, 96, -72, -44, -92, 2, 60, 4, 48, 84, -92],37,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 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],17,), ([49, 84, 66],2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING{ static int f_gold ( int arr [ ] , int low , int high ) { int max = arr [ low ] ; int i ; for ( i = low ; i <= high ; i ++ ) { if ( arr [ i ] > max ) max = arr [ i ] ; } return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{11,15,16,19,24,25,26,28,34,34,43,61,63,66,67,72,77,79,81,83,87,94,99}); param0.add(new int[]{8,92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{84,39,92,89,38,75,18,39,83,67,41,46,49,27}); param0.add(new int[]{-98,-94,-88,-84,-74,-72,-58,-52,-48,-48,-46,-42,-42,-32,-30,-30,-18,-10,-8,-8,-6,-4,4,6,28,30,34,38,44,48,56,58,60,64,86}); param0.add(new int[]{0,1,0}); param0.add(new int[]{5,9,10,16,18,19,23,24,26,33,37,44,46,54,55,57,58,59,63,64,70,75,77,81,83,84,85,85,88,89,96,97,99}); param0.add(new int[]{86,20,-50,74,-78,86}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{16,57,65,61,17,63,7,35,69,91,30,44,99,80,6,80,56,8,84,95,20,73,30,62,77,26,66,61,61,45}); List param1 = new ArrayList<>(); param1.add(15); param1.add(1); param1.add(23); param1.add(8); param1.add(31); param1.add(2); param1.add(20); param1.add(3); param1.add(19); param1.add(28); List param2 = new ArrayList<>(); param2.add(21); param2.add(1); param2.add(15); param2.add(13); param2.add(34); param2.add(2); param2.add(31); param2.add(5); param2.add(18); param2.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , low , high ) : max = arr [ low ] i = low for i in range ( high + 1 ) : if arr [ i ] > max : max = arr [ i ] return max "," using namespace std; int f_gold ( int arr [ ], int low, int high ) { int max = arr [ low ]; int i; for ( i = low + 1; i <= high; i ++ ) { if ( arr [ i ] > max ) max = arr [ i ]; else break; } return max; } int main() { int n_success = 0; vector> param0 {{11,15,16,19,24,25,26,28,34,34,43,61,63,66,67,72,77,79,81,83,87,94,99},{8,92},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{84,39,92,89,38,75,18,39,83,67,41,46,49,27},{-98,-94,-88,-84,-74,-72,-58,-52,-48,-48,-46,-42,-42,-32,-30,-30,-18,-10,-8,-8,-6,-4,4,6,28,30,34,38,44,48,56,58,60,64,86},{0,1,0},{5,9,10,16,18,19,23,24,26,33,37,44,46,54,55,57,58,59,63,64,70,75,77,81,83,84,85,85,88,89,96,97,99},{86,20,-50,74,-78,86},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{16,57,65,61,17,63,7,35,69,91,30,44,99,80,6,80,56,8,84,95,20,73,30,62,77,26,66,61,61,45}}; vector param1 {15,1,23,8,31,2,20,3,19,28}; vector param2 {21,1,15,13,34,2,31,5,18,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([11, 15, 16, 19, 24, 25, 26, 28, 34, 34, 43, 61, 63, 66, 67, 72, 77, 79, 81, 83, 87, 94, 99],15,21,), ([8, 92],1,1,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,15,), ([84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27],8,13,), ([-98, -94, -88, -84, -74, -72, -58, -52, -48, -48, -46, -42, -42, -32, -30, -30, -18, -10, -8, -8, -6, -4, 4, 6, 28, 30, 34, 38, 44, 48, 56, 58, 60, 64, 86],31,34,), ([0, 1, 0],2,2,), ([5, 9, 10, 16, 18, 19, 23, 24, 26, 33, 37, 44, 46, 54, 55, 57, 58, 59, 63, 64, 70, 75, 77, 81, 83, 84, 85, 85, 88, 89, 96, 97, 99],20,31,), ([86, 20, -50, 74, -78, 86],3,5,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,18,), ([16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73, 30, 62, 77, 26, 66, 61, 61, 45],28,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1{ public static int f_gold ( int arr [ ] , int n ) { int mls [ ] = new int [ n ] , max = 0 ; for ( int i = 0 ; i < n ; i ++ ) mls [ i ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) for ( int j = 0 ; j < i ; j ++ ) if ( Math . abs ( arr [ i ] - arr [ j ] ) <= 1 && mls [ i ] < mls [ j ] + 1 ) mls [ i ] = mls [ j ] + 1 ; for ( int i = 0 ; i < n ; i ++ ) if ( max < mls [ i ] ) max = mls [ i ] ; return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,5,9,31,31,37,41,55,56,61,79,81,89,93}); param0.add(new int[]{-76,96,-68,-16,22,-24,-24,6,98,-82,54,-80,46,0,0,-50}); param0.add(new int[]{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}); param0.add(new int[]{97,93,43,51,15,33,13,96,39,89,78,25,45,6,64,54}); param0.add(new int[]{-98,-78,-72,-70,-68,-58,-56,-54,-46,-44,-38,-34,-30,-24,-18,-16,-14,-12,2,6,8,8,10,10,16,24,26,28,40,42,44,56,58,62,66,66,78,86}); param0.add(new int[]{1,1,0,1,0,0}); param0.add(new int[]{7,8,10,11,12,15,16,16,19,21,23,23,23,25,26,35,38,43,46,47,51,52,53,57,60,61,66,67,69,74,75,81,83,84,88,92,94,98,98,99}); param0.add(new int[]{14,-40}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{59,70,53}); List param1 = new ArrayList<>(); param1.add(12); param1.add(15); param1.add(29); param1.add(13); param1.add(19); param1.add(3); param1.add(34); param1.add(1); param1.add(38); param1.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(arr, n): mls = [] max = 0 for i in range(n): mls.append(1) for i in range(n): for j in range(i): if (abs(arr[i] - arr[j]) <= 1 and mls[i] < mls[j] + 1): mls[i] = mls[j] + 1 for i in range(n): if (max < mls[i]): max = mls[i] return max "," using namespace std; int f_gold ( int arr [ ], int n ) { int mls [ n ], max = 0; for ( int i = 0; i < n; i ++ ) mls [ i ] = 1; for ( int i = 1; i < n; i ++ ) for ( int j = 0; j < i; j ++ ) if ( abs ( arr [ i ] - arr [ j ] ) <= 1 && mls [ i ] < mls [ j ] + 1 ) mls [ i ] = mls [ j ] + 1; for ( int i = 0; i < n; i ++ ) if ( max < mls [ i ] ) max = mls [ i ]; return max; } int main() { int n_success = 0; vector> param0 {{4,5,9,31,31,37,41,55,56,61,79,81,89,93},{-76,96,-68,-16,22,-24,-24,6,98,-82,54,-80,46,0,0,-50},{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},{97,93,43,51,15,33,13,96,39,89,78,25,45,6,64,54},{-98,-78,-72,-70,-68,-58,-56,-54,-46,-44,-38,-34,-30,-24,-18,-16,-14,-12,2,6,8,8,10,10,16,24,26,28,40,42,44,56,58,62,66,66,78,86},{1,1,0,1,0,0},{7,8,10,11,12,15,16,16,19,21,23,23,23,25,26,35,38,43,46,47,51,52,53,57,60,61,66,67,69,74,75,81,83,84,88,92,94,98,98,99},{14,-40},{0,0,0,0,0,0,0,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},{59,70,53}}; vector param1 {12,15,29,13,19,3,34,1,38,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 5, 9, 31, 31, 37, 41, 55, 56, 61, 79, 81, 89, 93], 12,), ([-76, 96, -68, -16, 22, -24, -24, 6, 98, -82, 54, -80, 46, 0, 0, -50], 15,), ([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], 29,), ([97, 93, 43, 51, 15, 33, 13, 96, 39, 89, 78, 25, 45, 6, 64, 54], 13,), ([-98, -78, -72, -70, -68, -58, -56, -54, -46, -44, -38, -34, -30, -24, -18, -16, -14, - 12, 2, 6, 8, 8, 10, 10, 16, 24, 26, 28, 40, 42, 44, 56, 58, 62, 66, 66, 78, 86], 19,), ([1, 1, 0, 1, 0, 0], 3,), ([7, 8, 10, 11, 12, 15, 16, 16, 19, 21, 23, 23, 23, 25, 26, 35, 38, 43, 46, 47, 51, 52, 53, 57, 60, 61, 66, 67, 69, 74, 75, 81, 83, 84, 88, 92, 94, 98, 98, 99], 34,), ([14, -40], 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], 38,), ([59, 70, 53], 1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", CASSINIS_IDENTITY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CASSINIS_IDENTITY{ static int f_gold ( int n ) { return ( n & 1 ) != 0 ? - 1 : 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(2); param0.add(58); param0.add(6); param0.add(42); param0.add(17); param0.add(37); param0.add(44); param0.add(23); param0.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return - 1 if ( n & 1 ) else 1 "," using namespace std; int f_gold ( int n ) { return ( n & 1 ) ? - 1 : 1; } int main() { int n_success = 0; vector param0 {67,2,58,6,42,17,37,44,23,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (2,), (58,), (6,), (42,), (17,), (37,), (44,), (23,), (40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CALCULATE_VOLUME_ELLIPSOID," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CALCULATE_VOLUME_ELLIPSOID{ public static float f_gold ( float r1 , float r2 , float r3 ) { float pi = ( float ) 3.14 ; return ( float ) 1.33 * pi * r1 * r2 * r3 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(3287.4842316041018F); param0.add(-3707.427510963942F); param0.add(8980.643174783816F); param0.add(-2698.0187368852694F); param0.add(8627.156664162168F); param0.add(-7316.329924623669F); param0.add(7857.3846206400485F); param0.add(-6502.657905007728F); param0.add(4468.400513325576F); param0.add(-7231.864791620428F); List param1 = new ArrayList<>(); param1.add(4503.332888443404F); param1.add(-6671.335781753231F); param1.add(3584.781688607942F); param1.add(-1004.7289573934537F); param1.add(9572.27618966978F); param1.add(-6591.043206581106F); param1.add(3671.761679299217F); param1.add(-1412.2240121470609F); param1.add(2272.1999139470304F); param1.add(-8036.087711033032F); List param2 = new ArrayList<>(); param2.add(8590.24729914204F); param2.add(-2780.4954870801926F); param2.add(2818.469507143102F); param2.add(-9602.530725071243F); param2.add(4783.930377855004F); param2.add(-9760.465488363216F); param2.add(2534.5825334137794F); param2.add(-6135.238350044512F); param2.add(4753.075799180736F); param2.add(-6456.263512521035F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i),param2.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i),param2.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold(r1, r2, r3): return 1.33 * math.pi * r1 * r2 * r3 "," using namespace std; float f_gold ( float r1, float r2, float r3 ) { float pi = 3.14; return 1.33 * pi * r1 * r2 * r3; } int main() { int n_success = 0; vector param0 {3287.4842316041018F,-3707.427510963942F,8980.643174783816F,-2698.0187368852694F,8627.156664162168F,-7316.329924623669F,7857.3846206400485F,-6502.657905007728F,4468.400513325576F,-7231.864791620428F}; vector param1 {4503.332888443404F,-6671.335781753231F,3584.781688607942F,-1004.7289573934537F,9572.27618966978F,-6591.043206581106F,3671.761679299217F,-1412.2240121470609F,2272.1999139470304F,-8036.087711033032F}; vector param2 {8590.24729914204F,-2780.4954870801926F,2818.469507143102F,-9602.530725071243F,4783.930377855004F,-9760.465488363216F,2534.5825334137794F,-6135.238350044512F,4753.075799180736F,-6456.263512521035F}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i],param2[i])) )/ (abs(f_filled(param0[i],param1[i],param2[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (3287.4842316041018, 4503.332888443404, 8590.24729914204,), (-3707.427510963942, -6671.335781753231, -2780.4954870801926,), (8980.643174783816, 3584.781688607942, 2818.469507143102,), (-2698.0187368852694, -1004.7289573934537, -9602.530725071243,), (8627.156664162168, 9572.27618966978, 4783.930377855004,), (-7316.329924623669, -6591.043206581106, -9760.465488363216,), (7857.3846206400485, 3671.761679299217, 2534.5825334137794,), (-6502.657905007728, -1412.2240121470609, -6135.238350044512,), (4468.400513325576, 2272.1999139470304, 4753.075799180736,), (-7231.864791620428, -8036.087711033032, -6456.263512521035,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_XOR_VALUE_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_XOR_VALUE_MATRIX{ static int f_gold ( int mat [ ] [ ] , int N ) { int r_xor , c_xor ; int max_xor = 0 ; for ( int i = 0 ; i < N ; i ++ ) { r_xor = 0 ; c_xor = 0 ; for ( int j = 0 ; j < N ; j ++ ) { r_xor = r_xor ^ mat [ i ] [ j ] ; c_xor = c_xor ^ mat [ j ] [ i ] ; } if ( max_xor < Math . max ( r_xor , c_xor ) ) max_xor = Math . max ( r_xor , c_xor ) ; } return max_xor ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{2,2,3,9,9,10,12,13,17,19,26,28,28,30,30,32,32,39,40,41,42,52,52,54,54,55,56,59,62,63,69,71,72,72,72,73,77,78,80,83,83,85,87,90,90,91,93},new int[]{1,1,3,5,5,8,10,14,15,17,20,22,24,24,26,27,32,33,33,35,38,40,41,44,54,54,55,55,59,63,64,65,66,71,72,73,73,74,74,76,80,80,83,87,89,93,97},new int[]{2,2,3,3,6,9,9,10,13,15,15,17,19,22,22,22,23,24,25,27,27,29,29,35,36,37,38,41,41,52,52,54,54,61,64,65,66,70,72,73,73,74,89,89,90,97,97},new int[]{1,11,15,18,22,22,25,27,27,28,29,31,32,33,40,40,42,42,42,46,52,52,52,54,55,56,57,59,60,60,61,62,66,66,67,67,76,77,78,80,85,85,87,88,88,98,99},new int[]{1,2,3,4,6,9,10,15,15,19,20,20,28,29,34,35,36,45,47,48,54,56,57,62,64,65,66,68,69,70,75,76,77,77,77,79,79,83,87,90,90,92,95,96,96,99,99},new int[]{1,1,3,3,4,8,9,11,15,18,18,22,23,23,24,26,26,28,29,32,40,41,42,42,43,44,54,54,54,57,58,61,64,67,69,72,76,79,80,80,87,89,91,93,95,95,97},new int[]{1,1,6,11,14,14,16,17,20,20,25,28,28,30,31,31,33,35,36,37,37,40,42,43,45,45,48,49,54,55,55,60,60,62,63,65,66,72,74,80,80,82,82,84,84,93,94},new int[]{4,5,8,10,10,14,20,21,21,23,23,23,25,27,33,36,37,40,45,48,50,52,56,57,63,67,68,69,72,77,77,82,82,83,83,84,85,86,87,88,92,93,95,96,97,97,97},new int[]{1,7,7,9,13,13,18,19,21,28,28,31,37,39,41,43,44,45,48,48,49,50,51,52,58,62,63,64,64,68,70,73,74,79,80,81,85,88,90,91,93,93,94,94,95,98,98},new int[]{3,8,9,12,13,15,15,18,19,21,23,24,29,30,34,38,39,40,42,45,47,50,54,55,57,57,58,64,65,65,67,67,67,68,69,71,72,72,75,79,80,81,81,83,85,91,93},new int[]{3,3,5,5,6,11,23,24,25,27,29,31,35,35,38,40,43,44,45,46,50,54,54,55,57,57,58,62,65,69,70,70,74,78,78,78,79,79,80,84,87,90,90,92,94,98,99},new int[]{9,14,17,17,21,22,24,25,27,31,31,32,36,37,43,46,46,48,49,50,50,54,59,60,63,63,66,68,71,72,74,76,76,77,77,79,82,83,84,85,86,87,89,89,91,92,94},new int[]{2,3,8,10,10,11,16,19,19,21,21,23,27,28,34,36,40,41,46,46,46,48,52,52,52,53,60,63,64,66,67,67,71,71,72,74,77,80,83,84,86,88,88,88,89,89,89},new int[]{6,9,11,12,12,14,15,16,21,29,29,30,30,32,34,35,43,43,44,45,51,51,52,54,57,58,59,64,65,67,69,70,70,72,75,76,79,82,86,86,88,90,92,93,98,98,98},new int[]{1,2,3,8,9,13,15,16,17,17,17,19,22,25,32,36,44,44,45,46,48,54,55,58,66,68,72,72,73,74,78,79,80,80,82,89,89,89,90,91,91,93,93,97,97,98,99},new int[]{3,5,9,9,14,14,16,16,18,21,22,26,26,35,35,37,42,42,44,46,47,48,49,50,54,56,58,59,61,65,66,66,66,66,70,79,79,80,83,87,88,92,96,97,98,99,99},new int[]{4,7,9,10,10,12,16,20,22,24,26,28,33,34,34,36,37,37,39,43,45,45,46,51,52,53,54,55,55,56,56,57,59,63,65,69,70,70,70,73,74,77,82,85,92,97,98},new int[]{1,1,2,3,3,3,4,7,12,14,18,19,21,25,30,31,37,38,39,39,41,41,44,44,45,49,52,53,55,57,59,59,70,74,75,78,78,83,87,89,90,91,93,97,97,98,98},new int[]{4,6,6,9,12,15,21,22,23,26,29,30,33,40,41,41,42,43,44,46,47,50,53,56,60,61,61,62,62,62,64,66,71,75,77,77,84,85,85,85,85,89,90,90,91,97,98},new int[]{1,5,13,14,17,17,17,19,21,22,23,23,24,25,25,28,32,32,33,37,38,38,39,44,45,46,47,59,60,63,70,72,72,74,75,75,77,78,80,80,82,84,85,91,92,99,99},new int[]{4,5,9,14,17,19,21,25,25,27,29,29,30,30,32,42,42,44,44,44,45,46,51,54,57,57,61,69,69,72,73,74,75,77,78,80,81,82,89,91,91,93,96,96,97,98,99},new int[]{1,2,7,8,9,11,12,12,15,17,17,21,26,28,30,31,33,35,36,41,41,44,44,45,47,48,49,50,52,53,53,56,67,71,71,72,74,75,78,83,85,86,86,88,89,95,99},new int[]{2,4,5,13,17,18,21,22,24,26,27,28,29,31,32,34,35,36,38,38,39,41,43,43,52,52,54,62,69,70,71,71,72,73,77,77,78,81,82,82,84,86,89,91,93,94,95},new int[]{3,3,3,5,5,10,20,21,23,24,30,32,33,35,39,40,43,43,44,45,48,48,49,52,55,56,56,57,57,59,64,65,67,68,68,72,73,80,81,81,82,82,85,88,89,93,98},new int[]{3,6,6,11,12,12,13,21,21,23,25,31,31,33,36,37,41,43,44,46,50,53,56,57,57,57,58,59,62,66,71,73,74,78,78,78,79,80,89,92,92,94,96,96,97,97,97},new int[]{3,5,12,15,23,24,25,29,32,34,34,36,36,40,44,46,46,47,48,48,48,49,50,56,59,60,62,62,66,67,70,73,76,77,80,81,82,83,83,86,87,88,90,91,92,98,99},new int[]{9,11,13,19,20,21,23,26,29,29,30,35,38,38,42,43,47,50,52,53,54,55,56,57,57,58,61,62,63,65,67,69,72,72,72,76,79,82,85,86,86,87,88,89,90,90,99},new int[]{5,7,11,15,16,20,21,24,24,26,30,31,33,34,35,39,43,44,45,45,46,48,49,50,57,58,59,61,62,62,64,65,66,66,67,72,78,80,84,84,84,84,89,91,92,96,97},new int[]{2,6,7,9,10,14,14,16,21,22,24,27,30,32,32,33,35,35,37,40,43,47,55,56,59,65,67,68,68,69,70,71,73,74,75,76,78,79,79,82,86,88,90,93,94,97,99},new int[]{3,3,4,4,5,8,11,13,14,14,17,19,19,20,20,21,22,22,29,40,41,42,42,46,48,48,51,58,68,69,70,71,74,79,81,82,84,87,89,90,90,92,94,95,96,97,98},new int[]{1,1,2,2,5,6,7,7,9,11,13,16,18,25,26,27,31,32,33,35,35,35,38,39,40,55,58,58,60,61,62,63,64,68,70,72,72,74,75,76,81,82,84,90,97,97,99},new int[]{2,2,3,3,6,8,8,10,12,13,13,15,15,16,16,18,21,22,31,40,41,43,48,48,49,50,51,52,53,57,61,61,63,67,67,69,75,76,77,79,81,84,85,89,90,91,97},new int[]{5,5,6,7,9,16,18,19,19,20,22,23,23,24,25,27,27,28,32,34,34,34,37,37,38,43,52,53,54,55,59,62,63,64,65,70,74,77,78,78,79,81,83,83,88,93,97},new int[]{1,3,4,6,9,11,13,13,15,18,19,20,20,23,23,25,28,28,35,35,37,39,42,44,49,52,53,53,53,60,60,61,62,63,64,64,65,65,65,65,65,67,67,71,72,81,83},new int[]{3,5,6,8,8,14,15,20,21,22,26,26,28,29,32,35,36,37,38,42,44,49,50,51,56,57,59,62,65,67,68,68,70,73,73,75,79,84,89,90,90,91,95,97,98,99,99},new int[]{2,2,7,9,9,10,12,14,15,15,22,22,23,23,24,24,27,28,29,29,29,35,35,43,45,52,55,57,66,67,67,68,71,75,76,79,80,81,90,91,91,94,94,95,96,96,99},new int[]{1,2,2,4,11,12,12,13,17,20,22,22,25,27,29,37,41,42,43,43,45,47,53,54,54,54,55,55,59,60,63,66,66,66,81,82,82,82,84,85,85,86,93,94,94,94,96},new int[]{3,5,5,6,17,19,21,22,24,24,29,32,32,36,38,40,40,41,48,49,50,53,54,54,55,56,58,59,59,61,70,71,74,74,77,78,81,83,83,84,85,86,87,88,90,95,96},new int[]{1,2,3,4,6,9,10,12,14,15,15,15,18,22,23,23,24,25,27,32,34,35,37,38,40,41,42,43,44,46,46,49,53,54,54,55,55,55,60,78,83,86,86,87,91,93,98},new int[]{2,2,9,10,11,14,17,18,19,23,23,31,31,31,35,36,36,38,39,41,43,43,44,50,53,54,60,61,61,64,64,67,71,72,72,72,78,79,80,81,83,84,87,88,92,93,99},new int[]{3,5,7,7,12,12,12,18,19,20,20,21,24,25,26,26,28,32,36,39,39,41,53,54,54,55,59,60,62,64,64,64,64,65,67,68,79,81,87,88,96,97,97,97,98,99,99},new int[]{4,7,17,19,20,29,32,33,34,34,35,37,37,39,43,44,47,51,53,53,55,56,56,57,60,60,62,63,63,66,68,68,70,72,73,74,79,81,82,85,89,91,92,93,95,96,97},new int[]{3,3,3,6,10,13,14,14,16,17,18,18,18,19,28,31,33,34,35,44,44,45,48,51,59,59,60,62,65,66,67,70,71,73,73,73,77,78,82,86,86,88,88,89,90,93,93},new int[]{5,10,12,15,16,18,18,18,19,22,26,27,27,28,29,31,36,36,39,41,45,46,46,47,49,51,51,52,52,55,64,68,69,71,72,74,74,74,87,87,89,90,93,96,96,98,99},new int[]{3,16,17,19,19,25,25,31,32,33,35,36,39,42,42,44,45,46,59,61,62,63,64,65,65,66,67,68,68,69,70,73,75,76,76,78,86,88,88,88,89,91,93,95,98,99,99},new int[]{1,5,6,8,13,14,14,14,15,16,16,19,19,19,20,22,24,24,25,30,34,35,36,37,38,38,39,42,44,46,49,52,56,57,58,62,77,78,82,85,85,86,87,93,95,98,99},new int[]{4,4,5,5,7,11,12,12,14,20,21,25,26,26,28,30,31,33,34,36,37,43,44,45,49,51,53,56,57,59,62,62,63,63,66,66,66,72,78,79,84,85,88,92,94,97,98}}); param0.add(new int[][]{new int[]{94,-54,58,36,-2,56,-90,-44,-18,68,26,-60,60,52,-30,8,98,-80,-88,-30,-92,-34,-68,-74,-86,-4,-72,-84,24,50,-70,72,60,86,-48,38,16,42},new int[]{30,8,-64,92,-28,92,-28,-54,74,16,60,58,60,6,-30,88,66,-80,86,-70,-30,-74,42,-10,54,-36,-18,70,38,-58,50,68,22,26,24,46,56,-78},new int[]{-74,78,46,-10,50,88,82,-2,90,54,36,22,96,-50,38,86,-90,36,-6,54,-72,42,-54,98,-74,-70,0,-14,-94,20,-8,-22,-98,-90,64,14,42,-28},new int[]{-96,62,54,-98,-80,32,-92,-18,-90,88,50,-98,-24,-32,46,66,-10,34,52,24,0,82,-92,34,-40,-10,78,-20,-96,46,-56,48,-58,24,28,-34,66,-80},new int[]{-86,-24,-84,80,84,-36,56,-28,-88,36,68,20,16,-86,-24,88,-88,-28,-56,44,14,-66,90,-64,14,6,82,20,36,66,-50,52,-20,-40,-76,26,-12,-50},new int[]{-18,-78,-46,46,58,78,46,54,46,56,-80,70,42,78,-96,-76,-78,38,-8,14,28,-42,52,72,42,-96,16,96,-8,40,-42,-40,84,38,-28,-38,-34,-98},new int[]{-62,62,86,-84,-20,24,-98,46,84,20,-92,-20,-28,-38,44,12,48,34,46,-80,-38,-36,96,96,64,-72,-92,96,98,-84,4,74,14,-20,66,-14,-22,72},new int[]{16,-60,68,44,82,38,-70,86,-22,72,-10,48,52,66,74,74,-50,94,-32,-98,-76,14,-16,-98,-52,-74,10,-98,60,94,82,32,-56,-44,-84,-62,70,-90},new int[]{28,80,-60,-88,-4,68,-36,2,-28,-6,16,20,0,84,50,6,-72,-68,14,-80,-82,-26,-16,-40,22,-18,24,-90,-6,-42,-80,-54,62,-54,-66,32,-34,-24},new int[]{-60,-26,-18,80,-84,-24,-12,78,-8,22,68,62,-10,40,96,30,-38,46,-84,-84,4,-34,8,-18,-32,-68,98,6,-44,50,62,-56,20,-18,-40,-54,-56,56},new int[]{8,16,82,-82,-64,-10,-96,-56,18,24,46,86,48,36,66,84,4,18,-74,68,24,-94,68,54,44,-80,88,-48,-72,16,-90,80,-72,-82,-34,74,38,-92},new int[]{64,-88,-44,-88,2,26,-34,-82,-14,96,34,94,2,-64,38,-90,-44,62,40,-62,14,-56,4,-42,-32,62,-36,-78,58,-86,74,4,-50,-26,22,-16,58,84},new int[]{80,-2,-40,-32,-42,-58,-96,58,-54,22,34,-84,-20,84,76,98,18,-44,2,14,10,-26,92,0,32,-54,24,78,-86,48,0,24,-20,-54,32,-44,-78,-28},new int[]{56,40,66,-26,48,30,-72,60,-38,34,-40,42,-16,24,-54,-44,70,-62,-2,12,-62,78,22,56,32,12,2,-48,24,74,-42,48,62,90,74,-84,74,8},new int[]{20,-58,-40,-92,10,26,12,-66,76,96,50,-42,26,68,50,-90,86,78,-10,38,48,-62,30,40,-66,86,-74,12,-20,46,24,-98,-62,56,-40,-46,-60,30},new int[]{44,62,-48,-78,-32,90,-14,-74,98,-50,10,-54,-96,-14,-76,40,16,-44,24,-70,-84,96,62,64,56,60,30,-70,-32,14,-92,66,-94,94,24,74,-62,-54},new int[]{54,44,-8,-36,-68,-80,76,-58,-4,-64,4,96,26,-10,-28,20,-12,-62,-64,-38,-74,-24,-46,26,-88,46,-34,-2,0,-10,58,-76,-16,-50,84,-88,-94,34},new int[]{-72,80,-96,26,32,-68,-2,88,-98,10,96,2,-50,50,-2,76,-24,6,50,50,-24,-46,10,74,-70,-90,82,56,16,-24,66,80,96,90,-80,-66,48,-36},new int[]{38,22,88,14,-54,36,-86,80,2,54,34,84,-96,-84,38,26,96,-14,60,46,26,74,-8,-78,-6,-24,4,34,-80,14,62,28,-56,-62,32,-96,14,-32},new int[]{-60,80,98,54,-68,-16,-92,48,-66,-42,-94,-24,-28,-84,-78,74,34,-14,-92,78,26,-52,-78,88,-84,94,-20,-34,6,64,40,-44,-44,-88,54,-16,28,24},new int[]{-76,-26,-80,-72,76,88,36,66,12,28,64,8,-92,42,52,-14,-44,-96,20,-6,26,-64,34,0,12,16,64,-68,-86,94,-80,-22,-8,60,-32,-76,-66,44},new int[]{-46,58,-78,-62,60,-54,-34,88,76,4,32,32,-4,-76,-32,-20,90,-78,-64,44,42,38,-66,-46,36,-96,-42,58,-24,-36,-34,-64,30,40,26,-32,-42,20},new int[]{-52,-82,-76,-94,-82,-94,-46,-46,40,58,-96,86,-18,-2,-36,-74,-78,88,86,24,-6,44,-30,-96,78,-62,-64,-72,66,-28,68,96,-24,24,-98,26,26,-6},new int[]{88,90,0,38,52,-50,-94,-50,-64,-66,40,82,-64,-40,72,-50,86,92,48,-72,-12,6,42,70,-80,86,-6,-76,-64,-56,80,-14,70,-58,96,-36,84,-76},new int[]{-22,-40,4,66,-4,10,0,18,-16,-78,-18,10,52,-20,74,4,34,-80,62,-92,-58,24,-44,-52,20,6,70,90,88,40,60,42,-44,42,-18,30,-22,48},new int[]{30,86,-78,-22,52,90,-74,-68,50,-14,-78,30,84,-60,-24,40,-80,-56,40,34,42,-16,-50,-18,-78,14,40,52,-86,24,88,-62,-94,16,96,86,-56,74},new int[]{-38,42,-42,78,26,48,86,-68,2,-54,-50,2,46,-54,-46,74,48,-66,20,-32,-20,72,-36,96,98,24,-70,66,-72,-68,76,68,-82,68,60,-76,-92,42},new int[]{-12,-14,42,-96,14,52,6,-18,62,58,16,2,34,28,20,-72,-66,82,-80,-92,-12,-4,-94,30,68,64,96,-54,66,-30,-22,-60,-32,32,52,2,90,-26},new int[]{-70,78,24,-34,-20,-14,54,24,-48,48,-2,-96,92,-8,60,-4,-40,30,4,64,-32,-58,-96,-34,-24,-80,-12,38,-4,-26,-82,30,6,-96,50,-56,10,-12},new int[]{36,-42,-50,36,-60,-18,-12,28,-56,26,-64,56,44,90,66,-24,-32,10,-48,-82,-8,6,-64,-98,88,84,-8,-54,-36,-76,-60,-70,-54,-96,10,54,-76,4},new int[]{94,22,-86,-60,88,26,12,10,-96,66,-48,42,-40,-60,-70,-36,-70,-78,20,-96,-58,-46,-84,-28,64,-58,94,64,-16,74,34,22,0,-86,-64,-6,-2,26},new int[]{56,-78,-34,4,-66,4,12,-8,46,94,50,76,-82,0,32,70,70,-16,66,20,-22,84,8,88,-84,36,22,68,76,-2,62,66,-52,90,-34,-12,-12,46},new int[]{-98,-50,60,-96,44,84,4,-12,-4,-80,-12,-42,76,-62,66,-14,50,84,-48,72,88,20,72,96,90,46,90,-40,32,-90,84,-34,-92,-18,-58,18,26,-42},new int[]{-2,-22,54,68,52,-18,-42,-90,-58,-48,-66,-94,6,-56,-4,88,22,-58,-6,-80,48,-16,78,-96,-6,-66,24,-92,-40,-62,-90,-92,-66,-40,8,-32,6,-50},new int[]{94,-2,10,-30,8,-30,-84,-12,-22,-2,-26,-60,-60,22,-38,82,18,50,78,-48,0,52,-78,66,10,26,68,-48,-44,20,64,78,80,76,-44,-52,-48,18},new int[]{34,16,58,44,-46,90,-76,-78,16,80,-32,62,-54,-14,76,-22,2,36,68,28,52,-74,84,22,84,-30,-60,66,92,-86,-40,74,-60,-14,58,-52,36,78},new int[]{-84,-92,34,24,76,90,44,22,18,-84,90,62,82,-22,18,-42,12,-14,-86,-78,-24,-30,92,20,32,54,-24,26,24,-80,-84,76,44,74,56,56,40,-58},new int[]{-40,96,20,48,4,-74,72,58,62,-10,22,36,-82,4,-12,-92,2,-80,-54,50,-64,36,-40,-82,-2,-18,8,-18,-52,94,-30,66,-42,-62,-72,44,12,54}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{88,92,80,80,15,85,46,62,7,8,47,50,1,6,55,63,19,14,52,10,56,26,80,55,22,99,23,36},new int[]{38,72,34,22,11,19,4,66,32,79,66,90,70,34,45,84,88,37,81,6,46,45,94,95,55,44,75,36},new int[]{41,26,10,97,4,30,79,82,98,41,93,36,60,37,36,56,26,72,70,25,82,2,64,89,83,38,80,47},new int[]{56,31,40,37,97,27,41,60,7,75,84,5,96,49,71,63,40,21,47,2,47,1,31,63,27,12,89,41},new int[]{84,79,99,26,28,96,42,61,17,78,75,40,95,45,16,93,64,3,76,15,2,26,27,71,89,47,78,91},new int[]{25,94,20,71,77,11,76,16,98,26,53,36,83,79,23,25,55,40,82,34,3,92,34,61,70,37,95,61},new int[]{14,55,54,38,63,31,54,36,9,1,46,80,54,19,62,54,26,66,79,18,27,30,1,39,85,68,16,32},new int[]{64,96,46,25,90,24,80,45,52,11,39,89,17,83,96,89,70,30,43,41,53,74,55,19,55,35,5,75},new int[]{66,99,36,49,5,1,26,37,7,82,75,83,8,99,6,49,86,72,41,20,78,58,2,56,8,20,99,62},new int[]{74,59,71,97,95,8,71,12,90,23,74,42,6,61,58,16,98,37,8,29,84,59,96,87,2,12,37,59},new int[]{41,65,76,35,52,81,4,50,72,59,42,59,21,47,20,28,85,61,35,44,98,28,49,13,35,9,15,32},new int[]{42,78,59,33,14,7,83,6,52,69,69,68,71,10,56,67,55,67,67,71,53,10,97,65,30,53,6,62},new int[]{43,75,45,42,7,19,80,69,77,20,28,47,23,54,45,22,83,89,72,8,54,79,46,23,36,29,62,17},new int[]{80,83,73,86,10,71,53,83,28,8,54,20,9,63,27,95,18,17,20,9,45,18,85,38,23,5,45,77},new int[]{20,4,82,22,95,45,38,39,32,29,71,82,94,39,83,1,87,52,2,98,38,44,77,17,5,62,66,85},new int[]{49,82,28,41,68,56,38,17,49,92,20,88,68,51,53,20,18,61,61,15,22,62,40,16,96,81,11,48},new int[]{14,7,17,46,72,54,59,23,17,87,93,57,30,88,50,96,47,60,43,60,38,15,31,24,70,19,71,6},new int[]{35,3,6,22,21,79,81,63,9,13,93,24,37,94,66,30,17,31,30,78,26,58,50,28,94,22,59,76},new int[]{15,24,7,76,50,31,9,81,3,2,32,52,24,42,27,99,25,35,98,85,8,36,16,17,44,54,8,21},new int[]{2,62,26,20,54,50,32,5,68,90,11,7,99,16,19,75,18,22,78,71,35,72,81,32,99,97,59,32},new int[]{30,2,93,99,99,93,57,9,20,54,54,72,67,7,10,39,16,50,58,1,23,36,93,73,91,40,76,35},new int[]{26,85,67,49,9,35,41,92,61,31,54,10,90,73,29,74,23,88,18,86,42,77,74,46,43,5,75,58},new int[]{99,45,58,32,65,47,77,6,14,51,67,70,64,96,61,75,91,39,65,50,27,88,84,91,71,78,87,75},new int[]{57,46,59,33,9,79,36,94,15,81,56,58,84,46,61,92,66,32,73,90,42,86,39,45,47,79,99,92},new int[]{9,62,49,98,19,10,50,41,99,12,22,61,32,75,46,83,57,98,92,86,65,38,23,39,26,45,68,12},new int[]{86,39,13,21,41,90,64,53,81,25,76,15,18,69,9,16,51,1,70,11,90,65,46,62,7,24,98,63},new int[]{30,1,38,95,83,32,71,46,6,66,81,74,29,82,54,86,90,6,62,13,30,55,77,72,29,4,92,96},new int[]{72,71,55,66,3,83,41,61,7,75,30,85,59,18,27,94,41,15,42,99,54,93,24,70,35,71,80,55}}); param0.add(new int[][]{new int[]{-84,-66,26,44,52},new int[]{-92,2,12,30,36},new int[]{-82,-62,30,46,82},new int[]{-10,36,66,68,96},new int[]{4,14,38,64,68}}); param0.add(new int[][]{new int[]{0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,1,1,1,0,0,0},new int[]{1,1,0,0,0,0,0,1,0,1,1,1,0,0,1,0,0,0,0,1,0},new int[]{0,1,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1},new int[]{1,1,0,0,1,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1},new int[]{0,1,1,0,1,1,0,1,1,0,0,0,0,1,0,1,0,0,0,0,0},new int[]{0,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0},new int[]{0,0,0,0,1,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,0},new int[]{0,0,0,1,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,1,0},new int[]{0,1,0,0,1,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0},new int[]{0,0,0,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,1},new int[]{0,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1,0,1},new int[]{1,1,0,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,1,0,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,0,1,1,1,0,1,1,1,0,1},new int[]{0,1,0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,1,0,0,1},new int[]{0,1,1,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,1,1},new int[]{1,0,0,0,0,0,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1},new int[]{1,0,1,0,1,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,1},new int[]{1,1,0,1,0,0,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0},new int[]{1,1,0,0,0,1,0,1,1,0,1,0,0,0,1,0,0,1,0,0,1},new int[]{1,1,0,0,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,0},new int[]{0,1,0,1,1,1,1,1,1,0,0,1,0,0,1,0,1,0,1,0,1}}); param0.add(new int[][]{new int[]{2,8,11,12,12,15,17,24,26,32,38,39,41,44,45,48,52,55,56,57,59,62,63,71,72,77,81,82,83,85,89,92,92,92},new int[]{11,11,12,14,21,25,35,41,42,43,49,50,51,52,55,55,55,55,55,56,60,64,70,70,71,73,78,78,78,82,86,90,93,98},new int[]{1,2,9,9,16,19,19,20,21,23,28,29,30,35,35,42,51,53,54,58,60,64,66,70,73,74,77,79,81,88,94,95,97,97},new int[]{2,7,8,13,15,23,29,40,43,49,51,51,52,60,61,62,63,64,64,65,69,72,76,78,81,84,87,87,88,89,95,95,95,99},new int[]{3,3,7,8,9,17,17,18,18,23,23,36,40,45,47,50,52,53,54,58,60,60,75,76,77,77,83,83,87,88,88,91,93,97},new int[]{7,8,9,11,12,35,36,39,39,47,51,52,55,55,59,61,62,65,65,66,67,69,73,73,80,81,81,85,87,89,89,93,99,99},new int[]{1,2,2,4,4,7,13,16,18,21,22,23,26,27,35,37,37,41,44,45,51,51,54,56,57,59,66,71,78,78,79,82,83,95},new int[]{5,5,6,8,10,10,13,18,19,22,30,33,36,43,44,48,49,59,60,63,66,67,72,72,75,77,79,81,81,84,85,90,91,92},new int[]{7,7,15,17,19,20,20,23,25,26,33,36,38,38,44,46,48,49,59,60,63,64,68,68,74,74,76,79,79,90,91,93,96,98},new int[]{3,4,8,17,19,29,30,35,37,39,40,45,45,51,57,57,58,62,63,63,69,71,77,78,79,81,83,84,91,94,94,95,97,97},new int[]{5,10,13,13,15,20,21,26,28,35,39,40,42,44,47,48,48,49,55,56,60,61,67,75,76,78,79,82,84,84,85,87,90,91},new int[]{1,3,7,13,16,19,23,25,28,28,29,30,34,40,41,44,45,47,49,50,57,60,66,66,78,78,79,79,81,83,84,85,95,99},new int[]{8,10,14,15,15,15,16,19,21,21,21,22,26,29,30,31,44,44,47,58,62,63,68,76,78,78,81,84,86,90,90,91,96,98},new int[]{2,4,10,14,15,15,28,31,33,36,36,42,44,46,49,49,50,51,55,57,57,60,62,65,69,72,81,82,86,89,91,95,97,97},new int[]{1,2,6,7,16,24,24,24,28,30,41,46,47,47,49,49,50,60,61,64,66,66,67,70,70,74,75,78,80,81,83,90,91,97},new int[]{3,10,16,18,22,22,22,24,33,34,39,40,46,47,49,51,52,59,60,61,62,62,64,65,68,72,73,79,80,84,86,87,92,95},new int[]{9,11,12,16,22,25,25,29,32,34,39,39,39,39,41,42,48,49,52,55,58,62,69,69,76,82,82,84,86,87,90,91,92,97},new int[]{2,4,6,8,8,9,15,17,20,20,22,26,27,29,29,32,32,34,35,36,37,38,40,40,52,56,64,64,70,71,73,88,88,94},new int[]{1,7,11,12,12,13,14,15,20,25,29,32,34,38,41,43,50,57,59,64,65,69,71,72,74,77,78,82,84,85,91,91,92,96},new int[]{2,2,4,6,11,14,17,20,21,21,29,30,31,32,34,39,40,40,48,50,50,55,57,64,66,72,74,79,79,84,86,88,93,99},new int[]{1,2,2,10,16,25,26,26,29,29,31,33,34,36,41,42,44,47,53,53,54,59,61,62,70,72,73,75,78,79,82,84,87,99},new int[]{9,9,11,13,20,23,25,30,31,37,37,39,42,43,45,48,50,55,56,58,65,66,72,75,82,82,88,88,89,91,91,93,94,96},new int[]{1,5,5,8,9,13,15,17,18,21,21,24,25,27,34,43,44,45,46,50,54,55,60,67,68,71,76,78,81,82,84,87,97,99},new int[]{1,3,3,5,14,23,23,25,28,29,32,36,40,41,43,49,50,53,53,53,54,64,72,76,78,80,81,81,87,87,87,91,93,94},new int[]{2,10,10,12,13,15,15,16,17,21,23,27,28,32,37,37,41,43,45,46,48,51,52,56,57,69,70,74,78,80,83,86,89,95},new int[]{4,4,7,7,8,10,11,14,14,17,19,26,30,36,40,51,60,62,68,69,71,73,74,80,80,82,84,85,86,86,86,88,92,97},new int[]{2,3,6,8,10,11,11,13,16,18,19,21,23,23,26,27,28,35,37,37,42,50,53,54,55,58,61,68,73,81,85,86,97,99},new int[]{6,7,14,17,19,20,21,22,23,24,26,30,32,36,37,38,39,42,45,57,61,66,67,67,69,81,84,84,85,90,94,95,97,99},new int[]{1,2,9,10,12,13,13,13,14,15,16,16,16,17,21,27,27,33,35,35,36,41,44,46,46,47,48,51,61,66,73,76,93,95},new int[]{1,6,8,14,14,19,22,25,30,36,40,45,52,61,63,67,68,70,70,73,73,75,75,77,79,81,85,86,89,90,93,94,96,97},new int[]{12,14,18,22,24,25,26,26,27,29,32,34,38,38,40,54,55,56,58,60,70,74,76,77,78,78,81,83,84,84,86,91,95,98},new int[]{2,4,9,17,23,24,33,36,36,37,37,39,43,43,44,51,52,56,58,59,60,64,65,68,68,69,77,78,78,79,88,94,98,99},new int[]{2,2,5,5,6,13,17,19,19,23,33,36,45,45,46,51,53,62,66,69,74,77,77,78,78,79,81,86,87,93,94,96,96,99},new int[]{2,5,5,6,7,10,11,15,16,29,30,31,31,36,37,41,41,48,49,49,52,53,55,56,60,61,63,81,84,92,95,97,98,99}}); param0.add(new int[][]{new int[]{-12,46,-32,-10,74,98,-60,-54,8,90,78,84,-42,-36,-4,-72},new int[]{-10,-52,-22,84,-28,-90,-82,88,4,76,22,26,-38,6,94,10},new int[]{52,0,52,-34,-52,-40,30,62,64,-66,-22,-34,46,-86,82,58},new int[]{-38,-36,-84,72,-88,42,66,-60,-4,86,-42,30,36,-98,-44,58},new int[]{-34,16,-36,80,26,60,94,48,16,-10,4,68,-20,-76,84,-76},new int[]{-22,86,-98,-82,78,82,48,26,0,-30,54,-92,64,68,78,50},new int[]{-58,66,-14,-42,-38,-86,-70,-14,-54,44,82,54,-92,-58,-64,32},new int[]{18,50,6,-22,36,12,12,20,-6,-68,82,38,-8,-4,-22,16},new int[]{-16,90,-94,-62,26,32,-70,26,-8,-90,64,-80,42,-10,-22,82},new int[]{-94,54,28,38,86,-50,-96,10,48,16,46,4,-78,-54,4,-28},new int[]{64,56,0,-58,-22,62,96,-20,0,-26,16,-90,-84,8,80,60},new int[]{38,98,-18,-74,-24,-94,34,-68,-68,72,-74,60,62,76,86,86},new int[]{-58,-40,-70,90,94,-66,-52,54,-46,-80,32,-40,-20,50,48,-96},new int[]{74,2,-22,-28,42,-44,-58,36,-60,26,-86,-74,26,-96,-14,-60},new int[]{-90,8,-72,52,-94,22,90,-42,-22,-68,-86,-10,-12,-60,12,42},new int[]{26,-18,-68,-30,18,68,98,76,-2,28,4,-16,-92,82,-94,-58}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{39,26,40,73,91,43,76,46,5,71,28,22,71,56,55,25,59,76,19,83,62,32,63,92,44,70,86,77,33,66,58,84,91,32,47,71,71,32,62,62,60,17,12,38,15},new int[]{2,23,60,30,49,2,6,37,52,78,18,59,66,91,78,84,96,74,10,49,95,52,40,92,47,71,31,16,59,44,28,34,40,89,30,84,40,58,51,59,20,45,86,19,48},new int[]{49,19,56,96,95,28,79,26,61,56,51,1,51,55,48,30,12,75,74,3,80,56,57,69,99,60,2,44,82,34,39,91,70,27,55,59,19,78,86,16,15,72,55,36,74},new int[]{59,23,88,66,35,26,35,21,28,1,94,53,11,98,75,20,73,36,97,71,59,53,98,41,48,29,33,83,79,44,60,47,50,16,70,95,34,52,18,58,45,94,15,79,10},new int[]{19,63,40,53,26,74,28,90,96,56,72,39,39,48,42,32,46,88,2,75,9,5,92,91,89,1,83,23,51,12,92,84,10,20,3,90,34,49,74,43,55,15,76,45,58},new int[]{59,70,73,46,39,54,85,4,75,95,12,61,88,43,91,75,4,89,41,73,30,37,4,75,63,41,68,7,93,67,84,54,43,7,97,17,93,95,96,41,64,46,31,72,24},new int[]{78,44,67,42,78,24,45,68,31,27,87,33,78,49,64,5,89,31,84,42,86,54,10,75,9,59,8,93,26,16,62,73,20,14,70,83,50,92,77,37,55,45,84,55,94},new int[]{59,6,36,64,29,50,28,15,62,47,88,9,97,95,29,46,75,15,9,91,59,29,99,73,47,25,15,52,47,57,40,28,43,10,70,1,53,75,4,28,88,2,9,35,15},new int[]{99,46,92,14,32,99,15,98,93,23,6,91,91,44,46,42,83,51,20,67,71,5,46,20,19,4,43,34,80,13,79,20,31,25,86,79,75,10,24,6,29,81,95,4,74},new int[]{85,36,57,3,80,45,55,61,94,78,88,54,78,97,13,95,89,36,33,40,4,96,96,92,87,29,66,24,77,45,70,68,41,21,39,29,61,1,37,35,22,55,54,35,13},new int[]{71,74,47,93,6,28,71,60,50,42,61,21,21,34,84,41,76,80,7,10,64,67,32,97,14,21,52,29,17,81,62,54,5,38,96,73,54,91,41,93,64,96,46,49,86},new int[]{21,24,84,19,40,76,69,35,35,51,80,8,38,32,49,60,33,72,42,43,49,6,80,66,2,33,94,76,63,24,62,8,5,3,99,14,91,65,30,53,24,43,3,34,77},new int[]{51,67,30,31,26,99,6,3,20,79,62,91,52,58,79,62,94,87,56,28,34,80,15,46,22,71,79,43,75,8,37,72,20,50,19,50,40,6,79,65,85,42,26,76,62},new int[]{48,79,73,90,73,30,24,63,83,63,63,73,24,46,10,22,80,66,17,8,74,30,91,26,79,91,64,2,99,83,95,92,17,94,8,78,20,81,57,8,32,43,33,23,95},new int[]{83,50,26,17,2,83,40,27,8,66,67,32,74,69,85,40,68,96,38,51,24,13,42,7,7,13,60,39,29,77,25,25,15,74,78,79,81,7,34,57,70,62,69,27,54},new int[]{8,23,46,4,66,64,1,3,96,51,35,2,87,25,11,77,22,54,70,86,13,90,17,93,90,42,16,23,98,93,22,55,83,72,22,27,38,13,10,48,20,14,46,64,49},new int[]{17,29,84,52,93,37,65,52,45,75,33,40,4,20,97,3,12,5,39,62,27,53,15,33,8,53,10,51,7,89,44,5,37,63,54,82,30,3,69,44,54,72,20,90,35},new int[]{64,35,94,43,89,22,2,40,14,35,68,31,70,76,65,43,73,4,37,44,47,44,14,6,73,37,43,62,59,22,49,16,9,38,23,8,13,85,63,23,8,86,68,5,50},new int[]{52,84,70,22,1,77,26,94,15,98,98,27,12,11,4,44,41,12,20,91,51,21,49,98,54,18,96,98,79,41,71,60,31,12,52,2,38,53,31,35,79,52,25,11,19},new int[]{71,95,41,70,27,50,29,92,85,79,71,27,57,81,1,56,20,76,60,77,85,96,1,91,82,42,13,98,11,57,70,70,49,90,43,21,3,93,39,52,61,12,27,76,37},new int[]{3,92,53,3,98,58,86,13,84,76,6,19,56,57,4,29,88,32,79,85,83,84,61,69,5,3,9,38,50,91,67,36,20,99,88,12,32,37,89,87,99,2,8,83,6},new int[]{25,8,35,86,87,46,46,32,5,71,17,24,85,18,8,75,54,5,7,80,47,72,21,8,47,90,95,33,26,57,92,31,68,23,99,56,72,13,13,74,46,96,41,20,12},new int[]{30,58,25,85,64,76,3,36,75,35,32,46,15,40,83,66,70,76,86,76,91,57,7,23,86,56,66,18,20,13,65,89,31,59,69,35,84,21,37,38,27,24,72,51,94},new int[]{27,78,77,96,11,64,59,90,65,48,3,16,6,14,54,62,55,37,63,74,60,84,44,52,73,16,3,29,24,92,62,33,58,87,95,45,51,73,76,53,8,22,23,79,87},new int[]{78,23,44,87,17,92,17,79,28,92,81,11,13,73,65,36,61,84,69,68,53,24,55,34,13,52,99,85,80,26,64,21,89,17,60,63,74,82,93,74,23,29,39,88,50},new int[]{38,97,29,93,79,32,26,51,69,96,54,68,93,25,30,41,90,62,44,16,11,92,78,66,57,61,96,60,76,76,80,75,80,16,56,8,55,1,78,51,93,46,68,93,19},new int[]{36,75,27,46,86,65,85,21,50,25,90,63,79,53,93,91,25,6,18,25,70,51,1,70,32,42,20,61,24,1,47,72,19,93,69,53,51,88,64,85,21,24,15,15,95},new int[]{73,39,37,1,99,28,65,5,25,4,5,65,59,23,29,94,38,51,3,10,52,21,27,39,36,28,11,55,33,96,57,98,43,57,28,11,40,2,61,98,83,29,54,28,68},new int[]{3,72,48,70,60,49,17,84,28,58,59,34,29,6,95,72,94,11,62,2,58,48,90,72,8,25,71,96,95,80,19,9,71,31,24,48,90,20,5,18,16,48,91,81,25},new int[]{44,32,83,67,57,16,58,21,86,75,2,98,60,7,98,39,84,26,80,63,99,44,49,61,87,74,55,76,16,55,20,26,1,16,85,11,9,40,33,91,46,12,75,5,23},new int[]{88,39,4,51,44,68,29,32,7,76,58,14,18,84,27,13,82,31,5,58,85,1,36,48,82,7,41,61,33,47,58,22,79,52,68,85,72,85,89,88,48,54,46,10,54},new int[]{41,29,62,36,30,50,26,40,93,67,11,71,27,50,28,48,2,77,7,57,4,48,34,25,92,60,77,91,10,21,54,45,34,40,61,34,59,2,42,27,94,60,2,43,80},new int[]{99,59,22,54,48,21,43,7,37,54,64,76,63,9,90,78,35,85,50,75,93,99,70,64,6,51,47,12,77,74,74,35,89,4,35,98,50,55,16,45,66,14,79,61,44},new int[]{99,30,17,32,7,36,35,67,36,29,63,37,38,81,65,53,47,78,9,42,55,80,3,76,74,42,13,96,96,86,51,29,64,89,76,32,45,88,75,92,66,78,65,28,98},new int[]{67,50,7,71,69,58,47,42,38,18,46,33,22,45,94,61,4,31,95,2,54,27,41,62,85,74,57,8,81,69,45,22,23,17,84,27,60,76,17,34,88,97,43,87,59},new int[]{85,63,26,68,84,42,60,45,40,59,34,16,52,66,71,17,95,97,51,30,17,51,34,58,44,34,23,85,66,54,5,25,2,92,53,35,86,8,35,16,28,24,33,70,16},new int[]{30,59,3,45,83,8,14,77,74,62,38,37,24,99,60,88,75,27,50,35,53,98,61,75,2,8,92,7,67,2,57,33,82,93,68,99,93,68,55,42,46,74,40,10,94},new int[]{74,89,17,23,15,32,46,72,6,56,87,17,44,16,48,44,51,19,24,63,29,96,84,48,20,80,62,23,79,38,9,59,6,71,4,30,86,55,96,36,48,9,16,5,71},new int[]{22,92,75,89,15,48,46,68,49,37,34,99,49,61,67,41,55,25,36,34,56,61,95,19,65,92,64,73,19,19,36,77,55,53,16,86,78,1,25,70,93,42,8,62,23},new int[]{73,80,12,36,95,32,96,49,95,17,24,61,46,4,6,82,72,92,46,41,44,26,71,72,95,44,12,91,24,4,32,58,19,87,92,99,89,51,76,46,95,36,53,52,59},new int[]{27,44,28,74,94,34,33,38,66,72,28,91,66,51,78,91,88,69,70,45,77,88,16,51,75,56,8,35,44,81,62,22,17,35,81,98,17,23,15,10,94,49,8,83,47},new int[]{70,18,9,35,22,18,59,53,7,41,61,5,47,78,33,83,16,86,91,94,81,24,54,21,34,68,15,38,82,71,37,47,71,24,4,18,23,18,40,9,16,35,83,77,9},new int[]{62,93,71,2,18,86,47,47,59,60,48,28,97,33,3,42,68,33,48,56,67,13,46,88,47,95,73,16,3,86,67,52,60,93,28,95,25,70,56,63,59,93,30,13,27},new int[]{86,69,35,18,3,49,58,20,86,94,15,7,19,49,15,31,33,91,58,17,14,63,97,88,72,54,50,26,36,97,83,25,74,77,93,24,42,84,32,64,43,18,40,68,13},new int[]{78,6,57,14,90,43,23,31,16,6,66,27,67,19,9,73,78,78,34,36,58,70,27,34,69,45,50,84,90,18,71,64,62,88,61,94,2,31,34,70,28,16,74,16,87}}); List param1 = new ArrayList<>(); param1.add(42); param1.add(23); param1.add(13); param1.add(21); param1.add(4); param1.add(14); param1.add(31); param1.add(9); param1.add(27); param1.add(41); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(mat, N): max_xor = 0 for i in range(N): r_xor = 0 c_xor = 0 for j in range(N): r_xor = r_xor ^ mat[i][j] c_xor = c_xor ^ mat[j][i] if (max_xor < max(r_xor, c_xor)): max_xor = max(r_xor, c_xor) return max_xor ",,," if __name__ == '__main__': param = [ ([[2, 2, 3, 9, 9, 10, 12, 13, 17, 19, 26, 28, 28, 30, 30, 32, 32, 39, 40, 41, 42, 52, 52, 54, 54, 55, 56, 59, 62, 63, 69, 71, 72, 72, 72, 73, 77, 78, 80, 83, 83, 85, 87, 90, 90, 91, 93], [1, 1, 3, 5, 5, 8, 10, 14, 15, 17, 20, 22, 24, 24, 26, 27, 32, 33, 33, 35, 38, 40, 41, 44, 54, 54, 55, 55, 59, 63, 64, 65, 66, 71, 72, 73, 73, 74, 74, 76, 80, 80, 83, 87, 89, 93, 97], [2, 2, 3, 3, 6, 9, 9, 10, 13, 15, 15, 17, 19, 22, 22, 22, 23, 24, 25, 27, 27, 29, 29, 35, 36, 37, 38, 41, 41, 52, 52, 54, 54, 61, 64, 65, 66, 70, 72, 73, 73, 74, 89, 89, 90, 97, 97], [1, 11, 15, 18, 22, 22, 25, 27, 27, 28, 29, 31, 32, 33, 40, 40, 42, 42, 42, 46, 52, 52, 52, 54, 55, 56, 57, 59, 60, 60, 61, 62, 66, 66, 67, 67, 76, 77, 78, 80, 85, 85, 87, 88, 88, 98, 99], [1, 2, 3, 4, 6, 9, 10, 15, 15, 19, 20, 20, 28, 29, 34, 35, 36, 45, 47, 48, 54, 56, 57, 62, 64, 65, 66, 68, 69, 70, 75, 76, 77, 77, 77, 79, 79, 83, 87, 90, 90, 92, 95, 96, 96, 99, 99], [1, 1, 3, 3, 4, 8, 9, 11, 15, 18, 18, 22, 23, 23, 24, 26, 26, 28, 29, 32, 40, 41, 42, 42, 43, 44, 54, 54, 54, 57, 58, 61, 64, 67, 69, 72, 76, 79, 80, 80, 87, 89, 91, 93, 95, 95, 97], [1, 1, 6, 11, 14, 14, 16, 17, 20, 20, 25, 28, 28, 30, 31, 31, 33, 35, 36, 37, 37, 40, 42, 43, 45, 45, 48, 49, 54, 55, 55, 60, 60, 62, 63, 65, 66, 72, 74, 80, 80, 82, 82, 84, 84, 93, 94], [4, 5, 8, 10, 10, 14, 20, 21, 21, 23, 23, 23, 25, 27, 33, 36, 37, 40, 45, 48, 50, 52, 56, 57, 63, 67, 68, 69, 72, 77, 77, 82, 82, 83, 83, 84, 85, 86, 87, 88, 92, 93, 95, 96, 97, 97, 97], [1, 7, 7, 9, 13, 13, 18, 19, 21, 28, 28, 31, 37, 39, 41, 43, 44, 45, 48, 48, 49, 50, 51, 52, 58, 62, 63, 64, 64, 68, 70, 73, 74, 79, 80, 81, 85, 88, 90, 91, 93, 93, 94, 94, 95, 98, 98], [3, 8, 9, 12, 13, 15, 15, 18, 19, 21, 23, 24, 29, 30, 34, 38, 39, 40, 42, 45, 47, 50, 54, 55, 57, 57, 58, 64, 65, 65, 67, 67, 67, 68, 69, 71, 72, 72, 75, 79, 80, 81, 81, 83, 85, 91, 93], [3, 3, 5, 5, 6, 11, 23, 24, 25, 27, 29, 31, 35, 35, 38, 40, 43, 44, 45, 46, 50, 54, 54, 55, 57, 57, 58, 62, 65, 69, 70, 70, 74, 78, 78, 78, 79, 79, 80, 84, 87, 90, 90, 92, 94, 98, 99], [9, 14, 17, 17, 21, 22, 24, 25, 27, 31, 31, 32, 36, 37, 43, 46, 46, 48, 49, 50, 50, 54, 59, 60, 63, 63, 66, 68, 71, 72, 74, 76, 76, 77, 77, 79, 82, 83, 84, 85, 86, 87, 89, 89, 91, 92, 94], [2, 3, 8, 10, 10, 11, 16, 19, 19, 21, 21, 23, 27, 28, 34, 36, 40, 41, 46, 46, 46, 48, 52, 52, 52, 53, 60, 63, 64, 66, 67, 67, 71, 71, 72, 74, 77, 80, 83, 84, 86, 88, 88, 88, 89, 89, 89], [6, 9, 11, 12, 12, 14, 15, 16, 21, 29, 29, 30, 30, 32, 34, 35, 43, 43, 44, 45, 51, 51, 52, 54, 57, 58, 59, 64, 65, 67, 69, 70, 70, 72, 75, 76, 79, 82, 86, 86, 88, 90, 92, 93, 98, 98, 98], [1, 2, 3, 8, 9, 13, 15, 16, 17, 17, 17, 19, 22, 25, 32, 36, 44, 44, 45, 46, 48, 54, 55, 58, 66, 68, 72, 72, 73, 74, 78, 79, 80, 80, 82, 89, 89, 89, 90, 91, 91, 93, 93, 97, 97, 98, 99], [3, 5, 9, 9, 14, 14, 16, 16, 18, 21, 22, 26, 26, 35, 35, 37, 42, 42, 44, 46, 47, 48, 49, 50, 54, 56, 58, 59, 61, 65, 66, 66, 66, 66, 70, 79, 79, 80, 83, 87, 88, 92, 96, 97, 98, 99, 99], [4, 7, 9, 10, 10, 12, 16, 20, 22, 24, 26, 28, 33, 34, 34, 36, 37, 37, 39, 43, 45, 45, 46, 51, 52, 53, 54, 55, 55, 56, 56, 57, 59, 63, 65, 69, 70, 70, 70, 73, 74, 77, 82, 85, 92, 97, 98], [1, 1, 2, 3, 3, 3, 4, 7, 12, 14, 18, 19, 21, 25, 30, 31, 37, 38, 39, 39, 41, 41, 44, 44, 45, 49, 52, 53, 55, 57, 59, 59, 70, 74, 75, 78, 78, 83, 87, 89, 90, 91, 93, 97, 97, 98, 98], [4, 6, 6, 9, 12, 15, 21, 22, 23, 26, 29, 30, 33, 40, 41, 41, 42, 43, 44, 46, 47, 50, 53, 56, 60, 61, 61, 62, 62, 62, 64, 66, 71, 75, 77, 77, 84, 85, 85, 85, 85, 89, 90, 90, 91, 97, 98], [1, 5, 13, 14, 17, 17, 17, 19, 21, 22, 23, 23, 24, 25, 25, 28, 32, 32, 33, 37, 38, 38, 39, 44, 45, 46, 47, 59, 60, 63, 70, 72, 72, 74, 75, 75, 77, 78, 80, 80, 82, 84, 85, 91, 92, 99, 99], [4, 5, 9, 14, 17, 19, 21, 25, 25, 27, 29, 29, 30, 30, 32, 42, 42, 44, 44, 44, 45, 46, 51, 54, 57, 57, 61, 69, 69, 72, 73, 74, 75, 77, 78, 80, 81, 82, 89, 91, 91, 93, 96, 96, 97, 98, 99], [1, 2, 7, 8, 9, 11, 12, 12, 15, 17, 17, 21, 26, 28, 30, 31, 33, 35, 36, 41, 41, 44, 44, 45, 47, 48, 49, 50, 52, 53, 53, 56, 67, 71, 71, 72, 74, 75, 78, 83, 85, 86, 86, 88, 89, 95, 99], [2, 4, 5, 13, 17, 18, 21, 22, 24, 26, 27, 28, 29, 31, 32, 34, 35, 36, 38, 38, 39, 41, 43, 43, 52, 52, 54, 62, 69, 70, 71, 71, 72, 73, 77, 77, 78, 81, 82, 82, 84, 86, 89, 91, 93, 94, 95], [3, 3, 3, 5, 5, 10, 20, 21, 23, 24, 30, 32, 33, 35, 39, 40, 43, 43, 44, 45, 48, 48, 49, 52, 55, 56, 56, 57, 57, 59, 64, 65, 67, 68, 68, 72, 73, 80, 81, 81, 82, 82, 85, 88, 89, 93, 98], [3, 6, 6, 11, 12, 12, 13, 21, 21, 23, 25, 31, 31, 33, 36, 37, 41, 43, 44, 46, 50, 53, 56, 57, 57, 57, 58, 59, 62, 66, 71, 73, 74, 78, 78, 78, 79, 80, 89, 92, 92, 94, 96, 96, 97, 97, 97], [3, 5, 12, 15, 23, 24, 25, 29, 32, 34, 34, 36, 36, 40, 44, 46, 46, 47, 48, 48, 48, 49, 50, 56, 59, 60, 62, 62, 66, 67, 70, 73, 76, 77, 80, 81, 82, 83, 83, 86, 87, 88, 90, 91, 92, 98, 99], [9, 11, 13, 19, 20, 21, 23, 26, 29, 29, 30, 35, 38, 38, 42, 43, 47, 50, 52, 53, 54, 55, 56, 57, 57, 58, 61, 62, 63, 65, 67, 69, 72, 72, 72, 76, 79, 82, 85, 86, 86, 87, 88, 89, 90, 90, 99], [5, 7, 11, 15, 16, 20, 21, 24, 24, 26, 30, 31, 33, 34, 35, 39, 43, 44, 45, 45, 46, 48, 49, 50, 57, 58, 59, 61, 62, 62, 64, 65, 66, 66, 67, 72, 78, 80, 84, 84, 84, 84, 89, 91, 92, 96, 97], [2, 6, 7, 9, 10, 14, 14, 16, 21, 22, 24, 27, 30, 32, 32, 33, 35, 35, 37, 40, 43, 47, 55, 56, 59, 65, 67, 68, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 79, 82, 86, 88, 90, 93, 94, 97, 99], [3, 3, 4, 4, 5, 8, 11, 13, 14, 14, 17, 19, 19, 20, 20, 21, 22, 22, 29, 40, 41, 42, 42, 46, 48, 48, 51, 58, 68, 69, 70, 71, 74, 79, 81, 82, 84, 87, 89, 90, 90, 92, 94, 95, 96, 97, 98], [1, 1, 2, 2, 5, 6, 7, 7, 9, 11, 13, 16, 18, 25, 26, 27, 31, 32, 33, 35, 35, 35, 38, 39, 40, 55, 58, 58, 60, 61, 62, 63, 64, 68, 70, 72, 72, 74, 75, 76, 81, 82, 84, 90, 97, 97, 99], [2, 2, 3, 3, 6, 8, 8, 10, 12, 13, 13, 15, 15, 16, 16, 18, 21, 22, 31, 40, 41, 43, 48, 48, 49, 50, 51, 52, 53, 57, 61, 61, 63, 67, 67, 69, 75, 76, 77, 79, 81, 84, 85, 89, 90, 91, 97], [5, 5, 6, 7, 9, 16, 18, 19, 19, 20, 22, 23, 23, 24, 25, 27, 27, 28, 32, 34, 34, 34, 37, 37, 38, 43, 52, 53, 54, 55, 59, 62, 63, 64, 65, 70, 74, 77, 78, 78, 79, 81, 83, 83, 88, 93, 97], [1, 3, 4, 6, 9, 11, 13, 13, 15, 18, 19, 20, 20, 23, 23, 25, 28, 28, 35, 35, 37, 39, 42, 44, 49, 52, 53, 53, 53, 60, 60, 61, 62, 63, 64, 64, 65, 65, 65, 65, 65, 67, 67, 71, 72, 81, 83], [3, 5, 6, 8, 8, 14, 15, 20, 21, 22, 26, 26, 28, 29, 32, 35, 36, 37, 38, 42, 44, 49, 50, 51, 56, 57, 59, 62, 65, 67, 68, 68, 70, 73, 73, 75, 79, 84, 89, 90, 90, 91, 95, 97, 98, 99, 99], [2, 2, 7, 9, 9, 10, 12, 14, 15, 15, 22, 22, 23, 23, 24, 24, 27, 28, 29, 29, 29, 35, 35, 43, 45, 52, 55, 57, 66, 67, 67, 68, 71, 75, 76, 79, 80, 81, 90, 91, 91, 94, 94, 95, 96, 96, 99], [1, 2, 2, 4, 11, 12, 12, 13, 17, 20, 22, 22, 25, 27, 29, 37, 41, 42, 43, 43, 45, 47, 53, 54, 54, 54, 55, 55, 59, 60, 63, 66, 66, 66, 81, 82, 82, 82, 84, 85, 85, 86, 93, 94, 94, 94, 96], [3, 5, 5, 6, 17, 19, 21, 22, 24, 24, 29, 32, 32, 36, 38, 40, 40, 41, 48, 49, 50, 53, 54, 54, 55, 56, 58, 59, 59, 61, 70, 71, 74, 74, 77, 78, 81, 83, 83, 84, 85, 86, 87, 88, 90, 95, 96], [1, 2, 3, 4, 6, 9, 10, 12, 14, 15, 15, 15, 18, 22, 23, 23, 24, 25, 27, 32, 34, 35, 37, 38, 40, 41, 42, 43, 44, 46, 46, 49, 53, 54, 54, 55, 55, 55, 60, 78, 83, 86, 86, 87, 91, 93, 98], [2, 2, 9, 10, 11, 14, 17, 18, 19, 23, 23, 31, 31, 31, 35, 36, 36, 38, 39, 41, 43, 43, 44, 50, 53, 54, 60, 61, 61, 64, 64, 67, 71, 72, 72, 72, 78, 79, 80, 81, 83, 84, 87, 88, 92, 93, 99], [3, 5, 7, 7, 12, 12, 12, 18, 19, 20, 20, 21, 24, 25, 26, 26, 28, 32, 36, 39, 39, 41, 53, 54, 54, 55, 59, 60, 62, 64, 64, 64, 64, 65, 67, 68, 79, 81, 87, 88, 96, 97, 97, 97, 98, 99, 99], [4, 7, 17, 19, 20, 29, 32, 33, 34, 34, 35, 37, 37, 39, 43, 44, 47, 51, 53, 53, 55, 56, 56, 57, 60, 60, 62, 63, 63, 66, 68, 68, 70, 72, 73, 74, 79, 81, 82, 85, 89, 91, 92, 93, 95, 96, 97], [3, 3, 3, 6, 10, 13, 14, 14, 16, 17, 18, 18, 18, 19, 28, 31, 33, 34, 35, 44, 44, 45, 48, 51, 59, 59, 60, 62, 65, 66, 67, 70, 71, 73, 73, 73, 77, 78, 82, 86, 86, 88, 88, 89, 90, 93, 93], [5, 10, 12, 15, 16, 18, 18, 18, 19, 22, 26, 27, 27, 28, 29, 31, 36, 36, 39, 41, 45, 46, 46, 47, 49, 51, 51, 52, 52, 55, 64, 68, 69, 71, 72, 74, 74, 74, 87, 87, 89, 90, 93, 96, 96, 98, 99], [3, 16, 17, 19, 19, 25, 25, 31, 32, 33, 35, 36, 39, 42, 42, 44, 45, 46, 59, 61, 62, 63, 64, 65, 65, 66, 67, 68, 68, 69, 70, 73, 75, 76, 76, 78, 86, 88, 88, 88, 89, 91, 93, 95, 98, 99, 99], [1, 5, 6, 8, 13, 14, 14, 14, 15, 16, 16, 19, 19, 19, 20, 22, 24, 24, 25, 30, 34, 35, 36, 37, 38, 38, 39, 42, 44, 46, 49, 52, 56, 57, 58, 62, 77, 78, 82, 85, 85, 86, 87, 93, 95, 98, 99], [4, 4, 5, 5, 7, 11, 12, 12, 14, 20, 21, 25, 26, 26, 28, 30, 31, 33, 34, 36, 37, 43, 44, 45, 49, 51, 53, 56, 57, 59, 62, 62, 63, 63, 66, 66, 66, 72, 78, 79, 84, 85, 88, 92, 94, 97, 98]], 42,), ([[94, -54, 58, 36, -2, 56, -90, -44, -18, 68, 26, -60, 60, 52, -30, 8, 98, -80, -88, -30, -92, -34, -68, -74, -86, -4, -72, -84, 24, 50, -70, 72, 60, 86, -48, 38, 16, 42], [30, 8, -64, 92, -28, 92, -28, -54, 74, 16, 60, 58, 60, 6, -30, 88, 66, -80, 86, -70, -30, -74, 42, -10, 54, -36, -18, 70, 38, -58, 50, 68, 22, 26, 24, 46, 56, -78], [-74, 78, 46, -10, 50, 88, 82, -2, 90, 54, 36, 22, 96, -50, 38, 86, -90, 36, -6, 54, -72, 42, -54, 98, -74, -70, 0, -14, -94, 20, -8, -22, -98, -90, 64, 14, 42, -28], [-96, 62, 54, -98, -80, 32, -92, -18, -90, 88, 50, -98, -24, -32, 46, 66, -10, 34, 52, 24, 0, 82, -92, 34, -40, -10, 78, -20, -96, 46, -56, 48, -58, 24, 28, -34, 66, -80], [-86, -24, -84, 80, 84, -36, 56, -28, -88, 36, 68, 20, 16, -86, -24, 88, -88, -28, -56, 44, 14, -66, 90, -64, 14, 6, 82, 20, 36, 66, -50, 52, -20, -40, -76, 26, -12, -50], [-18, -78, -46, 46, 58, 78, 46, 54, 46, 56, -80, 70, 42, 78, -96, -76, -78, 38, -8, 14, 28, -42, 52, 72, 42, -96, 16, 96, -8, 40, -42, -40, 84, 38, -28, -38, -34, -98], [-62, 62, 86, -84, -20, 24, -98, 46, 84, 20, -92, -20, -28, -38, 44, 12, 48, 34, 46, -80, -38, -36, 96, 96, 64, -72, -92, 96, 98, -84, 4, 74, 14, -20, 66, -14, -22, 72], [16, -60, 68, 44, 82, 38, -70, 86, -22, 72, -10, 48, 52, 66, 74, 74, -50, 94, -32, -98, -76, 14, -16, -98, -52, -74, 10, -98, 60, 94, 82, 32, -56, -44, -84, -62, 70, -90], [28, 80, -60, -88, -4, 68, -36, 2, -28, -6, 16, 20, 0, 84, 50, 6, -72, -68, 14, -80, -82, -26, -16, -40, 22, -18, 24, -90, -6, -42, -80, -54, 62, -54, -66, 32, -34, -24], [-60, -26, -18, 80, -84, -24, -12, 78, -8, 22, 68, 62, -10, 40, 96, 30, -38, 46, -84, -84, 4, -34, 8, -18, -32, -68, 98, 6, -44, 50, 62, -56, 20, -18, -40, -54, -56, 56], [8, 16, 82, -82, -64, -10, -96, -56, 18, 24, 46, 86, 48, 36, 66, 84, 4, 18, -74, 68, 24, -94, 68, 54, 44, -80, 88, -48, -72, 16, -90, 80, -72, -82, -34, 74, 38, -92], [64, -88, -44, -88, 2, 26, -34, -82, -14, 96, 34, 94, 2, -64, 38, -90, -44, 62, 40, -62, 14, -56, 4, -42, -32, 62, -36, -78, 58, -86, 74, 4, -50, -26, 22, -16, 58, 84], [80, -2, -40, -32, -42, -58, -96, 58, -54, 22, 34, -84, -20, 84, 76, 98, 18, -44, 2, 14, 10, -26, 92, 0, 32, -54, 24, 78, -86, 48, 0, 24, -20, -54, 32, -44, -78, -28], [56, 40, 66, -26, 48, 30, -72, 60, -38, 34, -40, 42, -16, 24, -54, -44, 70, -62, -2, 12, -62, 78, 22, 56, 32, 12, 2, -48, 24, 74, -42, 48, 62, 90, 74, -84, 74, 8], [20, -58, -40, -92, 10, 26, 12, -66, 76, 96, 50, -42, 26, 68, 50, -90, 86, 78, -10, 38, 48, -62, 30, 40, -66, 86, -74, 12, -20, 46, 24, -98, -62, 56, -40, -46, -60, 30], [44, 62, -48, -78, -32, 90, -14, -74, 98, -50, 10, -54, -96, -14, -76, 40, 16, -44, 24, -70, -84, 96, 62, 64, 56, 60, 30, -70, -32, 14, -92, 66, -94, 94, 24, 74, -62, -54], [54, 44, -8, -36, -68, -80, 76, -58, -4, -64, 4, 96, 26, -10, -28, 20, -12, -62, -64, -38, -74, -24, -46, 26, -88, 46, -34, -2, 0, -10, 58, -76, -16, -50, 84, -88, -94, 34], [-72, 80, -96, 26, 32, -68, -2, 88, -98, 10, 96, 2, -50, 50, -2, 76, -24, 6, 50, 50, -24, -46, 10, 74, -70, -90, 82, 56, 16, -24, 66, 80, 96, 90, -80, -66, 48, -36], [38, 22, 88, 14, -54, 36, -86, 80, 2, 54, 34, 84, -96, -84, 38, 26, 96, -14, 60, 46, 26, 74, -8, -78, -6, -24, 4, 34, -80, 14, 62, 28, -56, -62, 32, -96, 14, -32], [-60, 80, 98, 54, -68, -16, -92, 48, -66, -42, -94, -24, -28, -84, -78, 74, 34, -14, -92, 78, 26, -52, -78, 88, -84, 94, -20, -34, 6, 64, 40, -44, -44, -88, 54, -16, 28, 24], [-76, -26, -80, -72, 76, 88, 36, 66, 12, 28, 64, 8, -92, 42, 52, -14, -44, -96, 20, -6, 26, -64, 34, 0, 12, 16, 64, -68, -86, 94, -80, -22, -8, 60, -32, -76, -66, 44], [-46, 58, -78, -62, 60, -54, -34, 88, 76, 4, 32, 32, -4, -76, -32, -20, 90, -78, -64, 44, 42, 38, -66, -46, 36, -96, -42, 58, -24, -36, -34, -64, 30, 40, 26, -32, -42, 20], [-52, -82, -76, -94, -82, -94, -46, -46, 40, 58, -96, 86, -18, -2, -36, -74, -78, 88, 86, 24, -6, 44, -30, -96, 78, -62, -64, -72, 66, -28, 68, 96, -24, 24, -98, 26, 26, -6], [88, 90, 0, 38, 52, -50, -94, -50, -64, -66, 40, 82, -64, -40, 72, -50, 86, 92, 48, -72, -12, 6, 42, 70, -80, 86, -6, -76, -64, -56, 80, -14, 70, -58, 96, -36, 84, -76], [-22, -40, 4, 66, -4, 10, 0, 18, -16, -78, -18, 10, 52, -20, 74, 4, 34, -80, 62, -92, -58, 24, -44, -52, 20, 6, 70, 90, 88, 40, 60, 42, -44, 42, -18, 30, -22, 48], [30, 86, -78, -22, 52, 90, -74, -68, 50, -14, -78, 30, 84, -60, -24, 40, -80, -56, 40, 34, 42, -16, -50, -18, -78, 14, 40, 52, -86, 24, 88, -62, -94, 16, 96, 86, -56, 74], [-38, 42, -42, 78, 26, 48, 86, -68, 2, -54, -50, 2, 46, -54, -46, 74, 48, -66, 20, -32, -20, 72, -36, 96, 98, 24, -70, 66, -72, -68, 76, 68, -82, 68, 60, -76, -92, 42], [-12, -14, 42, -96, 14, 52, 6, -18, 62, 58, 16, 2, 34, 28, 20, -72, -66, 82, -80, -92, -12, -4, -94, 30, 68, 64, 96, -54, 66, -30, -22, -60, -32, 32, 52, 2, 90, -26], [-70, 78, 24, -34, -20, -14, 54, 24, -48, 48, -2, -96, 92, -8, 60, -4, -40, 30, 4, 64, -32, -58, -96, -34, -24, -80, -12, 38, -4, -26, -82, 30, 6, -96, 50, -56, 10, -12], [36, -42, -50, 36, -60, -18, -12, 28, -56, 26, -64, 56, 44, 90, 66, -24, -32, 10, -48, -82, -8, 6, -64, -98, 88, 84, -8, -54, -36, -76, -60, -70, -54, -96, 10, 54, -76, 4], [94, 22, -86, -60, 88, 26, 12, 10, -96, 66, -48, 42, -40, -60, -70, -36, -70, -78, 20, -96, -58, -46, -84, -28, 64, -58, 94, 64, -16, 74, 34, 22, 0, -86, -64, -6, -2, 26], [56, -78, -34, 4, -66, 4, 12, -8, 46, 94, 50, 76, -82, 0, 32, 70, 70, -16, 66, 20, -22, 84, 8, 88, -84, 36, 22, 68, 76, -2, 62, 66, -52, 90, -34, -12, -12, 46], [-98, -50, 60, -96, 44, 84, 4, -12, -4, -80, -12, -42, 76, -62, 66, -14, 50, 84, -48, 72, 88, 20, 72, 96, 90, 46, 90, -40, 32, -90, 84, -34, -92, -18, -58, 18, 26, -42], [-2, -22, 54, 68, 52, -18, -42, -90, -58, -48, -66, -94, 6, -56, -4, 88, 22, -58, -6, -80, 48, -16, 78, -96, -6, -66, 24, -92, -40, -62, -90, -92, -66, -40, 8, -32, 6, -50], [94, -2, 10, -30, 8, -30, -84, -12, -22, -2, -26, -60, -60, 22, -38, 82, 18, 50, 78, -48, 0, 52, -78, 66, 10, 26, 68, -48, -44, 20, 64, 78, 80, 76, -44, -52, -48, 18], [34, 16, 58, 44, -46, 90, -76, -78, 16, 80, -32, 62, -54, -14, 76, -22, 2, 36, 68, 28, 52, -74, 84, 22, 84, -30, -60, 66, 92, -86, -40, 74, -60, -14, 58, -52, 36, 78], [-84, -92, 34, 24, 76, 90, 44, 22, 18, -84, 90, 62, 82, -22, 18, -42, 12, -14, -86, -78, -24, -30, 92, 20, 32, 54, -24, 26, 24, -80, -84, 76, 44, 74, 56, 56, 40, -58], [-40, 96, 20, 48, 4, -74, 72, 58, 62, -10, 22, 36, -82, 4, -12, -92, 2, -80, -54, 50, -64, 36, -40, -82, -2, -18, 8, -18, -52, 94, -30, 66, -42, -62, -72, 44, 12, 54]], 23,), ([[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 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]], 13,), ([[88, 92, 80, 80, 15, 85, 46, 62, 7, 8, 47, 50, 1, 6, 55, 63, 19, 14, 52, 10, 56, 26, 80, 55, 22, 99, 23, 36], [38, 72, 34, 22, 11, 19, 4, 66, 32, 79, 66, 90, 70, 34, 45, 84, 88, 37, 81, 6, 46, 45, 94, 95, 55, 44, 75, 36], [41, 26, 10, 97, 4, 30, 79, 82, 98, 41, 93, 36, 60, 37, 36, 56, 26, 72, 70, 25, 82, 2, 64, 89, 83, 38, 80, 47], [56, 31, 40, 37, 97, 27, 41, 60, 7, 75, 84, 5, 96, 49, 71, 63, 40, 21, 47, 2, 47, 1, 31, 63, 27, 12, 89, 41], [84, 79, 99, 26, 28, 96, 42, 61, 17, 78, 75, 40, 95, 45, 16, 93, 64, 3, 76, 15, 2, 26, 27, 71, 89, 47, 78, 91], [25, 94, 20, 71, 77, 11, 76, 16, 98, 26, 53, 36, 83, 79, 23, 25, 55, 40, 82, 34, 3, 92, 34, 61, 70, 37, 95, 61], [14, 55, 54, 38, 63, 31, 54, 36, 9, 1, 46, 80, 54, 19, 62, 54, 26, 66, 79, 18, 27, 30, 1, 39, 85, 68, 16, 32], [64, 96, 46, 25, 90, 24, 80, 45, 52, 11, 39, 89, 17, 83, 96, 89, 70, 30, 43, 41, 53, 74, 55, 19, 55, 35, 5, 75], [66, 99, 36, 49, 5, 1, 26, 37, 7, 82, 75, 83, 8, 99, 6, 49, 86, 72, 41, 20, 78, 58, 2, 56, 8, 20, 99, 62], [74, 59, 71, 97, 95, 8, 71, 12, 90, 23, 74, 42, 6, 61, 58, 16, 98, 37, 8, 29, 84, 59, 96, 87, 2, 12, 37, 59], [41, 65, 76, 35, 52, 81, 4, 50, 72, 59, 42, 59, 21, 47, 20, 28, 85, 61, 35, 44, 98, 28, 49, 13, 35, 9, 15, 32], [42, 78, 59, 33, 14, 7, 83, 6, 52, 69, 69, 68, 71, 10, 56, 67, 55, 67, 67, 71, 53, 10, 97, 65, 30, 53, 6, 62], [43, 75, 45, 42, 7, 19, 80, 69, 77, 20, 28, 47, 23, 54, 45, 22, 83, 89, 72, 8, 54, 79, 46, 23, 36, 29, 62, 17], [80, 83, 73, 86, 10, 71, 53, 83, 28, 8, 54, 20, 9, 63, 27, 95, 18, 17, 20, 9, 45, 18, 85, 38, 23, 5, 45, 77], [ 20, 4, 82, 22, 95, 45, 38, 39, 32, 29, 71, 82, 94, 39, 83, 1, 87, 52, 2, 98, 38, 44, 77, 17, 5, 62, 66, 85], [49, 82, 28, 41, 68, 56, 38, 17, 49, 92, 20, 88, 68, 51, 53, 20, 18, 61, 61, 15, 22, 62, 40, 16, 96, 81, 11, 48], [14, 7, 17, 46, 72, 54, 59, 23, 17, 87, 93, 57, 30, 88, 50, 96, 47, 60, 43, 60, 38, 15, 31, 24, 70, 19, 71, 6], [35, 3, 6, 22, 21, 79, 81, 63, 9, 13, 93, 24, 37, 94, 66, 30, 17, 31, 30, 78, 26, 58, 50, 28, 94, 22, 59, 76], [15, 24, 7, 76, 50, 31, 9, 81, 3, 2, 32, 52, 24, 42, 27, 99, 25, 35, 98, 85, 8, 36, 16, 17, 44, 54, 8, 21], [2, 62, 26, 20, 54, 50, 32, 5, 68, 90, 11, 7, 99, 16, 19, 75, 18, 22, 78, 71, 35, 72, 81, 32, 99, 97, 59, 32], [30, 2, 93, 99, 99, 93, 57, 9, 20, 54, 54, 72, 67, 7, 10, 39, 16, 50, 58, 1, 23, 36, 93, 73, 91, 40, 76, 35], [26, 85, 67, 49, 9, 35, 41, 92, 61, 31, 54, 10, 90, 73, 29, 74, 23, 88, 18, 86, 42, 77, 74, 46, 43, 5, 75, 58], [99, 45, 58, 32, 65, 47, 77, 6, 14, 51, 67, 70, 64, 96, 61, 75, 91, 39, 65, 50, 27, 88, 84, 91, 71, 78, 87, 75], [57, 46, 59, 33, 9, 79, 36, 94, 15, 81, 56, 58, 84, 46, 61, 92, 66, 32, 73, 90, 42, 86, 39, 45, 47, 79, 99, 92], [9, 62, 49, 98, 19, 10, 50, 41, 99, 12, 22, 61, 32, 75, 46, 83, 57, 98, 92, 86, 65, 38, 23, 39, 26, 45, 68, 12], [86, 39, 13, 21, 41, 90, 64, 53, 81, 25, 76, 15, 18, 69, 9, 16, 51, 1, 70, 11, 90, 65, 46, 62, 7, 24, 98, 63], [30, 1, 38, 95, 83, 32, 71, 46, 6, 66, 81, 74, 29, 82, 54, 86, 90, 6, 62, 13, 30, 55, 77, 72, 29, 4, 92, 96], [72, 71, 55, 66, 3, 83, 41, 61, 7, 75, 30, 85, 59, 18, 27, 94, 41, 15, 42, 99, 54, 93, 24, 70, 35, 71, 80, 55]], 21,), ([[-84, -66, 26, 44, 52], [-92, 2, 12, 30, 36], [-82, -62, 30, 46, 82], [-10, 36, 66, 68, 96], [4, 14, 38, 64, 68]], 4,), ([[0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1], [0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1], [1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0], [1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1]], 14,), ([[2, 8, 11, 12, 12, 15, 17, 24, 26, 32, 38, 39, 41, 44, 45, 48, 52, 55, 56, 57, 59, 62, 63, 71, 72, 77, 81, 82, 83, 85, 89, 92, 92, 92], [11, 11, 12, 14, 21, 25, 35, 41, 42, 43, 49, 50, 51, 52, 55, 55, 55, 55, 55, 56, 60, 64, 70, 70, 71, 73, 78, 78, 78, 82, 86, 90, 93, 98], [1, 2, 9, 9, 16, 19, 19, 20, 21, 23, 28, 29, 30, 35, 35, 42, 51, 53, 54, 58, 60, 64, 66, 70, 73, 74, 77, 79, 81, 88, 94, 95, 97, 97], [2, 7, 8, 13, 15, 23, 29, 40, 43, 49, 51, 51, 52, 60, 61, 62, 63, 64, 64, 65, 69, 72, 76, 78, 81, 84, 87, 87, 88, 89, 95, 95, 95, 99], [3, 3, 7, 8, 9, 17, 17, 18, 18, 23, 23, 36, 40, 45, 47, 50, 52, 53, 54, 58, 60, 60, 75, 76, 77, 77, 83, 83, 87, 88, 88, 91, 93, 97], [7, 8, 9, 11, 12, 35, 36, 39, 39, 47, 51, 52, 55, 55, 59, 61, 62, 65, 65, 66, 67, 69, 73, 73, 80, 81, 81, 85, 87, 89, 89, 93, 99, 99], [1, 2, 2, 4, 4, 7, 13, 16, 18, 21, 22, 23, 26, 27, 35, 37, 37, 41, 44, 45, 51, 51, 54, 56, 57, 59, 66, 71, 78, 78, 79, 82, 83, 95], [5, 5, 6, 8, 10, 10, 13, 18, 19, 22, 30, 33, 36, 43, 44, 48, 49, 59, 60, 63, 66, 67, 72, 72, 75, 77, 79, 81, 81, 84, 85, 90, 91, 92], [7, 7, 15, 17, 19, 20, 20, 23, 25, 26, 33, 36, 38, 38, 44, 46, 48, 49, 59, 60, 63, 64, 68, 68, 74, 74, 76, 79, 79, 90, 91, 93, 96, 98], [3, 4, 8, 17, 19, 29, 30, 35, 37, 39, 40, 45, 45, 51, 57, 57, 58, 62, 63, 63, 69, 71, 77, 78, 79, 81, 83, 84, 91, 94, 94, 95, 97, 97], [5, 10, 13, 13, 15, 20, 21, 26, 28, 35, 39, 40, 42, 44, 47, 48, 48, 49, 55, 56, 60, 61, 67, 75, 76, 78, 79, 82, 84, 84, 85, 87, 90, 91], [1, 3, 7, 13, 16, 19, 23, 25, 28, 28, 29, 30, 34, 40, 41, 44, 45, 47, 49, 50, 57, 60, 66, 66, 78, 78, 79, 79, 81, 83, 84, 85, 95, 99], [8, 10, 14, 15, 15, 15, 16, 19, 21, 21, 21, 22, 26, 29, 30, 31, 44, 44, 47, 58, 62, 63, 68, 76, 78, 78, 81, 84, 86, 90, 90, 91, 96, 98], [2, 4, 10, 14, 15, 15, 28, 31, 33, 36, 36, 42, 44, 46, 49, 49, 50, 51, 55, 57, 57, 60, 62, 65, 69, 72, 81, 82, 86, 89, 91, 95, 97, 97], [1, 2, 6, 7, 16, 24, 24, 24, 28, 30, 41, 46, 47, 47, 49, 49, 50, 60, 61, 64, 66, 66, 67, 70, 70, 74, 75, 78, 80, 81, 83, 90, 91, 97], [3, 10, 16, 18, 22, 22, 22, 24, 33, 34, 39, 40, 46, 47, 49, 51, 52, 59, 60, 61, 62, 62, 64, 65, 68, 72, 73, 79, 80, 84, 86, 87, 92, 95], [9, 11, 12, 16, 22, 25, 25, 29, 32, 34, 39, 39, 39, 39, 41, 42, 48, 49, 52, 55, 58, 62, 69, 69, 76, 82, 82, 84, 86, 87, 90, 91, 92, 97], [ 2, 4, 6, 8, 8, 9, 15, 17, 20, 20, 22, 26, 27, 29, 29, 32, 32, 34, 35, 36, 37, 38, 40, 40, 52, 56, 64, 64, 70, 71, 73, 88, 88, 94], [1, 7, 11, 12, 12, 13, 14, 15, 20, 25, 29, 32, 34, 38, 41, 43, 50, 57, 59, 64, 65, 69, 71, 72, 74, 77, 78, 82, 84, 85, 91, 91, 92, 96], [2, 2, 4, 6, 11, 14, 17, 20, 21, 21, 29, 30, 31, 32, 34, 39, 40, 40, 48, 50, 50, 55, 57, 64, 66, 72, 74, 79, 79, 84, 86, 88, 93, 99], [1, 2, 2, 10, 16, 25, 26, 26, 29, 29, 31, 33, 34, 36, 41, 42, 44, 47, 53, 53, 54, 59, 61, 62, 70, 72, 73, 75, 78, 79, 82, 84, 87, 99], [9, 9, 11, 13, 20, 23, 25, 30, 31, 37, 37, 39, 42, 43, 45, 48, 50, 55, 56, 58, 65, 66, 72, 75, 82, 82, 88, 88, 89, 91, 91, 93, 94, 96], [1, 5, 5, 8, 9, 13, 15, 17, 18, 21, 21, 24, 25, 27, 34, 43, 44, 45, 46, 50, 54, 55, 60, 67, 68, 71, 76, 78, 81, 82, 84, 87, 97, 99], [1, 3, 3, 5, 14, 23, 23, 25, 28, 29, 32, 36, 40, 41, 43, 49, 50, 53, 53, 53, 54, 64, 72, 76, 78, 80, 81, 81, 87, 87, 87, 91, 93, 94], [2, 10, 10, 12, 13, 15, 15, 16, 17, 21, 23, 27, 28, 32, 37, 37, 41, 43, 45, 46, 48, 51, 52, 56, 57, 69, 70, 74, 78, 80, 83, 86, 89, 95], [4, 4, 7, 7, 8, 10, 11, 14, 14, 17, 19, 26, 30, 36, 40, 51, 60, 62, 68, 69, 71, 73, 74, 80, 80, 82, 84, 85, 86, 86, 86, 88, 92, 97], [2, 3, 6, 8, 10, 11, 11, 13, 16, 18, 19, 21, 23, 23, 26, 27, 28, 35, 37, 37, 42, 50, 53, 54, 55, 58, 61, 68, 73, 81, 85, 86, 97, 99], [6, 7, 14, 17, 19, 20, 21, 22, 23, 24, 26, 30, 32, 36, 37, 38, 39, 42, 45, 57, 61, 66, 67, 67, 69, 81, 84, 84, 85, 90, 94, 95, 97, 99], [1, 2, 9, 10, 12, 13, 13, 13, 14, 15, 16, 16, 16, 17, 21, 27, 27, 33, 35, 35, 36, 41, 44, 46, 46, 47, 48, 51, 61, 66, 73, 76, 93, 95], [1, 6, 8, 14, 14, 19, 22, 25, 30, 36, 40, 45, 52, 61, 63, 67, 68, 70, 70, 73, 73, 75, 75, 77, 79, 81, 85, 86, 89, 90, 93, 94, 96, 97], [12, 14, 18, 22, 24, 25, 26, 26, 27, 29, 32, 34, 38, 38, 40, 54, 55, 56, 58, 60, 70, 74, 76, 77, 78, 78, 81, 83, 84, 84, 86, 91, 95, 98], [2, 4, 9, 17, 23, 24, 33, 36, 36, 37, 37, 39, 43, 43, 44, 51, 52, 56, 58, 59, 60, 64, 65, 68, 68, 69, 77, 78, 78, 79, 88, 94, 98, 99], [2, 2, 5, 5, 6, 13, 17, 19, 19, 23, 33, 36, 45, 45, 46, 51, 53, 62, 66, 69, 74, 77, 77, 78, 78, 79, 81, 86, 87, 93, 94, 96, 96, 99], [2, 5, 5, 6, 7, 10, 11, 15, 16, 29, 30, 31, 31, 36, 37, 41, 41, 48, 49, 49, 52, 53, 55, 56, 60, 61, 63, 81, 84, 92, 95, 97, 98, 99]], 31,), ([[-12, 46, -32, -10, 74, 98, -60, -54, 8, 90, 78, 84, -42, -36, -4, -72], [-10, -52, -22, 84, -28, -90, -82, 88, 4, 76, 22, 26, -38, 6, 94, 10], [52, 0, 52, -34, -52, -40, 30, 62, 64, -66, -22, -34, 46, -86, 82, 58], [-38, -36, -84, 72, -88, 42, 66, -60, -4, 86, -42, 30, 36, -98, -44, 58], [-34, 16, -36, 80, 26, 60, 94, 48, 16, -10, 4, 68, -20, -76, 84, -76], [-22, 86, -98, -82, 78, 82, 48, 26, 0, -30, 54, -92, 64, 68, 78, 50], [-58, 66, -14, -42, -38, -86, -70, -14, -54, 44, 82, 54, -92, -58, -64, 32], [18, 50, 6, -22, 36, 12, 12, 20, -6, -68, 82, 38, -8, -4, -22, 16], [-16, 90, -94, -62, 26, 32, -70, 26, -8, -90, 64, -80, 42, -10, -22, 82], [-94, 54, 28, 38, 86, -50, -96, 10, 48, 16, 46, 4, -78, -54, 4, -28], [64, 56, 0, -58, -22, 62, 96, -20, 0, -26, 16, -90, -84, 8, 80, 60], [38, 98, -18, -74, -24, -94, 34, -68, -68, 72, -74, 60, 62, 76, 86, 86], [-58, -40, -70, 90, 94, -66, -52, 54, -46, -80, 32, -40, -20, 50, 48, -96], [74, 2, -22, -28, 42, -44, -58, 36, -60, 26, -86, -74, 26, -96, -14, -60], [-90, 8, -72, 52, -94, 22, 90, -42, -22, -68, -86, -10, -12, -60, 12, 42], [26, -18, -68, -30, 18, 68, 98, 76, -2, 28, 4, -16, -92, 82, -94, -58]], 9,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 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], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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]], 27,), ([[39, 26, 40, 73, 91, 43, 76, 46, 5, 71, 28, 22, 71, 56, 55, 25, 59, 76, 19, 83, 62, 32, 63, 92, 44, 70, 86, 77, 33, 66, 58, 84, 91, 32, 47, 71, 71, 32, 62, 62, 60, 17, 12, 38, 15], [2, 23, 60, 30, 49, 2, 6, 37, 52, 78, 18, 59, 66, 91, 78, 84, 96, 74, 10, 49, 95, 52, 40, 92, 47, 71, 31, 16, 59, 44, 28, 34, 40, 89, 30, 84, 40, 58, 51, 59, 20, 45, 86, 19, 48], [49, 19, 56, 96, 95, 28, 79, 26, 61, 56, 51, 1, 51, 55, 48, 30, 12, 75, 74, 3, 80, 56, 57, 69, 99, 60, 2, 44, 82, 34, 39, 91, 70, 27, 55, 59, 19, 78, 86, 16, 15, 72, 55, 36, 74], [59, 23, 88, 66, 35, 26, 35, 21, 28, 1, 94, 53, 11, 98, 75, 20, 73, 36, 97, 71, 59, 53, 98, 41, 48, 29, 33, 83, 79, 44, 60, 47, 50, 16, 70, 95, 34, 52, 18, 58, 45, 94, 15, 79, 10], [19, 63, 40, 53, 26, 74, 28, 90, 96, 56, 72, 39, 39, 48, 42, 32, 46, 88, 2, 75, 9, 5, 92, 91, 89, 1, 83, 23, 51, 12, 92, 84, 10, 20, 3, 90, 34, 49, 74, 43, 55, 15, 76, 45, 58], [59, 70, 73, 46, 39, 54, 85, 4, 75, 95, 12, 61, 88, 43, 91, 75, 4, 89, 41, 73, 30, 37, 4, 75, 63, 41, 68, 7, 93, 67, 84, 54, 43, 7, 97, 17, 93, 95, 96, 41, 64, 46, 31, 72, 24], [78, 44, 67, 42, 78, 24, 45, 68, 31, 27, 87, 33, 78, 49, 64, 5, 89, 31, 84, 42, 86, 54, 10, 75, 9, 59, 8, 93, 26, 16, 62, 73, 20, 14, 70, 83, 50, 92, 77, 37, 55, 45, 84, 55, 94], [59, 6, 36, 64, 29, 50, 28, 15, 62, 47, 88, 9, 97, 95, 29, 46, 75, 15, 9, 91, 59, 29, 99, 73, 47, 25, 15, 52, 47, 57, 40, 28, 43, 10, 70, 1, 53, 75, 4, 28, 88, 2, 9, 35, 15], [99, 46, 92, 14, 32, 99, 15, 98, 93, 23, 6, 91, 91, 44, 46, 42, 83, 51, 20, 67, 71, 5, 46, 20, 19, 4, 43, 34, 80, 13, 79, 20, 31, 25, 86, 79, 75, 10, 24, 6, 29, 81, 95, 4, 74], [85, 36, 57, 3, 80, 45, 55, 61, 94, 78, 88, 54, 78, 97, 13, 95, 89, 36, 33, 40, 4, 96, 96, 92, 87, 29, 66, 24, 77, 45, 70, 68, 41, 21, 39, 29, 61, 1, 37, 35, 22, 55, 54, 35, 13], [71, 74, 47, 93, 6, 28, 71, 60, 50, 42, 61, 21, 21, 34, 84, 41, 76, 80, 7, 10, 64, 67, 32, 97, 14, 21, 52, 29, 17, 81, 62, 54, 5, 38, 96, 73, 54, 91, 41, 93, 64, 96, 46, 49, 86], [21, 24, 84, 19, 40, 76, 69, 35, 35, 51, 80, 8, 38, 32, 49, 60, 33, 72, 42, 43, 49, 6, 80, 66, 2, 33, 94, 76, 63, 24, 62, 8, 5, 3, 99, 14, 91, 65, 30, 53, 24, 43, 3, 34, 77], [51, 67, 30, 31, 26, 99, 6, 3, 20, 79, 62, 91, 52, 58, 79, 62, 94, 87, 56, 28, 34, 80, 15, 46, 22, 71, 79, 43, 75, 8, 37, 72, 20, 50, 19, 50, 40, 6, 79, 65, 85, 42, 26, 76, 62], [48, 79, 73, 90, 73, 30, 24, 63, 83, 63, 63, 73, 24, 46, 10, 22, 80, 66, 17, 8, 74, 30, 91, 26, 79, 91, 64, 2, 99, 83, 95, 92, 17, 94, 8, 78, 20, 81, 57, 8, 32, 43, 33, 23, 95], [83, 50, 26, 17, 2, 83, 40, 27, 8, 66, 67, 32, 74, 69, 85, 40, 68, 96, 38, 51, 24, 13, 42, 7, 7, 13, 60, 39, 29, 77, 25, 25, 15, 74, 78, 79, 81, 7, 34, 57, 70, 62, 69, 27, 54], [8, 23, 46, 4, 66, 64, 1, 3, 96, 51, 35, 2, 87, 25, 11, 77, 22, 54, 70, 86, 13, 90, 17, 93, 90, 42, 16, 23, 98, 93, 22, 55, 83, 72, 22, 27, 38, 13, 10, 48, 20, 14, 46, 64, 49], [17, 29, 84, 52, 93, 37, 65, 52, 45, 75, 33, 40, 4, 20, 97, 3, 12, 5, 39, 62, 27, 53, 15, 33, 8, 53, 10, 51, 7, 89, 44, 5, 37, 63, 54, 82, 30, 3, 69, 44, 54, 72, 20, 90, 35], [64, 35, 94, 43, 89, 22, 2, 40, 14, 35, 68, 31, 70, 76, 65, 43, 73, 4, 37, 44, 47, 44, 14, 6, 73, 37, 43, 62, 59, 22, 49, 16, 9, 38, 23, 8, 13, 85, 63, 23, 8, 86, 68, 5, 50], [52, 84, 70, 22, 1, 77, 26, 94, 15, 98, 98, 27, 12, 11, 4, 44, 41, 12, 20, 91, 51, 21, 49, 98, 54, 18, 96, 98, 79, 41, 71, 60, 31, 12, 52, 2, 38, 53, 31, 35, 79, 52, 25, 11, 19], [71, 95, 41, 70, 27, 50, 29, 92, 85, 79, 71, 27, 57, 81, 1, 56, 20, 76, 60, 77, 85, 96, 1, 91, 82, 42, 13, 98, 11, 57, 70, 70, 49, 90, 43, 21, 3, 93, 39, 52, 61, 12, 27, 76, 37], [3, 92, 53, 3, 98, 58, 86, 13, 84, 76, 6, 19, 56, 57, 4, 29, 88, 32, 79, 85, 83, 84, 61, 69, 5, 3, 9, 38, 50, 91, 67, 36, 20, 99, 88, 12, 32, 37, 89, 87, 99, 2, 8, 83, 6], [25, 8, 35, 86, 87, 46, 46, 32, 5, 71, 17, 24, 85, 18, 8, 75, 54, 5, 7, 80, 47, 72, 21, 8, 47, 90, 95, 33, 26, 57, 92, 31, 68, 23, 99, 56, 72, 13, 13, 74, 46, 96, 41, 20, 12], [30, 58, 25, 85, 64, 76, 3, 36, 75, 35, 32, 46, 15, 40, 83, 66, 70, 76, 86, 76, 91, 57, 7, 23, 86, 56, 66, 18, 20, 13, 65, 89, 31, 59, 69, 35, 84, 21, 37, 38, 27, 24, 72, 51, 94], [27, 78, 77, 96, 11, 64, 59, 90, 65, 48, 3, 16, 6, 14, 54, 62, 55, 37, 63, 74, 60, 84, 44, 52, 73, 16, 3, 29, 24, 92, 62, 33, 58, 87, 95, 45, 51, 73, 76, 53, 8, 22, 23, 79, 87], [78, 23, 44, 87, 17, 92, 17, 79, 28, 92, 81, 11, 13, 73, 65, 36, 61, 84, 69, 68, 53, 24, 55, 34, 13, 52, 99, 85, 80, 26, 64, 21, 89, 17, 60, 63, 74, 82, 93, 74, 23, 29, 39, 88, 50], [38, 97, 29, 93, 79, 32, 26, 51, 69, 96, 54, 68, 93, 25, 30, 41, 90, 62, 44, 16, 11, 92, 78, 66, 57, 61, 96, 60, 76, 76, 80, 75, 80, 16, 56, 8, 55, 1, 78, 51, 93, 46, 68, 93, 19], [36, 75, 27, 46, 86, 65, 85, 21, 50, 25, 90, 63, 79, 53, 93, 91, 25, 6, 18, 25, 70, 51, 1, 70, 32, 42, 20, 61, 24, 1, 47, 72, 19, 93, 69, 53, 51, 88, 64, 85, 21, 24, 15, 15, 95], [73, 39, 37, 1, 99, 28, 65, 5, 25, 4, 5, 65, 59, 23, 29, 94, 38, 51, 3, 10, 52, 21, 27, 39, 36, 28, 11, 55, 33, 96, 57, 98, 43, 57, 28, 11, 40, 2, 61, 98, 83, 29, 54, 28, 68], [3, 72, 48, 70, 60, 49, 17, 84, 28, 58, 59, 34, 29, 6, 95, 72, 94, 11, 62, 2, 58, 48, 90, 72, 8, 25, 71, 96, 95, 80, 19, 9, 71, 31, 24, 48, 90, 20, 5, 18, 16, 48, 91, 81, 25], [44, 32, 83, 67, 57, 16, 58, 21, 86, 75, 2, 98, 60, 7, 98, 39, 84, 26, 80, 63, 99, 44, 49, 61, 87, 74, 55, 76, 16, 55, 20, 26, 1, 16, 85, 11, 9, 40, 33, 91, 46, 12, 75, 5, 23], [88, 39, 4, 51, 44, 68, 29, 32, 7, 76, 58, 14, 18, 84, 27, 13, 82, 31, 5, 58, 85, 1, 36, 48, 82, 7, 41, 61, 33, 47, 58, 22, 79, 52, 68, 85, 72, 85, 89, 88, 48, 54, 46, 10, 54], [41, 29, 62, 36, 30, 50, 26, 40, 93, 67, 11, 71, 27, 50, 28, 48, 2, 77, 7, 57, 4, 48, 34, 25, 92, 60, 77, 91, 10, 21, 54, 45, 34, 40, 61, 34, 59, 2, 42, 27, 94, 60, 2, 43, 80], [99, 59, 22, 54, 48, 21, 43, 7, 37, 54, 64, 76, 63, 9, 90, 78, 35, 85, 50, 75, 93, 99, 70, 64, 6, 51, 47, 12, 77, 74, 74, 35, 89, 4, 35, 98, 50, 55, 16, 45, 66, 14, 79, 61, 44], [99, 30, 17, 32, 7, 36, 35, 67, 36, 29, 63, 37, 38, 81, 65, 53, 47, 78, 9, 42, 55, 80, 3, 76, 74, 42, 13, 96, 96, 86, 51, 29, 64, 89, 76, 32, 45, 88, 75, 92, 66, 78, 65, 28, 98], [67, 50, 7, 71, 69, 58, 47, 42, 38, 18, 46, 33, 22, 45, 94, 61, 4, 31, 95, 2, 54, 27, 41, 62, 85, 74, 57, 8, 81, 69, 45, 22, 23, 17, 84, 27, 60, 76, 17, 34, 88, 97, 43, 87, 59], [85, 63, 26, 68, 84, 42, 60, 45, 40, 59, 34, 16, 52, 66, 71, 17, 95, 97, 51, 30, 17, 51, 34, 58, 44, 34, 23, 85, 66, 54, 5, 25, 2, 92, 53, 35, 86, 8, 35, 16, 28, 24, 33, 70, 16], [30, 59, 3, 45, 83, 8, 14, 77, 74, 62, 38, 37, 24, 99, 60, 88, 75, 27, 50, 35, 53, 98, 61, 75, 2, 8, 92, 7, 67, 2, 57, 33, 82, 93, 68, 99, 93, 68, 55, 42, 46, 74, 40, 10, 94], [74, 89, 17, 23, 15, 32, 46, 72, 6, 56, 87, 17, 44, 16, 48, 44, 51, 19, 24, 63, 29, 96, 84, 48, 20, 80, 62, 23, 79, 38, 9, 59, 6, 71, 4, 30, 86, 55, 96, 36, 48, 9, 16, 5, 71], [22, 92, 75, 89, 15, 48, 46, 68, 49, 37, 34, 99, 49, 61, 67, 41, 55, 25, 36, 34, 56, 61, 95, 19, 65, 92, 64, 73, 19, 19, 36, 77, 55, 53, 16, 86, 78, 1, 25, 70, 93, 42, 8, 62, 23], [73, 80, 12, 36, 95, 32, 96, 49, 95, 17, 24, 61, 46, 4, 6, 82, 72, 92, 46, 41, 44, 26, 71, 72, 95, 44, 12, 91, 24, 4, 32, 58, 19, 87, 92, 99, 89, 51, 76, 46, 95, 36, 53, 52, 59], [27, 44, 28, 74, 94, 34, 33, 38, 66, 72, 28, 91, 66, 51, 78, 91, 88, 69, 70, 45, 77, 88, 16, 51, 75, 56, 8, 35, 44, 81, 62, 22, 17, 35, 81, 98, 17, 23, 15, 10, 94, 49, 8, 83, 47], [70, 18, 9, 35, 22, 18, 59, 53, 7, 41, 61, 5, 47, 78, 33, 83, 16, 86, 91, 94, 81, 24, 54, 21, 34, 68, 15, 38, 82, 71, 37, 47, 71, 24, 4, 18, 23, 18, 40, 9, 16, 35, 83, 77, 9], [62, 93, 71, 2, 18, 86, 47, 47, 59, 60, 48, 28, 97, 33, 3, 42, 68, 33, 48, 56, 67, 13, 46, 88, 47, 95, 73, 16, 3, 86, 67, 52, 60, 93, 28, 95, 25, 70, 56, 63, 59, 93, 30, 13, 27], [86, 69, 35, 18, 3, 49, 58, 20, 86, 94, 15, 7, 19, 49, 15, 31, 33, 91, 58, 17, 14, 63, 97, 88, 72, 54, 50, 26, 36, 97, 83, 25, 74, 77, 93, 24, 42, 84, 32, 64, 43, 18, 40, 68, 13], [78, 6, 57, 14, 90, 43, 23, 31, 16, 6, 66, 27, 67, 19, 9, 73, 78, 78, 34, 36, 58, 70, 27, 34, 69, 45, 50, 84, 90, 18, 71, 64, 62, 88, 61, 94, 2, 31, 34, 70, 28, 16, 74, 16, 87]], 41,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", CHECK_ARRAY_REPRESENTS_INORDER_BINARY_SEARCH_TREE_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_ARRAY_REPRESENTS_INORDER_BINARY_SEARCH_TREE_NOT{ static boolean f_gold ( int [ ] arr , int n ) { if ( n == 0 || n == 1 ) { return true ; } for ( int i = 1 ; i < n ; i ++ ) { if ( arr [ i - 1 ] > arr [ i ] ) { return false ; } } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,4,10,11,13,17,19,23,26,28,29,30,34,35,37,38,38,43,49,49,50,52,53,55,55,57,58,58,59,64,66,67,70,72,72,75,77,77,87,89,89,90,91,98,99,99,99}); param0.add(new int[]{56,-94,-26,-52,58,-66,-52,-66,-94,44,38,-66,70,-70,-80,-78,-72,-60,-76,68,-50,32,-16,84,74,-42,98,-8,72,26,24,6,24,86,86,78,-92,80,32,-74,26,50,92,4,2,-34,-2,-18,-10}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{38,79,76,92,92}); param0.add(new int[]{-42,-28,2,32,50,56,86,96,98}); param0.add(new int[]{1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{1,9,12,21,21,24,34,55,60,63,67,68,88,89,91,94,98,99}); param0.add(new int[]{-96,96,-98,-42,-74,40,42,50,-46,-52,8,-46,48,88,-78,-72,-10,-20,98,-40,-18,36,4,46,52,28,-88,-28,-28,-86}); param0.add(new int[]{0,0,0,0,1,1}); param0.add(new int[]{66,12,48,82,33,77,99,98,14,92}); List param1 = new ArrayList<>(); param1.add(46); param1.add(30); param1.add(13); param1.add(2); param1.add(7); param1.add(11); param1.add(9); param1.add(29); param1.add(3); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : if ( n == 0 or n == 1 ) : return True for i in range ( 1 , n , 1 ) : if ( arr [ i - 1 ] > arr [ i ] ) : return False return True "," using namespace std; bool f_gold ( int arr [ ], int n ) { if ( n == 0 || n == 1 ) return true; for ( int i = 1; i < n; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false; return true; } int main() { int n_success = 0; vector> param0 {{2,3,4,10,11,13,17,19,23,26,28,29,30,34,35,37,38,38,43,49,49,50,52,53,55,55,57,58,58,59,64,66,67,70,72,72,75,77,77,87,89,89,90,91,98,99,99,99},{56,-94,-26,-52,58,-66,-52,-66,-94,44,38,-66,70,-70,-80,-78,-72,-60,-76,68,-50,32,-16,84,74,-42,98,-8,72,26,24,6,24,86,86,78,-92,80,32,-74,26,50,92,4,2,-34,-2,-18,-10},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{38,79,76,92,92},{-42,-28,2,32,50,56,86,96,98},{1,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1},{1,9,12,21,21,24,34,55,60,63,67,68,88,89,91,94,98,99},{-96,96,-98,-42,-74,40,42,50,-46,-52,8,-46,48,88,-78,-72,-10,-20,98,-40,-18,36,4,46,52,28,-88,-28,-28,-86},{0,0,0,0,1,1},{66,12,48,82,33,77,99,98,14,92}}; vector param1 {46,30,13,2,7,11,9,29,3,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 4, 10, 11, 13, 17, 19, 23, 26, 28, 29, 30, 34, 35, 37, 38, 38, 43, 49, 49, 50, 52, 53, 55, 55, 57, 58, 58, 59, 64, 66, 67, 70, 72, 72, 75, 77, 77, 87, 89, 89, 90, 91, 98, 99, 99, 99],46,), ([56, -94, -26, -52, 58, -66, -52, -66, -94, 44, 38, -66, 70, -70, -80, -78, -72, -60, -76, 68, -50, 32, -16, 84, 74, -42, 98, -8, 72, 26, 24, 6, 24, 86, 86, 78, -92, 80, 32, -74, 26, 50, 92, 4, 2, -34, -2, -18, -10],30,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([38, 79, 76, 92, 92],2,), ([-42, -28, 2, 32, 50, 56, 86, 96, 98],7,), ([1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],11,), ([1, 9, 12, 21, 21, 24, 34, 55, 60, 63, 67, 68, 88, 89, 91, 94, 98, 99],9,), ([-96, 96, -98, -42, -74, 40, 42, 50, -46, -52, 8, -46, 48, 88, -78, -72, -10, -20, 98, -40, -18, 36, 4, 46, 52, 28, -88, -28, -28, -86],29,), ([0, 0, 0, 0, 1, 1],3,), ([66, 12, 48, 82, 33, 77, 99, 98, 14, 92],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S_1{ static int f_gold ( int [ ] arr , int n ) { Map < Integer , Integer > myMap = new HashMap < > ( ) ; int sum = 0 ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == 0 ) arr [ i ] = - 1 ; sum += arr [ i ] ; if ( sum == 0 ) count ++ ; if ( myMap . containsKey ( sum ) ) count += myMap . get ( sum ) ; if ( ! myMap . containsKey ( sum ) ) myMap . put ( sum , 1 ) ; else myMap . put ( sum , myMap . get ( sum ) + 1 ) ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,6,6,9,9,9,16,18,19,20,21,22,23,26,26,28,39,40,41,43,43,44,44,45,51,51,55,59,60,62,67,67,68,69,70,71,71,72,82,84,88,88,89,89,91,92,92}); param0.add(new int[]{-44,74,-52,-96,46,92,54,56,-38,88,40,34,-72,8,58,-14,36,94,34,-90,-42,80,-12,-42,-6,78,-98,34,-88,0,-76,90,40,64,26,18,-84,72,80}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{60,48,42,95,30,22,80,15,62,38,63,42,39,28,69,71,30,48,67,9,33,74,95,95,72,35,9}); param0.add(new int[]{-96,-94,-94,-86,-66,-66,-62,-58,-36,-36,-22,-18,-10,2,4,6,10,16,20,24,26,28,28,28,40,42,44,58,76,78,78,80,90,92}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,1,1,0,1,1,0,1,0,1,1,1,0,1,1}); param0.add(new int[]{4,5,5,6,7,11,16,16,17,18,19,20,21,22,23,25,26,27,29,31,34,36,37,40,41,45,45,55,65,69,70,71,71,71,73,73,76,79,80,85,85,88,90,97,98,98,99,99}); param0.add(new int[]{34,-20,38,-94,2,32,-26,90,94,-36,-94,6,-24,12,4,60,68,64,-60,-72,-54,-10,-64,-48,-88,60,48,64,0,-26,26,74,32,-92,4,84,6,-16,30,-56,-28,-86,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{4,99,97,63,65,57,69,39,29,91,68,25,84,82,84,89,59,18,77,29,57,40,78,35,23,91,26,71,19,99,12,91,49,71,49,77,67}); List param1 = new ArrayList<>(); param1.add(44); param1.add(37); param1.add(32); param1.add(18); param1.add(24); param1.add(28); param1.add(31); param1.add(37); param1.add(19); param1.add(31); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : mp = dict ( ) Sum = 0 count = 0 for i in range ( n ) : if ( arr [ i ] == 0 ) : arr [ i ] = - 1 Sum += arr [ i ] if ( Sum == 0 ) : count += 1 if ( Sum in mp.keys ( ) ) : count += mp [ Sum ] mp [ Sum ] = mp.get ( Sum , 0 ) + 1 return count "," using namespace std; int f_gold ( int arr [ ], int n ) { map < int, int > mp; int sum = 0; int count = 0; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == 0 ) arr [ i ] = - 1; sum += arr [ i ]; if ( sum == 0 ) count ++; if ( mp [ sum ] ) count += mp [ sum ]; if ( mp [ sum ] == 0 ) mp [ sum ] = 1; else mp [ sum ] ++; } return count; } int main() { int n_success = 0; vector> param0 {{1,6,6,9,9,9,16,18,19,20,21,22,23,26,26,28,39,40,41,43,43,44,44,45,51,51,55,59,60,62,67,67,68,69,70,71,71,72,82,84,88,88,89,89,91,92,92},{-44,74,-52,-96,46,92,54,56,-38,88,40,34,-72,8,58,-14,36,94,34,-90,-42,80,-12,-42,-6,78,-98,34,-88,0,-76,90,40,64,26,18,-84,72,80},{0,0,0,0,0,0,0,0,0,0,0,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},{60,48,42,95,30,22,80,15,62,38,63,42,39,28,69,71,30,48,67,9,33,74,95,95,72,35,9},{-96,-94,-94,-86,-66,-66,-62,-58,-36,-36,-22,-18,-10,2,4,6,10,16,20,24,26,28,28,28,40,42,44,58,76,78,78,80,90,92},{0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,1,1,0,1,1,0,1,0,1,1,1,0,1,1},{4,5,5,6,7,11,16,16,17,18,19,20,21,22,23,25,26,27,29,31,34,36,37,40,41,45,45,55,65,69,70,71,71,71,73,73,76,79,80,85,85,88,90,97,98,98,99,99},{34,-20,38,-94,2,32,-26,90,94,-36,-94,6,-24,12,4,60,68,64,-60,-72,-54,-10,-64,-48,-88,60,48,64,0,-26,26,74,32,-92,4,84,6,-16,30,-56,-28,-86,-68},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{4,99,97,63,65,57,69,39,29,91,68,25,84,82,84,89,59,18,77,29,57,40,78,35,23,91,26,71,19,99,12,91,49,71,49,77,67}}; vector param1 {44,37,32,18,24,28,31,37,19,31}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 6, 6, 9, 9, 9, 16, 18, 19, 20, 21, 22, 23, 26, 26, 28, 39, 40, 41, 43, 43, 44, 44, 45, 51, 51, 55, 59, 60, 62, 67, 67, 68, 69, 70, 71, 71, 72, 82, 84, 88, 88, 89, 89, 91, 92, 92],44,), ([-44, 74, -52, -96, 46, 92, 54, 56, -38, 88, 40, 34, -72, 8, 58, -14, 36, 94, 34, -90, -42, 80, -12, -42, -6, 78, -98, 34, -88, 0, -76, 90, 40, 64, 26, 18, -84, 72, 80],37,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],32,), ([60, 48, 42, 95, 30, 22, 80, 15, 62, 38, 63, 42, 39, 28, 69, 71, 30, 48, 67, 9, 33, 74, 95, 95, 72, 35, 9],18,), ([-96, -94, -94, -86, -66, -66, -62, -58, -36, -36, -22, -18, -10, 2, 4, 6, 10, 16, 20, 24, 26, 28, 28, 28, 40, 42, 44, 58, 76, 78, 78, 80, 90, 92],24,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1],28,), ([4, 5, 5, 6, 7, 11, 16, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29, 31, 34, 36, 37, 40, 41, 45, 45, 55, 65, 69, 70, 71, 71, 71, 73, 73, 76, 79, 80, 85, 85, 88, 90, 97, 98, 98, 99, 99],31,), ([34, -20, 38, -94, 2, 32, -26, 90, 94, -36, -94, 6, -24, 12, 4, 60, 68, 64, -60, -72, -54, -10, -64, -48, -88, 60, 48, 64, 0, -26, 26, 74, 32, -92, 4, 84, 6, -16, 30, -56, -28, -86, -68],37,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([4, 99, 97, 63, 65, 57, 69, 39, 29, 91, 68, 25, 84, 82, 84, 89, 59, 18, 77, 29, 57, 40, 78, 35, 23, 91, 26, 71, 19, 99, 12, 91, 49, 71, 49, 77, 67],31,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_NODES_GIVEN_PERFECT_BINARY_TREE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_NODES_GIVEN_PERFECT_BINARY_TREE_1{ static double f_gold ( int l ) { double leafNodeCount = Math . pow ( 2 , l - 1 ) ; double sumLastLevel = 0 ; sumLastLevel = ( leafNodeCount * ( leafNodeCount + 1 ) ) / 2 ; double sum = sumLastLevel * l ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(5); param0.add(16); param0.add(8); param0.add(61); param0.add(59); param0.add(88); param0.add(67); param0.add(28); param0.add(58); param0.add(42); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( l ) : leafNodeCount = math.pow ( 2 , l - 1 ) ; sumLastLevel = 0 ; sumLastLevel = ( ( leafNodeCount * ( leafNodeCount + 1 ) ) / 2 ) ; sum = sumLastLevel * l ; return int ( sum ) ; ",,," if __name__ == '__main__': param = [ (5,), (16,), (8,), (61,), (59,), (88,), (67,), (28,), (58,), (42,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CIRCUMFERENCE_PARALLELOGRAM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CIRCUMFERENCE_PARALLELOGRAM{ static float f_gold ( float a , float b ) { return ( ( 2 * a ) + ( 2 * b ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(801.0366882228715F); param0.add(-7069.610056819919F); param0.add(7723.966966568705F); param0.add(-7935.859205856963F); param0.add(6094.247432557289F); param0.add(-7371.490363309265F); param0.add(8368.473889617526F); param0.add(-3761.921143166053F); param0.add(3139.1089185587884F); param0.add(-5218.286665567171F); List param1 = new ArrayList<>(); param1.add(456.71190645582783F); param1.add(-4226.483870778477F); param1.add(5894.65405158763F); param1.add(-5333.225064296693F); param1.add(1660.420120702062F); param1.add(-1095.4543576847332F); param1.add(4735.838330834498F); param1.add(-5315.871691690649F); param1.add(6490.194159517967F); param1.add(-8265.153014320813F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : return ( ( 2 * a ) + ( 2 * b ) ) "," using namespace std; float f_gold ( float a, float b ) { return ( ( 2 * a ) + ( 2 * b ) ); } int main() { int n_success = 0; vector param0 {801.0366882228715F,-7069.610056819919F,7723.966966568705F,-7935.859205856963F,6094.247432557289F,-7371.490363309265F,8368.473889617526F,-3761.921143166053F,3139.1089185587884F,-5218.286665567171F}; vector param1 {456.71190645582783F,-4226.483870778477F,5894.65405158763F,-5333.225064296693F,1660.420120702062F,-1095.4543576847332F,4735.838330834498F,-5315.871691690649F,6490.194159517967F,-8265.153014320813F}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (801.0366882228715,456.71190645582783,), (-7069.610056819919,-4226.483870778477,), (7723.966966568705,5894.65405158763,), (-7935.859205856963,-5333.225064296693,), (6094.247432557289,1660.420120702062,), (-7371.490363309265,-1095.4543576847332,), (8368.473889617526,4735.838330834498,), (-3761.921143166053,-5315.871691690649,), (3139.1089185587884,6490.194159517967,), (-5218.286665567171,-8265.153014320813,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_NUMBER_IS_PERFECT_SQUARE_USING_ADDITIONSUBTRACTION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_NUMBER_IS_PERFECT_SQUARE_USING_ADDITIONSUBTRACTION{ static boolean f_gold ( int n ) { for ( int sum = 0 , i = 1 ; sum < n ; i += 2 ) { sum += i ; if ( sum == n ) return true ; } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(4); param0.add(9); param0.add(25); param0.add(36); param0.add(3); param0.add(121); param0.add(14); param0.add(17); param0.add(80); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : i = 1 the_sum = 0 while the_sum < n : the_sum += i if the_sum == n : return True i += 2 return False "," using namespace std; bool f_gold ( int n ) { for ( int sum = 0, i = 1; sum < n; i += 2 ) { sum += i; if ( sum == n ) return true; } return false; } int main() { int n_success = 0; vector param0 {1,4,9,25,36,3,121,14,17,80}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (4,), (9,), (25,), (36,), (3,), (121,), (14,), (17,), (80,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_FACTORS_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_FACTORS_NUMBER{ static int f_gold ( int n ) { int result = 0 ; for ( int i = 2 ; i <= Math . sqrt ( n ) ; i ++ ) { if ( n % i == 0 ) { if ( i == ( n / i ) ) result += i ; else result += ( i + n / i ) ; } } return ( result + n + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(76); param0.add(21); param0.add(4); param0.add(49); param0.add(35); param0.add(55); param0.add(43); param0.add(39); param0.add(36); param0.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : result = 0 for i in range ( 2 , ( int ) ( math.sqrt ( n ) ) + 1 ) : if ( n % i == 0 ) : if ( i == ( n / i ) ) : result = result + i else : result = result + ( i + n // i ) return ( result + n + 1 ) "," using namespace std; int f_gold ( int n ) { int result = 0; for ( int i = 2; i <= sqrt ( n ); i ++ ) { if ( n % i == 0 ) { if ( i == ( n / i ) ) result += i; else result += ( i + n / i ); } } return ( result + n + 1 ); } int main() { int n_success = 0; vector param0 {76,21,4,49,35,55,43,39,36,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (76,), (21,), (4,), (49,), (35,), (55,), (43,), (39,), (36,), (5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_GIVEN_STRING_ROTATION_PALINDROME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_GIVEN_STRING_ROTATION_PALINDROME{ static boolean f_gold ( String str ) { int l = 0 ; int h = str . length ( ) - 1 ; while ( h > l ) if ( str . charAt ( l ++ ) != str . charAt ( h -- ) ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""aadaa""); param0.add(""2674377254""); param0.add(""11""); param0.add(""0011000""); param0.add(""26382426486138""); param0.add(""111010111010""); param0.add(""abccba""); param0.add(""5191""); param0.add(""1110101101""); param0.add(""abcdecbe""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( string ) : l = 0 h = len ( string ) - 1 while h > l : l += 1 h -= 1 if string [ l - 1 ] != string [ h + 1 ] : return False return True "," using namespace std; bool f_gold ( string str ) { int l = 0; int h = str . length ( ) - 1; while ( h > l ) if ( str [ l ++ ] != str [ h -- ] ) return false; return true; } int main() { int n_success = 0; vector param0 {""aadaa"",""2674377254"",""11"",""0011000"",""26382426486138"",""111010111010"",""abccba"",""5191"",""1110101101"",""abcdecbe""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('aadaa',), ('2674377254',), ('11',), ('0011000',), ('26382426486138',), ('111010111010',), ('abccba',), ('5191',), ('1110101101',), ('abcdecbe',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1{ static long f_gold ( int n ) { int N = 10 ; long count = 1 ; for ( int i = 1 ; i <= n ; i ++ ) { count *= ( N + i - 1 ) ; count /= i ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(40); param0.add(11); param0.add(94); param0.add(73); param0.add(6); param0.add(73); param0.add(58); param0.add(40); param0.add(64); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : N = 10 count = 1 for i in range ( 1 , n + 1 ) : count = int ( count * ( N + i - 1 ) ) count = int ( count / i ) return count "," using namespace std; long long int f_gold ( int n ) { int N = 10; long long count = 1; for ( int i = 1; i <= n; i ++ ) { count *= ( N + i - 1 ); count /= i; } return count; } int main() { int n_success = 0; vector param0 {40,11,94,73,6,73,58,40,64,66}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (40,), (11,), (94,), (73,), (6,), (73,), (58,), (40,), (64,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LEXICOGRAPHICALLY_MINIMUM_STRING_ROTATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEXICOGRAPHICALLY_MINIMUM_STRING_ROTATION{ static String f_gold ( String str ) { int n = str . length ( ) ; String arr [ ] = new String [ n ] ; String concat = str + str ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = concat . substring ( i , i + n ) ; } Arrays . sort ( arr ) ; return arr [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""onWEchl""); param0.add(""2""); param0.add(""100""); param0.add(""GHbCZA""); param0.add(""50568798206105""); param0.add(""001011110001""); param0.add(""lljpYhznnyu""); param0.add(""54499921759984""); param0.add(""11101""); param0.add(""qvypgCYEjsyjwZ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str_ ) : n = len ( str_ ) arr = [ 0 ] * n concat = str_ + str_ for i in range ( n ) : arr [ i ] = concat [ i : n + i ] arr.sort ( ) return arr [ 0 ] "," using namespace std; string f_gold ( string str ) { int n = str . length ( ); string arr [ n ]; string concat = str + str; for ( int i = 0; i < n; i ++ ) arr [ i ] = concat . substr ( i, n ); sort ( arr, arr + n ); return arr [ 0 ]; } int main() { int n_success = 0; vector param0 {""onWEchl"",""2"",""100"",""GHbCZA"",""50568798206105"",""001011110001"",""lljpYhznnyu"",""54499921759984"",""11101"",""qvypgCYEjsyjwZ""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('onWEchl',), ('2',), ('100',), ('GHbCZA',), ('50568798206105',), ('001011110001',), ('lljpYhznnyu',), ('54499921759984',), ('11101',), ('qvypgCYEjsyjwZ',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_NUMBER_POWER_K_USING_BASE_CHANGING_METHOD," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_NUMBER_POWER_K_USING_BASE_CHANGING_METHOD{ static boolean f_gold ( int n , int k ) { boolean oneSeen = false ; while ( n > 0 ) { int digit = n % k ; if ( digit > 1 ) return false ; if ( digit == 1 ) { if ( oneSeen ) return false ; oneSeen = true ; } n /= k ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(64); param0.add(16); param0.add(27); param0.add(81); param0.add(1); param0.add(69); param0.add(8); param0.add(31); param0.add(43); param0.add(54); List param1 = new ArrayList<>(); param1.add(4); param1.add(2); param1.add(3); param1.add(72); param1.add(9); param1.add(17); param1.add(20); param1.add(79); param1.add(81); param1.add(89); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k ) : oneSeen = False while ( n > 0 ) : digit = n % k if ( digit > 1 ) : return False if ( digit == 1 ) : if ( oneSeen ) : return False oneSeen = True n //= k return True "," using namespace std; bool f_gold ( unsigned int n, unsigned int k ) { bool oneSeen = false; while ( n > 0 ) { int digit = n % k; if ( digit > 1 ) return false; if ( digit == 1 ) { if ( oneSeen ) return false; oneSeen = true; } n /= k; } return true; } int main() { int n_success = 0; vector param0 {64,16,27,81,1,69,8,31,43,54}; vector param1 {4,2,3,72,9,17,20,79,81,89}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (64,4,), (16,2,), (27,3,), (81,72,), (1,9,), (69,17,), (8,20,), (31,79,), (43,81,), (54,89,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_1{ private static int f_gold ( int [ ] arr , int n ) { int jumps [ ] = new int [ n ] ; int i , j ; if ( n == 0 || arr [ 0 ] == 0 ) return Integer . MAX_VALUE ; jumps [ 0 ] = 0 ; for ( i = 1 ; i < n ; i ++ ) { jumps [ i ] = Integer . MAX_VALUE ; for ( j = 0 ; j < i ; j ++ ) { if ( i <= j + arr [ j ] && jumps [ j ] != Integer . MAX_VALUE ) { jumps [ i ] = Math . min ( jumps [ i ] , jumps [ j ] + 1 ) ; break ; } } } return jumps [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,5,9,9,12,13,13,13,15,16,17,18,20,20,20,25,28,30,30,33,34,34,37,42,45,49,50,52,52,54,65,68,72,74,75,82,85,87,91,91,94,95}); param0.add(new int[]{-28,90,30,-80,-10,26,-12,24,12,44,-38,20,26,38,-8,-40,88,26}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{74,37,37,71,85,89,44,72,55,8,5,98,54,37,7,76,93,74,84,51,18,37}); param0.add(new int[]{-68,14,76}); param0.add(new int[]{0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1}); param0.add(new int[]{3,4,6,6,7,14,28,36,37,44,46,47,50,51,52,55,55,61,68,69,70,73,74,77,86,90,90,91,98,99}); param0.add(new int[]{-4,-24,-84,-76}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{78,88,1,98,26,31,56,12,71}); List param1 = new ArrayList<>(); param1.add(22); param1.add(9); param1.add(37); param1.add(20); param1.add(1); param1.add(27); param1.add(23); param1.add(2); param1.add(32); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : jumps = [ 0 for i in range ( n ) ] if ( n == 0 ) or ( arr [ 0 ] == 0 ) : return float ( 'inf' ) jumps [ 0 ] = 0 for i in range ( 1 , n ) : jumps [ i ] = float ( 'inf' ) for j in range ( i ) : if ( i <= j + arr [ j ] ) and ( jumps [ j ] != float ( 'inf' ) ) : jumps [ i ] = min ( jumps [ i ] , jumps [ j ] + 1 ) break return jumps [ n - 1 ] "," using namespace std; int f_gold ( int arr [ ], int n ) { int * jumps = new int [ n ]; int i, j; if ( n == 0 || arr [ 0 ] == 0 ) return INT_MAX; jumps [ 0 ] = 0; for ( i = 1; i < n; i ++ ) { jumps [ i ] = INT_MAX; for ( j = 0; j < i; j ++ ) { if ( i <= j + arr [ j ] && jumps [ j ] != INT_MAX ) { jumps [ i ] = min ( jumps [ i ], jumps [ j ] + 1 ); break; } } } return jumps [ n - 1 ]; } int main() { int n_success = 0; vector> param0 {{2,5,9,9,12,13,13,13,15,16,17,18,20,20,20,25,28,30,30,33,34,34,37,42,45,49,50,52,52,54,65,68,72,74,75,82,85,87,91,91,94,95},{-28,90,30,-80,-10,26,-12,24,12,44,-38,20,26,38,-8,-40,88,26},{0,0,0,0,0,0,0,0,0,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},{74,37,37,71,85,89,44,72,55,8,5,98,54,37,7,76,93,74,84,51,18,37},{-68,14,76},{0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1},{3,4,6,6,7,14,28,36,37,44,46,47,50,51,52,55,55,61,68,69,70,73,74,77,86,90,90,91,98,99},{-4,-24,-84,-76},{0,0,0,0,0,0,0,0,0,0,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},{78,88,1,98,26,31,56,12,71}}; vector param1 {22,9,37,20,1,27,23,2,32,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 5, 9, 9, 12, 13, 13, 13, 15, 16, 17, 18, 20, 20, 20, 25, 28, 30, 30, 33, 34, 34, 37, 42, 45, 49, 50, 52, 52, 54, 65, 68, 72, 74, 75, 82, 85, 87, 91, 91, 94, 95],22,), ([-28, 90, 30, -80, -10, 26, -12, 24, 12, 44, -38, 20, 26, 38, -8, -40, 88, 26],9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 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],37,), ([74, 37, 37, 71, 85, 89, 44, 72, 55, 8, 5, 98, 54, 37, 7, 76, 93, 74, 84, 51, 18, 37],20,), ([-68, 14, 76],1,), ([0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1],27,), ([3, 4, 6, 6, 7, 14, 28, 36, 37, 44, 46, 47, 50, 51, 52, 55, 55, 61, 68, 69, 70, 73, 74, 77, 86, 90, 90, 91, 98, 99],23,), ([-4, -24, -84, -76],2,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],32,), ([78, 88, 1, 98, 26, 31, 56, 12, 71],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SORT_EVEN_NUMBERS_ASCENDING_ORDER_SORT_ODD_NUMBERS_DESCENDING_ORDER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class SORT_EVEN_NUMBERS_ASCENDING_ORDER_SORT_ODD_NUMBERS_DESCENDING_ORDER_1{ static void f_gold ( int arr [ ] , int n ) { for ( int i = 0 ; i < n ; i ++ ) if ( ( arr [ i ] & 1 ) != 0 ) arr [ i ] *= - 1 ; Arrays . sort ( arr ) ; for ( int i = 0 ; i < n ; i ++ ) if ( ( arr [ i ] & 1 ) != 0 ) arr [ i ] *= - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4}); param0.add(new int[]{8,-74,89,65,51,-15,68,51,23,44,89}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{51,74,43,15,38,15,5,93}); param0.add(new int[]{-96,-75,-64,-20,-5,-2,1,40,46,64}); param0.add(new int[]{0,0,1,0,0,1,0,0,0}); param0.add(new int[]{1,2,4,4,17,22,23,28,35,38,39,39,41,42,42,45,46,49,49,49,50,59,62,68,69,71,73,76,78,79,80,87,88,88,90,90,91,93,95,96,98}); param0.add(new int[]{11,68,-52,-49,-57,-2,83,77,24,-20,85,11,43,-73,96,92,58,64,95,13,-14,14,24,-51,-24,-45,-44,96,-5,-56,59}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{44,7,44,68,34,66,69,55,10,96,42,41,77,69,10,10,91,60,51}); List param1 = new ArrayList<>(); param1.add(0); param1.add(8); param1.add(28); param1.add(6); param1.add(7); param1.add(5); param1.add(34); param1.add(24); param1.add(14); param1.add(13); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{4}); filled_function_param0.add(new int[]{8,-74,89,65,51,-15,68,51,23,44,89}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); filled_function_param0.add(new int[]{51,74,43,15,38,15,5,93}); filled_function_param0.add(new int[]{-96,-75,-64,-20,-5,-2,1,40,46,64}); filled_function_param0.add(new int[]{0,0,1,0,0,1,0,0,0}); filled_function_param0.add(new int[]{1,2,4,4,17,22,23,28,35,38,39,39,41,42,42,45,46,49,49,49,50,59,62,68,69,71,73,76,78,79,80,87,88,88,90,90,91,93,95,96,98}); filled_function_param0.add(new int[]{11,68,-52,-49,-57,-2,83,77,24,-20,85,11,43,-73,96,92,58,64,95,13,-14,14,24,-51,-24,-45,-44,96,-5,-56,59}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{44,7,44,68,34,66,69,55,10,96,42,41,77,69,10,10,91,60,51}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(0); filled_function_param1.add(8); filled_function_param1.add(28); filled_function_param1.add(6); filled_function_param1.add(7); filled_function_param1.add(5); filled_function_param1.add(34); filled_function_param1.add(24); filled_function_param1.add(14); filled_function_param1.add(13); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : for i in range ( 0 , n ) : if ( arr [ i ] & 1 ) : arr [ i ] *= - 1 arr.sort ( ) for i in range ( 0 , n ) : if ( arr [ i ] & 1 ) : arr [ i ] *= - 1 "," using namespace std; void f_gold ( int arr [ ], int n ) { for ( int i = 0; i < n; i ++ ) if ( arr [ i ] & 1 ) arr [ i ] *= - 1; sort ( arr, arr + n ); for ( int i = 0; i < n; i ++ ) if ( arr [ i ] & 1 ) arr [ i ] *= - 1; } int main() { int n_success = 0; vector> param0 {{4},{8,-74,89,65,51,-15,68,51,23,44,89},{0,0,0,0,0,0,0,0,0,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},{51,74,43,15,38,15,5,93},{-96,-75,-64,-20,-5,-2,1,40,46,64},{0,0,1,0,0,1,0,0,0},{1,2,4,4,17,22,23,28,35,38,39,39,41,42,42,45,46,49,49,49,50,59,62,68,69,71,73,76,78,79,80,87,88,88,90,90,91,93,95,96,98},{11,68,-52,-49,-57,-2,83,77,24,-20,85,11,43,-73,96,92,58,64,95,13,-14,14,24,-51,-24,-45,-44,96,-5,-56,59},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{44,7,44,68,34,66,69,55,10,96,42,41,77,69,10,10,91,60,51}}; vector param1 {0,8,28,6,7,5,34,24,14,13}; vector> filled_function_param0 {{4},{8,-74,89,65,51,-15,68,51,23,44,89},{0,0,0,0,0,0,0,0,0,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},{51,74,43,15,38,15,5,93},{-96,-75,-64,-20,-5,-2,1,40,46,64},{0,0,1,0,0,1,0,0,0},{1,2,4,4,17,22,23,28,35,38,39,39,41,42,42,45,46,49,49,49,50,59,62,68,69,71,73,76,78,79,80,87,88,88,90,90,91,93,95,96,98},{11,68,-52,-49,-57,-2,83,77,24,-20,85,11,43,-73,96,92,58,64,95,13,-14,14,24,-51,-24,-45,-44,96,-5,-56,59},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{44,7,44,68,34,66,69,55,10,96,42,41,77,69,10,10,91,60,51}}; vector filled_function_param1 {0,8,28,6,7,5,34,24,14,13}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4],0,), ([8, -74, 89, 65, 51, -15, 68, 51, 23, 44, 89],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,), ([51, 74, 43, 15, 38, 15, 5, 93],6,), ([-96, -75, -64, -20, -5, -2, 1, 40, 46, 64],7,), ([0, 0, 1, 0, 0, 1, 0, 0, 0],5,), ([1, 2, 4, 4, 17, 22, 23, 28, 35, 38, 39, 39, 41, 42, 42, 45, 46, 49, 49, 49, 50, 59, 62, 68, 69, 71, 73, 76, 78, 79, 80, 87, 88, 88, 90, 90, 91, 93, 95, 96, 98],34,), ([11, 68, -52, -49, -57, -2, 83, 77, 24, -20, 85, 11, 43, -73, 96, 92, 58, 64, 95, 13, -14, 14, 24, -51, -24, -45, -44, 96, -5, -56, 59],24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([44, 7, 44, 68, 34, 66, 69, 55, 10, 96, 42, 41, 77, 69, 10, 10, 91, 60, 51],13,) ] filled_function_param = [ ([4],0,), ([8, -74, 89, 65, 51, -15, 68, 51, 23, 44, 89],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,), ([51, 74, 43, 15, 38, 15, 5, 93],6,), ([-96, -75, -64, -20, -5, -2, 1, 40, 46, 64],7,), ([0, 0, 1, 0, 0, 1, 0, 0, 0],5,), ([1, 2, 4, 4, 17, 22, 23, 28, 35, 38, 39, 39, 41, 42, 42, 45, 46, 49, 49, 49, 50, 59, 62, 68, 69, 71, 73, 76, 78, 79, 80, 87, 88, 88, 90, 90, 91, 93, 95, 96, 98],34,), ([11, 68, -52, -49, -57, -2, 83, 77, 24, -20, 85, 11, 43, -73, 96, 92, 58, 64, 95, 13, -14, 14, 24, -51, -24, -45, -44, 96, -5, -56, 59],24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([44, 7, 44, 68, 34, 66, 69, 55, 10, 96, 42, 41, 77, 69, 10, 10, 91, 60, 51],13,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1{ static int f_gold ( int arr [ ] , int n , int x ) { int i = 0 ; while ( i < n ) { if ( arr [ i ] == x ) return i ; i = i + Math . abs ( arr [ i ] - x ) ; } System . out . println ( ""number is not"" + "" present!"" ) ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8, 7, 6, 7, 6, 5, 4, 3, 2, 3, 4, 3}); param0.add(new int[]{6,90}); param0.add(new int[]{1, 2, 3, 4, 5, 4}); param0.add(new int[]{97,35,60,96,3,67,72,95,55,9,69,28,15,91,31,59}); param0.add(new int[]{-84,-78,-74,-70,-68,-60,-56,-54,-48,-46,-28,-16,-6,0,0,8,8,8,12,16,26,30,32,34,36,40,46,48,70,70,72,76,78,78,80,84,84,86}); param0.add(new int[]{1,0,1,1,1,1,0,1,1,1,1}); param0.add(new int[]{55,64,76,79,93,96}); param0.add(new int[]{66,-90,98,-50,0,46,42,64,-96,-80,-96,20,-10,-84}); param0.add(new int[]{0,0,0,0,0,0,1}); param0.add(new int[]{94,4,34,87,32,3,92,68,57,76,24,33,3,4,30,70,49,30,72,82,16,53,6,24,92,96,89,28,21,8,36,9,40,85,51,1,63,68,74,26,40,3,9,32,67,4,6,73}); List param1 = new ArrayList<>(); param1.add(12); param1.add(1); param1.add(6); param1.add(15); param1.add(22); param1.add(5); param1.add(4); param1.add(8); param1.add(6); param1.add(25); List param2 = new ArrayList<>(); param2.add(3); param2.add(1); param2.add(5); param2.add(9); param2.add(31); param2.add(7); param2.add(4); param2.add(13); param2.add(5); param2.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( arr , n , x ) : i = 0 while ( i < n ) : if ( arr [ i ] == x ) : return i i = i + abs ( arr [ i ] - x ) print ( ""number is not present!"" ) return - 1 "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int i = 0; while ( i < n ) { if ( arr [ i ] == x ) return i; i = i + abs ( arr [ i ] - x ); } cout << ""number is not present!""; return - 1; } int main() { int n_success = 0; vector> param0 {{8, 7, 6, 7, 6, 5, 4, 3, 2, 3, 4, 3} ,{6,90},{1, 2, 3, 4, 5, 4},{97,35,60,96,3,67,72,95,55,9,69,28,15,91,31,59},{-84,-78,-74,-70,-68,-60,-56,-54,-48,-46,-28,-16,-6,0,0,8,8,8,12,16,26,30,32,34,36,40,46,48,70,70,72,76,78,78,80,84,84,86},{1,0,1,1,1,1,0,1,1,1,1},{55,64,76,79,93,96},{66,-90,98,-50,0,46,42,64,-96,-80,-96,20,-10,-84},{0,0,0,0,0,0,1},{94,4,34,87,32,3,92,68,57,76,24,33,3,4,30,70,49,30,72,82,16,53,6,24,92,96,89,28,21,8,36,9,40,85,51,1,63,68,74,26,40,3,9,32,67,4,6,73}}; vector param1 {12,1,6,15,22,5,4,8,6,25}; vector param2 {3,1,5,9,31,7,4,13,5,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([8, 7, 6, 7, 6, 5, 4, 3, 2, 3, 4, 3],12,3,), ([6, 90],1,1,), ([1, 2, 3, 4, 5, 4],6,5,), ([97, 35, 60, 96, 3, 67, 72, 95, 55, 9, 69, 28, 15, 91, 31, 59],15,9,), ([-84, -78, -74, -70, -68, -60, -56, -54, -48, -46, -28, -16, -6, 0, 0, 8, 8, 8, 12, 16, 26, 30, 32, 34, 36, 40, 46, 48, 70, 70, 72, 76, 78, 78, 80, 84, 84, 86],22,31,), ([1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1],5,7,), ([55, 64, 76, 79, 93, 96],4,4,), ([66, -90, 98, -50, 0, 46, 42, 64, -96, -80, -96, 20, -10, -84],8,13,), ([0, 0, 0, 0, 0, 0, 1],6,5,), ([94, 4, 34, 87, 32, 3, 92, 68, 57, 76, 24, 33, 3, 4, 30, 70, 49, 30, 72, 82, 16, 53, 6, 24, 92, 96, 89, 28, 21, 8, 36, 9, 40, 85, 51, 1, 63, 68, 74, 26, 40, 3, 9, 32, 67, 4, 6, 73],25,25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", SUM_SEQUENCE_2_22_222," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SEQUENCE_2_22_222{ static double f_gold ( int n ) { return 0.0246 * ( Math . pow ( 10 , n ) - 1 - ( 9 * n ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(88); param0.add(79); param0.add(7); param0.add(36); param0.add(23); param0.add(10); param0.add(27); param0.add(30); param0.add(71); param0.add(6); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : return 0.0246 * ( math.pow ( 10 , n ) - 1 - ( 9 * n ) ) ",,," if __name__ == '__main__': param = [ (88,), (79,), (7,), (36,), (23,), (10,), (27,), (30,), (71,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE{ static int f_gold ( int arr [ ] , int n ) { int i ; int ans = Integer . MIN_VALUE ; int maxval = 1 ; int minval = 1 ; int prevMax ; for ( i = 0 ; i < n ; i ++ ) { if ( arr [ i ] > 0 ) { maxval = maxval * arr [ i ] ; minval = Math . min ( 1 , minval * arr [ i ] ) ; } else if ( arr [ i ] == 0 ) { minval = 1 ; maxval = 0 ; } else if ( arr [ i ] < 0 ) { prevMax = maxval ; maxval = minval * arr [ i ] ; minval = prevMax * arr [ i ] ; } ans = Math . max ( ans , maxval ) ; if ( maxval <= 0 ) { maxval = 1 ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{19,25,34,39,41,51,52,53,54,56,64,67,72,87,92,93,95}); param0.add(new int[]{10}); param0.add(new int[]{0,0,0,0,0,0,1,1}); param0.add(new int[]{84,81,14,15,34,52,54,1,16,65,54,71,15,40,53,35,62,84,81,85,28,90,74,97,64,3,7,38}); param0.add(new int[]{-94,-86,-56,-52,-52,-46,-40,-36,-36,-30,-12,18,20,32,44,50,54,64,68,74,74,74,82}); param0.add(new int[]{0,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,0,0,1,1,0,0,1,0}); param0.add(new int[]{2,3,4,8,11,16,16,18,20,22,24,26,26,27,29,31,37,38,45,45,46,50,50,59,59,59,60,61,63,65,68,69,71,74,74,76,79,82,88,88,89,91,93,93,99,99}); param0.add(new int[]{2,-24,-8,-82,76,-62,38,6,-92,30,68,98,-68,8,24,-34,-34,64,-4,-2,-56,-30,92,10,-60,88,4,14,90,-44,-54,4,-4,-26,14,-2,0,82}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{70,92,76,56,93,55,12,80,56,36,83,14,16,12,70,55,93,28,84,28,49,66,15,49,98}); List param1 = new ArrayList<>(); param1.add(15); param1.add(0); param1.add(5); param1.add(14); param1.add(21); param1.add(29); param1.add(45); param1.add(23); param1.add(19); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : ans = - float ( 'inf' ) maxval = 1 minval = 1 for i in range ( 0 , n ) : if arr [ i ] > 0 : maxval = maxval * arr [ i ] minval = min ( 1 , minval * arr [ i ] ) elif arr [ i ] == 0 : minval = 1 maxval = 0 elif arr [ i ] < 0 : prevMax = maxval maxval = minval * arr [ i ] minval = prevMax * arr [ i ] ans = max ( ans , maxval ) if maxval <= 0 : maxval = 1 return ans "," using namespace std; int f_gold ( int arr [ ], int n ) { int i; int ans = INT_MIN; int maxval = 1; int minval = 1; int prevMax; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] > 0 ) { maxval = maxval * arr [ i ]; minval = min ( 1, minval * arr [ i ] ); } else if ( arr [ i ] == 0 ) { minval = 1; maxval = 0; } else if ( arr [ i ] < 0 ) { prevMax = maxval; maxval = minval * arr [ i ]; minval = prevMax * arr [ i ]; } ans = max ( ans, maxval ); if ( maxval <= 0 ) { maxval = 1; } } return ans; } int main() { int n_success = 0; vector> param0 {{19,25,34,39,41,51,52,53,54,56,64,67,72,87,92,93,95},{10},{0,0,0,0,0,0,1,1},{84,81,14,15,34,52,54,1,16,65,54,71,15,40,53,35,62,84,81,85,28,90,74,97,64,3,7,38},{-94,-86,-56,-52,-52,-46,-40,-36,-36,-30,-12,18,20,32,44,50,54,64,68,74,74,74,82},{0,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,0,0,1,1,0,0,1,0},{2,3,4,8,11,16,16,18,20,22,24,26,26,27,29,31,37,38,45,45,46,50,50,59,59,59,60,61,63,65,68,69,71,74,74,76,79,82,88,88,89,91,93,93,99,99},{2,-24,-8,-82,76,-62,38,6,-92,30,68,98,-68,8,24,-34,-34,64,-4,-2,-56,-30,92,10,-60,88,4,14,90,-44,-54,4,-4,-26,14,-2,0,82},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{70,92,76,56,93,55,12,80,56,36,83,14,16,12,70,55,93,28,84,28,49,66,15,49,98}}; vector param1 {15,0,5,14,21,29,45,23,19,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([19, 25, 34, 39, 41, 51, 52, 53, 54, 56, 64, 67, 72, 87, 92, 93, 95],15,), ([10],0,), ([0, 0, 0, 0, 0, 0, 1, 1],5,), ([84, 81, 14, 15, 34, 52, 54, 1, 16, 65, 54, 71, 15, 40, 53, 35, 62, 84, 81, 85, 28, 90, 74, 97, 64, 3, 7, 38],14,), ([-94, -86, -56, -52, -52, -46, -40, -36, -36, -30, -12, 18, 20, 32, 44, 50, 54, 64, 68, 74, 74, 74, 82],21,), ([0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0],29,), ([2, 3, 4, 8, 11, 16, 16, 18, 20, 22, 24, 26, 26, 27, 29, 31, 37, 38, 45, 45, 46, 50, 50, 59, 59, 59, 60, 61, 63, 65, 68, 69, 71, 74, 74, 76, 79, 82, 88, 88, 89, 91, 93, 93, 99, 99],45,), ([2, -24, -8, -82, 76, -62, 38, 6, -92, 30, 68, 98, -68, 8, 24, -34, -34, 64, -4, -2, -56, -30, 92, 10, -60, 88, 4, 14, 90, -44, -54, 4, -4, -26, 14, -2, 0, 82],23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([70, 92, 76, 56, 93, 55, 12, 80, 56, 36, 83, 14, 16, 12, 70, 55, 93, 28, 84, 28, 49, 66, 15, 49, 98],13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE{ static int f_gold ( int notes [ ] , int n ) { int fiveCount = 0 ; int tenCount = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( notes [ i ] == 5 ) fiveCount ++ ; else if ( notes [ i ] == 10 ) { if ( fiveCount > 0 ) { fiveCount -- ; tenCount ++ ; } else return 0 ; } else { if ( fiveCount > 0 && tenCount > 0 ) { fiveCount -- ; tenCount -- ; } else if ( fiveCount >= 3 ) { fiveCount -= 3 ; } else return 0 ; } } return 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5, 5, 5, 10, 20}); param0.add(new int[]{5,5,5,20,10}); param0.add(new int[]{5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,10,10,10,10,10,10,10,10,10,10,10,10,10}); param0.add(new int[]{10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,18}); param0.add(new int[]{5,5,20}); param0.add(new int[]{10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}); param0.add(new int[]{5,10,20,5,5,5,5,5,5,5,5,5,5,5,5}); param0.add(new int[]{-82,-10,-78,-84,68,62,10,20,-86,-98,92,70,40,-12,-20,-36,8,-70,6,8,44,-24,8,-18,76,-54,-14,-94,-68,-62,-24,-36,-74,92,92,-80,48,56,94}); param0.add(new int[]{10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}); param0.add(new int[]{46,46,93,57,82,34,83,80,77,36,80,85,69,28,9,56,49,27,83,25,1,80,99,14,69,82,79,71,74,34}}); List param1 = new ArrayList<>(); param1.add(4); param1.add(5); param1.add(27); param1.add(12); param1.add(2); param1.add(17); param1.add(7); param1.add(31); param1.add(25); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( notes , n ) : fiveCount = 0 tenCount = 0 for i in range ( n ) : if ( notes [ i ] == 5 ) : fiveCount += 1 elif ( notes [ i ] == 10 ) : if ( fiveCount > 0 ) : fiveCount -= 1 tenCount += 1 else : return 0 else : if ( fiveCount > 0 and tenCount > 0 ) : fiveCount -= 1 tenCount -= 1 elif ( fiveCount >= 3 ) : fiveCount -= 3 else : return 0 return 1 "," using namespace std; int f_gold ( int notes [ ], int n ) { int fiveCount = 0; int tenCount = 0; for ( int i = 0; i < n; i ++ ) { if ( notes [ i ] == 5 ) fiveCount ++; else if ( notes [ i ] == 10 ) { if ( fiveCount > 0 ) { fiveCount --; tenCount ++; } else return 0; } else { if ( fiveCount > 0 && tenCount > 0 ) { fiveCount --; tenCount --; } else if ( fiveCount >= 3 ) { fiveCount -= 3; } else return 0; } } return 1; } int main() { int n_success = 0; vector> param0 { {5, 5, 5, 10, 20}, {5,5,5,20,10}, {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,10,10,10,10,10,10,10,10,10,10,10,10,10}, {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,18}, {5,5,20}, {10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, {5,10,20,5,5,5,5,5,5,5,5,5,5,5,5}, {-82,-10,-78,-84,68,62,10,20,-86,-98,92,70,40,-12,-20,-36,8,-70,6,8,44,-24,8,-18,76,-54,-14,-94,-68,-62,-24,-36,-74,92,92,-80,48,56,94}, {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}, {46,46,93,57,82,34,83,80,77,36,80,85,69,28,9,56,49,27,83,25,1,80,99,14,69,82,79,71,74,34}}; vector param1 {4,5,27,12,2,17,7,31,25,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 5, 5, 10, 20],4,), ([5,5,5,20,10],5,), ([5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,10,10,10,10,10,10,10,10,10,10,10,10,10],27,), ([10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,18],12,), ([5,5,20],2,), ([10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],17,), ([5,10,20,5,5,5,5,5,5,5,5,5,5,5,5],7,), ([-82,-10,-78,-84,68,62,10,20,-86,-98,92,70,40,-12,-20,-36,8,-70,6,8,44,-24,8,-18,76,-54,-14,-94,-68,-62,-24,-36,-74,92,92,-80,48,56,94],31,), ([10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],25,), ([46, 46, 93, 57, 82, 34, 83, 80, 77, 36, 80, 85, 69, 28, 9, 56, 49, 27, 83, 25, 1, 80, 99, 14, 69, 82, 79, 71, 74, 34],20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE{ static int f_gold ( int arr [ ] , int n , int x ) { int curr_sum = 0 , min_len = n + 1 ; int start = 0 , end = 0 ; while ( end < n ) { while ( curr_sum <= x && end < n ) curr_sum += arr [ end ++ ] ; while ( curr_sum > x && start < n ) { if ( end - start < min_len ) min_len = end - start ; curr_sum -= arr [ start ++ ] ; } } return min_len ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,11,11,14,18,19,21,22,22,23,26,27,28,28,29,30,31,34,39,42,42,44,45,49,49,53,57,61,65,66,67,70,71,73,74,74,78,85,88,94,95,97}); param0.add(new int[]{-30,-22,-66,-80,18,-64,-28,-46,94,60,-64,2,26,-94,58,56,56,88,50,-78,-12,68,54,-78,42,-30,24,-48,84,12,-88,0,54,-92,-4,42,-60,-72,-32}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{86,8,23,40,55,93,11,35,33,37,96,91,35,66,37,57,83,99,96,15,18,93}); param0.add(new int[]{-92,-68,-48,-48,-42,-26,-22,-18,2,4,8,14,20,22,32,46,52,62,70,96,98}); param0.add(new int[]{0,0,0,0,1,0,1,1,0,1,0,0,0}); param0.add(new int[]{4,4,11,11,13,15,16,18,19,19,19,23,26,27,34,39,39,40,41,46,47,51,52,52,53,57,58,58,60,64,68,70,72,84,84,85,95,98,99}); param0.add(new int[]{12,-22,2,-90,-92,84,-26,-76,-72,50,-36,30,78,-18,-94,-30,22,28,10,32,34,-86,0,-4,40,0,80,50,66,-48,-40,-94,64,58,-14,0,-32,-58,-22,-94,-68,-36,-94,-48,40,78,-74}); param0.add(new int[]{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}); param0.add(new int[]{1,33,20,32,76,27,8,95,78,72,25,56}); List param1 = new ArrayList<>(); param1.add(37); param1.add(31); param1.add(8); param1.add(16); param1.add(17); param1.add(11); param1.add(31); param1.add(42); param1.add(25); param1.add(9); List param2 = new ArrayList<>(); param2.add(23); param2.add(29); param2.add(12); param2.add(13); param2.add(14); param2.add(10); param2.add(35); param2.add(26); param2.add(21); param2.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x ) : curr_sum = 0 min_len = n + 1 start = 0 end = 0 while ( end < n ) : while ( curr_sum <= x and end < n ) : curr_sum += arr [ end ] end += 1 while ( curr_sum > x and start < n ) : if ( end - start < min_len ) : min_len = end - start curr_sum -= arr [ start ] start += 1 return min_len "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int curr_sum = 0, min_len = n + 1; int start = 0, end = 0; while ( end < n ) { while ( curr_sum <= x && end < n ) curr_sum += arr [ end ++ ]; while ( curr_sum > x && start < n ) { if ( end - start < min_len ) min_len = end - start; curr_sum -= arr [ start ++ ]; } } return min_len; } int main() { int n_success = 0; vector> param0 {{6,11,11,14,18,19,21,22,22,23,26,27,28,28,29,30,31,34,39,42,42,44,45,49,49,53,57,61,65,66,67,70,71,73,74,74,78,85,88,94,95,97},{-30,-22,-66,-80,18,-64,-28,-46,94,60,-64,2,26,-94,58,56,56,88,50,-78,-12,68,54,-78,42,-30,24,-48,84,12,-88,0,54,-92,-4,42,-60,-72,-32},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{86,8,23,40,55,93,11,35,33,37,96,91,35,66,37,57,83,99,96,15,18,93},{-92,-68,-48,-48,-42,-26,-22,-18,2,4,8,14,20,22,32,46,52,62,70,96,98},{0,0,0,0,1,0,1,1,0,1,0,0,0},{4,4,11,11,13,15,16,18,19,19,19,23,26,27,34,39,39,40,41,46,47,51,52,52,53,57,58,58,60,64,68,70,72,84,84,85,95,98,99},{12,-22,2,-90,-92,84,-26,-76,-72,50,-36,30,78,-18,-94,-30,22,28,10,32,34,-86,0,-4,40,0,80,50,66,-48,-40,-94,64,58,-14,0,-32,-58,-22,-94,-68,-36,-94,-48,40,78,-74},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{1,33,20,32,76,27,8,95,78,72,25,56}}; vector param1 {37,31,8,16,17,11,31,42,25,9}; vector param2 {23,29,12,13,14,10,35,26,21,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 11, 11, 14, 18, 19, 21, 22, 22, 23, 26, 27, 28, 28, 29, 30, 31, 34, 39, 42, 42, 44, 45, 49, 49, 53, 57, 61, 65, 66, 67, 70, 71, 73, 74, 74, 78, 85, 88, 94, 95, 97],37,23,), ([-30, -22, -66, -80, 18, -64, -28, -46, 94, 60, -64, 2, 26, -94, 58, 56, 56, 88, 50, -78, -12, 68, 54, -78, 42, -30, 24, -48, 84, 12, -88, 0, 54, -92, -4, 42, -60, -72, -32],31,29,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],8,12,), ([86, 8, 23, 40, 55, 93, 11, 35, 33, 37, 96, 91, 35, 66, 37, 57, 83, 99, 96, 15, 18, 93],16,13,), ([-92, -68, -48, -48, -42, -26, -22, -18, 2, 4, 8, 14, 20, 22, 32, 46, 52, 62, 70, 96, 98],17,14,), ([0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0],11,10,), ([4, 4, 11, 11, 13, 15, 16, 18, 19, 19, 19, 23, 26, 27, 34, 39, 39, 40, 41, 46, 47, 51, 52, 52, 53, 57, 58, 58, 60, 64, 68, 70, 72, 84, 84, 85, 95, 98, 99],31,35,), ([12, -22, 2, -90, -92, 84, -26, -76, -72, 50, -36, 30, 78, -18, -94, -30, 22, 28, 10, 32, 34, -86, 0, -4, 40, 0, 80, 50, 66, -48, -40, -94, 64, 58, -14, 0, -32, -58, -22, -94, -68, -36, -94, -48, 40, 78, -74],42,26,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],25,21,), ([1, 33, 20, 32, 76, 27, 8, 95, 78, 72, 25, 56],9,10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NEXT_HIGHER_NUMBER_WITH_SAME_NUMBER_OF_SET_BITS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NEXT_HIGHER_NUMBER_WITH_SAME_NUMBER_OF_SET_BITS{ static int f_gold ( int x ) { int rightOne , nextHigherOneBit , rightOnesPattern , next = 0 ; if ( x > 0 ) { rightOne = x & - x ; nextHigherOneBit = x + rightOne ; rightOnesPattern = x ^ nextHigherOneBit ; rightOnesPattern = ( rightOnesPattern ) / rightOne ; rightOnesPattern >>= 2 ; next = nextHigherOneBit | rightOnesPattern ; } return next ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(42); param0.add(75); param0.add(94); param0.add(5); param0.add(52); param0.add(22); param0.add(77); param0.add(44); param0.add(85); param0.add(59); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : next = 0 if ( x ) : rightOne = x & - ( x ) nextHigherOneBit = x + int ( rightOne ) rightOnesPattern = x ^ int ( nextHigherOneBit ) rightOnesPattern = ( int ( rightOnesPattern ) / int ( rightOne ) ) rightOnesPattern = int ( rightOnesPattern ) >> 2 next = nextHigherOneBit | rightOnesPattern return next ",,," if __name__ == '__main__': param = [ (42,), (75,), (94,), (5,), (52,), (22,), (77,), (44,), (85,), (59,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1{ static int f_gold ( int arr [ ] , int n , int key , int capacity ) { if ( n >= capacity ) return n ; int i ; for ( i = n - 1 ; ( i >= 0 && arr [ i ] > key ) ; i -- ) arr [ i + 1 ] = arr [ i ] ; arr [ i + 1 ] = key ; return ( n + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{69}); param0.add(new int[]{-34,-38,-72,90,-84,-40,-40,-52,-12,80,-4,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{96,34,11,1,36,79,64,75,75,96,32,18,25,79,63,80,90,75,44,71,48,1,62,53,17,98}); param0.add(new int[]{-98,-92,-92,-84,-82,-80,-80,-74,-70,-60,-48,-42,-36,-34,-34,-34,-30,-28,-16,-6,-2,-2,2,12,14,20,24,40,46,50,60,66,70,72,78,82,88,92,94,94,96}); param0.add(new int[]{1,0,1,1,0,0,1,0,0,0,1,1,0}); param0.add(new int[]{10,12,12,19,20,21,24,27,37,47,50,54,55,58,61,63,63,68,73,75,87,90,90,92,92}); param0.add(new int[]{-74,62,74,92,-38,-28,-26,4,88,-68,-76,-20,-4,12,72,6,42,36,88,-96,-80,90,80,-26,-36,-72,-62,38,-20,40,-10,-22,-20,38,82,-84,8,-60,86,-26,44,-72,-70,-16,-22,18,-16,76,-50}); param0.add(new int[]{1,1,1,1,1}); param0.add(new int[]{64,80,47,58,41,3,85,96,51,4,22,89,67,54,88,15,83,31,19,28,40,67,37,13,63,38,27,14,7,68}); List param1 = new ArrayList<>(); param1.add(0); param1.add(6); param1.add(13); param1.add(21); param1.add(30); param1.add(12); param1.add(12); param1.add(37); param1.add(3); param1.add(23); List param2 = new ArrayList<>(); param2.add(0); param2.add(6); param2.add(19); param2.add(20); param2.add(32); param2.add(9); param2.add(13); param2.add(26); param2.add(4); param2.add(24); List param3 = new ArrayList<>(); param3.add(0); param3.add(9); param3.add(11); param3.add(13); param3.add(28); param3.add(10); param3.add(21); param3.add(42); param3.add(2); param3.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , key , capacity ) : if ( n >= capacity ) : return n i = n - 1 while i >= 0 and arr [ i ] > key : arr [ i + 1 ] = arr [ i ] i -= 1 arr [ i + 1 ] = key return ( n + 1 ) "," using namespace std; int f_gold ( int arr [ ], int n, int key, int capacity ) { if ( n >= capacity ) return n; int i; for ( i = n - 1; ( i >= 0 && arr [ i ] > key ); i -- ) arr [ i + 1 ] = arr [ i ]; arr [ i + 1 ] = key; return ( n + 1 ); } int main() { int n_success = 0; vector> param0 {{69},{-34,-38,-72,90,-84,-40,-40,-52,-12,80,-4,-58},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{96,34,11,1,36,79,64,75,75,96,32,18,25,79,63,80,90,75,44,71,48,1,62,53,17,98},{-98,-92,-92,-84,-82,-80,-80,-74,-70,-60,-48,-42,-36,-34,-34,-34,-30,-28,-16,-6,-2,-2,2,12,14,20,24,40,46,50,60,66,70,72,78,82,88,92,94,94,96},{1,0,1,1,0,0,1,0,0,0,1,1,0},{10,12,12,19,20,21,24,27,37,47,50,54,55,58,61,63,63,68,73,75,87,90,90,92,92},{-74,62,74,92,-38,-28,-26,4,88,-68,-76,-20,-4,12,72,6,42,36,88,-96,-80,90,80,-26,-36,-72,-62,38,-20,40,-10,-22,-20,38,82,-84,8,-60,86,-26,44,-72,-70,-16,-22,18,-16,76,-50},{1,1,1,1,1},{64,80,47,58,41,3,85,96,51,4,22,89,67,54,88,15,83,31,19,28,40,67,37,13,63,38,27,14,7,68}}; vector param1 {0,6,13,21,30,12,12,37,3,23}; vector param2 {0,6,19,20,32,9,13,26,4,24}; vector param3 {0,9,11,13,28,10,21,42,2,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([69],0,0,0,), ([-34, -38, -72, 90, -84, -40, -40, -52, -12, 80, -4, -58],6,6,9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],13,19,11,), ([96, 34, 11, 1, 36, 79, 64, 75, 75, 96, 32, 18, 25, 79, 63, 80, 90, 75, 44, 71, 48, 1, 62, 53, 17, 98],21,20,13,), ([-98, -92, -92, -84, -82, -80, -80, -74, -70, -60, -48, -42, -36, -34, -34, -34, -30, -28, -16, -6, -2, -2, 2, 12, 14, 20, 24, 40, 46, 50, 60, 66, 70, 72, 78, 82, 88, 92, 94, 94, 96],30,32,28,), ([1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0],12,9,10,), ([10, 12, 12, 19, 20, 21, 24, 27, 37, 47, 50, 54, 55, 58, 61, 63, 63, 68, 73, 75, 87, 90, 90, 92, 92],12,13,21,), ([-74, 62, 74, 92, -38, -28, -26, 4, 88, -68, -76, -20, -4, 12, 72, 6, 42, 36, 88, -96, -80, 90, 80, -26, -36, -72, -62, 38, -20, 40, -10, -22, -20, 38, 82, -84, 8, -60, 86, -26, 44, -72, -70, -16, -22, 18, -16, 76, -50],37,26,42,), ([1, 1, 1, 1, 1],3,4,2,), ([64, 80, 47, 58, 41, 3, 85, 96, 51, 4, 22, 89, 67, 54, 88, 15, 83, 31, 19, 28, 40, 67, 37, 13, 63, 38, 27, 14, 7, 68],23,24,25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES{ static int f_gold ( int arr [ ] , int n ) { int LIS [ ] = new int [ n ] ; int len = 0 ; for ( int i = 0 ; i < n ; i ++ ) LIS [ i ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { if ( arr [ i ] > arr [ j ] && ( i - j ) <= ( arr [ i ] - arr [ j ] ) ) LIS [ i ] = Math . max ( LIS [ i ] , LIS [ j ] + 1 ) ; } len = Math . max ( len , LIS [ i ] ) ; } return n - len ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99}); param0.add(new int[]{-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{68,79,87,44,3,99,80,6,46,67,72,40,11,18,73,48,18,72,10,38,3,39,26,76,47,15,85,69}); param0.add(new int[]{-96,-94,-94,-74,-68,-60,-58,-56,-56,-52,-52,-50,-44,-40,-26,-24,-10,-8,-6,-2,2,2,12,14,20,24,26,30,38,40,52,52,62,62,68,70,74,76,80,82,90,92}); param0.add(new int[]{1,1,1,0,1}); param0.add(new int[]{1,5,11,20,24,28,29,31,54,58,63,65,66,71,77,80,83,92,93,93}); param0.add(new int[]{-50,-46,-44,-90,2,-38,88,-26,60}); param0.add(new int[]{1,1}); param0.add(new int[]{2,1,19,26,65,47,3,65,9,12,84,59,74,59,30,83,73,67,13,5,64,83,81,92,80,14,58,84,92}); List param1 = new ArrayList<>(); param1.add(21); param1.add(22); param1.add(6); param1.add(15); param1.add(31); param1.add(3); param1.add(12); param1.add(7); param1.add(1); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : LIS = [ 0 for i in range ( n ) ] len = 0 for i in range ( n ) : LIS [ i ] = 1 for i in range ( 1 , n ) : for j in range ( i ) : if ( arr [ i ] > arr [ j ] and ( i - j ) <= ( arr [ i ] - arr [ j ] ) ) : LIS [ i ] = max ( LIS [ i ] , LIS [ j ] + 1 ) len = max ( len , LIS [ i ] ) return ( n - len ) "," using namespace std; int f_gold ( int arr [ ], int n ) { int LIS [ n ], len = 0; for ( int i = 0; i < n; i ++ ) LIS [ i ] = 1; for ( int i = 1; i < n; i ++ ) { for ( int j = 0; j < i; j ++ ) { if ( arr [ i ] > arr [ j ] && ( i - j ) <= ( arr [ i ] - arr [ j ] ) ) { LIS [ i ] = max ( LIS [ i ], LIS [ j ] + 1 ); } } len = max ( len, LIS [ i ] ); } return n - len; } int main() { int n_success = 0; vector> param0 {{1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99},{-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54},{0,0,0,0,0,0,1,1,1,1,1,1},{68,79,87,44,3,99,80,6,46,67,72,40,11,18,73,48,18,72,10,38,3,39,26,76,47,15,85,69},{-96,-94,-94,-74,-68,-60,-58,-56,-56,-52,-52,-50,-44,-40,-26,-24,-10,-8,-6,-2,2,2,12,14,20,24,26,30,38,40,52,52,62,62,68,70,74,76,80,82,90,92},{1,1,1,0,1},{1,5,11,20,24,28,29,31,54,58,63,65,66,71,77,80,83,92,93,93},{-50,-46,-44,-90,2,-38,88,-26,60},{1,1},{2,1,19,26,65,47,3,65,9,12,84,59,74,59,30,83,73,67,13,5,64,83,81,92,80,14,58,84,92}}; vector param1 {21,22,6,15,31,3,12,7,1,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 4, 12, 14, 15, 18, 20, 24, 25, 25, 27, 33, 34, 42, 46, 48, 49, 50, 50, 52, 55, 56, 57, 58, 64, 65, 66, 69, 72, 75, 78, 80, 84, 90, 92, 95, 99],21,), ([-56, 6, -74, -30, 34, 40, -76, -10, -12, -86, -76, 36, -72, 82, 38, 68, 28, 84, 98, -84, 6, 16, -46, 8, 2, -18, -50, 4, -96, 88, -84, -38, -82, -54],22,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],6,), ([68, 79, 87, 44, 3, 99, 80, 6, 46, 67, 72, 40, 11, 18, 73, 48, 18, 72, 10, 38, 3, 39, 26, 76, 47, 15, 85, 69],15,), ([-96, -94, -94, -74, -68, -60, -58, -56, -56, -52, -52, -50, -44, -40, -26, -24, -10, -8, -6, -2, 2, 2, 12, 14, 20, 24, 26, 30, 38, 40, 52, 52, 62, 62, 68, 70, 74, 76, 80, 82, 90, 92],31,), ([1, 1, 1, 0, 1],3,), ([1, 5, 11, 20, 24, 28, 29, 31, 54, 58, 63, 65, 66, 71, 77, 80, 83, 92, 93, 93],12,), ([-50, -46, -44, -90, 2, -38, 88, -26, 60],7,), ([1, 1],1,), ([2, 1, 19, 26, 65, 47, 3, 65, 9, 12, 84, 59, 74, 59, 30, 83, 73, 67, 13, 5, 64, 83, 81, 92, 80, 14, 58, 84, 92],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", C_PROGRAM_FACTORIAL_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class C_PROGRAM_FACTORIAL_NUMBER_1{ static int f_gold ( int n ) { int res = 1 , i ; for ( i = 2 ; i <= n ; i ++ ) res *= i ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(15); param0.add(7); param0.add(16); param0.add(67); param0.add(71); param0.add(16); param0.add(77); param0.add(27); param0.add(37); param0.add(73); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ; "," using namespace std; unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; } int main() { int n_success = 0; vector param0 {15,7,16,67,71,16,77,27,37,73}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (15,), (7,), (16,), (67,), (71,), (16,), (77,), (27,), (37,), (73,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EQUILIBRIUM_INDEX_OF_AN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EQUILIBRIUM_INDEX_OF_AN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { int sum = 0 ; int leftsum = 0 ; for ( int i = 0 ; i < n ; ++ i ) sum += arr [ i ] ; for ( int i = 0 ; i < n ; ++ i ) { sum -= arr [ i ] ; if ( leftsum == sum ) return i ; leftsum += arr [ i ] ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{24,31,44,52,78,95}); param0.add(new int[]{-78,-38,22,58,68,-60,-30,6,58,20,-64,-40,-14,80,-2,-88,-68,-16,-4,78,-38,-74,78,-72,46,-12,82,-76,-98,-28,-32,88,72,72,64,-10,98,-24,-96}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{98,69,41,48,40,90,76,61,17,81,74,92,54,16,11,15,8,16,84,86,34,34,75,92,67,54,93,19,31,62,89,26,96,91,32,78,42,84,66,79,29,48,49,5}); param0.add(new int[]{-28,42}); param0.add(new int[]{1,1,1,1,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1}); param0.add(new int[]{18,21,23,24,36,37,39,49,55,68,80,81,88,90}); param0.add(new int[]{94,22,42,-42,78,50,96,98,46,74,98,84,-2,-76,48,18,28,-62,78,6,-76,-12,46,62,14,76,44,-26,-92,12,62,-72,-42}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{1,23,18,91,65,2,73,12,91,47,14,48,1,69,95,81,59,36,79,35,9,52,55,73,54,25,8,41,64,96}); List param1 = new ArrayList<>(); param1.add(4); param1.add(19); param1.add(11); param1.add(27); param1.add(1); param1.add(25); param1.add(11); param1.add(32); param1.add(14); param1.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int sum = 0; int leftsum = 0; for ( int i = 0; i < n; ++ i ) sum += arr [ i ]; for ( int i = 0; i < n; ++ i ) { sum -= arr [ i ]; if ( leftsum == sum ) return i; leftsum += arr [ i ]; } return - 1; } int main() { int n_success = 0; vector> param0 {{24,31,44,52,78,95},{-78,-38,22,58,68,-60,-30,6,58,20,-64,-40,-14,80,-2,-88,-68,-16,-4,78,-38,-74,78,-72,46,-12,82,-76,-98,-28,-32,88,72,72,64,-10,98,-24,-96},{0,0,0,0,0,0,0,0,1,1,1,1},{98,69,41,48,40,90,76,61,17,81,74,92,54,16,11,15,8,16,84,86,34,34,75,92,67,54,93,19,31,62,89,26,96,91,32,78,42,84,66,79,29,48,49,5},{-28,42},{1,1,1,1,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1},{18,21,23,24,36,37,39,49,55,68,80,81,88,90},{94,22,42,-42,78,50,96,98,46,74,98,84,-2,-76,48,18,28,-62,78,6,-76,-12,46,62,14,76,44,-26,-92,12,62,-72,-42},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{1,23,18,91,65,2,73,12,91,47,14,48,1,69,95,81,59,36,79,35,9,52,55,73,54,25,8,41,64,96}}; vector param1 {4,19,11,27,1,25,11,32,14,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT{ static int f_gold ( int n ) { int sum = 0 ; while ( n != 0 ) { sum = sum + n % 10 ; n = n / 10 ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(21); param0.add(11); param0.add(64); param0.add(88); param0.add(62); param0.add(17); param0.add(49); param0.add(22); param0.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): sum = 0 while (n != 0): sum = sum + int(n % 10) n = int(n / 10) return sum ",,," if __name__ == '__main__': param = [ (57,), (21,), (11,), (64,), (88,), (62,), (17,), (49,), (22,), (19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_DIFFERENCE_SUM_ELEMENTS_TWO_ROWS_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_DIFFERENCE_SUM_ELEMENTS_TWO_ROWS_MATRIX{ static int f_gold ( int mat [ ] [ ] , int m , int n ) { int rowSum [ ] = new int [ m ] ; for ( int i = 0 ; i < m ; i ++ ) { int sum = 0 ; for ( int j = 0 ; j < n ; j ++ ) sum += mat [ i ] [ j ] ; rowSum [ i ] = sum ; } int max_diff = rowSum [ 1 ] - rowSum [ 0 ] ; int min_element = rowSum [ 0 ] ; for ( int i = 1 ; i < m ; i ++ ) { if ( rowSum [ i ] - min_element > max_diff ) max_diff = rowSum [ i ] - min_element ; if ( rowSum [ i ] < min_element ) min_element = rowSum [ i ] ; } return max_diff ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,5,5,6,6,7,7,11,12,15,17,24,25,27,30,33,35,36,38,41,42,44,44,46,50,53,53,56,58,67,71,71,77,78,85,85,87,87,89,91,94,96,97,98,99,99},new int[]{1,3,3,6,7,12,18,19,21,21,23,25,25,26,33,37,38,39,39,39,41,42,43,46,49,50,54,56,57,60,66,67,67,68,69,71,75,76,85,86,88,90,91,93,98,98},new int[]{2,2,3,9,15,18,21,21,23,24,27,28,28,28,30,34,36,38,40,43,45,46,46,49,53,53,55,58,66,66,67,68,70,72,73,73,75,77,78,80,83,84,88,89,95,98},new int[]{1,3,6,6,7,7,8,11,15,21,21,24,28,28,29,30,31,31,33,34,36,46,47,49,51,58,64,65,69,70,70,76,78,81,86,86,87,89,90,92,93,94,97,97,97,99},new int[]{10,11,12,12,17,19,23,24,25,26,28,31,31,33,35,39,41,42,42,45,49,50,53,56,57,60,60,62,63,64,64,65,66,68,71,77,77,80,80,81,84,84,86,86,90,92},new int[]{2,2,3,7,8,10,11,12,13,19,20,22,24,24,27,29,30,32,34,35,37,37,37,38,39,39,39,44,54,54,57,62,63,64,64,70,72,73,84,84,85,87,89,94,95,95},new int[]{1,1,4,4,6,7,20,22,24,25,26,31,31,35,38,41,41,42,47,48,48,50,51,56,56,57,57,58,61,62,67,68,72,75,75,77,80,81,83,83,84,87,88,97,97,98},new int[]{2,3,10,13,16,23,26,27,29,30,35,35,36,39,41,42,45,48,49,49,56,56,59,59,59,60,60,61,62,64,67,67,71,73,76,78,81,83,86,87,87,88,89,92,97,99},new int[]{8,13,14,15,16,16,19,25,25,28,29,30,30,34,36,38,40,41,41,43,46,48,49,49,49,50,53,55,57,63,64,64,66,70,74,74,77,77,78,83,84,92,93,93,96,99},new int[]{2,3,5,5,6,6,6,8,8,14,15,19,22,23,27,28,31,32,33,34,34,36,38,42,43,49,55,57,58,68,71,71,74,77,81,85,85,87,90,91,92,94,96,97,97,98},new int[]{1,4,5,8,9,9,16,16,19,20,21,24,25,25,26,29,30,34,38,39,40,46,48,49,55,56,57,57,59,62,63,64,64,69,70,73,77,78,78,85,85,91,92,93,95,97},new int[]{1,5,11,11,15,15,15,23,30,31,34,37,39,39,44,44,46,47,47,47,48,49,50,53,54,58,62,64,66,67,68,69,73,74,80,82,82,84,85,89,91,91,93,96,97,98},new int[]{2,3,5,7,8,9,9,10,14,18,20,21,25,28,31,33,33,34,34,39,45,47,48,49,49,54,58,64,71,74,74,75,78,82,82,83,84,88,92,92,93,94,95,95,98,99},new int[]{1,2,6,9,9,9,15,15,17,17,24,25,26,27,28,28,30,30,33,34,36,39,41,42,46,46,53,59,62,65,68,69,70,71,72,74,76,78,83,84,90,92,96,98,98,99},new int[]{1,1,3,5,7,8,8,10,11,18,18,18,21,30,35,36,43,51,51,53,54,57,58,58,58,59,60,60,60,61,63,68,70,74,76,82,83,87,87,87,91,91,92,93,97,99},new int[]{3,3,3,6,11,13,13,14,16,16,22,28,29,29,32,35,38,51,51,52,53,57,58,62,67,70,71,73,73,76,76,76,80,80,83,84,84,86,87,91,92,95,95,96,96,99},new int[]{1,3,7,7,7,9,9,10,16,21,23,23,24,24,26,27,36,37,43,44,48,50,51,52,53,56,57,58,59,66,68,69,72,73,74,76,77,77,80,81,81,81,84,84,90,98},new int[]{1,1,2,6,10,12,13,14,15,16,20,22,22,22,24,25,26,30,34,35,35,37,38,39,43,43,43,49,50,56,57,62,64,66,67,68,71,78,82,84,86,86,89,90,94,96},new int[]{2,5,6,7,7,9,9,12,20,21,23,25,30,32,37,40,41,43,43,45,45,45,57,60,61,61,61,63,66,67,67,68,69,70,73,74,75,78,82,83,84,87,89,90,99,99},new int[]{8,11,12,16,22,23,23,27,28,29,31,38,39,41,42,42,48,48,52,52,57,58,60,60,63,66,66,67,69,72,74,75,75,76,76,78,79,80,84,86,92,92,94,94,96,98},new int[]{2,3,4,6,6,14,14,16,17,20,22,23,26,28,28,29,29,31,32,32,38,40,42,45,51,52,54,56,62,65,66,68,73,79,80,81,87,87,88,89,89,89,91,93,96,97},new int[]{4,6,9,12,13,14,16,17,18,23,25,25,26,27,29,33,34,45,45,46,49,51,51,51,52,53,59,59,64,66,67,67,70,71,72,77,77,78,82,82,84,90,93,94,96,99},new int[]{1,2,7,8,9,11,19,20,23,23,24,29,29,34,41,46,48,51,51,53,54,59,61,65,67,72,74,76,76,77,80,81,81,84,87,88,90,91,92,92,93,95,96,96,97,99},new int[]{1,3,4,6,8,9,9,9,9,10,15,23,24,24,25,32,34,35,38,42,43,44,45,45,48,49,53,57,57,60,60,68,70,72,72,73,74,76,76,77,79,80,83,85,94,96},new int[]{2,5,7,11,12,12,14,15,16,18,20,21,25,25,26,29,35,41,43,44,47,47,50,52,52,55,57,58,60,62,67,68,69,73,74,76,78,85,86,87,87,87,90,91,94,96},new int[]{1,3,5,7,7,8,10,11,13,17,24,25,26,29,30,32,33,35,36,40,41,43,44,47,49,51,54,57,59,65,69,73,74,80,80,82,82,82,84,85,85,87,90,94,95,97},new int[]{1,4,6,8,13,13,13,17,17,18,22,23,23,24,24,30,32,33,36,36,36,39,40,41,43,43,45,49,51,55,55,56,57,61,63,65,65,68,69,71,72,72,77,80,96,99},new int[]{1,2,3,6,7,8,10,12,13,14,17,18,19,22,23,25,28,29,31,33,34,36,36,38,41,42,42,45,48,49,49,49,50,53,54,62,70,72,77,79,84,85,92,92,93,99},new int[]{1,1,6,7,11,14,17,17,21,28,29,31,32,37,40,43,44,46,47,52,56,58,59,60,63,65,68,70,75,81,81,81,82,84,85,85,88,92,92,93,94,95,95,95,99,99},new int[]{1,4,4,7,9,11,12,14,14,14,19,24,26,28,29,31,36,39,41,45,45,46,47,49,58,60,60,62,63,71,72,76,76,76,77,78,80,81,83,84,84,85,89,94,97,98},new int[]{1,7,10,13,15,16,16,18,19,22,26,28,33,35,36,37,38,40,41,42,42,45,46,47,48,54,54,54,58,64,65,66,67,67,68,70,71,72,74,77,78,84,85,88,88,93},new int[]{2,2,2,5,8,8,20,22,27,28,30,31,32,33,34,36,37,38,39,41,42,50,50,55,59,63,65,66,71,73,74,76,78,81,86,89,90,91,93,94,94,94,95,96,98,98},new int[]{1,1,2,3,5,5,7,7,7,9,10,10,14,16,20,24,26,31,36,40,44,46,49,50,50,50,54,56,58,60,62,62,63,66,67,74,75,75,79,82,90,91,91,93,93,95},new int[]{3,7,9,9,10,13,15,16,19,20,22,24,28,32,36,37,39,40,42,43,43,43,45,46,50,50,52,57,58,61,69,70,71,72,74,76,78,83,83,87,87,89,91,96,98,99},new int[]{1,8,8,9,16,17,18,20,20,20,22,27,28,29,29,30,31,34,36,41,43,47,51,52,55,56,58,66,67,67,68,70,71,75,76,78,79,80,80,85,87,90,94,94,95,96},new int[]{4,4,5,7,7,18,19,21,22,24,24,26,29,31,33,36,37,38,47,50,50,51,51,52,53,53,53,53,55,55,55,57,58,73,76,76,80,81,83,85,86,87,89,90,91,97},new int[]{1,3,5,12,15,18,18,20,22,26,26,27,28,29,31,32,32,35,36,39,40,42,47,47,49,51,51,51,51,57,62,62,64,66,70,71,72,73,74,84,84,88,89,94,96,97},new int[]{10,11,13,15,15,17,17,18,21,22,24,24,26,28,32,33,34,35,39,40,45,46,48,50,54,55,55,56,57,60,62,62,63,63,67,67,68,68,71,72,78,79,80,90,97,98},new int[]{1,5,7,7,9,11,14,22,25,26,28,31,34,37,38,44,46,47,47,48,48,52,52,53,54,54,54,57,60,61,67,74,75,77,78,80,80,81,81,86,91,92,94,97,98,99},new int[]{2,3,11,15,15,16,22,22,24,31,32,32,32,33,33,35,36,41,43,44,46,46,47,50,54,55,55,57,59,65,67,67,68,70,70,73,74,79,82,84,84,86,87,87,94,97},new int[]{1,2,2,3,5,7,9,12,12,12,13,16,19,19,22,23,23,27,30,32,33,38,43,47,47,47,50,53,53,56,57,59,60,64,67,70,73,78,81,82,88,88,92,95,97,98},new int[]{2,3,3,5,6,8,20,23,24,26,27,28,35,38,38,40,43,44,44,46,47,49,51,53,56,58,59,63,63,64,65,67,68,68,69,70,76,80,82,85,86,87,88,92,92,96},new int[]{1,1,2,2,4,5,8,10,11,14,15,17,17,18,23,31,35,36,42,44,48,49,51,52,52,61,64,66,67,68,70,72,75,77,78,81,84,85,87,95,97,98,98,98,98,99},new int[]{2,6,6,7,9,11,16,17,26,26,28,35,36,43,44,46,48,50,51,53,53,54,56,57,58,67,68,68,68,73,73,74,75,77,78,78,78,79,80,85,86,91,92,92,98,99},new int[]{3,9,9,12,15,19,19,30,31,34,35,35,39,40,47,49,49,53,58,58,59,61,61,63,64,66,67,69,70,70,71,74,77,77,78,82,84,90,90,90,91,92,92,94,95,97},new int[]{3,4,8,8,8,9,10,23,27,27,31,31,36,38,38,39,40,41,41,41,46,48,51,54,55,55,65,65,67,74,74,77,79,83,83,84,86,87,89,89,90,92,93,97,98,99}}); param0.add(new int[][]{new int[]{-38,-60,88,-62,64,-80,-6,-2,92,70,-90,90,-48,12,-90,38,-32,-62,-64,-86,28,-72,42,-56,42,72,80,40,-20,-2,36,-74,70,-76,-98,2,2,12,-4,-36,48,-60,-36,-94},new int[]{46,-60,-56,-72,84,42,-58,20,94,42,40,18,-48,34,-40,-64,38,80,64,-96,-94,34,-24,-30,0,-82,-70,56,-30,-12,-86,-34,18,62,46,90,-82,-60,-60,8,52,58,76,-18},new int[]{-36,-60,-48,96,-22,-96,16,-16,94,20,52,-14,94,-12,-62,-10,24,86,-40,-92,30,-6,-74,60,42,-84,30,-38,70,30,-2,-96,96,-68,54,-38,38,94,-62,-54,0,32,-86,76},new int[]{18,52,-66,-96,-56,10,14,40,-96,-58,72,30,-24,80,-22,46,0,-88,-10,0,-82,-76,-70,-38,-52,72,-60,40,-92,30,18,70,-58,76,-60,98,98,42,-70,-66,26,-18,-24,0},new int[]{6,-98,22,-4,8,84,52,-72,34,-68,-86,-4,-92,92,-74,76,46,30,0,-10,-4,-28,62,72,78,84,96,-12,30,12,-56,46,66,-12,96,-52,-26,-52,-62,68,-8,-84,68,-98},new int[]{-90,42,78,-70,-6,-82,68,26,20,18,30,64,12,-98,-90,22,-64,-60,-34,-24,-30,-76,-62,28,6,-58,-70,-52,34,-72,80,-6,-66,58,28,30,-38,80,-58,26,72,-46,-18,-74},new int[]{-2,-40,-52,-68,-80,86,-78,18,-60,-18,-94,-50,-30,-22,-40,-76,58,4,-88,-82,32,-52,76,62,-22,6,76,-80,38,34,82,-50,18,-4,-96,72,-46,22,-66,46,-50,-34,28,2},new int[]{-18,94,94,-92,-96,64,60,94,8,10,-14,74,12,28,58,18,-68,-66,20,-84,6,-54,88,76,-72,-94,-84,-28,22,-84,-50,-22,66,86,-12,-52,66,-82,-24,0,62,-74,58,10},new int[]{86,26,-24,-10,-46,42,86,-76,-42,0,-74,-86,-32,88,-50,12,-14,-88,-94,8,38,-72,-26,-8,56,-36,82,-80,-12,42,-86,96,-90,-34,-6,-86,-72,52,-42,80,86,26,-72,8},new int[]{-26,-10,44,-70,-22,-40,4,82,40,-18,-64,72,10,36,-76,78,52,-58,4,-60,-52,-32,-58,-68,32,-82,82,-80,6,58,44,26,-44,-48,-98,-42,-48,-46,4,48,-36,-84,10,0},new int[]{50,-64,98,0,-90,80,80,-24,-84,-22,-84,-6,76,26,36,-82,-46,-92,86,54,-18,22,76,98,16,64,-32,62,84,58,-16,-22,46,-76,-58,40,26,28,-62,-66,-60,-20,72,-68},new int[]{-20,14,-4,-90,14,86,22,26,20,-80,96,-20,-90,50,-94,10,-96,46,-74,58,84,24,-60,64,-28,-58,18,-52,-64,-54,52,-26,78,-50,-80,-8,-4,-30,78,-2,32,70,84,-60},new int[]{22,98,26,-72,6,-24,98,74,-48,-48,76,-12,-88,48,-56,-52,78,-58,58,-72,86,-78,-70,36,26,4,-98,-32,90,-96,-42,-18,90,-8,-84,-4,72,24,-6,60,38,-72,14,-2},new int[]{-24,-10,-16,-92,-52,6,-44,-84,0,98,88,-4,58,4,-20,28,-58,32,64,68,-66,96,36,16,-74,42,-96,70,-92,48,-52,-58,40,-46,82,-36,-68,-10,94,-62,-34,-86,-6,4},new int[]{32,96,22,22,-82,-14,-58,-78,44,-70,-30,-62,-56,-52,42,26,-48,18,18,80,-82,50,-12,90,20,6,72,-30,-80,-56,72,68,0,-70,-28,52,-52,-64,86,36,-38,-30,24,-64},new int[]{22,-74,-30,54,76,58,-88,56,-30,-48,4,18,-28,54,42,-2,8,-32,-20,4,-40,-74,78,42,6,26,94,50,94,-78,-16,54,36,-42,-6,-10,-70,84,62,68,-76,-12,-46,-30},new int[]{56,-8,86,-22,-80,28,8,-10,-40,-4,0,-70,-70,26,-70,-70,-84,-24,-10,-84,-12,72,8,-46,38,2,86,-46,48,-62,60,-36,-18,-56,-84,98,6,-24,-22,12,2,72,34,40},new int[]{12,-4,-66,-10,-20,-4,96,2,76,72,40,64,-6,48,32,-76,18,42,66,22,12,62,34,-50,10,68,94,-2,82,20,8,26,22,-48,42,28,-70,-58,88,-18,12,14,-46,-96},new int[]{70,-32,42,-72,54,54,-92,-62,30,-58,50,-96,68,-32,40,-64,76,-54,88,98,86,74,62,28,-62,0,60,-94,24,52,70,44,76,-24,-46,-50,74,-2,40,36,-52,-40,46,88},new int[]{46,-14,-6,56,-94,-18,-24,-36,-2,98,28,-40,36,-36,82,-62,88,-46,-70,-64,-30,34,-14,18,-20,52,-96,-80,-20,-68,-62,-24,60,54,66,40,14,6,20,-90,-20,46,66,56},new int[]{4,14,-78,-26,-16,10,40,-74,60,-80,46,28,80,-66,-28,76,-4,50,-4,66,-38,0,46,52,98,14,-4,92,92,-14,24,24,90,-66,-86,20,-44,80,-26,-50,92,92,86,-38},new int[]{-44,-74,44,-46,-32,-50,52,94,-86,46,8,56,6,12,54,66,-22,18,-74,-54,-88,42,16,8,-22,96,-78,98,18,-16,72,44,-46,36,4,72,-70,-68,-64,20,-60,-50,84,-64},new int[]{8,82,24,-46,-62,78,-72,94,-8,42,18,74,-40,-94,-86,70,-34,-20,58,32,-14,-42,-46,-14,6,2,74,16,92,20,6,-62,40,-40,88,-12,82,18,-22,22,38,-88,28,90},new int[]{82,-92,96,88,-64,38,14,-22,56,-84,2,-16,-88,-4,-50,-74,-10,-36,68,22,-92,50,-12,54,-84,-24,-50,-72,12,38,74,-32,-26,-96,38,14,-50,94,74,-78,-56,96,-68,14},new int[]{-22,46,-52,16,28,-22,-48,-96,92,-54,-40,86,30,-4,-86,-92,-52,-18,-98,-78,38,70,-86,98,72,30,90,-28,36,58,14,12,98,-54,36,-32,-16,-76,88,32,-28,-4,52,30},new int[]{38,-90,44,54,-2,16,-16,-66,62,98,32,-82,-12,12,-66,54,-72,64,-10,30,40,0,-90,90,-54,-92,-48,58,10,-4,-24,-86,-68,70,24,-38,-56,-78,-16,56,70,88,0,54},new int[]{-50,2,18,-6,-12,64,-12,64,-44,16,-16,20,72,32,-54,-22,-12,56,84,-48,-60,-90,-70,-12,-4,-72,-78,16,22,12,48,-2,-82,-94,48,30,76,-12,94,-8,-10,-8,-46,-22},new int[]{96,56,-22,-44,-30,92,-56,26,-42,60,-2,58,52,8,-48,70,-38,-32,-92,14,26,76,48,84,-96,42,32,38,6,-70,-58,4,58,86,-54,-4,80,94,18,28,-82,4,-14,-80},new int[]{-70,-4,88,20,-96,64,-64,-66,-44,50,-72,-56,90,38,46,-84,68,66,-42,52,2,-6,94,78,-48,84,-78,82,-78,96,24,-12,-78,60,54,26,-20,-80,-26,-42,66,-40,-8,-74},new int[]{-60,-36,-16,18,24,54,-52,-28,-48,10,-16,-28,-26,-44,72,38,-56,70,28,42,-38,66,-34,-92,-42,66,-18,6,-64,72,-22,-72,82,4,-14,-98,20,-92,84,98,84,-92,-96,20},new int[]{-66,8,-92,76,-24,-36,-18,-62,-62,12,26,-12,-64,-26,-16,-42,2,82,-16,-74,-60,8,62,-8,0,-66,-52,-44,-54,58,16,94,-90,-60,-2,-14,18,16,-22,-88,-60,-16,26,-18},new int[]{-22,-42,20,-58,72,86,2,-94,32,-16,-68,-96,10,-74,40,-78,96,-92,-94,6,-26,-50,-28,-34,62,10,74,-82,0,4,58,-62,28,14,26,2,-40,-68,42,42,80,4,-48,-74},new int[]{-40,26,-68,-60,-22,-50,70,-42,54,30,-40,-70,66,-8,-66,24,28,-46,68,8,-4,84,66,54,22,-80,-20,-28,2,6,24,88,-70,-80,22,-96,-50,60,-76,-32,26,-58,6,6},new int[]{-60,28,-56,-4,-8,-32,-12,48,48,94,18,30,-56,72,-70,68,-26,-48,22,18,64,78,38,-90,18,-34,90,-98,82,-26,-80,-34,-22,72,58,82,-96,-20,-80,16,-50,-4,24,64},new int[]{-18,-62,54,32,82,-22,70,16,88,-34,70,16,-6,-80,34,-42,78,30,-36,96,96,-62,22,-96,-6,0,-60,-70,40,-62,8,-92,-62,90,-88,-78,86,-38,26,18,82,-96,-42,30},new int[]{-48,-20,-42,-34,76,64,2,4,6,8,56,-98,-50,-16,68,-12,78,-88,62,46,22,28,36,36,-46,78,-86,-78,-10,-98,-24,-48,-62,-26,-4,78,-84,-56,-48,-74,-2,72,-86,14},new int[]{-42,-74,54,-28,-16,94,40,44,-22,10,42,38,46,68,72,32,84,-6,-30,-54,-62,30,94,36,-18,-30,66,52,18,-24,-16,-60,-56,-2,-78,80,-60,20,-72,-24,-48,-86,-16,-12},new int[]{46,-38,-28,-72,80,-8,-28,28,-28,4,-84,56,-48,28,-54,34,84,28,-52,38,-34,20,84,-10,36,-60,54,-66,-8,-54,-44,-82,56,-78,-76,-94,24,30,30,-78,-22,-48,22,44},new int[]{-10,-84,66,60,40,-56,86,16,44,-50,-62,34,-44,30,-62,96,76,-98,-50,-50,36,-74,42,-82,44,-32,-48,58,22,82,82,94,-70,-92,-96,-78,-70,84,-44,-70,82,-92,-96,-50},new int[]{40,-86,66,64,98,86,18,20,54,-92,-26,56,-96,-28,16,52,42,36,-64,44,-96,-56,78,94,-54,24,-62,82,-36,-90,-40,50,-72,-54,80,12,-24,30,-48,2,-64,96,-66,94},new int[]{80,4,-82,-24,18,24,-78,-4,-14,38,-10,-70,-78,-26,6,46,78,16,-48,94,4,46,54,-84,-56,-76,-50,-30,-94,-58,-96,32,-2,-16,76,-94,54,-96,96,-18,80,60,-82,74},new int[]{12,-4,-66,54,82,24,-84,62,-58,-52,8,-74,-62,56,86,-82,30,86,46,78,94,24,44,2,62,-48,58,34,-74,-52,32,46,92,28,72,-36,-14,-98,68,-92,12,56,-40,-64},new int[]{-48,-98,52,-92,88,30,42,90,56,76,44,-58,-72,-28,-54,26,-36,-28,-54,64,22,2,-58,30,12,-92,40,46,54,-16,-74,-2,30,72,56,96,-86,76,-28,-26,76,32,-46,-22},new int[]{6,16,74,-22,-20,-12,50,50,16,50,58,-16,-76,68,66,36,-52,98,64,84,-50,88,-40,-22,-2,-94,48,70,46,-36,20,74,-10,20,-98,-26,-58,80,78,-66,-66,-28,46,-40}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1}}); param0.add(new int[][]{new int[]{73,62,15,20,30,7,64,47,16,52,55,87,49,78,88,59,29,62,70},new int[]{8,6,26,49,12,22,62,79,79,7,38,44,68,23,38,35,52,91,46},new int[]{48,26,67,1,45,46,37,11,25,35,79,3,10,87,65,22,99,20,7},new int[]{56,58,1,24,66,45,43,71,43,66,51,46,95,72,38,13,53,70,70},new int[]{91,38,39,29,88,50,81,47,29,64,26,76,37,24,1,30,70,93,99},new int[]{66,67,92,20,36,5,28,62,57,94,9,89,81,64,55,68,36,44,41},new int[]{85,37,47,87,73,77,56,49,73,35,94,62,26,95,59,96,77,71,21},new int[]{89,38,3,80,35,75,1,39,92,10,94,55,60,95,22,42,85,98,19},new int[]{52,99,43,54,60,70,15,4,25,58,45,28,5,9,40,41,53,63,35},new int[]{76,43,87,77,58,81,44,99,64,16,55,17,76,20,81,74,1,61,10},new int[]{14,44,60,78,72,24,31,26,86,50,77,35,64,87,57,13,79,7,51},new int[]{6,35,77,25,14,30,30,88,60,63,60,30,97,14,44,75,15,82,74},new int[]{16,3,1,29,70,16,42,45,86,16,77,93,69,19,20,93,14,62,84},new int[]{9,40,39,99,39,51,6,26,71,73,41,40,29,69,48,8,98,81,45},new int[]{52,50,89,89,99,72,84,49,86,70,48,34,35,25,79,21,47,68,99},new int[]{15,71,84,46,30,57,73,52,96,40,99,16,68,51,58,48,65,7,29},new int[]{55,2,13,73,91,76,24,80,39,2,34,62,90,81,96,67,31,37,34},new int[]{56,7,51,88,69,1,28,68,19,8,26,36,27,96,80,49,55,8,79},new int[]{74,90,52,48,12,13,9,94,61,8,7,49,53,79,99,71,81,18,55}}); param0.add(new int[][]{new int[]{-92,-78,-78,-52,-46,-42,-38,-24,-18,-6,2,8,14,20,58,80,84},new int[]{-86,-76,-66,-42,-26,-24,-18,-12,2,4,10,10,14,56,62,78,80},new int[]{-82,-76,-60,-40,-40,-34,-22,-8,0,10,16,24,56,64,68,80,92},new int[]{-86,-74,-72,-60,-58,-30,-12,-4,2,10,24,30,34,58,64,84,96},new int[]{-88,-88,-88,-84,-66,-48,-32,-32,-18,-18,-12,2,12,40,58,72,86},new int[]{-80,-70,-64,-50,-48,-44,-26,-24,-20,-16,-8,16,24,26,48,48,76},new int[]{-96,-94,-94,-66,-50,-46,-34,-34,-10,0,2,20,24,40,82,84,98},new int[]{-90,-78,-66,-34,-20,-10,-10,0,10,20,36,44,58,58,80,80,84},new int[]{-96,-92,-56,-46,-44,-20,16,20,24,28,34,40,42,48,60,78,90},new int[]{-98,-54,-46,-46,-44,-40,-34,-26,-24,-16,2,18,24,24,38,64,82},new int[]{-80,-68,-66,-56,-46,-28,-24,-22,-16,18,20,22,24,52,64,82,98},new int[]{-90,-46,-44,-32,-20,-16,12,28,32,52,54,66,70,70,72,86,88},new int[]{-98,-84,-78,-64,-58,-18,-8,4,38,42,46,46,56,62,62,86,90},new int[]{-98,-52,-52,-36,-8,-6,22,24,26,38,40,44,56,60,66,80,94},new int[]{-88,-80,-72,-58,-50,-22,-20,-10,-6,4,4,8,24,48,70,78,80},new int[]{-88,-70,-60,-58,-50,-42,-36,-24,-6,2,14,20,44,58,74,78,80},new int[]{-76,-50,-46,-40,-30,-24,-10,4,10,14,28,36,40,40,46,56,60}}); param0.add(new int[][]{new int[]{0,0,1,0,0,1},new int[]{1,1,1,0,0,0},new int[]{0,1,0,1,0,1},new int[]{1,0,1,1,0,0},new int[]{1,0,0,1,0,0},new int[]{1,1,0,1,0,1}}); param0.add(new int[][]{new int[]{6,13,16,17,27,30,43,43,44,49,55,60,66,68,74,75,77,84},new int[]{5,17,22,32,34,38,40,43,54,57,60,61,63,66,84,86,87,91},new int[]{4,4,14,19,27,29,29,34,34,44,46,51,53,59,64,77,80,82},new int[]{3,8,13,18,19,28,34,35,40,52,53,53,61,73,81,83,89,98},new int[]{1,5,11,19,25,34,35,37,41,50,71,74,74,76,87,95,97,99},new int[]{1,4,12,17,29,30,44,48,49,54,54,59,60,64,74,78,82,96},new int[]{6,15,16,17,17,23,26,28,36,37,40,47,48,51,52,56,81,94},new int[]{7,9,9,43,47,51,52,56,60,65,68,74,82,88,91,97,98,98},new int[]{1,4,10,17,18,24,31,45,51,51,56,65,68,70,73,77,94,95},new int[]{1,1,12,13,26,27,33,37,39,39,40,41,46,51,61,67,74,87},new int[]{4,6,14,15,16,17,20,22,23,45,55,56,79,80,85,85,98,99},new int[]{16,17,23,23,38,43,43,49,51,66,69,69,69,72,81,84,90,97},new int[]{18,23,25,26,26,29,35,37,45,59,67,73,73,76,79,80,81,85},new int[]{2,6,7,8,15,18,24,33,36,46,53,54,54,66,85,91,91,96},new int[]{2,9,17,23,28,28,35,36,39,48,67,69,74,75,80,85,89,96},new int[]{8,15,16,19,20,31,33,43,52,63,72,79,86,88,91,92,97,99},new int[]{4,5,10,14,34,37,41,44,45,49,72,74,81,84,85,93,96,99},new int[]{1,2,19,20,25,27,31,33,40,48,55,61,63,69,76,81,83,84}}); param0.add(new int[][]{new int[]{4,12,-60,-76},new int[]{-56,66,-84,68},new int[]{-8,14,44,-74},new int[]{54,50,78,0}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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}}); param0.add(new int[][]{new int[]{52,7,95,62,93,89,91,56,59,16,68,28,66,67,28,60,62,73,99,50,82,60,6,98,1,16,98,77,24,53,93,41,57,64},new int[]{58,70,84,33,17,25,71,88,18,52,3,82,29,21,92,7,30,32,22,70,23,3,82,10,51,58,16,8,18,58,88,12,38,24},new int[]{54,57,1,87,51,44,43,24,90,50,11,30,50,76,32,99,28,10,31,90,34,90,96,39,7,22,87,72,49,31,41,71,37,64},new int[]{3,91,36,83,54,80,5,44,86,45,3,33,82,92,49,96,66,97,22,43,39,12,57,97,19,99,14,20,18,24,21,62,50,8},new int[]{84,52,2,31,27,92,11,4,45,39,71,95,86,19,93,93,78,35,49,66,63,57,92,20,42,19,42,71,3,58,8,30,46,36},new int[]{93,21,64,42,14,39,41,71,53,68,17,46,20,66,31,24,84,63,33,58,77,56,25,61,18,26,1,10,17,24,68,39,32,23},new int[]{39,54,68,4,79,78,80,94,47,18,88,9,5,24,15,19,75,50,92,23,95,90,45,21,75,70,54,12,91,15,19,73,95,20},new int[]{6,50,7,65,67,87,75,68,30,89,55,31,22,42,81,71,16,4,53,3,36,69,60,45,57,85,97,99,86,11,62,76,73,7},new int[]{90,92,37,24,45,10,86,79,95,62,61,70,52,84,32,62,51,31,84,58,69,85,96,74,78,11,5,73,22,89,95,86,96,1},new int[]{23,83,80,6,93,80,51,87,21,29,58,92,79,80,57,76,85,49,52,32,38,83,90,14,46,83,68,76,22,58,79,43,78,42},new int[]{3,51,5,9,20,68,89,22,21,39,84,36,23,70,93,33,38,76,43,3,87,9,33,50,52,91,42,76,80,82,96,10,16,98},new int[]{79,84,65,45,18,45,8,42,13,1,62,95,46,53,7,32,43,19,26,63,12,58,56,52,73,50,6,41,14,85,4,35,28,20},new int[]{81,20,82,93,57,57,3,8,93,17,80,34,23,21,71,46,52,77,76,62,67,70,12,99,71,1,4,21,70,56,60,19,79,92},new int[]{39,69,98,82,21,26,68,89,17,8,60,21,36,55,81,44,96,62,87,14,47,14,39,76,49,38,58,84,93,14,15,30,13,16},new int[]{92,70,11,57,19,22,3,39,96,86,46,55,19,40,16,37,50,75,63,50,49,95,89,38,47,8,78,15,64,57,5,8,32,54},new int[]{53,2,4,76,12,39,65,40,70,13,15,42,62,15,23,16,69,47,6,35,54,8,37,53,15,16,62,74,58,31,17,42,50,9},new int[]{55,92,37,74,80,67,21,31,51,10,73,43,54,26,57,40,40,39,67,64,71,4,36,33,85,86,35,97,2,56,25,94,89,29},new int[]{76,13,35,51,17,13,31,6,83,31,5,71,92,2,49,11,89,83,61,82,8,48,91,71,95,55,19,60,85,89,66,25,15,30},new int[]{54,94,58,73,99,27,74,6,89,46,3,16,70,44,6,30,37,50,92,17,79,77,82,69,19,57,95,39,10,13,79,50,20,96},new int[]{78,2,85,80,62,28,17,28,51,37,91,31,99,98,3,19,3,91,12,37,33,18,5,39,93,21,57,71,47,62,76,35,79,6},new int[]{1,90,92,4,33,68,68,31,76,18,81,20,50,97,17,8,38,80,85,56,36,76,20,57,20,5,56,61,2,14,22,8,86,14},new int[]{71,45,94,34,98,3,65,8,88,17,20,98,19,63,11,89,34,62,54,26,94,7,27,28,28,12,7,4,77,12,9,24,65,85},new int[]{70,14,10,88,9,7,56,53,18,17,22,82,79,89,26,52,39,74,21,57,70,71,78,67,27,37,65,90,73,28,78,31,94,91},new int[]{10,99,56,64,46,65,8,74,81,76,44,82,37,84,31,30,93,45,79,35,37,61,51,99,67,19,59,8,28,9,82,88,62,4},new int[]{37,6,2,45,24,60,77,78,78,25,73,25,46,56,99,26,2,59,50,86,18,32,3,82,45,96,88,90,53,91,72,52,20,24},new int[]{51,11,26,53,77,33,83,46,32,63,22,48,64,5,29,95,28,16,5,51,43,27,38,22,5,29,54,54,23,13,80,45,96,85},new int[]{26,54,77,95,90,59,70,7,96,65,33,29,88,79,15,74,52,36,74,56,63,4,42,8,98,55,24,60,68,99,18,86,46,92},new int[]{16,81,86,22,79,79,30,7,77,68,77,50,98,76,98,27,59,10,95,53,55,91,11,18,12,5,22,48,84,3,83,41,7,72},new int[]{62,72,56,90,49,13,25,29,85,47,6,30,59,30,74,55,98,86,75,7,50,34,92,71,28,27,73,76,96,92,67,78,73,36},new int[]{68,91,8,18,61,91,37,26,32,81,77,7,72,88,4,29,67,61,5,23,72,50,79,24,23,72,88,90,51,74,8,2,7,82},new int[]{75,25,11,60,42,36,10,26,11,97,13,77,14,25,39,48,22,39,70,85,42,47,79,96,45,15,10,79,6,93,50,67,66,99},new int[]{43,58,67,95,47,79,13,66,90,52,35,18,87,7,99,6,17,5,84,25,23,46,49,71,23,5,97,50,30,12,99,58,45,19},new int[]{66,54,34,82,61,60,61,18,71,81,67,2,10,90,31,66,54,27,82,58,69,16,30,78,62,66,30,79,86,98,49,43,46,74},new int[]{60,3,19,15,90,29,28,90,96,62,51,37,3,88,71,77,44,40,92,41,96,69,53,41,82,42,49,99,79,21,56,28,7,46}}); List param1 = new ArrayList<>(); param1.add(41); param1.add(30); param1.add(10); param1.add(17); param1.add(8); param1.add(5); param1.add(10); param1.add(2); param1.add(19); param1.add(17); List param2 = new ArrayList<>(); param2.add(32); param2.add(35); param2.add(9); param2.add(10); param2.add(10); param2.add(3); param2.add(13); param2.add(3); param2.add(18); param2.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(mat, m, n): rowSum = [0] * m for i in range(0, m): sum = 0 for j in range(0, n): sum += mat[i][j] rowSum[i] = sum max_diff = rowSum[1] - rowSum[0] min_element = rowSum[0] for i in range(1, m): if (rowSum[i] - min_element > max_diff): max_diff = rowSum[i] - min_element if (rowSum[i] < min_element): min_element = rowSum[i] return max_diff ",,," if __name__ == '__main__': param = [ ([[1, 5, 5, 6, 6, 7, 7, 11, 12, 15, 17, 24, 25, 27, 30, 33, 35, 36, 38, 41, 42, 44, 44, 46, 50, 53, 53, 56, 58, 67, 71, 71, 77, 78, 85, 85, 87, 87, 89, 91, 94, 96, 97, 98, 99, 99], [1, 3, 3, 6, 7, 12, 18, 19, 21, 21, 23, 25, 25, 26, 33, 37, 38, 39, 39, 39, 41, 42, 43, 46, 49, 50, 54, 56, 57, 60, 66, 67, 67, 68, 69, 71, 75, 76, 85, 86, 88, 90, 91, 93, 98, 98], [2, 2, 3, 9, 15, 18, 21, 21, 23, 24, 27, 28, 28, 28, 30, 34, 36, 38, 40, 43, 45, 46, 46, 49, 53, 53, 55, 58, 66, 66, 67, 68, 70, 72, 73, 73, 75, 77, 78, 80, 83, 84, 88, 89, 95, 98], [1, 3, 6, 6, 7, 7, 8, 11, 15, 21, 21, 24, 28, 28, 29, 30, 31, 31, 33, 34, 36, 46, 47, 49, 51, 58, 64, 65, 69, 70, 70, 76, 78, 81, 86, 86, 87, 89, 90, 92, 93, 94, 97, 97, 97, 99], [10, 11, 12, 12, 17, 19, 23, 24, 25, 26, 28, 31, 31, 33, 35, 39, 41, 42, 42, 45, 49, 50, 53, 56, 57, 60, 60, 62, 63, 64, 64, 65, 66, 68, 71, 77, 77, 80, 80, 81, 84, 84, 86, 86, 90, 92], [2, 2, 3, 7, 8, 10, 11, 12, 13, 19, 20, 22, 24, 24, 27, 29, 30, 32, 34, 35, 37, 37, 37, 38, 39, 39, 39, 44, 54, 54, 57, 62, 63, 64, 64, 70, 72, 73, 84, 84, 85, 87, 89, 94, 95, 95], [1, 1, 4, 4, 6, 7, 20, 22, 24, 25, 26, 31, 31, 35, 38, 41, 41, 42, 47, 48, 48, 50, 51, 56, 56, 57, 57, 58, 61, 62, 67, 68, 72, 75, 75, 77, 80, 81, 83, 83, 84, 87, 88, 97, 97, 98], [2, 3, 10, 13, 16, 23, 26, 27, 29, 30, 35, 35, 36, 39, 41, 42, 45, 48, 49, 49, 56, 56, 59, 59, 59, 60, 60, 61, 62, 64, 67, 67, 71, 73, 76, 78, 81, 83, 86, 87, 87, 88, 89, 92, 97, 99], [8, 13, 14, 15, 16, 16, 19, 25, 25, 28, 29, 30, 30, 34, 36, 38, 40, 41, 41, 43, 46, 48, 49, 49, 49, 50, 53, 55, 57, 63, 64, 64, 66, 70, 74, 74, 77, 77, 78, 83, 84, 92, 93, 93, 96, 99], [2, 3, 5, 5, 6, 6, 6, 8, 8, 14, 15, 19, 22, 23, 27, 28, 31, 32, 33, 34, 34, 36, 38, 42, 43, 49, 55, 57, 58, 68, 71, 71, 74, 77, 81, 85, 85, 87, 90, 91, 92, 94, 96, 97, 97, 98], [1, 4, 5, 8, 9, 9, 16, 16, 19, 20, 21, 24, 25, 25, 26, 29, 30, 34, 38, 39, 40, 46, 48, 49, 55, 56, 57, 57, 59, 62, 63, 64, 64, 69, 70, 73, 77, 78, 78, 85, 85, 91, 92, 93, 95, 97], [1, 5, 11, 11, 15, 15, 15, 23, 30, 31, 34, 37, 39, 39, 44, 44, 46, 47, 47, 47, 48, 49, 50, 53, 54, 58, 62, 64, 66, 67, 68, 69, 73, 74, 80, 82, 82, 84, 85, 89, 91, 91, 93, 96, 97, 98], [2, 3, 5, 7, 8, 9, 9, 10, 14, 18, 20, 21, 25, 28, 31, 33, 33, 34, 34, 39, 45, 47, 48, 49, 49, 54, 58, 64, 71, 74, 74, 75, 78, 82, 82, 83, 84, 88, 92, 92, 93, 94, 95, 95, 98, 99], [1, 2, 6, 9, 9, 9, 15, 15, 17, 17, 24, 25, 26, 27, 28, 28, 30, 30, 33, 34, 36, 39, 41, 42, 46, 46, 53, 59, 62, 65, 68, 69, 70, 71, 72, 74, 76, 78, 83, 84, 90, 92, 96, 98, 98, 99], [1, 1, 3, 5, 7, 8, 8, 10, 11, 18, 18, 18, 21, 30, 35, 36, 43, 51, 51, 53, 54, 57, 58, 58, 58, 59, 60, 60, 60, 61, 63, 68, 70, 74, 76, 82, 83, 87, 87, 87, 91, 91, 92, 93, 97, 99], [3, 3, 3, 6, 11, 13, 13, 14, 16, 16, 22, 28, 29, 29, 32, 35, 38, 51, 51, 52, 53, 57, 58, 62, 67, 70, 71, 73, 73, 76, 76, 76, 80, 80, 83, 84, 84, 86, 87, 91, 92, 95, 95, 96, 96, 99], [1, 3, 7, 7, 7, 9, 9, 10, 16, 21, 23, 23, 24, 24, 26, 27, 36, 37, 43, 44, 48, 50, 51, 52, 53, 56, 57, 58, 59, 66, 68, 69, 72, 73, 74, 76, 77, 77, 80, 81, 81, 81, 84, 84, 90, 98], [1, 1, 2, 6, 10, 12, 13, 14, 15, 16, 20, 22, 22, 22, 24, 25, 26, 30, 34, 35, 35, 37, 38, 39, 43, 43, 43, 49, 50, 56, 57, 62, 64, 66, 67, 68, 71, 78, 82, 84, 86, 86, 89, 90, 94, 96], [2, 5, 6, 7, 7, 9, 9, 12, 20, 21, 23, 25, 30, 32, 37, 40, 41, 43, 43, 45, 45, 45, 57, 60, 61, 61, 61, 63, 66, 67, 67, 68, 69, 70, 73, 74, 75, 78, 82, 83, 84, 87, 89, 90, 99, 99], [8, 11, 12, 16, 22, 23, 23, 27, 28, 29, 31, 38, 39, 41, 42, 42, 48, 48, 52, 52, 57, 58, 60, 60, 63, 66, 66, 67, 69, 72, 74, 75, 75, 76, 76, 78, 79, 80, 84, 86, 92, 92, 94, 94, 96, 98], [2, 3, 4, 6, 6, 14, 14, 16, 17, 20, 22, 23, 26, 28, 28, 29, 29, 31, 32, 32, 38, 40, 42, 45, 51, 52, 54, 56, 62, 65, 66, 68, 73, 79, 80, 81, 87, 87, 88, 89, 89, 89, 91, 93, 96, 97], [4, 6, 9, 12, 13, 14, 16, 17, 18, 23, 25, 25, 26, 27, 29, 33, 34, 45, 45, 46, 49, 51, 51, 51, 52, 53, 59, 59, 64, 66, 67, 67, 70, 71, 72, 77, 77, 78, 82, 82, 84, 90, 93, 94, 96, 99], [1, 2, 7, 8, 9, 11, 19, 20, 23, 23, 24, 29, 29, 34, 41, 46, 48, 51, 51, 53, 54, 59, 61, 65, 67, 72, 74, 76, 76, 77, 80, 81, 81, 84, 87, 88, 90, 91, 92, 92, 93, 95, 96, 96, 97, 99], [ 1, 3, 4, 6, 8, 9, 9, 9, 9, 10, 15, 23, 24, 24, 25, 32, 34, 35, 38, 42, 43, 44, 45, 45, 48, 49, 53, 57, 57, 60, 60, 68, 70, 72, 72, 73, 74, 76, 76, 77, 79, 80, 83, 85, 94, 96], [2, 5, 7, 11, 12, 12, 14, 15, 16, 18, 20, 21, 25, 25, 26, 29, 35, 41, 43, 44, 47, 47, 50, 52, 52, 55, 57, 58, 60, 62, 67, 68, 69, 73, 74, 76, 78, 85, 86, 87, 87, 87, 90, 91, 94, 96], [1, 3, 5, 7, 7, 8, 10, 11, 13, 17, 24, 25, 26, 29, 30, 32, 33, 35, 36, 40, 41, 43, 44, 47, 49, 51, 54, 57, 59, 65, 69, 73, 74, 80, 80, 82, 82, 82, 84, 85, 85, 87, 90, 94, 95, 97], [1, 4, 6, 8, 13, 13, 13, 17, 17, 18, 22, 23, 23, 24, 24, 30, 32, 33, 36, 36, 36, 39, 40, 41, 43, 43, 45, 49, 51, 55, 55, 56, 57, 61, 63, 65, 65, 68, 69, 71, 72, 72, 77, 80, 96, 99], [1, 2, 3, 6, 7, 8, 10, 12, 13, 14, 17, 18, 19, 22, 23, 25, 28, 29, 31, 33, 34, 36, 36, 38, 41, 42, 42, 45, 48, 49, 49, 49, 50, 53, 54, 62, 70, 72, 77, 79, 84, 85, 92, 92, 93, 99], [1, 1, 6, 7, 11, 14, 17, 17, 21, 28, 29, 31, 32, 37, 40, 43, 44, 46, 47, 52, 56, 58, 59, 60, 63, 65, 68, 70, 75, 81, 81, 81, 82, 84, 85, 85, 88, 92, 92, 93, 94, 95, 95, 95, 99, 99], [1, 4, 4, 7, 9, 11, 12, 14, 14, 14, 19, 24, 26, 28, 29, 31, 36, 39, 41, 45, 45, 46, 47, 49, 58, 60, 60, 62, 63, 71, 72, 76, 76, 76, 77, 78, 80, 81, 83, 84, 84, 85, 89, 94, 97, 98], [1, 7, 10, 13, 15, 16, 16, 18, 19, 22, 26, 28, 33, 35, 36, 37, 38, 40, 41, 42, 42, 45, 46, 47, 48, 54, 54, 54, 58, 64, 65, 66, 67, 67, 68, 70, 71, 72, 74, 77, 78, 84, 85, 88, 88, 93], [2, 2, 2, 5, 8, 8, 20, 22, 27, 28, 30, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 50, 50, 55, 59, 63, 65, 66, 71, 73, 74, 76, 78, 81, 86, 89, 90, 91, 93, 94, 94, 94, 95, 96, 98, 98], [1, 1, 2, 3, 5, 5, 7, 7, 7, 9, 10, 10, 14, 16, 20, 24, 26, 31, 36, 40, 44, 46, 49, 50, 50, 50, 54, 56, 58, 60, 62, 62, 63, 66, 67, 74, 75, 75, 79, 82, 90, 91, 91, 93, 93, 95], [3, 7, 9, 9, 10, 13, 15, 16, 19, 20, 22, 24, 28, 32, 36, 37, 39, 40, 42, 43, 43, 43, 45, 46, 50, 50, 52, 57, 58, 61, 69, 70, 71, 72, 74, 76, 78, 83, 83, 87, 87, 89, 91, 96, 98, 99], [1, 8, 8, 9, 16, 17, 18, 20, 20, 20, 22, 27, 28, 29, 29, 30, 31, 34, 36, 41, 43, 47, 51, 52, 55, 56, 58, 66, 67, 67, 68, 70, 71, 75, 76, 78, 79, 80, 80, 85, 87, 90, 94, 94, 95, 96], [4, 4, 5, 7, 7, 18, 19, 21, 22, 24, 24, 26, 29, 31, 33, 36, 37, 38, 47, 50, 50, 51, 51, 52, 53, 53, 53, 53, 55, 55, 55, 57, 58, 73, 76, 76, 80, 81, 83, 85, 86, 87, 89, 90, 91, 97], [1, 3, 5, 12, 15, 18, 18, 20, 22, 26, 26, 27, 28, 29, 31, 32, 32, 35, 36, 39, 40, 42, 47, 47, 49, 51, 51, 51, 51, 57, 62, 62, 64, 66, 70, 71, 72, 73, 74, 84, 84, 88, 89, 94, 96, 97], [10, 11, 13, 15, 15, 17, 17, 18, 21, 22, 24, 24, 26, 28, 32, 33, 34, 35, 39, 40, 45, 46, 48, 50, 54, 55, 55, 56, 57, 60, 62, 62, 63, 63, 67, 67, 68, 68, 71, 72, 78, 79, 80, 90, 97, 98], [1, 5, 7, 7, 9, 11, 14, 22, 25, 26, 28, 31, 34, 37, 38, 44, 46, 47, 47, 48, 48, 52, 52, 53, 54, 54, 54, 57, 60, 61, 67, 74, 75, 77, 78, 80, 80, 81, 81, 86, 91, 92, 94, 97, 98, 99], [2, 3, 11, 15, 15, 16, 22, 22, 24, 31, 32, 32, 32, 33, 33, 35, 36, 41, 43, 44, 46, 46, 47, 50, 54, 55, 55, 57, 59, 65, 67, 67, 68, 70, 70, 73, 74, 79, 82, 84, 84, 86, 87, 87, 94, 97], [1, 2, 2, 3, 5, 7, 9, 12, 12, 12, 13, 16, 19, 19, 22, 23, 23, 27, 30, 32, 33, 38, 43, 47, 47, 47, 50, 53, 53, 56, 57, 59, 60, 64, 67, 70, 73, 78, 81, 82, 88, 88, 92, 95, 97, 98], [2, 3, 3, 5, 6, 8, 20, 23, 24, 26, 27, 28, 35, 38, 38, 40, 43, 44, 44, 46, 47, 49, 51, 53, 56, 58, 59, 63, 63, 64, 65, 67, 68, 68, 69, 70, 76, 80, 82, 85, 86, 87, 88, 92, 92, 96], [1, 1, 2, 2, 4, 5, 8, 10, 11, 14, 15, 17, 17, 18, 23, 31, 35, 36, 42, 44, 48, 49, 51, 52, 52, 61, 64, 66, 67, 68, 70, 72, 75, 77, 78, 81, 84, 85, 87, 95, 97, 98, 98, 98, 98, 99], [2, 6, 6, 7, 9, 11, 16, 17, 26, 26, 28, 35, 36, 43, 44, 46, 48, 50, 51, 53, 53, 54, 56, 57, 58, 67, 68, 68, 68, 73, 73, 74, 75, 77, 78, 78, 78, 79, 80, 85, 86, 91, 92, 92, 98, 99], [3, 9, 9, 12, 15, 19, 19, 30, 31, 34, 35, 35, 39, 40, 47, 49, 49, 53, 58, 58, 59, 61, 61, 63, 64, 66, 67, 69, 70, 70, 71, 74, 77, 77, 78, 82, 84, 90, 90, 90, 91, 92, 92, 94, 95, 97], [3, 4, 8, 8, 8, 9, 10, 23, 27, 27, 31, 31, 36, 38, 38, 39, 40, 41, 41, 41, 46, 48, 51, 54, 55, 55, 65, 65, 67, 74, 74, 77, 79, 83, 83, 84, 86, 87, 89, 89, 90, 92, 93, 97, 98, 99]], 41, 32,), ([[-38, -60, 88, -62, 64, -80, -6, -2, 92, 70, -90, 90, -48, 12, -90, 38, -32, -62, -64, -86, 28, -72, 42, -56, 42, 72, 80, 40, -20, -2, 36, -74, 70, -76, -98, 2, 2, 12, -4, -36, 48, -60, -36, -94], [46, -60, -56, -72, 84, 42, -58, 20, 94, 42, 40, 18, -48, 34, -40, -64, 38, 80, 64, -96, -94, 34, -24, -30, 0, -82, -70, 56, -30, -12, -86, -34, 18, 62, 46, 90, -82, -60, -60, 8, 52, 58, 76, -18], [-36, -60, -48, 96, -22, -96, 16, -16, 94, 20, 52, -14, 94, -12, -62, -10, 24, 86, -40, -92, 30, -6, -74, 60, 42, -84, 30, -38, 70, 30, -2, -96, 96, -68, 54, -38, 38, 94, -62, -54, 0, 32, -86, 76], [18, 52, -66, -96, -56, 10, 14, 40, -96, -58, 72, 30, -24, 80, -22, 46, 0, -88, -10, 0, -82, -76, -70, -38, -52, 72, -60, 40, -92, 30, 18, 70, -58, 76, -60, 98, 98, 42, -70, -66, 26, -18, -24, 0], [6, -98, 22, -4, 8, 84, 52, -72, 34, -68, -86, -4, -92, 92, -74, 76, 46, 30, 0, -10, -4, -28, 62, 72, 78, 84, 96, -12, 30, 12, -56, 46, 66, -12, 96, -52, -26, -52, -62, 68, -8, -84, 68, -98], [-90, 42, 78, -70, -6, -82, 68, 26, 20, 18, 30, 64, 12, -98, -90, 22, -64, -60, -34, -24, -30, -76, -62, 28, 6, -58, -70, -52, 34, -72, 80, -6, -66, 58, 28, 30, -38, 80, -58, 26, 72, -46, -18, -74], [-2, -40, -52, -68, -80, 86, -78, 18, -60, -18, -94, -50, -30, -22, -40, -76, 58, 4, -88, -82, 32, -52, 76, 62, -22, 6, 76, -80, 38, 34, 82, -50, 18, -4, -96, 72, -46, 22, -66, 46, -50, -34, 28, 2], [-18, 94, 94, -92, -96, 64, 60, 94, 8, 10, -14, 74, 12, 28, 58, 18, -68, -66, 20, -84, 6, -54, 88, 76, -72, -94, -84, -28, 22, -84, -50, -22, 66, 86, -12, -52, 66, -82, -24, 0, 62, -74, 58, 10], [86, 26, -24, -10, -46, 42, 86, -76, -42, 0, -74, -86, -32, 88, -50, 12, -14, -88, -94, 8, 38, -72, -26, -8, 56, -36, 82, -80, -12, 42, -86, 96, -90, -34, -6, -86, -72, 52, -42, 80, 86, 26, -72, 8], [-26, -10, 44, -70, -22, -40, 4, 82, 40, -18, -64, 72, 10, 36, -76, 78, 52, -58, 4, -60, -52, -32, -58, -68, 32, -82, 82, -80, 6, 58, 44, 26, -44, -48, -98, -42, -48, -46, 4, 48, -36, -84, 10, 0], [50, -64, 98, 0, -90, 80, 80, -24, -84, -22, -84, -6, 76, 26, 36, -82, -46, -92, 86, 54, -18, 22, 76, 98, 16, 64, -32, 62, 84, 58, -16, -22, 46, -76, -58, 40, 26, 28, -62, -66, -60, -20, 72, -68], [-20, 14, -4, -90, 14, 86, 22, 26, 20, -80, 96, -20, -90, 50, -94, 10, -96, 46, -74, 58, 84, 24, -60, 64, -28, -58, 18, -52, -64, -54, 52, -26, 78, -50, -80, -8, -4, -30, 78, -2, 32, 70, 84, -60], [22, 98, 26, -72, 6, -24, 98, 74, -48, -48, 76, -12, -88, 48, -56, -52, 78, -58, 58, -72, 86, -78, -70, 36, 26, 4, -98, -32, 90, -96, -42, -18, 90, -8, -84, -4, 72, 24, -6, 60, 38, -72, 14, -2], [-24, -10, -16, -92, -52, 6, -44, -84, 0, 98, 88, -4, 58, 4, -20, 28, -58, 32, 64, 68, -66, 96, 36, 16, -74, 42, -96, 70, -92, 48, -52, -58, 40, -46, 82, -36, -68, -10, 94, -62, -34, -86, -6, 4], [32, 96, 22, 22, -82, -14, -58, -78, 44, -70, -30, -62, -56, -52, 42, 26, -48, 18, 18, 80, -82, 50, -12, 90, 20, 6, 72, -30, -80, -56, 72, 68, 0, -70, -28, 52, -52, -64, 86, 36, -38, -30, 24, -64], [22, -74, -30, 54, 76, 58, -88, 56, -30, -48, 4, 18, -28, 54, 42, -2, 8, -32, -20, 4, -40, -74, 78, 42, 6, 26, 94, 50, 94, -78, -16, 54, 36, -42, -6, -10, -70, 84, 62, 68, -76, -12, -46, -30], [56, -8, 86, -22, -80, 28, 8, -10, -40, -4, 0, -70, -70, 26, -70, -70, -84, -24, -10, -84, -12, 72, 8, -46, 38, 2, 86, -46, 48, -62, 60, -36, -18, -56, -84, 98, 6, -24, -22, 12, 2, 72, 34, 40], [12, -4, -66, -10, -20, -4, 96, 2, 76, 72, 40, 64, -6, 48, 32, -76, 18, 42, 66, 22, 12, 62, 34, -50, 10, 68, 94, -2, 82, 20, 8, 26, 22, -48, 42, 28, -70, -58, 88, -18, 12, 14, -46, -96], [70, -32, 42, -72, 54, 54, -92, -62, 30, -58, 50, -96, 68, -32, 40, -64, 76, -54, 88, 98, 86, 74, 62, 28, -62, 0, 60, -94, 24, 52, 70, 44, 76, -24, -46, -50, 74, -2, 40, 36, -52, -40, 46, 88], [46, -14, -6, 56, -94, -18, -24, -36, -2, 98, 28, -40, 36, -36, 82, -62, 88, -46, -70, -64, -30, 34, -14, 18, -20, 52, -96, -80, -20, -68, -62, -24, 60, 54, 66, 40, 14, 6, 20, -90, -20, 46, 66, 56], [4, 14, -78, -26, -16, 10, 40, -74, 60, -80, 46, 28, 80, -66, -28, 76, -4, 50, -4, 66, -38, 0, 46, 52, 98, 14, -4, 92, 92, -14, 24, 24, 90, -66, -86, 20, -44, 80, -26, -50, 92, 92, 86, -38], [-44, -74, 44, -46, -32, -50, 52, 94, -86, 46, 8, 56, 6, 12, 54, 66, -22, 18, -74, -54, -88, 42, 16, 8, -22, 96, -78, 98, 18, -16, 72, 44, -46, 36, 4, 72, -70, -68, -64, 20, -60, -50, 84, -64], [8, 82, 24, - 46, -62, 78, -72, 94, -8, 42, 18, 74, -40, -94, -86, 70, -34, -20, 58, 32, -14, -42, -46, -14, 6, 2, 74, 16, 92, 20, 6, -62, 40, -40, 88, -12, 82, 18, -22, 22, 38, -88, 28, 90], [82, -92, 96, 88, -64, 38, 14, -22, 56, -84, 2, -16, -88, -4, -50, -74, -10, -36, 68, 22, -92, 50, -12, 54, -84, -24, -50, -72, 12, 38, 74, -32, -26, -96, 38, 14, -50, 94, 74, -78, -56, 96, -68, 14], [-22, 46, -52, 16, 28, -22, -48, -96, 92, -54, -40, 86, 30, -4, -86, -92, -52, -18, -98, -78, 38, 70, -86, 98, 72, 30, 90, -28, 36, 58, 14, 12, 98, -54, 36, -32, -16, -76, 88, 32, -28, -4, 52, 30], [38, -90, 44, 54, -2, 16, -16, -66, 62, 98, 32, -82, -12, 12, -66, 54, -72, 64, -10, 30, 40, 0, -90, 90, -54, -92, -48, 58, 10, -4, -24, -86, -68, 70, 24, -38, -56, -78, -16, 56, 70, 88, 0, 54], [-50, 2, 18, -6, -12, 64, -12, 64, -44, 16, -16, 20, 72, 32, -54, -22, -12, 56, 84, -48, -60, -90, -70, -12, -4, -72, -78, 16, 22, 12, 48, -2, -82, -94, 48, 30, 76, -12, 94, -8, -10, -8, -46, -22], [96, 56, -22, -44, -30, 92, -56, 26, -42, 60, -2, 58, 52, 8, -48, 70, -38, -32, -92, 14, 26, 76, 48, 84, -96, 42, 32, 38, 6, -70, -58, 4, 58, 86, -54, -4, 80, 94, 18, 28, -82, 4, -14, -80], [-70, -4, 88, 20, -96, 64, -64, -66, -44, 50, -72, -56, 90, 38, 46, -84, 68, 66, -42, 52, 2, -6, 94, 78, -48, 84, -78, 82, -78, 96, 24, -12, -78, 60, 54, 26, -20, -80, -26, -42, 66, -40, -8, -74], [-60, -36, -16, 18, 24, 54, -52, -28, -48, 10, -16, -28, -26, -44, 72, 38, -56, 70, 28, 42, -38, 66, -34, -92, -42, 66, -18, 6, -64, 72, -22, -72, 82, 4, -14, -98, 20, -92, 84, 98, 84, -92, -96, 20], [-66, 8, -92, 76, -24, -36, -18, -62, -62, 12, 26, -12, -64, -26, -16, -42, 2, 82, -16, -74, -60, 8, 62, -8, 0, -66, -52, -44, -54, 58, 16, 94, -90, -60, -2, -14, 18, 16, -22, -88, -60, -16, 26, -18], [-22, -42, 20, -58, 72, 86, 2, -94, 32, -16, -68, -96, 10, -74, 40, -78, 96, -92, -94, 6, -26, -50, -28, -34, 62, 10, 74, -82, 0, 4, 58, -62, 28, 14, 26, 2, -40, -68, 42, 42, 80, 4, -48, -74], [-40, 26, -68, -60, -22, -50, 70, -42, 54, 30, -40, -70, 66, -8, -66, 24, 28, -46, 68, 8, -4, 84, 66, 54, 22, -80, -20, -28, 2, 6, 24, 88, -70, -80, 22, -96, -50, 60, -76, -32, 26, -58, 6, 6], [-60, 28, -56, -4, -8, -32, -12, 48, 48, 94, 18, 30, -56, 72, -70, 68, -26, -48, 22, 18, 64, 78, 38, -90, 18, -34, 90, -98, 82, -26, -80, -34, -22, 72, 58, 82, -96, -20, -80, 16, -50, -4, 24, 64], [-18, -62, 54, 32, 82, -22, 70, 16, 88, -34, 70, 16, -6, -80, 34, -42, 78, 30, -36, 96, 96, -62, 22, -96, -6, 0, -60, -70, 40, -62, 8, -92, -62, 90, -88, -78, 86, -38, 26, 18, 82, -96, -42, 30], [-48, -20, -42, -34, 76, 64, 2, 4, 6, 8, 56, -98, -50, -16, 68, -12, 78, -88, 62, 46, 22, 28, 36, 36, -46, 78, -86, -78, -10, -98, -24, -48, -62, -26, -4, 78, -84, -56, -48, -74, -2, 72, -86, 14], [-42, -74, 54, -28, -16, 94, 40, 44, -22, 10, 42, 38, 46, 68, 72, 32, 84, -6, -30, -54, -62, 30, 94, 36, -18, -30, 66, 52, 18, -24, -16, -60, -56, -2, -78, 80, -60, 20, -72, -24, -48, -86, -16, -12], [46, -38, -28, -72, 80, -8, -28, 28, -28, 4, -84, 56, -48, 28, -54, 34, 84, 28, -52, 38, -34, 20, 84, -10, 36, -60, 54, -66, -8, -54, -44, -82, 56, -78, -76, -94, 24, 30, 30, -78, -22, -48, 22, 44], [-10, -84, 66, 60, 40, -56, 86, 16, 44, -50, -62, 34, -44, 30, -62, 96, 76, -98, -50, -50, 36, -74, 42, -82, 44, -32, -48, 58, 22, 82, 82, 94, -70, -92, -96, -78, -70, 84, -44, -70, 82, -92, -96, -50], [40, -86, 66, 64, 98, 86, 18, 20, 54, -92, -26, 56, -96, -28, 16, 52, 42, 36, -64, 44, -96, -56, 78, 94, -54, 24, -62, 82, -36, -90, -40, 50, -72, -54, 80, 12, -24, 30, -48, 2, -64, 96, -66, 94], [80, 4, -82, -24, 18, 24, -78, -4, -14, 38, -10, -70, -78, -26, 6, 46, 78, 16, -48, 94, 4, 46, 54, -84, -56, -76, -50, -30, -94, -58, -96, 32, -2, -16, 76, -94, 54, -96, 96, -18, 80, 60, -82, 74], [12, -4, -66, 54, 82, 24, -84, 62, -58, -52, 8, -74, -62, 56, 86, -82, 30, 86, 46, 78, 94, 24, 44, 2, 62, -48, 58, 34, -74, -52, 32, 46, 92, 28, 72, -36, -14, -98, 68, -92, 12, 56, -40, -64], [-48, -98, 52, -92, 88, 30, 42, 90, 56, 76, 44, -58, -72, -28, -54, 26, -36, -28, -54, 64, 22, 2, -58, 30, 12, -92, 40, 46, 54, -16, -74, -2, 30, 72, 56, 96, -86, 76, -28, -26, 76, 32, -46, -22], [6, 16, 74, -22, -20, -12, 50, 50, 16, 50, 58, -16, -76, 68, 66, 36, -52, 98, 64, 84, -50, 88, -40, -22, -2, -94, 48, 70, 46, -36, 20, 74, -10, 20, -98, -26, -58, 80, 78, -66, -66, -28, 46, -40]], 30, 35,), ([[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]], 10, 9,), ([[73, 62, 15, 20, 30, 7, 64, 47, 16, 52, 55, 87, 49, 78, 88, 59, 29, 62, 70], [8, 6, 26, 49, 12, 22, 62, 79, 79, 7, 38, 44, 68, 23, 38, 35, 52, 91, 46], [48, 26, 67, 1, 45, 46, 37, 11, 25, 35, 79, 3, 10, 87, 65, 22, 99, 20, 7], [56, 58, 1, 24, 66, 45, 43, 71, 43, 66, 51, 46, 95, 72, 38, 13, 53, 70, 70], [91, 38, 39, 29, 88, 50, 81, 47, 29, 64, 26, 76, 37, 24, 1, 30, 70, 93, 99], [66, 67, 92, 20, 36, 5, 28, 62, 57, 94, 9, 89, 81, 64, 55, 68, 36, 44, 41], [85, 37, 47, 87, 73, 77, 56, 49, 73, 35, 94, 62, 26, 95, 59, 96, 77, 71, 21], [89, 38, 3, 80, 35, 75, 1, 39, 92, 10, 94, 55, 60, 95, 22, 42, 85, 98, 19], [52, 99, 43, 54, 60, 70, 15, 4, 25, 58, 45, 28, 5, 9, 40, 41, 53, 63, 35], [76, 43, 87, 77, 58, 81, 44, 99, 64, 16, 55, 17, 76, 20, 81, 74, 1, 61, 10], [14, 44, 60, 78, 72, 24, 31, 26, 86, 50, 77, 35, 64, 87, 57, 13, 79, 7, 51], [6, 35, 77, 25, 14, 30, 30, 88, 60, 63, 60, 30, 97, 14, 44, 75, 15, 82, 74], [16, 3, 1, 29, 70, 16, 42, 45, 86, 16, 77, 93, 69, 19, 20, 93, 14, 62, 84], [9, 40, 39, 99, 39, 51, 6, 26, 71, 73, 41, 40, 29, 69, 48, 8, 98, 81, 45], [52, 50, 89, 89, 99, 72, 84, 49, 86, 70, 48, 34, 35, 25, 79, 21, 47, 68, 99], [15, 71, 84, 46, 30, 57, 73, 52, 96, 40, 99, 16, 68, 51, 58, 48, 65, 7, 29], [55, 2, 13, 73, 91, 76, 24, 80, 39, 2, 34, 62, 90, 81, 96, 67, 31, 37, 34], [56, 7, 51, 88, 69, 1, 28, 68, 19, 8, 26, 36, 27, 96, 80, 49, 55, 8, 79], [74, 90, 52, 48, 12, 13, 9, 94, 61, 8, 7, 49, 53, 79, 99, 71, 81, 18, 55]], 17, 10,), ([[-92, -78, -78, -52, -46, -42, -38, -24, -18, -6, 2, 8, 14, 20, 58, 80, 84], [-86, -76, -66, -42, -26, -24, -18, -12, 2, 4, 10, 10, 14, 56, 62, 78, 80], [-82, -76, -60, -40, -40, -34, -22, -8, 0, 10, 16, 24, 56, 64, 68, 80, 92], [-86, -74, -72, -60, -58, -30, -12, -4, 2, 10, 24, 30, 34, 58, 64, 84, 96], [-88, -88, -88, -84, -66, -48, -32, -32, -18, -18, -12, 2, 12, 40, 58, 72, 86], [-80, -70, -64, -50, -48, -44, -26, -24, -20, -16, -8, 16, 24, 26, 48, 48, 76], [-96, -94, -94, -66, -50, -46, -34, -34, -10, 0, 2, 20, 24, 40, 82, 84, 98], [-90, -78, -66, -34, -20, -10, -10, 0, 10, 20, 36, 44, 58, 58, 80, 80, 84], [-96, -92, -56, -46, -44, -20, 16, 20, 24, 28, 34, 40, 42, 48, 60, 78, 90], [-98, -54, -46, -46, -44, -40, -34, -26, -24, -16, 2, 18, 24, 24, 38, 64, 82], [-80, -68, -66, -56, -46, -28, -24, -22, -16, 18, 20, 22, 24, 52, 64, 82, 98], [-90, -46, -44, -32, -20, -16, 12, 28, 32, 52, 54, 66, 70, 70, 72, 86, 88], [-98, -84, -78, -64, -58, -18, -8, 4, 38, 42, 46, 46, 56, 62, 62, 86, 90], [-98, -52, -52, -36, -8, -6, 22, 24, 26, 38, 40, 44, 56, 60, 66, 80, 94], [-88, -80, -72, -58, -50, -22, -20, -10, -6, 4, 4, 8, 24, 48, 70, 78, 80], [-88, -70, -60, -58, -50, -42, -36, -24, -6, 2, 14, 20, 44, 58, 74, 78, 80], [-76, -50, -46, -40, -30, -24, -10, 4, 10, 14, 28, 36, 40, 40, 46, 56, 60]], 8, 10,), ([[0, 0, 1, 0, 0, 1], [1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 1], [ 1, 0, 1, 1, 0, 0], [1, 0, 0, 1, 0, 0], [1, 1, 0, 1, 0, 1]], 5, 3,), ([[6, 13, 16, 17, 27, 30, 43, 43, 44, 49, 55, 60, 66, 68, 74, 75, 77, 84], [5, 17, 22, 32, 34, 38, 40, 43, 54, 57, 60, 61, 63, 66, 84, 86, 87, 91], [4, 4, 14, 19, 27, 29, 29, 34, 34, 44, 46, 51, 53, 59, 64, 77, 80, 82], [3, 8, 13, 18, 19, 28, 34, 35, 40, 52, 53, 53, 61, 73, 81, 83, 89, 98], [1, 5, 11, 19, 25, 34, 35, 37, 41, 50, 71, 74, 74, 76, 87, 95, 97, 99], [1, 4, 12, 17, 29, 30, 44, 48, 49, 54, 54, 59, 60, 64, 74, 78, 82, 96], [6, 15, 16, 17, 17, 23, 26, 28, 36, 37, 40, 47, 48, 51, 52, 56, 81, 94], [7, 9, 9, 43, 47, 51, 52, 56, 60, 65, 68, 74, 82, 88, 91, 97, 98, 98], [1, 4, 10, 17, 18, 24, 31, 45, 51, 51, 56, 65, 68, 70, 73, 77, 94, 95], [ 1, 1, 12, 13, 26, 27, 33, 37, 39, 39, 40, 41, 46, 51, 61, 67, 74, 87], [4, 6, 14, 15, 16, 17, 20, 22, 23, 45, 55, 56, 79, 80, 85, 85, 98, 99], [16, 17, 23, 23, 38, 43, 43, 49, 51, 66, 69, 69, 69, 72, 81, 84, 90, 97], [18, 23, 25, 26, 26, 29, 35, 37, 45, 59, 67, 73, 73, 76, 79, 80, 81, 85], [2, 6, 7, 8, 15, 18, 24, 33, 36, 46, 53, 54, 54, 66, 85, 91, 91, 96], [2, 9, 17, 23, 28, 28, 35, 36, 39, 48, 67, 69, 74, 75, 80, 85, 89, 96], [8, 15, 16, 19, 20, 31, 33, 43, 52, 63, 72, 79, 86, 88, 91, 92, 97, 99], [4, 5, 10, 14, 34, 37, 41, 44, 45, 49, 72, 74, 81, 84, 85, 93, 96, 99], [1, 2, 19, 20, 25, 27, 31, 33, 40, 48, 55, 61, 63, 69, 76, 81, 83, 84]], 10, 13,), ([[4, 12, -60, -76], [-56, 66, -84, 68], [-8, 14, 44, -74], [54, 50, 78, 0]], 2, 3,), ([[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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 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]], 19, 18,), ([[52, 7, 95, 62, 93, 89, 91, 56, 59, 16, 68, 28, 66, 67, 28, 60, 62, 73, 99, 50, 82, 60, 6, 98, 1, 16, 98, 77, 24, 53, 93, 41, 57, 64], [58, 70, 84, 33, 17, 25, 71, 88, 18, 52, 3, 82, 29, 21, 92, 7, 30, 32, 22, 70, 23, 3, 82, 10, 51, 58, 16, 8, 18, 58, 88, 12, 38, 24], [54, 57, 1, 87, 51, 44, 43, 24, 90, 50, 11, 30, 50, 76, 32, 99, 28, 10, 31, 90, 34, 90, 96, 39, 7, 22, 87, 72, 49, 31, 41, 71, 37, 64], [3, 91, 36, 83, 54, 80, 5, 44, 86, 45, 3, 33, 82, 92, 49, 96, 66, 97, 22, 43, 39, 12, 57, 97, 19, 99, 14, 20, 18, 24, 21, 62, 50, 8], [84, 52, 2, 31, 27, 92, 11, 4, 45, 39, 71, 95, 86, 19, 93, 93, 78, 35, 49, 66, 63, 57, 92, 20, 42, 19, 42, 71, 3, 58, 8, 30, 46, 36], [93, 21, 64, 42, 14, 39, 41, 71, 53, 68, 17, 46, 20, 66, 31, 24, 84, 63, 33, 58, 77, 56, 25, 61, 18, 26, 1, 10, 17, 24, 68, 39, 32, 23], [39, 54, 68, 4, 79, 78, 80, 94, 47, 18, 88, 9, 5, 24, 15, 19, 75, 50, 92, 23, 95, 90, 45, 21, 75, 70, 54, 12, 91, 15, 19, 73, 95, 20], [6, 50, 7, 65, 67, 87, 75, 68, 30, 89, 55, 31, 22, 42, 81, 71, 16, 4, 53, 3, 36, 69, 60, 45, 57, 85, 97, 99, 86, 11, 62, 76, 73, 7], [90, 92, 37, 24, 45, 10, 86, 79, 95, 62, 61, 70, 52, 84, 32, 62, 51, 31, 84, 58, 69, 85, 96, 74, 78, 11, 5, 73, 22, 89, 95, 86, 96, 1], [23, 83, 80, 6, 93, 80, 51, 87, 21, 29, 58, 92, 79, 80, 57, 76, 85, 49, 52, 32, 38, 83, 90, 14, 46, 83, 68, 76, 22, 58, 79, 43, 78, 42], [3, 51, 5, 9, 20, 68, 89, 22, 21, 39, 84, 36, 23, 70, 93, 33, 38, 76, 43, 3, 87, 9, 33, 50, 52, 91, 42, 76, 80, 82, 96, 10, 16, 98], [79, 84, 65, 45, 18, 45, 8, 42, 13, 1, 62, 95, 46, 53, 7, 32, 43, 19, 26, 63, 12, 58, 56, 52, 73, 50, 6, 41, 14, 85, 4, 35, 28, 20], [81, 20, 82, 93, 57, 57, 3, 8, 93, 17, 80, 34, 23, 21, 71, 46, 52, 77, 76, 62, 67, 70, 12, 99, 71, 1, 4, 21, 70, 56, 60, 19, 79, 92], [39, 69, 98, 82, 21, 26, 68, 89, 17, 8, 60, 21, 36, 55, 81, 44, 96, 62, 87, 14, 47, 14, 39, 76, 49, 38, 58, 84, 93, 14, 15, 30, 13, 16], [92, 70, 11, 57, 19, 22, 3, 39, 96, 86, 46, 55, 19, 40, 16, 37, 50, 75, 63, 50, 49, 95, 89, 38, 47, 8, 78, 15, 64, 57, 5, 8, 32, 54], [53, 2, 4, 76, 12, 39, 65, 40, 70, 13, 15, 42, 62, 15, 23, 16, 69, 47, 6, 35, 54, 8, 37, 53, 15, 16, 62, 74, 58, 31, 17, 42, 50, 9], [55, 92, 37, 74, 80, 67, 21, 31, 51, 10, 73, 43, 54, 26, 57, 40, 40, 39, 67, 64, 71, 4, 36, 33, 85, 86, 35, 97, 2, 56, 25, 94, 89, 29], [ 76, 13, 35, 51, 17, 13, 31, 6, 83, 31, 5, 71, 92, 2, 49, 11, 89, 83, 61, 82, 8, 48, 91, 71, 95, 55, 19, 60, 85, 89, 66, 25, 15, 30], [54, 94, 58, 73, 99, 27, 74, 6, 89, 46, 3, 16, 70, 44, 6, 30, 37, 50, 92, 17, 79, 77, 82, 69, 19, 57, 95, 39, 10, 13, 79, 50, 20, 96], [78, 2, 85, 80, 62, 28, 17, 28, 51, 37, 91, 31, 99, 98, 3, 19, 3, 91, 12, 37, 33, 18, 5, 39, 93, 21, 57, 71, 47, 62, 76, 35, 79, 6], [1, 90, 92, 4, 33, 68, 68, 31, 76, 18, 81, 20, 50, 97, 17, 8, 38, 80, 85, 56, 36, 76, 20, 57, 20, 5, 56, 61, 2, 14, 22, 8, 86, 14], [71, 45, 94, 34, 98, 3, 65, 8, 88, 17, 20, 98, 19, 63, 11, 89, 34, 62, 54, 26, 94, 7, 27, 28, 28, 12, 7, 4, 77, 12, 9, 24, 65, 85], [70, 14, 10, 88, 9, 7, 56, 53, 18, 17, 22, 82, 79, 89, 26, 52, 39, 74, 21, 57, 70, 71, 78, 67, 27, 37, 65, 90, 73, 28, 78, 31, 94, 91], [10, 99, 56, 64, 46, 65, 8, 74, 81, 76, 44, 82, 37, 84, 31, 30, 93, 45, 79, 35, 37, 61, 51, 99, 67, 19, 59, 8, 28, 9, 82, 88, 62, 4], [37, 6, 2, 45, 24, 60, 77, 78, 78, 25, 73, 25, 46, 56, 99, 26, 2, 59, 50, 86, 18, 32, 3, 82, 45, 96, 88, 90, 53, 91, 72, 52, 20, 24], [51, 11, 26, 53, 77, 33, 83, 46, 32, 63, 22, 48, 64, 5, 29, 95, 28, 16, 5, 51, 43, 27, 38, 22, 5, 29, 54, 54, 23, 13, 80, 45, 96, 85], [26, 54, 77, 95, 90, 59, 70, 7, 96, 65, 33, 29, 88, 79, 15, 74, 52, 36, 74, 56, 63, 4, 42, 8, 98, 55, 24, 60, 68, 99, 18, 86, 46, 92], [16, 81, 86, 22, 79, 79, 30, 7, 77, 68, 77, 50, 98, 76, 98, 27, 59, 10, 95, 53, 55, 91, 11, 18, 12, 5, 22, 48, 84, 3, 83, 41, 7, 72], [62, 72, 56, 90, 49, 13, 25, 29, 85, 47, 6, 30, 59, 30, 74, 55, 98, 86, 75, 7, 50, 34, 92, 71, 28, 27, 73, 76, 96, 92, 67, 78, 73, 36], [68, 91, 8, 18, 61, 91, 37, 26, 32, 81, 77, 7, 72, 88, 4, 29, 67, 61, 5, 23, 72, 50, 79, 24, 23, 72, 88, 90, 51, 74, 8, 2, 7, 82], [75, 25, 11, 60, 42, 36, 10, 26, 11, 97, 13, 77, 14, 25, 39, 48, 22, 39, 70, 85, 42, 47, 79, 96, 45, 15, 10, 79, 6, 93, 50, 67, 66, 99], [43, 58, 67, 95, 47, 79, 13, 66, 90, 52, 35, 18, 87, 7, 99, 6, 17, 5, 84, 25, 23, 46, 49, 71, 23, 5, 97, 50, 30, 12, 99, 58, 45, 19], [66, 54, 34, 82, 61, 60, 61, 18, 71, 81, 67, 2, 10, 90, 31, 66, 54, 27, 82, 58, 69, 16, 30, 78, 62, 66, 30, 79, 86, 98, 49, 43, 46, 74], [60, 3, 19, 15, 90, 29, 28, 90, 96, 62, 51, 37, 3, 88, 71, 77, 44, 40, 92, 41, 96, 69, 53, 41, 82, 42, 49, 99, 79, 21, 56, 28, 7, 46]], 17, 27,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", ADD_1_TO_A_GIVEN_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ADD_1_TO_A_GIVEN_NUMBER_1{ static int f_gold ( int x ) { return ( - ( ~ x ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(20); param0.add(68); param0.add(52); param0.add(61); param0.add(3); param0.add(88); param0.add(41); param0.add(78); param0.add(94); param0.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : return ( - ( ~ x ) ) "," using namespace std; int f_gold ( int x ) { return ( - ( ~ x ) ); } int main() { int n_success = 0; vector param0 {20,68,52,61,3,88,41,78,94,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (20,), (68,), (52,), (61,), (3,), (88,), (41,), (78,), (94,), (18,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES{ static int f_gold ( int arr [ ] , int arr_size ) { int i ; for ( i = 0 ; i < arr_size ; i ++ ) { int count = 0 ; for ( int j = 0 ; j < arr_size ; j ++ ) { if ( arr [ i ] == arr [ j ] ) count ++ ; } if ( count % 2 != 0 ) return arr [ i ] ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,5,5,8,14,15,17,17,18,23,23,25,26,35,36,39,51,53,56,56,60,62,64,64,65,66,67,68,71,75,80,82,83,88,89,91,91,92,93,95,99}); param0.add(new int[]{-56,98,44,30,-88,18,60,86,4,16,10,64,-22,-86,-66,-16,70,-44,98,78,-96,-66,92,10,40,-16}); param0.add(new int[]{0,0,0,0,0,1,1,1}); param0.add(new int[]{36,11,83,41,42,14,46,89,91,96,57,42,74,73,9,26,79,40,31,69,44,39,14,92,34,20,52,47,14}); param0.add(new int[]{-84,-84,-84,-78,-66,-62,-62,-36,-24,-10,-10,-8,-4,-2,12,14,20,22,36,42,46,66,84,96,96,98}); param0.add(new int[]{1,1,0,1,0,1,1,0,1,1,0,1,0,1,0,1,0,0,1,1,1,0,1,1,1,1,1,1}); param0.add(new int[]{11,12,14,28,42,48,50,58,67,74,86,89,95}); param0.add(new int[]{52,-56,-6,74,10,68,74,10,16,-80,82,-32,6,-6,82,20}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{4,80,92}); List param1 = new ArrayList<>(); param1.add(31); param1.add(19); param1.add(6); param1.add(25); param1.add(23); param1.add(19); param1.add(7); param1.add(11); param1.add(31); param1.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , arr_size ) : for i in range ( 0 , arr_size ) : count = 0 for j in range ( 0 , arr_size ) : if arr [ i ] == arr [ j ] : count += 1 if ( count % 2 != 0 ) : return arr [ i ] return - 1 "," using namespace std; int f_gold ( int arr [ ], int arr_size ) { for ( int i = 0; i < arr_size; i ++ ) { int count = 0; for ( int j = 0; j < arr_size; j ++ ) { if ( arr [ i ] == arr [ j ] ) count ++; } if ( count % 2 != 0 ) return arr [ i ]; } return - 1; } int main() { int n_success = 0; vector> param0 {{1,5,5,8,14,15,17,17,18,23,23,25,26,35,36,39,51,53,56,56,60,62,64,64,65,66,67,68,71,75,80,82,83,88,89,91,91,92,93,95,99},{-56,98,44,30,-88,18,60,86,4,16,10,64,-22,-86,-66,-16,70,-44,98,78,-96,-66,92,10,40,-16},{0,0,0,0,0,1,1,1},{36,11,83,41,42,14,46,89,91,96,57,42,74,73,9,26,79,40,31,69,44,39,14,92,34,20,52,47,14},{-84,-84,-84,-78,-66,-62,-62,-36,-24,-10,-10,-8,-4,-2,12,14,20,22,36,42,46,66,84,96,96,98},{1,1,0,1,0,1,1,0,1,1,0,1,0,1,0,1,0,0,1,1,1,0,1,1,1,1,1,1},{11,12,14,28,42,48,50,58,67,74,86,89,95},{52,-56,-6,74,10,68,74,10,16,-80,82,-32,6,-6,82,20},{0,0,0,0,0,0,0,0,0,0,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},{4,80,92}}; vector param1 {31,19,6,25,23,19,7,11,31,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 5, 5, 8, 14, 15, 17, 17, 18, 23, 23, 25, 26, 35, 36, 39, 51, 53, 56, 56, 60, 62, 64, 64, 65, 66, 67, 68, 71, 75, 80, 82, 83, 88, 89, 91, 91, 92, 93, 95, 99],31,), ([-56, 98, 44, 30, -88, 18, 60, 86, 4, 16, 10, 64, -22, -86, -66, -16, 70, -44, 98, 78, -96, -66, 92, 10, 40, -16],19,), ([0, 0, 0, 0, 0, 1, 1, 1],6,), ([36, 11, 83, 41, 42, 14, 46, 89, 91, 96, 57, 42, 74, 73, 9, 26, 79, 40, 31, 69, 44, 39, 14, 92, 34, 20, 52, 47, 14],25,), ([-84, -84, -84, -78, -66, -62, -62, -36, -24, -10, -10, -8, -4, -2, 12, 14, 20, 22, 36, 42, 46, 66, 84, 96, 96, 98],23,), ([1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1],19,), ([11, 12, 14, 28, 42, 48, 50, 58, 67, 74, 86, 89, 95],7,), ([52, -56, -6, 74, 10, 68, 74, 10, 16, -80, 82, -32, 6, -6, 82, 20],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],31,), ([4, 80, 92],1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN{ static double f_gold ( int a , int b ) { double AM , GM , HM ; AM = ( a + b ) / 2 ; GM = Math . sqrt ( a * b ) ; HM = ( GM * GM ) / AM ; return HM ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(54); param0.add(42); param0.add(63); param0.add(19); param0.add(41); param0.add(7); param0.add(39); param0.add(11); param0.add(96); param0.add(15); List param1 = new ArrayList<>(); param1.add(83); param1.add(56); param1.add(12); param1.add(76); param1.add(50); param1.add(26); param1.add(42); param1.add(64); param1.add(81); param1.add(54); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( a , b ) : AM = ( a + b ) / 2 GM = math.sqrt ( a * b ) HM = ( GM * GM ) / AM return HM "," using namespace std; double f_gold ( int a, int b ) { double AM, GM, HM; AM = ( a + b ) / 2; GM = sqrt ( a * b ); HM = ( GM * GM ) / AM; return HM; } int main() { int n_success = 0; vector param0 {54,42,63,19,41,7,39,11,96,15}; vector param1 {83,56,12,76,50,26,42,64,81,54}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (54,83,), (42,56,), (63,12,), (19,76,), (41,50,), (7,26,), (39,42,), (11,64,), (96,81,), (15,54,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_ARRAYS_CONSECUTIVE_ELEMENT_DIFFERENT_VALUES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_ARRAYS_CONSECUTIVE_ELEMENT_DIFFERENT_VALUES{ public static int f_gold ( int n , int k , int x ) { int [ ] dp = new int [ 109 ] ; dp [ 0 ] = 0 ; dp [ 1 ] = 1 ; for ( int i = 2 ; i < n ; i ++ ) dp [ i ] = ( k - 2 ) * dp [ i - 1 ] + ( k - 1 ) * dp [ i - 2 ] ; return ( x == 1 ? ( k - 1 ) * dp [ n - 2 ] : dp [ n - 1 ] ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(9); param0.add(97); param0.add(16); param0.add(16); param0.add(6); param0.add(58); param0.add(6); param0.add(22); param0.add(51); param0.add(58); List param1 = new ArrayList<>(); param1.add(40); param1.add(47); param1.add(28); param1.add(82); param1.add(81); param1.add(10); param1.add(47); param1.add(4); param1.add(46); param1.add(25); List param2 = new ArrayList<>(); param2.add(38); param2.add(30); param2.add(13); param2.add(70); param2.add(29); param2.add(55); param2.add(20); param2.add(64); param2.add(66); param2.add(53); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k , x ) : dp = list ( ) dp.append ( 0 ) dp.append ( 1 ) i = 2 while i < n : dp.append ( ( k - 2 ) * dp [ i - 1 ] + ( k - 1 ) * dp [ i - 2 ] ) i = i + 1 return ( ( k - 1 ) * dp [ n - 2 ] if x == 1 else dp [ n - 1 ] ) ",,," if __name__ == '__main__': param = [ (9,40,38,), (97,47,30,), (16,28,13,), (16,82,70,), (6,81,29,), (58,10,55,), (6,47,20,), (22,4,64,), (51,46,66,), (58,25,53,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_TWO_LARGE_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_TWO_LARGE_NUMBERS{ static String f_gold ( String str1 , String str2 ) { if ( str1 . length ( ) > str2 . length ( ) ) { String t = str1 ; str1 = str2 ; str2 = t ; } String str = """" ; int n1 = str1 . length ( ) , n2 = str2 . length ( ) ; str1 = new StringBuilder ( str1 ) . reverse ( ) . toString ( ) ; str2 = new StringBuilder ( str2 ) . reverse ( ) . toString ( ) ; int carry = 0 ; for ( int i = 0 ; i < n1 ; i ++ ) { int sum = ( ( int ) ( str1 . charAt ( i ) - '0' ) + ( int ) ( str2 . charAt ( i ) - '0' ) + carry ) ; str += ( char ) ( sum % 10 + '0' ) ; carry = sum / 10 ; } for ( int i = n1 ; i < n2 ; i ++ ) { int sum = ( ( int ) ( str2 . charAt ( i ) - '0' ) + carry ) ; str += ( char ) ( sum % 10 + '0' ) ; carry = sum / 10 ; } if ( carry > 0 ) str += ( char ) ( carry + '0' ) ; str = new StringBuilder ( str ) . reverse ( ) . toString ( ) ; return str ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""VkfzrPG""); param0.add(""0526110506447""); param0.add(""011010010""); param0.add(""sPAwZACc ""); param0.add(""3""); param0.add(""0101""); param0.add(""VTtNu""); param0.add(""2317170""); param0.add(""111111000010""); param0.add(""Ktt""); List param1 = new ArrayList<>(); param1.add(""rKZ""); param1.add(""903""); param1.add(""110100000""); param1.add(""liYMsojPiinOV""); param1.add(""611""); param1.add(""01110101011""); param1.add(""Wsmc""); param1.add(""898421173423""); param1.add(""01100001110111""); param1.add(""CTbbVX wGBkE""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(str1, str2): if (len(str1) > len(str2)): t = str1 str1 = str2 str2 = t str = """" n1 = len(str1) n2 = len(str2) str1 = str1[:: - 1] str2 = str2[:: - 1] carry = 0 for i in range(n1): sum = ((ord(str1[i]) - 48) + ((ord(str2[i]) - 48) + carry)) str += chr(sum % 10 + 48) carry = int(sum / 10) for i in range(n1, n2): sum = ((ord(str2[i]) - 48) + carry) str += chr(sum % 10 + 48) carry = (int)(sum / 10) if (carry): str += chr(carry + 48) str = str[:: - 1] return str "," using namespace std; string f_gold ( string str1, string str2 ) { if ( str1 . length ( ) > str2 . length ( ) ) swap ( str1, str2 ); string str = """"; int n1 = str1 . length ( ), n2 = str2 . length ( ); reverse ( str1 . begin ( ), str1 . end ( ) ); reverse ( str2 . begin ( ), str2 . end ( ) ); int carry = 0; for ( int i = 0; i < n1; i ++ ) { int sum = ( ( str1 [ i ] - '0' ) + ( str2 [ i ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } for ( int i = n1; i < n2; i ++ ) { int sum = ( ( str2 [ i ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; } int main() { int n_success = 0; vector param0 {""VkfzrPG"",""0526110506447"",""011010010"",""sPAwZACc "",""3"",""0101"",""VTtNu"",""2317170"",""111111000010"",""Ktt""}; vector param1 {""rKZ"",""903"",""110100000"",""liYMsojPiinOV"",""611"",""01110101011"",""Wsmc"",""898421173423"",""01100001110111"",""CTbbVX wGBkE""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('VkfzrPG', 'rKZ',), ('0526110506447', '903',), ('011010010', '110100000',), ('sPAwZACc ', 'liYMsojPiinOV',), ('3', '611',), ('0101', '01110101011',), ('VTtNu', 'Wsmc',), ('2317170', '898421173423',), ('111111000010', '01100001110111',), ('Ktt', 'CTbbVX wGBkE',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", COUNT_NUMBER_OF_SOLUTIONS_OF_X2_1_MOD_P_IN_GIVEN_RANGE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_OF_SOLUTIONS_OF_X2_1_MOD_P_IN_GIVEN_RANGE{ static int f_gold ( int n , int p ) { int ans = 0 ; for ( int x = 1 ; x < p ; x ++ ) { if ( ( x * x ) % p == 1 ) { int last = x + p * ( n / p ) ; if ( last > n ) last -= p ; ans += ( ( last - x ) / p + 1 ) ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(94); param0.add(11); param0.add(88); param0.add(85); param0.add(74); param0.add(96); param0.add(49); param0.add(50); param0.add(21); param0.add(81); List param1 = new ArrayList<>(); param1.add(36); param1.add(79); param1.add(63); param1.add(43); param1.add(89); param1.add(33); param1.add(51); param1.add(24); param1.add(26); param1.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , p ) : ans = 0 ; for x in range ( 1 , p ) : if ( ( x * x ) % p == 1 ) : last = x + p * ( n / p ) ; if ( last > n ) : last -= p ; ans += ( ( last - x ) / p + 1 ) ; return int ( ans ) ; ",,," if __name__ == '__main__': param = [ (94,36,), (11,79,), (88,63,), (85,43,), (74,89,), (96,33,), (49,51,), (50,24,), (21,26,), (81,19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUM_2_X_N_GRID_NO_TWO_ELEMENTS_ADJACENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_2_X_N_GRID_NO_TWO_ELEMENTS_ADJACENT{ public static int f_gold ( int grid [ ] [ ] , int n ) { int incl = Math . max ( grid [ 0 ] [ 0 ] , grid [ 1 ] [ 0 ] ) ; int excl = 0 , excl_new ; for ( int i = 1 ; i < n ; i ++ ) { excl_new = Math . max ( excl , incl ) ; incl = excl + Math . max ( grid [ 0 ] [ i ] , grid [ 1 ] [ i ] ) ; excl = excl_new ; } return Math . max ( excl , incl ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{6,10,23,28,35,55,91},new int[]{11,14,15,54,55,62,81},new int[]{18,26,40,43,47,89,93},new int[]{3,11,19,53,65,82,92},new int[]{14,32,43,44,51,77,83},new int[]{6,6,30,30,33,73,74},new int[]{2,2,10,61,70,81,84}}); param0.add(new int[][]{new int[]{-28,-20,-60,92,12,-66,20,-22,72,-90,30,90,-64,38,24,78,42,-72,-86,88,-66,-74,-52,26,-76,-64,-54,-56,-50,-12,-50,-58,-42,20},new int[]{-84,-90,32,4,-54,-96,72,70,-2,62,-20,22,-38,78,-86,-50,64,92,16,22,44,-72,-88,-54,58,72,-28,34,-10,-12,-82,38,-76,86},new int[]{30,94,12,-58,24,-58,82,-96,-84,-76,-56,-2,-82,-12,-24,86,-94,72,36,86,54,76,-96,-94,-70,76,0,-48,-84,6,-90,44,-8,-22},new int[]{-36,90,20,44,-66,-54,54,14,-12,58,-10,84,-4,88,-70,-24,-84,-8,58,-22,2,-32,-28,-60,-74,-12,-10,-6,-58,-54,-8,-94,72,86},new int[]{-20,88,28,76,78,52,0,-60,94,-22,-56,-8,66,-36,-48,-12,42,-84,22,-78,18,-68,46,36,50,-80,18,6,86,-18,-90,-94,54,60},new int[]{44,-44,-52,-24,32,24,-88,-62,-64,24,-24,76,-22,-60,76,12,10,-96,-68,98,-86,20,-40,-30,-22,-14,-68,-68,-52,-72,-68,-36,4,42},new int[]{78,74,-96,46,-36,-14,72,-64,-16,26,74,-82,82,96,-82,70,-66,-90,-72,64,-52,46,-38,70,98,26,-48,-66,-92,-86,-94,-18,90,-58},new int[]{20,56,-12,82,-24,-54,48,22,-58,-94,-4,-78,-74,-82,58,2,32,76,54,76,-54,-32,34,56,-48,22,30,86,-76,-90,20,2,4,10},new int[]{42,98,42,-6,78,92,-44,-14,80,14,48,94,46,-30,40,-64,36,66,40,94,36,94,-2,-92,70,-44,28,-86,44,98,-76,66,-16,-24},new int[]{-64,-44,28,-24,92,18,88,-36,72,0,38,42,46,-94,10,-62,-64,-40,4,44,-42,-66,-62,12,-72,-68,26,58,-64,90,-20,-74,46,28},new int[]{-2,42,94,-52,-46,-14,-80,-74,22,-56,8,-88,0,-58,82,-12,96,40,-86,-30,88,50,28,-40,16,16,-58,-18,-78,40,66,-6,-50,-36},new int[]{-46,-8,-76,-74,38,-76,-2,80,-30,-64,64,34,80,-14,-4,58,-48,30,56,2,98,-82,82,-36,38,14,24,92,-38,40,6,12,90,90},new int[]{-12,24,20,-22,-86,4,48,90,-10,-90,-36,56,-18,-72,-84,68,-18,48,-80,-84,62,4,4,54,-26,-28,-58,-12,-6,32,88,-62,58,-52},new int[]{54,76,2,-98,-64,64,2,-22,18,-78,-44,-78,6,92,-32,14,-98,-70,-52,-20,14,32,40,32,62,42,34,-52,2,52,64,12,44,-12},new int[]{22,-48,30,-98,-94,36,76,52,56,76,-40,-34,-58,-70,26,20,-6,92,90,30,2,-34,96,50,96,-82,-38,-42,54,-80,-82,-10,-94,64},new int[]{-46,-36,-84,54,-64,-48,60,70,78,20,-92,-34,88,-38,-34,40,-70,58,-22,-38,46,-36,28,-24,-16,70,6,-76,-30,58,4,84,92,80},new int[]{24,48,-54,-98,60,18,70,-6,62,-60,80,-66,78,-50,36,84,30,56,-56,56,-70,38,-70,26,-6,-32,86,72,-68,42,30,2,-86,72},new int[]{-84,-98,74,-36,78,-10,-84,26,76,38,-6,-26,76,26,18,44,-96,92,74,-36,34,64,98,84,68,-56,-98,-16,44,-84,68,-66,58,-4},new int[]{72,-68,94,76,-60,-40,-34,78,-8,-28,44,88,60,-20,58,-46,-10,48,-52,-38,-62,12,30,-96,-22,-76,-40,-20,-74,78,94,78,-64,44},new int[]{92,-76,8,8,66,70,-12,32,6,28,20,50,2,78,-98,98,94,82,-58,56,10,-94,26,26,-42,-66,16,-92,24,72,56,56,14,46},new int[]{32,-90,-64,-14,92,-18,-82,36,34,-58,-22,-8,88,76,30,-68,-44,88,66,74,-32,-54,-68,-18,92,60,-30,82,34,26,-60,82,32,54},new int[]{-88,56,76,82,-82,0,74,98,28,2,-26,56,80,44,-10,-38,44,-28,88,18,-68,6,90,-38,-30,-26,56,24,-22,12,78,30,26,-42},new int[]{84,86,48,-84,88,-40,-18,40,-70,10,76,54,-82,-60,-28,-2,-74,82,-64,14,-84,-16,-84,20,16,-52,-12,26,82,2,68,98,-84,76},new int[]{-20,52,-34,56,-58,-34,10,30,14,40,-72,84,-50,-22,-54,-14,12,-66,-38,4,-44,-86,-64,60,-88,32,-60,74,-96,-50,-88,-14,-42,-82},new int[]{46,-72,-10,-70,-8,60,-10,28,-12,-82,84,36,-76,72,-98,-12,-20,-92,-16,-34,68,98,-96,-80,44,-72,22,-46,54,54,8,-42,-84,76},new int[]{38,84,32,70,82,44,52,48,0,42,-18,-80,86,-50,-48,-48,40,72,-76,16,42,-48,-74,64,38,-38,-66,-70,96,-56,38,-68,-34,-18},new int[]{-92,94,84,50,26,38,-16,-18,-86,-52,-12,36,-76,10,-92,78,-94,62,-48,18,-82,-8,-74,-90,6,22,-90,52,84,48,-98,-30,-44,2},new int[]{32,-54,38,-34,90,58,30,86,-52,-82,26,-30,22,-68,44,44,-54,24,-12,18,62,82,86,26,-78,74,36,62,50,-84,80,-2,44,-84},new int[]{42,-32,-36,54,64,54,88,30,26,6,98,34,-40,18,-50,-34,-68,-2,-94,-42,-72,38,22,62,-42,-58,-88,-52,-44,14,14,62,-56,-52},new int[]{-64,-44,14,48,-98,-48,80,-34,10,46,-64,38,72,-80,-72,52,92,-22,-28,2,0,-70,18,-34,60,36,8,2,-94,80,-32,-16,-82,-72},new int[]{94,-90,84,-34,62,70,-86,-20,-30,42,-84,20,-16,90,-90,20,-90,76,72,-12,54,72,80,30,62,66,-96,14,0,4,-78,-40,-8,74},new int[]{-70,20,74,-76,82,-88,88,-90,-8,-24,-30,10,28,-88,-72,4,0,-66,-82,-20,90,-28,48,82,-2,4,38,62,-38,14,56,74,86,58},new int[]{-6,52,94,20,88,-56,-40,-36,68,-24,68,-96,90,28,0,10,-44,-94,18,-60,98,24,26,-62,-88,50,-10,40,64,24,56,-72,30,8},new int[]{62,20,56,-38,-10,48,94,38,60,-60,-4,-56,-20,62,0,0,-82,46,58,4,-8,56,46,-82,-34,14,-38,48,48,-22,38,64,6,94}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{45,7,63,28,82,79,40,94,89,61},new int[]{50,94,80,10,25,12,1,73,84,38},new int[]{82,93,37,59,12,37,96,12,56,39},new int[]{76,56,97,56,32,33,24,31,62,94},new int[]{90,2,52,81,1,52,95,93,75,4},new int[]{8,47,21,75,12,90,91,34,74,73},new int[]{77,76,81,68,64,28,41,84,71,72},new int[]{99,93,47,15,95,76,21,48,80,39},new int[]{32,6,88,96,18,56,74,93,9,13},new int[]{27,8,53,66,4,74,14,25,41,78}}); param0.add(new int[][]{new int[]{-90,-88,-58,-54,-26,-2,6,66},new int[]{-80,-78,-60,-4,-2,58,64,68},new int[]{-98,-78,-22,-6,28,82,86,92},new int[]{-84,-4,52,64,66,84,86,98},new int[]{-62,28,32,76,92,92,96,96},new int[]{-90,-54,-42,6,24,42,44,46},new int[]{-94,-80,-36,-20,-20,-10,24,86},new int[]{-78,-8,2,48,56,66,68,78}}); param0.add(new int[][]{new int[]{0,0,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,1,0,1,0,0,1,0,0},new int[]{1,1,0,1,1,0,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1},new int[]{0,1,0,0,0,1,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1},new int[]{1,1,1,0,1,1,0,0,1,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,1,0,1,1,1,0,1},new int[]{1,0,0,0,1,1,1,0,0,1,1,0,0,0,1,1,1,0,1,1,1,0,1,0,1,1,0,1,0,1,0},new int[]{1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,0,1,1,1,1,0,0,1,0,0,1},new int[]{0,0,1,0,0,1,1,0,0,0,1,1,0,1,1,1,0,0,1,0,0,1,1,1,0,0,0,1,0,1,0},new int[]{1,1,0,1,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,1},new int[]{1,0,1,0,1,0,0,0,1,0,1,0,0,0,0,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,0},new int[]{0,1,1,1,0,1,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,1,1,1,1,1,0,1},new int[]{0,1,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,0,0,1,1},new int[]{1,1,0,1,1,0,0,0,0,1,1,0,1,0,0,0,1,0,0,0,0,1,0,1,1,1,0,1,1,0,0},new int[]{0,1,1,0,1,1,0,0,1,0,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,1,1,0,0},new int[]{1,0,1,1,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1},new int[]{0,1,0,1,1,1,1,1,0,1,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,1,0,1,0},new int[]{1,0,1,0,0,1,1,1,1,0,0,0,1,1,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,1,0},new int[]{1,1,0,1,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,1,1,1,0,0,0,1,0,0},new int[]{0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,0,1,0,1,0,0,1,1,0,0},new int[]{0,0,1,1,0,1,0,0,1,1,1,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,0,1,1,0,1},new int[]{0,0,0,1,1,1,0,0,0,1,0,1,0,1,1,1,1,0,1,0,1,0,0,1,0,1,1,0,0,0,0},new int[]{1,0,1,1,0,0,0,1,1,1,1,1,1,0,0,1,1,1,0,0,0,1,0,1,0,1,0,0,1,1,1},new int[]{1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,1,0,1,0,1},new int[]{0,1,1,1,1,0,1,1,0,0,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,0,1,0,1},new int[]{0,1,1,0,0,0,1,0,0,1,0,1,1,1,0,0,1,0,1,1,0,1,0,1,0,0,1,0,1,0,1},new int[]{1,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,0,1,1,0,1,0,1,1,1,1,0,1,0,1,0},new int[]{1,0,0,1,1,1,1,1,1,0,1,1,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0},new int[]{1,1,0,1,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,1,1,0,0,0,1,0,1,0,1,0,1},new int[]{0,1,1,1,1,0,1,1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,1,1,1},new int[]{1,0,1,0,0,0,1,1,1,1,1,0,0,0,0,1,0,1,0,1,0,1,0,1,1,0,0,0,1,1,1},new int[]{0,1,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0,1,1,1,0,0,0,0,1,0,0,1,0,0,0},new int[]{0,0,1,1,0,1,0,1,1,0,1,0,0,1,1,1,0,1,1,1,0,0,1,1,1,0,0,1,0,1,1}}); param0.add(new int[][]{new int[]{13,31,35,45,73},new int[]{16,47,54,84,87},new int[]{8,48,50,64,81},new int[]{19,43,79,88,91},new int[]{38,47,53,57,69}}); param0.add(new int[][]{new int[]{-70,-46,18,-10,-88,-22,-68,2,-42,94,64,-98,-74,-88,-60,96,64,42,-26,60,56,56,-92,-72,30},new int[]{12,-34,44,82,94,88,-60,-88,-98,-82,10,-36,94,-64,-26,26,-62,94,-90,12,-76,30,40,62,-84},new int[]{-90,98,-44,58,20,84,76,80,44,98,60,42,-66,2,10,98,28,-38,18,42,2,34,-64,-46,62},new int[]{-36,50,52,-8,-28,52,-76,18,68,-16,34,-38,-90,68,-6,-16,-98,12,-78,-18,-28,-38,26,76,26},new int[]{-70,14,-96,-42,18,-18,72,-18,-78,90,68,-22,58,98,62,-92,-38,86,-40,22,38,86,-60,46,-72},new int[]{-12,-64,-2,62,62,16,40,-58,8,-16,-80,84,-10,10,-58,30,-18,36,4,-88,-50,30,-30,-94,-20},new int[]{28,76,74,80,38,-32,4,56,-52,-24,94,6,12,-66,94,-70,98,-72,22,30,-8,-72,-26,52,98},new int[]{-36,-96,94,-64,-68,78,80,-90,-68,60,-78,-84,34,6,20,60,-86,84,-96,98,-38,-78,50,30,22},new int[]{14,88,88,-34,-76,48,10,-14,36,94,90,90,-90,26,70,-64,64,-92,0,-60,6,-60,8,-44,54},new int[]{-30,-64,-34,-26,-82,-48,-98,-50,76,-40,-16,52,-70,68,82,86,32,-70,98,-80,14,-48,-32,-84,16},new int[]{30,-70,36,34,-16,-96,-62,-62,-8,66,68,-2,16,-26,32,-50,72,-32,72,52,-22,-76,-4,90,20},new int[]{92,-72,-48,84,-98,-80,74,-30,58,6,-10,-84,-96,-60,-18,-42,26,-96,-20,-18,-12,2,58,6,36},new int[]{-74,-44,-20,-58,58,24,-34,6,52,-40,36,-22,-78,82,64,56,-70,-2,-32,74,98,38,30,80,-80},new int[]{58,92,-16,76,-28,-10,60,-80,96,-72,38,-64,8,-84,90,20,64,-74,-78,-94,-68,44,62,14,-74},new int[]{-2,-30,-10,-84,66,-16,58,26,42,-98,18,54,22,-2,-62,10,14,26,32,-56,-84,-14,-50,-48,52},new int[]{-94,-58,38,-76,-46,-98,-14,34,8,8,4,26,48,-74,-62,90,54,88,56,16,-36,-2,-72,-8,84},new int[]{22,-60,-50,50,22,-46,-42,38,74,-2,-66,-94,38,12,8,-84,10,94,56,-16,-38,-84,30,-90,-90},new int[]{-32,-98,24,-80,-24,56,-84,-50,86,0,22,-26,70,-38,-16,-52,70,34,92,24,-88,42,2,-70,-32},new int[]{28,-8,52,64,-50,-24,24,32,70,-54,-34,24,-46,22,-42,-6,-24,62,44,22,-58,-54,16,4,-64},new int[]{-12,44,4,24,76,-82,86,50,-10,-28,44,36,-8,76,-2,-96,52,52,-48,66,80,76,26,-16,20},new int[]{18,-50,-68,30,-36,-4,14,-52,-32,0,68,74,84,4,64,92,24,12,-8,-22,-22,14,-44,-26,80},new int[]{82,26,-46,-10,62,-70,-74,72,-14,98,8,-54,30,26,44,38,-22,24,98,8,56,-96,-94,-62,48},new int[]{32,-10,-72,66,-86,-94,-98,4,22,-54,-74,22,-24,-12,-80,98,-38,-34,-52,-74,96,-62,68,24,34},new int[]{66,-6,-38,-62,-16,82,-78,-20,50,62,96,46,-22,74,-84,54,-32,-16,62,-4,-70,-38,-6,-4,-94},new int[]{-10,0,-30,-28,38,-48,80,4,-52,-88,42,4,-44,-10,56,-22,70,-78,52,0,-32,-30,42,-54,-98}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,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},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{65,68,77,53,21,82,84,4,96,27,89,71,45,94,87,29,57,21,97,82,27,78,40,31,8,67,35,75,98,87,69,30,37,16,14},new int[]{71,97,2,46,5,45,45,60,15,42,2,88,29,93,85,25,22,83,62,13,62,38,57,33,33,56,12,87,93,29,43,60,65,24,69},new int[]{57,35,45,69,13,32,55,27,88,3,1,63,93,45,86,69,43,85,12,92,75,15,38,62,35,16,64,15,96,64,58,80,97,40,57},new int[]{20,37,32,74,16,5,20,56,91,43,60,50,59,84,13,19,79,38,27,81,74,36,5,51,48,27,59,54,28,68,71,8,15,29,73},new int[]{20,65,7,34,10,48,70,25,76,41,78,11,12,83,42,92,53,83,29,45,99,23,60,80,60,21,59,40,1,25,16,33,89,22,67},new int[]{67,75,43,52,63,5,25,38,53,16,96,93,70,86,73,10,55,14,84,69,71,54,56,78,57,15,81,84,16,21,75,68,25,66,66},new int[]{91,95,47,72,72,5,22,69,40,48,70,38,71,18,25,67,89,21,95,49,42,80,52,64,86,93,76,46,43,63,1,26,74,25,89},new int[]{4,82,60,43,72,7,17,6,42,44,21,2,13,32,77,29,5,90,96,82,17,84,15,60,79,68,73,44,33,10,47,1,40,73,22},new int[]{26,35,33,10,61,38,19,68,83,7,12,91,32,27,57,85,54,69,83,7,78,73,37,50,9,5,54,48,9,52,30,78,60,3,52},new int[]{24,28,39,55,75,81,82,81,25,14,85,11,47,27,4,51,34,40,71,18,19,82,15,75,12,35,36,12,16,92,44,44,36,59,30},new int[]{16,80,84,9,46,5,95,18,44,86,39,66,58,67,47,92,75,74,84,95,53,51,45,48,22,82,12,79,55,98,45,92,63,64,44},new int[]{15,99,17,75,61,26,29,89,4,27,42,86,24,19,41,91,83,13,95,66,91,64,72,12,29,29,86,30,73,69,13,2,33,4,56},new int[]{74,57,97,2,63,12,16,60,99,56,73,3,92,52,16,83,75,46,31,1,55,30,85,79,16,68,88,40,87,17,99,26,35,79,15},new int[]{27,72,15,72,4,65,25,99,8,49,17,28,70,6,55,1,67,52,73,79,40,84,16,74,78,16,15,41,90,10,60,12,37,14,25},new int[]{94,53,30,59,63,99,79,95,18,71,67,5,89,16,79,84,41,60,86,35,27,12,33,24,26,98,13,92,20,72,50,80,34,96,30},new int[]{99,16,48,9,54,31,19,34,62,80,88,16,79,31,52,56,71,44,15,66,86,24,89,61,12,14,34,20,63,78,82,35,63,81,48},new int[]{45,87,86,49,31,29,25,96,95,6,37,17,31,58,21,2,7,91,22,4,91,45,96,85,99,73,92,10,87,24,57,4,81,48,88},new int[]{58,1,66,40,48,53,6,14,62,36,21,25,54,72,27,78,4,8,91,83,94,92,91,61,37,44,3,49,28,83,91,87,83,57,13},new int[]{94,41,72,29,43,50,50,47,70,56,17,29,56,52,48,2,33,59,39,55,35,31,76,31,26,96,49,60,50,60,3,20,56,47,2},new int[]{63,77,93,63,51,70,42,8,26,54,74,38,56,65,66,43,64,35,65,68,3,88,55,81,27,25,59,84,39,54,51,30,70,71,27},new int[]{5,26,36,11,56,23,3,79,58,44,89,80,96,26,69,10,75,97,92,57,80,44,2,29,2,86,75,35,96,64,5,91,51,76,8},new int[]{3,96,22,63,28,90,45,21,75,27,7,73,47,48,98,43,26,70,76,37,50,44,1,35,68,40,50,72,66,12,72,41,60,31,85},new int[]{95,32,20,83,47,94,73,84,18,77,60,30,29,52,51,30,69,68,50,59,31,42,33,65,19,15,66,68,3,87,60,43,53,70,94},new int[]{23,49,15,47,81,9,66,50,53,93,42,46,95,96,58,1,94,92,90,82,1,41,48,83,99,33,72,91,42,8,58,96,83,30,60},new int[]{10,64,36,16,3,86,86,85,94,27,66,72,43,23,39,38,36,14,95,57,47,51,19,30,16,76,64,60,88,42,38,61,96,50,19},new int[]{40,47,62,69,46,63,47,2,51,96,91,2,37,37,57,22,98,64,91,81,39,87,74,22,15,61,60,50,61,62,40,36,39,16,56},new int[]{28,35,32,52,47,88,63,21,83,32,34,52,82,11,75,82,1,40,1,24,41,86,71,81,49,12,65,67,94,87,59,72,17,6,60},new int[]{56,12,21,75,66,20,64,20,95,36,62,24,86,9,58,49,81,98,53,11,6,59,51,49,87,47,45,49,40,90,9,8,49,52,26},new int[]{12,97,64,71,80,26,89,35,93,50,92,16,83,40,6,91,67,98,17,32,24,99,35,96,53,15,37,25,85,78,23,55,7,5,78},new int[]{83,71,72,68,6,10,50,14,13,71,21,97,11,6,36,75,55,34,94,73,71,46,37,60,18,49,93,85,14,16,26,95,51,75,96},new int[]{90,63,33,60,37,11,20,77,34,60,97,58,43,68,54,72,60,11,66,22,4,42,89,52,44,15,76,97,32,70,1,20,69,37,51},new int[]{2,78,17,50,82,17,31,56,31,36,19,61,32,81,88,4,69,47,41,1,90,42,67,23,13,86,95,61,72,30,46,76,86,43,15},new int[]{30,60,24,25,53,58,2,65,84,45,44,26,8,83,31,79,52,2,66,50,93,97,10,46,58,85,85,13,51,80,83,88,58,62,23},new int[]{4,31,8,25,54,87,11,92,45,87,45,60,64,43,64,47,61,98,48,75,8,34,8,52,81,86,8,62,65,14,69,91,48,87,12},new int[]{64,30,8,66,69,77,81,35,79,12,99,67,10,2,15,63,7,20,60,8,90,58,8,30,84,54,54,95,29,53,94,31,4,29,44}}); List param1 = new ArrayList<>(); param1.add(3); param1.add(33); param1.add(9); param1.add(6); param1.add(6); param1.add(27); param1.add(2); param1.add(15); param1.add(21); param1.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( grid , n ) : incl = max ( grid [ 0 ] [ 0 ] , grid [ 1 ] [ 0 ] ) excl = 0 for i in range ( 1 , n ) : excl_new = max ( excl , incl ) incl = excl + max ( grid [ 0 ] [ i ] , grid [ 1 ] [ i ] ) excl = excl_new return max ( excl , incl ) ",,," if __name__ == '__main__': param = [ ([[6, 10, 23, 28, 35, 55, 91], [11, 14, 15, 54, 55, 62, 81], [18, 26, 40, 43, 47, 89, 93], [3, 11, 19, 53, 65, 82, 92], [14, 32, 43, 44, 51, 77, 83], [6, 6, 30, 30, 33, 73, 74], [2, 2, 10, 61, 70, 81, 84]],3,), ([[-28, -20, -60, 92, 12, -66, 20, -22, 72, -90, 30, 90, -64, 38, 24, 78, 42, -72, -86, 88, -66, -74, -52, 26, -76, -64, -54, -56, -50, -12, -50, -58, -42, 20], [-84, -90, 32, 4, -54, -96, 72, 70, -2, 62, -20, 22, -38, 78, -86, -50, 64, 92, 16, 22, 44, -72, -88, -54, 58, 72, -28, 34, -10, -12, -82, 38, -76, 86], [30, 94, 12, -58, 24, -58, 82, -96, -84, -76, -56, -2, -82, -12, -24, 86, -94, 72, 36, 86, 54, 76, -96, -94, -70, 76, 0, -48, -84, 6, -90, 44, -8, -22], [-36, 90, 20, 44, -66, -54, 54, 14, -12, 58, -10, 84, -4, 88, -70, -24, -84, -8, 58, -22, 2, -32, -28, -60, -74, -12, -10, -6, -58, -54, -8, -94, 72, 86], [-20, 88, 28, 76, 78, 52, 0, -60, 94, -22, -56, -8, 66, -36, -48, -12, 42, -84, 22, -78, 18, -68, 46, 36, 50, -80, 18, 6, 86, -18, -90, -94, 54, 60], [44, -44, -52, -24, 32, 24, -88, -62, -64, 24, -24, 76, -22, -60, 76, 12, 10, -96, -68, 98, -86, 20, -40, -30, -22, -14, -68, -68, -52, -72, -68, -36, 4, 42], [78, 74, -96, 46, -36, -14, 72, -64, -16, 26, 74, -82, 82, 96, -82, 70, -66, -90, -72, 64, -52, 46, -38, 70, 98, 26, -48, -66, -92, -86, -94, -18, 90, -58], [20, 56, -12, 82, -24, -54, 48, 22, -58, -94, -4, -78, -74, -82, 58, 2, 32, 76, 54, 76, -54, -32, 34, 56, -48, 22, 30, 86, -76, -90, 20, 2, 4, 10], [42, 98, 42, -6, 78, 92, -44, -14, 80, 14, 48, 94, 46, -30, 40, -64, 36, 66, 40, 94, 36, 94, -2, -92, 70, -44, 28, -86, 44, 98, -76, 66, -16, -24], [-64, -44, 28, -24, 92, 18, 88, -36, 72, 0, 38, 42, 46, -94, 10, -62, -64, -40, 4, 44, -42, -66, -62, 12, -72, -68, 26, 58, -64, 90, -20, -74, 46, 28], [-2, 42, 94, -52, -46, -14, -80, -74, 22, -56, 8, -88, 0, -58, 82, -12, 96, 40, -86, -30, 88, 50, 28, -40, 16, 16, -58, -18, -78, 40, 66, -6, -50, -36], [-46, -8, -76, -74, 38, -76, -2, 80, -30, -64, 64, 34, 80, -14, -4, 58, -48, 30, 56, 2, 98, -82, 82, -36, 38, 14, 24, 92, -38, 40, 6, 12, 90, 90], [-12, 24, 20, -22, -86, 4, 48, 90, -10, -90, -36, 56, -18, -72, -84, 68, -18, 48, -80, -84, 62, 4, 4, 54, -26, -28, -58, -12, -6, 32, 88, -62, 58, -52], [54, 76, 2, -98, -64, 64, 2, -22, 18, -78, -44, -78, 6, 92, -32, 14, -98, -70, -52, -20, 14, 32, 40, 32, 62, 42, 34, -52, 2, 52, 64, 12, 44, -12], [22, -48, 30, -98, -94, 36, 76, 52, 56, 76, -40, -34, -58, -70, 26, 20, -6, 92, 90, 30, 2, -34, 96, 50, 96, -82, -38, -42, 54, -80, -82, -10, -94, 64], [-46, -36, -84, 54, -64, -48, 60, 70, 78, 20, -92, -34, 88, -38, -34, 40, -70, 58, -22, -38, 46, -36, 28, -24, -16, 70, 6, -76, -30, 58, 4, 84, 92, 80], [24, 48, -54, -98, 60, 18, 70, -6, 62, -60, 80, -66, 78, -50, 36, 84, 30, 56, -56, 56, -70, 38, -70, 26, -6, -32, 86, 72, -68, 42, 30, 2, -86, 72], [-84, -98, 74, -36, 78, -10, -84, 26, 76, 38, -6, -26, 76, 26, 18, 44, -96, 92, 74, -36, 34, 64, 98, 84, 68, -56, -98, -16, 44, -84, 68, -66, 58, -4], [72, -68, 94, 76, -60, -40, -34, 78, -8, -28, 44, 88, 60, -20, 58, -46, -10, 48, -52, -38, -62, 12, 30, -96, -22, -76, -40, -20, -74, 78, 94, 78, -64, 44], [92, -76, 8, 8, 66, 70, -12, 32, 6, 28, 20, 50, 2, 78, -98, 98, 94, 82, -58, 56, 10, -94, 26, 26, -42, -66, 16, -92, 24, 72, 56, 56, 14, 46], [32, -90, -64, -14, 92, -18, -82, 36, 34, -58, -22, -8, 88, 76, 30, -68, -44, 88, 66, 74, -32, -54, -68, -18, 92, 60, -30, 82, 34, 26, -60, 82, 32, 54], [-88, 56, 76, 82, -82, 0, 74, 98, 28, 2, -26, 56, 80, 44, -10, -38, 44, -28, 88, 18, -68, 6, 90, -38, -30, -26, 56, 24, -22, 12, 78, 30, 26, -42], [84, 86, 48, -84, 88, -40, -18, 40, -70, 10, 76, 54, -82, -60, -28, -2, -74, 82, -64, 14, -84, -16, -84, 20, 16, -52, -12, 26, 82, 2, 68, 98, -84, 76], [-20, 52, -34, 56, -58, -34, 10, 30, 14, 40, -72, 84, -50, -22, -54, -14, 12, -66, -38, 4, -44, -86, -64, 60, -88, 32, -60, 74, -96, -50, -88, -14, -42, -82], [46, -72, -10, -70, -8, 60, -10, 28, -12, -82, 84, 36, -76, 72, -98, -12, -20, -92, -16, -34, 68, 98, -96, -80, 44, -72, 22, -46, 54, 54, 8, -42, -84, 76], [38, 84, 32, 70, 82, 44, 52, 48, 0, 42, -18, -80, 86, -50, -48, -48, 40, 72, -76, 16, 42, -48, -74, 64, 38, -38, -66, -70, 96, -56, 38, -68, -34, -18], [-92, 94, 84, 50, 26, 38, -16, -18, -86, -52, -12, 36, -76, 10, -92, 78, -94, 62, -48, 18, -82, -8, -74, -90, 6, 22, -90, 52, 84, 48, -98, -30, -44, 2], [32, -54, 38, -34, 90, 58, 30, 86, -52, -82, 26, -30, 22, -68, 44, 44, -54, 24, -12, 18, 62, 82, 86, 26, -78, 74, 36, 62, 50, -84, 80, -2, 44, -84], [42, -32, -36, 54, 64, 54, 88, 30, 26, 6, 98, 34, -40, 18, -50, -34, -68, -2, -94, -42, -72, 38, 22, 62, -42, -58, -88, -52, -44, 14, 14, 62, -56, -52], [-64, -44, 14, 48, -98, -48, 80, -34, 10, 46, -64, 38, 72, -80, -72, 52, 92, -22, -28, 2, 0, -70, 18, -34, 60, 36, 8, 2, -94, 80, -32, -16, -82, -72], [94, -90, 84, -34, 62, 70, -86, -20, -30, 42, -84, 20, -16, 90, -90, 20, -90, 76, 72, -12, 54, 72, 80, 30, 62, 66, -96, 14, 0, 4, -78, -40, -8, 74], [-70, 20, 74, -76, 82, -88, 88, -90, -8, -24, -30, 10, 28, -88, -72, 4, 0, -66, -82, -20, 90, -28, 48, 82, -2, 4, 38, 62, -38, 14, 56, 74, 86, 58], [-6, 52, 94, 20, 88, -56, -40, -36, 68, -24, 68, -96, 90, 28, 0, 10, -44, -94, 18, -60, 98, 24, 26, -62, -88, 50, -10, 40, 64, 24, 56, -72, 30, 8], [62, 20, 56, -38, -10, 48, 94, 38, 60, -60, -4, -56, -20, 62, 0, 0, -82, 46, 58, 4, -8, 56, 46, -82, -34, 14, -38, 48, 48, -22, 38, 64, 6, 94]],33,), ([[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], [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, 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, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],9,), ([[45, 7, 63, 28, 82, 79, 40, 94, 89, 61], [50, 94, 80, 10, 25, 12, 1, 73, 84, 38], [82, 93, 37, 59, 12, 37, 96, 12, 56, 39], [76, 56, 97, 56, 32, 33, 24, 31, 62, 94], [90, 2, 52, 81, 1, 52, 95, 93, 75, 4], [8, 47, 21, 75, 12, 90, 91, 34, 74, 73], [77, 76, 81, 68, 64, 28, 41, 84, 71, 72], [99, 93, 47, 15, 95, 76, 21, 48, 80, 39], [32, 6, 88, 96, 18, 56, 74, 93, 9, 13], [27, 8, 53, 66, 4, 74, 14, 25, 41, 78]],6,), ([[-90, -88, -58, -54, -26, -2, 6, 66], [-80, -78, -60, -4, -2, 58, 64, 68], [-98, -78, -22, -6, 28, 82, 86, 92], [-84, -4, 52, 64, 66, 84, 86, 98], [-62, 28, 32, 76, 92, 92, 96, 96], [-90, -54, -42, 6, 24, 42, 44, 46], [-94, -80, -36, -20, -20, -10, 24, 86], [-78, -8, 2, 48, 56, 66, 68, 78]],6,), ([[0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0], [1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1], [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0], [1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0], [1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1], [1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1], [0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1], [0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0], [0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1]],27,), ([[13, 31, 35, 45, 73], [16, 47, 54, 84, 87], [8, 48, 50, 64, 81], [19, 43, 79, 88, 91], [38, 47, 53, 57, 69]],2,), ([[-70, -46, 18, -10, -88, -22, -68, 2, -42, 94, 64, -98, -74, -88, -60, 96, 64, 42, -26, 60, 56, 56, -92, -72, 30], [12, -34, 44, 82, 94, 88, -60, -88, -98, -82, 10, -36, 94, -64, -26, 26, -62, 94, -90, 12, -76, 30, 40, 62, -84], [-90, 98, -44, 58, 20, 84, 76, 80, 44, 98, 60, 42, -66, 2, 10, 98, 28, -38, 18, 42, 2, 34, -64, -46, 62], [-36, 50, 52, -8, -28, 52, -76, 18, 68, -16, 34, -38, -90, 68, -6, -16, -98, 12, -78, -18, -28, -38, 26, 76, 26], [-70, 14, -96, -42, 18, -18, 72, -18, -78, 90, 68, -22, 58, 98, 62, -92, -38, 86, -40, 22, 38, 86, -60, 46, -72], [-12, -64, -2, 62, 62, 16, 40, -58, 8, -16, -80, 84, -10, 10, -58, 30, -18, 36, 4, -88, -50, 30, -30, -94, -20], [28, 76, 74, 80, 38, -32, 4, 56, -52, -24, 94, 6, 12, -66, 94, -70, 98, -72, 22, 30, -8, -72, -26, 52, 98], [-36, -96, 94, -64, -68, 78, 80, -90, -68, 60, -78, -84, 34, 6, 20, 60, -86, 84, -96, 98, -38, -78, 50, 30, 22], [14, 88, 88, -34, -76, 48, 10, -14, 36, 94, 90, 90, -90, 26, 70, -64, 64, -92, 0, -60, 6, -60, 8, -44, 54], [-30, -64, -34, -26, -82, -48, -98, -50, 76, -40, -16, 52, -70, 68, 82, 86, 32, -70, 98, -80, 14, -48, -32, -84, 16], [30, -70, 36, 34, -16, -96, -62, -62, -8, 66, 68, -2, 16, -26, 32, -50, 72, -32, 72, 52, -22, -76, -4, 90, 20], [92, -72, -48, 84, -98, -80, 74, -30, 58, 6, -10, -84, -96, -60, -18, -42, 26, -96, -20, -18, -12, 2, 58, 6, 36], [-74, -44, -20, -58, 58, 24, -34, 6, 52, -40, 36, -22, -78, 82, 64, 56, -70, -2, -32, 74, 98, 38, 30, 80, -80], [58, 92, -16, 76, -28, -10, 60, -80, 96, -72, 38, -64, 8, -84, 90, 20, 64, -74, -78, -94, -68, 44, 62, 14, -74], [-2, -30, -10, -84, 66, -16, 58, 26, 42, -98, 18, 54, 22, -2, -62, 10, 14, 26, 32, -56, -84, -14, -50, -48, 52], [-94, -58, 38, -76, -46, -98, -14, 34, 8, 8, 4, 26, 48, -74, -62, 90, 54, 88, 56, 16, -36, -2, -72, -8, 84], [22, -60, -50, 50, 22, -46, -42, 38, 74, -2, -66, -94, 38, 12, 8, -84, 10, 94, 56, -16, -38, -84, 30, -90, -90], [-32, -98, 24, -80, -24, 56, -84, -50, 86, 0, 22, -26, 70, -38, -16, -52, 70, 34, 92, 24, -88, 42, 2, -70, -32], [28, -8, 52, 64, -50, -24, 24, 32, 70, -54, -34, 24, -46, 22, -42, -6, -24, 62, 44, 22, -58, -54, 16, 4, -64], [-12, 44, 4, 24, 76, -82, 86, 50, -10, -28, 44, 36, -8, 76, -2, -96, 52, 52, -48, 66, 80, 76, 26, -16, 20], [18, -50, -68, 30, -36, -4, 14, -52, -32, 0, 68, 74, 84, 4, 64, 92, 24, 12, -8, -22, -22, 14, -44, -26, 80], [82, 26, -46, -10, 62, -70, -74, 72, -14, 98, 8, -54, 30, 26, 44, 38, -22, 24, 98, 8, 56, -96, -94, -62, 48], [32, -10, -72, 66, -86, -94, -98, 4, 22, -54, -74, 22, -24, -12, -80, 98, -38, -34, -52, -74, 96, -62, 68, 24, 34], [66, -6, -38, -62, -16, 82, -78, -20, 50, 62, 96, 46, -22, 74, -84, 54, -32, -16, 62, -4, -70, -38, -6, -4, -94], [-10, 0, -30, -28, 38, -48, 80, 4, -52, -88, 42, 4, -44, -10, 56, -22, 70, -78, 52, 0, -32, -30, 42, -54, -98]],15,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],21,), ([[65, 68, 77, 53, 21, 82, 84, 4, 96, 27, 89, 71, 45, 94, 87, 29, 57, 21, 97, 82, 27, 78, 40, 31, 8, 67, 35, 75, 98, 87, 69, 30, 37, 16, 14], [71, 97, 2, 46, 5, 45, 45, 60, 15, 42, 2, 88, 29, 93, 85, 25, 22, 83, 62, 13, 62, 38, 57, 33, 33, 56, 12, 87, 93, 29, 43, 60, 65, 24, 69], [57, 35, 45, 69, 13, 32, 55, 27, 88, 3, 1, 63, 93, 45, 86, 69, 43, 85, 12, 92, 75, 15, 38, 62, 35, 16, 64, 15, 96, 64, 58, 80, 97, 40, 57], [20, 37, 32, 74, 16, 5, 20, 56, 91, 43, 60, 50, 59, 84, 13, 19, 79, 38, 27, 81, 74, 36, 5, 51, 48, 27, 59, 54, 28, 68, 71, 8, 15, 29, 73], [20, 65, 7, 34, 10, 48, 70, 25, 76, 41, 78, 11, 12, 83, 42, 92, 53, 83, 29, 45, 99, 23, 60, 80, 60, 21, 59, 40, 1, 25, 16, 33, 89, 22, 67], [67, 75, 43, 52, 63, 5, 25, 38, 53, 16, 96, 93, 70, 86, 73, 10, 55, 14, 84, 69, 71, 54, 56, 78, 57, 15, 81, 84, 16, 21, 75, 68, 25, 66, 66], [91, 95, 47, 72, 72, 5, 22, 69, 40, 48, 70, 38, 71, 18, 25, 67, 89, 21, 95, 49, 42, 80, 52, 64, 86, 93, 76, 46, 43, 63, 1, 26, 74, 25, 89], [4, 82, 60, 43, 72, 7, 17, 6, 42, 44, 21, 2, 13, 32, 77, 29, 5, 90, 96, 82, 17, 84, 15, 60, 79, 68, 73, 44, 33, 10, 47, 1, 40, 73, 22], [26, 35, 33, 10, 61, 38, 19, 68, 83, 7, 12, 91, 32, 27, 57, 85, 54, 69, 83, 7, 78, 73, 37, 50, 9, 5, 54, 48, 9, 52, 30, 78, 60, 3, 52], [24, 28, 39, 55, 75, 81, 82, 81, 25, 14, 85, 11, 47, 27, 4, 51, 34, 40, 71, 18, 19, 82, 15, 75, 12, 35, 36, 12, 16, 92, 44, 44, 36, 59, 30], [16, 80, 84, 9, 46, 5, 95, 18, 44, 86, 39, 66, 58, 67, 47, 92, 75, 74, 84, 95, 53, 51, 45, 48, 22, 82, 12, 79, 55, 98, 45, 92, 63, 64, 44], [15, 99, 17, 75, 61, 26, 29, 89, 4, 27, 42, 86, 24, 19, 41, 91, 83, 13, 95, 66, 91, 64, 72, 12, 29, 29, 86, 30, 73, 69, 13, 2, 33, 4, 56], [74, 57, 97, 2, 63, 12, 16, 60, 99, 56, 73, 3, 92, 52, 16, 83, 75, 46, 31, 1, 55, 30, 85, 79, 16, 68, 88, 40, 87, 17, 99, 26, 35, 79, 15], [27, 72, 15, 72, 4, 65, 25, 99, 8, 49, 17, 28, 70, 6, 55, 1, 67, 52, 73, 79, 40, 84, 16, 74, 78, 16, 15, 41, 90, 10, 60, 12, 37, 14, 25], [94, 53, 30, 59, 63, 99, 79, 95, 18, 71, 67, 5, 89, 16, 79, 84, 41, 60, 86, 35, 27, 12, 33, 24, 26, 98, 13, 92, 20, 72, 50, 80, 34, 96, 30], [99, 16, 48, 9, 54, 31, 19, 34, 62, 80, 88, 16, 79, 31, 52, 56, 71, 44, 15, 66, 86, 24, 89, 61, 12, 14, 34, 20, 63, 78, 82, 35, 63, 81, 48], [45, 87, 86, 49, 31, 29, 25, 96, 95, 6, 37, 17, 31, 58, 21, 2, 7, 91, 22, 4, 91, 45, 96, 85, 99, 73, 92, 10, 87, 24, 57, 4, 81, 48, 88], [58, 1, 66, 40, 48, 53, 6, 14, 62, 36, 21, 25, 54, 72, 27, 78, 4, 8, 91, 83, 94, 92, 91, 61, 37, 44, 3, 49, 28, 83, 91, 87, 83, 57, 13], [94, 41, 72, 29, 43, 50, 50, 47, 70, 56, 17, 29, 56, 52, 48, 2, 33, 59, 39, 55, 35, 31, 76, 31, 26, 96, 49, 60, 50, 60, 3, 20, 56, 47, 2], [63, 77, 93, 63, 51, 70, 42, 8, 26, 54, 74, 38, 56, 65, 66, 43, 64, 35, 65, 68, 3, 88, 55, 81, 27, 25, 59, 84, 39, 54, 51, 30, 70, 71, 27], [5, 26, 36, 11, 56, 23, 3, 79, 58, 44, 89, 80, 96, 26, 69, 10, 75, 97, 92, 57, 80, 44, 2, 29, 2, 86, 75, 35, 96, 64, 5, 91, 51, 76, 8], [3, 96, 22, 63, 28, 90, 45, 21, 75, 27, 7, 73, 47, 48, 98, 43, 26, 70, 76, 37, 50, 44, 1, 35, 68, 40, 50, 72, 66, 12, 72, 41, 60, 31, 85], [95, 32, 20, 83, 47, 94, 73, 84, 18, 77, 60, 30, 29, 52, 51, 30, 69, 68, 50, 59, 31, 42, 33, 65, 19, 15, 66, 68, 3, 87, 60, 43, 53, 70, 94], [23, 49, 15, 47, 81, 9, 66, 50, 53, 93, 42, 46, 95, 96, 58, 1, 94, 92, 90, 82, 1, 41, 48, 83, 99, 33, 72, 91, 42, 8, 58, 96, 83, 30, 60], [10, 64, 36, 16, 3, 86, 86, 85, 94, 27, 66, 72, 43, 23, 39, 38, 36, 14, 95, 57, 47, 51, 19, 30, 16, 76, 64, 60, 88, 42, 38, 61, 96, 50, 19], [40, 47, 62, 69, 46, 63, 47, 2, 51, 96, 91, 2, 37, 37, 57, 22, 98, 64, 91, 81, 39, 87, 74, 22, 15, 61, 60, 50, 61, 62, 40, 36, 39, 16, 56], [28, 35, 32, 52, 47, 88, 63, 21, 83, 32, 34, 52, 82, 11, 75, 82, 1, 40, 1, 24, 41, 86, 71, 81, 49, 12, 65, 67, 94, 87, 59, 72, 17, 6, 60], [56, 12, 21, 75, 66, 20, 64, 20, 95, 36, 62, 24, 86, 9, 58, 49, 81, 98, 53, 11, 6, 59, 51, 49, 87, 47, 45, 49, 40, 90, 9, 8, 49, 52, 26], [12, 97, 64, 71, 80, 26, 89, 35, 93, 50, 92, 16, 83, 40, 6, 91, 67, 98, 17, 32, 24, 99, 35, 96, 53, 15, 37, 25, 85, 78, 23, 55, 7, 5, 78], [83, 71, 72, 68, 6, 10, 50, 14, 13, 71, 21, 97, 11, 6, 36, 75, 55, 34, 94, 73, 71, 46, 37, 60, 18, 49, 93, 85, 14, 16, 26, 95, 51, 75, 96], [90, 63, 33, 60, 37, 11, 20, 77, 34, 60, 97, 58, 43, 68, 54, 72, 60, 11, 66, 22, 4, 42, 89, 52, 44, 15, 76, 97, 32, 70, 1, 20, 69, 37, 51], [2, 78, 17, 50, 82, 17, 31, 56, 31, 36, 19, 61, 32, 81, 88, 4, 69, 47, 41, 1, 90, 42, 67, 23, 13, 86, 95, 61, 72, 30, 46, 76, 86, 43, 15], [30, 60, 24, 25, 53, 58, 2, 65, 84, 45, 44, 26, 8, 83, 31, 79, 52, 2, 66, 50, 93, 97, 10, 46, 58, 85, 85, 13, 51, 80, 83, 88, 58, 62, 23], [4, 31, 8, 25, 54, 87, 11, 92, 45, 87, 45, 60, 64, 43, 64, 47, 61, 98, 48, 75, 8, 34, 8, 52, 81, 86, 8, 62, 65, 14, 69, 91, 48, 87, 12], [64, 30, 8, 66, 69, 77, 81, 35, 79, 12, 99, 67, 10, 2, 15, 63, 7, 20, 60, 8, 90, 58, 8, 30, 84, 54, 54, 95, 29, 53, 94, 31, 4, 29, 44]],28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_1{ static long f_gold ( int n ) { long sum = 0 ; sum = 1 << n ; return ( sum - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(53); param0.add(3); param0.add(28); param0.add(44); param0.add(84); param0.add(83); param0.add(46); param0.add(3); param0.add(16); param0.add(89); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 sum = 1 << n ; return ( sum - 1 ) "," using namespace std; long long int f_gold ( int n ) { long long int sum = 0; sum = 1 << n; return ( sum - 1 ); } int main() { int n_success = 0; vector param0 {53,3,28,44,84,83,46,3,16,89}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (53,), (3,), (28,), (44,), (84,), (83,), (46,), (3,), (16,), (89,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FUNCTION_COPY_STRING_ITERATIVE_RECURSIVE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class FUNCTION_COPY_STRING_ITERATIVE_RECURSIVE_1{ static void f_gold ( char s1 [ ] , char s2 [ ] , int index ) { s2 [ index ] = s1 [ index ] ; if ( index == s1 . length - 1 ) { return ; } f_gold ( s1 , s2 , index + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'v'}); param0.add(new char[]{'6','8','3','3','5','2','5','6','9','9','2','6','2','1','9','3','7'}); param0.add(new char[]{'0','0','0','0','0','0','0','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'}); param0.add(new char[]{'e','G','a','r','F','U','W','k','u','z','y','v','A','W','m','G','H','O','I','a','u','V','f','B','q','e','E','e','L','c',' ','w','K',' ','K','j','j','s','q','u','n','i','T','a','Y'}); param0.add(new char[]{'0','0','0','0','1','1','1','2','2','2','2','2','2','3','3','3','3','4','4','4','4','5','5','6','6','6','7','7','7','7','7','7','8','8','9','9','9','9'}); param0.add(new char[]{'1','0','0','1','0','1','1','1','0','0','0','1','0','0','0','1','1','0','0','0','0','1','1'}); param0.add(new char[]{' ','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'}); param0.add(new char[]{'4'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}); List param1 = new ArrayList<>(); param1.add(new char[]{'Z'}); param1.add(new char[]{'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'}); param1.add(new char[]{'0','0','0','0','0','0','0','0','0','0','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'}); param1.add(new char[]{'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'}); param1.add(new char[]{'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'}); param1.add(new char[]{'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'}); param1.add(new char[]{'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'}); param1.add(new char[]{'8'}); param1.add(new char[]{'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}); param1.add(new char[]{'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}); List param2 = new ArrayList<>(); param2.add(0); param2.add(11); param2.add(34); param2.add(41); param2.add(33); param2.add(13); param2.add(40); param2.add(0); param2.add(12); param2.add(7); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new char[]{'v'}); filled_function_param0.add(new char[]{'6','8','3','3','5','2','5','6','9','9','2','6','2','1','9','3','7'}); filled_function_param0.add(new char[]{'0','0','0','0','0','0','0','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'}); filled_function_param0.add(new char[]{'e','G','a','r','F','U','W','k','u','z','y','v','A','W','m','G','H','O','I','a','u','V','f','B','q','e','E','e','L','c',' ','w','K',' ','K','j','j','s','q','u','n','i','T','a','Y'}); filled_function_param0.add(new char[]{'0','0','0','0','1','1','1','2','2','2','2','2','2','3','3','3','3','4','4','4','4','5','5','6','6','6','7','7','7','7','7','7','8','8','9','9','9','9'}); filled_function_param0.add(new char[]{'1','0','0','1','0','1','1','1','0','0','0','1','0','0','0','1','1','0','0','0','0','1','1'}); filled_function_param0.add(new char[]{' ','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'}); filled_function_param0.add(new char[]{'4'}); filled_function_param0.add(new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'}); filled_function_param0.add(new char[]{'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(new char[]{'Z'}); filled_function_param1.add(new char[]{'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'}); filled_function_param1.add(new char[]{'0','0','0','0','0','0','0','0','0','0','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'}); filled_function_param1.add(new char[]{'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'}); filled_function_param1.add(new char[]{'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'}); filled_function_param1.add(new char[]{'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'}); filled_function_param1.add(new char[]{'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'}); filled_function_param1.add(new char[]{'8'}); filled_function_param1.add(new char[]{'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}); filled_function_param1.add(new char[]{'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}); List filled_function_param2 = new ArrayList<>(); filled_function_param2.add(0); filled_function_param2.add(11); filled_function_param2.add(34); filled_function_param2.add(41); filled_function_param2.add(33); filled_function_param2.add(13); filled_function_param2.add(40); filled_function_param2.add(0); filled_function_param2.add(12); filled_function_param2.add(7); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && Arrays.equals(param1.get(i), filled_function_param1.get(i)) && param2.get(i) == filled_function_param2.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s1 , s2 , index ) : s2 [ index ] = s1 [ index ] ; if ( index == len ( s1 ) - 1 ) : return ; f_gold ( s1 , s2 , index + 1 ) ; "," using namespace std; void f_gold ( char s1 [ ], char s2 [ ], int index = 0 ) { s2 [ index ] = s1 [ index ]; if ( s1 [ index ] == '\0' ) return; f_gold ( s1, s2, index + 1 ); } int main() { int n_success = 0; vector> param0 {{'v'},{'6','8','3','3','5','2','5','6','9','9','2','6','2','1','9','3','7'},{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'},{'e','G','a','r','F','U','W','k','u','z','y','v','A','W','m','G','H','O','I','a','u','V','f','B','q','e','E','e','L','c',' ','w','K',' ','K','j','j','s','q','u','n','i','T','a','Y'},{'0','0','0','0','1','1','1','2','2','2','2','2','2','3','3','3','3','4','4','4','4','5','5','6','6','6','7','7','7','7','7','7','8','8','9','9','9','9'},{'1','0','0','1','0','1','1','1','0','0','0','1','0','0','0','1','1','0','0','0','0','1','1'},{' ','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'},{'4'},{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'},{'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}}; vector> param1 {{'Z'},{'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'},{'0','0','0','0','0','0','0','0','0','0','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'},{'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'},{'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'},{'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'},{'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'},{'8'},{'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'},{'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}}; vector param2 {0,11,34,41,33,13,40,0,12,7}; vector> filled_function_param0 {{'v'},{'6','8','3','3','5','2','5','6','9','9','2','6','2','1','9','3','7'},{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'},{'e','G','a','r','F','U','W','k','u','z','y','v','A','W','m','G','H','O','I','a','u','V','f','B','q','e','E','e','L','c',' ','w','K',' ','K','j','j','s','q','u','n','i','T','a','Y'},{'0','0','0','0','1','1','1','2','2','2','2','2','2','3','3','3','3','4','4','4','4','5','5','6','6','6','7','7','7','7','7','7','8','8','9','9','9','9'},{'1','0','0','1','0','1','1','1','0','0','0','1','0','0','0','1','1','0','0','0','0','1','1'},{' ','B','D','D','D','E','E','E','G','H','J','K','K','K','L','N','O','S','V','W','Y','Z','b','c','d','d','f','f','f','f','f','f','i','k','k','o','t','u','v','x','x','z'},{'4'},{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1'},{'D','I','u','K','e','s','n','z','d','y','S','P','y','r'}}; vector> filled_function_param1 {{'Z'},{'8','6','0','2','8','0','8','7','0','5','4','5','9','4','5','4','4'},{'0','0','0','0','0','0','0','0','0','0','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'},{'S','m','d','a','W','N','F','H','B','E','h','M','z','H','c','X','l','a','R','e','D','D','q','V','U','w','o','K','u','n','b','k','Y','M','L','H','L','X','H','r','D','o','A','Y','H'},{'0','0','0','0','0','1','1','1','2','2','2','3','3','4','4','4','5','5','5','5','6','6','7','7','7','7','7','8','8','8','8','9','9','9','9','9','9','9'},{'1','1','0','0','0','1','0','1','1','0','0','0','1','0','1','0','1','1','0','1','1','0','1'},{'G','G','J','K','L','N','Q','R','R','S','U','W','X','Y','Y','a','b','b','b','c','d','e','e','f','f','h','j','j','k','k','l','m','m','n','o','s','t','t','w','z','z','z'},{'8'},{'0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'},{'N','h','M','N','n','F','Y','L','G','w','o','G','y','q'}}; vector filled_function_param2 {0,11,34,41,33,13,40,0,12,7}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),&filled_function_param1[i].front(),filled_function_param2[i]); f_gold(¶m0[i].front(),¶m1[i].front(),param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && equal(begin(param1[i]), end(param1[i]), begin(filled_function_param1[i])) && param2[i] == filled_function_param2[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (['v'],['Z'],0,), (['6', '8', '3', '3', '5', '2', '5', '6', '9', '9', '2', '6', '2', '1', '9', '3', '7'],['8', '6', '0', '2', '8', '0', '8', '7', '0', '5', '4', '5', '9', '4', '5', '4', '4'],11,), (['0', '0', '0', '0', '0', '0', '0', '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'],34,), (['e', 'G', 'a', 'r', 'F', 'U', 'W', 'k', 'u', 'z', 'y', 'v', 'A', 'W', 'm', 'G', 'H', 'O', 'I', 'a', 'u', 'V', 'f', 'B', 'q', 'e', 'E', 'e', 'L', 'c', ' ', 'w', 'K', ' ', 'K', 'j', 'j', 's', 'q', 'u', 'n', 'i', 'T', 'a', 'Y'],['S', 'm', 'd', 'a', 'W', 'N', 'F', 'H', 'B', 'E', 'h', 'M', 'z', 'H', 'c', 'X', 'l', 'a', 'R', 'e', 'D', 'D', 'q', 'V', 'U', 'w', 'o', 'K', 'u', 'n', 'b', 'k', 'Y', 'M', 'L', 'H', 'L', 'X', 'H', 'r', 'D', 'o', 'A', 'Y', 'H'],41,), (['0', '0', '0', '0', '1', '1', '1', '2', '2', '2', '2', '2', '2', '3', '3', '3', '3', '4', '4', '4', '4', '5', '5', '6', '6', '6', '7', '7', '7', '7', '7', '7', '8', '8', '9', '9', '9', '9'],['0', '0', '0', '0', '0', '1', '1', '1', '2', '2', '2', '3', '3', '4', '4', '4', '5', '5', '5', '5', '6', '6', '7', '7', '7', '7', '7', '8', '8', '8', '8', '9', '9', '9', '9', '9', '9', '9'],33,), (['1', '0', '0', '1', '0', '1', '1', '1', '0', '0', '0', '1', '0', '0', '0', '1', '1', '0', '0', '0', '0', '1', '1'],['1', '1', '0', '0', '0', '1', '0', '1', '1', '0', '0', '0', '1', '0', '1', '0', '1', '1', '0', '1', '1', '0', '1'],13,), ([' ', 'B', 'D', 'D', 'D', 'E', 'E', 'E', 'G', 'H', 'J', 'K', 'K', 'K', 'L', 'N', 'O', 'S', 'V', 'W', 'Y', 'Z', 'b', 'c', 'd', 'd', 'f', 'f', 'f', 'f', 'f', 'f', 'i', 'k', 'k', 'o', 't', 'u', 'v', 'x', 'x', 'z'],['G', 'G', 'J', 'K', 'L', 'N', 'Q', 'R', 'R', 'S', 'U', 'W', 'X', 'Y', 'Y', 'a', 'b', 'b', 'b', 'c', 'd', 'e', 'e', 'f', 'f', 'h', 'j', 'j', 'k', 'k', 'l', 'm', 'm', 'n', 'o', 's', 't', 't', 'w', 'z', 'z', 'z'],40,), (['4'],['8'],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', '1', '1', '1', '1', '1', '1', '1', '1', '1'],12,), (['D', 'I', 'u', 'K', 'e', 's', 'n', 'z', 'd', 'y', 'S', 'P', 'y', 'r'],['N', 'h', 'M', 'N', 'n', 'F', 'Y', 'L', 'G', 'w', 'o', 'G', 'y', 'q'],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FOR_FACTORIAL_OF_A_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FOR_FACTORIAL_OF_A_NUMBER{ static int f_gold ( int n ) { if ( n == 0 ) return 1 ; return n * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(79); param0.add(95); param0.add(84); param0.add(12); param0.add(72); param0.add(67); param0.add(82); param0.add(14); param0.add(2); param0.add(69); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ; "," using namespace std; unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {79,95,84,12,72,67,82,14,2,69}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (79,), (95,), (84,), (12,), (72,), (67,), (82,), (14,), (2,), (69,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBERS_THAT_DONT_CONTAIN_3," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBERS_THAT_DONT_CONTAIN_3{ static int f_gold ( int n ) { if ( n < 3 ) return n ; if ( n >= 3 && n < 10 ) return n - 1 ; int po = 1 ; while ( n / po > 9 ) po = po * 10 ; int msd = n / po ; if ( msd != 3 ) return f_gold ( msd ) * f_gold ( po - 1 ) + f_gold ( msd ) + f_gold ( n % po ) ; else return f_gold ( msd * po - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(85); param0.add(86); param0.add(3); param0.add(35); param0.add(59); param0.add(38); param0.add(33); param0.add(15); param0.add(75); param0.add(74); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if n < 3 : return n elif n >= 3 and n < 10 : return n - 1 po = 1 while n / po > 9 : po = po * 10 msd = n / po if msd != 3 : return f_gold ( msd ) * f_gold ( po - 1 ) + f_gold ( msd ) + f_gold ( n % po ) else : return f_gold ( msd * po - 1 ) "," using namespace std; int f_gold ( int n ) { if ( n < 3 ) return n; if ( n >= 3 && n < 10 ) return n - 1; int po = 1; while ( n / po > 9 ) po = po * 10; int msd = n / po; if ( msd != 3 ) return f_gold ( msd ) * f_gold ( po - 1 ) + f_gold ( msd ) + f_gold ( n % po ); else return f_gold ( msd * po - 1 ); } int main() { int n_success = 0; vector param0 {85,86,3,35,59,38,33,15,75,74}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (85,), (86,), (3,), (35,), (59,), (38,), (33,), (15,), (75,), (74,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_DISTINCT_SUBSET_SUBSEQUENCE_SUMS_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_DISTINCT_SUBSET_SUBSEQUENCE_SUMS_ARRAY{ static void f_gold ( int arr [ ] , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += arr [ i ] ; boolean [ ] [ ] dp = new boolean [ n + 1 ] [ sum + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) dp [ i ] [ 0 ] = true ; for ( int i = 1 ; i <= n ; i ++ ) { dp [ i ] [ arr [ i - 1 ] ] = true ; for ( int j = 1 ; j <= sum ; j ++ ) { if ( dp [ i - 1 ] [ j ] == true ) { dp [ i ] [ j ] = true ; dp [ i ] [ j + arr [ i - 1 ] ] = true ; } } } for ( int j = 0 ; j <= sum ; j ++ ) if ( dp [ n ] [ j ] == true ) System . out . print ( j + "" "" ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{39,74,36,22,28,82,86,13,47,49,86,85,42,47,56,43,43,19,6}); param0.add(new int[]{69,56,34,64,68,36,95,7,13,38,3,30,74,35,97,84,10,75,22,31,32,36,61,32,98,19}); param0.add(new int[]{79,87,58,4,3,47,95,27,89,52,75,6,84,42,68,48,64,21,65,26,53,45}); param0.add(new int[]{36,20,68,93,75,14,45,39,46,72,74,1,34}); param0.add(new int[]{96,31,82,84,17,89,69,47,79,13,83,45,10,77,9,72,83,39,84,44,36,62,77,61,28,22,46,24,98,37,15}); param0.add(new int[]{69,6,41,35,93,24,68,7,66,34,73,78,98,75,10,62,72,22,15,51,57,86,82,99,17,48,19,59,67,36,82,93,14,59,72,9,59,67,26,93}); param0.add(new int[]{4,59,33,66,41}); param0.add(new int[]{50,7,67,14,85,74,99,79,14,33,17,77,53,18,6,35,82,14,58,96,22}); param0.add(new int[]{14,36,36,46,69,11,55,41,49,49,31,19,8,26,63,30,27,83,80,35,53,47,38,58,51,31,95,77,47,41,49,14,20,76,64,34,24,90,78,25,26,64,3}); param0.add(new int[]{84,49,15,7,28,82,35,74,10,20,6,5,67,60,64,88,75,54,57,11,49,1,85,46,22,16,17,58,2,12,55,49,8,52,37,7,76,91,72,92,75,8,88,20,9}); List param1 = new ArrayList<>(); param1.add(10); param1.add(22); param1.add(19); param1.add(7); param1.add(28); param1.add(27); param1.add(3); param1.add(17); param1.add(26); param1.add(23); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{39,74,36,22,28,82,86,13,47,49,86,85,42,47,56,43,43,19,6}); filled_function_param0.add(new int[]{69,56,34,64,68,36,95,7,13,38,3,30,74,35,97,84,10,75,22,31,32,36,61,32,98,19}); filled_function_param0.add(new int[]{79,87,58,4,3,47,95,27,89,52,75,6,84,42,68,48,64,21,65,26,53,45}); filled_function_param0.add(new int[]{36,20,68,93,75,14,45,39,46,72,74,1,34}); filled_function_param0.add(new int[]{96,31,82,84,17,89,69,47,79,13,83,45,10,77,9,72,83,39,84,44,36,62,77,61,28,22,46,24,98,37,15}); filled_function_param0.add(new int[]{69,6,41,35,93,24,68,7,66,34,73,78,98,75,10,62,72,22,15,51,57,86,82,99,17,48,19,59,67,36,82,93,14,59,72,9,59,67,26,93}); filled_function_param0.add(new int[]{4,59,33,66,41}); filled_function_param0.add(new int[]{50,7,67,14,85,74,99,79,14,33,17,77,53,18,6,35,82,14,58,96,22}); filled_function_param0.add(new int[]{14,36,36,46,69,11,55,41,49,49,31,19,8,26,63,30,27,83,80,35,53,47,38,58,51,31,95,77,47,41,49,14,20,76,64,34,24,90,78,25,26,64,3}); filled_function_param0.add(new int[]{84,49,15,7,28,82,35,74,10,20,6,5,67,60,64,88,75,54,57,11,49,1,85,46,22,16,17,58,2,12,55,49,8,52,37,7,76,91,72,92,75,8,88,20,9}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(10); filled_function_param1.add(22); filled_function_param1.add(19); filled_function_param1.add(7); filled_function_param1.add(28); filled_function_param1.add(27); filled_function_param1.add(3); filled_function_param1.add(17); filled_function_param1.add(26); filled_function_param1.add(23); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1{ static int f_gold ( int arr1 [ ] , int arr2 [ ] , int n ) { int index = n ; int left = 0 , right = n - 1 ; while ( left <= right ) { int mid = ( left + right ) / 2 ; if ( arr2 [ mid ] == arr1 [ mid ] ) left = mid + 1 ; else { index = mid ; right = mid - 1 ; } } return index ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,18,19,25,26,27,31,39,44,46,59,60,66,72,78,83,84,92,94}); param0.add(new int[]{-14,-56,92,-90,96,-84,64,-38,-20,84,56,92,18,-78,98,-96,-60,88,-52,-28,30,-90,14,76,56,20,-18,-94,-82,-2,96,-60,-64,-90,42,6,20,-38,82,-86,-4,82,54,-88}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{13,64,73,50,73,19,92,10,64,79,58,41,97,53,53,10,96,45,47,38,99}); param0.add(new int[]{-96,-94,-90,-90,-78,-70,-64,-64,-58,-58,-52,-40,-36,-34,-34,-30,-26,-2,0,2,14,18,24,28,28,30,34,40,42,48,66,72,86,90,92,98}); param0.add(new int[]{1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,1,0}); param0.add(new int[]{10,51,74,74,75,80,90}); param0.add(new int[]{-44,48,20,-38,-48,-26,56,-62,-94,-18,30,66,-16,80,96,-40,-80,32,88,-56,-76,16,72,-94,4,-34,-92,70,-90,-54,64,-90}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{19,53,13,91,52,62,39,84,68,45,32,40,13,68,79,76,11,42,76,30,81,3,30,15,85,76,1}); List param1 = new ArrayList<>(); param1.add(new int[]{2,5,12,13,17,20,22,46,51,63,64,66,66,76,87,87,90,91,96}); param1.add(new int[]{54,44,-50,26,4,-26,-76,98,-14,36,82,0,-60,18,52,82,-12,-8,-26,-58,22,-70,24,48,56,-46,92,98,-50,-72,-66,8,40,12,-80,-86,90,-30,76,-92,80,-62,0,-48}); param1.add(new int[]{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}); param1.add(new int[]{24,42,54,13,88,63,50,73,64,66,86,84,53,4,44,58,44,42,36,94,34}); param1.add(new int[]{-94,-92,-90,-88,-86,-82,-82,-80,-76,-74,-64,-60,-58,-46,-44,-36,-30,-30,-30,-18,-16,-8,-6,12,14,20,26,38,40,42,42,68,78,82,88,98}); param1.add(new int[]{0,0,1,1,0,0,1,0,1,1,0,1,0,1,1,1,1,1,1,1,0}); param1.add(new int[]{12,20,36,38,61,64,93}); param1.add(new int[]{-76,92,-66,20,86,40,64,16,54,-6,54,-88,-24,38,86,2,30,70,98,-46,28,34,40,-88,-96,92,22,14,-36,-96,-48,-72}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{33,65,36,82,30,95,42,33,9,21,25,90,54,59,21,45,3,93,67,50,97,72,77,54,75,8,6}); List param2 = new ArrayList<>(); param2.add(11); param2.add(26); param2.add(31); param2.add(13); param2.add(29); param2.add(19); param2.add(5); param2.add(28); param2.add(14); param2.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , n ) : index = n left = 0 right = n - 1 while ( left <= right ) : mid = ( int ) ( ( left + right ) / 2 ) if ( arr2 [ mid ] == arr1 [ mid ] ) : left = mid + 1 else : index = mid right = mid - 1 return index "," using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int n ) { int index = n; int left = 0, right = n - 1; while ( left <= right ) { int mid = ( left + right ) / 2; if ( arr2 [ mid ] == arr1 [ mid ] ) left = mid + 1; else { index = mid; right = mid - 1; } } return index; } int main() { int n_success = 0; vector> param0 {{7,18,19,25,26,27,31,39,44,46,59,60,66,72,78,83,84,92,94},{-14,-56,92,-90,96,-84,64,-38,-20,84,56,92,18,-78,98,-96,-60,88,-52,-28,30,-90,14,76,56,20,-18,-94,-82,-2,96,-60,-64,-90,42,6,20,-38,82,-86,-4,82,54,-88},{0,0,0,0,0,0,0,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},{13,64,73,50,73,19,92,10,64,79,58,41,97,53,53,10,96,45,47,38,99},{-96,-94,-90,-90,-78,-70,-64,-64,-58,-58,-52,-40,-36,-34,-34,-30,-26,-2,0,2,14,18,24,28,28,30,34,40,42,48,66,72,86,90,92,98},{1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,1,0},{10,51,74,74,75,80,90},{-44,48,20,-38,-48,-26,56,-62,-94,-18,30,66,-16,80,96,-40,-80,32,88,-56,-76,16,72,-94,4,-34,-92,70,-90,-54,64,-90},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{19,53,13,91,52,62,39,84,68,45,32,40,13,68,79,76,11,42,76,30,81,3,30,15,85,76,1}}; vector> param1 {{2,5,12,13,17,20,22,46,51,63,64,66,66,76,87,87,90,91,96},{54,44,-50,26,4,-26,-76,98,-14,36,82,0,-60,18,52,82,-12,-8,-26,-58,22,-70,24,48,56,-46,92,98,-50,-72,-66,8,40,12,-80,-86,90,-30,76,-92,80,-62,0,-48},{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},{24,42,54,13,88,63,50,73,64,66,86,84,53,4,44,58,44,42,36,94,34},{-94,-92,-90,-88,-86,-82,-82,-80,-76,-74,-64,-60,-58,-46,-44,-36,-30,-30,-30,-18,-16,-8,-6,12,14,20,26,38,40,42,42,68,78,82,88,98},{0,0,1,1,0,0,1,0,1,1,0,1,0,1,1,1,1,1,1,1,0},{12,20,36,38,61,64,93},{-76,92,-66,20,86,40,64,16,54,-6,54,-88,-24,38,86,2,30,70,98,-46,28,34,40,-88,-96,92,22,14,-36,-96,-48,-72},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{33,65,36,82,30,95,42,33,9,21,25,90,54,59,21,45,3,93,67,50,97,72,77,54,75,8,6}}; vector param2 {11,26,31,13,29,19,5,28,14,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 18, 19, 25, 26, 27, 31, 39, 44, 46, 59, 60, 66, 72, 78, 83, 84, 92, 94],[2, 5, 12, 13, 17, 20, 22, 46, 51, 63, 64, 66, 66, 76, 87, 87, 90, 91, 96],11,), ([-14, -56, 92, -90, 96, -84, 64, -38, -20, 84, 56, 92, 18, -78, 98, -96, -60, 88, -52, -28, 30, -90, 14, 76, 56, 20, -18, -94, -82, -2, 96, -60, -64, -90, 42, 6, 20, -38, 82, -86, -4, 82, 54, -88],[54, 44, -50, 26, 4, -26, -76, 98, -14, 36, 82, 0, -60, 18, 52, 82, -12, -8, -26, -58, 22, -70, 24, 48, 56, -46, 92, 98, -50, -72, -66, 8, 40, 12, -80, -86, 90, -30, 76, -92, 80, -62, 0, -48],26,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([13, 64, 73, 50, 73, 19, 92, 10, 64, 79, 58, 41, 97, 53, 53, 10, 96, 45, 47, 38, 99],[24, 42, 54, 13, 88, 63, 50, 73, 64, 66, 86, 84, 53, 4, 44, 58, 44, 42, 36, 94, 34],13,), ([-96, -94, -90, -90, -78, -70, -64, -64, -58, -58, -52, -40, -36, -34, -34, -30, -26, -2, 0, 2, 14, 18, 24, 28, 28, 30, 34, 40, 42, 48, 66, 72, 86, 90, 92, 98],[-94, -92, -90, -88, -86, -82, -82, -80, -76, -74, -64, -60, -58, -46, -44, -36, -30, -30, -30, -18, -16, -8, -6, 12, 14, 20, 26, 38, 40, 42, 42, 68, 78, 82, 88, 98],29,), ([1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0],[0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0],19,), ([10, 51, 74, 74, 75, 80, 90],[12, 20, 36, 38, 61, 64, 93],5,), ([-44, 48, 20, -38, -48, -26, 56, -62, -94, -18, 30, 66, -16, 80, 96, -40, -80, 32, 88, -56, -76, 16, 72, -94, 4, -34, -92, 70, -90, -54, 64, -90],[-76, 92, -66, 20, 86, 40, 64, 16, 54, -6, 54, -88, -24, 38, 86, 2, 30, 70, 98, -46, 28, 34, 40, -88, -96, 92, 22, 14, -36, -96, -48, -72],28,), ([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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([19, 53, 13, 91, 52, 62, 39, 84, 68, 45, 32, 40, 13, 68, 79, 76, 11, 42, 76, 30, 81, 3, 30, 15, 85, 76, 1],[33, 65, 36, 82, 30, 95, 42, 33, 9, 21, 25, 90, 54, 59, 21, 45, 3, 93, 67, 50, 97, 72, 77, 54, 75, 8, 6],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS_1{ static boolean f_gold ( int arr [ ] , int n , int x ) { HashSet < Integer > hset = new HashSet < > ( ) ; if ( n < 2 ) return false ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == 0 ) { if ( x == 0 ) return true ; else continue ; } if ( x % arr [ i ] == 0 ) { if ( hset . contains ( x / arr [ i ] ) ) return true ; hset . add ( arr [ i ] ) ; } } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,3,7,23,23,25,27,37,42,53,56,58,61,69,78,79,84,85,86,90,93,95}); param0.add(new int[]{-10,-18,88,-36,78,66,-70,-34,-88,-98,-70,-4,-94,-92,-76,-78,-30,-48,-72,86,-64,38,-80,20,70,-32,-90,74,-78,12,-54,88,38,-96,28}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1}); param0.add(new int[]{83,61,55,89,16,78,44,54,22,49,58,62,53,99,35,83,29,19,96,39,60,6,34,67,43,29,46,3,81,78,80,39,86,78,21}); param0.add(new int[]{-96,-88,-80,-62,-58,-56,-54,-52,-34,-20,-6,-2,6,20,52,54,70,72,80,82,94}); param0.add(new int[]{0,1,1,0,0,1,1,1}); param0.add(new int[]{8,11,11,20,22,23,26,27,31,38,40,40,45,46,46,48,50,61,73,76,78,78,79,80,81,84,90,91,93,95}); param0.add(new int[]{18}); param0.add(new int[]{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}); param0.add(new int[]{19,37,47,40,72,59,51,53,92,3,21,81,29,48,97,59,10,74,11,37,49,95,88,85,6,26,76,33}); List param1 = new ArrayList<>(); param1.add(15); param1.add(17); param1.add(9); param1.add(23); param1.add(18); param1.add(4); param1.add(24); param1.add(0); param1.add(37); param1.add(22); List param2 = new ArrayList<>(); param2.add(17); param2.add(22); param2.add(5); param2.add(27); param2.add(12); param2.add(6); param2.add(28); param2.add(0); param2.add(39); param2.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(arr, n, x): if n < 2: return False s = set() for i in range(0, n): if arr[i] == 0: if x == 0: return True else: continue if x % arr[i] == 0: if x // arr[i] in s: return True s.add(arr[i]) return False "," using namespace std; bool f_gold ( int arr [ ], int n, int x ) { if ( n < 2 ) return false; unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == 0 ) { if ( x == 0 ) return true; else continue; } if ( x % arr [ i ] == 0 ) { if ( s . find ( x / arr [ i ] ) != s . end ( ) ) return true; s . insert ( arr [ i ] ); } } return false; } int main() { int n_success = 0; vector> param0 {{1,2,3,7,23,23,25,27,37,42,53,56,58,61,69,78,79,84,85,86,90,93,95},{-10,-18,88,-36,78,66,-70,-34,-88,-98,-70,-4,-94,-92,-76,-78,-30,-48,-72,86,-64,38,-80,20,70,-32,-90,74,-78,12,-54,88,38,-96,28},{0,0,0,0,0,0,0,0,1,1},{83,61,55,89,16,78,44,54,22,49,58,62,53,99,35,83,29,19,96,39,60,6,34,67,43,29,46,3,81,78,80,39,86,78,21},{-96,-88,-80,-62,-58,-56,-54,-52,-34,-20,-6,-2,6,20,52,54,70,72,80,82,94},{0,1,1,0,0,1,1,1},{8,11,11,20,22,23,26,27,31,38,40,40,45,46,46,48,50,61,73,76,78,78,79,80,81,84,90,91,93,95},{18},{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},{19,37,47,40,72,59,51,53,92,3,21,81,29,48,97,59,10,74,11,37,49,95,88,85,6,26,76,33}}; vector param1 {15,17,9,23,18,4,24,0,37,22}; vector param2 {17,22,5,27,12,6,28,0,39,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 2, 3, 7, 23, 23, 25, 27, 37, 42, 53, 56, 58, 61, 69, 78, 79, 84, 85, 86, 90, 93, 95], 15, 17,), ([-10, -18, 88, -36, 78, 66, -70, -34, -88, -98, -70, -4, -94, -92, -76, -78, -30, - 48, -72, 86, -64, 38, -80, 20, 70, -32, -90, 74, -78, 12, -54, 88, 38, -96, 28], 17, 22,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1], 9, 5,), ([83, 61, 55, 89, 16, 78, 44, 54, 22, 49, 58, 62, 53, 99, 35, 83, 29, 19, 96, 39, 60, 6, 34, 67, 43, 29, 46, 3, 81, 78, 80, 39, 86, 78, 21], 23, 27,), ([-96, -88, -80, -62, -58, -56, -54, -52, -34, -20, - 6, -2, 6, 20, 52, 54, 70, 72, 80, 82, 94], 18, 12,), ([0, 1, 1, 0, 0, 1, 1, 1], 4, 6,), ([8, 11, 11, 20, 22, 23, 26, 27, 31, 38, 40, 40, 45, 46, 46, 48, 50, 61, 73, 76, 78, 78, 79, 80, 81, 84, 90, 91, 93, 95], 24, 28,), ([18], 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], 37, 39,), ([19, 37, 47, 40, 72, 59, 51, 53, 92, 3, 21, 81, 29, 48, 97, 59, 10, 74, 11, 37, 49, 95, 88, 85, 6, 26, 76, 33], 22, 21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_MINIMUM_DIFFERENCE_PAIR_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MINIMUM_DIFFERENCE_PAIR_1{ static int f_gold ( int [ ] arr , int n ) { Arrays . sort ( arr ) ; int diff = Integer . MAX_VALUE ; for ( int i = 0 ; i < n - 1 ; i ++ ) if ( arr [ i + 1 ] - arr [ i ] < diff ) diff = arr [ i + 1 ] - arr [ i ] ; return diff ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,25,44,46,54,60,81}); param0.add(new int[]{82,68,-98,-66,-36,-42,98,-38,58,-6,-28,70,-24,18,16,10,92,44,28,-96,-72,24,28,-80,-4,38,88,76}); param0.add(new int[]{1,1,1}); param0.add(new int[]{87,25,80,45,44,20,48,47,51,54,68,47,89,95,15,29,5,45,2,64,53,96,94,22,23,43,61,75,74,50}); param0.add(new int[]{-74,-48,-42,-26,-16,-12,0,4,8,18,46,46,62,70,74,88,92,96,98}); param0.add(new int[]{0,1,1,1,0,1,1,0,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0}); param0.add(new int[]{27,42,59,80}); param0.add(new int[]{-96,-94,10,-36,18,-40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{96}); List param1 = new ArrayList<>(); param1.add(3); param1.add(22); param1.add(2); param1.add(15); param1.add(18); param1.add(36); param1.add(2); param1.add(4); param1.add(12); param1.add(0); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr = sorted ( arr ) diff = 10 ** 20 for i in range ( n - 1 ) : if arr [ i + 1 ] - arr [ i ] < diff : diff = arr [ i + 1 ] - arr [ i ] return diff "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int diff = INT_MAX; for ( int i = 0; i < n - 1; i ++ ) if ( arr [ i + 1 ] - arr [ i ] < diff ) diff = arr [ i + 1 ] - arr [ i ]; return diff; } int main() { int n_success = 0; vector> param0 {{3,25,44,46,54,60,81},{82,68,-98,-66,-36,-42,98,-38,58,-6,-28,70,-24,18,16,10,92,44,28,-96,-72,24,28,-80,-4,38,88,76},{1,1,1},{87,25,80,45,44,20,48,47,51,54,68,47,89,95,15,29,5,45,2,64,53,96,94,22,23,43,61,75,74,50},{-74,-48,-42,-26,-16,-12,0,4,8,18,46,46,62,70,74,88,92,96,98},{0,1,1,1,0,1,1,0,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0},{27,42,59,80},{-96,-94,10,-36,18,-40},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{96}}; vector param1 {3,22,2,15,18,36,2,4,12,0}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 25, 44, 46, 54, 60, 81],3,), ([82, 68, -98, -66, -36, -42, 98, -38, 58, -6, -28, 70, -24, 18, 16, 10, 92, 44, 28, -96, -72, 24, 28, -80, -4, 38, 88, 76],22,), ([1, 1, 1],2,), ([87, 25, 80, 45, 44, 20, 48, 47, 51, 54, 68, 47, 89, 95, 15, 29, 5, 45, 2, 64, 53, 96, 94, 22, 23, 43, 61, 75, 74, 50],15,), ([-74, -48, -42, -26, -16, -12, 0, 4, 8, 18, 46, 46, 62, 70, 74, 88, 92, 96, 98],18,), ([0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0],36,), ([27, 42, 59, 80],2,), ([-96, -94, 10, -36, 18, -40],4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,), ([96],0,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY{ static int f_gold ( int [ ] arr , int n ) { if ( n < 3 ) return - 1 ; int max_product = Integer . MIN_VALUE ; for ( int i = 0 ; i < n - 2 ; i ++ ) for ( int j = i + 1 ; j < n - 1 ; j ++ ) for ( int k = j + 1 ; k < n ; k ++ ) max_product = Math . max ( max_product , arr [ i ] * arr [ j ] * arr [ k ] ) ; return max_product ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{41,66,77}); param0.add(new int[]{92,-34,-36,-50,20,-94,2,-86,22,-50,74,84,52,-84,98,-50,88,26,-36,-36,6,-50,-48,-84,38,-96,-62,34,52,92,40,-84,18,-90,54,-38,-74,-98,-8,-92,-60,86,-36,94,56}); param0.add(new int[]{0,0,1}); param0.add(new int[]{2,77,99,95,78,15,69,39,34,43,66,45,97,27,67,62,64,2,28,94,41,87,97,52,14,61,78,50}); param0.add(new int[]{-62,-28,40,76}); param0.add(new int[]{0,1,1,0,1,1,1,1,1}); param0.add(new int[]{2,6,10,11,12,12,17,18,18,19,20,22,24,25,30,35,36,37,40,41,42,47,60,60,64,69,69,70,73,79,80,83,97,97,97}); param0.add(new int[]{-72,98,68,18,92,-84,50,32,-90,-40,50,60,-50,-50,50,24,30,94,-98,-6,46,-46,-24,-62,-20,62,-76}); param0.add(new int[]{0,0,0,0,0,1,1,1}); param0.add(new int[]{85,36,7,69,9,45,18,47,1,78,72,53,37,20,95,71,58,41}); List param1 = new ArrayList<>(); param1.add(2); param1.add(40); param1.add(1); param1.add(26); param1.add(3); param1.add(5); param1.add(25); param1.add(14); param1.add(7); param1.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n ) : if n < 3 : return - 1 max_product = - ( sys.maxsize - 1 ) for i in range ( 0 , n - 2 ) : for j in range ( i + 1 , n - 1 ) : for k in range ( j + 1 , n ) : max_product = max ( max_product , arr [ i ] * arr [ j ] * arr [ k ] ) return max_product "," using namespace std; int f_gold ( int arr [ ], int n ) { if ( n < 3 ) return - 1; int max_product = INT_MIN; for ( int i = 0; i < n - 2; i ++ ) for ( int j = i + 1; j < n - 1; j ++ ) for ( int k = j + 1; k < n; k ++ ) max_product = max ( max_product, arr [ i ] * arr [ j ] * arr [ k ] ); return max_product; } int main() { int n_success = 0; vector> param0 {{41,66,77},{92,-34,-36,-50,20,-94,2,-86,22,-50,74,84,52,-84,98,-50,88,26,-36,-36,6,-50,-48,-84,38,-96,-62,34,52,92,40,-84,18,-90,54,-38,-74,-98,-8,-92,-60,86,-36,94,56},{0,0,1},{2,77,99,95,78,15,69,39,34,43,66,45,97,27,67,62,64,2,28,94,41,87,97,52,14,61,78,50},{-62,-28,40,76},{0,1,1,0,1,1,1,1,1},{2,6,10,11,12,12,17,18,18,19,20,22,24,25,30,35,36,37,40,41,42,47,60,60,64,69,69,70,73,79,80,83,97,97,97},{-72,98,68,18,92,-84,50,32,-90,-40,50,60,-50,-50,50,24,30,94,-98,-6,46,-46,-24,-62,-20,62,-76},{0,0,0,0,0,1,1,1},{85,36,7,69,9,45,18,47,1,78,72,53,37,20,95,71,58,41}}; vector param1 {2,40,1,26,3,5,25,14,7,14}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([41, 66, 77],2,), ([92, -34, -36, -50, 20, -94, 2, -86, 22, -50, 74, 84, 52, -84, 98, -50, 88, 26, -36, -36, 6, -50, -48, -84, 38, -96, -62, 34, 52, 92, 40, -84, 18, -90, 54, -38, -74, -98, -8, -92, -60, 86, -36, 94, 56],40,), ([0, 0, 1],1,), ([2, 77, 99, 95, 78, 15, 69, 39, 34, 43, 66, 45, 97, 27, 67, 62, 64, 2, 28, 94, 41, 87, 97, 52, 14, 61, 78, 50],26,), ([-62, -28, 40, 76],3,), ([0, 1, 1, 0, 1, 1, 1, 1, 1],5,), ([2, 6, 10, 11, 12, 12, 17, 18, 18, 19, 20, 22, 24, 25, 30, 35, 36, 37, 40, 41, 42, 47, 60, 60, 64, 69, 69, 70, 73, 79, 80, 83, 97, 97, 97],25,), ([-72, 98, 68, 18, 92, -84, 50, 32, -90, -40, 50, 60, -50, -50, 50, 24, 30, 94, -98, -6, 46, -46, -24, -62, -20, 62, -76],14,), ([0, 0, 0, 0, 0, 1, 1, 1],7,), ([85, 36, 7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41],14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SET_BITS_IN_AN_INTEGER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SET_BITS_IN_AN_INTEGER_1{ public static int f_gold ( int n ) { if ( n == 0 ) return 0 ; else return ( n & 1 ) + f_gold ( n >> 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(43); param0.add(94); param0.add(72); param0.add(86); param0.add(42); param0.add(33); param0.add(8); param0.add(74); param0.add(29); param0.add(34); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 ) : return 0 else : return ( n & 1 ) + f_gold ( n >> 1 ) "," using namespace std; int f_gold ( int n ) { if ( n == 0 ) return 0; else return ( n & 1 ) + f_gold ( n >> 1 ); } int main() { int n_success = 0; vector param0 {43,94,72,86,42,33,8,74,29,34}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (43,), (94,), (72,), (86,), (42,), (33,), (8,), (74,), (29,), (34,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUM_OF_DIGITS_IN_NUMBERS_FROM_1_TO_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUM_OF_DIGITS_IN_NUMBERS_FROM_1_TO_N{ static int f_gold ( int n ) { if ( n < 10 ) return ( n * ( n + 1 ) / 2 ) ; int d = ( int ) ( Math . log10 ( n ) ) ; int a [ ] = new int [ d + 1 ] ; a [ 0 ] = 0 ; a [ 1 ] = 45 ; for ( int i = 2 ; i <= d ; i ++ ) a [ i ] = a [ i - 1 ] * 10 + 45 * ( int ) ( Math . ceil ( Math . pow ( 10 , i - 1 ) ) ) ; int p = ( int ) ( Math . ceil ( Math . pow ( 10 , d ) ) ) ; int msd = n / p ; return ( msd * a [ d ] + ( msd * ( msd - 1 ) / 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(29); param0.add(97); param0.add(71); param0.add(82); param0.add(69); param0.add(30); param0.add(82); param0.add(32); param0.add(77); param0.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : if ( n < 10 ) : return ( n * ( n + 1 ) / 2 ) d = ( int ) ( math.log10 ( n ) ) a = [ 0 ] * ( d + 1 ) a [ 0 ] = 0 a [ 1 ] = 45 for i in range ( 2 , d + 1 ) : a [ i ] = a [ i - 1 ] * 10 + 45 * ( int ) ( math.ceil ( math.pow ( 10 , i - 1 ) ) ) p = ( int ) ( math.ceil ( math.pow ( 10 , d ) ) ) msd = n // p return ( int ) ( msd * a [ d ] + ( msd * ( msd - 1 ) // 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p ) ) "," using namespace std; int f_gold ( int n ) { if ( n < 10 ) return n * ( n + 1 ) / 2; int d = log10 ( n ); int * a = new int [ d + 1 ]; a [ 0 ] = 0, a [ 1 ] = 45; for ( int i = 2; i <= d; i ++ ) a [ i ] = a [ i - 1 ] * 10 + 45 * ceil ( pow ( 10, i - 1 ) ); int p = ceil ( pow ( 10, d ) ); int msd = n / p; return msd * a [ d ] + ( msd * ( msd - 1 ) / 2 ) * p + msd * ( 1 + n % p ) + f_gold ( n % p ); } int main() { int n_success = 0; vector param0 {29,97,71,82,69,30,82,32,77,39}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (29,), (97,), (71,), (82,), (69,), (30,), (82,), (32,), (77,), (39,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_FIRST_NATURAL_NUMBER_WHOSE_FACTORIAL_DIVISIBLE_X," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_FIRST_NATURAL_NUMBER_WHOSE_FACTORIAL_DIVISIBLE_X{ static int f_gold ( int x ) { int i = 1 ; int fact = 1 ; for ( i = 1 ; i < x ; i ++ ) { fact = fact * i ; if ( fact % x == 0 ) break ; } return i ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(47); param0.add(57); param0.add(89); param0.add(67); param0.add(40); param0.add(16); param0.add(83); param0.add(93); param0.add(43); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : i = 1 ; fact = 1 ; for i in range ( 1 , x ) : fact = fact * i if ( fact % x == 0 ) : break return i "," using namespace std; int f_gold ( int x ) { int i = 1; int fact = 1; for ( i = 1; i < x; i ++ ) { fact = fact * i; if ( fact % x == 0 ) break; } return i; } int main() { int n_success = 0; vector param0 {67,47,57,89,67,40,16,83,93,43}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (47,), (57,), (89,), (67,), (40,), (16,), (83,), (93,), (43,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE{ static int f_gold ( int arr [ ] , int n ) { int sum [ ] = new int [ n ] ; if ( n >= 1 ) sum [ 0 ] = arr [ 0 ] ; if ( n >= 2 ) sum [ 1 ] = arr [ 0 ] + arr [ 1 ] ; if ( n > 2 ) sum [ 2 ] = Math . max ( sum [ 1 ] , Math . max ( arr [ 1 ] + arr [ 2 ] , arr [ 0 ] + arr [ 2 ] ) ) ; for ( int i = 3 ; i < n ; i ++ ) sum [ i ] = Math . max ( Math . max ( sum [ i - 1 ] , sum [ i - 2 ] + arr [ i ] ) , arr [ i ] + arr [ i - 1 ] + sum [ i - 3 ] ) ; return sum [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,6,8,9,10,10,16,17,17,20,21,22,23,28,29,32,36,37,40,41,42,43,47,47,48,48,49,49,52,52,53,59,61,64,65,79,79,81,87,91,92,98}); param0.add(new int[]{98,76,-80,-30,82,52,-14,28,98,18,82,52,26,-62,-8}); param0.add(new int[]{0,0,0,0,0,1,1,1,1}); param0.add(new int[]{21,26,85,73,47,10,54,9,11,70,42,95,44,91}); param0.add(new int[]{-94,-92,-90,-84,-76,-68,-60,-50,-34,-34,-20,-16,-6,18,50,54,66,70,96}); param0.add(new int[]{1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1}); param0.add(new int[]{2,3,4,4,14,14,18,21,24,26,29,31,32,34,36,37,38,40,42,44,44,54,63,69,77,77,82,82,86,87,90,93,95}); param0.add(new int[]{-46,64,-44,88,-74,54,40,-2,-24,94,40,-44,56,-54,-60,-86,-58,48,-90,12,-76,-30,94,-34,14,12,80,-40,60}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{4,32,63,23,44,57,59,69,88,61,66,61,65,33,79,58,71,2,80,41,83,12,20,9,7,40,36,97,10,98,66,78,71,37,53}); List param1 = new ArrayList<>(); param1.add(35); param1.add(7); param1.add(7); param1.add(12); param1.add(9); param1.add(16); param1.add(31); param1.add(22); param1.add(7); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : sum = [ 0 for k in range ( n ) ] if n >= 1 : sum [ 0 ] = arr [ 0 ] if n >= 2 : sum [ 1 ] = arr [ 0 ] + arr [ 1 ] if n > 2 : sum [ 2 ] = max ( sum [ 1 ] , max ( arr [ 1 ] + arr [ 2 ] , arr [ 0 ] + arr [ 2 ] ) ) for i in range ( 3 , n ) : sum [ i ] = max ( max ( sum [ i - 1 ] , sum [ i - 2 ] + arr [ i ] ) , arr [ i ] + arr [ i - 1 ] + sum [ i - 3 ] ) return sum [ n - 1 ] "," using namespace std; int f_gold ( int arr [ ], int n ) { int sum [ n ]; if ( n >= 1 ) sum [ 0 ] = arr [ 0 ]; if ( n >= 2 ) sum [ 1 ] = arr [ 0 ] + arr [ 1 ]; if ( n > 2 ) sum [ 2 ] = max ( sum [ 1 ], max ( arr [ 1 ] + arr [ 2 ], arr [ 0 ] + arr [ 2 ] ) ); for ( int i = 3; i < n; i ++ ) sum [ i ] = max ( max ( sum [ i - 1 ], sum [ i - 2 ] + arr [ i ] ), arr [ i ] + arr [ i - 1 ] + sum [ i - 3 ] ); return sum [ n - 1 ]; } int main() { int n_success = 0; vector> param0 {{5,6,8,9,10,10,16,17,17,20,21,22,23,28,29,32,36,37,40,41,42,43,47,47,48,48,49,49,52,52,53,59,61,64,65,79,79,81,87,91,92,98},{98,76,-80,-30,82,52,-14,28,98,18,82,52,26,-62,-8},{0,0,0,0,0,1,1,1,1},{21,26,85,73,47,10,54,9,11,70,42,95,44,91},{-94,-92,-90,-84,-76,-68,-60,-50,-34,-34,-20,-16,-6,18,50,54,66,70,96},{1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1},{2,3,4,4,14,14,18,21,24,26,29,31,32,34,36,37,38,40,42,44,44,54,63,69,77,77,82,82,86,87,90,93,95},{-46,64,-44,88,-74,54,40,-2,-24,94,40,-44,56,-54,-60,-86,-58,48,-90,12,-76,-30,94,-34,14,12,80,-40,60},{0,0,0,0,0,0,0,0,0,1,1,1,1,1},{4,32,63,23,44,57,59,69,88,61,66,61,65,33,79,58,71,2,80,41,83,12,20,9,7,40,36,97,10,98,66,78,71,37,53}}; vector param1 {35,7,7,12,9,16,31,22,7,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 6, 8, 9, 10, 10, 16, 17, 17, 20, 21, 22, 23, 28, 29, 32, 36, 37, 40, 41, 42, 43, 47, 47, 48, 48, 49, 49, 52, 52, 53, 59, 61, 64, 65, 79, 79, 81, 87, 91, 92, 98],35,), ([98, 76, -80, -30, 82, 52, -14, 28, 98, 18, 82, 52, 26, -62, -8],7,), ([0, 0, 0, 0, 0, 1, 1, 1, 1],7,), ([21, 26, 85, 73, 47, 10, 54, 9, 11, 70, 42, 95, 44, 91],12,), ([-94, -92, -90, -84, -76, -68, -60, -50, -34, -34, -20, -16, -6, 18, 50, 54, 66, 70, 96],9,), ([1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1],16,), ([2, 3, 4, 4, 14, 14, 18, 21, 24, 26, 29, 31, 32, 34, 36, 37, 38, 40, 42, 44, 44, 54, 63, 69, 77, 77, 82, 82, 86, 87, 90, 93, 95],31,), ([-46, 64, -44, 88, -74, 54, 40, -2, -24, 94, 40, -44, 56, -54, -60, -86, -58, 48, -90, 12, -76, -30, 94, -34, 14, 12, 80, -40, 60],22,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],7,), ([4, 32, 63, 23, 44, 57, 59, 69, 88, 61, 66, 61, 65, 33, 79, 58, 71, 2, 80, 41, 83, 12, 20, 9, 7, 40, 36, 97, 10, 98, 66, 78, 71, 37, 53],26,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", K_TH_PRIME_FACTOR_GIVEN_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_PRIME_FACTOR_GIVEN_NUMBER{ static int f_gold ( int n , int k ) { while ( n % 2 == 0 ) { k -- ; n = n / 2 ; if ( k == 0 ) return 2 ; } for ( int i = 3 ; i <= Math . sqrt ( n ) ; i = i + 2 ) { while ( n % i == 0 ) { if ( k == 1 ) return i ; k -- ; n = n / i ; } } if ( n > 2 && k == 1 ) return n ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(94); param0.add(99); param0.add(64); param0.add(27); param0.add(24); param0.add(84); param0.add(69); param0.add(69); param0.add(22); param0.add(39); List param1 = new ArrayList<>(); param1.add(0); param1.add(1); param1.add(3); param1.add(3); param1.add(4); param1.add(6); param1.add(98); param1.add(39); param1.add(60); param1.add(57); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","import math def f_gold ( n , k ) : while ( n % 2 == 0 ) : k = k - 1 n = n / 2 if ( k == 0 ) : return 2 i = 3 while i <= math.sqrt ( n ) : while ( n % i == 0 ) : if ( k == 1 ) : return i k = k - 1 n = n / i i = i + 2 if ( n > 2 and k == 1 ) : return n return - 1 "," using namespace std; int f_gold ( int n, int k ) { while ( n % 2 == 0 ) { k --; n = n / 2; if ( k == 0 ) return 2; } for ( int i = 3; i <= sqrt ( n ); i = i + 2 ) { while ( n % i == 0 ) { if ( k == 1 ) return i; k --; n = n / i; } } if ( n > 2 && k == 1 ) return n; return - 1; } int main() { int n_success = 0; vector param0 {94,99,64,27,24,84,69,69,22,39}; vector param1 {0,1,3,3,4,6,98,39,60,57}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ (94,0), (99,1), (64,3), (27,3), (24,4), (84,6), (69,98), (69,39), (22,60), (39,57) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE_1{ static int f_gold ( int arr [ ] , int N , int k ) { int maxSum = 0 ; Arrays . sort ( arr ) ; for ( int i = N - 1 ; i > 0 ; -- i ) { if ( arr [ i ] - arr [ i - 1 ] < k ) { maxSum += arr [ i ] ; maxSum += arr [ i - 1 ] ; -- i ; } } return maxSum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,10,11,11,12,14,15,17,27,27,28,36,36,44,47,47,54,55,62,64,68,69,70,70,75,76,78,85,85,91,95,97}); param0.add(new int[]{-36,78,10,30,-12,-70,-98,-14,-44,-66,-40,-8,78,2,-70,40,92,58,30,10,-84,-62,-86,-50,82,36,-92,-30,-2,-34,88,2,-4,-72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{77,78,58}); param0.add(new int[]{-88,-88,-88,-82,-58,-54,-48,-46,-46,-44,-20,-2,10,28,28,28,42,42,44,50,50,54,56,58,62,68,70,72,74,76,78,88,90,92}); param0.add(new int[]{0,1,0,0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1}); param0.add(new int[]{5,7,10,11,15,17,20,20,29,29,32,37,38,39,40,41,45,51,60,64,64,68,68,70,71,71,71,75,76,82,84,87,88,88,95,98}); param0.add(new int[]{-46,-32,76,-28,44,-14,94,-4,60,-88,-52,32,-66,28,94,76,86,-4,74,52,64,-36,-98,-40,70,18,-22,-20,-16,-74,12,60,94,98,-28,-24,4,-34,-60,56}); param0.add(new int[]{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}); param0.add(new int[]{79,13,25,22,61,1,2,73,66,94,47,9,1,99,25,39,95,46,95,20,63,15,14,36,9,91,14}); List param1 = new ArrayList<>(); param1.add(26); param1.add(26); param1.add(47); param1.add(1); param1.add(21); param1.add(41); param1.add(30); param1.add(33); param1.add(28); param1.add(19); List param2 = new ArrayList<>(); param2.add(18); param2.add(25); param2.add(26); param2.add(1); param2.add(24); param2.add(40); param2.add(21); param2.add(23); param2.add(41); param2.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , N , k ) : maxSum = 0 ; arr.sort ( ) ; i = N - 1 ; while ( i >= 0 ) : if ( arr [ i ] - arr [ i - 1 ] < k ) : maxSum += arr [ i ] ; maxSum += arr [ i - 1 ] ; i -= 1 ; i -= 1 ; return maxSum ; "," using namespace std; int f_gold ( int arr [ ], int N, int k ) { int maxSum = 0; sort ( arr, arr + N ); for ( int i = N - 1; i > 0; -- i ) { if ( arr [ i ] - arr [ i - 1 ] < k ) { maxSum += arr [ i ]; maxSum += arr [ i - 1 ]; -- i; } } return maxSum; } int main() { int n_success = 0; vector> param0 {{2,10,11,11,12,14,15,17,27,27,28,36,36,44,47,47,54,55,62,64,68,69,70,70,75,76,78,85,85,91,95,97},{-36,78,10,30,-12,-70,-98,-14,-44,-66,-40,-8,78,2,-70,40,92,58,30,10,-84,-62,-86,-50,82,36,-92,-30,-2,-34,88,2,-4,-72},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{77,78,58},{-88,-88,-88,-82,-58,-54,-48,-46,-46,-44,-20,-2,10,28,28,28,42,42,44,50,50,54,56,58,62,68,70,72,74,76,78,88,90,92},{0,1,0,0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1},{5,7,10,11,15,17,20,20,29,29,32,37,38,39,40,41,45,51,60,64,64,68,68,70,71,71,71,75,76,82,84,87,88,88,95,98},{-46,-32,76,-28,44,-14,94,-4,60,-88,-52,32,-66,28,94,76,86,-4,74,52,64,-36,-98,-40,70,18,-22,-20,-16,-74,12,60,94,98,-28,-24,4,-34,-60,56},{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},{79,13,25,22,61,1,2,73,66,94,47,9,1,99,25,39,95,46,95,20,63,15,14,36,9,91,14}}; vector param1 {26,26,47,1,21,41,30,33,28,19}; vector param2 {18,25,26,1,24,40,21,23,41,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 10, 11, 11, 12, 14, 15, 17, 27, 27, 28, 36, 36, 44, 47, 47, 54, 55, 62, 64, 68, 69, 70, 70, 75, 76, 78, 85, 85, 91, 95, 97],26,18,), ([-36, 78, 10, 30, -12, -70, -98, -14, -44, -66, -40, -8, 78, 2, -70, 40, 92, 58, 30, 10, -84, -62, -86, -50, 82, 36, -92, -30, -2, -34, 88, 2, -4, -72],26,25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],47,26,), ([77, 78, 58],1,1,), ([-88, -88, -88, -82, -58, -54, -48, -46, -46, -44, -20, -2, 10, 28, 28, 28, 42, 42, 44, 50, 50, 54, 56, 58, 62, 68, 70, 72, 74, 76, 78, 88, 90, 92],21,24,), ([0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1],41,40,), ([5, 7, 10, 11, 15, 17, 20, 20, 29, 29, 32, 37, 38, 39, 40, 41, 45, 51, 60, 64, 64, 68, 68, 70, 71, 71, 71, 75, 76, 82, 84, 87, 88, 88, 95, 98],30,21,), ([-46, -32, 76, -28, 44, -14, 94, -4, 60, -88, -52, 32, -66, 28, 94, 76, 86, -4, 74, 52, 64, -36, -98, -40, 70, 18, -22, -20, -16, -74, 12, 60, 94, 98, -28, -24, 4, -34, -60, 56],33,23,), ([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],28,41,), ([79, 13, 25, 22, 61, 1, 2, 73, 66, 94, 47, 9, 1, 99, 25, 39, 95, 46, 95, 20, 63, 15, 14, 36, 9, 91, 14],19,23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING{ static int f_gold ( String str ) { int N = str . length ( ) ; int [ ] [ ] cps = new int [ N + 1 ] [ N + 1 ] ; for ( int i = 0 ; i < N ; i ++ ) cps [ i ] [ i ] = 1 ; for ( int L = 2 ; L <= N ; L ++ ) { for ( int i = 0 ; i < N ; i ++ ) { int k = L + i - 1 ; if ( k < N ) { if ( str . charAt ( i ) == str . charAt ( k ) ) cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] + 1 ; else cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ] ; } } } return cps [ 0 ] [ N - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""R""); param0.add(""2956350""); param0.add(""11100111110101""); param0.add(""TZTDLIIfAD""); param0.add(""98""); param0.add(""1100100001""); param0.add(""oKwGeatf""); param0.add(""19""); param0.add(""00010110100""); param0.add(""Cyq""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : N = len ( str ) cps = [ [ 0 for i in range ( N + 2 ) ] for j in range ( N + 2 ) ] for i in range ( N ) : cps [ i ] [ i ] = 1 for L in range ( 2 , N + 1 ) : for i in range ( N ) : k = L + i - 1 if ( k < N ) : if ( str [ i ] == str [ k ] ) : cps [ i ] [ k ] = ( cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] + 1 ) else : cps [ i ] [ k ] = ( cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ] ) return cps [ 0 ] [ N - 1 ] "," using namespace std; int f_gold ( string str ) { int N = str . length ( ); int cps [ N + 1 ] [ N + 1 ]; memset ( cps, 0, sizeof ( cps ) ); for ( int i = 0; i < N; i ++ ) cps [ i ] [ i ] = 1; for ( int L = 2; L <= N; L ++ ) { for ( int i = 0; i < N; i ++ ) { int k = L + i - 1; if ( str [ i ] == str [ k ] ) cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] + 1; else cps [ i ] [ k ] = cps [ i ] [ k - 1 ] + cps [ i + 1 ] [ k ] - cps [ i + 1 ] [ k - 1 ]; } } return cps [ 0 ] [ N - 1 ]; } int main() { int n_success = 0; vector param0 {""R"",""2956350"",""11100111110101"",""TZTDLIIfAD"",""98"",""1100100001"",""oKwGeatf"",""19"",""00010110100"",""Cyq""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('R',), ('2956350',), ('11100111110101',), ('TZTDLIIfAD',), ('98',), ('1100100001',), ('oKwGeatf',), ('19',), ('00010110100',), ('Cyq',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2{ static int f_gold ( int n ) { n -- ; int sum = 0 ; sum += ( n * ( n + 1 ) ) / 2 ; sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6 ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(12); param0.add(89); param0.add(76); param0.add(2); param0.add(81); param0.add(11); param0.add(26); param0.add(35); param0.add(16); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : n -= 1 sum = 0 sum += ( n * ( n + 1 ) ) / 2 sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6 return int ( sum ) "," using namespace std; int f_gold ( int n ) { n --; int sum = 0; sum += ( n * ( n + 1 ) ) / 2; sum += ( n * ( n + 1 ) * ( 2 * n + 1 ) ) / 6; return sum; } int main() { int n_success = 0; vector param0 {12,89,76,2,81,11,26,35,16,66}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (12,), (89,), (76,), (2,), (81,), (11,), (26,), (35,), (16,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LARGE_NUMBER_DIVISIBLE_3_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_3_NOT{ static boolean f_gold ( String str ) { int n = str . length ( ) ; int digitSum = 0 ; for ( int i = 0 ; i < n ; i ++ ) digitSum += ( str . charAt ( i ) - '0' ) ; return ( digitSum % 3 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""Xy""); param0.add(""4827182""); param0.add(""110011""); param0.add(""GdOXZk""); param0.add(""8970294""); param0.add(""000110""); param0.add(""xMRGdAgsGlH""); param0.add(""34643260819239""); param0.add(""00""); param0.add(""DcCK""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string str ) { int n = str . length ( ); int digitSum = 0; for ( int i = 0; i < n; i ++ ) digitSum += ( str [ i ] - '0' ); return ( digitSum % 3 == 0 ); } int main() { int n_success = 0; vector param0 {""Xy"",""4827182"",""110011"",""GdOXZk"",""8970294"",""000110"",""xMRGdAgsGlH"",""34643260819239"",""00"",""DcCK""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SORT_ARRAY_TWO_HALVES_SORTED," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class SORT_ARRAY_TWO_HALVES_SORTED{ static void f_gold ( int [ ] A , int n ) { Arrays . sort ( A ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,11,13,18,24,26,30,31,34,42,43,43,44,44,47,49,52,53,55,56,57,58,58,60,64,66,67,69,70,70,71,74,76,77,82,85,89,90,96,98}); param0.add(new int[]{-78,81,87,14,25,24,-70,-92,-2,-43,11,-27,15,-80,-75,-81,-95,-25,28,-28,55,-60,-74,-73,90,-17,28,78,70,57,67,88,69,-67,-3,11,-84,-77,35,-74,-4,-88,-28,33}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{6,46,50,38,88,18,27,41,72,92,74,17,62,29,58,70,78,22,6,26,39,12,99,14,22,51,23,48,71,50,89,13,85,10,55,9,79,52,2,25,13,98,51,58,34,35,3,59,70}); param0.add(new int[]{-98,-88,-76,-71,-71,-63,-59,-58,-57,-42,-40,-37,-36,-34,-33,-33,-27,-26,-23,-9,-8,-6,-5,-1,0,3,16,21,29,30,33,39,39,43,47,50,52,60,63,66,73,74,76,77,92,92,96,97}); param0.add(new int[]{1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,1,1,0,1,0}); param0.add(new int[]{46,86}); param0.add(new int[]{58,-31,37,-15,-89,-31,-1,-9,94,59,61,67,-6,74,65,15,88,-69,-89,-13,21,30,5}); param0.add(new int[]{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}); param0.add(new int[]{94,5,98,22,77,57,47,54,3,53,84,31}); List param1 = new ArrayList<>(); param1.add(33); param1.add(31); param1.add(15); param1.add(46); param1.add(42); param1.add(31); param1.add(1); param1.add(21); param1.add(19); param1.add(10); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{2,3,11,13,18,24,26,30,31,34,42,43,43,44,44,47,49,52,53,55,56,57,58,58,60,64,66,67,69,70,70,71,74,76,77,82,85,89,90,96,98}); filled_function_param0.add(new int[]{-78,81,87,14,25,24,-70,-92,-2,-43,11,-27,15,-80,-75,-81,-95,-25,28,-28,55,-60,-74,-73,90,-17,28,78,70,57,67,88,69,-67,-3,11,-84,-77,35,-74,-4,-88,-28,33}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{6,46,50,38,88,18,27,41,72,92,74,17,62,29,58,70,78,22,6,26,39,12,99,14,22,51,23,48,71,50,89,13,85,10,55,9,79,52,2,25,13,98,51,58,34,35,3,59,70}); filled_function_param0.add(new int[]{-98,-88,-76,-71,-71,-63,-59,-58,-57,-42,-40,-37,-36,-34,-33,-33,-27,-26,-23,-9,-8,-6,-5,-1,0,3,16,21,29,30,33,39,39,43,47,50,52,60,63,66,73,74,76,77,92,92,96,97}); filled_function_param0.add(new int[]{1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,1,1,0,1,0}); filled_function_param0.add(new int[]{46,86}); filled_function_param0.add(new int[]{58,-31,37,-15,-89,-31,-1,-9,94,59,61,67,-6,74,65,15,88,-69,-89,-13,21,30,5}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{94,5,98,22,77,57,47,54,3,53,84,31}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(33); filled_function_param1.add(31); filled_function_param1.add(15); filled_function_param1.add(46); filled_function_param1.add(42); filled_function_param1.add(31); filled_function_param1.add(1); filled_function_param1.add(21); filled_function_param1.add(19); filled_function_param1.add(10); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , n ) : A.sort ( ) "," using namespace std; void f_gold ( int A [ ], int n ) { sort ( A, A + n ); } int main() { int n_success = 0; vector> param0 {{2,3,11,13,18,24,26,30,31,34,42,43,43,44,44,47,49,52,53,55,56,57,58,58,60,64,66,67,69,70,70,71,74,76,77,82,85,89,90,96,98},{-78,81,87,14,25,24,-70,-92,-2,-43,11,-27,15,-80,-75,-81,-95,-25,28,-28,55,-60,-74,-73,90,-17,28,78,70,57,67,88,69,-67,-3,11,-84,-77,35,-74,-4,-88,-28,33},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{6,46,50,38,88,18,27,41,72,92,74,17,62,29,58,70,78,22,6,26,39,12,99,14,22,51,23,48,71,50,89,13,85,10,55,9,79,52,2,25,13,98,51,58,34,35,3,59,70},{-98,-88,-76,-71,-71,-63,-59,-58,-57,-42,-40,-37,-36,-34,-33,-33,-27,-26,-23,-9,-8,-6,-5,-1,0,3,16,21,29,30,33,39,39,43,47,50,52,60,63,66,73,74,76,77,92,92,96,97},{1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,1,1,0,1,0},{46,86},{58,-31,37,-15,-89,-31,-1,-9,94,59,61,67,-6,74,65,15,88,-69,-89,-13,21,30,5},{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},{94,5,98,22,77,57,47,54,3,53,84,31}}; vector param1 {33,31,15,46,42,31,1,21,19,10}; vector> filled_function_param0 {{2,3,11,13,18,24,26,30,31,34,42,43,43,44,44,47,49,52,53,55,56,57,58,58,60,64,66,67,69,70,70,71,74,76,77,82,85,89,90,96,98},{-78,81,87,14,25,24,-70,-92,-2,-43,11,-27,15,-80,-75,-81,-95,-25,28,-28,55,-60,-74,-73,90,-17,28,78,70,57,67,88,69,-67,-3,11,-84,-77,35,-74,-4,-88,-28,33},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{6,46,50,38,88,18,27,41,72,92,74,17,62,29,58,70,78,22,6,26,39,12,99,14,22,51,23,48,71,50,89,13,85,10,55,9,79,52,2,25,13,98,51,58,34,35,3,59,70},{-98,-88,-76,-71,-71,-63,-59,-58,-57,-42,-40,-37,-36,-34,-33,-33,-27,-26,-23,-9,-8,-6,-5,-1,0,3,16,21,29,30,33,39,39,43,47,50,52,60,63,66,73,74,76,77,92,92,96,97},{1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,1,1,0,1,0},{46,86},{58,-31,37,-15,-89,-31,-1,-9,94,59,61,67,-6,74,65,15,88,-69,-89,-13,21,30,5},{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},{94,5,98,22,77,57,47,54,3,53,84,31}}; vector filled_function_param1 {33,31,15,46,42,31,1,21,19,10}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 11, 13, 18, 24, 26, 30, 31, 34, 42, 43, 43, 44, 44, 47, 49, 52, 53, 55, 56, 57, 58, 58, 60, 64, 66, 67, 69, 70, 70, 71, 74, 76, 77, 82, 85, 89, 90, 96, 98],33,), ([-78, 81, 87, 14, 25, 24, -70, -92, -2, -43, 11, -27, 15, -80, -75, -81, -95, -25, 28, -28, 55, -60, -74, -73, 90, -17, 28, 78, 70, 57, 67, 88, 69, -67, -3, 11, -84, -77, 35, -74, -4, -88, -28, 33],31,), ([0, 0, 0, 0, 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,), ([6, 46, 50, 38, 88, 18, 27, 41, 72, 92, 74, 17, 62, 29, 58, 70, 78, 22, 6, 26, 39, 12, 99, 14, 22, 51, 23, 48, 71, 50, 89, 13, 85, 10, 55, 9, 79, 52, 2, 25, 13, 98, 51, 58, 34, 35, 3, 59, 70],46,), ([-98, -88, -76, -71, -71, -63, -59, -58, -57, -42, -40, -37, -36, -34, -33, -33, -27, -26, -23, -9, -8, -6, -5, -1, 0, 3, 16, 21, 29, 30, 33, 39, 39, 43, 47, 50, 52, 60, 63, 66, 73, 74, 76, 77, 92, 92, 96, 97],42,), ([1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0],31,), ([46, 86],1,), ([58, -31, 37, -15, -89, -31, -1, -9, 94, 59, 61, 67, -6, 74, 65, 15, 88, -69, -89, -13, 21, 30, 5],21,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([94, 5, 98, 22, 77, 57, 47, 54, 3, 53, 84, 31],10,) ] filled_function_param = [ ([2, 3, 11, 13, 18, 24, 26, 30, 31, 34, 42, 43, 43, 44, 44, 47, 49, 52, 53, 55, 56, 57, 58, 58, 60, 64, 66, 67, 69, 70, 70, 71, 74, 76, 77, 82, 85, 89, 90, 96, 98],33,), ([-78, 81, 87, 14, 25, 24, -70, -92, -2, -43, 11, -27, 15, -80, -75, -81, -95, -25, 28, -28, 55, -60, -74, -73, 90, -17, 28, 78, 70, 57, 67, 88, 69, -67, -3, 11, -84, -77, 35, -74, -4, -88, -28, 33],31,), ([0, 0, 0, 0, 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,), ([6, 46, 50, 38, 88, 18, 27, 41, 72, 92, 74, 17, 62, 29, 58, 70, 78, 22, 6, 26, 39, 12, 99, 14, 22, 51, 23, 48, 71, 50, 89, 13, 85, 10, 55, 9, 79, 52, 2, 25, 13, 98, 51, 58, 34, 35, 3, 59, 70],46,), ([-98, -88, -76, -71, -71, -63, -59, -58, -57, -42, -40, -37, -36, -34, -33, -33, -27, -26, -23, -9, -8, -6, -5, -1, 0, 3, 16, 21, 29, 30, 33, 39, 39, 43, 47, 50, 52, 60, 63, 66, 73, 74, 76, 77, 92, 92, 96, 97],42,), ([1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0],31,), ([46, 86],1,), ([58, -31, 37, -15, -89, -31, -1, -9, 94, 59, 61, 67, -6, 74, 65, 15, 88, -69, -89, -13, 21, 30, 5],21,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([94, 5, 98, 22, 77, 57, 47, 54, 3, 53, 84, 31],10,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS{ static int f_gold ( int arr [ ] , int n , int x , int y ) { int i , j ; int min_dist = Integer . MAX_VALUE ; for ( i = 0 ; i < n ; i ++ ) { for ( j = i + 1 ; j < n ; j ++ ) { if ( ( x == arr [ i ] && y == arr [ j ] || y == arr [ i ] && x == arr [ j ] ) && min_dist > Math . abs ( i - j ) ) min_dist = Math . abs ( i - j ) ; } } return min_dist ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,1,0,1,1,0,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{32,65,10,72,17,58,79,28,67,36,18,35}); List param1 = new ArrayList<>(); param1.add(22); param1.add(25); param1.add(1); param1.add(26); param1.add(24); param1.add(10); param1.add(27); param1.add(30); param1.add(38); param1.add(7); List param2 = new ArrayList<>(); param2.add(7); param2.add(58); param2.add(1); param2.add(54); param2.add(0); param2.add(0); param2.add(1); param2.add(25); param2.add(0); param2.add(10); List param3 = new ArrayList<>(); param3.add(40); param3.add(70); param3.add(1); param3.add(82); param3.add(4); param3.add(1); param3.add(42); param3.add(45); param3.add(0); param3.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x , y ) : min_dist = 99999999 for i in range ( n ) : for j in range ( i + 1 , n ) : if ( x == arr [ i ] and y == arr [ j ] or y == arr [ i ] and x == arr [ j ] ) and min_dist > abs ( i - j ) : min_dist = abs ( i - j ) return min_dist "," using namespace std; int f_gold ( int arr [ ], int n, int x, int y ) { int i, j; int min_dist = INT_MAX; for ( i = 0; i < n; i ++ ) { for ( j = i + 1; j < n; j ++ ) { if ( ( x == arr [ i ] && y == arr [ j ] || y == arr [ i ] && x == arr [ j ] ) && min_dist > abs ( i - j ) ) { min_dist = abs ( i - j ); } } } return min_dist; } int main() { int n_success = 0; vector> param0 {{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},{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},{0,0,1},{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},{-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},{0,0,1,0,1,1,0,1,1,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},{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},{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},{32,65,10,72,17,58,79,28,67,36,18,35}}; vector param1 {22,25,1,26,24,10,27,30,38,7}; vector param2 {7,58,1,54,0,0,1,25,0,10}; vector param3 {40,70,1,82,4,1,42,45,0,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 0, 1],1,1,1,), ([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,), ([-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,), ([0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1],10,0,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,), ([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,), ([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,), ([32, 65, 10, 72, 17, 58, 79, 28, 67, 36, 18, 35],7,10,7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO{ static boolean f_gold ( int n ) { if ( n == 0 ) return false ; while ( n != 1 ) { if ( n % 2 != 0 ) return false ; n = n / 2 ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(2); param0.add(8); param0.add(1024); param0.add(24); param0.add(7); param0.add(46); param0.add(61); param0.add(73); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): if (n == 0): return False while (n != 1): if (n % 2 != 0): return False n = n // 2 return True "," using namespace std; bool f_gold ( int n ) { if ( n == 0 ) return 0; while ( n != 1 ) { if ( n % 2 != 0 ) return 0; n = n / 2; } return 1; } int main() { int n_success = 0; vector param0 {1,2,8,1024,24,7,46,61,73,66}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (2,), (8,), (1024,), (24,), (7,), (46,), (61,), (73,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MINIMUM_XOR_VALUE_PAIR," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_XOR_VALUE_PAIR{ static int f_gold ( int arr [ ] , int n ) { int min_xor = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) min_xor = Math . min ( min_xor , arr [ i ] ^ arr [ j ] ) ; return min_xor ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,5,7,10,10,11,14,19,21,24,27,27,27,28,28,28,33,34,41,42,43,48,52,53,53,59,62,64,66,71,77,78,78,79,80,82,90,97,99,99}); param0.add(new int[]{-68,-58,52,88,90,66,-66,-84,-70,-64,56,42,94,-10,0,80,8,28,-94,36,90,56,56,80,-94,50,90,-28,-22,-2,-96,74,-16,-14}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{57,63,11,73,60,73,25,65,39,48,31,17,23,94,10,97,42,45,83,75,97,96}); param0.add(new int[]{-92,-92,-90,-88,-84,-82,-66,-64,-64,-62,-44,-42,-40,-28,-22,-12,-4,-2,0,4,16,22,28,34,54,60,72,74,78,86,94}); param0.add(new int[]{1,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0}); param0.add(new int[]{2,2,6,13,16,16,17,19,19,20,22,25,27,29,34,34,34,36,38,39,42,49,49,53,59,59,71,77,79,82,83,83,84,84,86,86,87,88,93,96}); param0.add(new int[]{-14,20,36,12,-54,-50,92,-28,44,-46,6,96,82,70,-20,24,-96,-14,46,-28,-46,-28,22,-82,36,-94,-48,-92,96,74,14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{50,48,94,64,60,48,79,75,77,62,33,42,22,78,32,99,27,23,76,51,34,54,70,12,19,17,13,82,96,70,4,12,5,11,23,23,18,93,38,69}); List param1 = new ArrayList<>(); param1.add(34); param1.add(17); param1.add(9); param1.add(21); param1.add(18); param1.add(36); param1.add(36); param1.add(20); param1.add(39); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( ) ; min_xor = 999999 val = 0 for i in range ( 0 , n - 1 ) : for j in range ( i + 1 , n - 1 ) : val = arr [ i ] ^ arr [ j ] min_xor = min ( min_xor , val ) return min_xor "," using namespace std; int f_gold ( int arr [ ], int n ) { int min_xor = INT_MAX; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) min_xor = min ( min_xor, arr [ i ] ^ arr [ j ] ); return min_xor; } int main() { int n_success = 0; vector> param0 {{4,5,7,10,10,11,14,19,21,24,27,27,27,28,28,28,33,34,41,42,43,48,52,53,53,59,62,64,66,71,77,78,78,79,80,82,90,97,99,99},{-68,-58,52,88,90,66,-66,-84,-70,-64,56,42,94,-10,0,80,8,28,-94,36,90,56,56,80,-94,50,90,-28,-22,-2,-96,74,-16,-14},{0,0,0,0,0,0,1,1,1,1,1,1},{57,63,11,73,60,73,25,65,39,48,31,17,23,94,10,97,42,45,83,75,97,96},{-92,-92,-90,-88,-84,-82,-66,-64,-64,-62,-44,-42,-40,-28,-22,-12,-4,-2,0,4,16,22,28,34,54,60,72,74,78,86,94},{1,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0},{2,2,6,13,16,16,17,19,19,20,22,25,27,29,34,34,34,36,38,39,42,49,49,53,59,59,71,77,79,82,83,83,84,84,86,86,87,88,93,96},{-14,20,36,12,-54,-50,92,-28,44,-46,6,96,82,70,-20,24,-96,-14,46,-28,-46,-28,22,-82,36,-94,-48,-92,96,74,14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{50,48,94,64,60,48,79,75,77,62,33,42,22,78,32,99,27,23,76,51,34,54,70,12,19,17,13,82,96,70,4,12,5,11,23,23,18,93,38,69}}; vector param1 {34,17,9,21,18,36,36,20,39,30}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 5, 7, 10, 10, 11, 14, 19, 21, 24, 27, 27, 27, 28, 28, 28, 33, 34, 41, 42, 43, 48, 52, 53, 53, 59, 62, 64, 66, 71, 77, 78, 78, 79, 80, 82, 90, 97, 99, 99],34,), ([-68, -58, 52, 88, 90, 66, -66, -84, -70, -64, 56, 42, 94, -10, 0, 80, 8, 28, -94, 36, 90, 56, 56, 80, -94, 50, 90, -28, -22, -2, -96, 74, -16, -14],17,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],9,), ([57, 63, 11, 73, 60, 73, 25, 65, 39, 48, 31, 17, 23, 94, 10, 97, 42, 45, 83, 75, 97, 96],21,), ([-92, -92, -90, -88, -84, -82, -66, -64, -64, -62, -44, -42, -40, -28, -22, -12, -4, -2, 0, 4, 16, 22, 28, 34, 54, 60, 72, 74, 78, 86, 94],18,), ([1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0],36,), ([2, 2, 6, 13, 16, 16, 17, 19, 19, 20, 22, 25, 27, 29, 34, 34, 34, 36, 38, 39, 42, 49, 49, 53, 59, 59, 71, 77, 79, 82, 83, 83, 84, 84, 86, 86, 87, 88, 93, 96],36,), ([-14, 20, 36, 12, -54, -50, 92, -28, 44, -46, 6, 96, 82, 70, -20, 24, -96, -14, 46, -28, -46, -28, 22, -82, 36, -94, -48, -92, 96, 74, 14],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],39,), ([50, 48, 94, 64, 60, 48, 79, 75, 77, 62, 33, 42, 22, 78, 32, 99, 27, 23, 76, 51, 34, 54, 70, 12, 19, 17, 13, 82, 96, 70, 4, 12, 5, 11, 23, 23, 18, 93, 38, 69],30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_DIVISORS_1_N_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_DIVISORS_1_N_1{ static int f_gold ( int n ) { int sum = 0 ; for ( int i = 1 ; i <= n ; ++ i ) sum += ( n / i ) * i ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(73); param0.add(41); param0.add(36); param0.add(28); param0.add(49); param0.add(24); param0.add(85); param0.add(59); param0.add(82); param0.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 for i in range ( 1 , n + 1 ) : sum += int ( n / i ) * i return int ( sum ) "," using namespace std; int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; ++ i ) sum += ( n / i ) * i; return sum; } int main() { int n_success = 0; vector param0 {73,41,36,28,49,24,85,59,82,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (73,), (41,), (36,), (28,), (49,), (24,), (85,), (59,), (82,), (40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PIZZA_CUT_PROBLEM_CIRCLE_DIVISION_LINES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PIZZA_CUT_PROBLEM_CIRCLE_DIVISION_LINES{ static int f_gold ( int n ) { return 1 + n * ( n + 1 ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(46); param0.add(68); param0.add(4); param0.add(12); param0.add(56); param0.add(14); param0.add(81); param0.add(29); param0.add(26); param0.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return int ( 1 + n * ( n + 1 ) / 2 ) "," using namespace std; int f_gold ( int n ) { return 1 + n * ( n + 1 ) / 2; } int main() { int n_success = 0; vector param0 {46,68,4,12,56,14,81,29,26,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (46,), (68,), (4,), (12,), (56,), (14,), (81,), (29,), (26,), (40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_TRIPLET_SUM_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_TRIPLET_SUM_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int sum = - 1000000 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) for ( int k = j + 1 ; k < n ; k ++ ) if ( sum < arr [ i ] + arr [ j ] + arr [ k ] ) sum = arr [ i ] + arr [ j ] + arr [ k ] ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,10,14,19,24,29,42,43,44,47,47,55,57,59,60,61,76,76,77,81,84,92,92,93,95,97}); param0.add(new int[]{-98,72,52,-62,74,-26,-82,-74,90,58,94,-2,76,-28,12,64,-94,86,56,10,40,20,92,-4,-80,26,-40,36,66,-46,4,-42,-76,76,-90,-48,22,30,48,38,78}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{96,96,38,26,2,36,15,51,78,98,94,31,62,21,7,68,37,4}); param0.add(new int[]{-8,12,68,78,78}); param0.add(new int[]{0,0,0,0,1,0,0,0,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0}); param0.add(new int[]{1,15,16,17,28,28,28,30,31,37,38,38,45,45,46,46,50,51,53,53,55,55,56,58,58,64,78,82,82,85,87,89,89,90,94,95}); param0.add(new int[]{-56,-72,-20,88,20,86,30,36,-44,-66,-26,-88,12,-76,78,62,62,68,-34,0,-22,64,72,56,-64,-16,-4,86,0,98,-70,98,-68,92,-84,-56,28,-74,6,-10,-82,36,-12,-26,66,-60,-68,70,2}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{85,31,15,68,92,89,32,56,27,70,82,58,63,83,89,95,78,9,27,34,24,42,66,6,1,71,55,23,75,26,19,58,25}); List param1 = new ArrayList<>(); param1.add(15); param1.add(28); param1.add(22); param1.add(10); param1.add(4); param1.add(35); param1.add(29); param1.add(36); param1.add(11); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : sm = - 1000000 for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : for k in range ( j + 1 , n ) : if ( sm < ( arr [ i ] + arr [ j ] + arr [ k ] ) ) : sm = arr [ i ] + arr [ j ] + arr [ k ] return sm "," using namespace std; int f_gold ( int arr [ ], int n ) { int sum = INT_MIN; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) for ( int k = j + 1; k < n; k ++ ) if ( sum < arr [ i ] + arr [ j ] + arr [ k ] ) sum = arr [ i ] + arr [ j ] + arr [ k ]; return sum; } int main() { int n_success = 0; vector> param0 {{6,10,14,19,24,29,42,43,44,47,47,55,57,59,60,61,76,76,77,81,84,92,92,93,95,97},{-98,72,52,-62,74,-26,-82,-74,90,58,94,-2,76,-28,12,64,-94,86,56,10,40,20,92,-4,-80,26,-40,36,66,-46,4,-42,-76,76,-90,-48,22,30,48,38,78},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{96,96,38,26,2,36,15,51,78,98,94,31,62,21,7,68,37,4},{-8,12,68,78,78},{0,0,0,0,1,0,0,0,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0},{1,15,16,17,28,28,28,30,31,37,38,38,45,45,46,46,50,51,53,53,55,55,56,58,58,64,78,82,82,85,87,89,89,90,94,95},{-56,-72,-20,88,20,86,30,36,-44,-66,-26,-88,12,-76,78,62,62,68,-34,0,-22,64,72,56,-64,-16,-4,86,0,98,-70,98,-68,92,-84,-56,28,-74,6,-10,-82,36,-12,-26,66,-60,-68,70,2},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{85,31,15,68,92,89,32,56,27,70,82,58,63,83,89,95,78,9,27,34,24,42,66,6,1,71,55,23,75,26,19,58,25}}; vector param1 {15,28,22,10,4,35,29,36,11,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 10, 14, 19, 24, 29, 42, 43, 44, 47, 47, 55, 57, 59, 60, 61, 76, 76, 77, 81, 84, 92, 92, 93, 95, 97],15,), ([-98, 72, 52, -62, 74, -26, -82, -74, 90, 58, 94, -2, 76, -28, 12, 64, -94, 86, 56, 10, 40, 20, 92, -4, -80, 26, -40, 36, 66, -46, 4, -42, -76, 76, -90, -48, 22, 30, 48, 38, 78],28,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([96, 96, 38, 26, 2, 36, 15, 51, 78, 98, 94, 31, 62, 21, 7, 68, 37, 4],10,), ([-8, 12, 68, 78, 78],4,), ([0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],35,), ([1, 15, 16, 17, 28, 28, 28, 30, 31, 37, 38, 38, 45, 45, 46, 46, 50, 51, 53, 53, 55, 55, 56, 58, 58, 64, 78, 82, 82, 85, 87, 89, 89, 90, 94, 95],29,), ([-56, -72, -20, 88, 20, 86, 30, 36, -44, -66, -26, -88, 12, -76, 78, 62, 62, 68, -34, 0, -22, 64, 72, 56, -64, -16, -4, 86, 0, 98, -70, 98, -68, 92, -84, -56, 28, -74, 6, -10, -82, 36, -12, -26, 66, -60, -68, 70, 2],36,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],11,), ([85, 31, 15, 68, 92, 89, 32, 56, 27, 70, 82, 58, 63, 83, 89, 95, 78, 9, 27, 34, 24, 42, 66, 6, 1, 71, 55, 23, 75, 26, 19, 58, 25],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int a = 0 , b = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 != 0 ) a = a * 10 + arr [ i ] ; else b = b * 10 + arr [ i ] ; } return a + b ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,4,5,10,14,16,18,42,43,43,45,46,51,52,53,58,61,66,79,81,82,84}); param0.add(new int[]{48,-22,60,32,48,-2,-76,-50,-26,56,-86,98,-30,-22,82,-20,58,40,76,-2,82,-90,8,-46,22,94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{79,45}); param0.add(new int[]{-90,-68,-38,-34,-4,6,10,28,48,52,54,68,88,90}); param0.add(new int[]{1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0}); param0.add(new int[]{4,8,8,23,26,27,30,42,44,55,59,64,67,69,74,77,82,82,87,96,97}); param0.add(new int[]{0,-18,-98,-36,-62,0,-32,-98,46,72,-18,30,-86,-42,-82,2,-76,-64,-66,-48,-28,52,-46,-76,76,10,70,4,18,94,88,80,-60,-36,62,96,-4,88,50}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{8,71,75,58,97,24,56,98,71,69,32,64,54,96,69,22,7,47,45,68,17,36,90,9,71,86,16,61,53,63,9,74,38,87,14,86,42,42,14,43,58,82,72,73,32}); List param1 = new ArrayList<>(); param1.add(19); param1.add(25); param1.add(23); param1.add(1); param1.add(11); param1.add(22); param1.add(17); param1.add(32); param1.add(6); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( ) a = 0 ; b = 0 for i in range ( n ) : if ( i % 2 != 0 ) : a = a * 10 + arr [ i ] else : b = b * 10 + arr [ i ] return a + b "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int a = 0, b = 0; for ( int i = 0; i < n; i ++ ) { if ( i & 1 ) a = a * 10 + arr [ i ]; else b = b * 10 + arr [ i ]; } return a + b; } int main() { int n_success = 0; vector> param0 {{3,4,5,10,14,16,18,42,43,43,45,46,51,52,53,58,61,66,79,81,82,84},{48,-22,60,32,48,-2,-76,-50,-26,56,-86,98,-30,-22,82,-20,58,40,76,-2,82,-90,8,-46,22,94},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{79,45},{-90,-68,-38,-34,-4,6,10,28,48,52,54,68,88,90},{1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0},{4,8,8,23,26,27,30,42,44,55,59,64,67,69,74,77,82,82,87,96,97},{0,-18,-98,-36,-62,0,-32,-98,46,72,-18,30,-86,-42,-82,2,-76,-64,-66,-48,-28,52,-46,-76,76,10,70,4,18,94,88,80,-60,-36,62,96,-4,88,50},{0,0,0,0,0,0,1,1,1,1},{8,71,75,58,97,24,56,98,71,69,32,64,54,96,69,22,7,47,45,68,17,36,90,9,71,86,16,61,53,63,9,74,38,87,14,86,42,42,14,43,58,82,72,73,32}}; vector param1 {19,25,23,1,11,22,17,32,6,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 4, 5, 10, 14, 16, 18, 42, 43, 43, 45, 46, 51, 52, 53, 58, 61, 66, 79, 81, 82, 84],19,), ([48, -22, 60, 32, 48, -2, -76, -50, -26, 56, -86, 98, -30, -22, 82, -20, 58, 40, 76, -2, 82, -90, 8, -46, 22, 94],25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,), ([79, 45],1,), ([-90, -68, -38, -34, -4, 6, 10, 28, 48, 52, 54, 68, 88, 90],11,), ([1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0],22,), ([4, 8, 8, 23, 26, 27, 30, 42, 44, 55, 59, 64, 67, 69, 74, 77, 82, 82, 87, 96, 97],17,), ([0, -18, -98, -36, -62, 0, -32, -98, 46, 72, -18, 30, -86, -42, -82, 2, -76, -64, -66, -48, -28, 52, -46, -76, 76, 10, 70, 4, 18, 94, 88, 80, -60, -36, 62, 96, -4, 88, 50],32,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1],6,), ([8, 71, 75, 58, 97, 24, 56, 98, 71, 69, 32, 64, 54, 96, 69, 22, 7, 47, 45, 68, 17, 36, 90, 9, 71, 86, 16, 61, 53, 63, 9, 74, 38, 87, 14, 86, 42, 42, 14, 43, 58, 82, 72, 73, 32],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_PREFIX_ALSO_SUFFIX_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_PREFIX_ALSO_SUFFIX_1{ static int f_gold ( String s ) { int n = s . length ( ) ; int lps [ ] = new int [ n ] ; lps [ 0 ] = 0 ; int len = 0 ; int i = 1 ; while ( i < n ) { if ( s . charAt ( i ) == s . charAt ( len ) ) { len ++ ; lps [ i ] = len ; i ++ ; } else { if ( len != 0 ) { len = lps [ len - 1 ] ; } else { lps [ i ] = 0 ; i ++ ; } } } int res = lps [ n - 1 ] ; return ( res > n / 2 ) ? n / 2 : res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""aabcdaabc""); param0.add(""1372494598""); param0.add(""110000100001""); param0.add(""abcab""); param0.add(""488938""); param0.add(""011010101011""); param0.add(""aaaa""); param0.add(""3356203205""); param0.add(""1010""); param0.add(""kkXiiTZkGeh""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : n = len ( s ) lps = [ 0 ] * n l = 0 i = 1 while ( i < n ) : if ( s [ i ] == s [ l ] ) : l = l + 1 lps [ i ] = l i = i + 1 else : if ( l != 0 ) : l = lps [ l - 1 ] else : lps [ i ] = 0 i = i + 1 res = lps [ n - 1 ] if ( res > n / 2 ) : return n // 2 else : return res "," using namespace std; int f_gold ( string s ) { int n = s . length ( ); int lps [ n ]; lps [ 0 ] = 0; int len = 0; int i = 1; while ( i < n ) { if ( s [ i ] == s [ len ] ) { len ++; lps [ i ] = len; i ++; } else { if ( len != 0 ) { len = lps [ len - 1 ]; } else { lps [ i ] = 0; i ++; } } } int res = lps [ n - 1 ]; return ( res > n / 2 ) ? n / 2 : res; } int main() { int n_success = 0; vector param0 {""aabcdaabc"",""1372494598"",""110000100001"",""abcab"",""488938"",""011010101011"",""aaaa"",""3356203205"",""1010"",""kkXiiTZkGeh""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('aabcdaabc',), ('1372494598',), ('110000100001',), ('abcab',), ('488938',), ('011010101011',), ('aaaa',), ('3356203205',), ('1010',), ('kkXiiTZkGeh',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SEARCHING_ARRAY_ADJACENT_DIFFER_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCHING_ARRAY_ADJACENT_DIFFER_K{ static int f_gold ( int arr [ ] , int n , int x , int k ) { int i = 0 ; while ( i < n ) { if ( arr [ i ] == x ) return i ; i = i + Math . max ( 1 , Math . abs ( arr [ i ] - x ) / k ) ; } System . out . println ( ""number is "" + ""not present!"" ) ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,5,9,11,14,18,19,21,26,32,38,38,43,47,49,52,55,61,65,67,69,73,74,79,84,90,91,91,92,93,94,99}); param0.add(new int[]{12,-86,-66,-50,-48,78,-92,-56,-2,66,64}); param0.add(new int[]{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}); param0.add(new int[]{10,87,39,87,45,33,5,37,70,69,88,78,90,3}); param0.add(new int[]{-78,-70,-68,-60,-52,-34,-24,-4,12,18,58,58,64,76,84,94}); param0.add(new int[]{0,1,0,1,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,1,0,1,0}); param0.add(new int[]{5,5,7,11,11,15,22,23,28,38,41,53,54,57,59,68,71,89}); param0.add(new int[]{-4,0,60,-14,-48,54,-96,-68,-40,64,-50,-74,-20,-22,48,-48,42,62,66,84,54,-52,-52,6,46,-90,-18,90}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{30,91,34,44,3,76,43,75,49,33,74,72,68,79,26,62,23,5,32,75,82,25,7,19,32,87,87,94,34,62,3,32,59}); List param1 = new ArrayList<>(); param1.add(22); param1.add(5); param1.add(35); param1.add(9); param1.add(14); param1.add(26); param1.add(16); param1.add(18); param1.add(9); param1.add(32); List param2 = new ArrayList<>(); param2.add(19); param2.add(10); param2.add(37); param2.add(8); param2.add(9); param2.add(36); param2.add(17); param2.add(14); param2.add(8); param2.add(30); List param3 = new ArrayList<>(); param3.add(26); param3.add(5); param3.add(43); param3.add(10); param3.add(13); param3.add(32); param3.add(16); param3.add(23); param3.add(9); param3.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x , k ) : i = 0 while ( i < n ) : if ( arr [ i ] == x ) : return i i = i + max ( 1 , int ( abs ( arr [ i ] - x ) / k ) ) print ( ""number is not present!"" ) return - 1 "," using namespace std; int f_gold ( int arr [ ], int n, int x, int k ) { int i = 0; while ( i < n ) { if ( arr [ i ] == x ) return i; i = i + max ( 1, abs ( arr [ i ] - x ) / k ); } cout << ""number is not present!""; return - 1; } int main() { int n_success = 0; vector> param0 {{1,5,9,11,14,18,19,21,26,32,38,38,43,47,49,52,55,61,65,67,69,73,74,79,84,90,91,91,92,93,94,99},{12,-86,-66,-50,-48,78,-92,-56,-2,66,64},{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},{10,87,39,87,45,33,5,37,70,69,88,78,90,3},{-78,-70,-68,-60,-52,-34,-24,-4,12,18,58,58,64,76,84,94},{0,1,0,1,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,1,0,1,0},{5,5,7,11,11,15,22,23,28,38,41,53,54,57,59,68,71,89},{-4,0,60,-14,-48,54,-96,-68,-40,64,-50,-74,-20,-22,48,-48,42,62,66,84,54,-52,-52,6,46,-90,-18,90},{0,0,0,0,0,0,0,1,1,1,1,1},{30,91,34,44,3,76,43,75,49,33,74,72,68,79,26,62,23,5,32,75,82,25,7,19,32,87,87,94,34,62,3,32,59}}; vector param1 {22,5,35,9,14,26,16,18,9,32}; vector param2 {19,10,37,8,9,36,17,14,8,30}; vector param3 {26,5,43,10,13,32,16,23,9,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 5, 9, 11, 14, 18, 19, 21, 26, 32, 38, 38, 43, 47, 49, 52, 55, 61, 65, 67, 69, 73, 74, 79, 84, 90, 91, 91, 92, 93, 94, 99],22,19,26,), ([12, -86, -66, -50, -48, 78, -92, -56, -2, 66, 64],5,10,5,), ([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],35,37,43,), ([10, 87, 39, 87, 45, 33, 5, 37, 70, 69, 88, 78, 90, 3],9,8,10,), ([-78, -70, -68, -60, -52, -34, -24, -4, 12, 18, 58, 58, 64, 76, 84, 94],14,9,13,), ([0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0],26,36,32,), ([5, 5, 7, 11, 11, 15, 22, 23, 28, 38, 41, 53, 54, 57, 59, 68, 71, 89],16,17,16,), ([-4, 0, 60, -14, -48, 54, -96, -68, -40, 64, -50, -74, -20, -22, 48, -48, 42, 62, 66, 84, 54, -52, -52, 6, 46, -90, -18, 90],18,14,23,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],9,8,9,), ([30, 91, 34, 44, 3, 76, 43, 75, 49, 33, 74, 72, 68, 79, 26, 62, 23, 5, 32, 75, 82, 25, 7, 19, 32, 87, 87, 94, 34, 62, 3, 32, 59],32,30,24,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1{ static int f_gold ( int m , int n ) { int count [ ] [ ] = new int [ m ] [ n ] ; for ( int i = 0 ; i < m ; i ++ ) count [ i ] [ 0 ] = 1 ; for ( int j = 0 ; j < n ; j ++ ) count [ 0 ] [ j ] = 1 ; for ( int i = 1 ; i < m ; i ++ ) { for ( int j = 1 ; j < n ; j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ] ; } return count [ m - 1 ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(79); param0.add(95); param0.add(15); param0.add(71); param0.add(16); param0.add(91); param0.add(10); param0.add(98); param0.add(30); param0.add(58); List param1 = new ArrayList<>(); param1.add(16); param1.add(62); param1.add(9); param1.add(18); param1.add(85); param1.add(52); param1.add(91); param1.add(81); param1.add(42); param1.add(69); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int m, int n ) { int count [ m ] [ n ]; for ( int i = 0; i < m; i ++ ) count [ i ] [ 0 ] = 1; for ( int j = 0; j < n; j ++ ) count [ 0 ] [ j ] = 1; for ( int i = 1; i < m; i ++ ) { for ( int j = 1; j < n; j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ]; } return count [ m - 1 ] [ n - 1 ]; } int main() { int n_success = 0; vector param0 {79,95,15,71,16,91,10,98,30,58}; vector param1 {16,62,9,18,85,52,91,81,42,69}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MULTIPLY_TWO_NUMBERS_WITHOUT_USING_MULTIPLY_DIVISION_BITWISE_OPERATORS_AND_NO_LOOPS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_TWO_NUMBERS_WITHOUT_USING_MULTIPLY_DIVISION_BITWISE_OPERATORS_AND_NO_LOOPS{ static int f_gold ( int x , int y ) { if ( y == 0 ) return 0 ; if ( y > 0 ) return ( x + f_gold ( x , y - 1 ) ) ; if ( y < 0 ) return - f_gold ( x , - y ) ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(18); param0.add(23); param0.add(24); param0.add(75); param0.add(25); param0.add(57); param0.add(31); param0.add(8); param0.add(12); param0.add(74); List param1 = new ArrayList<>(); param1.add(94); param1.add(36); param1.add(22); param1.add(92); param1.add(43); param1.add(32); param1.add(57); param1.add(17); param1.add(76); param1.add(70); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y ) : if ( y == 0 ) : return 0 if ( y > 0 ) : return ( x + f_gold ( x , y - 1 ) ) if ( y < 0 ) : return - f_gold ( x , - y ) ",,," if __name__ == '__main__': param = [ (18,94,), (23,36,), (24,22,), (75,92,), (25,43,), (57,32,), (31,57,), (8,17,), (12,76,), (74,70,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_NUMBER_PAIRS_ARRAY_XOR_0," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_NUMBER_PAIRS_ARRAY_XOR_0{ static int f_gold ( int a [ ] , int n ) { Arrays . sort ( a ) ; int count = 1 ; int answer = 0 ; for ( int i = 1 ; i < n ; i ++ ) { if ( a [ i ] == a [ i - 1 ] ) { count += 1 ; } else { answer = answer + ( count * ( count - 1 ) ) / 2 ; count = 1 ; } } answer = answer + ( count * ( count - 1 ) ) / 2 ; return answer ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,7,9,12,13,13,14,16,19,23,24,25,28,29,38,38,41,42,44,51,55,56,58,59,61,62,62,63,63,64,67,68,69,71,78,78,80,82,82,82,83,85,86,92,94,98}); param0.add(new int[]{42,-20,52,34,58,62,-60,70,36,-8,-26,68,34,-92,42,94,56,84,-70,70}); param0.add(new int[]{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}); param0.add(new int[]{31,87,75,69,11,65,25,27}); param0.add(new int[]{-92,-88,-86,-74,-72,-70,-70,-66,-62,-60,-52,-42,-42,8,14,30,36,84,88}); param0.add(new int[]{1,0,0,0}); param0.add(new int[]{2,8,9,12,21,23,30,31,33,34,34,41,43,45,52,53,53,55,56,61,73,73,73,74,76,79,81,81,81,90,91,92,92,97,99,99}); param0.add(new int[]{84,6,-36,62,-2,-32,-82,-78,20,8,-50,-70,20,-58,94,-28,-84,-22,-44,-84,2,-68,-34,58,-64,-86,-40,-80,74,-26,12,2,-20,20,76,-14,-40,56,24,-16,-66,14,-42,0,72,82,-70}); param0.add(new int[]{0,0,0,0,0,0,0,1,1}); param0.add(new int[]{67,93,54,91,74,88,48,68,17,6,15,25}); List param1 = new ArrayList<>(); param1.add(24); param1.add(17); param1.add(37); param1.add(5); param1.add(13); param1.add(3); param1.add(30); param1.add(31); param1.add(8); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int a [ ], int n ) { sort ( a, a + n ); int count = 1; int answer = 0; for ( int i = 1; i < n; i ++ ) { if ( a [ i ] == a [ i - 1 ] ) { count += 1; } else { answer = answer + ( count * ( count - 1 ) ) / 2; count = 1; } } answer = answer + ( count * ( count - 1 ) ) / 2; return answer; } int main() { int n_success = 0; vector> param0 {{4,7,9,12,13,13,14,16,19,23,24,25,28,29,38,38,41,42,44,51,55,56,58,59,61,62,62,63,63,64,67,68,69,71,78,78,80,82,82,82,83,85,86,92,94,98},{42,-20,52,34,58,62,-60,70,36,-8,-26,68,34,-92,42,94,56,84,-70,70},{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},{31,87,75,69,11,65,25,27},{-92,-88,-86,-74,-72,-70,-70,-66,-62,-60,-52,-42,-42,8,14,30,36,84,88},{1,0,0,0},{2,8,9,12,21,23,30,31,33,34,34,41,43,45,52,53,53,55,56,61,73,73,73,74,76,79,81,81,81,90,91,92,92,97,99,99},{84,6,-36,62,-2,-32,-82,-78,20,8,-50,-70,20,-58,94,-28,-84,-22,-44,-84,2,-68,-34,58,-64,-86,-40,-80,74,-26,12,2,-20,20,76,-14,-40,56,24,-16,-66,14,-42,0,72,82,-70},{0,0,0,0,0,0,0,1,1},{67,93,54,91,74,88,48,68,17,6,15,25}}; vector param1 {24,17,37,5,13,3,30,31,8,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int result = - 1 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < n - 1 ; j ++ ) for ( int k = j + 1 ; k < n ; k ++ ) if ( arr [ j ] * arr [ k ] == arr [ i ] ) result = Math . max ( result , arr [ i ] ) ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,78,84}); param0.add(new int[]{-54,64,60,14,18,-68,-54,-58,38,-72,-84,46,74,76,28,-2,54,24,18,-74,-78,14,-38,-70,26,-54,-36,-96,-12,8,62,-42,-84,10,-6,36,-72,10,10,-20,16,92,-64,-34,74,-98,18}); param0.add(new int[]{0,0,0,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}); param0.add(new int[]{39,49,94,80,48,34,63,82,47,51,60,68,79,23,97,22,54,53,40,2,25}); param0.add(new int[]{-90,-52,-10,12,72}); param0.add(new int[]{1,0,0}); param0.add(new int[]{2,9,11,14,16,17,17,18,19,21,24,25,28,29,30,33,33,39,41,41,43,46,50,51,60,62,67,80,84,86,91,92,97}); param0.add(new int[]{4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{52,8,31,92,20,18,34,5,15,8,73,20,40,61,80,51,95,73,38,30,21,69,52,38,68,77}); List param1 = new ArrayList<>(); param1.add(2); param1.add(26); param1.add(22); param1.add(10); param1.add(3); param1.add(2); param1.add(27); param1.add(0); param1.add(16); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : result = - 1 for i in range ( n ) : for j in range ( n - 1 ) : for k in range ( j + 1 , n ) : if ( arr [ j ] * arr [ k ] == arr [ i ] ) : result = max ( result , arr [ i ] ) return result "," using namespace std; int f_gold ( int arr [ ], int n ) { int result = - 1; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n - 1; j ++ ) for ( int k = j + 1; k < n; k ++ ) if ( arr [ j ] * arr [ k ] == arr [ i ] ) result = max ( result, arr [ i ] ); return result; } int main() { int n_success = 0; vector> param0 {{4,78,84},{-54,64,60,14,18,-68,-54,-58,38,-72,-84,46,74,76,28,-2,54,24,18,-74,-78,14,-38,-70,26,-54,-36,-96,-12,8,62,-42,-84,10,-6,36,-72,10,10,-20,16,92,-64,-34,74,-98,18},{0,0,0,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},{39,49,94,80,48,34,63,82,47,51,60,68,79,23,97,22,54,53,40,2,25},{-90,-52,-10,12,72},{1,0,0},{2,9,11,14,16,17,17,18,19,21,24,25,28,29,30,33,33,39,41,41,43,46,50,51,60,62,67,80,84,86,91,92,97},{4},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{52,8,31,92,20,18,34,5,15,8,73,20,40,61,80,51,95,73,38,30,21,69,52,38,68,77}}; vector param1 {2,26,22,10,3,2,27,0,16,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 78, 84],2,), ([-54, 64, 60, 14, 18, -68, -54, -58, 38, -72, -84, 46, 74, 76, 28, -2, 54, 24, 18, -74, -78, 14, -38, -70, 26, -54, -36, -96, -12, 8, 62, -42, -84, 10, -6, 36, -72, 10, 10, -20, 16, 92, -64, -34, 74, -98, 18],26,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([39, 49, 94, 80, 48, 34, 63, 82, 47, 51, 60, 68, 79, 23, 97, 22, 54, 53, 40, 2, 25],10,), ([-90, -52, -10, 12, 72],3,), ([1, 0, 0],2,), ([2, 9, 11, 14, 16, 17, 17, 18, 19, 21, 24, 25, 28, 29, 30, 33, 33, 39, 41, 41, 43, 46, 50, 51, 60, 62, 67, 80, 84, 86, 91, 92, 97],27,), ([4],0,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,), ([52, 8, 31, 92, 20, 18, 34, 5, 15, 8, 73, 20, 40, 61, 80, 51, 95, 73, 38, 30, 21, 69, 52, 38, 68, 77],22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1{ public static int f_gold ( int a , int b ) { if ( a == 0 || b == 0 ) return 1 ; return ( int ) Math . floor ( Math . log10 ( Math . abs ( a ) ) + Math . log10 ( Math . abs ( b ) ) ) + 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(97); param0.add(52); param0.add(95); param0.add(35); param0.add(40); param0.add(18); param0.add(92); param0.add(73); param0.add(10); param0.add(82); List param1 = new ArrayList<>(); param1.add(91); param1.add(49); param1.add(34); param1.add(40); param1.add(85); param1.add(97); param1.add(15); param1.add(98); param1.add(62); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( a , b ) : if ( a == 0 or b == 0 ) : return 1 return math.floor ( math.log10 ( abs ( a ) ) + math.log10 ( abs ( b ) ) ) + 1 "," using namespace std; int f_gold ( int a, int b ) { if ( a == 0 || b == 0 ) return 1; return floor ( log10 ( abs ( a ) ) + log10 ( abs ( b ) ) ) + 1; } int main() { int n_success = 0; vector param0 {97,52,95,35,40,18,92,73,10,82}; vector param1 {91,49,34,40,85,97,15,98,62,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (97,91,), (52,49,), (95,34,), (35,40,), (40,85,), (18,97,), (92,15,), (73,98,), (10,62,), (82,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_WAYS_BUILD_STREET_GIVEN_CONSTRAINTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_WAYS_BUILD_STREET_GIVEN_CONSTRAINTS{ static long f_gold ( int n ) { long dp [ ] [ ] = new long [ 2 ] [ n + 1 ] ; dp [ 0 ] [ 1 ] = 1 ; dp [ 1 ] [ 1 ] = 2 ; for ( int i = 2 ; i <= n ; i ++ ) { dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ] ; dp [ 1 ] [ i ] = dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ] ; } return dp [ 0 ] [ n ] + dp [ 1 ] [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(68); param0.add(91); param0.add(99); param0.add(79); param0.add(61); param0.add(48); param0.add(89); param0.add(20); param0.add(83); param0.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : dp = [ [ 0 ] * ( n + 1 ) for i in range ( 2 ) ] dp [ 0 ] [ 1 ] = 1 dp [ 1 ] [ 1 ] = 2 for i in range ( 2 , n + 1 ) : dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ] dp [ 1 ] [ i ] = ( dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ] ) return dp [ 0 ] [ n ] + dp [ 1 ] [ n ] "," using namespace std; long f_gold ( int n ) { long dp [ 2 ] [ n + 1 ]; dp [ 0 ] [ 1 ] = 1; dp [ 1 ] [ 1 ] = 2; for ( int i = 2; i <= n; i ++ ) { dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ]; dp [ 1 ] [ i ] = dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ]; } return dp [ 0 ] [ n ] + dp [ 1 ] [ n ]; } int main() { int n_success = 0; vector param0 {68,91,99,79,61,48,89,20,83,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (68,), (91,), (99,), (79,), (61,), (48,), (89,), (20,), (83,), (1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FIND_CIRCUMFERENCE_CIRCLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FIND_CIRCUMFERENCE_CIRCLE{ static double f_gold ( double r ) { double PI = 3.1415 ; double cir = 2 * PI * r ; return cir ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(8650.932760642281); param0.add(-9475.213251789266); param0.add(3895.3903681587985); param0.add(-2977.0280936855806); param0.add(8513.1890392562); param0.add(-239.5023899621529); param0.add(3460.951135898811); param0.add(-8717.439885353786); param0.add(6512.42862487631); param0.add(-2607.390557447935); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, NTH_NON_FIBONACCI_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_NON_FIBONACCI_NUMBER{ static int f_gold ( int n ) { int prevPrev = 1 , prev = 2 , curr = 3 ; while ( n > 0 ) { prevPrev = prev ; prev = curr ; curr = prevPrev + prev ; n = n - ( curr - prev - 1 ) ; } n = n + ( curr - prev - 1 ) ; return prev + n ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(76); param0.add(91); param0.add(62); param0.add(65); param0.add(83); param0.add(57); param0.add(76); param0.add(6); param0.add(2); param0.add(86); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : prevPrev = 1 prev = 2 curr = 3 while n > 0 : prevPrev = prev prev = curr curr = prevPrev + prev n = n - ( curr - prev - 1 ) n = n + ( curr - prev - 1 ) return prev + n "," using namespace std; int f_gold ( int n ) { int prevPrev = 1, prev = 2, curr = 3; while ( n > 0 ) { prevPrev = prev; prev = curr; curr = prevPrev + prev; n = n - ( curr - prev - 1 ); } n = n + ( curr - prev - 1 ); return prev + n; } int main() { int n_success = 0; vector param0 {76,91,62,65,83,57,76,6,2,86}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (76,), (91,), (62,), (65,), (83,), (57,), (76,), (6,), (2,), (86,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT{ static boolean f_gold ( int n ) { boolean arr [ ] = new boolean [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) arr [ i ] = false ; while ( n > 0 ) { int digit = n % 10 ; if ( arr [ digit ] ) return false ; arr [ digit ] = true ; n = n / 10 ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(474); param0.add(9445); param0.add(90); param0.add(30); param0.add(37453); param0.add(27); param0.add(2400); param0.add(98); param0.add(46); param0.add(722); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","import math def f_gold ( n ) : ar = [ 0 ] * 10 while ( n > 0 ) : digit = math.floor ( n % 10 ) if ( ar [ digit ] ) : return 0 ar [ digit ] = 1 n = n / 10 return 1 "," using namespace std; bool f_gold ( int n ) { bool arr [ 10 ]; for ( int i = 0; i < 10; i ++ ) arr [ i ] = false; while ( n > 0 ) { int digit = n % 10; if ( arr [ digit ] ) return false; arr [ digit ] = true; n = n / 10; } return true; } int main() { int n_success = 0; vector param0 {474,9445,90,30,37453,27,2400,98,46,722}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ (474,), (9445,), (90,), (30,), (37453,), (27,), (2400,), (98,), (46,), (722,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", AREA_OF_A_HEXAGON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class AREA_OF_A_HEXAGON{ public static double f_gold ( double s ) { return ( ( 3 * Math . sqrt ( 3 ) * ( s * s ) ) / 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1772.6589509256596); param0.add(-599.737107809315); param0.add(1074.1765931782); param0.add(-1182.4087746714795); param0.add(8083.035797247716); param0.add(-6126.414356565494); param0.add(5370.057504189614); param0.add(-6947.020794285176); param0.add(2110.5107873533325); param0.add(-6458.751326919488); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( s ) : return ( ( 3 * math.sqrt ( 3 ) * ( s * s ) ) / 2 ) ; "," using namespace std; double f_gold ( double s ) { return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 ); } int main() { int n_success = 0; vector param0 {1772.6589509256596,-599.737107809315,1074.1765931782,-1182.4087746714795,8083.035797247716,-6126.414356565494,5370.057504189614,-6947.020794285176,2110.5107873533325,-6458.751326919488}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1772.6589509256596,), (-599.737107809315,), (1074.1765931782,), (-1182.4087746714795,), (8083.035797247716,), (-6126.414356565494,), (5370.057504189614,), (-6947.020794285176,), (2110.5107873533325,), (-6458.751326919488,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REMOVE_ARRAY_END_ELEMENT_MAXIMIZE_SUM_PRODUCT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMOVE_ARRAY_END_ELEMENT_MAXIMIZE_SUM_PRODUCT{ static int f_gold ( int dp [ ] [ ] , int a [ ] , int low , int high , int turn ) { if ( low == high ) { return a [ low ] * turn ; } if ( dp [ low ] [ high ] != 0 ) { return dp [ low ] [ high ] ; } dp [ low ] [ high ] = Math . max ( a [ low ] * turn + f_gold ( dp , a , low + 1 , high , turn + 1 ) , a [ high ] * turn + f_gold ( dp , a , low , high - 1 , turn + 1 ) ) ; return dp [ low ] [ high ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{23,37,54,57,59,75,97},new int[]{9,15,34,39,80,96,99},new int[]{15,25,26,31,43,47,93},new int[]{22,31,37,44,54,62,91},new int[]{7,19,32,56,57,70,81},new int[]{16,37,49,77,81,82,85},new int[]{44,48,64,74,79,89,99}}); param0.add(new int[][]{new int[]{-24,-34,-86,-16,-34,14,76,4,18,60,-4,-24,46,-26,-74,6,50,-34,8,-30,-62,56,-78,-50,76,-98,-64,-72,-76,46,-70,4,-92,-18,10,-76,78,-26},new int[]{-34,-30,-96,-4,76,48,-10,96,-88,96,90,40,-24,68,-42,-48,-30,-32,-44,-50,-98,34,-78,-52,-88,-38,54,-64,-94,-48,-80,-2,-90,-14,-8,90,-78,-36},new int[]{30,-80,-58,48,-80,-78,40,-48,-40,-84,2,44,72,6,78,-84,-30,-70,32,86,16,68,40,-36,80,-46,66,-92,8,72,-56,58,-72,44,40,6,66,-66},new int[]{16,-72,-66,-30,66,-94,36,-34,-78,14,-74,-54,48,6,-40,-40,-24,-6,18,-20,-88,-8,82,-56,-96,-32,30,-22,70,-4,98,-40,-72,66,-54,-60,52,66},new int[]{-28,-52,90,-52,12,98,42,-52,38,-60,-28,94,86,-22,-62,68,12,92,-82,18,-2,82,-28,72,-78,-70,40,-54,-24,-68,-74,-40,-32,14,88,94,-46,-14},new int[]{-38,-30,62,-52,54,56,12,32,-78,24,38,-82,6,-64,-96,-56,-30,62,-94,-26,-64,-38,96,72,54,-56,56,82,6,-30,94,80,-68,18,84,58,-48,-34},new int[]{82,-44,14,-26,-14,-92,62,-48,-52,26,-30,-76,-26,28,54,-16,-60,16,-76,-90,20,-8,56,-86,66,-84,92,-52,90,30,38,-2,90,-50,88,44,-66,-80},new int[]{-22,68,62,-84,-76,-12,82,70,-58,86,20,-66,96,-28,6,60,-90,52,-28,8,34,90,38,24,76,-22,6,16,-46,-4,84,-6,6,30,50,26,8,-8},new int[]{34,-62,-26,18,-14,42,-50,72,16,-62,-76,32,-20,82,8,74,60,-60,-16,-50,-38,-88,68,-26,66,-14,64,42,98,40,-56,28,-96,36,-82,-74,38,-26},new int[]{-66,-58,-84,16,-42,4,-38,-6,-32,-98,20,-96,60,-38,24,-8,-74,52,98,52,-10,-24,-22,78,-20,58,-24,-98,-76,0,-94,6,28,42,20,-36,68,-68},new int[]{-20,70,-80,68,-26,-26,-22,88,86,12,-98,-80,2,-22,-2,2,-52,-50,30,12,74,34,-14,-54,70,16,-76,-56,16,-50,-14,-4,30,48,-14,84,-34,30},new int[]{68,68,-86,66,-64,60,-28,52,14,-40,-98,22,-30,28,-48,-76,66,94,-28,32,88,86,-76,-4,68,-56,76,-4,36,16,-4,8,-44,-84,74,74,96,-22},new int[]{-14,-88,-52,-72,-60,-50,32,86,14,-26,36,-84,38,80,-86,-64,14,-96,86,-52,-48,-16,-78,-66,-10,-24,70,22,90,46,-74,36,-74,2,96,6,4,34},new int[]{-34,72,-40,34,-30,18,54,-50,0,94,-62,80,4,84,10,98,56,-36,-94,88,10,-30,90,-52,14,-46,30,82,-66,8,-98,86,-90,46,-44,-92,22,58},new int[]{70,-44,-28,-78,-62,-78,-96,-6,-92,-86,-82,72,-50,26,-4,82,-42,58,28,-88,98,-98,-14,72,-24,58,72,-72,6,-78,34,-34,58,-62,78,-98,0,50},new int[]{84,48,-82,-32,-22,16,-34,-28,-76,40,26,30,70,28,-64,-90,70,-90,82,60,10,-52,0,50,-38,-32,-18,2,48,20,-96,4,62,-28,28,-12,50,-90},new int[]{64,58,-34,10,-44,-72,62,70,60,84,-12,-46,-82,-12,80,46,44,-58,-18,10,44,50,-60,-20,82,-10,18,-4,48,22,-14,12,-76,-32,8,-60,-54,-6},new int[]{22,-58,58,-24,-58,-64,62,-38,-36,44,-82,46,-78,54,96,24,84,90,-2,-98,-74,8,44,-94,84,48,-2,66,-44,52,-42,-36,34,-98,-6,54,26,18},new int[]{-28,30,-66,-14,-20,-44,-62,-20,90,-92,-38,64,44,-60,90,-60,-82,36,-46,52,-60,26,12,80,-64,92,-22,-68,-10,54,-96,44,70,10,4,-4,-94,66},new int[]{-70,54,-32,92,-26,-66,28,-98,-14,-20,40,-36,-6,-60,-36,-32,26,90,34,-34,82,48,-82,-8,-86,-74,-58,-68,-68,-16,-26,-88,-6,-76,-12,-68,-98,-94},new int[]{14,-84,90,88,80,-28,-46,4,-4,36,-56,-44,68,24,24,70,36,-4,58,-78,14,-48,-46,58,-44,-66,72,-36,84,70,-26,72,76,30,-30,92,4,-40},new int[]{-24,-28,0,-44,-48,74,76,50,-88,36,-24,62,-34,82,-20,38,-76,16,-70,92,-82,56,72,78,40,52,-52,-38,36,-44,92,46,-60,-54,58,96,74,-18},new int[]{70,-30,-62,-74,-88,-92,72,-42,34,76,-4,-94,22,-82,56,2,44,-64,-88,-20,96,0,-12,-20,-40,-56,-8,18,-8,18,98,28,50,-14,72,50,4,38},new int[]{72,-66,16,-44,94,10,60,96,24,12,92,30,2,64,4,58,74,-24,-96,-52,72,10,-2,-18,-74,-2,70,-6,-60,72,-32,34,-78,-10,-2,-30,54,42},new int[]{80,92,18,54,-42,50,-62,76,94,38,84,78,44,98,78,-54,-36,-80,62,14,24,86,52,4,78,96,20,58,-64,-42,20,-98,-90,6,30,56,-66,-34},new int[]{-86,60,-62,-32,-12,92,-54,-2,8,58,68,42,-46,-8,82,-28,-96,62,46,-12,0,88,82,-26,-42,36,46,-46,54,-58,-58,-62,32,-48,-60,86,4,56},new int[]{88,-36,4,60,24,6,72,58,44,14,-40,-64,36,-92,36,-56,-78,86,80,80,-94,64,-4,-2,86,26,-98,-56,62,-56,-18,40,12,26,50,72,-16,-58},new int[]{-88,4,-66,64,42,94,54,-38,8,-18,-8,88,46,42,64,-88,94,58,-50,26,38,92,-66,82,8,38,-92,-32,50,-44,-88,-6,34,12,66,54,-52,-86},new int[]{20,-90,2,-94,-76,-28,-76,44,-12,-56,50,4,34,-88,46,2,60,52,22,98,-84,6,-26,-90,-4,48,-66,-42,58,-22,30,-22,-82,-50,42,84,94,4},new int[]{-56,4,-4,54,64,82,88,8,50,66,-2,80,-4,12,24,-56,-52,80,66,82,-66,-92,-42,-56,66,-92,-60,-92,-52,-54,32,22,-42,-46,-66,60,10,-62},new int[]{-44,0,6,-54,-98,72,-98,-28,-4,-86,-10,-76,-64,-66,58,60,24,90,-6,-54,-22,84,-34,64,36,18,14,-32,-88,-32,84,-8,60,98,28,-6,14,-88},new int[]{-94,-92,74,96,28,34,56,74,-62,-46,-8,10,-96,-72,50,-98,-28,72,2,46,68,14,-72,-78,-76,68,52,-30,-32,90,40,50,50,20,98,2,72,44},new int[]{-6,94,16,-70,-74,-46,22,24,44,-40,52,-50,94,-66,84,-66,14,-12,48,-6,64,-12,-44,-14,2,-48,-22,52,-28,-18,8,72,-28,68,44,-28,-20,62},new int[]{12,-94,-86,-52,-92,-76,-78,10,-8,30,34,26,-80,-8,68,92,66,16,-48,70,30,-56,-80,-78,58,94,-56,-12,56,-94,-60,-70,0,-94,6,36,48,-98},new int[]{74,72,20,-84,96,-84,40,-36,-88,-14,60,-70,36,-28,-18,-82,-36,92,-86,44,-16,-66,28,-88,-18,-52,66,-26,-90,-12,-16,80,-28,82,-92,82,-76,-80},new int[]{40,-38,-48,72,-30,70,-14,14,90,42,-6,52,-94,44,-32,-8,-74,80,-18,-10,74,-80,86,-82,-2,10,-12,58,-70,-18,86,40,62,76,88,68,68,4},new int[]{86,4,16,86,-66,72,-38,-40,-52,14,-60,-88,-44,-60,-64,84,-50,-78,-44,-18,78,74,-66,-64,18,26,74,98,-18,-96,-82,4,-74,-40,-50,-46,-4,94},new int[]{-70,-64,-10,-22,-88,-48,84,78,16,64,78,-48,66,-88,44,60,-10,-48,60,-40,86,-40,32,16,28,-30,32,-74,10,-34,38,-36,-30,2,14,-92,-48,88}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{84,65,61,9,50,58,19,98,63,92,42,82,5,55,81,77,1,92,74,40,13,59,48,51,18,42,34,78,41,82,13,6,92},new int[]{31,76,5,83,74,92,29,9,40,28,36,36,4,73,32,6,79,8,45,89,60,34,82,27,68,24,68,47,27,42,3,61,19},new int[]{56,19,38,73,69,25,38,90,20,50,27,8,1,84,9,44,54,64,8,74,19,52,40,9,75,66,58,8,40,46,55,54,75},new int[]{12,13,58,11,23,52,60,91,95,86,63,25,62,93,35,36,60,87,94,46,3,85,35,77,28,22,33,7,92,76,33,53,30},new int[]{2,4,55,27,47,76,45,70,34,36,5,2,50,24,32,85,81,34,5,35,56,72,21,39,58,90,49,75,74,49,76,22,30},new int[]{35,66,31,4,44,70,53,57,36,36,54,26,96,4,22,34,1,87,57,51,16,36,47,91,39,5,25,45,61,5,37,51,88},new int[]{45,98,42,35,56,86,16,75,9,32,14,92,40,25,24,29,5,1,75,13,3,8,71,79,96,33,22,13,30,20,41,84,59},new int[]{74,33,15,13,27,6,87,95,74,82,7,52,29,66,44,89,74,21,57,22,32,13,14,42,12,99,55,9,16,94,37,72,29},new int[]{64,47,16,76,77,39,94,53,65,65,80,12,25,14,6,77,66,12,37,63,78,17,32,16,22,7,40,25,8,27,32,55,39},new int[]{27,52,60,70,10,52,14,60,35,31,27,50,74,87,32,28,55,98,68,9,72,48,53,39,29,64,84,64,47,7,69,22,72},new int[]{89,58,93,44,1,12,98,64,65,97,36,4,84,47,49,77,81,11,30,3,69,73,30,68,73,10,96,40,71,57,3,81,46},new int[]{39,71,95,88,22,67,25,57,53,22,98,68,19,28,10,26,79,13,50,2,10,54,44,88,69,97,75,31,18,77,17,22,53},new int[]{85,17,87,79,24,25,49,13,15,16,36,98,41,78,77,89,31,91,20,85,51,29,55,94,69,16,85,91,83,9,66,96,16},new int[]{67,72,45,87,18,95,50,29,69,80,43,78,53,37,71,67,41,16,66,77,69,74,50,11,37,80,5,60,5,56,85,9,92},new int[]{92,36,57,21,48,29,77,51,52,74,68,1,18,60,70,47,98,75,81,17,12,74,1,52,50,21,30,24,17,56,29,65,18},new int[]{63,47,21,28,54,39,53,42,30,59,74,9,14,66,94,45,27,44,43,98,60,57,1,65,35,19,35,58,27,38,82,96,96},new int[]{29,64,7,9,34,80,65,45,40,56,95,7,32,36,9,70,83,73,92,73,20,19,65,27,87,2,88,64,48,71,20,57,11},new int[]{85,39,35,38,44,69,64,28,47,77,38,4,84,50,54,72,62,33,31,60,68,37,80,62,74,96,81,17,64,11,91,85,64},new int[]{45,96,40,46,4,53,91,75,80,53,8,29,93,10,11,48,15,96,80,13,47,23,81,23,41,59,28,37,6,16,46,49,89},new int[]{1,59,53,1,36,70,18,90,6,18,15,1,74,7,57,87,54,92,8,41,47,60,60,18,77,5,79,47,83,23,9,42,55},new int[]{45,22,54,33,86,86,2,52,34,74,17,40,78,5,77,8,52,13,8,24,27,97,9,8,28,91,74,98,99,8,18,12,85},new int[]{43,68,81,7,74,86,13,75,46,95,62,39,98,22,51,53,46,62,25,90,54,5,26,45,31,84,95,63,11,27,2,43,7},new int[]{20,68,7,65,20,49,16,59,39,68,20,43,2,37,39,14,90,45,94,31,68,94,88,72,80,95,1,88,19,93,21,71,27},new int[]{41,67,5,99,99,88,90,4,31,54,22,28,1,27,2,46,94,37,21,43,21,4,44,74,72,49,39,58,91,76,39,70,43},new int[]{23,23,33,86,60,69,14,39,49,89,1,32,65,67,62,63,16,70,59,20,53,50,8,93,52,75,77,20,16,13,92,16,18},new int[]{97,3,56,96,41,64,6,95,92,95,30,15,1,13,55,68,88,8,99,55,81,9,87,46,93,83,54,51,32,52,62,54,41},new int[]{81,13,63,13,67,97,51,72,40,49,87,12,24,92,46,46,45,38,95,67,51,51,88,62,71,66,32,57,23,27,21,13,52},new int[]{6,91,35,9,74,55,71,71,28,63,89,65,95,45,26,47,64,27,88,10,42,45,14,27,32,93,95,64,14,88,53,30,41},new int[]{55,51,89,7,37,36,89,43,26,78,33,2,21,94,58,40,95,46,68,89,38,75,97,58,78,12,6,57,18,3,96,61,17},new int[]{56,24,53,35,66,26,30,60,27,57,82,78,84,84,94,31,48,59,33,27,54,33,20,67,46,19,71,91,70,29,26,17,66},new int[]{85,48,88,33,78,98,69,3,81,70,80,66,84,61,48,17,8,25,8,29,82,59,62,1,58,71,74,86,8,94,15,22,79},new int[]{43,32,57,81,97,19,68,26,21,12,12,44,10,81,42,92,44,58,10,11,2,5,33,1,86,46,85,40,13,16,44,70,42},new int[]{31,28,33,90,54,30,46,18,1,95,73,79,87,16,87,39,92,26,85,75,42,56,11,78,50,6,63,77,46,77,45,35,83}}); param0.add(new int[][]{new int[]{-82,-82,-76,-74,-72,-70,-70,-68,-66,-56,-56,-50,-48,-44,-42,-38,-36,-32,-26,-20,-20,-18,-8,6,8,12,12,14,18,20,24,24,30,32,36,38,40,44,50,56,60,62,66,70,76,78,90,98,98},new int[]{-92,-80,-76,-70,-58,-58,-50,-48,-38,-36,-34,-32,-30,-30,-24,-20,-20,-18,-10,-10,-8,-6,-6,-6,-4,2,10,14,24,26,30,34,36,44,52,54,64,76,78,82,86,86,86,86,86,88,88,92,94},new int[]{-98,-94,-86,-82,-80,-76,-74,-74,-72,-70,-70,-68,-66,-62,-50,-50,-48,-42,-34,-24,-22,-22,2,8,8,10,12,22,22,26,26,26,30,38,44,54,56,58,68,68,72,78,80,80,84,88,92,94,98},new int[]{-92,-88,-84,-84,-82,-78,-78,-66,-60,-48,-48,-46,-42,-40,-40,-38,-36,-34,-30,-30,-26,-26,-22,-22,-20,-14,-12,6,28,36,38,44,46,46,48,50,52,52,56,58,60,70,80,80,80,86,92,96,98},new int[]{-98,-94,-80,-76,-72,-70,-70,-70,-68,-64,-64,-62,-60,-56,-54,-52,-50,-48,-46,-42,-40,-30,-28,-28,-24,-22,-6,-4,0,2,10,12,18,18,32,36,58,60,68,70,72,74,80,84,86,88,88,94,98},new int[]{-96,-96,-86,-84,-84,-72,-72,-70,-70,-66,-64,-60,-58,-58,-46,-38,-38,-28,-22,-18,-14,16,18,20,20,24,24,26,32,32,34,40,42,42,44,44,46,56,58,60,62,64,66,68,68,68,74,78,86},new int[]{-98,-92,-70,-58,-54,-50,-50,-50,-46,-40,-40,-36,-34,-24,-22,-22,-18,-8,-6,-6,-2,2,2,10,16,16,20,22,24,26,28,28,30,32,38,40,42,48,56,56,58,60,66,66,72,84,90,94,96},new int[]{-98,-90,-82,-80,-78,-78,-70,-66,-60,-54,-48,-48,-38,-28,-18,-16,-14,-12,-12,-10,-8,-4,-4,-4,-2,0,2,6,6,12,16,18,20,24,36,46,52,54,60,62,66,66,70,70,82,82,86,86,88},new int[]{-98,-90,-88,-86,-78,-76,-76,-70,-66,-60,-56,-56,-56,-54,-52,-46,-40,-28,-26,-22,-20,-20,-18,-14,-12,-8,0,18,18,28,34,36,36,36,38,46,50,54,56,56,60,66,70,72,74,74,80,80,82},new int[]{-98,-92,-90,-86,-84,-82,-78,-70,-66,-60,-58,-44,-42,-34,-32,-30,-24,-20,-16,-8,-4,8,8,14,14,14,14,20,20,32,38,42,52,62,62,66,68,70,72,72,78,78,78,78,84,96,98,98,98},new int[]{-90,-88,-82,-82,-82,-80,-74,-68,-68,-64,-58,-56,-54,-50,-42,-36,-32,-28,-20,-20,-20,-18,-16,-14,-6,-6,-2,6,8,10,20,24,26,32,38,44,46,48,56,56,58,60,64,68,74,80,88,92,96},new int[]{-96,-94,-88,-72,-72,-72,-70,-70,-64,-52,-46,-46,-44,-38,-34,-34,-28,-26,-20,-16,-14,-10,-8,-2,-2,2,6,8,10,30,34,34,36,44,52,58,60,70,72,72,74,76,76,80,90,92,92,94,98},new int[]{-98,-98,-96,-96,-84,-82,-80,-76,-62,-52,-46,-44,-44,-40,-38,-38,-36,-30,-22,-8,-4,-2,0,2,4,8,12,20,22,26,26,30,34,46,46,52,54,56,58,60,62,66,72,74,78,80,90,92,96},new int[]{-94,-94,-92,-92,-80,-80,-74,-64,-56,-54,-52,-50,-50,-42,-42,-42,-40,-36,-36,-32,-24,-16,-14,-4,0,2,4,10,12,16,22,24,26,28,28,30,40,46,48,56,58,62,62,62,80,88,88,96,98},new int[]{-96,-94,-94,-92,-84,-82,-80,-74,-70,-58,-54,-52,-52,-48,-44,-34,-34,-30,-28,-24,-14,-12,-4,-2,2,2,4,10,12,14,24,28,38,40,46,58,62,68,72,72,74,76,82,84,84,84,84,90,98},new int[]{-98,-90,-84,-82,-76,-70,-66,-62,-60,-60,-58,-56,-54,-54,-50,-50,-46,-40,-40,-38,-32,-24,-22,-22,-20,-12,-12,-8,6,6,8,8,8,22,26,40,42,50,50,50,50,56,64,86,92,92,94,94,96},new int[]{-92,-78,-74,-68,-66,-62,-62,-62,-60,-60,-54,-40,-36,-34,-34,-32,-22,-22,-18,-14,-12,-10,-6,-4,-2,0,12,14,18,28,32,32,38,44,48,50,52,52,60,64,66,66,82,86,90,90,94,94,96},new int[]{-96,-94,-92,-90,-88,-86,-84,-76,-74,-72,-72,-68,-66,-66,-58,-52,-50,-46,-42,-34,-32,-32,-30,-14,-10,-6,-6,-2,-2,10,14,20,30,30,34,36,36,38,38,42,44,50,52,64,68,82,90,90,98},new int[]{-98,-88,-82,-80,-80,-78,-76,-72,-70,-66,-66,-58,-56,-52,-52,-50,-50,-44,-42,-42,-32,-32,-30,-26,-22,-20,-20,-2,0,10,12,18,20,24,24,26,36,38,42,56,66,74,76,78,78,84,86,96,98},new int[]{-94,-94,-94,-80,-76,-74,-68,-56,-52,-50,-44,-42,-38,-36,-34,-28,-26,-24,-16,-2,0,4,8,14,16,20,22,32,34,38,46,46,48,50,52,54,62,64,66,66,72,76,78,78,80,82,82,84,94},new int[]{-98,-98,-90,-86,-80,-78,-76,-74,-74,-72,-72,-60,-58,-54,-50,-46,-32,-24,-22,-18,-18,-14,-12,-12,-10,-8,8,14,24,30,36,46,48,50,58,58,62,66,66,74,74,74,78,78,80,84,86,90,92},new int[]{-98,-94,-82,-80,-72,-64,-60,-58,-48,-46,-46,-40,-32,-26,-24,-16,-14,-12,-10,-8,-6,-4,-4,2,4,4,12,12,14,26,34,36,40,46,48,54,66,66,66,66,66,72,78,80,80,80,94,96,98},new int[]{-96,-92,-86,-72,-70,-70,-68,-68,-66,-64,-62,-56,-50,-44,-32,-30,-28,-24,-12,-4,-4,-4,2,10,16,18,18,22,32,32,36,36,40,42,46,46,50,50,50,50,52,54,64,68,70,72,74,90,96},new int[]{-98,-98,-98,-90,-86,-82,-64,-60,-58,-54,-48,-36,-36,-32,-30,-28,-18,-16,-14,-6,-2,4,6,6,10,12,14,18,24,32,34,46,48,50,52,58,66,68,70,80,80,82,84,84,86,92,94,96,98},new int[]{-98,-96,-88,-86,-86,-86,-86,-86,-84,-78,-78,-74,-72,-72,-70,-70,-70,-66,-64,-56,-42,-40,-38,-36,-34,-32,-30,-28,-26,-20,-8,-6,0,2,2,14,24,30,34,36,44,50,52,60,66,68,74,78,86},new int[]{-96,-86,-72,-72,-70,-70,-68,-68,-64,-58,-58,-58,-54,-54,-52,-48,-46,-40,-38,-28,-14,-10,-6,-4,0,10,10,12,16,18,18,20,20,22,34,34,40,40,46,46,58,58,62,66,68,68,72,84,92},new int[]{-96,-90,-88,-88,-82,-82,-76,-74,-70,-68,-62,-56,-52,-48,-46,-38,-22,-22,-16,-12,-8,0,4,8,14,20,22,24,28,34,36,38,44,46,48,58,66,68,68,76,84,84,86,86,88,88,90,92,94},new int[]{-96,-96,-96,-94,-90,-88,-88,-84,-76,-72,-72,-58,-54,-52,-52,-50,-40,-38,-32,-12,-12,-6,-4,-2,0,2,2,10,12,22,28,28,30,34,42,42,54,56,58,64,70,70,74,74,84,86,88,88,90},new int[]{-94,-92,-84,-82,-82,-70,-66,-64,-60,-60,-58,-58,-54,-52,-52,-42,-36,-32,-30,-28,-26,-24,-22,-20,-16,-12,0,4,6,8,14,20,30,32,46,54,60,62,62,64,66,68,68,70,70,72,72,76,88},new int[]{-90,-90,-90,-88,-88,-86,-78,-68,-62,-62,-60,-54,-54,-48,-48,-36,-36,-32,-28,-28,-22,-20,-6,-2,4,6,8,10,14,24,28,28,28,34,34,36,44,52,54,54,66,70,70,72,78,80,84,88,88},new int[]{-98,-94,-94,-90,-84,-76,-72,-70,-68,-68,-60,-54,-54,-48,-46,-46,-44,-34,-28,-28,-26,-12,-8,-4,2,6,6,8,14,32,32,38,38,40,44,46,46,50,50,52,54,58,60,62,70,78,86,92,92},new int[]{-98,-94,-94,-92,-90,-86,-82,-76,-74,-74,-66,-66,-66,-60,-60,-60,-56,-54,-50,-38,-30,-28,-18,-16,-16,-2,0,6,14,16,16,18,28,30,30,32,34,40,46,52,52,54,60,70,82,84,88,90,94},new int[]{-96,-88,-84,-80,-78,-78,-78,-68,-62,-60,-52,-44,-36,-36,-36,-34,-32,-32,-30,-26,-22,-14,-10,-6,-4,-4,0,0,0,10,12,14,14,16,24,34,38,44,52,54,54,56,58,60,64,66,66,92,98},new int[]{-98,-88,-80,-80,-74,-72,-70,-68,-64,-62,-62,-62,-58,-56,-52,-50,-50,-46,-34,-30,-30,-26,-18,-12,4,10,14,22,24,30,32,38,42,42,46,56,56,58,68,72,80,82,86,90,90,92,96,98,98},new int[]{-96,-92,-92,-90,-90,-90,-88,-82,-82,-82,-80,-68,-64,-60,-50,-34,-30,-16,-10,-10,-8,-4,-4,-2,0,18,20,24,24,24,30,30,36,38,38,40,42,42,44,48,52,52,56,76,84,88,92,94,98},new int[]{-98,-90,-82,-80,-74,-74,-72,-72,-72,-72,-64,-60,-56,-56,-56,-52,-40,-38,-24,-20,-18,-18,-12,-10,-6,10,18,22,24,24,26,26,30,34,40,40,44,50,58,60,62,64,70,76,80,80,86,88,96},new int[]{-96,-94,-86,-82,-72,-68,-68,-64,-62,-56,-54,-50,-50,-48,-44,-26,-20,-16,-10,-8,-6,6,8,10,10,10,16,20,28,28,32,40,42,44,44,46,46,48,58,62,72,76,80,84,86,88,92,96,98},new int[]{-96,-94,-94,-94,-92,-92,-90,-84,-82,-78,-76,-74,-74,-62,-58,-58,-58,-42,-42,-22,-20,-14,-14,-12,-4,-2,4,4,4,8,16,20,24,26,32,40,42,46,52,54,56,56,60,60,62,62,82,90,96},new int[]{-98,-96,-96,-76,-70,-66,-54,-54,-52,-50,-46,-40,-36,-34,-32,-30,-28,-28,-26,-26,-22,-20,-18,-6,6,10,20,22,28,30,30,32,32,34,38,42,46,54,58,70,76,76,84,90,94,94,98,98,98},new int[]{-90,-86,-82,-72,-70,-70,-66,-62,-60,-58,-54,-54,-40,-36,-32,-30,-28,-26,-26,-24,-16,-14,-10,-8,-8,-8,-8,4,6,8,14,16,18,18,22,26,30,58,66,82,84,92,92,94,96,96,96,96,98},new int[]{-92,-86,-80,-74,-68,-66,-64,-64,-52,-44,-36,-34,-32,-30,-26,-22,-20,-18,-14,-12,-8,2,10,10,12,16,24,32,32,44,46,48,52,52,54,66,68,70,72,74,82,84,88,90,94,94,96,96,96},new int[]{-92,-90,-80,-78,-78,-78,-74,-66,-50,-50,-46,-46,-44,-44,-40,-38,-34,-32,-32,-30,-18,-18,-16,-14,-12,4,10,10,10,18,20,20,22,24,24,26,26,46,46,48,48,52,58,62,64,72,80,96,96},new int[]{-98,-96,-94,-92,-88,-86,-84,-82,-76,-76,-60,-58,-58,-58,-56,-50,-48,-38,-34,-30,-20,-16,-16,-10,-4,-2,10,12,18,26,32,34,48,48,52,64,64,68,70,74,76,78,80,90,92,92,92,94,96},new int[]{-96,-88,-88,-82,-76,-70,-62,-58,-56,-48,-48,-38,-36,-30,-18,-18,-16,-16,-14,-12,-6,4,8,10,10,12,14,24,28,28,34,38,44,50,58,60,62,66,66,72,74,76,76,78,78,84,86,88,96},new int[]{-98,-94,-94,-94,-90,-86,-78,-74,-68,-66,-62,-58,-56,-54,-52,-52,-48,-44,-44,-44,-30,-26,-26,-12,-4,2,4,4,6,6,12,12,14,16,16,22,22,30,30,34,36,42,50,50,64,70,80,88,98},new int[]{-98,-96,-96,-94,-88,-84,-58,-56,-52,-48,-44,-30,-26,-26,-20,-18,-16,-8,-8,-8,-6,-6,-4,-4,-2,0,6,12,12,14,24,34,42,46,48,56,60,62,62,72,72,80,84,88,88,90,90,94,96},new int[]{-98,-90,-82,-78,-70,-68,-64,-62,-56,-52,-50,-44,-44,-42,-36,-26,-24,-22,-12,-10,-6,-4,0,2,6,10,18,32,32,36,38,42,48,52,54,56,62,64,66,66,66,66,70,72,74,74,78,86,92},new int[]{-96,-90,-88,-78,-74,-72,-70,-68,-66,-60,-58,-56,-56,-50,-50,-44,-36,-26,-24,-18,-16,-16,-12,-6,2,6,8,10,10,18,18,22,24,26,42,46,64,64,66,72,74,74,76,88,94,94,96,98,98},new int[]{-94,-82,-78,-78,-76,-64,-64,-58,-58,-56,-56,-52,-44,-42,-38,-36,-22,-16,-14,-6,-2,4,4,8,8,12,14,14,14,16,16,22,30,34,38,42,44,58,62,66,66,68,76,78,80,80,84,90,98}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,1,0,1,1,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,0,0,0,0,1,0,0,0,0},new int[]{0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,0,0,0},new int[]{0,0,1,0,0,1,1,1,0,0,1,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,1,1,0,0,1,0,1,0,0,1,0,0,1,0,1,1,0},new int[]{0,1,0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,1,1,1,0,1,0,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,1,0},new int[]{0,1,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0,0,0,1,1,0,1,0,1,1,0,0,0,1,1,0,1,1,0,1,1,0,1,0,1,0,0},new int[]{0,0,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,0,0,0},new int[]{1,1,0,1,0,1,1,0,0,1,1,1,1,1,1,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,0,1,1,1,1,0,1,0,1,1,0,0},new int[]{0,1,1,1,1,0,1,1,1,1,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,0,1,1,0,0,0,0,1,0,1,1,1},new int[]{1,1,1,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,1,0,0,1,1,0,0,0,1},new int[]{0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,0,0,1},new int[]{0,0,1,0,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,0,1,1,1,1,0,0,0},new int[]{1,1,1,0,1,1,1,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0},new int[]{1,0,1,0,0,1,0,0,0,1,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1,0,1,0},new int[]{0,0,1,0,0,1,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,1,1,1,0,0,1,1,0,1,0,1,0,1},new int[]{1,1,0,1,1,0,1,0,0,0,0,0,1,0,1,1,1,0,0,1,0,1,1,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,1,1,0,0,1,1},new int[]{0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1},new int[]{1,1,1,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,1,0,1,1,1,0,1,1,0,1,0},new int[]{1,1,1,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1},new int[]{0,1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,0,0},new int[]{1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,0,0,1,1,1,1,1,0},new int[]{1,1,1,1,1,0,0,1,1,1,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,0,1,0,0,1,0,1,0,0,0,1,0},new int[]{1,1,0,0,1,0,0,1,1,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0},new int[]{1,0,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,1,0,1,1,1,1,0,0,0,0,0,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1},new int[]{1,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,1,0},new int[]{1,1,1,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,1,0,1,1,0},new int[]{0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,1,0},new int[]{0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,1,1,0,1,1,0},new int[]{1,1,0,0,1,0,0,1,1,0,1,1,0,1,1,0,0,0,1,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,1,1,1,1,0,1,1,0},new int[]{1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,1},new int[]{1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,1,1,1,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0},new int[]{1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,0,0,1,1,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,1,1,0,1,1,1},new int[]{0,1,1,0,1,0,1,0,0,0,1,0,0,1,1,0,1,1,1,1,0,0,1,1,1,1,1,0,0,0,1,0,0,0,0,1,1,0,1,0,1,0,0,0,0,0},new int[]{0,1,0,0,0,1,0,0,1,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,0,0,1,1,1,0,0,1,0,0,1},new int[]{1,1,0,0,0,0,0,0,1,0,1,1,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0,0,1,0,0,0,1,1},new int[]{0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,1,1,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,0,1,1,0,1,0,0,1,1,0,0,1,1,0},new int[]{0,0,0,0,0,1,0,1,1,1,1,0,1,1,0,0,0,0,0,0,1,1,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,0,0,1,1,0,0,1,0},new int[]{0,1,1,1,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1,1,0,0,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,1,0,1,1,1,1},new int[]{1,0,1,0,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,1,0,0,1,1,0,1,1,1,0,0,0,1,0,1},new int[]{1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,1},new int[]{0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0},new int[]{1,1,0,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,0,1,0,0,0,0,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0},new int[]{0,0,1,0,1,0,1,1,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1,0,1,1},new int[]{0,0,0,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,1,0,1},new int[]{0,1,1,1,0,0,1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,0,0,1},new int[]{0,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,1},new int[]{0,0,1,1,1,1,0,1,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,0,1,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,0,0,1}}); param0.add(new int[][]{new int[]{13,16,26,38,44,71,73},new int[]{16,28,39,47,48,59,61},new int[]{15,30,50,59,60,89,90},new int[]{24,61,63,71,72,76,83},new int[]{14,36,39,42,64,76,77},new int[]{4,6,11,24,34,36,58},new int[]{22,35,63,70,81,91,98}}); param0.add(new int[][]{new int[]{-48,-22,-52,-86,-22},new int[]{-54,-6,-16,-84,-34},new int[]{-46,-16,-80,-82,-38},new int[]{-44,98,-54,-32,-88},new int[]{42,52,38,-20,-36}}); param0.add(new int[][]{new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1}}); param0.add(new int[][]{new int[]{62,15,2,68,63,42,57,46,37,30,1,51,47,75,50,24,48,56,93,9,50,79,58,74,81,64,63,60,49,24,46,55,89,10,49,46,17,86,24,51,69,21,16,97,66,14},new int[]{95,91,93,6,64,52,1,29,77,42,16,76,40,30,32,7,36,72,1,94,12,25,11,75,52,95,64,4,54,78,40,67,81,92,5,42,65,94,59,12,35,75,82,83,72,47},new int[]{69,96,79,34,12,8,27,58,49,56,43,17,26,87,1,19,99,48,80,25,56,40,42,63,92,27,76,55,15,2,30,81,79,4,15,52,21,94,80,27,93,33,44,20,45,34},new int[]{18,47,49,73,19,87,86,72,52,21,36,27,96,2,87,35,22,20,97,92,69,13,15,95,80,58,84,66,56,12,57,36,90,25,14,43,43,80,2,53,42,65,52,42,5,48},new int[]{85,40,51,5,9,71,80,70,2,18,87,36,78,90,57,60,27,92,15,64,47,22,99,53,87,28,97,94,28,83,64,10,10,34,30,90,17,87,31,7,29,68,29,69,47,35},new int[]{15,32,84,9,45,6,37,97,12,69,91,45,39,58,49,85,76,2,48,71,81,88,16,71,49,32,68,5,23,65,93,47,88,59,43,43,36,59,52,77,1,25,36,86,26,42},new int[]{39,15,66,15,13,29,80,10,75,3,21,65,41,19,76,82,64,55,63,46,24,94,40,75,24,20,2,86,90,24,53,70,65,90,45,70,96,98,68,60,12,31,27,57,63,17},new int[]{79,58,4,37,50,72,71,69,45,86,47,25,98,59,63,16,13,97,66,2,8,13,4,54,96,1,80,3,35,15,62,20,74,58,80,65,85,37,74,6,93,29,10,19,80,61},new int[]{53,59,23,20,92,20,65,17,71,81,41,50,37,86,75,62,21,49,59,34,56,94,41,71,70,94,44,6,25,19,37,3,13,39,86,98,19,30,52,26,35,25,65,74,9,69},new int[]{15,92,20,89,35,8,50,32,17,2,21,64,76,26,9,49,25,63,17,51,58,1,97,3,28,80,11,89,23,86,9,27,5,52,31,62,77,63,86,41,59,19,28,78,6,63},new int[]{76,97,67,74,17,13,95,60,16,63,87,95,84,66,82,69,80,44,54,32,29,37,47,62,78,79,45,10,63,11,20,53,95,72,40,75,89,81,1,37,56,15,85,93,84,9},new int[]{72,60,72,79,28,8,48,76,89,84,89,46,42,83,65,90,71,93,64,50,55,88,66,29,6,6,47,99,61,98,24,57,4,83,56,56,46,21,46,33,78,85,15,28,80,33},new int[]{49,8,68,50,35,16,35,44,22,80,94,48,98,13,43,79,28,68,15,99,5,27,62,63,85,66,55,31,44,48,73,58,71,50,94,22,19,79,76,13,97,27,91,19,47,12},new int[]{52,75,69,55,13,16,39,7,82,28,77,88,84,98,47,21,21,43,40,92,82,92,33,94,3,21,42,47,89,40,59,78,13,97,62,96,74,69,95,73,90,11,67,10,48,47},new int[]{37,21,84,6,27,11,42,18,62,58,81,7,9,71,77,38,69,12,16,61,2,44,81,71,2,99,22,38,30,51,39,11,62,73,95,74,13,87,33,17,23,8,90,45,36,73},new int[]{80,14,37,80,75,12,38,69,25,91,72,14,3,36,97,93,61,20,22,9,56,89,37,99,9,50,59,95,67,25,48,36,91,66,48,61,71,13,50,54,51,29,58,48,14,19},new int[]{64,64,97,27,3,7,54,36,57,24,82,5,83,49,78,87,87,93,70,62,68,26,40,84,82,76,98,27,41,71,23,56,3,46,85,39,62,92,73,74,16,79,40,24,91,63},new int[]{88,29,39,88,15,76,44,40,66,67,26,9,61,5,24,71,8,56,35,89,71,12,72,54,26,84,57,58,46,73,92,24,20,59,70,86,84,15,98,51,29,15,74,7,19,64},new int[]{14,46,80,84,53,57,50,32,23,48,35,83,89,10,67,51,96,63,84,18,6,41,48,79,66,17,17,45,51,7,65,79,29,34,92,17,45,36,2,36,66,30,65,4,55,61},new int[]{23,37,69,52,89,17,78,39,81,83,94,61,33,11,46,34,27,35,55,1,22,99,91,24,56,28,70,88,23,48,77,57,57,72,69,79,95,58,37,68,17,66,11,82,97,20},new int[]{24,46,12,76,76,15,6,97,22,95,83,52,69,59,17,24,54,85,60,41,2,84,71,76,71,27,36,54,79,32,66,65,27,15,39,30,38,58,6,66,73,31,73,74,64,51},new int[]{71,37,75,62,93,88,55,77,22,54,67,34,50,89,66,77,17,54,1,53,83,3,74,37,41,38,48,39,25,46,72,61,70,77,7,58,5,77,60,64,95,22,81,95,53,14},new int[]{52,25,79,20,16,26,40,49,23,82,56,61,40,89,99,58,90,17,22,20,1,14,5,99,34,63,71,7,51,56,8,3,8,39,45,90,97,24,45,77,51,57,41,59,47,15},new int[]{98,5,15,87,54,20,2,88,73,98,90,4,79,94,74,26,3,91,65,28,25,93,61,63,3,97,15,40,1,79,88,71,15,55,94,93,38,56,10,41,68,28,85,74,71,19},new int[]{10,27,56,25,36,22,54,74,28,72,53,19,66,49,49,56,94,55,24,82,54,66,1,7,37,45,49,85,34,51,91,74,64,28,87,81,39,42,93,60,43,10,85,12,7,62},new int[]{73,51,16,10,70,67,50,75,37,60,45,31,57,94,44,51,23,74,16,79,78,57,63,90,28,24,63,5,61,2,20,86,57,46,42,5,34,72,35,68,37,6,19,15,48,93},new int[]{70,43,61,32,77,46,11,98,66,70,44,73,51,53,55,69,54,3,65,25,75,37,47,44,78,78,3,98,73,71,34,54,80,69,20,35,1,27,42,18,93,96,60,9,80,57},new int[]{2,31,55,74,66,86,59,31,40,18,55,86,79,74,45,19,83,26,24,28,15,34,34,28,66,68,94,87,19,66,67,48,38,39,67,75,23,28,23,10,65,75,50,23,85,55},new int[]{91,22,56,89,33,23,8,81,56,97,2,88,94,38,61,8,56,85,68,31,99,30,75,61,23,68,10,95,53,57,55,42,48,97,23,40,61,99,30,54,18,66,83,58,6,35},new int[]{46,84,95,99,63,16,14,13,55,83,6,77,77,40,1,85,53,14,66,46,99,67,42,55,11,27,40,38,81,54,80,3,52,77,5,22,75,50,95,54,88,27,1,85,6,60},new int[]{38,32,53,70,13,71,48,20,37,38,25,23,58,93,34,66,47,71,50,64,11,60,45,49,57,25,42,75,78,97,58,31,83,60,53,72,45,71,22,43,79,1,81,8,62,39},new int[]{53,8,61,2,80,52,70,9,47,23,87,99,41,89,23,54,5,50,50,96,51,30,41,93,90,77,30,4,63,52,89,30,72,96,75,55,74,12,67,62,3,38,53,62,80,80},new int[]{88,65,51,42,27,28,91,20,8,18,46,12,36,12,41,29,31,18,27,84,84,83,96,70,2,3,40,53,1,39,16,29,8,23,38,71,89,87,92,83,83,57,3,64,62,51},new int[]{76,38,28,18,53,19,90,48,7,74,89,6,10,5,29,51,59,32,33,66,4,90,39,9,90,77,35,48,29,58,35,14,72,89,17,75,45,8,54,58,40,65,6,90,26,47},new int[]{93,31,76,38,69,20,19,44,28,53,95,64,50,11,27,64,77,18,24,1,46,8,77,72,48,14,87,28,54,9,63,68,67,59,37,20,17,74,6,30,49,65,50,80,75,77},new int[]{76,40,73,71,21,7,8,38,60,4,40,32,18,36,82,31,29,74,73,19,51,98,46,74,98,53,24,66,7,14,71,95,4,86,60,14,80,28,34,18,49,68,76,55,72,35},new int[]{66,6,48,50,62,34,10,41,14,93,60,58,8,51,31,89,42,67,29,75,90,98,58,4,87,82,29,27,38,13,70,4,40,30,81,29,57,61,90,10,82,36,9,32,45,87},new int[]{76,45,58,23,90,81,1,48,12,36,90,35,36,83,19,6,17,6,90,88,26,12,53,49,23,13,52,17,30,92,22,83,64,1,82,71,67,30,54,67,64,93,93,8,45,71},new int[]{65,37,45,41,91,59,22,56,29,22,12,44,56,7,73,87,77,98,9,38,37,62,86,66,53,64,73,86,8,20,8,3,46,51,11,53,50,57,26,93,80,41,34,70,82,82},new int[]{77,1,52,73,66,59,96,50,60,63,38,44,26,95,62,99,37,34,8,44,31,10,82,75,82,92,54,61,3,52,55,7,48,22,43,71,50,96,27,56,44,66,48,25,27,22},new int[]{5,86,67,70,46,7,43,52,7,19,85,27,99,55,1,48,16,41,2,47,59,51,21,19,80,80,8,41,51,75,74,49,54,48,73,15,69,24,96,19,97,23,28,90,60,50},new int[]{76,65,97,12,56,95,81,27,85,46,42,56,77,90,55,6,91,41,81,93,62,83,56,21,31,28,10,28,47,92,29,85,9,30,94,62,88,86,52,16,30,50,47,1,51,11},new int[]{83,14,96,9,59,84,27,94,5,20,93,58,99,71,9,5,78,38,97,97,42,88,50,51,28,64,62,32,22,50,18,57,12,61,86,72,35,53,64,42,90,32,46,84,82,65},new int[]{28,99,16,15,46,15,57,32,82,90,2,29,28,8,41,33,74,61,87,64,7,51,79,30,70,33,88,9,24,7,61,22,5,12,37,19,91,38,55,23,54,62,82,8,44,73},new int[]{30,77,76,3,41,88,95,36,78,76,33,86,54,38,92,36,65,99,67,8,72,33,71,88,8,63,43,89,57,6,20,74,52,50,61,66,52,3,3,60,28,6,90,51,60,15},new int[]{32,86,94,46,87,40,20,75,67,86,63,63,48,42,81,69,30,11,45,18,58,68,58,79,95,51,81,1,88,58,49,75,89,60,52,24,80,70,47,17,45,94,69,17,11,97}}); List param1 = new ArrayList<>(); param1.add(new int[]{31,50,50,68,69,80,87}); param1.add(new int[]{-74,-50,-90,-52,96,78,-16,14,-14,66,-50,74,-34,-88,84,80,34,18,-38,62,56,-48,-22,94,94,94,92,-46,-32,10,-48,46,20,80,32,30,88,60}); param1.add(new int[]{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}); param1.add(new int[]{23,36,42,49,50,88,97,51,1,27,4,72,11,61,24,49,75,29,96,16,11,65,13,22,13,23,84,23,20,63,35,76,22}); param1.add(new int[]{-96,-90,-90,-86,-86,-86,-84,-76,-76,-74,-72,-70,-52,-50,-34,-32,-26,-20,-16,-14,-10,-8,-8,-6,4,12,14,16,18,24,26,32,34,38,42,42,48,48,48,48,64,66,70,76,76,82,86,86,96}); param1.add(new int[]{0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,0,1,1,0,1,1,0,0,0}); param1.add(new int[]{3,9,32,55,78,85,90}); param1.add(new int[]{48,-68,0,-54,-80}); param1.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1}); param1.add(new int[]{19,39,31,50,61,70,43,64,45,82,49,80,21,37,96,30,42,82,96,30,22,26,42,88,57,12,59,58,83,64,66,2,37,60,5,76,20,81,10,57,70,74,65,72,15,84}); List param2 = new ArrayList<>(); param2.add(6); param2.add(25); param2.add(28); param2.add(25); param2.add(37); param2.add(43); param2.add(5); param2.add(4); param2.add(7); param2.add(34); List param3 = new ArrayList<>(); param3.add(5); param3.add(20); param3.add(28); param3.add(30); param3.add(38); param3.add(32); param3.add(3); param3.add(4); param3.add(10); param3.add(25); List param4 = new ArrayList<>(); param4.add(4); param4.add(25); param4.add(32); param4.add(19); param4.add(26); param4.add(35); param4.add(3); param4.add(3); param4.add(9); param4.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( dp , a , low , high , turn ) : if ( low == high ) : return a [ low ] * turn if ( dp [ low ] [ high ] != 0 ) : return dp [ low ] [ high ] dp [ low ] [ high ] = max ( a [ low ] * turn + f_gold ( dp , a , low + 1 , high , turn + 1 ) , a [ high ] * turn + f_gold ( dp , a , low , high - 1 , turn + 1 ) ) ; return dp [ low ] [ high ] ",,," if __name__ == '__main__': param = [ ([[23, 37, 54, 57, 59, 75, 97], [9, 15, 34, 39, 80, 96, 99], [15, 25, 26, 31, 43, 47, 93], [22, 31, 37, 44, 54, 62, 91], [7, 19, 32, 56, 57, 70, 81], [16, 37, 49, 77, 81, 82, 85], [44, 48, 64, 74, 79, 89, 99]],[31, 50, 50, 68, 69, 80, 87],6,5,4,), ([[-24, -34, -86, -16, -34, 14, 76, 4, 18, 60, -4, -24, 46, -26, -74, 6, 50, -34, 8, -30, -62, 56, -78, -50, 76, -98, -64, -72, -76, 46, -70, 4, -92, -18, 10, -76, 78, -26], [-34, -30, -96, -4, 76, 48, -10, 96, -88, 96, 90, 40, -24, 68, -42, -48, -30, -32, -44, -50, -98, 34, -78, -52, -88, -38, 54, -64, -94, -48, -80, -2, -90, -14, -8, 90, -78, -36], [30, -80, -58, 48, -80, -78, 40, -48, -40, -84, 2, 44, 72, 6, 78, -84, -30, -70, 32, 86, 16, 68, 40, -36, 80, -46, 66, -92, 8, 72, -56, 58, -72, 44, 40, 6, 66, -66], [16, -72, -66, -30, 66, -94, 36, -34, -78, 14, -74, -54, 48, 6, -40, -40, -24, -6, 18, -20, -88, -8, 82, -56, -96, -32, 30, -22, 70, -4, 98, -40, -72, 66, -54, -60, 52, 66], [-28, -52, 90, -52, 12, 98, 42, -52, 38, -60, -28, 94, 86, -22, -62, 68, 12, 92, -82, 18, -2, 82, -28, 72, -78, -70, 40, -54, -24, -68, -74, -40, -32, 14, 88, 94, -46, -14], [-38, -30, 62, -52, 54, 56, 12, 32, -78, 24, 38, -82, 6, -64, -96, -56, -30, 62, -94, -26, -64, -38, 96, 72, 54, -56, 56, 82, 6, -30, 94, 80, -68, 18, 84, 58, -48, -34], [82, -44, 14, -26, -14, -92, 62, -48, -52, 26, -30, -76, -26, 28, 54, -16, -60, 16, -76, -90, 20, -8, 56, -86, 66, -84, 92, -52, 90, 30, 38, -2, 90, -50, 88, 44, -66, -80], [-22, 68, 62, -84, -76, -12, 82, 70, -58, 86, 20, -66, 96, -28, 6, 60, -90, 52, -28, 8, 34, 90, 38, 24, 76, -22, 6, 16, -46, -4, 84, -6, 6, 30, 50, 26, 8, -8], [34, -62, -26, 18, -14, 42, -50, 72, 16, -62, -76, 32, -20, 82, 8, 74, 60, -60, -16, -50, -38, -88, 68, -26, 66, -14, 64, 42, 98, 40, -56, 28, -96, 36, -82, -74, 38, -26], [-66, -58, -84, 16, -42, 4, -38, -6, -32, -98, 20, -96, 60, -38, 24, -8, -74, 52, 98, 52, -10, -24, -22, 78, -20, 58, -24, -98, -76, 0, -94, 6, 28, 42, 20, -36, 68, -68], [-20, 70, -80, 68, -26, -26, -22, 88, 86, 12, -98, -80, 2, -22, -2, 2, -52, -50, 30, 12, 74, 34, -14, -54, 70, 16, -76, -56, 16, -50, -14, -4, 30, 48, -14, 84, -34, 30], [68, 68, -86, 66, -64, 60, -28, 52, 14, -40, -98, 22, -30, 28, -48, -76, 66, 94, -28, 32, 88, 86, -76, -4, 68, -56, 76, -4, 36, 16, -4, 8, -44, -84, 74, 74, 96, -22], [-14, -88, -52, -72, -60, -50, 32, 86, 14, -26, 36, -84, 38, 80, -86, -64, 14, -96, 86, -52, -48, -16, -78, -66, -10, -24, 70, 22, 90, 46, -74, 36, -74, 2, 96, 6, 4, 34], [-34, 72, -40, 34, -30, 18, 54, -50, 0, 94, -62, 80, 4, 84, 10, 98, 56, -36, -94, 88, 10, -30, 90, -52, 14, -46, 30, 82, -66, 8, -98, 86, -90, 46, -44, -92, 22, 58], [70, -44, -28, -78, -62, -78, -96, -6, -92, -86, -82, 72, -50, 26, -4, 82, -42, 58, 28, -88, 98, -98, -14, 72, -24, 58, 72, -72, 6, -78, 34, -34, 58, -62, 78, -98, 0, 50], [84, 48, -82, -32, -22, 16, -34, -28, -76, 40, 26, 30, 70, 28, -64, -90, 70, -90, 82, 60, 10, -52, 0, 50, -38, -32, -18, 2, 48, 20, -96, 4, 62, -28, 28, -12, 50, -90], [64, 58, -34, 10, -44, -72, 62, 70, 60, 84, -12, -46, -82, -12, 80, 46, 44, -58, -18, 10, 44, 50, -60, -20, 82, -10, 18, -4, 48, 22, -14, 12, -76, -32, 8, -60, -54, -6], [22, -58, 58, -24, -58, -64, 62, -38, -36, 44, -82, 46, -78, 54, 96, 24, 84, 90, -2, -98, -74, 8, 44, -94, 84, 48, -2, 66, -44, 52, -42, -36, 34, -98, -6, 54, 26, 18], [-28, 30, -66, -14, -20, -44, -62, -20, 90, -92, -38, 64, 44, -60, 90, -60, -82, 36, -46, 52, -60, 26, 12, 80, -64, 92, -22, -68, -10, 54, -96, 44, 70, 10, 4, -4, -94, 66], [-70, 54, -32, 92, -26, -66, 28, -98, -14, -20, 40, -36, -6, -60, -36, -32, 26, 90, 34, -34, 82, 48, -82, -8, -86, -74, -58, -68, -68, -16, -26, -88, -6, -76, -12, -68, -98, -94], [14, -84, 90, 88, 80, -28, -46, 4, -4, 36, -56, -44, 68, 24, 24, 70, 36, -4, 58, -78, 14, -48, -46, 58, -44, -66, 72, -36, 84, 70, -26, 72, 76, 30, -30, 92, 4, -40], [-24, -28, 0, -44, -48, 74, 76, 50, -88, 36, -24, 62, -34, 82, -20, 38, -76, 16, -70, 92, -82, 56, 72, 78, 40, 52, -52, -38, 36, -44, 92, 46, -60, -54, 58, 96, 74, -18], [70, -30, -62, -74, -88, -92, 72, -42, 34, 76, -4, -94, 22, -82, 56, 2, 44, -64, -88, -20, 96, 0, -12, -20, -40, -56, -8, 18, -8, 18, 98, 28, 50, -14, 72, 50, 4, 38], [72, -66, 16, -44, 94, 10, 60, 96, 24, 12, 92, 30, 2, 64, 4, 58, 74, -24, -96, -52, 72, 10, -2, -18, -74, -2, 70, -6, -60, 72, -32, 34, -78, -10, -2, -30, 54, 42], [80, 92, 18, 54, -42, 50, -62, 76, 94, 38, 84, 78, 44, 98, 78, -54, -36, -80, 62, 14, 24, 86, 52, 4, 78, 96, 20, 58, -64, -42, 20, -98, -90, 6, 30, 56, -66, -34], [-86, 60, -62, -32, -12, 92, -54, -2, 8, 58, 68, 42, -46, -8, 82, -28, -96, 62, 46, -12, 0, 88, 82, -26, -42, 36, 46, -46, 54, -58, -58, -62, 32, -48, -60, 86, 4, 56], [88, -36, 4, 60, 24, 6, 72, 58, 44, 14, -40, -64, 36, -92, 36, -56, -78, 86, 80, 80, -94, 64, -4, -2, 86, 26, -98, -56, 62, -56, -18, 40, 12, 26, 50, 72, -16, -58], [-88, 4, -66, 64, 42, 94, 54, -38, 8, -18, -8, 88, 46, 42, 64, -88, 94, 58, -50, 26, 38, 92, -66, 82, 8, 38, -92, -32, 50, -44, -88, -6, 34, 12, 66, 54, -52, -86], [20, -90, 2, -94, -76, -28, -76, 44, -12, -56, 50, 4, 34, -88, 46, 2, 60, 52, 22, 98, -84, 6, -26, -90, -4, 48, -66, -42, 58, -22, 30, -22, -82, -50, 42, 84, 94, 4], [-56, 4, -4, 54, 64, 82, 88, 8, 50, 66, -2, 80, -4, 12, 24, -56, -52, 80, 66, 82, -66, -92, -42, -56, 66, -92, -60, -92, -52, -54, 32, 22, -42, -46, -66, 60, 10, -62], [-44, 0, 6, -54, -98, 72, -98, -28, -4, -86, -10, -76, -64, -66, 58, 60, 24, 90, -6, -54, -22, 84, -34, 64, 36, 18, 14, -32, -88, -32, 84, -8, 60, 98, 28, -6, 14, -88], [-94, -92, 74, 96, 28, 34, 56, 74, -62, -46, -8, 10, -96, -72, 50, -98, -28, 72, 2, 46, 68, 14, -72, -78, -76, 68, 52, -30, -32, 90, 40, 50, 50, 20, 98, 2, 72, 44], [-6, 94, 16, -70, -74, -46, 22, 24, 44, -40, 52, -50, 94, -66, 84, -66, 14, -12, 48, -6, 64, -12, -44, -14, 2, -48, -22, 52, -28, -18, 8, 72, -28, 68, 44, -28, -20, 62], [12, -94, -86, -52, -92, -76, -78, 10, -8, 30, 34, 26, -80, -8, 68, 92, 66, 16, -48, 70, 30, -56, -80, -78, 58, 94, -56, -12, 56, -94, -60, -70, 0, -94, 6, 36, 48, -98], [74, 72, 20, -84, 96, -84, 40, -36, -88, -14, 60, -70, 36, -28, -18, -82, -36, 92, -86, 44, -16, -66, 28, -88, -18, -52, 66, -26, -90, -12, -16, 80, -28, 82, -92, 82, -76, -80], [40, -38, -48, 72, -30, 70, -14, 14, 90, 42, -6, 52, -94, 44, -32, -8, -74, 80, -18, -10, 74, -80, 86, -82, -2, 10, -12, 58, -70, -18, 86, 40, 62, 76, 88, 68, 68, 4], [86, 4, 16, 86, -66, 72, -38, -40, -52, 14, -60, -88, -44, -60, -64, 84, -50, -78, -44, -18, 78, 74, -66, -64, 18, 26, 74, 98, -18, -96, -82, 4, -74, -40, -50, -46, -4, 94], [-70, -64, -10, -22, -88, -48, 84, 78, 16, 64, 78, -48, 66, -88, 44, 60, -10, -48, 60, -40, 86, -40, 32, 16, 28, -30, 32, -74, 10, -34, 38, -36, -30, 2, 14, -92, -48, 88]],[-74, -50, -90, -52, 96, 78, -16, 14, -14, 66, -50, 74, -34, -88, 84, 80, 34, 18, -38, 62, 56, -48, -22, 94, 94, 94, 92, -46, -32, 10, -48, 46, 20, 80, 32, 30, 88, 60],25,20,25,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,28,32,), ([[84, 65, 61, 9, 50, 58, 19, 98, 63, 92, 42, 82, 5, 55, 81, 77, 1, 92, 74, 40, 13, 59, 48, 51, 18, 42, 34, 78, 41, 82, 13, 6, 92], [31, 76, 5, 83, 74, 92, 29, 9, 40, 28, 36, 36, 4, 73, 32, 6, 79, 8, 45, 89, 60, 34, 82, 27, 68, 24, 68, 47, 27, 42, 3, 61, 19], [56, 19, 38, 73, 69, 25, 38, 90, 20, 50, 27, 8, 1, 84, 9, 44, 54, 64, 8, 74, 19, 52, 40, 9, 75, 66, 58, 8, 40, 46, 55, 54, 75], [12, 13, 58, 11, 23, 52, 60, 91, 95, 86, 63, 25, 62, 93, 35, 36, 60, 87, 94, 46, 3, 85, 35, 77, 28, 22, 33, 7, 92, 76, 33, 53, 30], [2, 4, 55, 27, 47, 76, 45, 70, 34, 36, 5, 2, 50, 24, 32, 85, 81, 34, 5, 35, 56, 72, 21, 39, 58, 90, 49, 75, 74, 49, 76, 22, 30], [35, 66, 31, 4, 44, 70, 53, 57, 36, 36, 54, 26, 96, 4, 22, 34, 1, 87, 57, 51, 16, 36, 47, 91, 39, 5, 25, 45, 61, 5, 37, 51, 88], [45, 98, 42, 35, 56, 86, 16, 75, 9, 32, 14, 92, 40, 25, 24, 29, 5, 1, 75, 13, 3, 8, 71, 79, 96, 33, 22, 13, 30, 20, 41, 84, 59], [74, 33, 15, 13, 27, 6, 87, 95, 74, 82, 7, 52, 29, 66, 44, 89, 74, 21, 57, 22, 32, 13, 14, 42, 12, 99, 55, 9, 16, 94, 37, 72, 29], [64, 47, 16, 76, 77, 39, 94, 53, 65, 65, 80, 12, 25, 14, 6, 77, 66, 12, 37, 63, 78, 17, 32, 16, 22, 7, 40, 25, 8, 27, 32, 55, 39], [27, 52, 60, 70, 10, 52, 14, 60, 35, 31, 27, 50, 74, 87, 32, 28, 55, 98, 68, 9, 72, 48, 53, 39, 29, 64, 84, 64, 47, 7, 69, 22, 72], [89, 58, 93, 44, 1, 12, 98, 64, 65, 97, 36, 4, 84, 47, 49, 77, 81, 11, 30, 3, 69, 73, 30, 68, 73, 10, 96, 40, 71, 57, 3, 81, 46], [39, 71, 95, 88, 22, 67, 25, 57, 53, 22, 98, 68, 19, 28, 10, 26, 79, 13, 50, 2, 10, 54, 44, 88, 69, 97, 75, 31, 18, 77, 17, 22, 53], [85, 17, 87, 79, 24, 25, 49, 13, 15, 16, 36, 98, 41, 78, 77, 89, 31, 91, 20, 85, 51, 29, 55, 94, 69, 16, 85, 91, 83, 9, 66, 96, 16], [67, 72, 45, 87, 18, 95, 50, 29, 69, 80, 43, 78, 53, 37, 71, 67, 41, 16, 66, 77, 69, 74, 50, 11, 37, 80, 5, 60, 5, 56, 85, 9, 92], [92, 36, 57, 21, 48, 29, 77, 51, 52, 74, 68, 1, 18, 60, 70, 47, 98, 75, 81, 17, 12, 74, 1, 52, 50, 21, 30, 24, 17, 56, 29, 65, 18], [63, 47, 21, 28, 54, 39, 53, 42, 30, 59, 74, 9, 14, 66, 94, 45, 27, 44, 43, 98, 60, 57, 1, 65, 35, 19, 35, 58, 27, 38, 82, 96, 96], [29, 64, 7, 9, 34, 80, 65, 45, 40, 56, 95, 7, 32, 36, 9, 70, 83, 73, 92, 73, 20, 19, 65, 27, 87, 2, 88, 64, 48, 71, 20, 57, 11], [85, 39, 35, 38, 44, 69, 64, 28, 47, 77, 38, 4, 84, 50, 54, 72, 62, 33, 31, 60, 68, 37, 80, 62, 74, 96, 81, 17, 64, 11, 91, 85, 64], [45, 96, 40, 46, 4, 53, 91, 75, 80, 53, 8, 29, 93, 10, 11, 48, 15, 96, 80, 13, 47, 23, 81, 23, 41, 59, 28, 37, 6, 16, 46, 49, 89], [1, 59, 53, 1, 36, 70, 18, 90, 6, 18, 15, 1, 74, 7, 57, 87, 54, 92, 8, 41, 47, 60, 60, 18, 77, 5, 79, 47, 83, 23, 9, 42, 55], [45, 22, 54, 33, 86, 86, 2, 52, 34, 74, 17, 40, 78, 5, 77, 8, 52, 13, 8, 24, 27, 97, 9, 8, 28, 91, 74, 98, 99, 8, 18, 12, 85], [43, 68, 81, 7, 74, 86, 13, 75, 46, 95, 62, 39, 98, 22, 51, 53, 46, 62, 25, 90, 54, 5, 26, 45, 31, 84, 95, 63, 11, 27, 2, 43, 7], [20, 68, 7, 65, 20, 49, 16, 59, 39, 68, 20, 43, 2, 37, 39, 14, 90, 45, 94, 31, 68, 94, 88, 72, 80, 95, 1, 88, 19, 93, 21, 71, 27], [41, 67, 5, 99, 99, 88, 90, 4, 31, 54, 22, 28, 1, 27, 2, 46, 94, 37, 21, 43, 21, 4, 44, 74, 72, 49, 39, 58, 91, 76, 39, 70, 43], [23, 23, 33, 86, 60, 69, 14, 39, 49, 89, 1, 32, 65, 67, 62, 63, 16, 70, 59, 20, 53, 50, 8, 93, 52, 75, 77, 20, 16, 13, 92, 16, 18], [97, 3, 56, 96, 41, 64, 6, 95, 92, 95, 30, 15, 1, 13, 55, 68, 88, 8, 99, 55, 81, 9, 87, 46, 93, 83, 54, 51, 32, 52, 62, 54, 41], [81, 13, 63, 13, 67, 97, 51, 72, 40, 49, 87, 12, 24, 92, 46, 46, 45, 38, 95, 67, 51, 51, 88, 62, 71, 66, 32, 57, 23, 27, 21, 13, 52], [6, 91, 35, 9, 74, 55, 71, 71, 28, 63, 89, 65, 95, 45, 26, 47, 64, 27, 88, 10, 42, 45, 14, 27, 32, 93, 95, 64, 14, 88, 53, 30, 41], [55, 51, 89, 7, 37, 36, 89, 43, 26, 78, 33, 2, 21, 94, 58, 40, 95, 46, 68, 89, 38, 75, 97, 58, 78, 12, 6, 57, 18, 3, 96, 61, 17], [56, 24, 53, 35, 66, 26, 30, 60, 27, 57, 82, 78, 84, 84, 94, 31, 48, 59, 33, 27, 54, 33, 20, 67, 46, 19, 71, 91, 70, 29, 26, 17, 66], [85, 48, 88, 33, 78, 98, 69, 3, 81, 70, 80, 66, 84, 61, 48, 17, 8, 25, 8, 29, 82, 59, 62, 1, 58, 71, 74, 86, 8, 94, 15, 22, 79], [43, 32, 57, 81, 97, 19, 68, 26, 21, 12, 12, 44, 10, 81, 42, 92, 44, 58, 10, 11, 2, 5, 33, 1, 86, 46, 85, 40, 13, 16, 44, 70, 42], [31, 28, 33, 90, 54, 30, 46, 18, 1, 95, 73, 79, 87, 16, 87, 39, 92, 26, 85, 75, 42, 56, 11, 78, 50, 6, 63, 77, 46, 77, 45, 35, 83]],[23, 36, 42, 49, 50, 88, 97, 51, 1, 27, 4, 72, 11, 61, 24, 49, 75, 29, 96, 16, 11, 65, 13, 22, 13, 23, 84, 23, 20, 63, 35, 76, 22],25,30,19,), ([[-82, -82, -76, -74, -72, -70, -70, -68, -66, -56, -56, -50, -48, -44, -42, -38, -36, -32, -26, -20, -20, -18, -8, 6, 8, 12, 12, 14, 18, 20, 24, 24, 30, 32, 36, 38, 40, 44, 50, 56, 60, 62, 66, 70, 76, 78, 90, 98, 98], [-92, -80, -76, -70, -58, -58, -50, -48, -38, -36, -34, -32, -30, -30, -24, -20, -20, -18, -10, -10, -8, -6, -6, -6, -4, 2, 10, 14, 24, 26, 30, 34, 36, 44, 52, 54, 64, 76, 78, 82, 86, 86, 86, 86, 86, 88, 88, 92, 94], [-98, -94, -86, -82, -80, -76, -74, -74, -72, -70, -70, -68, -66, -62, -50, -50, -48, -42, -34, -24, -22, -22, 2, 8, 8, 10, 12, 22, 22, 26, 26, 26, 30, 38, 44, 54, 56, 58, 68, 68, 72, 78, 80, 80, 84, 88, 92, 94, 98], [-92, -88, -84, -84, -82, -78, -78, -66, -60, -48, -48, -46, -42, -40, -40, -38, -36, -34, -30, -30, -26, -26, -22, -22, -20, -14, -12, 6, 28, 36, 38, 44, 46, 46, 48, 50, 52, 52, 56, 58, 60, 70, 80, 80, 80, 86, 92, 96, 98], [-98, -94, -80, -76, -72, -70, -70, -70, -68, -64, -64, -62, -60, -56, -54, -52, -50, -48, -46, -42, -40, -30, -28, -28, -24, -22, -6, -4, 0, 2, 10, 12, 18, 18, 32, 36, 58, 60, 68, 70, 72, 74, 80, 84, 86, 88, 88, 94, 98], [-96, -96, -86, -84, -84, -72, -72, -70, -70, -66, -64, -60, -58, -58, -46, -38, -38, -28, -22, -18, -14, 16, 18, 20, 20, 24, 24, 26, 32, 32, 34, 40, 42, 42, 44, 44, 46, 56, 58, 60, 62, 64, 66, 68, 68, 68, 74, 78, 86], [-98, -92, -70, -58, -54, -50, -50, -50, -46, -40, -40, -36, -34, -24, -22, -22, -18, -8, -6, -6, -2, 2, 2, 10, 16, 16, 20, 22, 24, 26, 28, 28, 30, 32, 38, 40, 42, 48, 56, 56, 58, 60, 66, 66, 72, 84, 90, 94, 96], [-98, -90, -82, -80, -78, -78, -70, -66, -60, -54, -48, -48, -38, -28, -18, -16, -14, -12, -12, -10, -8, -4, -4, -4, -2, 0, 2, 6, 6, 12, 16, 18, 20, 24, 36, 46, 52, 54, 60, 62, 66, 66, 70, 70, 82, 82, 86, 86, 88], [-98, -90, -88, -86, -78, -76, -76, -70, -66, -60, -56, -56, -56, -54, -52, -46, -40, -28, -26, -22, -20, -20, -18, -14, -12, -8, 0, 18, 18, 28, 34, 36, 36, 36, 38, 46, 50, 54, 56, 56, 60, 66, 70, 72, 74, 74, 80, 80, 82], [-98, -92, -90, -86, -84, -82, -78, -70, -66, -60, -58, -44, -42, -34, -32, -30, -24, -20, -16, -8, -4, 8, 8, 14, 14, 14, 14, 20, 20, 32, 38, 42, 52, 62, 62, 66, 68, 70, 72, 72, 78, 78, 78, 78, 84, 96, 98, 98, 98], [-90, -88, -82, -82, -82, -80, -74, -68, -68, -64, -58, -56, -54, -50, -42, -36, -32, -28, -20, -20, -20, -18, -16, -14, -6, -6, -2, 6, 8, 10, 20, 24, 26, 32, 38, 44, 46, 48, 56, 56, 58, 60, 64, 68, 74, 80, 88, 92, 96], [-96, -94, -88, -72, -72, -72, -70, -70, -64, -52, -46, -46, -44, -38, -34, -34, -28, -26, -20, -16, -14, -10, -8, -2, -2, 2, 6, 8, 10, 30, 34, 34, 36, 44, 52, 58, 60, 70, 72, 72, 74, 76, 76, 80, 90, 92, 92, 94, 98], [-98, -98, -96, -96, -84, -82, -80, -76, -62, -52, -46, -44, -44, -40, -38, -38, -36, -30, -22, -8, -4, -2, 0, 2, 4, 8, 12, 20, 22, 26, 26, 30, 34, 46, 46, 52, 54, 56, 58, 60, 62, 66, 72, 74, 78, 80, 90, 92, 96], [-94, -94, -92, -92, -80, -80, -74, -64, -56, -54, -52, -50, -50, -42, -42, -42, -40, -36, -36, -32, -24, -16, -14, -4, 0, 2, 4, 10, 12, 16, 22, 24, 26, 28, 28, 30, 40, 46, 48, 56, 58, 62, 62, 62, 80, 88, 88, 96, 98], [-96, -94, -94, -92, -84, -82, -80, -74, -70, -58, -54, -52, -52, -48, -44, -34, -34, -30, -28, -24, -14, -12, -4, -2, 2, 2, 4, 10, 12, 14, 24, 28, 38, 40, 46, 58, 62, 68, 72, 72, 74, 76, 82, 84, 84, 84, 84, 90, 98], [-98, -90, -84, -82, -76, -70, -66, -62, -60, -60, -58, -56, -54, -54, -50, -50, -46, -40, -40, -38, -32, -24, -22, -22, -20, -12, -12, -8, 6, 6, 8, 8, 8, 22, 26, 40, 42, 50, 50, 50, 50, 56, 64, 86, 92, 92, 94, 94, 96], [-92, -78, -74, -68, -66, -62, -62, -62, -60, -60, -54, -40, -36, -34, -34, -32, -22, -22, -18, -14, -12, -10, -6, -4, -2, 0, 12, 14, 18, 28, 32, 32, 38, 44, 48, 50, 52, 52, 60, 64, 66, 66, 82, 86, 90, 90, 94, 94, 96], [-96, -94, -92, -90, -88, -86, -84, -76, -74, -72, -72, -68, -66, -66, -58, -52, -50, -46, -42, -34, -32, -32, -30, -14, -10, -6, -6, -2, -2, 10, 14, 20, 30, 30, 34, 36, 36, 38, 38, 42, 44, 50, 52, 64, 68, 82, 90, 90, 98], [-98, -88, -82, -80, -80, -78, -76, -72, -70, -66, -66, -58, -56, -52, -52, -50, -50, -44, -42, -42, -32, -32, -30, -26, -22, -20, -20, -2, 0, 10, 12, 18, 20, 24, 24, 26, 36, 38, 42, 56, 66, 74, 76, 78, 78, 84, 86, 96, 98], [-94, -94, -94, -80, -76, -74, -68, -56, -52, -50, -44, -42, -38, -36, -34, -28, -26, -24, -16, -2, 0, 4, 8, 14, 16, 20, 22, 32, 34, 38, 46, 46, 48, 50, 52, 54, 62, 64, 66, 66, 72, 76, 78, 78, 80, 82, 82, 84, 94], [-98, -98, -90, -86, -80, -78, -76, -74, -74, -72, -72, -60, -58, -54, -50, -46, -32, -24, -22, -18, -18, -14, -12, -12, -10, -8, 8, 14, 24, 30, 36, 46, 48, 50, 58, 58, 62, 66, 66, 74, 74, 74, 78, 78, 80, 84, 86, 90, 92], [-98, -94, -82, -80, -72, -64, -60, -58, -48, -46, -46, -40, -32, -26, -24, -16, -14, -12, -10, -8, -6, -4, -4, 2, 4, 4, 12, 12, 14, 26, 34, 36, 40, 46, 48, 54, 66, 66, 66, 66, 66, 72, 78, 80, 80, 80, 94, 96, 98], [-96, -92, -86, -72, -70, -70, -68, -68, -66, -64, -62, -56, -50, -44, -32, -30, -28, -24, -12, -4, -4, -4, 2, 10, 16, 18, 18, 22, 32, 32, 36, 36, 40, 42, 46, 46, 50, 50, 50, 50, 52, 54, 64, 68, 70, 72, 74, 90, 96], [-98, -98, -98, -90, -86, -82, -64, -60, -58, -54, -48, -36, -36, -32, -30, -28, -18, -16, -14, -6, -2, 4, 6, 6, 10, 12, 14, 18, 24, 32, 34, 46, 48, 50, 52, 58, 66, 68, 70, 80, 80, 82, 84, 84, 86, 92, 94, 96, 98], [-98, -96, -88, -86, -86, -86, -86, -86, -84, -78, -78, -74, -72, -72, -70, -70, -70, -66, -64, -56, -42, -40, -38, -36, -34, -32, -30, -28, -26, -20, -8, -6, 0, 2, 2, 14, 24, 30, 34, 36, 44, 50, 52, 60, 66, 68, 74, 78, 86], [-96, -86, -72, -72, -70, -70, -68, -68, -64, -58, -58, -58, -54, -54, -52, -48, -46, -40, -38, -28, -14, -10, -6, -4, 0, 10, 10, 12, 16, 18, 18, 20, 20, 22, 34, 34, 40, 40, 46, 46, 58, 58, 62, 66, 68, 68, 72, 84, 92], [-96, -90, -88, -88, -82, -82, -76, -74, -70, -68, -62, -56, -52, -48, -46, -38, -22, -22, -16, -12, -8, 0, 4, 8, 14, 20, 22, 24, 28, 34, 36, 38, 44, 46, 48, 58, 66, 68, 68, 76, 84, 84, 86, 86, 88, 88, 90, 92, 94], [-96, -96, -96, -94, -90, -88, -88, -84, -76, -72, -72, -58, -54, -52, -52, -50, -40, -38, -32, -12, -12, -6, -4, -2, 0, 2, 2, 10, 12, 22, 28, 28, 30, 34, 42, 42, 54, 56, 58, 64, 70, 70, 74, 74, 84, 86, 88, 88, 90], [-94, -92, -84, -82, -82, -70, -66, -64, -60, -60, -58, -58, -54, -52, -52, -42, -36, -32, -30, -28, -26, -24, -22, -20, -16, -12, 0, 4, 6, 8, 14, 20, 30, 32, 46, 54, 60, 62, 62, 64, 66, 68, 68, 70, 70, 72, 72, 76, 88], [-90, -90, -90, -88, -88, -86, -78, -68, -62, -62, -60, -54, -54, -48, -48, -36, -36, -32, -28, -28, -22, -20, -6, -2, 4, 6, 8, 10, 14, 24, 28, 28, 28, 34, 34, 36, 44, 52, 54, 54, 66, 70, 70, 72, 78, 80, 84, 88, 88], [-98, -94, -94, -90, -84, -76, -72, -70, -68, -68, -60, -54, -54, -48, -46, -46, -44, -34, -28, -28, -26, -12, -8, -4, 2, 6, 6, 8, 14, 32, 32, 38, 38, 40, 44, 46, 46, 50, 50, 52, 54, 58, 60, 62, 70, 78, 86, 92, 92], [-98, -94, -94, -92, -90, -86, -82, -76, -74, -74, -66, -66, -66, -60, -60, -60, -56, -54, -50, -38, -30, -28, -18, -16, -16, -2, 0, 6, 14, 16, 16, 18, 28, 30, 30, 32, 34, 40, 46, 52, 52, 54, 60, 70, 82, 84, 88, 90, 94], [-96, -88, -84, -80, -78, -78, -78, -68, -62, -60, -52, -44, -36, -36, -36, -34, -32, -32, -30, -26, -22, -14, -10, -6, -4, -4, 0, 0, 0, 10, 12, 14, 14, 16, 24, 34, 38, 44, 52, 54, 54, 56, 58, 60, 64, 66, 66, 92, 98], [-98, -88, -80, -80, -74, -72, -70, -68, -64, -62, -62, -62, -58, -56, -52, -50, -50, -46, -34, -30, -30, -26, -18, -12, 4, 10, 14, 22, 24, 30, 32, 38, 42, 42, 46, 56, 56, 58, 68, 72, 80, 82, 86, 90, 90, 92, 96, 98, 98], [-96, -92, -92, -90, -90, -90, -88, -82, -82, -82, -80, -68, -64, -60, -50, -34, -30, -16, -10, -10, -8, -4, -4, -2, 0, 18, 20, 24, 24, 24, 30, 30, 36, 38, 38, 40, 42, 42, 44, 48, 52, 52, 56, 76, 84, 88, 92, 94, 98], [-98, -90, -82, -80, -74, -74, -72, -72, -72, -72, -64, -60, -56, -56, -56, -52, -40, -38, -24, -20, -18, -18, -12, -10, -6, 10, 18, 22, 24, 24, 26, 26, 30, 34, 40, 40, 44, 50, 58, 60, 62, 64, 70, 76, 80, 80, 86, 88, 96], [-96, -94, -86, -82, -72, -68, -68, -64, -62, -56, -54, -50, -50, -48, -44, -26, -20, -16, -10, -8, -6, 6, 8, 10, 10, 10, 16, 20, 28, 28, 32, 40, 42, 44, 44, 46, 46, 48, 58, 62, 72, 76, 80, 84, 86, 88, 92, 96, 98], [-96, -94, -94, -94, -92, -92, -90, -84, -82, -78, -76, -74, -74, -62, -58, -58, -58, -42, -42, -22, -20, -14, -14, -12, -4, -2, 4, 4, 4, 8, 16, 20, 24, 26, 32, 40, 42, 46, 52, 54, 56, 56, 60, 60, 62, 62, 82, 90, 96], [-98, -96, -96, -76, -70, -66, -54, -54, -52, -50, -46, -40, -36, -34, -32, -30, -28, -28, -26, -26, -22, -20, -18, -6, 6, 10, 20, 22, 28, 30, 30, 32, 32, 34, 38, 42, 46, 54, 58, 70, 76, 76, 84, 90, 94, 94, 98, 98, 98], [-90, -86, -82, -72, -70, -70, -66, -62, -60, -58, -54, -54, -40, -36, -32, -30, -28, -26, -26, -24, -16, -14, -10, -8, -8, -8, -8, 4, 6, 8, 14, 16, 18, 18, 22, 26, 30, 58, 66, 82, 84, 92, 92, 94, 96, 96, 96, 96, 98], [-92, -86, -80, -74, -68, -66, -64, -64, -52, -44, -36, -34, -32, -30, -26, -22, -20, -18, -14, -12, -8, 2, 10, 10, 12, 16, 24, 32, 32, 44, 46, 48, 52, 52, 54, 66, 68, 70, 72, 74, 82, 84, 88, 90, 94, 94, 96, 96, 96], [-92, -90, -80, -78, -78, -78, -74, -66, -50, -50, -46, -46, -44, -44, -40, -38, -34, -32, -32, -30, -18, -18, -16, -14, -12, 4, 10, 10, 10, 18, 20, 20, 22, 24, 24, 26, 26, 46, 46, 48, 48, 52, 58, 62, 64, 72, 80, 96, 96], [-98, -96, -94, -92, -88, -86, -84, -82, -76, -76, -60, -58, -58, -58, -56, -50, -48, -38, -34, -30, -20, -16, -16, -10, -4, -2, 10, 12, 18, 26, 32, 34, 48, 48, 52, 64, 64, 68, 70, 74, 76, 78, 80, 90, 92, 92, 92, 94, 96], [-96, -88, -88, -82, -76, -70, -62, -58, -56, -48, -48, -38, -36, -30, -18, -18, -16, -16, -14, -12, -6, 4, 8, 10, 10, 12, 14, 24, 28, 28, 34, 38, 44, 50, 58, 60, 62, 66, 66, 72, 74, 76, 76, 78, 78, 84, 86, 88, 96], [-98, -94, -94, -94, -90, -86, -78, -74, -68, -66, -62, -58, -56, -54, -52, -52, -48, -44, -44, -44, -30, -26, -26, -12, -4, 2, 4, 4, 6, 6, 12, 12, 14, 16, 16, 22, 22, 30, 30, 34, 36, 42, 50, 50, 64, 70, 80, 88, 98], [-98, -96, -96, -94, -88, -84, -58, -56, -52, -48, -44, -30, -26, -26, -20, -18, -16, -8, -8, -8, -6, -6, -4, -4, -2, 0, 6, 12, 12, 14, 24, 34, 42, 46, 48, 56, 60, 62, 62, 72, 72, 80, 84, 88, 88, 90, 90, 94, 96], [-98, -90, -82, -78, -70, -68, -64, -62, -56, -52, -50, -44, -44, -42, -36, -26, -24, -22, -12, -10, -6, -4, 0, 2, 6, 10, 18, 32, 32, 36, 38, 42, 48, 52, 54, 56, 62, 64, 66, 66, 66, 66, 70, 72, 74, 74, 78, 86, 92], [-96, -90, -88, -78, -74, -72, -70, -68, -66, -60, -58, -56, -56, -50, -50, -44, -36, -26, -24, -18, -16, -16, -12, -6, 2, 6, 8, 10, 10, 18, 18, 22, 24, 26, 42, 46, 64, 64, 66, 72, 74, 74, 76, 88, 94, 94, 96, 98, 98], [-94, -82, -78, -78, -76, -64, -64, -58, -58, -56, -56, -52, -44, -42, -38, -36, -22, -16, -14, -6, -2, 4, 4, 8, 8, 12, 14, 14, 14, 16, 16, 22, 30, 34, 38, 42, 44, 58, 62, 66, 66, 68, 76, 78, 80, 80, 84, 90, 98]],[-96, -90, -90, -86, -86, -86, -84, -76, -76, -74, -72, -70, -52, -50, -34, -32, -26, -20, -16, -14, -10, -8, -8, -6, 4, 12, 14, 16, 18, 24, 26, 32, 34, 38, 42, 42, 48, 48, 48, 48, 64, 66, 70, 76, 76, 82, 86, 86, 96],37,38,26,), ([[0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1]],[0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0],43,32,35,), ([[13, 16, 26, 38, 44, 71, 73], [16, 28, 39, 47, 48, 59, 61], [15, 30, 50, 59, 60, 89, 90], [24, 61, 63, 71, 72, 76, 83], [14, 36, 39, 42, 64, 76, 77], [4, 6, 11, 24, 34, 36, 58], [22, 35, 63, 70, 81, 91, 98]],[3, 9, 32, 55, 78, 85, 90],5,3,3,), ([[-48, -22, -52, -86, -22], [-54, -6, -16, -84, -34], [-46, -16, -80, -82, -38], [-44, 98, -54, -32, -88], [42, 52, 38, -20, -36]],[48, -68, 0, -54, -80],4,4,3,), ([[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]],[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],7,10,9,), ([[62, 15, 2, 68, 63, 42, 57, 46, 37, 30, 1, 51, 47, 75, 50, 24, 48, 56, 93, 9, 50, 79, 58, 74, 81, 64, 63, 60, 49, 24, 46, 55, 89, 10, 49, 46, 17, 86, 24, 51, 69, 21, 16, 97, 66, 14], [95, 91, 93, 6, 64, 52, 1, 29, 77, 42, 16, 76, 40, 30, 32, 7, 36, 72, 1, 94, 12, 25, 11, 75, 52, 95, 64, 4, 54, 78, 40, 67, 81, 92, 5, 42, 65, 94, 59, 12, 35, 75, 82, 83, 72, 47], [69, 96, 79, 34, 12, 8, 27, 58, 49, 56, 43, 17, 26, 87, 1, 19, 99, 48, 80, 25, 56, 40, 42, 63, 92, 27, 76, 55, 15, 2, 30, 81, 79, 4, 15, 52, 21, 94, 80, 27, 93, 33, 44, 20, 45, 34], [18, 47, 49, 73, 19, 87, 86, 72, 52, 21, 36, 27, 96, 2, 87, 35, 22, 20, 97, 92, 69, 13, 15, 95, 80, 58, 84, 66, 56, 12, 57, 36, 90, 25, 14, 43, 43, 80, 2, 53, 42, 65, 52, 42, 5, 48], [85, 40, 51, 5, 9, 71, 80, 70, 2, 18, 87, 36, 78, 90, 57, 60, 27, 92, 15, 64, 47, 22, 99, 53, 87, 28, 97, 94, 28, 83, 64, 10, 10, 34, 30, 90, 17, 87, 31, 7, 29, 68, 29, 69, 47, 35], [15, 32, 84, 9, 45, 6, 37, 97, 12, 69, 91, 45, 39, 58, 49, 85, 76, 2, 48, 71, 81, 88, 16, 71, 49, 32, 68, 5, 23, 65, 93, 47, 88, 59, 43, 43, 36, 59, 52, 77, 1, 25, 36, 86, 26, 42], [39, 15, 66, 15, 13, 29, 80, 10, 75, 3, 21, 65, 41, 19, 76, 82, 64, 55, 63, 46, 24, 94, 40, 75, 24, 20, 2, 86, 90, 24, 53, 70, 65, 90, 45, 70, 96, 98, 68, 60, 12, 31, 27, 57, 63, 17], [79, 58, 4, 37, 50, 72, 71, 69, 45, 86, 47, 25, 98, 59, 63, 16, 13, 97, 66, 2, 8, 13, 4, 54, 96, 1, 80, 3, 35, 15, 62, 20, 74, 58, 80, 65, 85, 37, 74, 6, 93, 29, 10, 19, 80, 61], [53, 59, 23, 20, 92, 20, 65, 17, 71, 81, 41, 50, 37, 86, 75, 62, 21, 49, 59, 34, 56, 94, 41, 71, 70, 94, 44, 6, 25, 19, 37, 3, 13, 39, 86, 98, 19, 30, 52, 26, 35, 25, 65, 74, 9, 69], [15, 92, 20, 89, 35, 8, 50, 32, 17, 2, 21, 64, 76, 26, 9, 49, 25, 63, 17, 51, 58, 1, 97, 3, 28, 80, 11, 89, 23, 86, 9, 27, 5, 52, 31, 62, 77, 63, 86, 41, 59, 19, 28, 78, 6, 63], [76, 97, 67, 74, 17, 13, 95, 60, 16, 63, 87, 95, 84, 66, 82, 69, 80, 44, 54, 32, 29, 37, 47, 62, 78, 79, 45, 10, 63, 11, 20, 53, 95, 72, 40, 75, 89, 81, 1, 37, 56, 15, 85, 93, 84, 9], [72, 60, 72, 79, 28, 8, 48, 76, 89, 84, 89, 46, 42, 83, 65, 90, 71, 93, 64, 50, 55, 88, 66, 29, 6, 6, 47, 99, 61, 98, 24, 57, 4, 83, 56, 56, 46, 21, 46, 33, 78, 85, 15, 28, 80, 33], [49, 8, 68, 50, 35, 16, 35, 44, 22, 80, 94, 48, 98, 13, 43, 79, 28, 68, 15, 99, 5, 27, 62, 63, 85, 66, 55, 31, 44, 48, 73, 58, 71, 50, 94, 22, 19, 79, 76, 13, 97, 27, 91, 19, 47, 12], [52, 75, 69, 55, 13, 16, 39, 7, 82, 28, 77, 88, 84, 98, 47, 21, 21, 43, 40, 92, 82, 92, 33, 94, 3, 21, 42, 47, 89, 40, 59, 78, 13, 97, 62, 96, 74, 69, 95, 73, 90, 11, 67, 10, 48, 47], [37, 21, 84, 6, 27, 11, 42, 18, 62, 58, 81, 7, 9, 71, 77, 38, 69, 12, 16, 61, 2, 44, 81, 71, 2, 99, 22, 38, 30, 51, 39, 11, 62, 73, 95, 74, 13, 87, 33, 17, 23, 8, 90, 45, 36, 73], [80, 14, 37, 80, 75, 12, 38, 69, 25, 91, 72, 14, 3, 36, 97, 93, 61, 20, 22, 9, 56, 89, 37, 99, 9, 50, 59, 95, 67, 25, 48, 36, 91, 66, 48, 61, 71, 13, 50, 54, 51, 29, 58, 48, 14, 19], [64, 64, 97, 27, 3, 7, 54, 36, 57, 24, 82, 5, 83, 49, 78, 87, 87, 93, 70, 62, 68, 26, 40, 84, 82, 76, 98, 27, 41, 71, 23, 56, 3, 46, 85, 39, 62, 92, 73, 74, 16, 79, 40, 24, 91, 63], [88, 29, 39, 88, 15, 76, 44, 40, 66, 67, 26, 9, 61, 5, 24, 71, 8, 56, 35, 89, 71, 12, 72, 54, 26, 84, 57, 58, 46, 73, 92, 24, 20, 59, 70, 86, 84, 15, 98, 51, 29, 15, 74, 7, 19, 64], [14, 46, 80, 84, 53, 57, 50, 32, 23, 48, 35, 83, 89, 10, 67, 51, 96, 63, 84, 18, 6, 41, 48, 79, 66, 17, 17, 45, 51, 7, 65, 79, 29, 34, 92, 17, 45, 36, 2, 36, 66, 30, 65, 4, 55, 61], [23, 37, 69, 52, 89, 17, 78, 39, 81, 83, 94, 61, 33, 11, 46, 34, 27, 35, 55, 1, 22, 99, 91, 24, 56, 28, 70, 88, 23, 48, 77, 57, 57, 72, 69, 79, 95, 58, 37, 68, 17, 66, 11, 82, 97, 20], [24, 46, 12, 76, 76, 15, 6, 97, 22, 95, 83, 52, 69, 59, 17, 24, 54, 85, 60, 41, 2, 84, 71, 76, 71, 27, 36, 54, 79, 32, 66, 65, 27, 15, 39, 30, 38, 58, 6, 66, 73, 31, 73, 74, 64, 51], [71, 37, 75, 62, 93, 88, 55, 77, 22, 54, 67, 34, 50, 89, 66, 77, 17, 54, 1, 53, 83, 3, 74, 37, 41, 38, 48, 39, 25, 46, 72, 61, 70, 77, 7, 58, 5, 77, 60, 64, 95, 22, 81, 95, 53, 14], [52, 25, 79, 20, 16, 26, 40, 49, 23, 82, 56, 61, 40, 89, 99, 58, 90, 17, 22, 20, 1, 14, 5, 99, 34, 63, 71, 7, 51, 56, 8, 3, 8, 39, 45, 90, 97, 24, 45, 77, 51, 57, 41, 59, 47, 15], [98, 5, 15, 87, 54, 20, 2, 88, 73, 98, 90, 4, 79, 94, 74, 26, 3, 91, 65, 28, 25, 93, 61, 63, 3, 97, 15, 40, 1, 79, 88, 71, 15, 55, 94, 93, 38, 56, 10, 41, 68, 28, 85, 74, 71, 19], [10, 27, 56, 25, 36, 22, 54, 74, 28, 72, 53, 19, 66, 49, 49, 56, 94, 55, 24, 82, 54, 66, 1, 7, 37, 45, 49, 85, 34, 51, 91, 74, 64, 28, 87, 81, 39, 42, 93, 60, 43, 10, 85, 12, 7, 62], [73, 51, 16, 10, 70, 67, 50, 75, 37, 60, 45, 31, 57, 94, 44, 51, 23, 74, 16, 79, 78, 57, 63, 90, 28, 24, 63, 5, 61, 2, 20, 86, 57, 46, 42, 5, 34, 72, 35, 68, 37, 6, 19, 15, 48, 93], [70, 43, 61, 32, 77, 46, 11, 98, 66, 70, 44, 73, 51, 53, 55, 69, 54, 3, 65, 25, 75, 37, 47, 44, 78, 78, 3, 98, 73, 71, 34, 54, 80, 69, 20, 35, 1, 27, 42, 18, 93, 96, 60, 9, 80, 57], [2, 31, 55, 74, 66, 86, 59, 31, 40, 18, 55, 86, 79, 74, 45, 19, 83, 26, 24, 28, 15, 34, 34, 28, 66, 68, 94, 87, 19, 66, 67, 48, 38, 39, 67, 75, 23, 28, 23, 10, 65, 75, 50, 23, 85, 55], [91, 22, 56, 89, 33, 23, 8, 81, 56, 97, 2, 88, 94, 38, 61, 8, 56, 85, 68, 31, 99, 30, 75, 61, 23, 68, 10, 95, 53, 57, 55, 42, 48, 97, 23, 40, 61, 99, 30, 54, 18, 66, 83, 58, 6, 35], [46, 84, 95, 99, 63, 16, 14, 13, 55, 83, 6, 77, 77, 40, 1, 85, 53, 14, 66, 46, 99, 67, 42, 55, 11, 27, 40, 38, 81, 54, 80, 3, 52, 77, 5, 22, 75, 50, 95, 54, 88, 27, 1, 85, 6, 60], [38, 32, 53, 70, 13, 71, 48, 20, 37, 38, 25, 23, 58, 93, 34, 66, 47, 71, 50, 64, 11, 60, 45, 49, 57, 25, 42, 75, 78, 97, 58, 31, 83, 60, 53, 72, 45, 71, 22, 43, 79, 1, 81, 8, 62, 39], [53, 8, 61, 2, 80, 52, 70, 9, 47, 23, 87, 99, 41, 89, 23, 54, 5, 50, 50, 96, 51, 30, 41, 93, 90, 77, 30, 4, 63, 52, 89, 30, 72, 96, 75, 55, 74, 12, 67, 62, 3, 38, 53, 62, 80, 80], [88, 65, 51, 42, 27, 28, 91, 20, 8, 18, 46, 12, 36, 12, 41, 29, 31, 18, 27, 84, 84, 83, 96, 70, 2, 3, 40, 53, 1, 39, 16, 29, 8, 23, 38, 71, 89, 87, 92, 83, 83, 57, 3, 64, 62, 51], [76, 38, 28, 18, 53, 19, 90, 48, 7, 74, 89, 6, 10, 5, 29, 51, 59, 32, 33, 66, 4, 90, 39, 9, 90, 77, 35, 48, 29, 58, 35, 14, 72, 89, 17, 75, 45, 8, 54, 58, 40, 65, 6, 90, 26, 47], [93, 31, 76, 38, 69, 20, 19, 44, 28, 53, 95, 64, 50, 11, 27, 64, 77, 18, 24, 1, 46, 8, 77, 72, 48, 14, 87, 28, 54, 9, 63, 68, 67, 59, 37, 20, 17, 74, 6, 30, 49, 65, 50, 80, 75, 77], [76, 40, 73, 71, 21, 7, 8, 38, 60, 4, 40, 32, 18, 36, 82, 31, 29, 74, 73, 19, 51, 98, 46, 74, 98, 53, 24, 66, 7, 14, 71, 95, 4, 86, 60, 14, 80, 28, 34, 18, 49, 68, 76, 55, 72, 35], [66, 6, 48, 50, 62, 34, 10, 41, 14, 93, 60, 58, 8, 51, 31, 89, 42, 67, 29, 75, 90, 98, 58, 4, 87, 82, 29, 27, 38, 13, 70, 4, 40, 30, 81, 29, 57, 61, 90, 10, 82, 36, 9, 32, 45, 87], [76, 45, 58, 23, 90, 81, 1, 48, 12, 36, 90, 35, 36, 83, 19, 6, 17, 6, 90, 88, 26, 12, 53, 49, 23, 13, 52, 17, 30, 92, 22, 83, 64, 1, 82, 71, 67, 30, 54, 67, 64, 93, 93, 8, 45, 71], [65, 37, 45, 41, 91, 59, 22, 56, 29, 22, 12, 44, 56, 7, 73, 87, 77, 98, 9, 38, 37, 62, 86, 66, 53, 64, 73, 86, 8, 20, 8, 3, 46, 51, 11, 53, 50, 57, 26, 93, 80, 41, 34, 70, 82, 82], [77, 1, 52, 73, 66, 59, 96, 50, 60, 63, 38, 44, 26, 95, 62, 99, 37, 34, 8, 44, 31, 10, 82, 75, 82, 92, 54, 61, 3, 52, 55, 7, 48, 22, 43, 71, 50, 96, 27, 56, 44, 66, 48, 25, 27, 22], [5, 86, 67, 70, 46, 7, 43, 52, 7, 19, 85, 27, 99, 55, 1, 48, 16, 41, 2, 47, 59, 51, 21, 19, 80, 80, 8, 41, 51, 75, 74, 49, 54, 48, 73, 15, 69, 24, 96, 19, 97, 23, 28, 90, 60, 50], [76, 65, 97, 12, 56, 95, 81, 27, 85, 46, 42, 56, 77, 90, 55, 6, 91, 41, 81, 93, 62, 83, 56, 21, 31, 28, 10, 28, 47, 92, 29, 85, 9, 30, 94, 62, 88, 86, 52, 16, 30, 50, 47, 1, 51, 11], [83, 14, 96, 9, 59, 84, 27, 94, 5, 20, 93, 58, 99, 71, 9, 5, 78, 38, 97, 97, 42, 88, 50, 51, 28, 64, 62, 32, 22, 50, 18, 57, 12, 61, 86, 72, 35, 53, 64, 42, 90, 32, 46, 84, 82, 65], [28, 99, 16, 15, 46, 15, 57, 32, 82, 90, 2, 29, 28, 8, 41, 33, 74, 61, 87, 64, 7, 51, 79, 30, 70, 33, 88, 9, 24, 7, 61, 22, 5, 12, 37, 19, 91, 38, 55, 23, 54, 62, 82, 8, 44, 73], [30, 77, 76, 3, 41, 88, 95, 36, 78, 76, 33, 86, 54, 38, 92, 36, 65, 99, 67, 8, 72, 33, 71, 88, 8, 63, 43, 89, 57, 6, 20, 74, 52, 50, 61, 66, 52, 3, 3, 60, 28, 6, 90, 51, 60, 15], [32, 86, 94, 46, 87, 40, 20, 75, 67, 86, 63, 63, 48, 42, 81, 69, 30, 11, 45, 18, 58, 68, 58, 79, 95, 51, 81, 1, 88, 58, 49, 75, 89, 60, 52, 24, 80, 70, 47, 17, 45, 94, 69, 17, 11, 97]],[19, 39, 31, 50, 61, 70, 43, 64, 45, 82, 49, 80, 21, 37, 96, 30, 42, 82, 96, 30, 22, 26, 42, 88, 57, 12, 59, 58, 83, 64, 66, 2, 37, 60, 5, 76, 20, 81, 10, 57, 70, 74, 65, 72, 15, 84],34,25,32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", STEINS_ALGORITHM_FOR_FINDING_GCD," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class STEINS_ALGORITHM_FOR_FINDING_GCD{ static int f_gold ( int a , int b ) { if ( a == 0 ) return b ; if ( b == 0 ) return a ; int k ; for ( k = 0 ; ( ( a | b ) & 1 ) == 0 ; ++ k ) { a >>= 1 ; b >>= 1 ; } while ( ( a & 1 ) == 0 ) a >>= 1 ; do { while ( ( b & 1 ) == 0 ) b >>= 1 ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } b = ( b - a ) ; } while ( b != 0 ) ; return a << k ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(58); param0.add(89); param0.add(75); param0.add(59); param0.add(84); param0.add(47); param0.add(37); param0.add(83); param0.add(28); List param1 = new ArrayList<>(); param1.add(93); param1.add(13); param1.add(27); param1.add(14); param1.add(47); param1.add(39); param1.add(76); param1.add(75); param1.add(62); param1.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : if ( a == 0 ) : return b if ( b == 0 ) : return a k = 0 while ( ( ( a | b ) & 1 ) == 0 ) : a = a >> 1 b = b >> 1 k = k + 1 while ( ( a & 1 ) == 0 ) : a = a >> 1 while ( b != 0 ) : while ( ( b & 1 ) == 0 ) : b = b >> 1 if ( a > b ) : temp = a a = b b = temp b = ( b - a ) return ( a << k ) ",,," if __name__ == '__main__': param = [ (37,93,), (58,13,), (89,27,), (75,14,), (59,47,), (84,39,), (47,76,), (37,75,), (83,62,), (28,58,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT{ static boolean f_gold ( int n ) { return 1162261467 % n == 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(3); param0.add(27); param0.add(9); param0.add(-9); param0.add(11); param0.add(57); param0.add(21); param0.add(60); param0.add(44); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1162261467 % n == 0 "," using namespace std; bool f_gold ( int n ) { return 1162261467 % n == 0; } int main() { int n_success = 0; vector param0 {1,3,27,9,-9,11,57,21,60,44}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (3,), (27,), (9,), (-9,), (11,), (57,), (21,), (60,), (44,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMIZE_ARRJ_ARRI_ARRL_ARRK_SUCH_THAT_I_J_K_L," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMIZE_ARRJ_ARRI_ARRL_ARRK_SUCH_THAT_I_J_K_L{ static int f_gold ( int [ ] arr , int n ) { if ( n < 4 ) { System . out . println ( ""The array should have"" + "" atleast 4 elements"" ) ; } int table1 [ ] = new int [ n + 1 ] ; int table2 [ ] = new int [ n ] ; int table3 [ ] = new int [ n - 1 ] ; int table4 [ ] = new int [ n - 2 ] ; Arrays . fill ( table1 , Integer . MIN_VALUE ) ; Arrays . fill ( table2 , Integer . MIN_VALUE ) ; Arrays . fill ( table3 , Integer . MIN_VALUE ) ; Arrays . fill ( table4 , Integer . MIN_VALUE ) ; for ( int i = n - 1 ; i >= 0 ; i -- ) { table1 [ i ] = Math . max ( table1 [ i + 1 ] , arr [ i ] ) ; } for ( int i = n - 2 ; i >= 0 ; i -- ) { table2 [ i ] = Math . max ( table2 [ i + 1 ] , table1 [ i + 1 ] - arr [ i ] ) ; } for ( int i = n - 3 ; i >= 0 ; i -- ) table3 [ i ] = Math . max ( table3 [ i + 1 ] , table2 [ i + 1 ] + arr [ i ] ) ; for ( int i = n - 4 ; i >= 0 ; i -- ) table4 [ i ] = Math . max ( table4 [ i + 1 ] , table3 [ i + 1 ] - arr [ i ] ) ; return table4 [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{18,27,36,51,67,70,71,72,79,85,86,89,93,94,97}); param0.add(new int[]{4,70,88,90,-34,-4,-36,-38,16,-46,-60,-50,-72,-68,-42,-96,46,32,-80,46,-4,-86,-72,16,40,-74,78,-64,-38}); param0.add(new int[]{0,0,0,0,0,0,1,1,1}); param0.add(new int[]{67,75,6,31,18,44,55,99,83,8}); param0.add(new int[]{-94,-94,-84,-82,-74,-70,-70,-70,-56,-56,-52,-50,-48,-46,-44,-38,-36,-34,-34,-28,-26,-16,-16,0,0,2,2,4,6,10,24,30,32,32,34,36,48,62,64,78,78,84,90,92}); param0.add(new int[]{0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,1,0,1,1}); param0.add(new int[]{1,6,15,20,21,23,24,25,25,40,44,46,59,61,63,68,69,69,72,76,76,79,79,87,88,89,94,94,99}); param0.add(new int[]{8,70,-66,0,-82,-72,64,-88,40,10,24,-20,88}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{15,89,48,67,30,95,8,22,41,22,12,18,23,15,33,41,50,77,71,53,11,9,53,42,61,56,25,57,28,48,14,86,95,74,54,70,12,36,1,18,42,35,94,18,54,35,1,95,53}); List param1 = new ArrayList<>(); param1.add(9); param1.add(24); param1.add(8); param1.add(9); param1.add(36); param1.add(14); param1.add(16); param1.add(7); param1.add(28); param1.add(37); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int count = 1 ; for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97}); param0.add(new int[]{-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98}); param0.add(new int[]{1,1}); param0.add(new int[]{96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86}); param0.add(new int[]{-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98}); param0.add(new int[]{0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0}); param0.add(new int[]{8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98}); param0.add(new int[]{-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44}); List param1 = new ArrayList<>(); param1.add(42); param1.add(24); param1.add(1); param1.add(26); param1.add(42); param1.add(27); param1.add(29); param1.add(25); param1.add(21); param1.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(arr, n): x = sorted(arr) count = 1 for i in range(0, n - 1): if (x[i] + 1 != x[i + 1]): count = count + 1 return count "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int count = 1; for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++; } return count; } int main() { int n_success = 0; vector> param0 {{3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97},{-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98},{1,1},{96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86},{-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98},{0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0},{8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98},{-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44}}; vector param1 {42,24,1,26,42,27,29,25,21,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 7, 7, 11, 14, 14, 14, 16, 17, 17, 21, 22, 24, 27, 27, 27, 31, 33, 35, 36, 36, 37, 38, 43, 45, 49, 52, 54, 57, 59, 59, 60, 67, 73, 74, 74, 74, 75, 75, 79, 83, 87, 90, 93, 97], 42,), ([-28, 72, 60, 62, 40, 64, 50, -36, -24, 40, -6, 78, -80, -82, 2, -30, 70, 94, -2, -30, 92, 12, -46, 32, -96, -2, 36, -40, -42, 66, 98], 24,), ([1, 1], 1,), ([96, 89, 24, 28, 70, 78, 78, 35, 98, 65, 18, 81, 35, 91, 33, 88, 69, 52, 66, 17, 73, 79, 30, 33, 78, 60, 42, 8, 36, 6, 47, 87, 8, 98, 9, 77, 78, 24, 86, 91, 13, 79, 50, 85, 3, 7, 61, 94, 86], 26,), ([-92, -92, -90, -84, -78, -66, -60, -60, -46, -42, -38, -32, -24, -20, -18, -16, -14, -10, 0, 4, 6, 12, 24, 32, 34, 44, 48, 50, 50, 64, 66, 68, 80, 84, 86, 86, 88, 90, 90, 90, 92, 94, 96, 98, 98], 42,), ([0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0], 27,), ([8, 12, 13, 14, 16, 20, 20, 21, 23, 23, 24, 27, 29, 29, 29, 29, 35, 35, 38, 39, 40, 46, 50, 52, 60, 62, 62, 65, 65, 65, 70, 71, 72, 73, 75, 76, 80, 81, 82, 83, 85, 91, 95, 97, 98, 98], 29,), ([-84, 92, 70, -46, 26, -94, -82, -26, -90, -62, 52, 62, -58, 44, -14, -6, 58, 2, 10, 76, -34, 42, - 26, 80, 26, 32, -82, 38, 2, 72, 68, 44, 24, 84, -32, 54, -96, -8, 36, 80, -82, 32, 98, -68], 25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21,), ([64, 10, 6, 3, 67, 95, 72, 96, 72, 30, 99, 21, 46, 23, 48, 38, 48, 50, 53, 91, 59, 58, 27, 95, 63, 20, 27, 22, 58, 3, 11, 75, 77, 64, 46, 1, 67, 79, 6, 46, 57, 79, 49, 83, 21, 36, 44], 46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", EQUILIBRIUM_INDEX_OF_AN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EQUILIBRIUM_INDEX_OF_AN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int i , j ; int leftsum , rightsum ; for ( i = 0 ; i < n ; ++ i ) { leftsum = 0 ; for ( j = 0 ; j < i ; j ++ ) leftsum += arr [ j ] ; rightsum = 0 ; for ( j = i + 1 ; j < n ; j ++ ) rightsum += arr [ j ] ; if ( leftsum == rightsum ) return i ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,6,7,8,15,15,19,23,27,28,29,31,37,40,41,42,50,51,57,58,63,63,64,70,71,72,78,83,85,90,90}); param0.add(new int[]{-68,-92}); param0.add(new int[]{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}); param0.add(new int[]{80,74,45,81,62,88,90,54}); param0.add(new int[]{-92,-84,-84,-66,-64,-50,-50,-48,-46,-44,-36,-36,-30,-24,-22,-16,-6,-2,24,48,54,62,66,74,74,80,82,88,98,98}); param0.add(new int[]{0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,1,1}); param0.add(new int[]{2,6,11,12,14,36,45,49,52,52,58,63,70,73,74,80,82,89,89}); param0.add(new int[]{16,-58,-14,-58,-36,-70,36,-8,-14,-78,-26,42,16,18,0,-44,32,50,-78,58,78,16,-34,-54,50,0,46,-12,52,-74,78,-82,-26,-72,-86,-14,86,40,-8}); param0.add(new int[]{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}); param0.add(new int[]{58,82,79,77,84,79,39,98,53,84,19,9,93,30,6,82,8,43,17,44,62,21,34,86,98,44,81,14,82,54,44,53,36,33,2,68,19,37}); List param1 = new ArrayList<>(); param1.add(25); param1.add(1); param1.add(26); param1.add(4); param1.add(27); param1.add(43); param1.add(17); param1.add(26); param1.add(33); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int i, j; int leftsum, rightsum; for ( i = 0; i < n; ++ i ) { leftsum = 0; for ( j = 0; j < i; j ++ ) leftsum += arr [ j ]; rightsum = 0; for ( j = i + 1; j < n; j ++ ) rightsum += arr [ j ]; if ( leftsum == rightsum ) return i; } return - 1; } int main() { int n_success = 0; vector> param0 {{4,6,7,8,15,15,19,23,27,28,29,31,37,40,41,42,50,51,57,58,63,63,64,70,71,72,78,83,85,90,90},{-68,-92},{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},{80,74,45,81,62,88,90,54},{-92,-84,-84,-66,-64,-50,-50,-48,-46,-44,-36,-36,-30,-24,-22,-16,-6,-2,24,48,54,62,66,74,74,80,82,88,98,98},{0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,1,1},{2,6,11,12,14,36,45,49,52,52,58,63,70,73,74,80,82,89,89},{16,-58,-14,-58,-36,-70,36,-8,-14,-78,-26,42,16,18,0,-44,32,50,-78,58,78,16,-34,-54,50,0,46,-12,52,-74,78,-82,-26,-72,-86,-14,86,40,-8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{58,82,79,77,84,79,39,98,53,84,19,9,93,30,6,82,8,43,17,44,62,21,34,86,98,44,81,14,82,54,44,53,36,33,2,68,19,37}}; vector param1 {25,1,26,4,27,43,17,26,33,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, LONGEST_REPEATING_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_REPEATING_SUBSEQUENCE{ static int f_gold ( String str ) { int n = str . length ( ) ; int [ ] [ ] dp = new int [ n + 1 ] [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { if ( str . charAt ( i - 1 ) == str . charAt ( j - 1 ) && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] ; else dp [ i ] [ j ] = Math . max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) ; } } return dp [ n ] [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""JxZFz""); param0.add(""7648992235770""); param0.add(""11100000""); param0.add(""cRN SgYjPsctJ""); param0.add(""434""); param0.add(""1""); param0.add(""JRfZIAsbrPBZ""); param0.add(""03779368305592""); param0.add(""1111000""); param0.add(""BkULuIi""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) dp = [ [ 0 ] * ( n + 1 ) ] * ( n + 1 ) for i in range ( 1 , n + 1 ) : for j in range ( 1 , n + 1 ) : if ( str [ i - 1 ] == str [ j - 1 ] and i != j ) : dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] else : dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) return dp [ n ] [ n ] "," using namespace std; int f_gold ( string str ) { int n = str . length ( ); int dp [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n; j ++ ) dp [ i ] [ j ] = 0; for ( int i = 1; i <= n; i ++ ) { for ( int j = 1; j <= n; j ++ ) { if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); } } return dp [ n ] [ n ]; } int main() { int n_success = 0; vector param0 {""JxZFz"",""7648992235770"",""11100000"",""cRN SgYjPsctJ"",""434"",""1"",""JRfZIAsbrPBZ"",""03779368305592"",""1111000"",""BkULuIi""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('JxZFz',), ('7648992235770',), ('11100000',), ('cRN SgYjPsctJ',), ('434',), ('1',), ('JRfZIAsbrPBZ',), ('03779368305592',), ('1111000',), ('BkULuIi',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FAST_MULTIPLICATION_METHOD_WITHOUT_USING_MULTIPLICATION_OPERATOR_RUSSIAN_PEASANTS_ALGORITHM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FAST_MULTIPLICATION_METHOD_WITHOUT_USING_MULTIPLICATION_OPERATOR_RUSSIAN_PEASANTS_ALGORITHM{ static int f_gold ( int a , int b ) { int res = 0 ; while ( b > 0 ) { if ( ( b & 1 ) != 0 ) res = res + a ; a = a << 1 ; b = b >> 1 ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(4); param0.add(36); param0.add(65); param0.add(55); param0.add(35); param0.add(69); param0.add(84); param0.add(5); param0.add(15); param0.add(67); List param1 = new ArrayList<>(); param1.add(33); param1.add(67); param1.add(52); param1.add(37); param1.add(76); param1.add(98); param1.add(62); param1.add(80); param1.add(36); param1.add(84); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : res = 0 while ( b > 0 ) : if ( b & 1 ) : res = res + a a = a << 1 b = b >> 1 return res "," using namespace std; unsigned int f_gold ( unsigned int a, unsigned int b ) { int res = 0; while ( b > 0 ) { if ( b & 1 ) res = res + a; a = a << 1; b = b >> 1; } return res; } int main() { int n_success = 0; vector param0 {4,36,65,55,35,69,84,5,15,67}; vector param1 {33,67,52,37,76,98,62,80,36,84}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (4,33,), (36,67,), (65,52,), (55,37,), (35,76,), (69,98,), (84,62,), (5,80,), (15,36,), (67,84,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_1{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > hmap = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( hmap . containsKey ( arr [ i ] ) ) { int val = hmap . get ( arr [ i ] ) ; hmap . put ( arr [ i ] , val + 1 ) ; } else hmap . put ( arr [ i ] , 1 ) ; } for ( Integer a : hmap . keySet ( ) ) { if ( hmap . get ( a ) % 2 != 0 ) return a ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{49,90}); param0.add(new int[]{-96,94,92,-24,48,54,-30,-86,28,-18,12,-64,-36,68,68,-78,-6,30,-84,20,52,-36,40,-62,90,-48,86,98,12,44,98,-66,52,34,36,76,-50,-20,-20,-20}); param0.add(new int[]{0,1}); param0.add(new int[]{79,55,18,99,38,93,19,49,21,74,16,76,82,52,86,17,42,9,6,63,1,40,75,59,41,81}); param0.add(new int[]{-90,-84,-82,-68,-66,-66,-60,-60,-48,-44,-36,-34,-30,-16,-14,-12,-10,-6,2,10,10,14,22,26,30,34,46,50,52,62,64,64,66,72,74,78,78,82,84,88,92}); param0.add(new int[]{1,1,0,0,1,0,1,1,0,0,1,1,1,1,0,0,1,1,1,0,1,0,0,1,0,1}); param0.add(new int[]{2,4,5,7,7,18,18,23,23,25,25,31,41,43,45,46,52,52,55,64,69,69,80,81,84,90,91,93,94,94,94,94,96,98,99}); param0.add(new int[]{86,66,-8,2,-18,-22,38,4,-38,-54,78,64,78,20,-32,84,-70,66,-46,12,-12,8,44,14,20}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{11,4,98,38,20,41,1,8}); List param1 = new ArrayList<>(); param1.add(1); param1.add(39); param1.add(1); param1.add(23); param1.add(23); param1.add(18); param1.add(20); param1.add(20); param1.add(21); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , size ) : Hash = dict ( ) for i in range ( size ) : Hash [ arr [ i ] ] = Hash.get ( arr [ i ] , 0 ) + 1 ; for i in Hash : if ( Hash [ i ] % 2 != 0 ) : return i return - 1 "," using namespace std; int f_gold ( int arr [ ], int size ) { unordered_map < int, int > hash; for ( int i = 0; i < size; i ++ ) { hash [ arr [ i ] ] ++; } for ( auto i : hash ) { if ( i . second % 2 != 0 ) { return i . first; } } return - 1; } int main() { int n_success = 0; vector> param0 {{49,90},{-96,94,92,-24,48,54,-30,-86,28,-18,12,-64,-36,68,68,-78,-6,30,-84,20,52,-36,40,-62,90,-48,86,98,12,44,98,-66,52,34,36,76,-50,-20,-20,-20},{0,1},{79,55,18,99,38,93,19,49,21,74,16,76,82,52,86,17,42,9,6,63,1,40,75,59,41,81},{-90,-84,-82,-68,-66,-66,-60,-60,-48,-44,-36,-34,-30,-16,-14,-12,-10,-6,2,10,10,14,22,26,30,34,46,50,52,62,64,64,66,72,74,78,78,82,84,88,92},{1,1,0,0,1,0,1,1,0,0,1,1,1,1,0,0,1,1,1,0,1,0,0,1,0,1},{2,4,5,7,7,18,18,23,23,25,25,31,41,43,45,46,52,52,55,64,69,69,80,81,84,90,91,93,94,94,94,94,96,98,99},{86,66,-8,2,-18,-22,38,4,-38,-54,78,64,78,20,-32,84,-70,66,-46,12,-12,8,44,14,20},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{11,4,98,38,20,41,1,8}}; vector param1 {1,39,1,23,23,18,20,20,21,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([49, 90],1,), ([-96, 94, 92, -24, 48, 54, -30, -86, 28, -18, 12, -64, -36, 68, 68, -78, -6, 30, -84, 20, 52, -36, 40, -62, 90, -48, 86, 98, 12, 44, 98, -66, 52, 34, 36, 76, -50, -20, -20, -20],39,), ([0, 1],1,), ([79, 55, 18, 99, 38, 93, 19, 49, 21, 74, 16, 76, 82, 52, 86, 17, 42, 9, 6, 63, 1, 40, 75, 59, 41, 81],23,), ([-90, -84, -82, -68, -66, -66, -60, -60, -48, -44, -36, -34, -30, -16, -14, -12, -10, -6, 2, 10, 10, 14, 22, 26, 30, 34, 46, 50, 52, 62, 64, 64, 66, 72, 74, 78, 78, 82, 84, 88, 92],23,), ([1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1],18,), ([2, 4, 5, 7, 7, 18, 18, 23, 23, 25, 25, 31, 41, 43, 45, 46, 52, 52, 55, 64, 69, 69, 80, 81, 84, 90, 91, 93, 94, 94, 94, 94, 96, 98, 99],20,), ([86, 66, -8, 2, -18, -22, 38, 4, -38, -54, 78, 64, 78, 20, -32, 84, -70, 66, -46, 12, -12, 8, 44, 14, 20],20,), ([0, 0, 0, 0, 0, 0, 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,), ([11, 4, 98, 38, 20, 41, 1, 8],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2{ static int f_gold ( int n ) { n -- ; n |= n >> 1 ; n |= n >> 2 ; n |= n >> 4 ; n |= n >> 8 ; n |= n >> 16 ; n ++ ; return n ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(60); param0.add(20); param0.add(33); param0.add(34); param0.add(68); param0.add(79); param0.add(20); param0.add(41); param0.add(36); param0.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : n -= 1 n |= n >> 1 n |= n >> 2 n |= n >> 4 n |= n >> 8 n |= n >> 16 n += 1 return n "," using namespace std; unsigned int f_gold ( unsigned int n ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; } int main() { int n_success = 0; vector param0 {60,20,33,34,68,79,20,41,36,17}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (60,), (20,), (33,), (34,), (68,), (79,), (20,), (41,), (36,), (17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_LARGEST_D_IN_ARRAY_SUCH_THAT_A_B_C_D," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_LARGEST_D_IN_ARRAY_SUCH_THAT_A_B_C_D{ static int f_gold ( int [ ] S , int n ) { boolean found = false ; Arrays . sort ( S ) ; for ( int i = n - 1 ; i >= 0 ; i -- ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == j ) continue ; for ( int k = j + 1 ; k < n ; k ++ ) { if ( i == k ) continue ; for ( int l = k + 1 ; l < n ; l ++ ) { if ( i == l ) continue ; if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) { found = true ; return S [ i ] ; } } } } } if ( found == false ) return Integer . MAX_VALUE ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,12,14,15,16,20,27,28,29,30,35,41,46,51,53,55,55,58,63,64,72,73,75,75,75,82,82,86,89,91,92,94,95,95,97,97,98}); param0.add(new int[]{-62,48,-22,-44,-58,-50,-82,34,26,-2,86,-44,92,-96,42,-20,10,74,-56,-12,-28,-40}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1}); param0.add(new int[]{84,58,10,67,77,66,10,47,65,55,54}); param0.add(new int[]{-46,-28,-20,-18,4,8,18,38,90,90}); param0.add(new int[]{0,1,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0}); param0.add(new int[]{11,13,14,21,26,28,36,39,41,42,43,44,49,49,57,58,59,59,63,64,67,69,70,75,78,79,83,83,86,91,92,93,96,96,96,97}); param0.add(new int[]{74,52,-16,34,-88,62,54,46,-82,76,-48,54,50,-66,-18,78,-48,38,96,-32,-82,0,-76,46,-56,4,-30,-70,-62}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{55,74,18,4,68,66,33,61,66,92,21,9,49,14,99,87,74,6,11,25,5,58,56,20}); List param1 = new ArrayList<>(); param1.add(24); param1.add(19); param1.add(8); param1.add(5); param1.add(6); param1.add(35); param1.add(30); param1.add(16); param1.add(17); param1.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( S , n ) : found = False S.sort ( ) for i in range ( n - 1 , - 1 , - 1 ) : for j in range ( 0 , n ) : if ( i == j ) : continue for k in range ( j + 1 , n ) : if ( i == k ) : continue for l in range ( k + 1 , n ) : if ( i == l ) : continue if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) : found = True return S [ i ] if ( found == False ) : return - 1 "," using namespace std; int f_gold ( int S [ ], int n ) { bool found = false; sort ( S, S + n ); for ( int i = n - 1; i >= 0; i -- ) { for ( int j = 0; j < n; j ++ ) { if ( i == j ) continue; for ( int k = j + 1; k < n; k ++ ) { if ( i == k ) continue; for ( int l = k + 1; l < n; l ++ ) { if ( i == l ) continue; if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) { found = true; return S [ i ]; } } } } } if ( found == false ) return INT_MIN; } int main() { int n_success = 0; vector> param0 {{8,12,14,15,16,20,27,28,29,30,35,41,46,51,53,55,55,58,63,64,72,73,75,75,75,82,82,86,89,91,92,94,95,95,97,97,98},{-62,48,-22,-44,-58,-50,-82,34,26,-2,86,-44,92,-96,42,-20,10,74,-56,-12,-28,-40},{0,0,0,0,0,0,0,1,1,1},{84,58,10,67,77,66,10,47,65,55,54},{-46,-28,-20,-18,4,8,18,38,90,90},{0,1,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0},{11,13,14,21,26,28,36,39,41,42,43,44,49,49,57,58,59,59,63,64,67,69,70,75,78,79,83,83,86,91,92,93,96,96,96,97},{74,52,-16,34,-88,62,54,46,-82,76,-48,54,50,-66,-18,78,-48,38,96,-32,-82,0,-76,46,-56,4,-30,-70,-62},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{55,74,18,4,68,66,33,61,66,92,21,9,49,14,99,87,74,6,11,25,5,58,56,20}}; vector param1 {24,19,8,5,6,35,30,16,17,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 12, 14, 15, 16, 20, 27, 28, 29, 30, 35, 41, 46, 51, 53, 55, 55, 58, 63, 64, 72, 73, 75, 75, 75, 82, 82, 86, 89, 91, 92, 94, 95, 95, 97, 97, 98],24,), ([-62, 48, -22, -44, -58, -50, -82, 34, 26, -2, 86, -44, 92, -96, 42, -20, 10, 74, -56, -12, -28, -40],19,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1],8,), ([84, 58, 10, 67, 77, 66, 10, 47, 65, 55, 54],5,), ([-46, -28, -20, -18, 4, 8, 18, 38, 90, 90],6,), ([0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0],35,), ([11, 13, 14, 21, 26, 28, 36, 39, 41, 42, 43, 44, 49, 49, 57, 58, 59, 59, 63, 64, 67, 69, 70, 75, 78, 79, 83, 83, 86, 91, 92, 93, 96, 96, 96, 97],30,), ([74, 52, -16, 34, -88, 62, 54, 46, -82, 76, -48, 54, 50, -66, -18, 78, -48, 38, 96, -32, -82, 0, -76, 46, -56, 4, -30, -70, -62],16,), ([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,), ([55, 74, 18, 4, 68, 66, 33, 61, 66, 92, 21, 9, 49, 14, 99, 87, 74, 6, 11, 25, 5, 58, 56, 20],23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", N_TH_ROOT_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_ROOT_NUMBER{ static double f_gold ( int A , int N ) { double xPre = Math . random ( ) % 10 ; double eps = 0.001 ; double delX = 2147483647 ; double xK = 0.0 ; while ( delX > eps ) { xK = ( ( N - 1.0 ) * xPre + ( double ) A / Math . pow ( xPre , N - 1 ) ) / ( double ) N ; delX = Math . abs ( xK - xPre ) ; xPre = xK ; } return xK ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(94); param0.add(74); param0.add(29); param0.add(29); param0.add(18); param0.add(96); param0.add(3); param0.add(35); param0.add(51); param0.add(19); List param1 = new ArrayList<>(); param1.add(85); param1.add(1); param1.add(4); param1.add(11); param1.add(6); param1.add(92); param1.add(61); param1.add(85); param1.add(88); param1.add(54); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S{ static String f_gold ( String s , char c1 , char c2 ) { int l = s . length ( ) ; char [ ] arr = s . toCharArray ( ) ; for ( int i = 0 ; i < l ; i ++ ) { if ( arr [ i ] == c1 ) arr [ i ] = c2 ; else if ( arr [ i ] == c2 ) arr [ i ] = c1 ; } return String . valueOf ( arr ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""IZTSMw j""); param0.add(""7288334""); param0.add(""010110000""); param0.add(""b gJX""); param0.add(""734""); param0.add(""1""); param0.add(""xCaUKdhA""); param0.add(""4370992644981""); param0.add(""01010""); param0.add(""ZNIFGshaWA""); List param1 = new ArrayList<>(); param1.add('W'); param1.add('6'); param1.add('1'); param1.add('t'); param1.add('4'); param1.add('1'); param1.add('X'); param1.add('5'); param1.add('0'); param1.add('Q'); List param2 = new ArrayList<>(); param2.add('k'); param2.add('9'); param2.add('1'); param2.add('P'); param2.add('4'); param2.add('1'); param2.add('S'); param2.add('6'); param2.add('1'); param2.add('x'); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)).equals(f_gold(param0.get(i),param1.get(i),param2.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s , c1 , c2 ) : l = len ( s ) for i in range ( l ) : if ( s [ i ] == c1 ) : s = s [ 0 : i ] + c2 + s [ i + 1 : ] elif ( s [ i ] == c2 ) : s = s [ 0 : i ] + c1 + s [ i + 1 : ] return s "," using namespace std; string f_gold ( string s, char c1, char c2 ) { int l = s . length ( ); for ( int i = 0; i < l; i ++ ) { if ( s [ i ] == c1 ) s [ i ] = c2; else if ( s [ i ] == c2 ) s [ i ] = c1; } return s; } int main() { int n_success = 0; vector param0 {""IZTSMw j"",""7288334"",""010110000"",""b gJX"",""734"",""1"",""xCaUKdhA"",""4370992644981"",""01010"",""ZNIFGshaWA""}; vector param1 {'W','6','1','t','4','1','X','5','0','Q'}; vector param2 {'k','9','1','P','4','1','S','6','1','x'}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('IZTSMw j','W','k',), ('7288334','6','9',), ('010110000','1','1',), ('b gJX','t','P',), ('734','4','4',), ('1','1','1',), ('xCaUKdhA','X','S',), ('4370992644981','5','6',), ('01010','0','1',), ('ZNIFGshaWA','Q','x',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int i ; for ( i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == i ) return i ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,16,21,26,27,29,34,35,35,37,38,40,48,52,58,59,60,61,63,63,65,66,69,75,79,83,86,88,91,91,96}); param0.add(new int[]{22,-70,34,-44,84,54,14,-88}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{59,67,70,34,18,22,52,95,11,66,60,24,7,71,52,88,32,52,85,81,32,44,25,51,47,97,81,33,88,38,36,54,80,25,70,27,75,29,94}); param0.add(new int[]{-96,-96,-94,-88,-88,-82,-72,-72,-70,-70,-66,-64,-64,-62,-58,-54,-46,-44,-30,-26,-22,-8,-6,-2,0,26,30,30,34,42,42,48,64,76,90,96}); param0.add(new int[]{0,1,0,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,1,0,1,1}); param0.add(new int[]{2,2,4,7,10,15,16,16,23,24,27,39,42,58,60,64,72,74,78,78,78,80,80,84,85,86,88,88,90,92,93,94,95,96}); param0.add(new int[]{-68,-48,36,22,-80,-48,-74,-14,44,-46,-76,18,-16,-36,-68,0,-30,-56,42,92,82,64,-18,-6,-78,-86,26,86,36,-66,-50,18,-26,48,8}); param0.add(new int[]{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}); param0.add(new int[]{3,76,99,1,1,29,9,12,57,12,74,22,83,77,39,84,50,60,36,90,88,62,79,58,58,40,44,99,84,63,23,21,16,98,68,8,46}); List param1 = new ArrayList<>(); param1.add(23); param1.add(7); param1.add(31); param1.add(37); param1.add(34); param1.add(15); param1.add(22); param1.add(20); param1.add(23); param1.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : for i in range ( n ) : if arr [ i ] is i : return i return - 1 "," using namespace std; int f_gold ( int arr [ ], int n ) { int i; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] == i ) return i; } return - 1; } int main() { int n_success = 0; vector> param0 {{8,16,21,26,27,29,34,35,35,37,38,40,48,52,58,59,60,61,63,63,65,66,69,75,79,83,86,88,91,91,96},{22,-70,34,-44,84,54,14,-88},{0,0,0,0,0,0,0,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},{59,67,70,34,18,22,52,95,11,66,60,24,7,71,52,88,32,52,85,81,32,44,25,51,47,97,81,33,88,38,36,54,80,25,70,27,75,29,94},{-96,-96,-94,-88,-88,-82,-72,-72,-70,-70,-66,-64,-64,-62,-58,-54,-46,-44,-30,-26,-22,-8,-6,-2,0,26,30,30,34,42,42,48,64,76,90,96},{0,1,0,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,1,0,1,1},{2,2,4,7,10,15,16,16,23,24,27,39,42,58,60,64,72,74,78,78,78,80,80,84,85,86,88,88,90,92,93,94,95,96},{-68,-48,36,22,-80,-48,-74,-14,44,-46,-76,18,-16,-36,-68,0,-30,-56,42,92,82,64,-18,-6,-78,-86,26,86,36,-66,-50,18,-26,48,8},{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},{3,76,99,1,1,29,9,12,57,12,74,22,83,77,39,84,50,60,36,90,88,62,79,58,58,40,44,99,84,63,23,21,16,98,68,8,46}}; vector param1 {23,7,31,37,34,15,22,20,23,35}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 16, 21, 26, 27, 29, 34, 35, 35, 37, 38, 40, 48, 52, 58, 59, 60, 61, 63, 63, 65, 66, 69, 75, 79, 83, 86, 88, 91, 91, 96],23,), ([22, -70, 34, -44, 84, 54, 14, -88],7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([59, 67, 70, 34, 18, 22, 52, 95, 11, 66, 60, 24, 7, 71, 52, 88, 32, 52, 85, 81, 32, 44, 25, 51, 47, 97, 81, 33, 88, 38, 36, 54, 80, 25, 70, 27, 75, 29, 94],37,), ([-96, -96, -94, -88, -88, -82, -72, -72, -70, -70, -66, -64, -64, -62, -58, -54, -46, -44, -30, -26, -22, -8, -6, -2, 0, 26, 30, 30, 34, 42, 42, 48, 64, 76, 90, 96],34,), ([0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1],15,), ([2, 2, 4, 7, 10, 15, 16, 16, 23, 24, 27, 39, 42, 58, 60, 64, 72, 74, 78, 78, 78, 80, 80, 84, 85, 86, 88, 88, 90, 92, 93, 94, 95, 96],22,), ([-68, -48, 36, 22, -80, -48, -74, -14, 44, -46, -76, 18, -16, -36, -68, 0, -30, -56, 42, 92, 82, 64, -18, -6, -78, -86, 26, 86, 36, -66, -50, 18, -26, 48, 8],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,), ([3, 76, 99, 1, 1, 29, 9, 12, 57, 12, 74, 22, 83, 77, 39, 84, 50, 60, 36, 90, 88, 62, 79, 58, 58, 40, 44, 99, 84, 63, 23, 21, 16, 98, 68, 8, 46],35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1{ static int f_gold ( int n ) { return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(55); param0.add(36); param0.add(69); param0.add(92); param0.add(73); param0.add(16); param0.add(88); param0.add(19); param0.add(66); param0.add(68); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) // 2 ) ) "," using namespace std; int f_gold ( int n ) { return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 ); } int main() { int n_success = 0; vector param0 {55,36,69,92,73,16,88,19,66,68}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (55,), (36,), (69,), (92,), (73,), (16,), (88,), (19,), (66,), (68,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED_1{ static Boolean f_gold ( int arr [ ] , int n ) { HashSet < Integer > us = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) us . add ( arr [ i ] ) ; int count = 1 ; int curr_ele = arr [ 0 ] - 1 ; while ( us . contains ( curr_ele ) == true ) { count ++ ; curr_ele -- ; } curr_ele = arr [ 0 ] + 1 ; while ( us . contains ( curr_ele ) == true ) { count ++ ; curr_ele ++ ; } return ( count == ( us . size ( ) ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{15,19,38,59,71}); param0.add(new int[]{-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76}); param0.add(new int[]{0,0,1,1,1}); param0.add(new int[]{40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4}); param0.add(new int[]{-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72}); param0.add(new int[]{1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1}); param0.add(new int[]{7,32,54,70,79,88}); param0.add(new int[]{-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1}); param0.add(new int[]{49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,16}); List param1 = new ArrayList<>(); param1.add(3); param1.add(26); param1.add(4); param1.add(26); param1.add(16); param1.add(38); param1.add(5); param1.add(30); param1.add(12); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( int arr [ ], int n ) { unordered_set < int > us; for ( int i = 0; i < n; i ++ ) us . insert ( arr [ i ] ); int count = 1; int curr_ele = arr [ 0 ] - 1; while ( us . find ( curr_ele ) != us . end ( ) ) { count ++; curr_ele --; } curr_ele = arr [ 0 ] + 1; while ( us . find ( curr_ele ) != us . end ( ) ) { count ++; curr_ele ++; } return ( count == ( int ) ( us . size ( ) ) ); } int main() { int n_success = 0; vector> param0 {{15,19,38,59,71},{-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76},{0,0,1,1,1},{40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4},{-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72},{1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1},{7,32,54,70,79,88},{-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1},{49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,16}}; vector param1 {3,26,4,26,16,38,5,30,12,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR{ static int f_gold ( int n ) { return n * ( n - 1 ) * ( n - 2 ) / 6 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(58); param0.add(67); param0.add(60); param0.add(4); param0.add(97); param0.add(9); param0.add(16); param0.add(83); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( n * ( n - 1 ) * ( n - 2 ) // 6 ) "," using namespace std; int f_gold ( int n ) { return n * ( n - 1 ) * ( n - 2 ) / 6; } int main() { int n_success = 0; vector param0 {67,58,67,60,4,97,9,16,83,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (58,), (67,), (60,), (4,), (97,), (9,), (16,), (83,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS{ static int f_gold ( int n ) { int C [ ] [ ] = new int [ n + 1 ] [ n + 1 ] ; int i , j ; for ( i = 0 ; i <= n ; i ++ ) { for ( j = 0 ; j <= Math . min ( i , n ) ; j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1 ; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ; } } int sum = 0 ; for ( i = 0 ; i <= n ; i += 2 ) sum += C [ n ] [ i ] ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(18); param0.add(54); param0.add(67); param0.add(17); param0.add(47); param0.add(99); param0.add(26); param0.add(93); param0.add(57); param0.add(98); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : C = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] for i in range ( 0 , n + 1 ) : for j in range ( 0 , min ( i , n + 1 ) ) : if j == 0 or j == i : C [ i ] [ j ] = 1 else : C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] sum = 0 ; for i in range ( 0 , n + 1 ) : if n % 2 == 0 : sum = sum + C [ n ] [ i ] return sum "," using namespace std; int f_gold ( int n ) { int C [ n + 1 ] [ n + 1 ]; int i, j; for ( i = 0; i <= n; i ++ ) { for ( j = 0; j <= min ( i, n ); j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ]; } } int sum = 0; for ( int i = 0; i <= n; i += 2 ) sum += C [ n ] [ i ]; return sum; } int main() { int n_success = 0; vector param0 {18,54,67,17,47,99,26,93,57,98}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (18,), (54,), (67,), (17,), (47,), (99,), (26,), (93,), (57,), (98,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DECODE_MEDIAN_STRING_ORIGINAL_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DECODE_MEDIAN_STRING_ORIGINAL_STRING{ static String f_gold ( String s ) { int l = s . length ( ) ; String s1 = """" ; boolean isEven = ( l % 2 == 0 ) ? true : false ; for ( int i = 0 ; i < l ; i += 2 ) { if ( isEven ) { s1 = s . charAt ( i ) + s1 ; s1 += s . charAt ( i + 1 ) ; } else { if ( l - i > 1 ) { s1 += s . charAt ( i ) ; s1 = s . charAt ( i + 1 ) + s1 ; } else { s1 += s . charAt ( i ) ; } } } return s1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add("" EgvQCeqYpZtv""); param0.add(""488540""); param0.add(""0000101010111""); param0.add(""syw""); param0.add(""402355""); param0.add(""0""); param0.add(""wmHMlAtq""); param0.add(""7962""); param0.add(""111111""); param0.add(""UbgRGDquop""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : l = len ( s ) s1 = """" if ( l % 2 == 0 ) : isEven = True else : isEven = False for i in range ( 0 , l , 2 ) : if ( isEven ) : s1 = s [ i ] + s1 s1 += s [ i + 1 ] else : if ( l - i > 1 ) : s1 += s [ i ] s1 = s [ i + 1 ] + s1 else : s1 += s [ i ] return s1 "," using namespace std; string f_gold ( string s ) { int l = s . length ( ); string s1 = """"; bool isEven = ( l % 2 == 0 ) ? true : false; for ( int i = 0; i < l; i += 2 ) { if ( isEven ) { s1 = s [ i ] + s1; s1 += s [ i + 1 ]; } else { if ( l - i > 1 ) { s1 += s [ i ]; s1 = s [ i + 1 ] + s1; } else { s1 += s [ i ]; } } } return s1; } int main() { int n_success = 0; vector param0 {"" EgvQCeqYpZtv"",""488540"",""0000101010111"",""syw"",""402355"",""0"",""wmHMlAtq"",""7962"",""111111"",""UbgRGDquop""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (' EgvQCeqYpZtv',), ('488540',), ('0000101010111',), ('syw',), ('402355',), ('0',), ('wmHMlAtq',), ('7962',), ('111111',), ('UbgRGDquop',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING{ static String f_gold ( String str ) { String mx = """" ; for ( int i = 0 ; i < str . length ( ) ; ++ i ) { if ( mx . compareTo ( str . substring ( i ) ) <= 0 ) { mx = str . substring ( i ) ; } } return mx ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""HCoAefoaan""); param0.add(""80336005""); param0.add(""01111111110""); param0.add(""qIH""); param0.add(""4210598472796""); param0.add(""10101""); param0.add(""imqmKdatcgXjs""); param0.add(""950509666021""); param0.add(""10111101101""); param0.add(""wasqgYFvz""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : mx = """" for i in range ( len ( str ) ) : mx = max ( mx , str [ i : ] ) return mx "," using namespace std; string f_gold ( string str ) { string mx = """"; for ( int i = 0; i < str . length ( ); ++ i ) mx = max ( mx, str . substr ( i ) ); return mx; } int main() { int n_success = 0; vector param0 {""HCoAefoaan"",""80336005"",""01111111110"",""qIH"",""4210598472796"",""10101"",""imqmKdatcgXjs"",""950509666021"",""10111101101"",""wasqgYFvz""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('HCoAefoaan',), ('80336005',), ('01111111110',), ('qIH',), ('4210598472796',), ('10101',), ('imqmKdatcgXjs',), ('950509666021',), ('10111101101',), ('wasqgYFvz',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_LARGEST_PRIME_FACTOR_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_LARGEST_PRIME_FACTOR_NUMBER{ static long f_gold ( long n ) { long maxPrime = - 1 ; while ( n % 2 == 0 ) { maxPrime = 2 ; n >>= 1 ; } for ( int i = 3 ; i <= Math . sqrt ( n ) ; i += 2 ) { while ( n % i == 0 ) { maxPrime = i ; n = n / i ; } } if ( n > 2 ) maxPrime = n ; return maxPrime ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(98L); param0.add(8L); param0.add(78L); param0.add(65L); param0.add(55L); param0.add(10L); param0.add(10L); param0.add(37L); param0.add(39L); param0.add(15L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : maxPrime = - 1 while n % 2 == 0 : maxPrime = 2 n >>= 1 for i in range ( 3 , int ( math.sqrt ( n ) ) + 1 , 2 ) : while n % i == 0 : maxPrime = i n = n / i if n > 2 : maxPrime = n return int ( maxPrime ) "," using namespace std; long long f_gold ( long long n ) { long long maxPrime = - 1; while ( n % 2 == 0 ) { maxPrime = 2; n >>= 1; } for ( int i = 3; i <= sqrt ( n ); i += 2 ) { while ( n % i == 0 ) { maxPrime = i; n = n / i; } } if ( n > 2 ) maxPrime = n; return maxPrime; } int main() { int n_success = 0; vector param0 {98,8,78,65,55,10,10,37,39,15}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (98,), (8,), (78,), (65,), (55,), (10,), (10,), (37,), (39,), (15,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1{ static int f_gold ( int n ) { int nCr = 1 , res = 1 ; for ( int r = 1 ; r <= n ; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r ; res += nCr * nCr ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(52); param0.add(75); param0.add(25); param0.add(80); param0.add(18); param0.add(17); param0.add(33); param0.add(8); param0.add(99); param0.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : nCr = 1 res = 1 for r in range ( 1 , n + 1 ) : nCr = ( nCr * ( n + 1 - r ) ) / r ; res += nCr * nCr ; return res ; "," using namespace std; int f_gold ( int n ) { int nCr = 1, res = 1; for ( int r = 1; r <= n; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r; res += nCr * nCr; } return res; } int main() { int n_success = 0; vector param0 {52,75,25,80,18,17,33,8,99,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (52,), (75,), (25,), (80,), (18,), (17,), (33,), (8,), (99,), (8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION{ static int f_gold ( int a , int b ) { String s = String . valueOf ( b ) ; int i ; for ( i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) != '9' ) break ; } int result ; if ( i == s . length ( ) ) result = a * s . length ( ) ; else result = a * ( s . length ( ) - 1 ) ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(31); param0.add(72); param0.add(23); param0.add(42); param0.add(13); param0.add(93); param0.add(33); param0.add(94); param0.add(60); param0.add(11); List param1 = new ArrayList<>(); param1.add(91); param1.add(85); param1.add(49); param1.add(32); param1.add(7); param1.add(5); param1.add(32); param1.add(76); param1.add(60); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : s = str ( b ) i = 0 while i < ( len ( s ) ) : if ( s [ i ] != '9' ) : break i += 1 result = 0 if ( i == len ( s ) ) : result = a * len ( s ) else : result = a * ( len ( s ) - 1 ) return result "," using namespace std; int f_gold ( int a, int b ) { string s = to_string ( b ); int i; for ( i = 0; i < s . length ( ); i ++ ) { if ( s [ i ] != '9' ) break; } int result; if ( i == s . length ( ) ) result = a * s . length ( ); else result = a * ( s . length ( ) - 1 ); return result; } int main() { int n_success = 0; vector param0 {31,72,23,42,13,93,33,94,60,11}; vector param1 {91,85,49,32,7,5,32,76,60,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (31,91,), (72,85,), (23,49,), (42,32,), (13,7,), (93,5,), (33,32,), (94,76,), (60,60,), (11,26,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING_1{ public static int f_gold ( String s ) { int p = - 1 , i , k ; int MAX_CHAR = 256 ; int hash [ ] = new int [ MAX_CHAR ] ; int pos [ ] = new int [ MAX_CHAR ] ; for ( i = 0 ; i < s . length ( ) ; i ++ ) { k = ( int ) s . charAt ( i ) ; if ( hash [ k ] == 0 ) { hash [ k ] ++ ; pos [ k ] = i ; } else if ( hash [ k ] == 1 ) hash [ k ] ++ ; } for ( i = 0 ; i < MAX_CHAR ; i ++ ) { if ( hash [ i ] == 2 ) { if ( p == - 1 ) p = pos [ i ] ; else if ( p > pos [ i ] ) p = pos [ i ] ; } } return p ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""iwLT""); param0.add(""225168787""); param0.add(""00100111""); param0.add(""ktdzbGbqsvQ""); param0.add(""5574573212164""); param0.add(""01000110101101""); param0.add(""ftiv""); param0.add(""48956""); param0.add(""10100111001101""); param0.add(""YvhEOhhz""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, WILDCARD_CHARACTER_MATCHING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WILDCARD_CHARACTER_MATCHING{ static boolean f_gold ( String first , String second ) { if ( first . length ( ) == 0 && second . length ( ) == 0 ) return true ; if ( first . length ( ) > 1 && first . charAt ( 0 ) == '*' && second . length ( ) == 0 ) return false ; if ( ( first . length ( ) > 1 && first . charAt ( 0 ) == '?' ) || ( first . length ( ) != 0 && second . length ( ) != 0 && first . charAt ( 0 ) == second . charAt ( 0 ) ) ) return f_gold ( first . substring ( 1 ) , second . substring ( 1 ) ) ; if ( first . length ( ) > 0 && first . charAt ( 0 ) == '*' ) return f_gold ( first . substring ( 1 ) , second ) || f_gold ( first , second . substring ( 1 ) ) ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""g*ks""); param0.add(""ge?ks*""); param0.add(""g*k""); param0.add(""*pqrs""); param0.add(""abc*bcd""); param0.add(""abc*c?d""); param0.add(""*c*d""); param0.add(""*?c*d""); param0.add(""?*1""); param0.add(""a*""); List param1 = new ArrayList<>(); param1.add(""geeks""); param1.add(""geeksforgeeks""); param1.add(""gee""); param1.add(""pqrst""); param1.add(""abcdhghgbcd""); param1.add(""abcd""); param1.add(""abcd""); param1.add(""abcd""); param1.add(""010111111001""); param1.add(""CBzHMjUGCUJD""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( first , second ) : if len ( first ) == 0 and len ( second ) == 0 : return True if len ( first ) > 1 and first [ 0 ] == '*' and len ( second ) == 0 : return False if ( len ( first ) > 1 and first [ 0 ] == '?' ) or ( len ( first ) != 0 and len ( second ) != 0 and first [ 0 ] == second [ 0 ] ) : return f_gold ( first [ 1 : ] , second [ 1 : ] ) ; if len ( first ) != 0 and first [ 0 ] == '*' : return f_gold ( first [ 1 : ] , second ) or f_gold ( first , second [ 1 : ] ) return False ",,," if __name__ == '__main__': param = [ ('g*ks','geeks',), ('ge?ks*','geeksforgeeks',), ('g*k','gee',), ('*pqrs','pqrst',), ('abc*bcd','abcdhghgbcd',), ('abc*c?d','abcd',), ('*c*d','abcd',), ('*?c*d','abcd',), ('?*1','010111111001',), ('a*','CBzHMjUGCUJD',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_ELEMENT_REPEATED_EXACTLY_K_TIMES_NOT_LIMITED_SMALL_RANGE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_ELEMENT_REPEATED_EXACTLY_K_TIMES_NOT_LIMITED_SMALL_RANGE{ public static int f_gold ( int a [ ] , int n , int k ) { HashMap < Integer , Integer > m = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) if ( m . containsKey ( a [ i ] ) ) m . put ( a [ i ] , m . get ( a [ i ] ) + 1 ) ; else m . put ( a [ i ] , 1 ) ; int res = Integer . MAX_VALUE ; Set < Integer > s = m . keySet ( ) ; for ( int temp : s ) if ( m . get ( temp ) == k ) res = Math . min ( res , temp ) ; return ( res != Integer . MAX_VALUE ) ? res : - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,5,5,8,11,13,14,15,15,16,18,23,24,26,28,31,33,39,39,39,40,41,44,51,53,55,55,59,59,61,64,65,74,74,76,76,76,77,87,88,88,94,95,96}); param0.add(new int[]{-98,-64,-44,20,-46,96,-48,-54,-26,30,-42,94,58,-58,-54,50,6,-34,-44,-50,-66,-14,-96,74,4,-86,56,-46,-94,-24,-80,58,34,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{55,78,71,60,41,82,45,66,46,5,92,49,57,16,49,40,77,40,44,47,52,58,33,3,27,37,38,56,3,32,7,17,43,35,79,66,50,63,97,12,16}); param0.add(new int[]{-90,-86,-74,-68,-64,-56,-30,-24,-14,-2,0,2,8,16,18,20,24,30,32,36,42,54,62,62,62,62,76,78,90,92,94}); param0.add(new int[]{0,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,1,1}); param0.add(new int[]{4,5,5,5,10,13,17,17,20,20,22,25,28,36,40,42,49,51,57,59,65,66,66,68,72,74,78,81,87,88,94,95}); param0.add(new int[]{-12,-20,-78,-10,6,26,-94,-48,22,-2,12,-68,-90,-22,-94,-94,-10,-66,62,-20,74,-90,54,-52,90,50,60,10,56,-32,52,-12,-84,66,-82,34,24,-8,-60,-20,-94,80}); param0.add(new int[]{0,0,0,0,0,0,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}); param0.add(new int[]{2,57,53,3,63,29,12,99,21,26,3,35,96,84,48,61}); List param1 = new ArrayList<>(); param1.add(27); param1.add(26); param1.add(26); param1.add(32); param1.add(22); param1.add(18); param1.add(28); param1.add(28); param1.add(29); param1.add(10); List param2 = new ArrayList<>(); param2.add(2); param2.add(2); param2.add(1); param2.add(3); param2.add(2); param2.add(8); param2.add(7); param2.add(3); param2.add(2); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ",," using namespace std; int f_gold ( int a [ ], int n, int k ) { unordered_map < int, int > m; for ( int i = 0; i < n; i ++ ) m [ a [ i ] ] ++; int res = INT_MAX; for ( auto it = m . begin ( ); it != m . end ( ); ++ it ) if ( it -> second == k ) res = min ( res, it -> first ); return ( res != INT_MAX ) ? res : - 1; } int main() { int n_success = 0; vector> param0 {{1,5,5,8,11,13,14,15,15,16,18,23,24,26,28,31,33,39,39,39,40,41,44,51,53,55,55,59,59,61,64,65,74,74,76,76,76,77,87,88,88,94,95,96},{-98,-64,-44,20,-46,96,-48,-54,-26,30,-42,94,58,-58,-54,50,6,-34,-44,-50,-66,-14,-96,74,4,-86,56,-46,-94,-24,-80,58,34,24},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{55,78,71,60,41,82,45,66,46,5,92,49,57,16,49,40,77,40,44,47,52,58,33,3,27,37,38,56,3,32,7,17,43,35,79,66,50,63,97,12,16},{-90,-86,-74,-68,-64,-56,-30,-24,-14,-2,0,2,8,16,18,20,24,30,32,36,42,54,62,62,62,62,76,78,90,92,94},{0,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,1,1},{4,5,5,5,10,13,17,17,20,20,22,25,28,36,40,42,49,51,57,59,65,66,66,68,72,74,78,81,87,88,94,95},{-12,-20,-78,-10,6,26,-94,-48,22,-2,12,-68,-90,-22,-94,-94,-10,-66,62,-20,74,-90,54,-52,90,50,60,10,56,-32,52,-12,-84,66,-82,34,24,-8,-60,-20,-94,80},{0,0,0,0,0,0,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},{2,57,53,3,63,29,12,99,21,26,3,35,96,84,48,61}}; vector param1 {27,26,26,32,22,18,28,28,29,10}; vector param2 {2,2,1,3,2,8,7,3,2,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",,, COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1{ static int f_gold ( int n ) { int der [ ] = new int [ n + 1 ] ; der [ 0 ] = 1 ; der [ 1 ] = 0 ; der [ 2 ] = 1 ; for ( int i = 3 ; i <= n ; ++ i ) der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ) ; return der [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(22); param0.add(91); param0.add(33); param0.add(93); param0.add(90); param0.add(59); param0.add(88); param0.add(41); param0.add(70); param0.add(63); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : der = [ 0 for i in range ( n + 1 ) ] der [ 0 ] = 1 der [ 1 ] = 0 der [ 2 ] = 1 for i in range ( 3 , n + 1 ) : der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ) return der [ n ] "," using namespace std; int f_gold ( int n ) { int der [ n + 1 ]; der [ 0 ] = 1; der [ 1 ] = 0; der [ 2 ] = 1; for ( int i = 3; i <= n; ++ i ) der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ); return der [ n ]; } int main() { int n_success = 0; vector param0 {22,91,33,93,90,59,88,41,70,63}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (22,), (91,), (33,), (93,), (90,), (59,), (88,), (41,), (70,), (63,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int invcount = 0 ; for ( int i = 0 ; i < n - 2 ; i ++ ) { for ( int j = i + 1 ; j < n - 1 ; j ++ ) { if ( arr [ i ] > arr [ j ] ) { for ( int k = j + 1 ; k < n ; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++ ; } } } } return invcount ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{11,17,27,29,31,31,32,44,45,93}); param0.add(new int[]{-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86}); param0.add(new int[]{0,0,0,1,1,1,1,1,1}); param0.add(new int[]{78,82,51,92,88,95}); param0.add(new int[]{-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96}); param0.add(new int[]{1,0,0,0}); param0.add(new int[]{2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96}); param0.add(new int[]{-60,-42,20,52,-54,40,56}); param0.add(new int[]{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,1}); param0.add(new int[]{98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56}); List param1 = new ArrayList<>(); param1.add(5); param1.add(15); param1.add(6); param1.add(3); param1.add(47); param1.add(3); param1.add(39); param1.add(6); param1.add(37); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int invcount = 0; for ( int i = 0; i < n - 2; i ++ ) { for ( int j = i + 1; j < n - 1; j ++ ) { if ( arr [ i ] > arr [ j ] ) { for ( int k = j + 1; k < n; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++; } } } } return invcount; } int main() { int n_success = 0; vector> param0 {{11,17,27,29,31,31,32,44,45,93},{-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86},{0,0,0,1,1,1,1,1,1},{78,82,51,92,88,95},{-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96},{1,0,0,0},{2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96},{-60,-42,20,52,-54,40,56},{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,1},{98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56}}; vector param1 {5,15,6,3,47,3,39,6,37,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10{ static int f_gold ( String N ) { int len = N . length ( ) ; int l = ( len ) / 2 ; int count = 0 ; for ( int i = 1 ; i <= l ; i ++ ) { String s = N . substring ( 0 , i ) ; int l1 = s . length ( ) ; String t = N . substring ( i , l1 + i ) ; if ( s . charAt ( 0 ) == '0' || t . charAt ( 0 ) == '0' ) continue ; if ( s . compareTo ( t ) == 0 ) count ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ZCoQhuM""); param0.add(""2674377254""); param0.add(""11""); param0.add(""LbuGlvRyWAPBpo""); param0.add(""26382426486138""); param0.add(""111010111010""); param0.add(""hUInqJXNdbfP""); param0.add(""5191""); param0.add(""1110101101""); param0.add(""2202200""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N ) : length = len ( N ) l = int ( ( length ) / 2 ) count = 0 for i in range ( l + 1 ) : s = N [ 0 : 0 + i ] l1 = len ( s ) t = N [ i : l1 + i ] try : if s [ 0 ] == '0' or t [ 0 ] == '0' : continue except : continue if s == t : count += 1 return count "," using namespace std; int f_gold ( string N ) { int len = N . length ( ); int l = ( len ) / 2; int count = 0; for ( int i = 1; i <= l; i ++ ) { string s = N . substr ( 0, i ); int l1 = s . length ( ); string t = N . substr ( i, l1 ); if ( s [ 0 ] == '0' || t [ 0 ] == '0' ) continue; if ( s . compare ( t ) == 0 ) count ++; } return count; } int main() { int n_success = 0; vector param0 {""ZCoQhuM"",""2674377254"",""11"",""LbuGlvRyWAPBpo"",""26382426486138"",""111010111010"",""hUInqJXNdbfP"",""5191"",""1110101101"",""2202200""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('ZCoQhuM',), ('2674377254',), ('11',), ('LbuGlvRyWAPBpo',), ('26382426486138',), ('111010111010',), ('hUInqJXNdbfP',), ('5191',), ('1110101101',), ('2202200',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DOUBLE_FACTORIAL_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DOUBLE_FACTORIAL_1{ static int f_gold ( int n ) { int res = 1 ; for ( int i = n ; i >= 0 ; i = i - 2 ) { if ( i == 0 || i == 1 ) return res ; else res *= i ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(88); param0.add(24); param0.add(3); param0.add(22); param0.add(53); param0.add(2); param0.add(88); param0.add(30); param0.add(38); param0.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : res = 1 ; for i in range ( n , - 1 , - 2 ) : if ( i == 0 or i == 1 ) : return res ; else : res *= i ; "," using namespace std; unsigned int f_gold ( unsigned int n ) { int res = 1; for ( int i = n; i >= 0; i = i - 2 ) { if ( i == 0 || i == 1 ) return res; else res *= i; } } int main() { int n_success = 0; vector param0 {88,24,3,22,53,2,88,30,38,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (88,), (24,), (3,), (22,), (53,), (2,), (88,), (30,), (38,), (2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME{ static int f_gold ( int n ) { int table [ ] = new int [ n + 1 ] , i ; Arrays . fill ( table , 0 ) ; table [ 0 ] = 1 ; for ( i = 3 ; i <= n ; i ++ ) table [ i ] += table [ i - 3 ] ; for ( i = 5 ; i <= n ; i ++ ) table [ i ] += table [ i - 5 ] ; for ( i = 10 ; i <= n ; i ++ ) table [ i ] += table [ i - 10 ] ; return table [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(83); param0.add(29); param0.add(17); param0.add(12); param0.add(93); param0.add(55); param0.add(97); param0.add(75); param0.add(22); param0.add(52); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : table = [ 0 for i in range ( n + 1 ) ] table [ 0 ] = 1 for i in range ( 3 , n + 1 ) : table [ i ] += table [ i - 3 ] for i in range ( 5 , n + 1 ) : table [ i ] += table [ i - 5 ] for i in range ( 10 , n + 1 ) : table [ i ] += table [ i - 10 ] return table [ n ] "," using namespace std; int f_gold ( int n ) { int table [ n + 1 ], i; for ( int j = 0; j < n + 1; j ++ ) table [ j ] = 0; table [ 0 ] = 1; for ( i = 3; i <= n; i ++ ) table [ i ] += table [ i - 3 ]; for ( i = 5; i <= n; i ++ ) table [ i ] += table [ i - 5 ]; for ( i = 10; i <= n; i ++ ) table [ i ] += table [ i - 10 ]; return table [ n ]; } int main() { int n_success = 0; vector param0 {83,29,17,12,93,55,97,75,22,52}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (83,), (29,), (17,), (12,), (93,), (55,), (97,), (75,), (22,), (52,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ{ public static int f_gold ( int n , int k ) { if ( n + 1 >= k ) return ( k - 1 ) ; else return ( 2 * n + 1 - k ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(90); param0.add(86); param0.add(92); param0.add(72); param0.add(25); param0.add(11); param0.add(94); param0.add(91); param0.add(66); param0.add(34); List param1 = new ArrayList<>(); param1.add(74); param1.add(36); param1.add(38); param1.add(71); param1.add(57); param1.add(53); param1.add(80); param1.add(75); param1.add(58); param1.add(88); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n, k): if (n + 1 >= k): return (k - 1) else: return (2 * n + 1 - k) "," using namespace std; int f_gold ( int n, int k ) { if ( n + 1 >= k ) return ( k - 1 ); else return ( 2 * n + 1 - k ); } int main() { int n_success = 0; vector param0 {90,86,92,72,25,11,94,91,66,34}; vector param1 {74,36,38,71,57,53,80,75,58,88}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (90, 74,), (86, 36,), (92, 38,), (72, 71,), (25, 57,), (11, 53,), (94, 80,), (91, 75,), (66, 58,), (34, 88,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X{ static long f_gold ( long y , long x ) { if ( ( Math . log ( y ) / Math . log ( 2 ) ) < x ) return y ; if ( x > 63 ) return y ; return ( y % ( 1 << ( int ) x ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57L); param0.add(80L); param0.add(84L); param0.add(35L); param0.add(3L); param0.add(42L); param0.add(7L); param0.add(99L); param0.add(13L); param0.add(44L); List param1 = new ArrayList<>(); param1.add(76L); param1.add(46L); param1.add(96L); param1.add(16L); param1.add(84L); param1.add(79L); param1.add(2L); param1.add(83L); param1.add(61L); param1.add(8L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( y , x ) : return ( y % pow ( 2 , x ) ) "," using namespace std; long long int f_gold ( long long int y, long long int x ) { if ( log2 ( y ) < x ) return y; if ( x > 63 ) return y; return ( y % ( 1 << x ) ); } int main() { int n_success = 0; vector param0 {57,80,84,35,3,42,7,99,13,44}; vector param1 {76,46,96,16,84,79,2,83,61,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,76,), (80,46,), (84,96,), (35,16,), (3,84,), (42,79,), (7,2,), (99,83,), (13,61,), (44,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS{ static int f_gold ( int n ) { int table [ ] = new int [ n + 1 ] ; Arrays . fill ( table , 0 ) ; table [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) for ( int j = i ; j <= n ; j ++ ) table [ j ] += table [ j - i ] ; return table [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(66); param0.add(90); param0.add(8); param0.add(77); param0.add(44); param0.add(20); param0.add(34); param0.add(22); param0.add(50); param0.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int n ) { int table [ n + 1 ]; memset ( table, 0, sizeof ( table ) ); table [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) for ( int j = i; j <= n; j ++ ) table [ j ] += table [ j - i ]; return table [ n ]; } int main() { int n_success = 0; vector param0 {66,90,8,77,44,20,34,22,50,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME{ static int f_gold ( int arr [ ] , int n ) { int count = 0 ; int cummulative_sum = 0 ; Arrays . sort ( arr ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] >= cummulative_sum ) { count ++ ; cummulative_sum += arr [ i ] ; } } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,33,34,42,42,45,73}); param0.add(new int[]{32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14}); param0.add(new int[]{0,0,0,0,1}); param0.add(new int[]{11,85,89,71,82,44}); param0.add(new int[]{-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98}); param0.add(new int[]{0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1}); param0.add(new int[]{8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97}); param0.add(new int[]{96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,67}); List param1 = new ArrayList<>(); param1.add(5); param1.add(16); param1.add(2); param1.add(3); param1.add(21); param1.add(16); param1.add(31); param1.add(20); param1.add(13); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : count = 0 cummulative_sum = 0 arr.sort ( ) for i in range ( n ) : if arr [ i ] >= cummulative_sum : count += 1 cummulative_sum += arr [ i ] return count "," using namespace std; int f_gold ( int arr [ ], int n ) { int count = 0; int cummulative_sum = 0; sort ( arr, arr + n ); for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] >= cummulative_sum ) { count ++; cummulative_sum += arr [ i ]; } } return count; } int main() { int n_success = 0; vector> param0 {{7,33,34,42,42,45,73},{32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14},{0,0,0,0,1},{11,85,89,71,82,44},{-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98},{0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1},{8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97},{96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,67}}; vector param1 {5,16,2,3,21,16,31,20,13,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 33, 34, 42, 42, 45, 73],5,), ([32, -10, -64, -20, 92, -66, 6, 44, -62, -98, 4, -48, 44, 42, 12, -90, 52, 86, -30, -80, 64, 94, 14],16,), ([0, 0, 0, 0, 1],2,), ([11, 85, 89, 71, 82, 44],3,), ([-96, -92, -78, -72, -68, -58, -52, -50, -50, -48, -42, -32, -20, -18, -4, 0, 0, 2, 18, 18, 20, 24, 32, 34, 36, 38, 38, 60, 66, 68, 70, 72, 72, 74, 76, 96, 98],21,), ([0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1],16,), ([8, 9, 10, 11, 12, 15, 17, 19, 20, 21, 24, 30, 33, 35, 36, 39, 41, 41, 42, 54, 62, 63, 68, 70, 71, 72, 77, 85, 86, 86, 94, 95, 97, 97],31,), ([96, 22, -60, 4, -94, -16, 46, 10, 76, -90, 4, 70, -72, 60, 28, -24, -66, 92, -70, 72, 36],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([90, 63, 16, 40, 28, 97, 20, 63, 42, 31, 57, 84, 10, 12, 59, 69, 47, 7, 53, 67],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME{ static boolean f_gold ( String s ) { int l = s . length ( ) ; for ( int i = 0 , j = l - 1 ; i <= j ; i ++ , j -- ) { if ( s . charAt ( i ) != s . charAt ( j ) ) { return false ; } } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""aadaa""); param0.add(""2674377254""); param0.add(""11""); param0.add(""0011000 ""); param0.add(""26382426486138""); param0.add(""111010111010""); param0.add(""abccba""); param0.add(""5191""); param0.add(""1110101101""); param0.add(""abcdecbe""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : l = len ( s ) i = 0 j = l - 1 while i <= j : if ( s [ i ] != s [ j ] ) : return False i += 1 j -= 1 return True "," using namespace std; bool f_gold ( string s ) { int l = s . length ( ); int j; for ( int i = 0, j = l - 1; i <= j; i ++, j -- ) { if ( s [ i ] != s [ j ] ) return false; } return true; } int main() { int n_success = 0; vector param0 {""aadaa"",""2674377254"",""11"",""0011000"",""26382426486138"",""111010111010"",""abccba"",""5191"",""1110101101"",""abcdecbe""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('aadaa',), ('2674377254',), ('11',), ('0011000 ',), ('26382426486138',), ('111010111010',), ('abccba',), ('5191',), ('1110101101',), ('abcdecbe',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES{ static boolean f_gold ( String str1 , String str2 ) { if ( str1 . length ( ) != str2 . length ( ) ) return false ; String clock_rot = """" ; String anticlock_rot = """" ; int len = str2 . length ( ) ; anticlock_rot = anticlock_rot + str2 . substring ( len - 2 , len ) + str2 . substring ( 0 , len - 2 ) ; clock_rot = clock_rot + str2 . substring ( 2 ) + str2 . substring ( 0 , 2 ) ; return ( str1 . equals ( clock_rot ) || str1 . equals ( anticlock_rot ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""amazon""); param0.add(""onamaz""); param0.add(""amazon""); param0.add(""ab""); param0.add(""737009""); param0.add(""000110""); param0.add(""l""); param0.add(""4420318628""); param0.add(""11011111000000""); param0.add("" pvFHANc""); List param1 = new ArrayList<>(); param1.add(""azonam""); param1.add(""amazon""); param1.add(""azoman""); param1.add(""ab""); param1.add(""239119""); param1.add(""01111""); param1.add(""YVo hqvnGxow""); param1.add(""52856""); param1.add(""10""); param1.add(""xBIDFbiGb""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str1 , str2 ) : if ( len ( str1 ) != len ( str2 ) ) : return False clock_rot = """" anticlock_rot = """" l = len ( str2 ) anticlock_rot = ( anticlock_rot + str2 [ l - 2 : ] + str2 [ 0 : l - 2 ] ) clock_rot = clock_rot + str2 [ 2 : ] + str2 [ 0 : 2 ] return ( str1 == clock_rot or str1 == anticlock_rot ) "," using namespace std; bool f_gold ( string str1, string str2 ) { if ( str1 . length ( ) != str2 . length ( ) ) return false; string clock_rot = """"; string anticlock_rot = """"; int len = str2 . length ( ); anticlock_rot = anticlock_rot + str2 . substr ( len - 2, 2 ) + str2 . substr ( 0, len - 2 ); clock_rot = clock_rot + str2 . substr ( 2 ) + str2 . substr ( 0, 2 ); return ( str1 . compare ( clock_rot ) == 0 || str1 . compare ( anticlock_rot ) == 0 ); } int main() { int n_success = 0; vector param0 {""amazon"",""onamaz"",""amazon"",""ab"",""737009"",""000110"",""l"",""4420318628"",""11011111000000"","" pvFHANc""}; vector param1 {""azonam"",""amazon"",""azoman"",""ab"",""239119"",""01111"",""YVo hqvnGxow"",""52856"",""10"",""xBIDFbiGb""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (""amazon"",""azonam"",), (""onamaz"",""amazon"",), (""amazon"",""azoman"",), (""ab"",""ab"",), ('737009','239119',), ('000110','01111',), ('l','YVo hqvnGxow',), ('4420318628','52856',), ('11011111000000','10',), (' pvFHANc','xBIDFbiGb',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REQUIRED_MINIMUM_DIGITS_REMOVE_NUMBER_MAKE_PERFECT_SQUARE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REQUIRED_MINIMUM_DIGITS_REMOVE_NUMBER_MAKE_PERFECT_SQUARE{ static int f_gold ( String s ) { int n = s . length ( ) ; int ans = - 1 ; String num = """" ; for ( int i = 1 ; i < ( 1 << n ) ; i ++ ) { String str = """" ; for ( int j = 0 ; j < n ; j ++ ) { if ( ( ( i >> j ) & 1 ) == 1 ) { str += s . charAt ( j ) ; } } if ( str . charAt ( 0 ) != '0' ) { int temp = 0 ; for ( int j = 0 ; j < str . length ( ) ; j ++ ) temp = temp * 10 + ( int ) ( str . charAt ( j ) - '0' ) ; int k = ( int ) Math . sqrt ( temp ) ; if ( k * k == temp ) { if ( ans < ( int ) str . length ( ) ) { ans = ( int ) str . length ( ) ; num = str ; } } } } if ( ans == - 1 ) return ans ; else { System . out . print ( num + "" "" ) ; return n - ans ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""h""); param0.add(""1391212""); param0.add(""010""); param0.add(""ksRFLRVL""); param0.add(""5809836998""); param0.add(""1111000""); param0.add(""hJoDzrrBaF""); param0.add(""6076""); param0.add(""001010010""); param0.add(""lU DBBVF""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string s ) { int n = s . size ( ); int ans = - 1; string num; for ( int i = 1; i < ( 1 << n ); i ++ ) { string str = """"; for ( int j = 0; j < n; j ++ ) { if ( ( i >> j ) & 1 ) { str += s [ j ]; } } if ( str [ 0 ] != '0' ) { int temp = 0; for ( int j = 0; j < str . size ( ); j ++ ) temp = temp * 10 + ( int ) ( str [ j ] - '0' ); int k = sqrt ( temp ); if ( k * k == temp ) { if ( ans < ( int ) str . size ( ) ) { ans = ( int ) str . size ( ); num = str; } } } } if ( ans == - 1 ) return ans; else { cout << num << "" ""; return n - ans; } } int main() { int n_success = 0; vector param0 {""h"",""1391212"",""010"",""ksRFLRVL"",""5809836998"",""1111000"",""hJoDzrrBaF"",""6076"",""001010010"",""lU DBBVF""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MINIMUM_ROTATIONS_REQUIRED_GET_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_ROTATIONS_REQUIRED_GET_STRING{ static int f_gold ( String str ) { String tmp = str + str ; int n = str . length ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { String substring = tmp . substring ( i , str . length ( ) ) ; if ( str == substring ) return i ; } return n ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""vdevdNdQSopPtj""); param0.add(""5""); param0.add(""100010101011""); param0.add(""tlDOvJHAyMllu""); param0.add(""06""); param0.add(""101""); param0.add(""DYgtU""); param0.add(""4""); param0.add(""00""); param0.add(""Dt""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : tmp = str + str n = len ( str ) for i in range ( 1 , n + 1 ) : substring = tmp [ i : n ] if ( str == substring ) : return i return n "," using namespace std; int f_gold ( string str ) { string tmp = str + str; int n = str . length ( ); for ( int i = 1; i <= n; i ++ ) { string substring = tmp . substr ( i, str . size ( ) ); if ( str == substring ) return i; } return n; } int main() { int n_success = 0; vector param0 {""vdevdNdQSopPtj"",""5"",""100010101011"",""tlDOvJHAyMllu"",""06"",""101"",""DYgtU"",""4"",""00"",""Dt""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('vdevdNdQSopPtj',), ('5',), ('100010101011',), ('tlDOvJHAyMllu',), ('06',), ('101',), ('DYgtU',), ('4',), ('00',), ('Dt',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { int cum_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) cum_sum += arr [ i ] ; int curr_val = 0 ; for ( int i = 0 ; i < n ; i ++ ) curr_val += i * arr [ i ] ; int res = curr_val ; for ( int i = 1 ; i < n ; i ++ ) { int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ) ; curr_val = next_val ; res = Math . max ( res , next_val ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98}); param0.add(new int[]{-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24}); param0.add(new int[]{-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96}); param0.add(new int[]{1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1}); param0.add(new int[]{9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97}); param0.add(new int[]{52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,20}); param0.add(new int[]{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}); param0.add(new int[]{45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9}); List param1 = new ArrayList<>(); param1.add(13); param1.add(27); param1.add(10); param1.add(39); param1.add(11); param1.add(15); param1.add(22); param1.add(45); param1.add(33); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : cum_sum = 0 for i in range ( 0 , n ) : cum_sum += arr [ i ] curr_val = 0 for i in range ( 0 , n ) : curr_val += i * arr [ i ] res = curr_val for i in range ( 1 , n ) : next_val = ( curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ) ) curr_val = next_val res = max ( res , next_val ) return res "," using namespace std; int f_gold ( int arr [ ], int n ) { int cum_sum = 0; for ( int i = 0; i < n; i ++ ) cum_sum += arr [ i ]; int curr_val = 0; for ( int i = 0; i < n; i ++ ) curr_val += i * arr [ i ]; int res = curr_val; for ( int i = 1; i < n; i ++ ) { int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ); curr_val = next_val; res = max ( res, next_val ); } return res; } int main() { int n_success = 0; vector> param0 {{6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98},{-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34},{0,0,0,0,0,1,1,1,1,1,1},{37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24},{-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96},{1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1},{9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97},{52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,20},{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},{45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9}}; vector param1 {13,27,10,39,11,15,22,45,33,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 6, 13, 14, 16, 20, 24, 24, 24, 27, 28, 36, 49, 51, 55, 56, 62, 69, 74, 74, 76, 85, 86, 90, 92, 98],13,), ([-42, 96, 68, 64, 14, -74, 76, 42, 34, -92, -20, 28, -80, -34, -22, 96, -46, 96, 10, -82, 82, 50, -24, 48, 56, 72, -40, -86, 84, 66, -62, 50, -76, 34],27,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],10,), ([37, 88, 70, 86, 24, 62, 34, 44, 37, 42, 46, 34, 23, 32, 55, 2, 5, 70, 30, 46, 40, 65, 91, 4, 7, 74, 46, 12, 30, 22, 1, 91, 89, 88, 97, 6, 6, 11, 33, 14, 68, 24],39,), ([-92, -90, -70, -70, -10, 2, 10, 12, 14, 40, 44, 46, 64, 68, 68, 96],11,), ([1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1],15,), ([9, 15, 15, 17, 19, 20, 21, 23, 25, 25, 25, 32, 32, 33, 45, 51, 54, 59, 68, 71, 71, 71, 72, 75, 78, 80, 82, 82, 88, 89, 92, 93, 94, 97],22,), ([52, -78, -80, 32, -56, -98, -36, 86, 34, -36, 42, 46, 50, 0, 34, -46, -2, -18, -96, 12, -42, 62, 32, 78, 66, -8, 50, 60, 10, -18, 66, 80, -24, -98, 8, 48, 34, 44, -80, -34, 72, 0, -60, 52, 40, 20],45,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],33,), ([45, 35, 25, 7, 24, 73, 25, 86, 48, 70, 47, 91, 96, 15, 39, 9],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SQUARE_ROOT_OF_A_PERFECT_SQUARE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_ROOT_OF_A_PERFECT_SQUARE_1{ static long f_gold ( int n ) { int x = n ; int y = 1 ; while ( x > y ) { x = ( x + y ) / 2 ; y = n / x ; } return ( long ) x ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(58); param0.add(55); param0.add(51); param0.add(42); param0.add(2); param0.add(30); param0.add(77); param0.add(82); param0.add(31); param0.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS{ static int f_gold ( int arr [ ] , int N , int K ) { Arrays . sort ( arr ) ; int res = 2147483647 ; for ( int i = 0 ; i <= ( N - K ) ; i ++ ) { int curSeqDiff = arr [ i + K - 1 ] - arr [ i ] ; res = Math . min ( res , curSeqDiff ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,4,18,21,35,37,39,76,81,86,92,96}); param0.add(new int[]{-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34}); param0.add(new int[]{-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92}); param0.add(new int[]{0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1}); param0.add(new int[]{6,7,9,27,30,42,54,55,57,57,59,76,84,84,84}); param0.add(new int[]{88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12}); param0.add(new int[]{0,1}); param0.add(new int[]{89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,10}); List param1 = new ArrayList<>(); param1.add(7); param1.add(9); param1.add(16); param1.add(17); param1.add(21); param1.add(21); param1.add(13); param1.add(31); param1.add(1); param1.add(22); List param2 = new ArrayList<>(); param2.add(6); param2.add(12); param2.add(26); param2.add(20); param2.add(12); param2.add(22); param2.add(14); param2.add(26); param2.add(1); param2.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , N , K ) : arr.sort ( ) res = 2147483647 for i in range ( ( N - K ) + 1 ) : curSeqDiff = arr [ i + K - 1 ] - arr [ i ] res = min ( res , curSeqDiff ) return res "," using namespace std; int f_gold ( int arr [ ], int N, int K ) { sort ( arr, arr + N ); int res = INT_MAX; for ( int i = 0; i <= ( N - K ); i ++ ) { int curSeqDiff = arr [ i + K - 1 ] - arr [ i ]; res = min ( res, curSeqDiff ); } return res; } int main() { int n_success = 0; vector> param0 {{1,1,4,18,21,35,37,39,76,81,86,92,96},{-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34},{-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92},{0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1},{6,7,9,27,30,42,54,55,57,57,59,76,84,84,84},{88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12},{0,1},{89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,10}}; vector param1 {7,9,16,17,21,21,13,31,1,22}; vector param2 {6,12,26,20,12,22,14,26,1,14}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 1, 4, 18, 21, 35, 37, 39, 76, 81, 86, 92, 96],7,6,), ([-8, -6, 62, 52, -86, 2, -94, 0, -48, -38, 24, -48, 34],9,12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,26,), ([23, 36, 43, 50, 74, 81, 94, 13, 30, 57, 30, 71, 10, 99, 66, 94, 83, 39, 37, 3, 89, 34],17,20,), ([-96, -94, -92, -84, -80, -72, -24, -22, -18, -14, 6, 8, 26, 28, 30, 36, 50, 58, 80, 84, 92, 92],21,12,), ([0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1],21,22,), ([6, 7, 9, 27, 30, 42, 54, 55, 57, 57, 59, 76, 84, 84, 84],13,14,), ([88, 44, -96, -72, -80, 0, -64, -64, -68, 4, 38, 4, -38, 68, -54, 92, -16, 62, 24, 54, 0, 54, 62, -70, 80, -12, 84, -16, -10, 88, -30, -56, 48, 50, -24, 94, 40, 28, -86, -12],31,26,), ([0, 1],1,1,), ([89, 18, 7, 54, 67, 93, 10, 61, 59, 59, 69, 63, 98, 8, 78, 55, 6, 1, 56, 97, 75, 88, 10],22,14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SORT_ARRAY_APPLYING_GIVEN_EQUATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class SORT_ARRAY_APPLYING_GIVEN_EQUATION{ static void f_gold ( int arr [ ] , int n , int A , int B , int C ) { for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = A * arr [ i ] * arr [ i ] + B * arr [ i ] + C ; int index = - 1 ; int maximum = - 999999 ; for ( int i = 0 ; i < n ; i ++ ) { if ( maximum < arr [ i ] ) { index = i ; maximum = arr [ i ] ; } } int i = 0 , j = n - 1 ; int [ ] new_arr = new int [ n ] ; int k = 0 ; while ( i < index && j > index ) { if ( arr [ i ] < arr [ j ] ) new_arr [ k ++ ] = arr [ i ++ ] ; else new_arr [ k ++ ] = arr [ j -- ] ; } while ( i < index ) new_arr [ k ++ ] = arr [ i ++ ] ; while ( j > index ) new_arr [ k ++ ] = arr [ j -- ] ; new_arr [ n - 1 ] = maximum ; for ( int p = 0 ; p < n ; p ++ ) arr [ p ] = new_arr [ p ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,30,49,65,78,85,85,92}); param0.add(new int[]{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16}); param0.add(new int[]{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}); param0.add(new int[]{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18}); param0.add(new int[]{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88}); param0.add(new int[]{0,0,0,1,1,0,1,1,1,1}); param0.add(new int[]{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95}); param0.add(new int[]{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}); List param1 = new ArrayList<>(); param1.add(4); param1.add(18); param1.add(25); param1.add(33); param1.add(8); param1.add(7); param1.add(22); param1.add(20); param1.add(23); param1.add(28); List param2 = new ArrayList<>(); param2.add(4); param2.add(20); param2.add(26); param2.add(42); param2.add(12); param2.add(8); param2.add(33); param2.add(16); param2.add(21); param2.add(21); List param3 = new ArrayList<>(); param3.add(5); param3.add(20); param3.add(15); param3.add(35); param3.add(8); param3.add(6); param3.add(19); param3.add(19); param3.add(19); param3.add(23); List param4 = new ArrayList<>(); param4.add(4); param4.add(23); param4.add(18); param4.add(41); param4.add(8); param4.add(7); param4.add(25); param4.add(16); param4.add(23); param4.add(23); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{9,30,49,65,78,85,85,92}); filled_function_param0.add(new int[]{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18}); filled_function_param0.add(new int[]{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88}); filled_function_param0.add(new int[]{0,0,0,1,1,0,1,1,1,1}); filled_function_param0.add(new int[]{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95}); filled_function_param0.add(new int[]{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(4); filled_function_param1.add(18); filled_function_param1.add(25); filled_function_param1.add(33); filled_function_param1.add(8); filled_function_param1.add(7); filled_function_param1.add(22); filled_function_param1.add(20); filled_function_param1.add(23); filled_function_param1.add(28); List filled_function_param2 = new ArrayList<>(); filled_function_param2.add(4); filled_function_param2.add(20); filled_function_param2.add(26); filled_function_param2.add(42); filled_function_param2.add(12); filled_function_param2.add(8); filled_function_param2.add(33); filled_function_param2.add(16); filled_function_param2.add(21); filled_function_param2.add(21); List filled_function_param3 = new ArrayList<>(); filled_function_param3.add(5); filled_function_param3.add(20); filled_function_param3.add(15); filled_function_param3.add(35); filled_function_param3.add(8); filled_function_param3.add(6); filled_function_param3.add(19); filled_function_param3.add(19); filled_function_param3.add(19); filled_function_param3.add(23); List filled_function_param4 = new ArrayList<>(); filled_function_param4.add(4); filled_function_param4.add(23); filled_function_param4.add(18); filled_function_param4.add(41); filled_function_param4.add(8); filled_function_param4.add(7); filled_function_param4.add(25); filled_function_param4.add(16); filled_function_param4.add(23); filled_function_param4.add(23); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i),filled_function_param3.get(i),filled_function_param4.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i) && param3.get(i) == filled_function_param3.get(i) && param4.get(i) == filled_function_param4.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold(arr, n, A, B, C): for i in range(n): arr[i] = (A * arr[i] * arr[i] + B * arr[i] + C) index = - (sys.maxsize - 1) maximum = - (sys.maxsize - 1) for i in range(n): if maximum < arr[i]: index = i maximum = arr[i] i = 0 j = n - 1 new_arr = [0] * n k = 0 while i < index and j > index: if arr[i] < arr[j]: new_arr[k] = arr[i] k += 1 i += 1 else: new_arr[k] = arr[j] k += 1 j -= 1 while i < index: new_arr[k] = arr[i] k += 1 i += 1 while j > index: new_arr[k] = arr[j] k += 1 j -= 1 new_arr[n - 1] = maximum for i in range(n): arr[i] = new_arr[i] "," using namespace std; void f_gold ( int arr [ ], int n, int A, int B, int C ) { for ( int i = 0; i < n; i ++ ) arr [ i ] = A * arr [ i ] * arr [ i ] + B * arr [ i ] + C; int index, maximum = INT_MIN; for ( int i = 0; i < n; i ++ ) { if ( maximum < arr [ i ] ) { index = i; maximum = arr [ i ]; } } int i = 0, j = n - 1; int new_arr [ n ], k = 0; while ( i < index && j > index ) { if ( arr [ i ] < arr [ j ] ) new_arr [ k ++ ] = arr [ i ++ ]; else new_arr [ k ++ ] = arr [ j -- ]; } while ( i < index ) new_arr [ k ++ ] = arr [ i ++ ]; while ( j > index ) new_arr [ k ++ ] = arr [ j -- ]; new_arr [ n - 1 ] = maximum; for ( int i = 0; i < n; i ++ ) arr [ i ] = new_arr [ i ]; } int main() { int n_success = 0; vector> param0 {{9,30,49,65,78,85,85,92},{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16},{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},{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18},{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88},{0,0,0,1,1,0,1,1,1,1},{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95},{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}}; vector param1 {4,18,25,33,8,7,22,20,23,28}; vector param2 {4,20,26,42,12,8,33,16,21,21}; vector param3 {5,20,15,35,8,6,19,19,19,23}; vector param4 {4,23,18,41,8,7,25,16,23,23}; vector> filled_function_param0 {{9,30,49,65,78,85,85,92},{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16},{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},{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18},{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88},{0,0,0,1,1,0,1,1,1,1},{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95},{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}}; vector filled_function_param1 {4,18,25,33,8,7,22,20,23,28}; vector filled_function_param2 {4,20,26,42,12,8,33,16,21,21}; vector filled_function_param3 {5,20,15,35,8,6,19,19,19,23}; vector filled_function_param4 {4,23,18,41,8,7,25,16,23,23}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i],filled_function_param2[i],filled_function_param3[i],filled_function_param4[i]); f_gold(¶m0[i].front(),param1[i],param2[i],param3[i],param4[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_param2[i] && param3[i] == filled_function_param3[i] && param4[i] == filled_function_param4[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([9, 30, 49, 65, 78, 85, 85, 92], 4, 4, 5, 4,), ([-48, 89, -60, 66, 71, -37, 47, -50, 61, 41, -22, -3, 90, -57, 77, -64, 22, 8, -90, -5, -94, -43, 29, -29, 86, -79, -8, 27, -20, -44, 16], 18, 20, 20, 23,), ([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], 25, 26, 15, 18,), ([87, 70, 77, 87, 73, 81, 66, 19, 83, 7, 63, 42, 42, 59, 20, 73, 17, 27, 47, 2, 63, 62, 19, 17, 69, 39, 82, 71, 81, 39, 36, 40, 45, 4, 25, 69, 30, 76, 68, 88, 29, 73, 68, 51, 24, 14, 69, 18], 33, 42, 35, 41,), ([-91, -85, -77, -73, -70, -68, -24, -21, -12, - 1, 9, 29, 48, 52, 56, 63, 88], 8, 12, 8, 8,), ([0, 0, 0, 1, 1, 0, 1, 1, 1, 1], 7, 8, 6, 7,), ([4, 5, 9, 14, 18, 20, 22, 23, 25, 28, 30, 31, 34, 35, 36, 38, 38, 39, 44, 48, 49, 51, 54, 55, 59, 64, 66, 71, 72, 72, 73, 76, 78, 82, 82, 84, 92, 93, 95], 22, 33, 19, 25,), ([40, 6, 33, 8, 78, -58, 2, 24, 40, 3, 46, 94, -26, 8, 22, -83, 96, -29, - 38, -59, 19, 62, 98, -55, -42, 79, 26, 62, -56, -85, -22], 20, 16, 19, 16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 23, 21, 19, 23,), ([3, 68, 40, 48, 54, 35, 95, 56, 89, 40, 77, 68, 46, 78, 13, 27, 6, 17, 36, 99, 81, 2, 77, 52, 66, 52, 92, 43, 90, 22, 55, 67, 99, 60, 58], 28, 21, 23, 23,) ] filled_function_param = [ ([9, 30, 49, 65, 78, 85, 85, 92], 4, 4, 5, 4,), ([-48, 89, -60, 66, 71, -37, 47, -50, 61, 41, -22, -3, 90, -57, 77, -64, 22, 8, -90, -5, -94, -43, 29, -29, 86, -79, -8, 27, -20, -44, 16], 18, 20, 20, 23,), ([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], 25, 26, 15, 18,), ([87, 70, 77, 87, 73, 81, 66, 19, 83, 7, 63, 42, 42, 59, 20, 73, 17, 27, 47, 2, 63, 62, 19, 17, 69, 39, 82, 71, 81, 39, 36, 40, 45, 4, 25, 69, 30, 76, 68, 88, 29, 73, 68, 51, 24, 14, 69, 18], 33, 42, 35, 41,), ([-91, -85, -77, -73, -70, -68, -24, -21, -12, - 1, 9, 29, 48, 52, 56, 63, 88], 8, 12, 8, 8,), ([0, 0, 0, 1, 1, 0, 1, 1, 1, 1], 7, 8, 6, 7,), ([4, 5, 9, 14, 18, 20, 22, 23, 25, 28, 30, 31, 34, 35, 36, 38, 38, 39, 44, 48, 49, 51, 54, 55, 59, 64, 66, 71, 72, 72, 73, 76, 78, 82, 82, 84, 92, 93, 95], 22, 33, 19, 25,), ([40, 6, 33, 8, 78, -58, 2, 24, 40, 3, 46, 94, -26, 8, 22, -83, 96, -29, - 38, -59, 19, 62, 98, -55, -42, 79, 26, 62, -56, -85, -22], 20, 16, 19, 16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 23, 21, 19, 23,), ([3, 68, 40, 48, 54, 35, 95, 56, 89, 40, 77, 68, 46, 78, 13, 27, 6, 17, 36, 99, 81, 2, 77, 52, 66, 52, 92, 43, 90, 22, 55, 67, 99, 60, 58], 28, 21, 23, 23,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS{ static int f_gold ( int arr [ ] , int n , int x ) { int i ; for ( i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == x ) { return i ; } } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,5,5,11,13,14,15,19,22,22,23,26,29,29,36,44,48,49,65,65,67,68,70,76,79,79,81,85,88,91,91,92,92,97}); param0.add(new int[]{-24,-78,-32,-48,0,4,-42}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{38,14,75,16,91,11,98,43,67,9,21,10,82,72,32,81,48,60,2,91,10,90,12,83}); param0.add(new int[]{-92,-92,-82,-80,-76,-66,-64,-64,-56,-48,-38,-38,-34,-32,-32,-10,-8,-6,-2,0,8,10,18,20,22,22,30,34,38,38,38,44,50,52,56,64,64,66,70,76,88}); param0.add(new int[]{0,1,1,0,0,1,1,0,0,0,1,1,1,1}); param0.add(new int[]{1,4,4,4,4,8,12,13,14,14,22,25,25,27,29,33,36,38,40,40,40,41,47,47,47,48,48,50,51,52,52,52,55,56,59,59,62,64,66,77,82,84,90,91,91,93}); param0.add(new int[]{-90,-60,-58,-72,92,54,-32,-70,-94,18,64,-90,-90,-56,82,-14,-74,-96,-90,-8,-48,76,-28,10,-52,-8,-46,-32,82,46,58,92,4,48,-96,-66,60,60,62,-68}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{42,17,77,96,72,36,74,97,7,94,80,7,27,58,49,81,51,9}); List param1 = new ArrayList<>(); param1.add(17); param1.add(4); param1.add(6); param1.add(17); param1.add(25); param1.add(11); param1.add(38); param1.add(22); param1.add(8); param1.add(16); List param2 = new ArrayList<>(); param2.add(5); param2.add(0); param2.add(0); param2.add(75); param2.add(25); param2.add(-1); param2.add(4); param2.add(22); param2.add(8); param2.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x ) : i = 0 for i in range ( i , n ) : if ( arr [ i ] == x ) : return i return - 1 "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int i; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] == x ) return i; } return - 1; } int main() { int n_success = 0; vector> param0 {{4,5,5,11,13,14,15,19,22,22,23,26,29,29,36,44,48,49,65,65,67,68,70,76,79,79,81,85,88,91,91,92,92,97},{-24,-78,-32,-48,0,4,-42},{0,0,0,0,0,0,0,1,1,1,1},{38,14,75,16,91,11,98,43,67,9,21,10,82,72,32,81,48,60,2,91,10,90,12,83},{-92,-92,-82,-80,-76,-66,-64,-64,-56,-48,-38,-38,-34,-32,-32,-10,-8,-6,-2,0,8,10,18,20,22,22,30,34,38,38,38,44,50,52,56,64,64,66,70,76,88},{0,1,1,0,0,1,1,0,0,0,1,1,1,1},{1,4,4,4,4,8,12,13,14,14,22,25,25,27,29,33,36,38,40,40,40,41,47,47,47,48,48,50,51,52,52,52,55,56,59,59,62,64,66,77,82,84,90,91,91,93},{-90,-60,-58,-72,92,54,-32,-70,-94,18,64,-90,-90,-56,82,-14,-74,-96,-90,-8,-48,76,-28,10,-52,-8,-46,-32,82,46,58,92,4,48,-96,-66,60,60,62,-68},{0,0,0,0,0,0,1,1,1,1},{42,17,77,96,72,36,74,97,7,94,80,7,27,58,49,81,51,9}}; vector param1 {17,4,6,17,25,11,38,22,8,16}; vector param2 {5,0,0,75,25,-1,4,22,8,11}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 5, 5, 11, 13, 14, 15, 19, 22, 22, 23, 26, 29, 29, 36, 44, 48, 49, 65, 65, 67, 68, 70, 76, 79, 79, 81, 85, 88, 91, 91, 92, 92, 97],17,5,), ([-24, -78, -32, -48, 0, 4, -42],4,0,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],6,0,), ([38, 14, 75, 16, 91, 11, 98, 43, 67, 9, 21, 10, 82, 72, 32, 81, 48, 60, 2, 91, 10, 90, 12, 83],17,75,), ([-92, -92, -82, -80, -76, -66, -64, -64, -56, -48, -38, -38, -34, -32, -32, -10, -8, -6, -2, 0, 8, 10, 18, 20, 22, 22, 30, 34, 38, 38, 38, 44, 50, 52, 56, 64, 64, 66, 70, 76, 88],25,25,), ([0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1],11,-1,), ([1, 4, 4, 4, 4, 8, 12, 13, 14, 14, 22, 25, 25, 27, 29, 33, 36, 38, 40, 40, 40, 41, 47, 47, 47, 48, 48, 50, 51, 52, 52, 52, 55, 56, 59, 59, 62, 64, 66, 77, 82, 84, 90, 91, 91, 93],38,4,), ([-90, -60, -58, -72, 92, 54, -32, -70, -94, 18, 64, -90, -90, -56, 82, -14, -74, -96, -90, -8, -48, 76, -28, 10, -52, -8, -46, -32, 82, 46, 58, 92, 4, 48, -96, -66, 60, 60, 62, -68],22,22,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1],8,8,), ([42, 17, 77, 96, 72, 36, 74, 97, 7, 94, 80, 7, 27, 58, 49, 81, 51, 9],16,11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES{ static int f_gold ( int a [ ] , int n , int k ) { if ( k >= n - 1 ) return n ; int best = 0 , times = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] > best ) { best = a [ i ] ; if ( i == 1 ) times = 1 ; } else times += 1 ; if ( times >= k ) return best ; } return best ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98}); param0.add(new int[]{80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1}); param0.add(new int[]{90,23,43,42,7,71,79}); param0.add(new int[]{-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88}); param0.add(new int[]{1,1,1}); param0.add(new int[]{2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96}); param0.add(new int[]{-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{52,19}); List param1 = new ArrayList<>(); param1.add(33); param1.add(14); param1.add(7); param1.add(4); param1.add(28); param1.add(1); param1.add(14); param1.add(26); param1.add(26); param1.add(1); List param2 = new ArrayList<>(); param2.add(37); param2.add(13); param2.add(6); param2.add(4); param2.add(21); param2.add(2); param2.add(17); param2.add(31); param2.add(14); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n , k ) : if k >= n - 1 : return n best = 0 times = 0 for i in range ( n ) : if a [ i ] > best : best = a [ i ] if i == True : times = 1 else : times += 1 if times >= k : return best return best "," using namespace std; int f_gold ( int a [ ], int n, int k ) { if ( k >= n - 1 ) return n; int best = 0, times = 0; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] > best ) { best = a [ i ]; if ( i ) times = 1; } else times += 1; if ( times >= k ) return best; } return best; } int main() { int n_success = 0; vector> param0 {{2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98},{80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14},{0,0,0,0,0,0,0,0,0,1,1},{90,23,43,42,7,71,79},{-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88},{1,1,1},{2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96},{-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{52,19}}; vector param1 {33,14,7,4,28,1,14,26,26,1}; vector param2 {37,13,6,4,21,2,17,31,14,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 5, 5, 9, 10, 10, 11, 14, 23, 27, 31, 32, 33, 33, 33, 37, 39, 41, 41, 42, 42, 43, 47, 60, 61, 68, 73, 73, 73, 78, 80, 80, 82, 83, 86, 87, 89, 92, 94, 98],33,37,), ([80, -58, 64, 48, -16, 60, -50, -52, 62, -86, -96, 52, 26, -30, 14],14,13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1],7,6,), ([90, 23, 43, 42, 7, 71, 79],4,4,), ([-96, -96, -90, -84, -68, -64, -56, -56, -50, -50, -48, -46, -28, -18, 0, 0, 6, 32, 32, 34, 42, 42, 46, 50, 50, 52, 64, 64, 70, 76, 84, 88],28,21,), ([1, 1, 1],1,2,), ([2, 9, 15, 19, 26, 29, 42, 45, 46, 47, 55, 60, 60, 61, 62, 64, 68, 69, 74, 79, 96],14,17,), ([-32, 12, 80, 42, 80, 8, 58, -76, -42, -98, 22, -90, -16, -4, -62, -32, 28, 12, 78, -52, -84, 78, 88, -76, -52, 68, -34, -16, -4, 2, -78, -94, -22, 34, 6, -62, 72],26,31,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,14,), ([52, 19],1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_DIGITS_PRODUCT_TWO_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_DIGITS_PRODUCT_TWO_NUMBERS{ static int f_gold ( int a , int b ) { int count = 0 ; int p = Math . abs ( a * b ) ; if ( p == 0 ) return 1 ; while ( p > 0 ) { count ++ ; p = p / 10 ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(86); param0.add(81); param0.add(48); param0.add(64); param0.add(56); param0.add(5); param0.add(25); param0.add(94); param0.add(5); param0.add(46); List param1 = new ArrayList<>(); param1.add(39); param1.add(87); param1.add(84); param1.add(80); param1.add(20); param1.add(70); param1.add(13); param1.add(83); param1.add(55); param1.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(a, b): count = 0 p = abs(a * b) if (p == 0): return 1 while (p > 0): count = count + 1 p = p // 10 return count "," using namespace std; int f_gold ( int a, int b ) { int count = 0; int p = abs ( a * b ); if ( p == 0 ) return 1; while ( p > 0 ) { count ++; p = p / 10; } return count; } int main() { int n_success = 0; vector param0 {86,81,48,64,56,5,25,94,5,46}; vector param1 {39,87,84,80,20,70,13,83,55,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (86, 39,), (81, 87,), (48, 84,), (64, 80,), (56, 20,), (5, 70,), (25, 13,), (94, 83,), (5, 55,), (46, 46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FLOOR_IN_A_SORTED_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FLOOR_IN_A_SORTED_ARRAY_1{ static int f_gold ( int arr [ ] , int low , int high , int x ) { if ( low > high ) return - 1 ; if ( x >= arr [ high ] ) return high ; int mid = ( low + high ) / 2 ; if ( arr [ mid ] == x ) return mid ; if ( mid > 0 && arr [ mid - 1 ] <= x && x < arr [ mid ] ) return mid - 1 ; if ( x < arr [ mid ] ) return f_gold ( arr , low , mid - 1 , x ) ; return f_gold ( arr , mid + 1 , high , x ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,11,20,42,42,55,58,98,99}); param0.add(new int[]{50,-90,-38,-46,-10,-22,-66,72,-52,38,90,34,-12,-44,-6,0,-20,-38,86,26,64,-24,40,90,-26,-2,-28,12,22,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,28,68,98,24,67,86,2,18,22,44,77,52,62,24,46}); param0.add(new int[]{-96,-94,-88,-84,-68,-60,-52,-52,-42,-34,-32,-16,-12,-6,-6,-4,-2,0,16,18,38,58,70,72,76,78,90,92,98}); param0.add(new int[]{0,1,1,0,0,1,0,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,0,0,1,0,0}); param0.add(new int[]{1,6,7,9,10,11,19,19,22,22,26,34,36,37,37,38,39,40,49,54,60,62,65,67,71,76,78,79,82,82,89,95,97}); param0.add(new int[]{76,-32,-98,-18,-80,74,-22,-82,40,-64,58,-18,-64,34,-44,-82,-46,62,-80,-76,32,44,-32,98,-26,62,16,86,-52,-72,-90,-30,6}); param0.add(new int[]{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}); param0.add(new int[]{81,69,15,52,49,54,18,92,33,21,91,21,5,25,77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25}); List param1 = new ArrayList<>(); param1.add(5); param1.add(26); param1.add(11); param1.add(15); param1.add(22); param1.add(24); param1.add(22); param1.add(28); param1.add(28); param1.add(35); List param2 = new ArrayList<>(); param2.add(7); param2.add(28); param2.add(9); param2.add(11); param2.add(27); param2.add(15); param2.add(26); param2.add(31); param2.add(29); param2.add(19); List param3 = new ArrayList<>(); param3.add(6); param3.add(23); param3.add(18); param3.add(13); param3.add(20); param3.add(26); param3.add(25); param3.add(24); param3.add(30); param3.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , low , high , x ) : if ( low > high ) : return - 1 if ( x >= arr [ high ] ) : return high mid = int ( ( low + high ) / 2 ) if ( arr [ mid ] == x ) : return mid if ( mid > 0 and arr [ mid - 1 ] <= x and x < arr [ mid ] ) : return mid - 1 if ( x < arr [ mid ] ) : return f_gold ( arr , low , mid - 1 , x ) return f_gold ( arr , mid + 1 , high , x ) "," using namespace std; int f_gold ( int arr [ ], int low, int high, int x ) { if ( low > high ) return - 1; if ( x >= arr [ high ] ) return high; int mid = ( low + high ) / 2; if ( arr [ mid ] == x ) return mid; if ( mid > 0 && arr [ mid - 1 ] <= x && x < arr [ mid ] ) return mid - 1; if ( x < arr [ mid ] ) return f_gold ( arr, low, mid - 1, x ); return f_gold ( arr, mid + 1, high, x ); } int main() { int n_success = 0; vector> param0 {{5,11,20,42,42,55,58,98,99},{50,-90,-38,-46,-10,-22,-66,72,-52,38,90,34,-12,-44,-6,0,-20,-38,86,26,64,-24,40,90,-26,-2,-28,12,22,-14},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{69,28,68,98,24,67,86,2,18,22,44,77,52,62,24,46},{-96,-94,-88,-84,-68,-60,-52,-52,-42,-34,-32,-16,-12,-6,-6,-4,-2,0,16,18,38,58,70,72,76,78,90,92,98},{0,1,1,0,0,1,0,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,0,0,1,0,0},{1,6,7,9,10,11,19,19,22,22,26,34,36,37,37,38,39,40,49,54,60,62,65,67,71,76,78,79,82,82,89,95,97},{76,-32,-98,-18,-80,74,-22,-82,40,-64,58,-18,-64,34,-44,-82,-46,62,-80,-76,32,44,-32,98,-26,62,16,86,-52,-72,-90,-30,6},{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},{81,69,15,52,49,54,18,92,33,21,91,21,5,25,77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25}}; vector param1 {5,26,11,15,22,24,22,28,28,35}; vector param2 {7,28,9,11,27,15,26,31,29,19}; vector param3 {6,23,18,13,20,26,25,24,30,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 11, 20, 42, 42, 55, 58, 98, 99],5,7,6,), ([50, -90, -38, -46, -10, -22, -66, 72, -52, 38, 90, 34, -12, -44, -6, 0, -20, -38, 86, 26, 64, -24, 40, 90, -26, -2, -28, 12, 22, -14],26,28,23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,9,18,), ([69, 28, 68, 98, 24, 67, 86, 2, 18, 22, 44, 77, 52, 62, 24, 46],15,11,13,), ([-96, -94, -88, -84, -68, -60, -52, -52, -42, -34, -32, -16, -12, -6, -6, -4, -2, 0, 16, 18, 38, 58, 70, 72, 76, 78, 90, 92, 98],22,27,20,), ([0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0],24,15,26,), ([1, 6, 7, 9, 10, 11, 19, 19, 22, 22, 26, 34, 36, 37, 37, 38, 39, 40, 49, 54, 60, 62, 65, 67, 71, 76, 78, 79, 82, 82, 89, 95, 97],22,26,25,), ([76, -32, -98, -18, -80, 74, -22, -82, 40, -64, 58, -18, -64, 34, -44, -82, -46, 62, -80, -76, 32, 44, -32, 98, -26, 62, 16, 86, -52, -72, -90, -30, 6],28,31,24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,29,30,), ([81, 69, 15, 52, 49, 54, 18, 92, 33, 21, 91, 21, 5, 25, 77, 92, 26, 58, 72, 55, 76, 18, 13, 59, 9, 12, 31, 24, 36, 33, 71, 87, 55, 19, 42, 25],35,19,33,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_1{ static int f_gold ( int n ) { int sum ; for ( sum = 0 ; n > 0 ; sum += n % 10 , n /= 10 ) ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(50); param0.add(92); param0.add(49); param0.add(94); param0.add(7); param0.add(30); param0.add(88); param0.add(98); param0.add(94); param0.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 while ( n > 0 ) : sum += int ( n % 10 ) n = int ( n / 10 ) return sum ",,," if __name__ == '__main__': param = [ (50,), (92,), (49,), (94,), (7,), (30,), (88,), (98,), (94,), (23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BREAK_NUMBER_THREE_PARTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BREAK_NUMBER_THREE_PARTS_1{ static long f_gold ( long n ) { long count = 0 ; count = ( n + 1 ) * ( n + 2 ) / 2 ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(71L); param0.add(71L); param0.add(36L); param0.add(3L); param0.add(97L); param0.add(69L); param0.add(15L); param0.add(48L); param0.add(77L); param0.add(6L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : count = 0 count = ( n + 1 ) * ( n + 2 ) // 2 return count ",,," if __name__ == '__main__': param = [ (71,), (71,), (36,), (3,), (97,), (69,), (15,), (48,), (77,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3{ static int f_gold ( int n ) { int odd_count = 0 ; int even_count = 0 ; if ( n < 0 ) n = - n ; if ( n == 0 ) return 1 ; if ( n == 1 ) return 0 ; while ( n != 0 ) { if ( ( n & 1 ) != 0 ) odd_count ++ ; if ( ( n & 2 ) != 0 ) even_count ++ ; n = n >> 2 ; } return f_gold ( Math . abs ( odd_count - even_count ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(94); param0.add(94); param0.add(79); param0.add(39); param0.add(16); param0.add(90); param0.add(64); param0.add(76); param0.add(83); param0.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : odd_count = 0 even_count = 0 if ( n < 0 ) : n = - n if ( n == 0 ) : return 1 if ( n == 1 ) : return 0 while ( n ) : if ( n & 1 ) : odd_count += 1 if ( n & 2 ) : even_count += 1 n = n >> 2 return f_gold ( abs ( odd_count - even_count ) ) "," using namespace std; int f_gold ( int n ) { int odd_count = 0; int even_count = 0; if ( n < 0 ) n = - n; if ( n == 0 ) return 1; if ( n == 1 ) return 0; while ( n ) { if ( n & 1 ) odd_count ++; if ( n & 2 ) even_count ++; n = n >> 2; } return f_gold ( abs ( odd_count - even_count ) ); } int main() { int n_success = 0; vector param0 {94,94,79,39,16,90,64,76,83,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (94,), (94,), (79,), (39,), (16,), (90,), (64,), (76,), (83,), (47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BINARY_REPRESENTATION_OF_NEXT_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BINARY_REPRESENTATION_OF_NEXT_NUMBER{ static String f_gold ( String num ) { int l = num . length ( ) ; int i ; for ( i = l - 1 ; i >= 0 ; i -- ) { if ( num . charAt ( i ) == '0' ) { num = num . substring ( 0 , i ) + '1' + num . substring ( i + 1 ) ; break ; } else { num = num . substring ( 0 , i ) + '0' + num . substring ( i + 1 ) ; } } if ( i < 0 ) { num = ""1"" + num ; } return num ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""DXh""); param0.add(""48703586411816""); param0.add(""0001""); param0.add(""yWg WvjNKS""); param0.add(""8408568459""); param0.add(""01""); param0.add(""DFECZ CWtN""); param0.add(""37742236""); param0.add(""001101""); param0.add(""LDxERLmYn""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num1 ) : l = len ( num1 ) ; num = list ( num1 ) ; i = l - 1 ; while ( i >= 0 ) : if ( num [ i ] == '0' ) : num [ i ] = '1' ; break ; else : num [ i ] = '0' ; i -= 1 ; num1 = ''.join ( num ) ; if ( i < 0 ) : num1 = '1' + num1 ; return num1 ; ",,," if __name__ == '__main__': param = [ ('DXh',), ('48703586411816',), ('0001',), ('yWg WvjNKS',), ('8408568459',), ('01',), ('DFECZ CWtN',), ('37742236',), ('001101',), ('LDxERLmYn',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD{ public static boolean f_gold ( int n ) { return ( n % 2 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(90); param0.add(55); param0.add(90); param0.add(83); param0.add(32); param0.add(58); param0.add(38); param0.add(87); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( n % 2 == 0 ) "," using namespace std; bool f_gold ( int n ) { return ( n % 2 == 0 ); } int main() { int n_success = 0; vector param0 {67,90,55,90,83,32,58,38,87,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (90,), (55,), (90,), (83,), (32,), (58,), (38,), (87,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER{ static int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(58); param0.add(42); param0.add(76); param0.add(16); param0.add(49); param0.add(60); param0.add(99); param0.add(45); param0.add(6); param0.add(70); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ; "," using namespace std; int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {58,42,76,16,49,60,99,45,6,70}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (58,), (42,), (76,), (16,), (49,), (60,), (99,), (45,), (6,), (70,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", UGLY_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class UGLY_NUMBERS{ static int f_gold ( int n ) { int ugly [ ] = new int [ n ] ; int i2 = 0 , i3 = 0 , i5 = 0 ; int next_multiple_of_2 = 2 ; int next_multiple_of_3 = 3 ; int next_multiple_of_5 = 5 ; int next_ugly_no = 1 ; ugly [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { next_ugly_no = Math . min ( next_multiple_of_2 , Math . min ( next_multiple_of_3 , next_multiple_of_5 ) ) ; ugly [ i ] = next_ugly_no ; if ( next_ugly_no == next_multiple_of_2 ) { i2 = i2 + 1 ; next_multiple_of_2 = ugly [ i2 ] * 2 ; } if ( next_ugly_no == next_multiple_of_3 ) { i3 = i3 + 1 ; next_multiple_of_3 = ugly [ i3 ] * 3 ; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1 ; next_multiple_of_5 = ugly [ i5 ] * 5 ; } } return next_ugly_no ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(27); param0.add(64); param0.add(93); param0.add(90); param0.add(85); param0.add(86); param0.add(72); param0.add(86); param0.add(32); param0.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : ugly = [ 0 ] * n ugly [ 0 ] = 1 i2 = i3 = i5 = 0 next_multiple_of_2 = 2 next_multiple_of_3 = 3 next_multiple_of_5 = 5 for l in range ( 1 , n ) : ugly [ l ] = min ( next_multiple_of_2 , next_multiple_of_3 , next_multiple_of_5 ) if ugly [ l ] == next_multiple_of_2 : i2 += 1 next_multiple_of_2 = ugly [ i2 ] * 2 if ugly [ l ] == next_multiple_of_3 : i3 += 1 next_multiple_of_3 = ugly [ i3 ] * 3 if ugly [ l ] == next_multiple_of_5 : i5 += 1 next_multiple_of_5 = ugly [ i5 ] * 5 return ugly [ - 1 ] "," using namespace std; unsigned f_gold ( unsigned n ) { unsigned ugly [ n ]; unsigned i2 = 0, i3 = 0, i5 = 0; unsigned next_multiple_of_2 = 2; unsigned next_multiple_of_3 = 3; unsigned next_multiple_of_5 = 5; unsigned next_ugly_no = 1; ugly [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { next_ugly_no = min ( next_multiple_of_2, min ( next_multiple_of_3, next_multiple_of_5 ) ); ugly [ i ] = next_ugly_no; if ( next_ugly_no == next_multiple_of_2 ) { i2 = i2 + 1; next_multiple_of_2 = ugly [ i2 ] * 2; } if ( next_ugly_no == next_multiple_of_3 ) { i3 = i3 + 1; next_multiple_of_3 = ugly [ i3 ] * 3; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1; next_multiple_of_5 = ugly [ i5 ] * 5; } } return next_ugly_no; } int main() { int n_success = 0; vector param0 {27,64,93,90,85,86,72,86,32,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (27,), (64,), (93,), (90,), (85,), (86,), (72,), (86,), (32,), (1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", UNIQUE_CELLS_BINARY_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class UNIQUE_CELLS_BINARY_MATRIX{ static int f_gold ( int mat [ ] [ ] , int n , int m ) { int [ ] rowsum = new int [ n ] ; int [ ] colsum = new int [ m ] ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < m ; j ++ ) if ( mat [ i ] [ j ] != 0 ) { rowsum [ i ] ++ ; colsum [ j ] ++ ; } int uniquecount = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < m ; j ++ ) if ( mat [ i ] [ j ] != 0 && rowsum [ i ] == 1 && colsum [ j ] == 1 ) uniquecount ++ ; return uniquecount ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 0}, new int[] {1, 0, 0, 1}}); param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 1}, new int[] {1, 0, 1, 1}}); param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 0}, new int[] {1, 1, 0, 1}}); param0.add(new int[][]{ new int[] {1, 1, 1, 1}, new int[] {0, 0, 1, 0}, new int[] {1, 0, 0, 1}}); param0.add(new int[][]{ new int[] {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36}, new int[]{7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49}, new int[]{69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33}, new int[]{63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24}, new int[]{41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94}, new int[]{66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65}, new int[]{6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86}, new int[]{54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98}, new int[]{46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46}, new int[]{70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11}, new int[]{92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12}, new int[]{55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3}, new int[]{21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25}, new int[]{77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88}, new int[]{13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79}, new int[]{8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51}, new int[]{97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46}, new int[]{10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72}, new int[]{46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73}, new int[]{30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34}, new int[]{26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27}, new int[]{39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32}, new int[]{99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22}, new int[]{81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81}, new int[]{21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73}, new int[]{90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78}, new int[]{9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88}, new int[]{12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96}, new int[]{9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65}, new int[]{35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25}}); param0.add(new int[][]{ new int[] {0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3}, new int[]{63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79}, new int[]{35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69}, new int[]{43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96}, new int[]{46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46}, new int[]{56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15}, new int[]{18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86}, new int[]{99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76}, new int[]{88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49}, new int[]{92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39}, new int[]{30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60}, new int[]{35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34}, new int[]{19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46}, new int[]{54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97}, new int[]{5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81}, new int[]{54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96}, new int[]{84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3}, new int[]{60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70}, new int[]{54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29}, new int[]{71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52}, new int[]{37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99}, new int[]{98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18}, new int[]{81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3}, new int[]{29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72}, new int[]{24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11}, new int[]{41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32}, new int[]{55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86}, new int[]{44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33}, new int[]{36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24}, new int[]{7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69}, new int[]{88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47}, new int[]{28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48}, new int[]{55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88}, new int[]{38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45}, new int[]{26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44}, new int[]{91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66}, new int[]{12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42}, new int[]{17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27}, new int[]{46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7}, new int[]{95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27}, new int[]{22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33}, new int[]{2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53}, new int[]{54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55}, new int[]{13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25}, new int[]{74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51}, new int[]{94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61}, new int[]{58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35}, new int[]{57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74}}); param0.add(new int[][]{ new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, new int[]{69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20}, new int[]{31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40}, new int[]{24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67}, new int[]{4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37}, new int[]{14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51}, new int[]{99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82}, new int[]{28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44}, new int[]{25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55}, new int[]{64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48}, new int[]{35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83}, new int[]{64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36}, new int[]{10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71}, new int[]{14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64}, new int[]{6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39}, new int[]{36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99}, new int[]{22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69}, new int[]{24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18}}); param0.add(new int[][]{ new int[] {0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56}, new int[]{21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45}, new int[]{18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94}, new int[]{86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23}, new int[]{40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5}, new int[]{6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93}, new int[]{77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57}, new int[]{10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78}, new int[]{37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3}, new int[]{76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28}, new int[]{25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18}, new int[]{8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60}, new int[]{59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62}, new int[]{89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54}, new int[]{46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20}, new int[]{15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56}, new int[]{33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1}, new int[]{57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78}, new int[]{1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16}, new int[]{56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32}, new int[]{52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61}, new int[]{46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35}, new int[]{51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33}, new int[]{20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47}, new int[]{17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47}}); param0.add(new int[][]{ new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74}, new int[]{4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82}, new int[]{10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3}, new int[]{93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41}, new int[]{15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97}, new int[]{90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92}, new int[]{2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36}, new int[]{41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12}, new int[]{19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50}, new int[]{13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10}, new int[]{37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28}, new int[]{97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73}, new int[]{27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66}, new int[]{9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56}, new int[]{31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74}, new int[]{81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68}, new int[]{96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20}, new int[]{94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26}, new int[]{38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84}, new int[]{50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51}, new int[]{45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10}, new int[]{53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35}, new int[]{43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76}}); List param1 = new ArrayList<>(); param1.add(3); param1.add(2); param1.add(3); param1.add(3); param1.add(3); param1.add(1); param1.add(1); param1.add(10); param1.add(15); param1.add(17); List param2 = new ArrayList<>(); param2.add(4); param2.add(2); param2.add(4); param2.add(4); param2.add(3); param2.add(28); param2.add(32); param2.add(12); param2.add(17); param2.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , n , m ) : rowsum = [ 0 ] * n ; colsum = [ 0 ] * m ; for i in range ( n ) : for j in range ( m ) : if ( mat [ i ] [ j ] != 0 ) : rowsum [ i ] += 1 ; colsum [ j ] += 1 ; uniquecount = 0 ; for i in range ( n ) : for j in range ( m ) : if ( mat [ i ] [ j ] != 0 and rowsum [ i ] == 1 and colsum [ j ] == 1 ) : uniquecount += 1 ; return uniquecount ; ",,," if __name__ == '__main__': param = [ ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]] ,3,4,), ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]] ,2,2,), ([[0, 1, 0, 0], [0, 0, 1, 1], [1, 0, 1, 1]] ,3,4,), ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 1, 0, 1]] ,3,4,), ([[1, 1, 1, 1], [0, 0, 1, 0], [1, 0, 0, 1]] ,3,3,), ([[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36], [7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49], [69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33], [63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24], [41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94], [66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65], [6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86], [54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98], [46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46], [70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11], [92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12], [55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3], [21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25], [77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88], [13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79], [8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51], [97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46], [10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72], [46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73], [30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34], [26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27], [39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32], [99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22], [81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81], [21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73], [90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78], [9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88], [12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96], [9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65], [35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25]],1,28,), ([[0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3], [63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79], [35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69], [43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96], [46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46], [56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15], [18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86], [99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76], [88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49], [92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39], [30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60], [35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34], [19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46], [54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97], [5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81], [54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96], [84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3], [60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70], [54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29], [71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52], [37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99], [98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18], [81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3], [29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72], [24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11], [41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32], [55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86], [44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33], [36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24], [7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69], [88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47], [28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48], [55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88], [38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45], [26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44], [91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66], [12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42], [17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27], [46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7], [95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27], [22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33], [2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53], [54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55], [13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25], [74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51], [94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61], [58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35], [57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74]],1,32,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20], [31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40], [24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67], [4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37], [14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51], [99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82], [28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44], [25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55], [64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48], [35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83], [64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36], [10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71], [14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64], [6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39], [36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99], [22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69], [24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18]],10,12,), ([[0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56], [21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45], [18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94], [86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23], [40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5], [6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93], [77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57], [10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78], [37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3], [76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28], [25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18], [8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60], [59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62], [89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54], [46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20], [15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56], [33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1], [57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78], [1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16], [56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32], [52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61], [46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35], [51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33], [20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47], [17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47]],15,17,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74], [4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82], [10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3], [93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41], [15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97], [90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92], [2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36], [41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12], [19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50], [13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10], [37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28], [97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73], [27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66], [9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56], [31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74], [81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68], [96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20], [94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26], [38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84], [50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51], [45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10], [53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35], [43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76]],17,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_SEQUENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_SEQUENCE_1{ static int f_gold ( char digits [ ] , int n ) { int count [ ] = new int [ n + 1 ] ; count [ 0 ] = 1 ; count [ 1 ] = 1 ; if ( digits [ 0 ] == '0' ) return 0 ; for ( int i = 2 ; i <= n ; i ++ ) { count [ i ] = 0 ; if ( digits [ i - 1 ] > '0' ) count [ i ] = count [ i - 1 ] ; if ( digits [ i - 2 ] == '1' || ( digits [ i - 2 ] == '2' && digits [ i - 1 ] < '7' ) ) count [ i ] += count [ i - 2 ] ; } return count [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'B','C','E','E','F','F','G','J','K','K','L','L','M','O','O','P','Q','R','V','X','Z','a','a','a','c','c','c','d','e','g','g','k','k','k','l','m','m','n','p','t','y','z'}); param0.add(new char[]{'0','9','5','0','2','6','5','4','4','5','2','6','8','2','0','3','1','9','0','1','5'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'x','a','R','O','S','r','g','e','Y','Z','t'}); param0.add(new char[]{'0','1','1','1','2','2','2','2','2','2','2','3','3','4','4','5','5','5','5','5','6','6','7','7','7','7','8','8'}); param0.add(new char[]{'1','1','1','1','1','1'}); param0.add(new char[]{' ',' ',' ','B','B','C','D','F','H','I','J','K','L','O','P','V','W','W','Z','Z','a','c','h','i','q','s','x'}); param0.add(new char[]{'0','9','1','5','2','4','9','3'}); param0.add(new char[]{'0','0','0','1','1','1'}); param0.add(new char[]{'w','t','U','R','a','c','G'}); List param1 = new ArrayList<>(); param1.add(31); param1.add(13); param1.add(19); param1.add(5); param1.add(21); param1.add(4); param1.add(26); param1.add(5); param1.add(4); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( digits , n ) : count = [ 0 ] * ( n + 1 ) ; count [ 0 ] = 1 ; count [ 1 ] = 1 ; for i in range ( 2 , n + 1 ) : count [ i ] = 0 ; if ( digits [ i - 1 ] > '0' ) : count [ i ] = count [ i - 1 ] ; if ( digits [ i - 2 ] == '1' or ( digits [ i - 2 ] == '2' and digits [ i - 1 ] < '7' ) ) : count [ i ] += count [ i - 2 ] ; return count [ n ] ; ",,," if __name__ == '__main__': param = [ (['B', 'C', 'E', 'E', 'F', 'F', 'G', 'J', 'K', 'K', 'L', 'L', 'M', 'O', 'O', 'P', 'Q', 'R', 'V', 'X', 'Z', 'a', 'a', 'a', 'c', 'c', 'c', 'd', 'e', 'g', 'g', 'k', 'k', 'k', 'l', 'm', 'm', 'n', 'p', 't', 'y', 'z'],31,), (['0', '9', '5', '0', '2', '6', '5', '4', '4', '5', '2', '6', '8', '2', '0', '3', '1', '9', '0', '1', '5'],13,), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],19,), (['x', 'a', 'R', 'O', 'S', 'r', 'g', 'e', 'Y', 'Z', 't'],5,), (['0', '1', '1', '1', '2', '2', '2', '2', '2', '2', '2', '3', '3', '4', '4', '5', '5', '5', '5', '5', '6', '6', '7', '7', '7', '7', '8', '8'],21,), (['1', '1', '1', '1', '1', '1'],4,), ([' ', ' ', ' ', 'B', 'B', 'C', 'D', 'F', 'H', 'I', 'J', 'K', 'L', 'O', 'P', 'V', 'W', 'W', 'Z', 'Z', 'a', 'c', 'h', 'i', 'q', 's', 'x'],26,), (['0', '9', '1', '5', '2', '4', '9', '3'],5,), (['0', '0', '0', '1', '1', '1'],4,), (['w', 't', 'U', 'R', 'a', 'c', 'G'],5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PERFECT_REVERSIBLE_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PERFECT_REVERSIBLE_STRING{ static boolean f_gold ( String str ) { int i = 0 , j = str . length ( ) - 1 ; while ( i < j ) { if ( str . charAt ( i ) != str . charAt ( j ) ) return false ; i ++ ; j -- ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ab""); param0.add(""303""); param0.add(""11110000""); param0.add(""aba""); param0.add(""404""); param0.add(""10101""); param0.add(""abab""); param0.add(""6366""); param0.add(""001""); param0.add(""""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : i = 0 ; j = len ( str ) - 1 ; while ( i < j ) : if ( str [ i ] != str [ j ] ) : return False ; i += 1 ; j -= 1 ; return True ; "," using namespace std; bool f_gold ( string str ) { int i = 0, j = str . length ( ) - 1; while ( i < j ) { if ( str [ i ] != str [ j ] ) return false; i ++; j --; } return true; } int main() { int n_success = 0; vector param0 {""ab"",""303"",""11110000"",""aba"",""404"",""10101"",""abab"",""6366"",""001"",""""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('ab',), ('303',), ('11110000',), ('aba',), ('404',), ('10101',), ('abab',), ('6366',), ('001',), ('',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2{ static boolean f_gold ( int n ) { return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ( n & 0xAAAAAAAA ) == 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(4); param0.add(64); param0.add(-64); param0.add(128); param0.add(1024); param0.add(97); param0.add(86); param0.add(14); param0.add(99); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( n != 0 and ( ( n & ( n - 1 ) ) == 0 ) and not ( n & 0xAAAAAAAA ) ) ; "," using namespace std; bool f_gold ( unsigned int n ) { return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ! ( n & 0xAAAAAAAA ); } int main() { int n_success = 0; vector param0 {1,4,64,-64,128,1024,97,86,14,99}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (4,), (64,), (-64,), (128,), (1024,), (97,), (86,), (14,), (99,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE{ static int f_gold ( int arr [ ] , int n ) { int brr [ ] = new int [ 2 * n + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) brr [ i ] = arr [ i ] ; for ( int i = 0 ; i < n ; i ++ ) brr [ n + i ] = arr [ i ] ; int maxHam = 0 ; for ( int i = 1 ; i < n ; i ++ ) { int currHam = 0 ; for ( int j = i , k = 0 ; j < ( i + n ) ; j ++ , k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++ ; if ( currHam == n ) return n ; maxHam = Math . max ( maxHam , currHam ) ; } return maxHam ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96}); param0.add(new int[]{52,-28}); param0.add(new int[]{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}); param0.add(new int[]{24}); param0.add(new int[]{-68,14,36,62}); param0.add(new int[]{1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0}); param0.add(new int[]{7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99}); param0.add(new int[]{-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{61,89,8}); List param1 = new ArrayList<>(); param1.add(12); param1.add(1); param1.add(21); param1.add(0); param1.add(2); param1.add(12); param1.add(15); param1.add(14); param1.add(8); param1.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : brr = [ 0 ] * ( 2 * n + 1 ) for i in range ( n ) : brr [ i ] = arr [ i ] for i in range ( n ) : brr [ n + i ] = arr [ i ] maxHam = 0 for i in range ( 1 , n ) : currHam = 0 k = 0 for j in range ( i , i + n ) : if brr [ j ] != arr [ k ] : currHam += 1 k = k + 1 if currHam == n : return n maxHam = max ( maxHam , currHam ) return maxHam "," using namespace std; int f_gold ( int arr [ ], int n ) { int brr [ 2 * n + 1 ]; for ( int i = 0; i < n; i ++ ) brr [ i ] = arr [ i ]; for ( int i = 0; i < n; i ++ ) brr [ n + i ] = arr [ i ]; int maxHam = 0; for ( int i = 1; i < n; i ++ ) { int currHam = 0; for ( int j = i, k = 0; j < ( i + n ); j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++; if ( currHam == n ) return n; maxHam = max ( maxHam, currHam ); } return maxHam; } int main() { int n_success = 0; vector> param0 {{1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96},{52,-28},{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},{24},{-68,14,36,62},{1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0},{7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99},{-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70},{0,0,0,0,0,0,1,1,1,1,1,1,1},{61,89,8}}; vector param1 {12,1,21,0,2,12,15,14,8,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 4, 18, 22, 28, 34, 35, 39, 44, 45, 67, 73, 75, 79, 81, 83, 89, 93, 96],12,), ([52, -28],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],21,), ([24],0,), ([-68, 14, 36, 62],2,), ([1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0],12,), ([7, 10, 19, 22, 24, 28, 29, 39, 46, 55, 62, 66, 68, 73, 74, 76, 83, 84, 85, 99],15,), ([-38, 56, 86, 12, 24, -90, -20, -46, 38, 92, -44, -74, 54, 50, 46, 50, -94, 64, 32, -84, 70],14,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],8,), ([61, 89, 8],2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", STOOGE_SORT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class STOOGE_SORT{ static void f_gold ( int arr [ ] , int l , int h ) { if ( l >= h ) return ; if ( arr [ l ] > arr [ h ] ) { int t = arr [ l ] ; arr [ l ] = arr [ h ] ; arr [ h ] = t ; } if ( h - l + 1 > 2 ) { int t = ( h - l + 1 ) / 3 ; f_gold ( arr , l , h - t ) ; f_gold ( arr , l + t , h ) ; f_gold ( arr , l , h - t ) ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,25,42,52,53,54,58,66,67,70}); param0.add(new int[]{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25}); param0.add(new int[]{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}); param0.add(new int[]{7,49,26,33,48,79,2,71,32,4,20,36}); param0.add(new int[]{88}); param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0}); param0.add(new int[]{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99}); param0.add(new int[]{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}); List param1 = new ArrayList<>(); param1.add(6); param1.add(16); param1.add(28); param1.add(9); param1.add(0); param1.add(20); param1.add(28); param1.add(15); param1.add(12); param1.add(27); List param2 = new ArrayList<>(); param2.add(6); param2.add(14); param2.add(24); param2.add(10); param2.add(0); param2.add(28); param2.add(29); param2.add(11); param2.add(17); param2.add(20); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{6,25,42,52,53,54,58,66,67,70}); filled_function_param0.add(new int[]{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{7,49,26,33,48,79,2,71,32,4,20,36}); filled_function_param0.add(new int[]{88}); filled_function_param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0}); filled_function_param0.add(new int[]{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99}); filled_function_param0.add(new int[]{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(6); filled_function_param1.add(16); filled_function_param1.add(28); filled_function_param1.add(9); filled_function_param1.add(0); filled_function_param1.add(20); filled_function_param1.add(28); filled_function_param1.add(15); filled_function_param1.add(12); filled_function_param1.add(27); List filled_function_param2 = new ArrayList<>(); filled_function_param2.add(6); filled_function_param2.add(14); filled_function_param2.add(24); filled_function_param2.add(10); filled_function_param2.add(0); filled_function_param2.add(28); filled_function_param2.add(29); filled_function_param2.add(11); filled_function_param2.add(17); filled_function_param2.add(20); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , l , h ) : if l >= h : return if arr [ l ] > arr [ h ] : t = arr [ l ] arr [ l ] = arr [ h ] arr [ h ] = t if h - l + 1 > 2 : t = ( int ) ( ( h - l + 1 ) / 3 ) f_gold ( arr , l , ( h - t ) ) f_gold ( arr , l + t , ( h ) ) f_gold ( arr , l , ( h - t ) ) "," using namespace std; void f_gold ( int arr [ ], int l, int h ) { if ( l >= h ) return; if ( arr [ l ] > arr [ h ] ) swap ( arr [ l ], arr [ h ] ); if ( h - l + 1 > 2 ) { int t = ( h - l + 1 ) / 3; f_gold ( arr, l, h - t ); f_gold ( arr, l + t, h ); f_gold ( arr, l, h - t ); } } int main() { int n_success = 0; vector> param0 {{6,25,42,52,53,54,58,66,67,70},{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25},{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},{7,49,26,33,48,79,2,71,32,4,20,36},{88},{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0},{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99},{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}}; vector param1 {6,16,28,9,0,20,28,15,12,27}; vector param2 {6,14,24,10,0,28,29,11,17,20}; vector> filled_function_param0 {{6,25,42,52,53,54,58,66,67,70},{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25},{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},{7,49,26,33,48,79,2,71,32,4,20,36},{88},{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0},{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99},{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}}; vector filled_function_param1 {6,16,28,9,0,20,28,15,12,27}; vector filled_function_param2 {6,14,24,10,0,28,29,11,17,20}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i],filled_function_param2[i]); f_gold(¶m0[i].front(),param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_param2[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 25, 42, 52, 53, 54, 58, 66, 67, 70],6,6,), ([-13, -98, 50, -63, 48, 3, -76, 12, -35, 93, 29, 17, 16, 5, -97, -54, -45, -25],16,14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,24,), ([7, 49, 26, 33, 48, 79, 2, 71, 32, 4, 20, 36],9,10,), ([88],0,0,), ([1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],20,28,), ([2, 2, 4, 5, 7, 12, 12, 14, 14, 16, 17, 29, 29, 31, 32, 39, 41, 47, 48, 49, 51, 54, 58, 58, 59, 60, 73, 78, 80, 81, 82, 83, 84, 85, 90, 95, 97, 99, 99],28,29,), ([-31, -55, 6, 37, 77, 61, 0, 46, -91, -38, 85, -71, 25, 14, 53, 43, 34],15,11,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,17,), ([77, 68, 78, 97, 92, 52, 37, 8, 44, 98, 5, 69, 31, 45, 9, 32, 33, 67, 30, 76, 29, 3, 90, 57, 30, 9, 26, 2, 62, 3, 46, 68, 25, 51, 13, 44, 35, 55],27,20,) ] filled_function_param = [ ([6, 25, 42, 52, 53, 54, 58, 66, 67, 70],6,6,), ([-13, -98, 50, -63, 48, 3, -76, 12, -35, 93, 29, 17, 16, 5, -97, -54, -45, -25],16,14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,24,), ([7, 49, 26, 33, 48, 79, 2, 71, 32, 4, 20, 36],9,10,), ([88],0,0,), ([1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],20,28,), ([2, 2, 4, 5, 7, 12, 12, 14, 14, 16, 17, 29, 29, 31, 32, 39, 41, 47, 48, 49, 51, 54, 58, 58, 59, 60, 73, 78, 80, 81, 82, 83, 84, 85, 90, 95, 97, 99, 99],28,29,), ([-31, -55, 6, 37, 77, 61, 0, 46, -91, -38, 85, -71, 25, 14, 53, 43, 34],15,11,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,17,), ([77, 68, 78, 97, 92, 52, 37, 8, 44, 98, 5, 69, 31, 45, 9, 32, 33, 67, 30, 76, 29, 3, 90, 57, 30, 9, 26, 2, 62, 3, 46, 68, 25, 51, 13, 44, 35, 55],27,20,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_DIGITS_FACTORIAL_SET_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DIGITS_FACTORIAL_SET_1{ static int f_gold ( int n ) { if ( n < 0 ) return 0 ; if ( n <= 1 ) return 1 ; double digits = 0 ; for ( int i = 2 ; i <= n ; i ++ ) digits += Math . log10 ( i ) ; return ( int ) ( Math . floor ( digits ) ) + 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(66); param0.add(7); param0.add(55); param0.add(37); param0.add(76); param0.add(16); param0.add(17); param0.add(95); param0.add(71); param0.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : if ( n < 0 ) : return 0 ; if ( n <= 1 ) : return 1 ; digits = 0 ; for i in range ( 2 , n + 1 ) : digits += math.log10 ( i ) ; return math.floor ( digits ) + 1 ; "," using namespace std; int f_gold ( int n ) { if ( n < 0 ) return 0; if ( n <= 1 ) return 1; double digits = 0; for ( int i = 2; i <= n; i ++ ) digits += log10 ( i ); return floor ( digits ) + 1; } int main() { int n_success = 0; vector param0 {66,7,55,37,76,16,17,95,71,90}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (66,), (7,), (55,), (37,), (76,), (16,), (17,), (95,), (71,), (90,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE{ static int f_gold ( int a ) { return 4 * a ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(98); param0.add(9); param0.add(18); param0.add(38); param0.add(84); param0.add(8); param0.add(39); param0.add(6); param0.add(60); param0.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a ) : return ( 4 * a ) "," using namespace std; int f_gold ( int a ) { return 4 * a; } int main() { int n_success = 0; vector param0 {98,9,18,38,84,8,39,6,60,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (98,), (9,), (18,), (38,), (84,), (8,), (39,), (6,), (60,), (47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SPACE_OPTIMIZED_SOLUTION_LCS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SPACE_OPTIMIZED_SOLUTION_LCS{ public static int f_gold ( String X , String Y ) { int m = X . length ( ) , n = Y . length ( ) ; int L [ ] [ ] = new int [ 2 ] [ n + 1 ] ; int bi = 0 ; for ( int i = 0 ; i <= m ; i ++ ) { bi = i & 1 ; for ( int j = 0 ; j <= n ; j ++ ) { if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0 ; else if ( X . charAt ( i - 1 ) == Y . charAt ( j - 1 ) ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1 ; else L [ bi ] [ j ] = Math . max ( L [ 1 - bi ] [ j ] , L [ bi ] [ j - 1 ] ) ; } } return L [ bi ] [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""YNpjSv""); param0.add(""736519""); param0.add(""11010000100010""); param0.add(""v ""); param0.add(""8311172""); param0.add(""100011101011""); param0.add(""u""); param0.add(""3943042""); param0.add(""101""); param0.add(""MpbfF OsizevaM""); List param1 = new ArrayList<>(); param1.add(""qtUkJn""); param1.add(""07592""); param1.add(""0""); param1.add(""qGBQT""); param1.add(""157219329531""); param1.add(""1000001111""); param1.add(""YzkubTqLhP""); param1.add(""3859""); param1.add(""00010000101010""); param1.add(""WgsFGaQwtp""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( X , Y ) : m = len ( X ) n = len ( Y ) L = [ [ 0 for i in range ( n + 1 ) ] for j in range ( 2 ) ] bi = bool for i in range ( m ) : bi = i & 1 for j in range ( n + 1 ) : if ( i == 0 or j == 0 ) : L [ bi ] [ j ] = 0 elif ( X [ i ] == Y [ j - 1 ] ) : L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1 else : L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ] , L [ bi ] [ j - 1 ] ) return L [ bi ] [ n ] "," using namespace std; int f_gold ( string & X, string & Y ) { int m = X . length ( ), n = Y . length ( ); int L [ 2 ] [ n + 1 ]; bool bi; for ( int i = 0; i <= m; i ++ ) { bi = i & 1; for ( int j = 0; j <= n; j ++ ) { if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0; else if ( X [ i - 1 ] == Y [ j - 1 ] ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1; else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] ); } } return L [ bi ] [ n ]; } int main() { int n_success = 0; vector param0 {""YNpjSv"",""736519"",""11010000100010"",""v "",""8311172"",""100011101011"",""u"",""3943042"",""101"",""MpbfF OsizevaM""}; vector param1 {""qtUkJn"",""07592"",""0"",""qGBQT"",""157219329531"",""1000001111"",""YzkubTqLhP"",""3859"",""00010000101010"",""WgsFGaQwtp""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('YNpjSv','qtUkJn',), ('736519','07592',), ('11010000100010','0',), ('v ','qGBQT',), ('8311172','157219329531',), ('100011101011','1000001111',), ('u','YzkubTqLhP',), ('3943042','3859',), ('101','00010000101010',), ('MpbfF OsizevaM','WgsFGaQwtp',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_PAIRWISE_PRODUCTS_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_PAIRWISE_PRODUCTS_2{ static int f_gold ( int n ) { return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(18); param0.add(97); param0.add(9); param0.add(42); param0.add(67); param0.add(71); param0.add(66); param0.add(69); param0.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24 "," using namespace std; long long int f_gold ( int n ) { return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24; } int main() { int n_success = 0; vector param0 {57,18,97,9,42,67,71,66,69,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,), (18,), (97,), (9,), (42,), (67,), (71,), (66,), (69,), (18,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1{ public static int f_gold ( int n ) { int count = 0 ; for ( int curr = 19 ; ; curr += 9 ) { int sum = 0 ; for ( int x = curr ; x > 0 ; x = x / 10 ) sum = sum + x % 10 ; if ( sum == 10 ) count ++ ; if ( count == n ) return curr ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(93); param0.add(10); param0.add(55); param0.add(94); param0.add(2); param0.add(5); param0.add(37); param0.add(4); param0.add(11); param0.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : count = 0 ; curr = 19 ; while ( True ) : sum = 0 ; x = curr ; while ( x > 0 ) : sum = sum + x % 10 ; x = int ( x / 10 ) ; if ( sum == 10 ) : count += 1 ; if ( count == n ) : return curr ; curr += 9 ; return - 1 ; "," using namespace std; int f_gold ( int n ) { int count = 0; for ( int curr = 19; ; curr += 9 ) { int sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; } int main() { int n_success = 0; vector param0 {93,10,55,94,2,5,37,4,11,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (93,), (10,), (55,), (94,), (2,), (5,), (37,), (4,), (11,), (46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_OPERATION_MAKE_ELEMENTS_EQUAL_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_OPERATION_MAKE_ELEMENTS_EQUAL_ARRAY{ public static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > hash = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) if ( hash . containsKey ( arr [ i ] ) ) hash . put ( arr [ i ] , hash . get ( arr [ i ] ) + 1 ) ; else hash . put ( arr [ i ] , 1 ) ; int max_count = 0 ; Set < Integer > s = hash . keySet ( ) ; for ( int i : s ) if ( max_count < hash . get ( i ) ) max_count = hash . get ( i ) ; return ( n - max_count ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98}); param0.add(new int[]{-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94}); param0.add(new int[]{0,1,1}); param0.add(new int[]{68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27}); param0.add(new int[]{-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94}); param0.add(new int[]{0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0}); param0.add(new int[]{3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97}); param0.add(new int[]{40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88}); param0.add(new int[]{0,0,1,1,1,1,1}); param0.add(new int[]{87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10}); List param1 = new ArrayList<>(); param1.add(33); param1.add(11); param1.add(1); param1.add(36); param1.add(18); param1.add(21); param1.add(23); param1.add(36); param1.add(4); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hash; for ( int i = 0; i < n; i ++ ) hash [ arr [ i ] ] ++; int max_count = 0; for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second; return ( n - max_count ); } int main() { int n_success = 0; vector> param0 {{2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98},{-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94},{0,1,1},{68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27},{-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94},{0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0},{3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97},{40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88},{0,0,1,1,1,1,1},{87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10}}; vector param1 {33,11,1,36,18,21,23,36,4,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N{ static int f_gold ( int n ) { int prime [ ] = new int [ n + 1 ] , sum = 0 ; Arrays . fill ( prime , 0 ) ; int max = n / 2 ; for ( int p = 2 ; p <= max ; p ++ ) { if ( prime [ p ] == 0 ) { for ( int i = p * 2 ; i <= n ; i += p ) prime [ i ] = p ; } } for ( int p = 2 ; p <= n ; p ++ ) { if ( prime [ p ] != 0 ) sum += prime [ p ] ; else sum += p ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(6); param0.add(35); param0.add(87); param0.add(91); param0.add(63); param0.add(11); param0.add(66); param0.add(17); param0.add(92); param0.add(81); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): prime = [0] * (n + 1) sum = 0 max = int(n / 2) for p in range(2, max + 1): if prime[p] == 0: for i in range(p * 2, n + 1, p): prime[i] = p for p in range(2, n + 1): if prime[p]: sum += prime[p] else: sum += p return sum "," using namespace std; int f_gold ( int n ) { int prime [ n + 1 ], sum = 0; memset ( prime, 0, sizeof ( prime ) ); int max = n / 2; for ( int p = 2; p <= max; p ++ ) { if ( prime [ p ] == 0 ) { for ( int i = p * 2; i <= n; i += p ) prime [ i ] = p; } } for ( int p = 2; p <= n; p ++ ) { if ( prime [ p ] ) sum += prime [ p ]; else sum += p; } return sum; } int main() { int n_success = 0; vector param0 {6,35,87,91,63,11,66,17,92,81}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (6,), (35,), (87,), (91,), (63,), (11,), (66,), (17,), (92,), (81,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_1{ static int f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n , int x ) { int count = 0 ; HashSet < Integer > us = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < m ; i ++ ) us . add ( arr1 [ i ] ) ; for ( int j = 0 ; j < n ; j ++ ) if ( us . contains ( x - arr2 [ j ] ) ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,5,5,9,11,12,14,16,18,35,36,39,44,50,52,52,59,69,81,82,84,85,87,87,87,88,88,89,90,90,92,97}); param0.add(new int[]{52,28,-38,78,-86,78,-48,-70,-80,28,-8,60,-28,90,6,76,32,-54,30,30,-32,-24,-36,62,36,-66,56,92,-20,90,32}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{91,95,13,13,76,18,36,86,26,13,17,68,58,42,38,9,42,90,14,74,38,64,15}); param0.add(new int[]{-96,-94,-94,-92,-74,-70,-66,-54,-48,-20,-18,-10,-6,-2,2,18,36,48,52,58,68,74,88,90,94}); param0.add(new int[]{1,1,1,0,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1,1,0}); param0.add(new int[]{7,18,19,20,24,25,25,27,30,35,39,42,58,59,63,64,64,66,66,68,69,77,86,93}); param0.add(new int[]{86,44,10,80,12,52,-92,2,42,-32,-14,2,-42,40,96,22,58,-90,-20,22,96,10,-92,-28,-28,80,36,72,-2,32,-46,62,-58,20,22,32,-98,-2,-42,-90,10,70,54,-32}); param0.add(new int[]{0,0,1,1,1,1}); param0.add(new int[]{43,2,4,99,45,80,27,8,64,77,57,55,71,67,51,42,58,70,5,62,55,20,61,47,66,80,70,24,56,22,58,63,61,41,20,97,47}); List param1 = new ArrayList<>(); param1.add(new int[]{5,5,8,20,20,24,25,29,34,37,43,45,48,49,59,60,68,70,70,72,72,75,76,77,79,81,84,85,86,88,95,96,96}); param1.add(new int[]{-88,-32,30,32,-46,62,-92,-90,-18,-18,10,16,60,-40,32,-88,60,-82,76,50,86,-82,-48,-68,-42,34,4,0,98,92,-78}); param1.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param1.add(new int[]{16,96,8,35,12,27,81,21,32,82,95,81,53,76,72,16,9,16,61,1,36,71,28}); param1.add(new int[]{-92,-72,-72,-64,-58,-52,-30,-28,-24,-24,-16,-10,-2,4,12,22,30,38,44,62,64,68,86,88,90}); param1.add(new int[]{1,0,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0}); param1.add(new int[]{2,2,18,20,22,22,31,35,36,40,41,41,41,42,42,43,45,61,79,83,87,91,95,96}); param1.add(new int[]{-4,-76,-98,14,30,-10,-10,62,88,-94,-74,-82,84,44,58,8,-42,-66,-18,68,-78,42,-32,38,-98,38,-78,42,86,-38,-6,-72,-44,8,-6,-48,-62,82,94,-92,-56,28,-54,34}); param1.add(new int[]{0,0,1,1,1,1}); param1.add(new int[]{11,66,41,17,93,25,24,17,12,33,62,86,48,68,36,36,39,82,7,66,5,48,27,9,56,6,61,91,98,74,61,63,98,96,57,63,85}); List param2 = new ArrayList<>(); param2.add(17); param2.add(30); param2.add(13); param2.add(11); param2.add(19); param2.add(18); param2.add(22); param2.add(26); param2.add(5); param2.add(24); List param3 = new ArrayList<>(); param3.add(29); param3.add(27); param3.add(11); param3.add(12); param3.add(14); param3.add(19); param3.add(18); param3.add(36); param3.add(3); param3.add(29); List param4 = new ArrayList<>(); param4.add(32); param4.add(17); param4.add(8); param4.add(15); param4.add(21); param4.add(29); param4.add(18); param4.add(31); param4.add(5); param4.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , m , n , x ) : count = 0 us = set ( ) for i in range ( m ) : us.add ( arr1 [ i ] ) for j in range ( n ) : if x - arr2 [ j ] in us : count += 1 return count "," using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) { int count = 0; unordered_set < int > us; for ( int i = 0; i < m; i ++ ) us . insert ( arr1 [ i ] ); for ( int j = 0; j < n; j ++ ) if ( us . find ( x - arr2 [ j ] ) != us . end ( ) ) count ++; return count; } int main() { int n_success = 0; vector> param0 {{1,2,5,5,9,11,12,14,16,18,35,36,39,44,50,52,52,59,69,81,82,84,85,87,87,87,88,88,89,90,90,92,97},{52,28,-38,78,-86,78,-48,-70,-80,28,-8,60,-28,90,6,76,32,-54,30,30,-32,-24,-36,62,36,-66,56,92,-20,90,32},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{91,95,13,13,76,18,36,86,26,13,17,68,58,42,38,9,42,90,14,74,38,64,15},{-96,-94,-94,-92,-74,-70,-66,-54,-48,-20,-18,-10,-6,-2,2,18,36,48,52,58,68,74,88,90,94},{1,1,1,0,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1,1,0},{7,18,19,20,24,25,25,27,30,35,39,42,58,59,63,64,64,66,66,68,69,77,86,93},{86,44,10,80,12,52,-92,2,42,-32,-14,2,-42,40,96,22,58,-90,-20,22,96,10,-92,-28,-28,80,36,72,-2,32,-46,62,-58,20,22,32,-98,-2,-42,-90,10,70,54,-32},{0,0,1,1,1,1},{43,2,4,99,45,80,27,8,64,77,57,55,71,67,51,42,58,70,5,62,55,20,61,47,66,80,70,24,56,22,58,63,61,41,20,97,47}}; vector> param1 {{5,5,8,20,20,24,25,29,34,37,43,45,48,49,59,60,68,70,70,72,72,75,76,77,79,81,84,85,86,88,95,96,96},{-88,-32,30,32,-46,62,-92,-90,-18,-18,10,16,60,-40,32,-88,60,-82,76,50,86,-82,-48,-68,-42,34,4,0,98,92,-78},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{16,96,8,35,12,27,81,21,32,82,95,81,53,76,72,16,9,16,61,1,36,71,28},{-92,-72,-72,-64,-58,-52,-30,-28,-24,-24,-16,-10,-2,4,12,22,30,38,44,62,64,68,86,88,90},{1,0,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0},{2,2,18,20,22,22,31,35,36,40,41,41,41,42,42,43,45,61,79,83,87,91,95,96},{-4,-76,-98,14,30,-10,-10,62,88,-94,-74,-82,84,44,58,8,-42,-66,-18,68,-78,42,-32,38,-98,38,-78,42,86,-38,-6,-72,-44,8,-6,-48,-62,82,94,-92,-56,28,-54,34},{0,0,1,1,1,1},{11,66,41,17,93,25,24,17,12,33,62,86,48,68,36,36,39,82,7,66,5,48,27,9,56,6,61,91,98,74,61,63,98,96,57,63,85}}; vector param2 {17,30,13,11,19,18,22,26,5,24}; vector param3 {29,27,11,12,14,19,18,36,3,29}; vector param4 {32,17,8,15,21,29,18,31,5,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 2, 5, 5, 9, 11, 12, 14, 16, 18, 35, 36, 39, 44, 50, 52, 52, 59, 69, 81, 82, 84, 85, 87, 87, 87, 88, 88, 89, 90, 90, 92, 97],[5, 5, 8, 20, 20, 24, 25, 29, 34, 37, 43, 45, 48, 49, 59, 60, 68, 70, 70, 72, 72, 75, 76, 77, 79, 81, 84, 85, 86, 88, 95, 96, 96],17,29,32,), ([52, 28, -38, 78, -86, 78, -48, -70, -80, 28, -8, 60, -28, 90, 6, 76, 32, -54, 30, 30, -32, -24, -36, 62, 36, -66, 56, 92, -20, 90, 32],[-88, -32, 30, 32, -46, 62, -92, -90, -18, -18, 10, 16, 60, -40, 32, -88, 60, -82, 76, 50, 86, -82, -48, -68, -42, 34, 4, 0, 98, 92, -78],30,27,17,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],13,11,8,), ([91, 95, 13, 13, 76, 18, 36, 86, 26, 13, 17, 68, 58, 42, 38, 9, 42, 90, 14, 74, 38, 64, 15],[16, 96, 8, 35, 12, 27, 81, 21, 32, 82, 95, 81, 53, 76, 72, 16, 9, 16, 61, 1, 36, 71, 28],11,12,15,), ([-96, -94, -94, -92, -74, -70, -66, -54, -48, -20, -18, -10, -6, -2, 2, 18, 36, 48, 52, 58, 68, 74, 88, 90, 94],[-92, -72, -72, -64, -58, -52, -30, -28, -24, -24, -16, -10, -2, 4, 12, 22, 30, 38, 44, 62, 64, 68, 86, 88, 90],19,14,21,), ([1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0],[1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0],18,19,29,), ([7, 18, 19, 20, 24, 25, 25, 27, 30, 35, 39, 42, 58, 59, 63, 64, 64, 66, 66, 68, 69, 77, 86, 93],[2, 2, 18, 20, 22, 22, 31, 35, 36, 40, 41, 41, 41, 42, 42, 43, 45, 61, 79, 83, 87, 91, 95, 96],22,18,18,), ([86, 44, 10, 80, 12, 52, -92, 2, 42, -32, -14, 2, -42, 40, 96, 22, 58, -90, -20, 22, 96, 10, -92, -28, -28, 80, 36, 72, -2, 32, -46, 62, -58, 20, 22, 32, -98, -2, -42, -90, 10, 70, 54, -32],[-4, -76, -98, 14, 30, -10, -10, 62, 88, -94, -74, -82, 84, 44, 58, 8, -42, -66, -18, 68, -78, 42, -32, 38, -98, 38, -78, 42, 86, -38, -6, -72, -44, 8, -6, -48, -62, 82, 94, -92, -56, 28, -54, 34],26,36,31,), ([0, 0, 1, 1, 1, 1],[0, 0, 1, 1, 1, 1],5,3,5,), ([43, 2, 4, 99, 45, 80, 27, 8, 64, 77, 57, 55, 71, 67, 51, 42, 58, 70, 5, 62, 55, 20, 61, 47, 66, 80, 70, 24, 56, 22, 58, 63, 61, 41, 20, 97, 47],[11, 66, 41, 17, 93, 25, 24, 17, 12, 33, 62, 86, 48, 68, 36, 36, 39, 82, 7, 66, 5, 48, 27, 9, 56, 6, 61, 91, 98, 74, 61, 63, 98, 96, 57, 63, 85],24,29,21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K{ static boolean f_gold ( Integer a [ ] , int b [ ] , int n , int k ) { Arrays . sort ( a , Collections . reverseOrder ( ) ) ; Arrays . sort ( b ) ; for ( int i = 0 ; i < n ; i ++ ) if ( a [ i ] + b [ i ] < k ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new Integer[]{9,12,16,25,27,40,43,52,52,70,87,88,90,97,99}); param0.add(new Integer[]{-96,-90,-80,10,-84,-96,-28,-42,30,-92,-44,-14,18,-68,-94,6,-76,72,-90,42,70,-78,56,-26,8,74,12,-74,20,-86,-74,-90,-98,92,30,94,14,92,88,-98,42,-48}); param0.add(new Integer[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new Integer[]{13,35,6,69,42,55,11,97,15,65,70,77,51,16,3,26,47,72,15,71,2,31,18,59,75,48}); param0.add(new Integer[]{-72,-70,-66,-64,-52,-52,-52,-48,-46,-42,-40,-34,-20,-4,-4,-2,2,4,16,16,18,18,32,36,52,54,56,56,58,68,72,74,84,84,90,90,92,94}); param0.add(new Integer[]{1,0,0,1,0,1,1,0,1,0,1,1,1,0,0,1,0,1,0}); param0.add(new Integer[]{8,17,18,21,23,32,34,37,44,48,53,58,64,66,66,72,72,79,80,80,80,82,87,92,93,94,96,96,98}); param0.add(new Integer[]{-20,-22,-16,-80,-88,22,-78,-82,-50,32,28,-8,-48,80,62,-14,14,10,-78,78,52,94,-66,14,50,18,-38,-98,24,18,-28,24,10,-88,-14}); param0.add(new Integer[]{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}); param0.add(new Integer[]{75,31,58,10,92,65,45,72,53,91,39,33,10,13,67,85}); List param1 = new ArrayList<>(); param1.add(new int[]{4,7,11,20,34,35,36,44,46,71,72,78,85,85,91}); param1.add(new int[]{-48,84,16,-72,96,-78,-76,-84,-76,-32,-50,62,-22,24,-32,94,8,-14,-20,44,-80,68,-44,60,94,-42,-44,-74,-98,-86,16,62,-80,18,-18,70,30,40,-56,76,-32,50}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param1.add(new int[]{88,15,44,36,38,98,89,81,73,51,37,4,79,60,11,62,48,45,12,21,65,14,78,20,12,46}); param1.add(new int[]{-94,-76,-74,-56,-54,-50,-46,-38,-26,-24,-24,-22,-16,-10,-6,-4,-4,0,0,6,12,12,18,20,38,50,52,52,54,64,64,72,72,72,76,90,96,96}); param1.add(new int[]{1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1}); param1.add(new int[]{11,15,17,19,23,23,26,27,36,43,46,47,55,59,63,66,77,79,79,82,85,86,86,91,91,94,94,97,99}); param1.add(new int[]{6,-54,90,98,-30,88,36,88,38,12,46,-66,-80,32,42,-96,62,-44,-80,-14,20,2,70,-46,96,-40,52,56,96,-82,24,98,-16,90,66}); param1.add(new int[]{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}); param1.add(new int[]{41,91,78,28,40,71,74,69,71,12,7,21,92,19,39,34}); List param2 = new ArrayList<>(); param2.add(10); param2.add(40); param2.add(11); param2.add(25); param2.add(26); param2.add(13); param2.add(20); param2.add(31); param2.add(31); param2.add(14); List param3 = new ArrayList<>(); param3.add(7); param3.add(38); param3.add(15); param3.add(16); param3.add(30); param3.add(13); param3.add(14); param3.add(24); param3.add(30); param3.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , n , k ) : a.sort ( reverse = True ) b.sort ( ) for i in range ( n ) : if ( a [ i ] + b [ i ] < k ) : return False return True "," using namespace std; bool f_gold ( int a [ ], int b [ ], int n, int k ) { sort ( a, a + n ); sort ( b, b + n, greater < int > ( ) ); for ( int i = 0; i < n; i ++ ) if ( a [ i ] + b [ i ] < k ) return false; return true; } int main() { int n_success = 0; vector> param0 {{9,12,16,25,27,40,43,52,52,70,87,88,90,97,99},{-96,-90,-80,10,-84,-96,-28,-42,30,-92,-44,-14,18,-68,-94,6,-76,72,-90,42,70,-78,56,-26,8,74,12,-74,20,-86,-74,-90,-98,92,30,94,14,92,88,-98,42,-48},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{13,35,6,69,42,55,11,97,15,65,70,77,51,16,3,26,47,72,15,71,2,31,18,59,75,48},{-72,-70,-66,-64,-52,-52,-52,-48,-46,-42,-40,-34,-20,-4,-4,-2,2,4,16,16,18,18,32,36,52,54,56,56,58,68,72,74,84,84,90,90,92,94},{1,0,0,1,0,1,1,0,1,0,1,1,1,0,0,1,0,1,0},{8,17,18,21,23,32,34,37,44,48,53,58,64,66,66,72,72,79,80,80,80,82,87,92,93,94,96,96,98},{-20,-22,-16,-80,-88,22,-78,-82,-50,32,28,-8,-48,80,62,-14,14,10,-78,78,52,94,-66,14,50,18,-38,-98,24,18,-28,24,10,-88,-14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{75,31,58,10,92,65,45,72,53,91,39,33,10,13,67,85}}; vector> param1 {{4,7,11,20,34,35,36,44,46,71,72,78,85,85,91},{-48,84,16,-72,96,-78,-76,-84,-76,-32,-50,62,-22,24,-32,94,8,-14,-20,44,-80,68,-44,60,94,-42,-44,-74,-98,-86,16,62,-80,18,-18,70,30,40,-56,76,-32,50},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{88,15,44,36,38,98,89,81,73,51,37,4,79,60,11,62,48,45,12,21,65,14,78,20,12,46},{-94,-76,-74,-56,-54,-50,-46,-38,-26,-24,-24,-22,-16,-10,-6,-4,-4,0,0,6,12,12,18,20,38,50,52,52,54,64,64,72,72,72,76,90,96,96},{1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1},{11,15,17,19,23,23,26,27,36,43,46,47,55,59,63,66,77,79,79,82,85,86,86,91,91,94,94,97,99},{6,-54,90,98,-30,88,36,88,38,12,46,-66,-80,32,42,-96,62,-44,-80,-14,20,2,70,-46,96,-40,52,56,96,-82,24,98,-16,90,66},{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},{41,91,78,28,40,71,74,69,71,12,7,21,92,19,39,34}}; vector param2 {10,40,11,25,26,13,20,31,31,14}; vector param3 {7,38,15,16,30,13,14,24,30,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([9, 12, 16, 25, 27, 40, 43, 52, 52, 70, 87, 88, 90, 97, 99],[4, 7, 11, 20, 34, 35, 36, 44, 46, 71, 72, 78, 85, 85, 91],10,7,), ([-96, -90, -80, 10, -84, -96, -28, -42, 30, -92, -44, -14, 18, -68, -94, 6, -76, 72, -90, 42, 70, -78, 56, -26, 8, 74, 12, -74, 20, -86, -74, -90, -98, 92, 30, 94, 14, 92, 88, -98, 42, -48],[-48, 84, 16, -72, 96, -78, -76, -84, -76, -32, -50, 62, -22, 24, -32, 94, 8, -14, -20, 44, -80, 68, -44, 60, 94, -42, -44, -74, -98, -86, 16, 62, -80, 18, -18, 70, 30, 40, -56, 76, -32, 50],40,38,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],11,15,), ([13, 35, 6, 69, 42, 55, 11, 97, 15, 65, 70, 77, 51, 16, 3, 26, 47, 72, 15, 71, 2, 31, 18, 59, 75, 48],[88, 15, 44, 36, 38, 98, 89, 81, 73, 51, 37, 4, 79, 60, 11, 62, 48, 45, 12, 21, 65, 14, 78, 20, 12, 46],25,16,), ([-72, -70, -66, -64, -52, -52, -52, -48, -46, -42, -40, -34, -20, -4, -4, -2, 2, 4, 16, 16, 18, 18, 32, 36, 52, 54, 56, 56, 58, 68, 72, 74, 84, 84, 90, 90, 92, 94],[-94, -76, -74, -56, -54, -50, -46, -38, -26, -24, -24, -22, -16, -10, -6, -4, -4, 0, 0, 6, 12, 12, 18, 20, 38, 50, 52, 52, 54, 64, 64, 72, 72, 72, 76, 90, 96, 96],26,30,), ([1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0],[1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1],13,13,), ([8, 17, 18, 21, 23, 32, 34, 37, 44, 48, 53, 58, 64, 66, 66, 72, 72, 79, 80, 80, 80, 82, 87, 92, 93, 94, 96, 96, 98],[11, 15, 17, 19, 23, 23, 26, 27, 36, 43, 46, 47, 55, 59, 63, 66, 77, 79, 79, 82, 85, 86, 86, 91, 91, 94, 94, 97, 99],20,14,), ([-20, -22, -16, -80, -88, 22, -78, -82, -50, 32, 28, -8, -48, 80, 62, -14, 14, 10, -78, 78, 52, 94, -66, 14, 50, 18, -38, -98, 24, 18, -28, 24, 10, -88, -14],[6, -54, 90, 98, -30, 88, 36, 88, 38, 12, 46, -66, -80, 32, 42, -96, 62, -44, -80, -14, 20, 2, 70, -46, 96, -40, 52, 56, 96, -82, 24, 98, -16, 90, 66],31,24,), ([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],31,30,), ([75, 31, 58, 10, 92, 65, 45, 72, 53, 91, 39, 33, 10, 13, 67, 85],[41, 91, 78, 28, 40, 71, 74, 69, 71, 12, 7, 21, 92, 19, 39, 34],14,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_TWO_LARGE_NUMBERS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_TWO_LARGE_NUMBERS_1{ static String f_gold ( String str1 , String str2 ) { if ( str1 . length ( ) > str2 . length ( ) ) { String t = str1 ; str1 = str2 ; str2 = t ; } String str = """" ; int n1 = str1 . length ( ) , n2 = str2 . length ( ) ; int diff = n2 - n1 ; int carry = 0 ; for ( int i = n1 - 1 ; i >= 0 ; i -- ) { int sum = ( ( int ) ( str1 . charAt ( i ) - '0' ) + ( int ) ( str2 . charAt ( i + diff ) - '0' ) + carry ) ; str += ( char ) ( sum % 10 + '0' ) ; carry = sum / 10 ; } for ( int i = n2 - n1 - 1 ; i >= 0 ; i -- ) { int sum = ( ( int ) ( str2 . charAt ( i ) - '0' ) + carry ) ; str += ( char ) ( sum % 10 + '0' ) ; carry = sum / 10 ; } if ( carry > 0 ) str += ( char ) ( carry + '0' ) ; return new StringBuilder ( str ) . reverse ( ) . toString ( ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""G""); param0.add(""48578""); param0.add(""010""); param0.add(""KkGp""); param0.add(""48928969618416""); param0.add(""0101011010""); param0.add(""X""); param0.add(""10073867""); param0.add(""01110000000""); param0.add(""k ""); List param1 = new ArrayList<>(); param1.add(""FcAiuKhw""); param1.add(""5117561223135""); param1.add(""00000""); param1.add(""nSE""); param1.add(""88497275""); param1.add(""11""); param1.add(""MomtbuxLRR""); param1.add(""28""); param1.add(""0110""); param1.add(""aSSlhOYp""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; string f_gold ( string str1, string str2 ) { if ( str1 . length ( ) > str2 . length ( ) ) swap ( str1, str2 ); string str = """"; int n1 = str1 . length ( ), n2 = str2 . length ( ); int diff = n2 - n1; int carry = 0; for ( int i = n1 - 1; i >= 0; i -- ) { int sum = ( ( str1 [ i ] - '0' ) + ( str2 [ i + diff ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } for ( int i = n2 - n1 - 1; i >= 0; i -- ) { int sum = ( ( str2 [ i ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; } int main() { int n_success = 0; vector param0 {""G"",""48578"",""010"",""KkGp"",""48928969618416"",""0101011010"",""X"",""10073867"",""01110000000"",""k ""}; vector param1 {""FcAiuKhw"",""5117561223135"",""00000"",""nSE"",""88497275"",""11"",""MomtbuxLRR"",""28"",""0110"",""aSSlhOYp""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, BREAK_NUMBER_THREE_PARTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BREAK_NUMBER_THREE_PARTS{ static long f_gold ( long n ) { long count = 0 ; for ( int i = 0 ; i <= n ; i ++ ) for ( int j = 0 ; j <= n ; j ++ ) for ( int k = 0 ; k <= n ; k ++ ) if ( i + j + k == n ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(52L); param0.add(47L); param0.add(75L); param0.add(36L); param0.add(68L); param0.add(16L); param0.add(99L); param0.add(38L); param0.add(84L); param0.add(45L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : count = 0 for i in range ( 0 , n + 1 ) : for j in range ( 0 , n + 1 ) : for k in range ( 0 , n + 1 ) : if ( i + j + k == n ) : count = count + 1 return count ",,," if __name__ == '__main__': param = [ (52,), (47,), (75,), (36,), (68,), (16,), (99,), (38,), (84,), (45,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET{ static int f_gold ( int n ) { int [ ] [ ] bell = new int [ n + 1 ] [ n + 1 ] ; bell [ 0 ] [ 0 ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) { bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ] ; for ( int j = 1 ; j <= i ; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ] ; } return bell [ n ] [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(84); param0.add(78); param0.add(9); param0.add(73); param0.add(4); param0.add(53); param0.add(85); param0.add(38); param0.add(39); param0.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : bell = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ] bell [ 0 ] [ 0 ] = 1 for i in range ( 1 , n + 1 ) : bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ] for j in range ( 1 , i + 1 ) : bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ] return bell [ n ] [ 0 ] "," using namespace std; int f_gold ( int n ) { int bell [ n + 1 ] [ n + 1 ]; bell [ 0 ] [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) { bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ]; for ( int j = 1; j <= i; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]; } return bell [ n ] [ 0 ]; } int main() { int n_success = 0; vector param0 {84,78,9,73,4,53,85,38,39,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (84,), (78,), (9,), (73,), (4,), (53,), (85,), (38,), (39,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_ONE_EXTRA_CHARACTER_STRING_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_ONE_EXTRA_CHARACTER_STRING_1{ static char f_gold ( String strA , String strB ) { int res = 0 , i ; for ( i = 0 ; i < strA . length ( ) ; i ++ ) { res ^= strA . charAt ( i ) ; } for ( i = 0 ; i < strB . length ( ) ; i ++ ) { res ^= strB . charAt ( i ) ; } return ( ( char ) ( res ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""obfLA mmMYvghH""); param0.add(""2941""); param0.add(""0111111""); param0.add(""oWvbFstI""); param0.add(""4937516500""); param0.add(""101110100""); param0.add(""hYZscJQFBE""); param0.add(""58443""); param0.add(""1100""); param0.add(""ZUdYuIBVNaeeb""); List param1 = new ArrayList<>(); param1.add(""obfLA mmMYvghH""); param1.add(""2941""); param1.add(""0111111""); param1.add(""oWvbFstI""); param1.add(""4937516500""); param1.add(""101110100""); param1.add(""hYZscJQFBE""); param1.add(""58443""); param1.add(""1100""); param1.add(""ZUdYuIBVNaeeb""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( strA , strB ) : res = 0 for i in range ( 0 , len ( strA ) ) : res = res ^ ( ord ) ( strA [ i ] ) for i in range ( 0 , len ( strB ) ) : res = res ^ ( ord ) ( strB [ i ] ) return ( ( chr ) ( res ) ) ; "," using namespace std; char f_gold ( string strA, string strB ) { int res = 0, i; for ( i = 0; i < strA . length ( ); i ++ ) { res ^= strA [ i ]; } for ( i = 0; i < strB . length ( ); i ++ ) { res ^= strB [ i ]; } return ( ( char ) ( res ) ); } int main() { int n_success = 0; vector param0 {""obfLA mmMYvghH"",""2941"",""0111111"",""oWvbFstI"",""4937516500"",""101110100"",""hYZscJQFBE"",""58443"",""1100"",""ZUdYuIBVNaeeb""}; vector param1 {""obfLA mmMYvghH"",""23941"",""01011111"",""oWvsbFstI"",""49376516500"",""1011210100"",""hYZscJQQFBE"",""584443"",""11000"",""ZUdYVuIBVNaeeb""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('obfLA mmMYvghH','obfLA mmMYvghH',), ('2941','2941',), ('0111111','0111111',), ('oWvbFstI','oWvbFstI',), ('4937516500','4937516500',), ('101110100','101110100',), ('hYZscJQFBE','hYZscJQFBE',), ('58443','58443',), ('1100','1100',), ('ZUdYuIBVNaeeb','ZUdYuIBVNaeeb',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MULTIPLY_LARGE_NUMBERS_REPRESENTED_AS_STRINGS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_LARGE_NUMBERS_REPRESENTED_AS_STRINGS{ static String f_gold ( String num1 , String num2 ) { int len1 = num1 . length ( ) ; int len2 = num2 . length ( ) ; if ( len1 == 0 || len2 == 0 ) return ""0"" ; int result [ ] = new int [ len1 + len2 ] ; int i_n1 = 0 ; int i_n2 = 0 ; for ( int i = len1 - 1 ; i >= 0 ; i -- ) { int carry = 0 ; int n1 = num1 . charAt ( i ) - '0' ; i_n2 = 0 ; for ( int j = len2 - 1 ; j >= 0 ; j -- ) { int n2 = num2 . charAt ( j ) - '0' ; int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry ; carry = sum / 10 ; result [ i_n1 + i_n2 ] = sum % 10 ; i_n2 ++ ; } if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry ; i_n1 ++ ; } int i = result . length - 1 ; while ( i >= 0 && result [ i ] == 0 ) i -- ; if ( i == - 1 ) return ""0"" ; String s = """" ; while ( i >= 0 ) s += ( result [ i -- ] ) ; return s ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""OaITtzE""); param0.add(""88111031""); param0.add(""1100111""); param0.add(""eiWPbMrFx""); param0.add(""43701248""); param0.add(""100001111110""); param0.add(""jVgOapMp""); param0.add(""68337672""); param0.add(""00110101""); param0.add(""JqSh""); List param1 = new ArrayList<>(); param1.add(""RnYlJUqzk""); param1.add(""558471""); param1.add(""11111110111101""); param1.add(""tBAJaI""); param1.add(""4027""); param1.add(""11""); param1.add(""Xm""); param1.add(""56939""); param1.add(""1""); param1.add(""iAfjQRwuVyost""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num1 , num2 ) : len1 = len ( num1 ) len2 = len ( num2 ) if len1 == 0 or len2 == 0 : return ""0"" result = [ 0 ] * ( len1 + len2 ) i_n1 = 0 i_n2 = 0 for i in range ( len1 - 1 , - 1 , - 1 ) : carry = 0 n1 = ord ( num1 [ i ] ) - 48 i_n2 = 0 for j in range ( len2 - 1 , - 1 , - 1 ) : n2 = ord ( num2 [ j ] ) - 48 summ = n1 * n2 + result [ i_n1 + i_n2 ] + carry carry = summ // 10 result [ i_n1 + i_n2 ] = summ % 10 i_n2 += 1 if ( carry > 0 ) : result [ i_n1 + i_n2 ] += carry i_n1 += 1 i = len ( result ) - 1 while ( i >= 0 and result [ i ] == 0 ) : i -= 1 if ( i == - 1 ) : return ""0"" s = """" while ( i >= 0 ) : s += chr ( result [ i ] + 48 ) i -= 1 return s "," using namespace std; string f_gold ( string num1, string num2 ) { int len1 = num1 . size ( ); int len2 = num2 . size ( ); if ( len1 == 0 || len2 == 0 ) return ""0""; vector < int > result ( len1 + len2, 0 ); int i_n1 = 0; int i_n2 = 0; for ( int i = len1 - 1; i >= 0; i -- ) { int carry = 0; int n1 = num1 [ i ] - '0'; i_n2 = 0; for ( int j = len2 - 1; j >= 0; j -- ) { int n2 = num2 [ j ] - '0'; int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry; carry = sum / 10; result [ i_n1 + i_n2 ] = sum % 10; i_n2 ++; } if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry; i_n1 ++; } int i = result . size ( ) - 1; while ( i >= 0 && result [ i ] == 0 ) i --; if ( i == - 1 ) return ""0""; string s = """"; while ( i >= 0 ) s += std :: to_string ( result [ i -- ] ); return s; } int main() { int n_success = 0; vector param0 {""OaITtzE"",""88111031"",""1100111"",""eiWPbMrFx"",""43701248"",""100001111110"",""jVgOapMp"",""68337672"",""00110101"",""JqSh""}; vector param1 {""RnYlJUqzk"",""558471"",""11111110111101"",""tBAJaI"",""4027"",""11"",""Xm"",""56939"",""1"",""iAfjQRwuVyost""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('OaITtzE','RnYlJUqzk',), ('88111031','558471',), ('1100111','11111110111101',), ('eiWPbMrFx','tBAJaI',), ('43701248','4027',), ('100001111110','11',), ('jVgOapMp','Xm',), ('68337672','56939',), ('00110101','1',), ('JqSh','iAfjQRwuVyost',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_PRODUCT_SUBSET_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PRODUCT_SUBSET_ARRAY{ static int f_gold ( int a [ ] , int n ) { if ( n == 1 ) { return a [ 0 ] ; } int max_neg = Integer . MIN_VALUE ; int count_neg = 0 , count_zero = 0 ; int prod = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == 0 ) { count_zero ++ ; continue ; } if ( a [ i ] < 0 ) { count_neg ++ ; max_neg = Math . max ( max_neg , a [ i ] ) ; } prod = prod * a [ i ] ; } if ( count_zero == n ) { return 0 ; } if ( count_neg % 2 == 1 ) { if ( count_neg == 1 && count_zero > 0 && count_zero + count_neg == n ) { return 0 ; } prod = prod / max_neg ; } return prod ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{22,62,97}); param0.add(new int[]{-96,30,34,16,82,12,68,6,-2,-78,-74,-52,38,62,20,4,-32,44,-34,12,-44,-66,-94,24,-86,56,-20,-62,90,-16,-2,54,80,-16,-56,-98,20,84,30,-44,-78,66,-62,18}); param0.add(new int[]{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}); param0.add(new int[]{9,1,90,53,67,14,42,52,55,52,86,99,43,74,48,71,55,85,87,73,41,55,52}); param0.add(new int[]{-92,-78,-74,-72,-70,-66,-46,-44,-42,-34,-32,-30,-10,18,30,34,56,64,66}); param0.add(new int[]{0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0}); param0.add(new int[]{1,2,3,18,20,33,38,53,55,56,67,80,83,87,90,97,98}); param0.add(new int[]{-78,-14,20,70,-40,-96,78,70,-36,-30,24,-36,86,42,24,86,-52,-34,72,-58,-36,-24,-10,-68,-20,-64,34,42,-2,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{1,6,32,4,63,85,48,64,11,29,77,59,1,99,17,17,38,49,78,82,50,87,75,18,75,73,98,17,27,51,4,98,96,6,74,5}); List param1 = new ArrayList<>(); param1.add(2); param1.add(41); param1.add(43); param1.add(20); param1.add(10); param1.add(16); param1.add(9); param1.add(16); param1.add(11); param1.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : if n == 1 : return a [ 0 ] max_neg = - 999999999999 count_neg = 0 count_zero = 0 prod = 1 for i in range ( n ) : if a [ i ] == 0 : count_zero += 1 continue if a [ i ] < 0 : count_neg += 1 max_neg = max ( max_neg , a [ i ] ) prod = prod * a [ i ] if count_zero == n : return 0 if count_neg & 1 : if ( count_neg == 1 and count_zero > 0 and count_zero + count_neg == n ) : return 0 prod = int ( prod / max_neg ) return prod "," using namespace std; int f_gold ( int a [ ], int n ) { if ( n == 1 ) return a [ 0 ]; int max_neg = INT_MIN; int count_neg = 0, count_zero = 0; int prod = 1; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] == 0 ) { count_zero ++; continue; } if ( a [ i ] < 0 ) { count_neg ++; max_neg = max ( max_neg, a [ i ] ); } prod = prod * a [ i ]; } if ( count_zero == n ) return 0; if ( count_neg & 1 ) { if ( count_neg == 1 && count_zero > 0 && count_zero + count_neg == n ) return 0; prod = prod / max_neg; } return prod; } int main() { int n_success = 0; vector> param0 {{22,62,97},{-96,30,34,16,82,12,68,6,-2,-78,-74,-52,38,62,20,4,-32,44,-34,12,-44,-66,-94,24,-86,56,-20,-62,90,-16,-2,54,80,-16,-56,-98,20,84,30,-44,-78,66,-62,18},{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},{9,1,90,53,67,14,42,52,55,52,86,99,43,74,48,71,55,85,87,73,41,55,52},{-92,-78,-74,-72,-70,-66,-46,-44,-42,-34,-32,-30,-10,18,30,34,56,64,66},{0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0},{1,2,3,18,20,33,38,53,55,56,67,80,83,87,90,97,98},{-78,-14,20,70,-40,-96,78,70,-36,-30,24,-36,86,42,24,86,-52,-34,72,-58,-36,-24,-10,-68,-20,-64,34,42,-2,-8},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{1,6,32,4,63,85,48,64,11,29,77,59,1,99,17,17,38,49,78,82,50,87,75,18,75,73,98,17,27,51,4,98,96,6,74,5}}; vector param1 {2,41,43,20,10,16,9,16,11,32}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([22, 62, 97],2,), ([-96, 30, 34, 16, 82, 12, 68, 6, -2, -78, -74, -52, 38, 62, 20, 4, -32, 44, -34, 12, -44, -66, -94, 24, -86, 56, -20, -62, 90, -16, -2, 54, 80, -16, -56, -98, 20, 84, 30, -44, -78, 66, -62, 18],41,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],43,), ([9, 1, 90, 53, 67, 14, 42, 52, 55, 52, 86, 99, 43, 74, 48, 71, 55, 85, 87, 73, 41, 55, 52],20,), ([-92, -78, -74, -72, -70, -66, -46, -44, -42, -34, -32, -30, -10, 18, 30, 34, 56, 64, 66],10,), ([0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0],16,), ([1, 2, 3, 18, 20, 33, 38, 53, 55, 56, 67, 80, 83, 87, 90, 97, 98],9,), ([-78, -14, 20, 70, -40, -96, 78, 70, -36, -30, 24, -36, 86, 42, 24, 86, -52, -34, 72, -58, -36, -24, -10, -68, -20, -64, 34, 42, -2, -8],16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,), ([1, 6, 32, 4, 63, 85, 48, 64, 11, 29, 77, 59, 1, 99, 17, 17, 38, 49, 78, 82, 50, 87, 75, 18, 75, 73, 98, 17, 27, 51, 4, 98, 96, 6, 74, 5],32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SCHEDULE_ELEVATOR_TO_REDUCE_THE_TOTAL_TIME_TAKEN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SCHEDULE_ELEVATOR_TO_REDUCE_THE_TOTAL_TIME_TAKEN{ static int f_gold ( int n , int k , int a [ ] ) { int temp ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) { if ( a [ i ] < a [ j ] ) { temp = a [ i ] ; a [ i ] = a [ j ] ; a [ j ] = temp ; } } } int f_gold = 0 ; for ( int i = 0 ; i < n ; i += k ) f_gold += ( 2 * a [ i ] ) ; return f_gold ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(17); param0.add(2); param0.add(0); param0.add(16); param0.add(31); param0.add(28); param0.add(9); param0.add(32); param0.add(17); param0.add(19); List param1 = new ArrayList<>(); param1.add(15); param1.add(2); param1.add(0); param1.add(27); param1.add(23); param1.add(33); param1.add(10); param1.add(26); param1.add(22); param1.add(15); List param2 = new ArrayList<>(); param2.add(new int[]{1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99}); param2.add(new int[]{-8,70,-90,-74}); param2.add(new int[]{0}); param2.add(new int[]{3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50}); param2.add(new int[]{-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96}); param2.add(new int[]{0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1}); param2.add(new int[]{8,13,17,19,24,33,43,54,63,74,79,83}); param2.add(new int[]{0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param2.add(new int[]{97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int n, int k, int a [ ] ) { sort ( a, a + n, greater < int > ( ) ); int f_gold = 0; for ( int i = 0; i < n; i += k ) f_gold += ( 2 * a [ i ] ); return f_gold; } int main() { int n_success = 0; vector param0 {17,2,0,16,31,28,9,32,17,19}; vector param1 {15,2,0,27,23,33,10,26,22,15}; vector> param2 {{1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99},{-8,70,-90,-74},{0},{3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50},{-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96},{0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1},{8,13,17,19,24,33,43,54,63,74,79,83},{0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32}}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],¶m2[i].front()) == f_gold(param0[i],param1[i],¶m2[i].front())) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY{ static int f_gold ( int arr [ ] , int l , int h , int key ) { if ( l > h ) return - 1 ; int mid = ( l + h ) / 2 ; if ( arr [ mid ] == key ) return mid ; if ( arr [ l ] <= arr [ mid ] ) { if ( key >= arr [ l ] && key <= arr [ mid ] ) return f_gold ( arr , l , mid - 1 , key ) ; return f_gold ( arr , mid + 1 , h , key ) ; } if ( key >= arr [ mid ] && key <= arr [ h ] ) return f_gold ( arr , mid + 1 , h , key ) ; return f_gold ( arr , l , mid - 1 , key ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5, 6, 7, 8, 9, 10, 1, 2, 3}); param0.add(new int[]{{30, 40, 50, 10, 20}); param0.add(new int[]{40,50,55,67,70,4,5,6,7}); param0.add(new int[]{14,41,38,67,99,11,96,52,4,29,22,57,3,45,14,76,70,38,93,5,74,50,18,17,20,34,51,69,86,73}); param0.add(new int[]{-90,-88,-88,-82,-62,-44,-38,-38,-36,-34,-34,-32,-30,-28,-28,-26,-24,-20,-16,-16,-16,-6,-6,2,6,8,10,14,18,18,46,50,50,54,56,58,58,60,62,70,70,74,82,84,88,94,96}); param0.add(new int[]{1,1,1,1,0,0,1,1,1,1,1,1,1,0}); param0.add(new int[]{4,7,9,10,10,11,14,16,17,21,25,27,31,34,34,34,38,41,42,42,52,56,56,58,60,66,67,68,68,70,72,74,76,82,88,88,88,89,91,93,94,95,95}); param0.add(new int[]{92,60,-60,64,18,70,56,34,58,14,28,-72,-22,-74,-46,-28,64,88,18,-50,-14,-20,64,6,-4,-98,60,98,84,-58,-98,66,80,68,-42,-58,82,90,-72,34,34,80,88,-64,66,-20,-26}); param0.add(new int[]{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}); param0.add(new int[]{33,18,98,47,76,58,29,68,62,78,12,95,20,88,39,12,43,45,5,45,96,64,38,28,70,25,65,79,39}); List param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); List param2 = new ArrayList<>(); param2.add(8); param2.add(4); param2.add(9); param2.add(16); param2.add(24); param2.add(10); param2.add(23); param2.add(25); param2.add(40); param2.add(16); List param3 = new ArrayList<>(); param3.add(3); param3.add(40); param3.add(67); param3.add(15); param3.add(24); param3.add(10); param3.add(39); param3.add(25); param3.add(29); param3.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold(arr, l, h, key): if l > h: return - 1 mid = (l + h) // 2 if arr[mid] == key: return mid if arr[l] <= arr[mid]: if key >= arr[l] and key <= arr[mid]: return f_gold(arr, l, mid - 1, key) return f_gold(arr, mid + 1, h, key) if key >= arr[mid] and key <= arr[h]: return f_gold(a, mid + 1, h, key) return f_gold(arr, l, mid - 1, key) "," using namespace std; int f_gold ( int arr [ ], int l, int h, int key ) { if ( l > h ) return - 1; int mid = ( l + h ) / 2; if ( arr [ mid ] == key ) return mid; if ( arr [ l ] <= arr [ mid ] ) { if ( key >= arr [ l ] && key <= arr [ mid ] ) return f_gold ( arr, l, mid - 1, key ); return f_gold ( arr, mid + 1, h, key ); } if ( key >= arr [ mid ] && key <= arr [ h ] ) return f_gold ( arr, mid + 1, h, key ); return f_gold ( arr, l, mid - 1, key ); } int main() { int n_success = 0; vector> param0 {{5, 6, 7, 8, 9, 10, 1, 2, 3},{30, 40, 50, 10, 20},{40,50,55,67,70,4,5,6,7},{14,41,38,67,99,11,96,52,4,29,22,57,3,45,14,76,70,38,93,5,74,50,18,17,20,34,51,69,86,73},{-90,-88,-88,-82,-62,-44,-38,-38,-36,-34,-34,-32,-30,-28,-28,-26,-24,-20,-16,-16,-16,-6,-6,2,6,8,10,14,18,18,46,50,50,54,56,58,58,60,62,70,70,74,82,84,88,94,96},{1,1,1,1,0,0,1,1,1,1,1,1,1,0},{4,7,9,10,10,11,14,16,17,21,25,27,31,34,34,34,38,41,42,42,52,56,56,58,60,66,67,68,68,70,72,74,76,82,88,88,88,89,91,93,94,95,95},{92,60,-60,64,18,70,56,34,58,14,28,-72,-22,-74,-46,-28,64,88,18,-50,-14,-20,64,6,-4,-98,60,98,84,-58,-98,66,80,68,-42,-58,82,90,-72,34,34,80,88,-64,66,-20,-26},{0,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},{33,18,98,47,76,58,29,68,62,78,12,95,20,88,39,12,43,45,5,45,96,64,38,28,70,25,65,79,39}}; vector param1 {0,0,0,0,0,0,0,0,0,0}; vector param2 {8,4,9,16,24,10,23,25,40,16}; vector param3 {3,40,67,15,24,10,39,25,29,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([5, 6, 7, 8, 9, 10, 1, 2, 3], 0, 8, 3,), ([30, 40, 50, 10, 20], 0, 4, 40,), ([40, 50, 55, 67, 70, 4, 5, 6, 7], 0, 9, 67,), ([14, 41, 38, 67, 99, 11, 96, 52, 4, 29, 22, 57, 3, 45, 14, 76, 70, 38, 93, 5, 74, 50, 18, 17, 20, 34, 51, 69, 86, 73], 0, 16, 15,), ([-90, -88, -88, -82, -62, -44, -38, -38, -36, -34, -34, -32, -30, -28, -28, -26, -24, -20, -16, -16, -16, - 6, -6, 2, 6, 8, 10, 14, 18, 18, 46, 50, 50, 54, 56, 58, 58, 60, 62, 70, 70, 74, 82, 84, 88, 94, 96], 0, 24, 24,), ([1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0], 0, 10, 10,), ([4, 7, 9, 10, 10, 11, 14, 16, 17, 21, 25, 27, 31, 34, 34, 34, 38, 41, 42, 42, 52, 56, 56, 58, 60, 66, 67, 68, 68, 70, 72, 74, 76, 82, 88, 88, 88, 89, 91, 93, 94, 95, 95], 0, 23, 39,), ([92, 60, -60, 64, 18, 70, 56, 34, 58, 14, 28, -72, -22, -74, -46, -28, 64, 88, 18, -50, -14, -20, 64, 6, -4, - 98, 60, 98, 84, -58, -98, 66, 80, 68, -42, -58, 82, 90, -72, 34, 34, 80, 88, -64, 66, -20, -26], 0, 25, 25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 0, 40, 29,), ([33, 18, 98, 47, 76, 58, 29, 68, 62, 78, 12, 95, 20, 88, 39, 12, 43, 45, 5, 45, 96, 64, 38, 28, 70, 25, 65, 79, 39], 0, 16, 28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT{ static boolean f_gold ( String bin ) { int n = bin . length ( ) ; if ( bin . charAt ( n - 1 ) == '1' ) return false ; int sum = 0 ; for ( int i = n - 2 ; i >= 0 ; i -- ) { if ( bin . charAt ( i ) == '1' ) { int posFromRight = n - i - 1 ; if ( posFromRight % 4 == 1 ) sum = sum + 2 ; else if ( posFromRight % 4 == 2 ) sum = sum + 4 ; else if ( posFromRight % 4 == 3 ) sum = sum + 8 ; else if ( posFromRight % 4 == 0 ) sum = sum + 6 ; } } if ( sum % 10 == 0 ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""101000""); param0.add(""39613456759141""); param0.add(""11""); param0.add(""PoiHjo""); param0.add(""2""); param0.add(""0000101""); param0.add(""T s dZKeDX gK""); param0.add(""3944713969""); param0.add(""1000""); param0.add(""ifYUgdpmt""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( bin ) : n = len ( bin ) if ( bin [ n - 1 ] == '1' ) : return False sum = 0 i = n - 2 while i >= 0 : if ( bin [ i ] == '1' ) : posFromRight = n - i - 1 if ( posFromRight % 4 == 1 ) : sum = sum + 2 elif ( posFromRight % 4 == 2 ) : sum = sum + 4 elif ( posFromRight % 4 == 3 ) : sum = sum + 8 elif ( posFromRight % 4 == 0 ) : sum = sum + 6 i = i - 1 if ( sum % 10 == 0 ) : return True return False "," using namespace std; bool f_gold ( string bin ) { int n = bin . size ( ); if ( bin [ n - 1 ] == '1' ) return false; int sum = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( bin [ i ] == '1' ) { int posFromRight = n - i - 1; if ( posFromRight % 4 == 1 ) sum = sum + 2; else if ( posFromRight % 4 == 2 ) sum = sum + 4; else if ( posFromRight % 4 == 3 ) sum = sum + 8; else if ( posFromRight % 4 == 0 ) sum = sum + 6; } } if ( sum % 10 == 0 ) return true; return false; } int main() { int n_success = 0; vector param0 {""101000"",""39613456759141"",""11"",""PoiHjo"",""2"",""0000101"",""T s dZKeDX gK"",""3944713969"",""1000"",""ifYUgdpmt""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('101000',), ('39613456759141',), ('11',), ('PoiHjo',), ('2',), ('0000101',), ('T s dZKeDX gK',), ('3944713969',), ('1000',), ('ifYUgdpmt',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS{ public static int f_gold ( int arr [ ] [ ] , int n ) { int d1 = 0 , d2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == j ) d1 += arr [ i ] [ j ] ; if ( i == n - j - 1 ) d2 += arr [ i ] [ j ] ; } } return Math . abs ( d1 - d2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,7,17,19,22,25,27,29,41,60,67,73,79,85,94},new int[]{2,6,16,21,30,42,43,48,50,52,60,61,68,92,95},new int[]{4,8,10,14,15,20,22,23,23,39,40,63,70,75,87},new int[]{7,21,24,36,39,43,50,58,58,67,70,89,94,98,99},new int[]{4,13,17,20,21,24,30,45,57,58,59,65,66,91,97},new int[]{15,15,18,33,38,43,51,57,64,68,70,75,85,94,97},new int[]{2,5,6,6,12,41,43,44,48,48,53,53,60,69,99},new int[]{1,13,14,24,24,25,35,36,40,67,74,75,87,88,96},new int[]{6,13,23,28,29,39,40,50,50,63,63,81,85,88,96},new int[]{4,13,26,27,36,40,42,42,46,48,57,62,67,67,70},new int[]{20,25,29,61,69,70,73,75,78,80,84,85,88,95,97},new int[]{2,2,6,11,11,31,39,48,50,52,54,64,77,89,97},new int[]{1,14,25,26,29,41,46,55,67,68,77,77,83,84,88},new int[]{6,9,11,25,29,33,36,44,63,65,67,68,78,89,91},new int[]{12,13,13,15,43,45,50,60,62,62,64,86,91,96,96}}); param0.add(new int[][]{new int[]{74,-94,42,56,-64,-46,-34,54,-2,-92,0,-38,-76,-16,42,20,-58,36,66,-88,6,-82,46,2,2,-62,-76,-10,-26,-44,-38,70,46,16,12,84,4,-72,-84,66,-6,-92,46,-94,-46,74,64},new int[]{20,-22,-40,-22,-40,56,0,-84,-96,32,-36,-16,56,36,-24,20,50,28,52,-44,-36,-18,14,42,28,24,-88,90,76,-72,-80,-80,48,56,-28,-18,-56,32,-72,30,-46,-60,8,-90,52,-10,86},new int[]{-82,60,60,72,-68,2,40,-56,-38,-80,10,54,-22,34,62,-78,10,28,-8,28,-22,-34,12,14,-18,38,88,-10,-70,44,-70,10,70,-58,36,-70,-32,-60,-98,32,32,6,58,-78,-58,-66,74},new int[]{58,-16,66,-26,18,46,92,14,62,-8,62,12,72,8,36,22,-24,-2,80,88,-16,46,16,-70,22,-58,-46,-66,4,86,54,-86,-6,-36,-54,14,-38,16,-12,-68,-18,96,54,70,-22,78,40},new int[]{-38,-50,-20,-58,80,-42,-64,-12,64,-56,50,36,18,58,12,12,12,-22,-72,-44,28,48,-2,34,-78,-36,-60,-34,28,8,30,-98,4,0,6,70,-90,-4,38,-88,-84,86,24,-18,96,-72,76},new int[]{-78,18,-82,-18,32,-26,-54,-18,84,68,-94,42,26,88,34,18,-22,20,44,-60,54,-60,14,86,18,10,-48,96,-36,-98,96,-6,-96,-2,-92,-78,-24,40,-82,-74,0,18,0,28,16,78,-76},new int[]{32,46,-30,98,-92,24,42,-2,-92,12,-24,84,80,-74,-80,-48,54,30,-4,28,0,-56,78,76,-96,-32,-52,82,-78,46,-92,-16,58,78,-14,-82,78,-44,-34,34,2,76,72,-34,-80,88,20},new int[]{-66,6,70,82,-86,-16,38,22,42,76,58,2,-12,0,14,-8,-8,62,46,-38,-90,8,36,-68,56,26,40,-36,76,-54,44,88,46,-62,34,-26,90,-94,52,40,24,-86,36,28,-12,-48,6},new int[]{-12,14,-96,-4,-96,-18,-60,-52,86,22,-44,-22,-68,66,-66,72,-42,-14,-98,56,82,-52,-84,82,98,-36,-14,20,-48,90,-20,80,-18,6,-82,-4,88,88,82,78,88,-34,22,6,-16,4,32},new int[]{18,24,52,-50,-82,-66,58,42,-60,66,86,82,-66,-72,-6,80,78,68,-30,-76,-64,98,-62,80,-96,32,60,-52,-26,-66,52,-8,42,74,-72,94,-94,-56,-14,74,72,-82,-86,-80,-4,-64,-52},new int[]{-82,2,-16,56,-14,70,-60,16,82,62,-52,12,-74,-22,50,-82,-14,-48,-88,52,-12,92,-40,16,-66,-92,30,-80,-10,48,-4,16,50,66,44,-40,-52,48,18,-16,-56,58,28,-42,-80,22,-58},new int[]{42,38,28,30,16,66,-92,36,-40,28,12,2,-50,-42,-96,-56,6,-16,10,96,-62,64,-8,82,46,94,6,30,84,64,-58,88,42,88,0,16,-30,48,-10,30,94,-42,56,-82,-60,-84,-34},new int[]{60,-50,-90,24,-8,40,-92,-28,28,84,-36,-62,-24,-54,98,-90,50,-26,-18,8,-74,-20,54,-22,-44,-84,64,66,-20,56,96,54,94,-60,96,-46,-66,66,-48,2,-90,-94,-86,-80,-36,-66,36},new int[]{82,-38,10,18,8,-12,-92,-96,-50,-34,18,-54,8,-36,56,-32,80,-84,96,76,6,72,62,24,58,20,-56,-94,-92,16,22,-68,-18,-26,-56,80,-52,50,56,78,-6,54,-58,16,78,52,80},new int[]{-34,-56,-86,42,26,-78,8,92,2,10,-56,-14,84,-20,14,-76,2,82,90,28,18,16,94,-96,-40,22,-52,-90,-28,-64,38,-68,-62,-94,76,-78,-48,70,-60,-98,84,-38,-12,-20,8,84,-52},new int[]{-74,-94,42,80,12,56,-90,58,4,-58,20,14,80,-88,22,94,-18,-96,76,88,72,-98,-80,88,-8,6,-10,50,-78,16,-40,28,14,-98,-90,-4,30,56,28,56,32,12,68,2,2,18,96},new int[]{70,24,-78,-52,-10,-54,-4,22,-96,-60,-16,90,70,64,78,90,-74,98,80,84,-84,-22,58,-12,-84,-2,-72,24,-96,52,-62,58,72,-24,-54,-38,-12,34,42,-50,-14,-16,62,-72,14,-34,50},new int[]{76,48,-66,12,-92,36,64,-86,-18,2,16,2,88,70,-8,4,-62,-34,-6,54,10,-8,-54,32,12,94,-12,-68,74,84,-38,-4,-32,20,14,-8,82,-66,48,-26,-74,10,-20,-74,-46,78,-96},new int[]{28,24,16,40,12,-68,-42,94,18,98,68,-56,2,-92,-10,-54,-2,-82,86,-64,-38,-12,48,-32,16,30,-36,-94,84,-74,-30,-54,62,-38,-74,-6,70,-64,-26,-58,30,2,96,64,-86,-24,-12},new int[]{-30,-78,84,58,20,2,10,-24,62,-56,-80,76,-40,-20,-66,-2,-62,48,-74,-48,-82,88,64,-72,74,-42,30,-60,-88,-46,-72,36,-98,70,-84,-52,68,-18,-90,-20,44,-40,-92,20,-98,-80,-84},new int[]{-90,44,-30,84,-10,36,28,46,-96,-42,-60,2,-14,78,80,44,-54,-10,-12,-30,80,-80,94,72,50,-98,74,14,-28,-84,60,62,-72,-90,-46,-90,56,-36,98,64,-26,64,-68,-58,-10,-12,-18},new int[]{84,-86,90,-90,-42,38,6,8,-90,-6,-52,18,-62,96,42,-26,-86,-24,54,10,94,-66,58,-82,84,-42,-6,48,72,54,94,-36,-56,-66,0,28,80,-22,92,44,64,-86,-96,6,56,-62,-88},new int[]{32,-90,68,72,-74,-70,-4,58,-78,-18,-50,-10,-84,26,38,-84,72,44,-52,44,-26,42,-84,2,-42,76,-16,-46,0,-46,-26,-28,-10,56,-84,-92,84,32,-80,-46,-10,-30,52,-78,-50,56,-22},new int[]{-78,12,-90,-90,-74,48,-46,32,4,24,-6,40,80,-26,-68,-20,70,86,60,-60,84,30,34,-60,-42,50,38,64,30,-18,-50,-48,66,-2,-20,86,26,-96,96,-68,38,64,-40,-94,-52,74,52},new int[]{-40,88,72,-56,-26,-48,-48,-20,46,88,14,86,4,46,6,-54,-86,34,58,-72,92,-18,-88,8,0,-28,-78,-4,40,0,28,-38,-60,-28,-44,48,-56,-52,2,20,72,-98,6,22,64,36,-60},new int[]{90,-8,0,-42,-58,-96,80,52,-78,24,-24,-92,-70,42,-46,96,-10,-32,-18,22,24,86,-4,-86,-70,-70,-96,-98,-34,0,16,-84,28,-70,94,-72,-52,-78,62,-56,-12,-88,76,74,12,12,-28},new int[]{-42,-94,96,74,70,-40,50,-40,-26,2,-76,-88,-54,80,66,38,-8,42,94,-12,-88,38,-44,-26,-98,80,-56,-40,48,-48,-8,50,6,74,94,-50,-70,-30,70,-2,60,-92,38,-28,-64,-62,-54},new int[]{-40,70,-60,-38,-70,6,24,-72,22,-58,-2,70,58,28,90,-68,-12,18,-66,-56,66,32,4,98,64,-34,10,-78,-88,-38,36,-76,-96,94,-38,-18,-40,94,-18,-66,-34,66,82,-94,76,-38,14},new int[]{-98,-72,14,10,-30,56,-56,30,20,60,52,46,-16,-60,60,0,-70,50,-64,90,-62,-10,-94,74,-92,98,86,42,-18,-66,34,40,36,-44,-44,-86,-22,-50,50,-28,-34,-40,-30,44,-54,74,54},new int[]{16,-12,-44,82,-60,36,-24,-12,78,-74,-82,66,-48,74,-2,-4,-4,10,-4,18,8,-84,-56,64,66,-46,-56,-60,-60,-72,92,-82,44,28,30,84,68,34,-36,-58,60,-26,10,74,50,-70,-40},new int[]{-94,-12,-34,-82,-22,22,-14,-66,76,-42,-94,24,40,10,-24,60,80,-52,62,76,96,92,46,-44,-20,-92,-36,-6,-90,-64,-64,44,54,-60,-30,80,32,32,-76,-10,48,88,-84,-32,-94,-50,80},new int[]{86,56,-50,-48,74,36,2,6,-64,24,86,58,-92,-66,-32,-4,-74,-94,16,-18,10,-66,82,-96,-96,56,18,78,-12,32,48,70,42,20,0,-80,78,-28,80,0,-94,-56,-28,48,-30,-50,-20},new int[]{46,-94,-6,60,-94,-18,80,-58,-62,-70,-20,-8,-60,92,32,78,4,-26,-32,98,40,98,-92,-96,2,-96,42,30,2,-4,20,-84,-8,-40,42,8,92,32,-12,44,-60,32,14,-56,-68,-72,-18},new int[]{2,50,48,44,-24,68,16,88,-66,-48,-82,-50,-24,-50,-56,40,30,-58,38,24,44,42,52,18,-86,26,-4,-64,70,-12,6,-90,78,12,-82,52,70,32,74,66,-98,-62,76,20,74,-48,-46},new int[]{90,66,-62,86,76,-54,78,98,66,-16,16,32,48,-42,50,16,-86,66,12,88,-92,-78,-84,74,10,0,-86,-34,14,-74,-88,86,-48,-34,44,-58,26,-48,-70,-96,-26,84,82,-90,-14,30,-20},new int[]{-26,58,-32,22,-82,50,-50,42,14,60,-28,-12,34,94,-68,-48,-6,-98,66,94,-60,26,72,10,-58,-66,-50,-92,-34,66,36,44,94,-34,-76,22,-94,14,56,-2,38,42,16,20,-90,-36,-34},new int[]{-90,98,34,26,58,70,-86,46,-40,70,94,40,-36,2,-82,0,-4,-18,70,40,92,-38,-46,-74,-82,-54,44,-34,24,-46,60,-36,-86,92,-32,-38,76,46,-42,-56,-42,-8,48,-64,88,-50,24},new int[]{70,-26,-72,-18,-88,-58,76,-96,62,-12,-56,74,62,68,-86,82,34,-98,-52,22,-16,-48,-14,-8,-56,10,48,98,-70,82,2,-86,76,72,-70,-6,58,-18,-48,52,-48,-76,68,-64,-34,-56,-88},new int[]{34,-80,-50,74,-26,2,40,-66,-16,56,22,10,-72,86,54,34,30,38,-86,-22,-38,-28,-86,28,96,6,-86,54,4,-84,34,-58,-6,40,54,-60,-22,84,74,-92,-58,-86,-76,-66,-36,90,-30},new int[]{26,74,84,-60,52,-14,98,-74,24,16,-96,-86,18,-82,-34,-82,-56,-86,-8,-50,-32,-44,8,50,-12,82,-10,80,-28,-28,2,-34,-88,28,-44,-94,-42,2,-48,54,90,16,-38,14,82,42,58},new int[]{-22,14,26,-60,-18,-38,-60,54,-48,60,50,-70,24,-50,18,48,98,42,-52,-68,24,94,60,74,76,6,-76,-70,-86,-22,76,16,-4,48,20,-60,82,38,32,36,-56,-58,40,12,46,18,-96},new int[]{-92,44,94,-42,-84,-78,-72,-62,-32,4,-12,-42,4,12,20,-12,6,38,-92,-64,64,92,-62,64,54,-60,-42,-54,-14,-28,26,-6,-14,0,80,10,-64,-54,2,82,-8,98,-20,72,-94,-78,-64},new int[]{50,44,-64,-36,60,-44,64,-64,40,-66,60,-44,6,-8,-80,36,2,30,-26,82,-82,26,-92,-40,-66,-62,76,-34,-46,-36,36,-92,36,-74,-78,50,-80,16,-88,92,-50,-80,12,-92,8,-18,-84},new int[]{20,-24,94,-62,40,-16,-24,-36,62,-88,98,-28,-80,96,-96,18,60,-92,22,96,98,-48,-82,62,-28,-74,-84,-56,88,-82,38,42,-82,-76,-16,-12,46,-46,48,96,12,66,74,-58,-2,-84,16},new int[]{-4,18,-28,22,70,-70,-70,66,46,-68,72,-60,-54,2,-82,60,86,-92,36,-44,98,88,-88,86,24,88,-80,-12,-18,-8,0,-26,2,56,94,90,30,-96,32,48,2,-72,-36,10,-52,0,98},new int[]{46,-62,-78,-50,98,26,42,6,26,-28,-56,60,-36,-54,-84,90,68,94,-28,60,52,54,28,12,58,-42,86,-74,-84,-88,54,-18,54,38,-96,84,-78,-26,50,86,58,24,-2,-78,40,-68,6},new int[]{2,26,-82,-84,46,46,0,18,90,-92,24,-34,-70,-84,18,32,-36,-84,-36,20,26,-72,-12,36,72,42,58,-34,30,40,-6,-18,-52,20,-52,4,-64,-64,-2,36,64,-86,-70,-38,-50,-34,60}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{49,76,85,2,48,20},new int[]{13,2,84,21,44,17},new int[]{70,85,58,75,89,16},new int[]{86,45,19,97,95,63},new int[]{62,44,26,75,73,95},new int[]{93,35,62,88,6,33}}); param0.add(new int[][]{new int[]{-80,-72,-68,-62,-56,-40,-28,4,22,24,34,58,60,60,78},new int[]{-88,-68,-48,-28,-24,-4,0,2,12,30,42,48,52,64,68},new int[]{-92,-86,-82,-44,-38,-20,-18,-16,2,4,12,32,42,54,96},new int[]{-82,-74,-64,-48,-30,-10,16,20,28,46,46,54,60,74,96},new int[]{-84,-78,-70,-30,-28,-18,-10,-2,2,14,30,44,50,92,98},new int[]{-92,-74,-64,-48,-46,-8,20,22,28,30,30,32,46,62,84},new int[]{-92,-82,-82,-66,-64,-60,-40,-2,2,40,44,46,66,68,74},new int[]{-70,-58,-54,-46,-34,-18,14,20,22,32,48,62,84,86,90},new int[]{-92,-62,-58,-48,-30,-28,0,8,16,20,26,38,70,92,98},new int[]{-90,-80,-46,0,14,36,42,48,48,50,50,50,52,76,98},new int[]{-80,-78,-58,-58,-54,-44,-42,6,20,24,28,34,40,58,78},new int[]{-90,-80,-60,-40,4,6,10,26,28,34,36,38,42,44,56},new int[]{-96,-96,-72,-58,-54,-40,-34,-34,-28,-26,-22,-18,-2,18,54},new int[]{-98,-90,-76,-64,-62,-58,-54,-30,-16,14,36,54,54,72,92},new int[]{-86,-70,-58,-48,-46,-38,-32,2,20,44,54,56,66,82,84}}); param0.add(new int[][]{new int[]{0,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,0,1,1,1,0,0},new int[]{0,1,1,1,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1,0},new int[]{0,0,1,1,0,0,0,1,0,1,0,0,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,1,1,0},new int[]{0,0,1,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0},new int[]{0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,0,1,1,0,1,0,1,0,0,0,0,1,1},new int[]{1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0},new int[]{1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,0},new int[]{1,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,0,1,0,0,1,1,0},new int[]{0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0,1,1,0,1,1},new int[]{1,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,0,1,1,1},new int[]{1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,0,0,1,0,1,0,0},new int[]{0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,1,1,0,1},new int[]{0,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,0,0,0,0,1,1,1,0,0},new int[]{1,1,0,0,1,1,0,1,0,1,1,0,0,0,1,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,1,1,1,1},new int[]{1,1,1,0,1,1,1,1,0,0,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1},new int[]{1,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,1,0,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,1,1,0,0,1},new int[]{1,0,0,1,0,1,0,1,1,1,1,0,0,1,1,1,0,1,1,1,1,1,0,0,1,0,0,1,0,1,1,1,1,1,1,0},new int[]{0,1,1,1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,0,1},new int[]{1,0,0,0,0,1,1,0,1,0,0,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1},new int[]{1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,1,0,1,1,1,1},new int[]{1,1,0,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,1,1,1},new int[]{0,0,1,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0},new int[]{0,1,0,0,0,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,0,0,0},new int[]{0,0,1,0,0,0,0,1,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0,0,1,0,1,0,1,1,1,1,0,1,0,1},new int[]{0,1,1,0,1,1,1,1,1,1,0,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,0,1,0},new int[]{1,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0},new int[]{0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,1,1,1,1,1,0,1,1,1,1,0,0,1,0},new int[]{1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0},new int[]{1,1,0,0,1,1,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,1,0,1,1,0,1,1,1,1,1,0,0,0},new int[]{0,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,0,1,1,0,0},new int[]{0,0,0,1,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0,0,1,1,1,0,0,0,1,0,0,1,1,1,1},new int[]{0,1,1,1,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,1,1,0,0,1},new int[]{0,1,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0},new int[]{0,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,0},new int[]{0,1,0,0,0,1,0,1,1,0,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,1,0,1,0}}); param0.add(new int[][]{new int[]{1,2,2,2,3,3,10,11,11,19,27,30,31,36,38,51,55,64,64,68,72,78,79,83,87,98},new int[]{1,3,5,6,19,25,31,32,39,40,51,51,52,54,57,58,64,65,66,73,76,83,87,90,92,97},new int[]{1,6,7,26,29,33,35,42,44,46,47,50,61,64,65,67,73,75,81,81,86,87,88,88,95,95},new int[]{1,3,6,19,19,21,29,34,36,36,43,44,52,53,53,63,64,67,68,75,75,75,76,78,81,83},new int[]{9,10,18,18,20,22,28,31,35,42,47,48,48,62,63,65,65,70,73,75,75,82,92,95,95,97},new int[]{10,14,16,17,27,30,33,36,37,37,39,47,48,48,56,57,62,74,78,81,82,84,87,88,95,95},new int[]{2,16,16,18,21,21,25,26,33,38,51,51,57,59,66,68,68,69,70,74,74,74,84,86,96,98},new int[]{3,5,14,14,17,23,26,26,27,31,33,36,37,51,63,64,70,70,72,75,79,86,90,90,97,97},new int[]{15,15,16,19,23,29,31,33,35,35,37,38,44,49,56,68,73,74,75,76,80,84,87,89,95,99},new int[]{2,3,7,13,14,16,19,19,21,28,32,39,43,47,58,64,66,80,80,82,83,84,91,91,95,98},new int[]{2,3,11,21,22,24,26,34,39,41,41,47,49,50,50,59,61,67,78,79,80,85,87,87,90,96},new int[]{6,9,11,15,20,27,27,27,28,42,47,47,58,61,67,70,70,71,76,77,78,80,83,91,97,98},new int[]{4,8,12,13,14,14,15,20,21,22,24,25,29,51,51,57,60,68,73,76,76,81,92,93,94,98},new int[]{1,8,23,26,26,26,31,40,41,45,46,49,50,53,55,58,62,65,66,68,71,77,87,87,97,98},new int[]{3,9,11,17,26,28,31,32,32,33,35,41,41,41,44,48,48,63,72,74,82,84,85,91,92,94},new int[]{3,5,6,8,10,17,36,41,42,45,50,51,52,53,56,58,63,64,69,72,73,74,78,87,90,92},new int[]{2,6,12,19,20,25,27,30,35,38,42,45,45,50,53,54,56,59,62,62,66,74,78,81,91,94},new int[]{6,8,9,15,18,20,23,23,29,30,39,41,49,62,65,69,76,79,83,84,85,86,90,94,98,98},new int[]{5,6,7,11,12,16,19,19,20,20,26,44,46,53,56,60,61,74,75,75,76,80,93,95,96,99},new int[]{7,15,19,22,23,24,31,34,35,37,40,42,44,52,57,67,73,74,76,77,78,83,84,95,96,97},new int[]{2,4,15,16,16,23,26,32,34,39,40,41,46,52,56,61,62,65,76,80,81,82,84,85,86,87},new int[]{9,13,22,41,42,42,42,45,48,49,51,51,54,58,59,60,73,74,75,83,83,86,91,94,98,98},new int[]{5,9,9,16,21,21,22,27,28,31,31,32,38,38,49,51,61,62,65,69,73,75,85,91,91,96},new int[]{4,4,7,7,7,9,11,21,31,36,43,43,57,58,63,63,64,66,70,71,73,77,82,83,92,97},new int[]{1,6,9,9,12,14,15,16,20,24,25,29,30,37,43,44,45,53,58,63,69,70,72,78,83,88},new int[]{1,15,16,17,19,24,25,35,43,44,44,46,48,49,50,53,54,61,61,67,70,74,74,83,87,88}}); param0.add(new int[][]{new int[]{-62,-26,-90,-96,66,8,88,98,26,-4,-62,38,24,18,-88,-78,22,-80,80,8,62,22,-20,42,78,-96,38,22,44,18,-98,4,66,-58,50,-98,42,48,-52,98,-72,72,60,-66,-78,-92},new int[]{24,94,24,64,78,-82,12,-96,-80,32,-18,-8,-98,-32,-8,-40,-98,-52,-86,-50,-16,-36,6,6,70,-78,10,-34,-98,24,-62,4,-8,-86,60,-52,-48,-44,82,68,98,30,6,-58,94,-52},new int[]{-20,84,-82,42,42,86,38,64,84,88,46,-48,-8,-60,-94,-74,-72,-74,-52,-96,46,68,84,-64,22,-44,78,-62,64,14,-80,90,-26,84,92,-82,36,-56,-46,28,86,-58,50,-78,-36,-50},new int[]{-26,-94,-38,-38,-10,58,-42,36,12,22,52,48,40,22,84,-56,-76,48,-42,-58,50,98,-46,-30,16,30,66,-2,68,44,-60,-4,40,16,68,-40,96,-40,-6,60,62,90,90,-20,98,94},new int[]{80,36,26,86,76,38,88,80,-90,-60,-52,92,48,-32,-18,4,-44,52,14,2,92,2,-70,-16,92,12,-66,62,52,-92,-98,-80,-46,-50,72,98,64,-32,52,-10,20,-20,-54,-12,64,-64},new int[]{38,94,60,44,-26,-46,92,60,-18,-10,-60,-78,-96,54,-88,-20,60,66,-62,40,98,-50,86,-56,-52,-60,52,26,62,62,-4,54,-60,52,-50,-2,92,-38,-98,-66,60,70,76,64,-80,-88},new int[]{94,84,38,-60,-72,50,-42,-52,-4,16,-40,90,-18,-20,34,-28,-4,-66,-82,-30,-36,94,-38,-56,-22,62,-2,30,-58,70,-80,0,-98,14,40,-28,76,30,18,6,-72,-28,24,26,66,-56},new int[]{38,52,34,-60,78,64,2,64,-50,14,-66,-2,-10,10,98,36,96,96,-76,-58,-52,22,40,-28,18,-34,-72,-98,-54,82,30,90,0,-22,6,-36,-34,44,-60,-40,70,-26,14,14,-72,98},new int[]{38,-88,26,34,32,-78,38,12,-16,-76,28,-74,6,-54,96,8,-34,72,84,-70,-26,16,-86,-14,46,-24,-24,-96,-82,-66,78,20,-94,-76,-76,90,-32,-24,-36,-62,-88,-26,-36,0,-92,40},new int[]{0,66,60,82,-14,92,88,30,60,36,80,-54,28,-10,-96,-4,-68,46,98,42,38,30,-74,-2,30,6,-78,74,-56,-6,-48,32,88,-40,18,36,-34,-28,30,-54,-82,98,34,-56,50,40},new int[]{18,-96,54,-6,94,-68,-28,-18,-90,-64,-88,60,60,-72,82,48,6,-44,-22,-82,62,52,-32,0,2,-12,-78,92,22,2,84,-64,50,-6,-2,90,76,-48,-28,22,-30,14,68,26,80,20},new int[]{-94,-26,-52,4,-44,12,74,-26,28,64,84,-62,-10,-12,74,68,94,-80,32,-26,80,44,-80,-74,-82,-86,98,-12,30,60,90,16,-58,-28,18,14,-86,-46,-62,-88,-84,74,-48,-8,-26,60},new int[]{10,64,58,-92,-48,38,-30,-64,-58,-68,-26,-68,52,48,-72,96,32,-48,-60,54,-6,-72,-22,74,4,14,80,52,-50,22,74,-14,-92,-96,54,-90,-18,18,-16,-82,26,98,-68,8,-78,-48},new int[]{-78,12,70,-42,34,-52,86,64,-32,-96,-22,-8,84,36,-38,-80,84,72,58,34,-86,-84,30,-40,-90,10,0,-74,14,76,-22,-2,86,86,-60,32,-62,-34,4,14,68,-38,86,94,18,30},new int[]{66,16,82,-70,-24,-90,-70,82,32,-42,-82,74,-24,-16,68,-92,32,-58,-58,-14,-34,68,-24,20,68,54,78,-72,-14,-46,74,-90,-98,-64,-2,-58,-6,-20,54,-70,-46,-56,50,-62,0,-14},new int[]{4,50,66,84,-44,50,-22,36,20,94,-2,66,-16,-82,-90,-74,88,42,16,42,-76,0,28,-42,-44,48,-12,78,-40,54,34,-86,-26,-46,78,-68,-80,-94,-2,-48,-42,62,48,-24,-20,60},new int[]{-16,20,16,-10,-96,-32,42,-52,-72,2,-66,-40,32,86,96,-46,88,64,90,68,-22,0,-18,82,22,62,-82,-44,76,-62,-26,8,82,84,96,8,76,66,-56,96,96,-54,-70,66,60,40},new int[]{64,-58,-76,94,-4,-48,-40,96,46,-16,2,-52,42,-80,-44,10,-60,28,-52,-54,-88,72,-40,-2,78,86,-26,-86,-90,-4,-14,46,-84,-36,-88,4,-4,-92,-42,36,-94,-10,-38,-82,-50,4},new int[]{-72,22,-40,24,10,26,72,14,-90,-66,-88,-30,40,40,-80,-56,-4,-88,32,-98,22,10,58,62,-10,24,-80,-90,28,-64,-26,30,-32,-44,90,-12,16,-48,98,88,-58,-54,-10,48,-12,-40},new int[]{70,-36,-30,-26,-48,86,-12,-78,62,-8,-80,-14,-48,52,-38,38,-54,-40,-24,-80,-94,-50,-46,64,12,62,-8,12,-22,24,-30,20,-8,-76,-18,-76,52,-74,38,-26,-98,58,76,38,44,-14},new int[]{32,-62,24,-58,-50,32,-84,0,-62,-12,28,72,0,42,82,32,-20,-96,-20,92,-32,86,-70,74,-76,64,48,66,94,52,48,6,-78,-88,24,74,32,38,38,92,50,24,34,46,-14,18},new int[]{-42,86,-48,-96,-72,52,-28,8,-92,-28,-56,-16,-48,-88,90,42,30,62,-50,78,-20,26,10,-14,-40,22,-34,-98,-48,-56,54,0,-54,-68,52,70,78,-20,60,-88,-26,40,-80,-6,66,-86},new int[]{18,-68,-46,24,-62,-8,14,-46,-60,-48,0,-46,50,98,-86,2,92,-94,66,-90,-74,-34,-80,14,-42,-72,-54,36,70,38,-92,64,-86,-64,6,-22,92,-60,38,94,-74,46,96,-32,-10,22},new int[]{2,44,44,-16,-96,26,-32,-66,-22,30,68,-12,-94,32,-48,16,-80,-94,2,-4,-56,-22,-22,36,16,50,-2,46,56,-68,-72,-34,-54,-76,-84,74,22,-38,26,36,30,-56,-82,54,92,-50},new int[]{-12,2,-28,98,-94,-52,18,-30,-50,36,46,-22,-54,-70,64,-30,32,-14,38,-56,-34,84,24,10,26,32,52,-16,-48,4,-24,-70,-94,-10,-76,-36,46,88,18,48,-64,-12,-8,-70,-4,-80},new int[]{90,-8,30,-44,-64,42,8,-14,-6,-70,-42,-98,-48,34,-88,-22,48,-98,0,-16,32,-36,78,84,60,80,90,58,-72,80,-96,-98,-96,58,-62,86,-6,-14,-50,-96,8,18,-84,-34,-72,-18},new int[]{-42,36,86,26,10,-20,-22,46,28,88,-34,-84,60,8,-22,38,-40,-36,18,-76,40,-22,14,86,22,24,98,88,-90,58,-58,30,70,84,-32,2,20,80,28,-44,-98,-6,-64,90,42,-92},new int[]{0,-38,82,46,-24,34,34,-82,2,-86,-30,64,16,-6,22,-88,-26,-88,-74,-20,82,94,-16,64,26,76,58,-92,28,-16,44,56,20,40,20,78,-96,-86,-54,-46,54,-76,82,-50,-54,-40},new int[]{-66,-18,2,98,6,70,32,-6,66,4,88,64,20,-24,68,2,-86,66,-46,18,70,-90,6,-44,-28,-86,16,-38,-34,2,96,80,80,34,-34,-66,68,-20,32,36,8,-40,-34,8,80,-94},new int[]{54,-28,-22,-26,96,-34,96,-92,20,-24,26,24,18,96,14,96,48,-96,38,86,88,-66,26,-22,54,72,42,0,-10,-42,-54,78,-42,-2,-30,-60,-20,-84,-14,98,24,96,-62,-28,-52,34},new int[]{-96,78,-66,-94,2,36,-62,-14,70,-22,-92,-58,-58,-2,40,80,86,-84,-98,-66,-44,-58,56,-90,88,34,76,82,-2,38,-26,92,-94,62,-56,-10,14,-50,-92,80,8,-36,-96,-10,42,-84},new int[]{50,-14,12,78,50,-54,-22,-34,-70,-58,-18,38,8,-88,-88,-86,58,-42,-28,-42,-26,26,90,14,-40,98,94,58,68,14,36,20,58,14,-22,-34,-48,-64,38,-12,-12,30,24,6,38,50},new int[]{-48,6,82,94,30,58,-30,-54,-26,-32,48,40,20,-68,-28,-50,-4,88,-58,-46,-70,48,-30,76,-58,-96,-56,36,10,56,14,-6,38,12,-52,-78,-56,-36,48,-56,-78,98,-56,-92,-50,46},new int[]{-30,-64,-90,-38,-28,74,70,-44,56,-38,64,98,62,-50,-68,82,-6,36,-16,-60,-44,-34,92,-56,12,12,88,30,-72,98,-86,-64,82,-56,58,28,24,-72,-98,-68,-54,-52,50,8,44,18},new int[]{-92,-86,-68,-18,56,26,68,-84,60,-68,20,-2,-86,-76,-92,-86,-96,50,84,-44,62,24,-20,88,-94,-66,32,50,-32,-96,18,56,48,18,-40,50,-18,-10,84,-48,8,-50,86,88,90,-70},new int[]{60,46,46,96,44,-38,-66,-56,12,-28,-36,-32,-98,50,16,-8,58,-94,20,-94,88,82,30,-32,-6,-50,6,44,-98,-16,-96,-68,54,0,68,44,58,-72,-96,-84,-70,-14,-12,-52,-78,-76},new int[]{-8,72,32,-90,-68,60,-10,-34,-38,-88,22,82,-46,-76,96,54,0,-52,94,-66,34,28,-50,-32,-80,0,98,18,96,28,72,64,-52,98,14,28,46,48,34,-34,-96,-24,-48,-86,-26,-74},new int[]{36,26,22,18,4,78,72,28,-24,-64,28,2,-4,46,82,-70,36,66,22,-32,-48,24,-20,66,80,-22,88,26,68,22,84,-44,-28,76,-10,90,-46,-40,-94,22,14,96,-66,66,-4,40},new int[]{-44,-22,52,30,70,22,22,74,56,-14,66,-34,34,-2,-96,-90,-38,32,-4,-74,16,-34,-6,14,38,-66,68,-2,-28,-66,-8,-22,80,-70,-62,-66,-18,-84,82,-8,34,-42,16,10,-64,34},new int[]{-10,92,-78,-80,18,54,8,16,-98,14,8,14,-6,-72,-30,68,-76,40,92,-94,20,90,68,28,38,-8,-94,50,56,-92,-46,-54,-12,-48,18,76,10,58,24,-32,6,94,64,66,96,90},new int[]{88,62,-84,24,76,-24,-22,26,42,-56,-56,-26,-40,88,74,32,54,-96,-24,-44,90,66,56,-68,34,18,44,-38,82,-12,-8,80,70,92,6,-50,40,-62,60,-98,54,36,-4,84,48,84},new int[]{86,-98,-60,26,-58,-26,92,-80,-56,-30,60,-10,96,92,-76,-28,88,4,-88,-82,-22,96,-18,-8,-88,16,12,-30,-66,-26,38,-76,68,-22,-78,56,-70,-42,76,92,8,-76,0,70,-70,32},new int[]{42,-88,-52,-12,-58,78,4,98,-92,96,70,96,96,86,-6,-58,-14,-92,-6,16,-28,88,28,14,-14,22,-46,-30,-6,-34,-12,-70,82,68,34,58,20,90,-58,-66,-12,-20,-76,-86,56,32},new int[]{-62,-58,-60,26,38,68,-18,26,-42,30,-52,-28,-98,-58,-2,86,-38,-58,-58,-82,-52,80,42,-4,-92,32,-90,60,70,-96,96,-36,-16,40,-24,44,-34,48,-54,80,-86,14,34,52,50,38},new int[]{68,-46,-50,64,-32,-94,14,-66,90,-54,60,20,52,36,-26,-92,38,10,84,-18,-38,-98,92,-50,-58,40,-56,-44,-46,-50,-2,52,22,-80,-20,86,8,64,48,-8,14,-86,-56,-26,-6,28},new int[]{-58,-40,-82,8,26,-46,-14,-62,-28,-28,90,76,62,-18,-34,18,-78,14,24,2,62,62,-88,-84,-54,66,96,44,-46,-18,-44,32,-12,-94,-54,-18,62,12,4,8,-66,72,12,-32,48,68}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{94,55,14,44,30,47,19,87,68,17,34,15,93,98,10,27,43,51,83,24,19,45,91,59,84,82,80,51},new int[]{4,37,73,13,56,1,10,52,62,6,71,18,21,24,48,82,41,86,45,79,74,42,49,92,73,40,57,28},new int[]{63,27,3,18,66,35,77,76,77,17,69,56,34,48,83,96,57,6,7,20,41,11,14,78,10,10,24,76},new int[]{75,75,93,9,27,21,26,88,55,93,73,46,37,14,94,15,87,91,66,76,90,95,6,14,33,22,69,34},new int[]{32,11,56,49,83,82,15,80,85,68,22,87,8,33,50,87,59,82,73,34,31,39,77,30,51,44,57,92},new int[]{66,57,78,33,72,1,88,46,15,89,96,67,28,91,99,7,69,13,18,26,36,48,20,39,66,57,25,66},new int[]{40,41,73,88,44,60,53,70,38,51,3,35,25,34,30,56,58,66,67,63,7,64,48,46,43,21,33,67},new int[]{41,71,98,92,82,99,88,68,7,52,92,75,25,95,54,39,46,30,71,69,53,51,73,65,2,63,60,95},new int[]{19,56,87,21,61,51,78,34,40,23,65,80,94,90,70,98,32,89,65,82,35,91,83,18,46,89,47,10},new int[]{69,26,55,42,59,37,59,88,16,97,11,51,67,3,84,50,39,44,92,36,36,88,44,29,73,92,93,48},new int[]{86,59,11,78,91,40,93,61,6,20,70,18,98,14,25,89,49,26,32,79,1,76,30,47,22,81,28,9},new int[]{96,52,64,21,57,31,23,75,71,69,40,67,54,18,64,52,99,77,20,52,59,16,47,26,49,83,53,86},new int[]{27,61,59,50,90,15,24,36,40,96,35,46,52,45,97,77,15,67,59,18,86,6,21,40,29,89,94,21},new int[]{97,78,48,95,78,24,11,45,29,18,41,68,88,66,20,13,75,14,90,17,40,76,91,40,62,21,19,55},new int[]{92,89,85,12,93,53,47,60,39,14,63,87,82,98,49,59,34,64,57,85,49,27,87,67,94,62,89,68},new int[]{98,25,36,88,5,79,87,67,70,88,2,33,46,81,38,43,11,10,38,32,40,94,63,52,77,32,52,39},new int[]{25,2,1,7,56,64,59,37,56,32,37,58,28,67,45,61,95,69,96,96,16,86,18,8,8,89,8,46},new int[]{41,21,95,76,6,55,40,59,96,50,38,15,82,58,76,3,80,21,63,97,17,20,8,50,22,75,46,30},new int[]{72,75,28,67,4,83,57,98,8,24,9,39,3,97,49,32,91,36,68,1,76,98,67,68,34,38,43,96},new int[]{84,29,46,41,1,42,79,84,49,95,25,18,22,61,39,90,51,11,57,28,35,68,51,77,46,72,19,54},new int[]{72,65,70,48,89,7,92,78,95,27,41,85,20,54,54,33,19,28,84,35,29,35,97,63,57,2,29,28},new int[]{26,65,73,34,38,95,83,73,23,67,42,19,79,13,13,63,1,53,52,71,40,40,45,42,13,50,30,39},new int[]{9,56,62,34,18,82,94,2,12,45,40,38,35,20,95,13,21,90,68,20,59,1,6,89,24,96,40,68},new int[]{27,44,44,50,10,72,77,69,49,66,94,32,3,48,67,77,49,71,46,76,91,5,69,46,61,90,14,74},new int[]{88,44,35,20,13,82,8,38,67,85,88,93,16,96,4,43,67,24,44,66,57,26,26,32,85,1,91,88},new int[]{74,52,93,80,26,34,69,46,61,3,45,82,17,45,90,67,36,39,9,56,76,79,34,94,53,87,80,71},new int[]{81,47,80,21,34,27,67,38,92,35,37,74,17,91,36,91,49,18,92,1,55,46,55,48,19,36,25,26},new int[]{30,49,79,30,21,84,33,48,65,43,62,63,52,43,5,88,75,27,54,95,83,42,41,18,62,99,77,68}}); List param1 = new ArrayList<>(); param1.add(10); param1.add(44); param1.add(16); param1.add(4); param1.add(9); param1.add(27); param1.add(24); param1.add(43); param1.add(19); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : d1 = 0 d2 = 0 for i in range ( 0 , n ) : for j in range ( 0 , n ) : if ( i == j ) : d1 += arr [ i ] [ j ] if ( i == n - j - 1 ) : d2 += arr [ i ] [ j ] return abs ( d1 - d2 ) ; ",,," if __name__ == '__main__': param = [ ([[1, 7, 17, 19, 22, 25, 27, 29, 41, 60, 67, 73, 79, 85, 94], [2, 6, 16, 21, 30, 42, 43, 48, 50, 52, 60, 61, 68, 92, 95], [4, 8, 10, 14, 15, 20, 22, 23, 23, 39, 40, 63, 70, 75, 87], [7, 21, 24, 36, 39, 43, 50, 58, 58, 67, 70, 89, 94, 98, 99], [4, 13, 17, 20, 21, 24, 30, 45, 57, 58, 59, 65, 66, 91, 97], [15, 15, 18, 33, 38, 43, 51, 57, 64, 68, 70, 75, 85, 94, 97], [2, 5, 6, 6, 12, 41, 43, 44, 48, 48, 53, 53, 60, 69, 99], [1, 13, 14, 24, 24, 25, 35, 36, 40, 67, 74, 75, 87, 88, 96], [6, 13, 23, 28, 29, 39, 40, 50, 50, 63, 63, 81, 85, 88, 96], [4, 13, 26, 27, 36, 40, 42, 42, 46, 48, 57, 62, 67, 67, 70], [20, 25, 29, 61, 69, 70, 73, 75, 78, 80, 84, 85, 88, 95, 97], [2, 2, 6, 11, 11, 31, 39, 48, 50, 52, 54, 64, 77, 89, 97], [1, 14, 25, 26, 29, 41, 46, 55, 67, 68, 77, 77, 83, 84, 88], [6, 9, 11, 25, 29, 33, 36, 44, 63, 65, 67, 68, 78, 89, 91], [12, 13, 13, 15, 43, 45, 50, 60, 62, 62, 64, 86, 91, 96, 96]],10,), ([[74, -94, 42, 56, -64, -46, -34, 54, -2, -92, 0, -38, -76, -16, 42, 20, -58, 36, 66, -88, 6, -82, 46, 2, 2, -62, -76, -10, -26, -44, -38, 70, 46, 16, 12, 84, 4, -72, -84, 66, -6, -92, 46, -94, -46, 74, 64], [20, -22, -40, -22, -40, 56, 0, -84, -96, 32, -36, -16, 56, 36, -24, 20, 50, 28, 52, -44, -36, -18, 14, 42, 28, 24, -88, 90, 76, -72, -80, -80, 48, 56, -28, -18, -56, 32, -72, 30, -46, -60, 8, -90, 52, -10, 86], [-82, 60, 60, 72, -68, 2, 40, -56, -38, -80, 10, 54, -22, 34, 62, -78, 10, 28, -8, 28, -22, -34, 12, 14, -18, 38, 88, -10, -70, 44, -70, 10, 70, -58, 36, -70, -32, -60, -98, 32, 32, 6, 58, -78, -58, -66, 74], [58, -16, 66, -26, 18, 46, 92, 14, 62, -8, 62, 12, 72, 8, 36, 22, -24, -2, 80, 88, -16, 46, 16, -70, 22, -58, -46, -66, 4, 86, 54, -86, -6, -36, -54, 14, -38, 16, -12, -68, -18, 96, 54, 70, -22, 78, 40], [-38, -50, -20, -58, 80, -42, -64, -12, 64, -56, 50, 36, 18, 58, 12, 12, 12, -22, -72, -44, 28, 48, -2, 34, -78, -36, -60, -34, 28, 8, 30, -98, 4, 0, 6, 70, -90, -4, 38, -88, -84, 86, 24, -18, 96, -72, 76], [-78, 18, -82, -18, 32, -26, -54, -18, 84, 68, -94, 42, 26, 88, 34, 18, -22, 20, 44, -60, 54, -60, 14, 86, 18, 10, -48, 96, -36, -98, 96, -6, -96, -2, -92, -78, -24, 40, -82, -74, 0, 18, 0, 28, 16, 78, -76], [32, 46, -30, 98, -92, 24, 42, -2, -92, 12, -24, 84, 80, -74, -80, -48, 54, 30, -4, 28, 0, -56, 78, 76, -96, -32, -52, 82, -78, 46, -92, -16, 58, 78, -14, -82, 78, -44, -34, 34, 2, 76, 72, -34, -80, 88, 20], [-66, 6, 70, 82, -86, -16, 38, 22, 42, 76, 58, 2, -12, 0, 14, -8, -8, 62, 46, -38, -90, 8, 36, -68, 56, 26, 40, -36, 76, -54, 44, 88, 46, -62, 34, -26, 90, -94, 52, 40, 24, -86, 36, 28, -12, -48, 6], [-12, 14, -96, -4, -96, -18, -60, -52, 86, 22, -44, -22, -68, 66, -66, 72, -42, -14, -98, 56, 82, -52, -84, 82, 98, -36, -14, 20, -48, 90, -20, 80, -18, 6, -82, -4, 88, 88, 82, 78, 88, -34, 22, 6, -16, 4, 32], [18, 24, 52, -50, -82, -66, 58, 42, -60, 66, 86, 82, -66, -72, -6, 80, 78, 68, -30, -76, -64, 98, -62, 80, -96, 32, 60, -52, -26, -66, 52, -8, 42, 74, -72, 94, -94, -56, -14, 74, 72, -82, -86, -80, -4, -64, -52], [-82, 2, -16, 56, -14, 70, -60, 16, 82, 62, -52, 12, -74, -22, 50, -82, -14, -48, -88, 52, -12, 92, -40, 16, -66, -92, 30, -80, -10, 48, -4, 16, 50, 66, 44, -40, -52, 48, 18, -16, -56, 58, 28, -42, -80, 22, -58], [42, 38, 28, 30, 16, 66, -92, 36, -40, 28, 12, 2, -50, -42, -96, -56, 6, -16, 10, 96, -62, 64, -8, 82, 46, 94, 6, 30, 84, 64, -58, 88, 42, 88, 0, 16, -30, 48, -10, 30, 94, -42, 56, -82, -60, -84, -34], [60, -50, -90, 24, -8, 40, -92, -28, 28, 84, -36, -62, -24, -54, 98, -90, 50, -26, -18, 8, -74, -20, 54, -22, -44, -84, 64, 66, -20, 56, 96, 54, 94, -60, 96, -46, -66, 66, -48, 2, -90, -94, -86, -80, -36, -66, 36], [82, -38, 10, 18, 8, -12, -92, -96, -50, -34, 18, -54, 8, -36, 56, -32, 80, -84, 96, 76, 6, 72, 62, 24, 58, 20, -56, -94, -92, 16, 22, -68, -18, -26, -56, 80, -52, 50, 56, 78, -6, 54, -58, 16, 78, 52, 80], [-34, -56, -86, 42, 26, -78, 8, 92, 2, 10, -56, -14, 84, -20, 14, -76, 2, 82, 90, 28, 18, 16, 94, -96, -40, 22, -52, -90, -28, -64, 38, -68, -62, -94, 76, -78, -48, 70, -60, -98, 84, -38, -12, -20, 8, 84, -52], [-74, -94, 42, 80, 12, 56, -90, 58, 4, -58, 20, 14, 80, -88, 22, 94, -18, -96, 76, 88, 72, -98, -80, 88, -8, 6, -10, 50, -78, 16, -40, 28, 14, -98, -90, -4, 30, 56, 28, 56, 32, 12, 68, 2, 2, 18, 96], [70, 24, -78, -52, -10, -54, -4, 22, -96, -60, -16, 90, 70, 64, 78, 90, -74, 98, 80, 84, -84, -22, 58, -12, -84, -2, -72, 24, -96, 52, -62, 58, 72, -24, -54, -38, -12, 34, 42, -50, -14, -16, 62, -72, 14, -34, 50], [76, 48, -66, 12, -92, 36, 64, -86, -18, 2, 16, 2, 88, 70, -8, 4, -62, -34, -6, 54, 10, -8, -54, 32, 12, 94, -12, -68, 74, 84, -38, -4, -32, 20, 14, -8, 82, -66, 48, -26, -74, 10, -20, -74, -46, 78, -96], [28, 24, 16, 40, 12, -68, -42, 94, 18, 98, 68, -56, 2, -92, -10, -54, -2, -82, 86, -64, -38, -12, 48, -32, 16, 30, -36, -94, 84, -74, -30, -54, 62, -38, -74, -6, 70, -64, -26, -58, 30, 2, 96, 64, -86, -24, -12], [-30, -78, 84, 58, 20, 2, 10, -24, 62, -56, -80, 76, -40, -20, -66, -2, -62, 48, -74, -48, -82, 88, 64, -72, 74, -42, 30, -60, -88, -46, -72, 36, -98, 70, -84, -52, 68, -18, -90, -20, 44, -40, -92, 20, -98, -80, -84], [-90, 44, -30, 84, -10, 36, 28, 46, -96, -42, -60, 2, -14, 78, 80, 44, -54, -10, -12, -30, 80, -80, 94, 72, 50, -98, 74, 14, -28, -84, 60, 62, -72, -90, -46, -90, 56, -36, 98, 64, -26, 64, -68, -58, -10, -12, -18], [84, -86, 90, -90, -42, 38, 6, 8, -90, -6, -52, 18, -62, 96, 42, -26, -86, -24, 54, 10, 94, -66, 58, -82, 84, -42, -6, 48, 72, 54, 94, -36, -56, -66, 0, 28, 80, -22, 92, 44, 64, -86, -96, 6, 56, -62, -88], [32, -90, 68, 72, -74, -70, -4, 58, -78, -18, -50, -10, -84, 26, 38, -84, 72, 44, -52, 44, -26, 42, -84, 2, -42, 76, -16, -46, 0, -46, -26, -28, -10, 56, -84, -92, 84, 32, -80, -46, -10, -30, 52, -78, -50, 56, -22], [-78, 12, -90, -90, -74, 48, -46, 32, 4, 24, -6, 40, 80, -26, -68, -20, 70, 86, 60, -60, 84, 30, 34, -60, -42, 50, 38, 64, 30, -18, -50, -48, 66, -2, -20, 86, 26, -96, 96, -68, 38, 64, -40, -94, -52, 74, 52], [-40, 88, 72, -56, -26, -48, -48, -20, 46, 88, 14, 86, 4, 46, 6, -54, -86, 34, 58, -72, 92, -18, -88, 8, 0, -28, -78, -4, 40, 0, 28, -38, -60, -28, -44, 48, -56, -52, 2, 20, 72, -98, 6, 22, 64, 36, -60], [90, -8, 0, -42, -58, -96, 80, 52, -78, 24, -24, -92, -70, 42, -46, 96, -10, -32, -18, 22, 24, 86, -4, -86, -70, -70, -96, -98, -34, 0, 16, -84, 28, -70, 94, -72, -52, -78, 62, -56, -12, -88, 76, 74, 12, 12, -28], [-42, -94, 96, 74, 70, -40, 50, -40, -26, 2, -76, -88, -54, 80, 66, 38, -8, 42, 94, -12, -88, 38, -44, -26, -98, 80, -56, -40, 48, -48, -8, 50, 6, 74, 94, -50, -70, -30, 70, -2, 60, -92, 38, -28, -64, -62, -54], [-40, 70, -60, -38, -70, 6, 24, -72, 22, -58, -2, 70, 58, 28, 90, -68, -12, 18, -66, -56, 66, 32, 4, 98, 64, -34, 10, -78, -88, -38, 36, -76, -96, 94, -38, -18, -40, 94, -18, -66, -34, 66, 82, -94, 76, -38, 14], [-98, -72, 14, 10, -30, 56, -56, 30, 20, 60, 52, 46, -16, -60, 60, 0, -70, 50, -64, 90, -62, -10, -94, 74, -92, 98, 86, 42, -18, -66, 34, 40, 36, -44, -44, -86, -22, -50, 50, -28, -34, -40, -30, 44, -54, 74, 54], [16, -12, -44, 82, -60, 36, -24, -12, 78, -74, -82, 66, -48, 74, -2, -4, -4, 10, -4, 18, 8, -84, -56, 64, 66, -46, -56, -60, -60, -72, 92, -82, 44, 28, 30, 84, 68, 34, -36, -58, 60, -26, 10, 74, 50, -70, -40], [-94, -12, -34, -82, -22, 22, -14, -66, 76, -42, -94, 24, 40, 10, -24, 60, 80, -52, 62, 76, 96, 92, 46, -44, -20, -92, -36, -6, -90, -64, -64, 44, 54, -60, -30, 80, 32, 32, -76, -10, 48, 88, -84, -32, -94, -50, 80], [86, 56, -50, -48, 74, 36, 2, 6, -64, 24, 86, 58, -92, -66, -32, -4, -74, -94, 16, -18, 10, -66, 82, -96, -96, 56, 18, 78, -12, 32, 48, 70, 42, 20, 0, -80, 78, -28, 80, 0, -94, -56, -28, 48, -30, -50, -20], [46, -94, -6, 60, -94, -18, 80, -58, -62, -70, -20, -8, -60, 92, 32, 78, 4, -26, -32, 98, 40, 98, -92, -96, 2, -96, 42, 30, 2, -4, 20, -84, -8, -40, 42, 8, 92, 32, -12, 44, -60, 32, 14, -56, -68, -72, -18], [2, 50, 48, 44, -24, 68, 16, 88, -66, -48, -82, -50, -24, -50, -56, 40, 30, -58, 38, 24, 44, 42, 52, 18, -86, 26, -4, -64, 70, -12, 6, -90, 78, 12, -82, 52, 70, 32, 74, 66, -98, -62, 76, 20, 74, -48, -46], [90, 66, -62, 86, 76, -54, 78, 98, 66, -16, 16, 32, 48, -42, 50, 16, -86, 66, 12, 88, -92, -78, -84, 74, 10, 0, -86, -34, 14, -74, -88, 86, -48, -34, 44, -58, 26, -48, -70, -96, -26, 84, 82, -90, -14, 30, -20], [-26, 58, -32, 22, -82, 50, -50, 42, 14, 60, -28, -12, 34, 94, -68, -48, -6, -98, 66, 94, -60, 26, 72, 10, -58, -66, -50, -92, -34, 66, 36, 44, 94, -34, -76, 22, -94, 14, 56, -2, 38, 42, 16, 20, -90, -36, -34], [-90, 98, 34, 26, 58, 70, -86, 46, -40, 70, 94, 40, -36, 2, -82, 0, -4, -18, 70, 40, 92, -38, -46, -74, -82, -54, 44, -34, 24, -46, 60, -36, -86, 92, -32, -38, 76, 46, -42, -56, -42, -8, 48, -64, 88, -50, 24], [70, -26, -72, -18, -88, -58, 76, -96, 62, -12, -56, 74, 62, 68, -86, 82, 34, -98, -52, 22, -16, -48, -14, -8, -56, 10, 48, 98, -70, 82, 2, -86, 76, 72, -70, -6, 58, -18, -48, 52, -48, -76, 68, -64, -34, -56, -88], [34, -80, -50, 74, -26, 2, 40, -66, -16, 56, 22, 10, -72, 86, 54, 34, 30, 38, -86, -22, -38, -28, -86, 28, 96, 6, -86, 54, 4, -84, 34, -58, -6, 40, 54, -60, -22, 84, 74, -92, -58, -86, -76, -66, -36, 90, -30], [26, 74, 84, -60, 52, -14, 98, -74, 24, 16, -96, -86, 18, -82, -34, -82, -56, -86, -8, -50, -32, -44, 8, 50, -12, 82, -10, 80, -28, -28, 2, -34, -88, 28, -44, -94, -42, 2, -48, 54, 90, 16, -38, 14, 82, 42, 58], [-22, 14, 26, -60, -18, -38, -60, 54, -48, 60, 50, -70, 24, -50, 18, 48, 98, 42, -52, -68, 24, 94, 60, 74, 76, 6, -76, -70, -86, -22, 76, 16, -4, 48, 20, -60, 82, 38, 32, 36, -56, -58, 40, 12, 46, 18, -96], [-92, 44, 94, -42, -84, -78, -72, -62, -32, 4, -12, -42, 4, 12, 20, -12, 6, 38, -92, -64, 64, 92, -62, 64, 54, -60, -42, -54, -14, -28, 26, -6, -14, 0, 80, 10, -64, -54, 2, 82, -8, 98, -20, 72, -94, -78, -64], [50, 44, -64, -36, 60, -44, 64, -64, 40, -66, 60, -44, 6, -8, -80, 36, 2, 30, -26, 82, -82, 26, -92, -40, -66, -62, 76, -34, -46, -36, 36, -92, 36, -74, -78, 50, -80, 16, -88, 92, -50, -80, 12, -92, 8, -18, -84], [20, -24, 94, -62, 40, -16, -24, -36, 62, -88, 98, -28, -80, 96, -96, 18, 60, -92, 22, 96, 98, -48, -82, 62, -28, -74, -84, -56, 88, -82, 38, 42, -82, -76, -16, -12, 46, -46, 48, 96, 12, 66, 74, -58, -2, -84, 16], [-4, 18, -28, 22, 70, -70, -70, 66, 46, -68, 72, -60, -54, 2, -82, 60, 86, -92, 36, -44, 98, 88, -88, 86, 24, 88, -80, -12, -18, -8, 0, -26, 2, 56, 94, 90, 30, -96, 32, 48, 2, -72, -36, 10, -52, 0, 98], [46, -62, -78, -50, 98, 26, 42, 6, 26, -28, -56, 60, -36, -54, -84, 90, 68, 94, -28, 60, 52, 54, 28, 12, 58, -42, 86, -74, -84, -88, 54, -18, 54, 38, -96, 84, -78, -26, 50, 86, 58, 24, -2, -78, 40, -68, 6], [2, 26, -82, -84, 46, 46, 0, 18, 90, -92, 24, -34, -70, -84, 18, 32, -36, -84, -36, 20, 26, -72, -12, 36, 72, 42, 58, -34, 30, 40, -6, -18, -52, 20, -52, 4, -64, -64, -2, 36, 64, -86, -70, -38, -50, -34, 60]],44,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],16,), ([[49, 76, 85, 2, 48, 20], [13, 2, 84, 21, 44, 17], [70, 85, 58, 75, 89, 16], [86, 45, 19, 97, 95, 63], [62, 44, 26, 75, 73, 95], [93, 35, 62, 88, 6, 33]],4,), ([[-80, -72, -68, -62, -56, -40, -28, 4, 22, 24, 34, 58, 60, 60, 78], [-88, -68, -48, -28, -24, -4, 0, 2, 12, 30, 42, 48, 52, 64, 68], [-92, -86, -82, -44, -38, -20, -18, -16, 2, 4, 12, 32, 42, 54, 96], [-82, -74, -64, -48, -30, -10, 16, 20, 28, 46, 46, 54, 60, 74, 96], [-84, -78, -70, -30, -28, -18, -10, -2, 2, 14, 30, 44, 50, 92, 98], [-92, -74, -64, -48, -46, -8, 20, 22, 28, 30, 30, 32, 46, 62, 84], [-92, -82, -82, -66, -64, -60, -40, -2, 2, 40, 44, 46, 66, 68, 74], [-70, -58, -54, -46, -34, -18, 14, 20, 22, 32, 48, 62, 84, 86, 90], [-92, -62, -58, -48, -30, -28, 0, 8, 16, 20, 26, 38, 70, 92, 98], [-90, -80, -46, 0, 14, 36, 42, 48, 48, 50, 50, 50, 52, 76, 98], [-80, -78, -58, -58, -54, -44, -42, 6, 20, 24, 28, 34, 40, 58, 78], [-90, -80, -60, -40, 4, 6, 10, 26, 28, 34, 36, 38, 42, 44, 56], [-96, -96, -72, -58, -54, -40, -34, -34, -28, -26, -22, -18, -2, 18, 54], [-98, -90, -76, -64, -62, -58, -54, -30, -16, 14, 36, 54, 54, 72, 92], [-86, -70, -58, -48, -46, -38, -32, 2, 20, 44, 54, 56, 66, 82, 84]],9,), ([[0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0]],27,), ([[1, 2, 2, 2, 3, 3, 10, 11, 11, 19, 27, 30, 31, 36, 38, 51, 55, 64, 64, 68, 72, 78, 79, 83, 87, 98], [1, 3, 5, 6, 19, 25, 31, 32, 39, 40, 51, 51, 52, 54, 57, 58, 64, 65, 66, 73, 76, 83, 87, 90, 92, 97], [1, 6, 7, 26, 29, 33, 35, 42, 44, 46, 47, 50, 61, 64, 65, 67, 73, 75, 81, 81, 86, 87, 88, 88, 95, 95], [1, 3, 6, 19, 19, 21, 29, 34, 36, 36, 43, 44, 52, 53, 53, 63, 64, 67, 68, 75, 75, 75, 76, 78, 81, 83], [9, 10, 18, 18, 20, 22, 28, 31, 35, 42, 47, 48, 48, 62, 63, 65, 65, 70, 73, 75, 75, 82, 92, 95, 95, 97], [10, 14, 16, 17, 27, 30, 33, 36, 37, 37, 39, 47, 48, 48, 56, 57, 62, 74, 78, 81, 82, 84, 87, 88, 95, 95], [2, 16, 16, 18, 21, 21, 25, 26, 33, 38, 51, 51, 57, 59, 66, 68, 68, 69, 70, 74, 74, 74, 84, 86, 96, 98], [3, 5, 14, 14, 17, 23, 26, 26, 27, 31, 33, 36, 37, 51, 63, 64, 70, 70, 72, 75, 79, 86, 90, 90, 97, 97], [15, 15, 16, 19, 23, 29, 31, 33, 35, 35, 37, 38, 44, 49, 56, 68, 73, 74, 75, 76, 80, 84, 87, 89, 95, 99], [2, 3, 7, 13, 14, 16, 19, 19, 21, 28, 32, 39, 43, 47, 58, 64, 66, 80, 80, 82, 83, 84, 91, 91, 95, 98], [2, 3, 11, 21, 22, 24, 26, 34, 39, 41, 41, 47, 49, 50, 50, 59, 61, 67, 78, 79, 80, 85, 87, 87, 90, 96], [6, 9, 11, 15, 20, 27, 27, 27, 28, 42, 47, 47, 58, 61, 67, 70, 70, 71, 76, 77, 78, 80, 83, 91, 97, 98], [4, 8, 12, 13, 14, 14, 15, 20, 21, 22, 24, 25, 29, 51, 51, 57, 60, 68, 73, 76, 76, 81, 92, 93, 94, 98], [1, 8, 23, 26, 26, 26, 31, 40, 41, 45, 46, 49, 50, 53, 55, 58, 62, 65, 66, 68, 71, 77, 87, 87, 97, 98], [3, 9, 11, 17, 26, 28, 31, 32, 32, 33, 35, 41, 41, 41, 44, 48, 48, 63, 72, 74, 82, 84, 85, 91, 92, 94], [3, 5, 6, 8, 10, 17, 36, 41, 42, 45, 50, 51, 52, 53, 56, 58, 63, 64, 69, 72, 73, 74, 78, 87, 90, 92], [2, 6, 12, 19, 20, 25, 27, 30, 35, 38, 42, 45, 45, 50, 53, 54, 56, 59, 62, 62, 66, 74, 78, 81, 91, 94], [6, 8, 9, 15, 18, 20, 23, 23, 29, 30, 39, 41, 49, 62, 65, 69, 76, 79, 83, 84, 85, 86, 90, 94, 98, 98], [5, 6, 7, 11, 12, 16, 19, 19, 20, 20, 26, 44, 46, 53, 56, 60, 61, 74, 75, 75, 76, 80, 93, 95, 96, 99], [7, 15, 19, 22, 23, 24, 31, 34, 35, 37, 40, 42, 44, 52, 57, 67, 73, 74, 76, 77, 78, 83, 84, 95, 96, 97], [2, 4, 15, 16, 16, 23, 26, 32, 34, 39, 40, 41, 46, 52, 56, 61, 62, 65, 76, 80, 81, 82, 84, 85, 86, 87], [9, 13, 22, 41, 42, 42, 42, 45, 48, 49, 51, 51, 54, 58, 59, 60, 73, 74, 75, 83, 83, 86, 91, 94, 98, 98], [5, 9, 9, 16, 21, 21, 22, 27, 28, 31, 31, 32, 38, 38, 49, 51, 61, 62, 65, 69, 73, 75, 85, 91, 91, 96], [4, 4, 7, 7, 7, 9, 11, 21, 31, 36, 43, 43, 57, 58, 63, 63, 64, 66, 70, 71, 73, 77, 82, 83, 92, 97], [1, 6, 9, 9, 12, 14, 15, 16, 20, 24, 25, 29, 30, 37, 43, 44, 45, 53, 58, 63, 69, 70, 72, 78, 83, 88], [1, 15, 16, 17, 19, 24, 25, 35, 43, 44, 44, 46, 48, 49, 50, 53, 54, 61, 61, 67, 70, 74, 74, 83, 87, 88]],24,), ([[-62, -26, -90, -96, 66, 8, 88, 98, 26, -4, -62, 38, 24, 18, -88, -78, 22, -80, 80, 8, 62, 22, -20, 42, 78, -96, 38, 22, 44, 18, -98, 4, 66, -58, 50, -98, 42, 48, -52, 98, -72, 72, 60, -66, -78, -92], [24, 94, 24, 64, 78, -82, 12, -96, -80, 32, -18, -8, -98, -32, -8, -40, -98, -52, -86, -50, -16, -36, 6, 6, 70, -78, 10, -34, -98, 24, -62, 4, -8, -86, 60, -52, -48, -44, 82, 68, 98, 30, 6, -58, 94, -52], [-20, 84, -82, 42, 42, 86, 38, 64, 84, 88, 46, -48, -8, -60, -94, -74, -72, -74, -52, -96, 46, 68, 84, -64, 22, -44, 78, -62, 64, 14, -80, 90, -26, 84, 92, -82, 36, -56, -46, 28, 86, -58, 50, -78, -36, -50], [-26, -94, -38, -38, -10, 58, -42, 36, 12, 22, 52, 48, 40, 22, 84, -56, -76, 48, -42, -58, 50, 98, -46, -30, 16, 30, 66, -2, 68, 44, -60, -4, 40, 16, 68, -40, 96, -40, -6, 60, 62, 90, 90, -20, 98, 94], [80, 36, 26, 86, 76, 38, 88, 80, -90, -60, -52, 92, 48, -32, -18, 4, -44, 52, 14, 2, 92, 2, -70, -16, 92, 12, -66, 62, 52, -92, -98, -80, -46, -50, 72, 98, 64, -32, 52, -10, 20, -20, -54, -12, 64, -64], [38, 94, 60, 44, -26, -46, 92, 60, -18, -10, -60, -78, -96, 54, -88, -20, 60, 66, -62, 40, 98, -50, 86, -56, -52, -60, 52, 26, 62, 62, -4, 54, -60, 52, -50, -2, 92, -38, -98, -66, 60, 70, 76, 64, -80, -88], [94, 84, 38, -60, -72, 50, -42, -52, -4, 16, -40, 90, -18, -20, 34, -28, -4, -66, -82, -30, -36, 94, -38, -56, -22, 62, -2, 30, -58, 70, -80, 0, -98, 14, 40, -28, 76, 30, 18, 6, -72, -28, 24, 26, 66, -56], [38, 52, 34, -60, 78, 64, 2, 64, -50, 14, -66, -2, -10, 10, 98, 36, 96, 96, -76, -58, -52, 22, 40, -28, 18, -34, -72, -98, -54, 82, 30, 90, 0, -22, 6, -36, -34, 44, -60, -40, 70, -26, 14, 14, -72, 98], [38, -88, 26, 34, 32, -78, 38, 12, -16, -76, 28, -74, 6, -54, 96, 8, -34, 72, 84, -70, -26, 16, -86, -14, 46, -24, -24, -96, -82, -66, 78, 20, -94, -76, -76, 90, -32, -24, -36, -62, -88, -26, -36, 0, -92, 40], [0, 66, 60, 82, -14, 92, 88, 30, 60, 36, 80, -54, 28, -10, -96, -4, -68, 46, 98, 42, 38, 30, -74, -2, 30, 6, -78, 74, -56, -6, -48, 32, 88, -40, 18, 36, -34, -28, 30, -54, -82, 98, 34, -56, 50, 40], [18, -96, 54, -6, 94, -68, -28, -18, -90, -64, -88, 60, 60, -72, 82, 48, 6, -44, -22, -82, 62, 52, -32, 0, 2, -12, -78, 92, 22, 2, 84, -64, 50, -6, -2, 90, 76, -48, -28, 22, -30, 14, 68, 26, 80, 20], [-94, -26, -52, 4, -44, 12, 74, -26, 28, 64, 84, -62, -10, -12, 74, 68, 94, -80, 32, -26, 80, 44, -80, -74, -82, -86, 98, -12, 30, 60, 90, 16, -58, -28, 18, 14, -86, -46, -62, -88, -84, 74, -48, -8, -26, 60], [10, 64, 58, -92, -48, 38, -30, -64, -58, -68, -26, -68, 52, 48, -72, 96, 32, -48, -60, 54, -6, -72, -22, 74, 4, 14, 80, 52, -50, 22, 74, -14, -92, -96, 54, -90, -18, 18, -16, -82, 26, 98, -68, 8, -78, -48], [-78, 12, 70, -42, 34, -52, 86, 64, -32, -96, -22, -8, 84, 36, -38, -80, 84, 72, 58, 34, -86, -84, 30, -40, -90, 10, 0, -74, 14, 76, -22, -2, 86, 86, -60, 32, -62, -34, 4, 14, 68, -38, 86, 94, 18, 30], [66, 16, 82, -70, -24, -90, -70, 82, 32, -42, -82, 74, -24, -16, 68, -92, 32, -58, -58, -14, -34, 68, -24, 20, 68, 54, 78, -72, -14, -46, 74, -90, -98, -64, -2, -58, -6, -20, 54, -70, -46, -56, 50, -62, 0, -14], [4, 50, 66, 84, -44, 50, -22, 36, 20, 94, -2, 66, -16, -82, -90, -74, 88, 42, 16, 42, -76, 0, 28, -42, -44, 48, -12, 78, -40, 54, 34, -86, -26, -46, 78, -68, -80, -94, -2, -48, -42, 62, 48, -24, -20, 60], [-16, 20, 16, -10, -96, -32, 42, -52, -72, 2, -66, -40, 32, 86, 96, -46, 88, 64, 90, 68, -22, 0, -18, 82, 22, 62, -82, -44, 76, -62, -26, 8, 82, 84, 96, 8, 76, 66, -56, 96, 96, -54, -70, 66, 60, 40], [64, -58, -76, 94, -4, -48, -40, 96, 46, -16, 2, -52, 42, -80, -44, 10, -60, 28, -52, -54, -88, 72, -40, -2, 78, 86, -26, -86, -90, -4, -14, 46, -84, -36, -88, 4, -4, -92, -42, 36, -94, -10, -38, -82, -50, 4], [-72, 22, -40, 24, 10, 26, 72, 14, -90, -66, -88, -30, 40, 40, -80, -56, -4, -88, 32, -98, 22, 10, 58, 62, -10, 24, -80, -90, 28, -64, -26, 30, -32, -44, 90, -12, 16, -48, 98, 88, -58, -54, -10, 48, -12, -40], [70, -36, -30, -26, -48, 86, -12, -78, 62, -8, -80, -14, -48, 52, -38, 38, -54, -40, -24, -80, -94, -50, -46, 64, 12, 62, -8, 12, -22, 24, -30, 20, -8, -76, -18, -76, 52, -74, 38, -26, -98, 58, 76, 38, 44, -14], [32, -62, 24, -58, -50, 32, -84, 0, -62, -12, 28, 72, 0, 42, 82, 32, -20, -96, -20, 92, -32, 86, -70, 74, -76, 64, 48, 66, 94, 52, 48, 6, -78, -88, 24, 74, 32, 38, 38, 92, 50, 24, 34, 46, -14, 18], [-42, 86, -48, -96, -72, 52, -28, 8, -92, -28, -56, -16, -48, -88, 90, 42, 30, 62, -50, 78, -20, 26, 10, -14, -40, 22, -34, -98, -48, -56, 54, 0, -54, -68, 52, 70, 78, -20, 60, -88, -26, 40, -80, -6, 66, -86], [18, -68, -46, 24, -62, -8, 14, -46, -60, -48, 0, -46, 50, 98, -86, 2, 92, -94, 66, -90, -74, -34, -80, 14, -42, -72, -54, 36, 70, 38, -92, 64, -86, -64, 6, -22, 92, -60, 38, 94, -74, 46, 96, -32, -10, 22], [2, 44, 44, -16, -96, 26, -32, -66, -22, 30, 68, -12, -94, 32, -48, 16, -80, -94, 2, -4, -56, -22, -22, 36, 16, 50, -2, 46, 56, -68, -72, -34, -54, -76, -84, 74, 22, -38, 26, 36, 30, -56, -82, 54, 92, -50], [-12, 2, -28, 98, -94, -52, 18, -30, -50, 36, 46, -22, -54, -70, 64, -30, 32, -14, 38, -56, -34, 84, 24, 10, 26, 32, 52, -16, -48, 4, -24, -70, -94, -10, -76, -36, 46, 88, 18, 48, -64, -12, -8, -70, -4, -80], [90, -8, 30, -44, -64, 42, 8, -14, -6, -70, -42, -98, -48, 34, -88, -22, 48, -98, 0, -16, 32, -36, 78, 84, 60, 80, 90, 58, -72, 80, -96, -98, -96, 58, -62, 86, -6, -14, -50, -96, 8, 18, -84, -34, -72, -18], [-42, 36, 86, 26, 10, -20, -22, 46, 28, 88, -34, -84, 60, 8, -22, 38, -40, -36, 18, -76, 40, -22, 14, 86, 22, 24, 98, 88, -90, 58, -58, 30, 70, 84, -32, 2, 20, 80, 28, -44, -98, -6, -64, 90, 42, -92], [0, -38, 82, 46, -24, 34, 34, -82, 2, -86, -30, 64, 16, -6, 22, -88, -26, -88, -74, -20, 82, 94, -16, 64, 26, 76, 58, -92, 28, -16, 44, 56, 20, 40, 20, 78, -96, -86, -54, -46, 54, -76, 82, -50, -54, -40], [-66, -18, 2, 98, 6, 70, 32, -6, 66, 4, 88, 64, 20, -24, 68, 2, -86, 66, -46, 18, 70, -90, 6, -44, -28, -86, 16, -38, -34, 2, 96, 80, 80, 34, -34, -66, 68, -20, 32, 36, 8, -40, -34, 8, 80, -94], [54, -28, -22, -26, 96, -34, 96, -92, 20, -24, 26, 24, 18, 96, 14, 96, 48, -96, 38, 86, 88, -66, 26, -22, 54, 72, 42, 0, -10, -42, -54, 78, -42, -2, -30, -60, -20, -84, -14, 98, 24, 96, -62, -28, -52, 34], [-96, 78, -66, -94, 2, 36, -62, -14, 70, -22, -92, -58, -58, -2, 40, 80, 86, -84, -98, -66, -44, -58, 56, -90, 88, 34, 76, 82, -2, 38, -26, 92, -94, 62, -56, -10, 14, -50, -92, 80, 8, -36, -96, -10, 42, -84], [50, -14, 12, 78, 50, -54, -22, -34, -70, -58, -18, 38, 8, -88, -88, -86, 58, -42, -28, -42, -26, 26, 90, 14, -40, 98, 94, 58, 68, 14, 36, 20, 58, 14, -22, -34, -48, -64, 38, -12, -12, 30, 24, 6, 38, 50], [-48, 6, 82, 94, 30, 58, -30, -54, -26, -32, 48, 40, 20, -68, -28, -50, -4, 88, -58, -46, -70, 48, -30, 76, -58, -96, -56, 36, 10, 56, 14, -6, 38, 12, -52, -78, -56, -36, 48, -56, -78, 98, -56, -92, -50, 46], [-30, -64, -90, -38, -28, 74, 70, -44, 56, -38, 64, 98, 62, -50, -68, 82, -6, 36, -16, -60, -44, -34, 92, -56, 12, 12, 88, 30, -72, 98, -86, -64, 82, -56, 58, 28, 24, -72, -98, -68, -54, -52, 50, 8, 44, 18], [-92, -86, -68, -18, 56, 26, 68, -84, 60, -68, 20, -2, -86, -76, -92, -86, -96, 50, 84, -44, 62, 24, -20, 88, -94, -66, 32, 50, -32, -96, 18, 56, 48, 18, -40, 50, -18, -10, 84, -48, 8, -50, 86, 88, 90, -70], [60, 46, 46, 96, 44, -38, -66, -56, 12, -28, -36, -32, -98, 50, 16, -8, 58, -94, 20, -94, 88, 82, 30, -32, -6, -50, 6, 44, -98, -16, -96, -68, 54, 0, 68, 44, 58, -72, -96, -84, -70, -14, -12, -52, -78, -76], [-8, 72, 32, -90, -68, 60, -10, -34, -38, -88, 22, 82, -46, -76, 96, 54, 0, -52, 94, -66, 34, 28, -50, -32, -80, 0, 98, 18, 96, 28, 72, 64, -52, 98, 14, 28, 46, 48, 34, -34, -96, -24, -48, -86, -26, -74], [36, 26, 22, 18, 4, 78, 72, 28, -24, -64, 28, 2, -4, 46, 82, -70, 36, 66, 22, -32, -48, 24, -20, 66, 80, -22, 88, 26, 68, 22, 84, -44, -28, 76, -10, 90, -46, -40, -94, 22, 14, 96, -66, 66, -4, 40], [-44, -22, 52, 30, 70, 22, 22, 74, 56, -14, 66, -34, 34, -2, -96, -90, -38, 32, -4, -74, 16, -34, -6, 14, 38, -66, 68, -2, -28, -66, -8, -22, 80, -70, -62, -66, -18, -84, 82, -8, 34, -42, 16, 10, -64, 34], [-10, 92, -78, -80, 18, 54, 8, 16, -98, 14, 8, 14, -6, -72, -30, 68, -76, 40, 92, -94, 20, 90, 68, 28, 38, -8, -94, 50, 56, -92, -46, -54, -12, -48, 18, 76, 10, 58, 24, -32, 6, 94, 64, 66, 96, 90], [88, 62, -84, 24, 76, -24, -22, 26, 42, -56, -56, -26, -40, 88, 74, 32, 54, -96, -24, -44, 90, 66, 56, -68, 34, 18, 44, -38, 82, -12, -8, 80, 70, 92, 6, -50, 40, -62, 60, -98, 54, 36, -4, 84, 48, 84], [86, -98, -60, 26, -58, -26, 92, -80, -56, -30, 60, -10, 96, 92, -76, -28, 88, 4, -88, -82, -22, 96, -18, -8, -88, 16, 12, -30, -66, -26, 38, -76, 68, -22, -78, 56, -70, -42, 76, 92, 8, -76, 0, 70, -70, 32], [42, -88, -52, -12, -58, 78, 4, 98, -92, 96, 70, 96, 96, 86, -6, -58, -14, -92, -6, 16, -28, 88, 28, 14, -14, 22, -46, -30, -6, -34, -12, -70, 82, 68, 34, 58, 20, 90, -58, -66, -12, -20, -76, -86, 56, 32], [-62, -58, -60, 26, 38, 68, -18, 26, -42, 30, -52, -28, -98, -58, -2, 86, -38, -58, -58, -82, -52, 80, 42, -4, -92, 32, -90, 60, 70, -96, 96, -36, -16, 40, -24, 44, -34, 48, -54, 80, -86, 14, 34, 52, 50, 38], [68, -46, -50, 64, -32, -94, 14, -66, 90, -54, 60, 20, 52, 36, -26, -92, 38, 10, 84, -18, -38, -98, 92, -50, -58, 40, -56, -44, -46, -50, -2, 52, 22, -80, -20, 86, 8, 64, 48, -8, 14, -86, -56, -26, -6, 28], [-58, -40, -82, 8, 26, -46, -14, -62, -28, -28, 90, 76, 62, -18, -34, 18, -78, 14, 24, 2, 62, 62, -88, -84, -54, 66, 96, 44, -46, -18, -44, 32, -12, -94, -54, -18, 62, 12, 4, 8, -66, 72, 12, -32, 48, 68]],43,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],19,), ([[94, 55, 14, 44, 30, 47, 19, 87, 68, 17, 34, 15, 93, 98, 10, 27, 43, 51, 83, 24, 19, 45, 91, 59, 84, 82, 80, 51], [4, 37, 73, 13, 56, 1, 10, 52, 62, 6, 71, 18, 21, 24, 48, 82, 41, 86, 45, 79, 74, 42, 49, 92, 73, 40, 57, 28], [63, 27, 3, 18, 66, 35, 77, 76, 77, 17, 69, 56, 34, 48, 83, 96, 57, 6, 7, 20, 41, 11, 14, 78, 10, 10, 24, 76], [75, 75, 93, 9, 27, 21, 26, 88, 55, 93, 73, 46, 37, 14, 94, 15, 87, 91, 66, 76, 90, 95, 6, 14, 33, 22, 69, 34], [32, 11, 56, 49, 83, 82, 15, 80, 85, 68, 22, 87, 8, 33, 50, 87, 59, 82, 73, 34, 31, 39, 77, 30, 51, 44, 57, 92], [66, 57, 78, 33, 72, 1, 88, 46, 15, 89, 96, 67, 28, 91, 99, 7, 69, 13, 18, 26, 36, 48, 20, 39, 66, 57, 25, 66], [40, 41, 73, 88, 44, 60, 53, 70, 38, 51, 3, 35, 25, 34, 30, 56, 58, 66, 67, 63, 7, 64, 48, 46, 43, 21, 33, 67], [41, 71, 98, 92, 82, 99, 88, 68, 7, 52, 92, 75, 25, 95, 54, 39, 46, 30, 71, 69, 53, 51, 73, 65, 2, 63, 60, 95], [19, 56, 87, 21, 61, 51, 78, 34, 40, 23, 65, 80, 94, 90, 70, 98, 32, 89, 65, 82, 35, 91, 83, 18, 46, 89, 47, 10], [69, 26, 55, 42, 59, 37, 59, 88, 16, 97, 11, 51, 67, 3, 84, 50, 39, 44, 92, 36, 36, 88, 44, 29, 73, 92, 93, 48], [86, 59, 11, 78, 91, 40, 93, 61, 6, 20, 70, 18, 98, 14, 25, 89, 49, 26, 32, 79, 1, 76, 30, 47, 22, 81, 28, 9], [96, 52, 64, 21, 57, 31, 23, 75, 71, 69, 40, 67, 54, 18, 64, 52, 99, 77, 20, 52, 59, 16, 47, 26, 49, 83, 53, 86], [27, 61, 59, 50, 90, 15, 24, 36, 40, 96, 35, 46, 52, 45, 97, 77, 15, 67, 59, 18, 86, 6, 21, 40, 29, 89, 94, 21], [97, 78, 48, 95, 78, 24, 11, 45, 29, 18, 41, 68, 88, 66, 20, 13, 75, 14, 90, 17, 40, 76, 91, 40, 62, 21, 19, 55], [92, 89, 85, 12, 93, 53, 47, 60, 39, 14, 63, 87, 82, 98, 49, 59, 34, 64, 57, 85, 49, 27, 87, 67, 94, 62, 89, 68], [98, 25, 36, 88, 5, 79, 87, 67, 70, 88, 2, 33, 46, 81, 38, 43, 11, 10, 38, 32, 40, 94, 63, 52, 77, 32, 52, 39], [25, 2, 1, 7, 56, 64, 59, 37, 56, 32, 37, 58, 28, 67, 45, 61, 95, 69, 96, 96, 16, 86, 18, 8, 8, 89, 8, 46], [41, 21, 95, 76, 6, 55, 40, 59, 96, 50, 38, 15, 82, 58, 76, 3, 80, 21, 63, 97, 17, 20, 8, 50, 22, 75, 46, 30], [72, 75, 28, 67, 4, 83, 57, 98, 8, 24, 9, 39, 3, 97, 49, 32, 91, 36, 68, 1, 76, 98, 67, 68, 34, 38, 43, 96], [84, 29, 46, 41, 1, 42, 79, 84, 49, 95, 25, 18, 22, 61, 39, 90, 51, 11, 57, 28, 35, 68, 51, 77, 46, 72, 19, 54], [72, 65, 70, 48, 89, 7, 92, 78, 95, 27, 41, 85, 20, 54, 54, 33, 19, 28, 84, 35, 29, 35, 97, 63, 57, 2, 29, 28], [26, 65, 73, 34, 38, 95, 83, 73, 23, 67, 42, 19, 79, 13, 13, 63, 1, 53, 52, 71, 40, 40, 45, 42, 13, 50, 30, 39], [9, 56, 62, 34, 18, 82, 94, 2, 12, 45, 40, 38, 35, 20, 95, 13, 21, 90, 68, 20, 59, 1, 6, 89, 24, 96, 40, 68], [27, 44, 44, 50, 10, 72, 77, 69, 49, 66, 94, 32, 3, 48, 67, 77, 49, 71, 46, 76, 91, 5, 69, 46, 61, 90, 14, 74], [88, 44, 35, 20, 13, 82, 8, 38, 67, 85, 88, 93, 16, 96, 4, 43, 67, 24, 44, 66, 57, 26, 26, 32, 85, 1, 91, 88], [74, 52, 93, 80, 26, 34, 69, 46, 61, 3, 45, 82, 17, 45, 90, 67, 36, 39, 9, 56, 76, 79, 34, 94, 53, 87, 80, 71], [81, 47, 80, 21, 34, 27, 67, 38, 92, 35, 37, 74, 17, 91, 36, 91, 49, 18, 92, 1, 55, 46, 55, 48, 19, 36, 25, 26], [30, 49, 79, 30, 21, 84, 33, 48, 65, 43, 62, 63, 52, 43, 5, 88, 75, 27, 54, 95, 83, 42, 41, 18, 62, 99, 77, 68]],20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES{ public static int f_gold ( int k , int n ) { long f1 = 0 , f2 = 1 , f3 ; int i = 2 ; while ( i != 0 ) { f3 = f1 + f2 ; f1 = f2 ; f2 = f3 ; if ( f2 % k == 0 ) { return n * i ; } i ++ ; } return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(50); param0.add(52); param0.add(42); param0.add(2); param0.add(37); param0.add(48); param0.add(31); param0.add(9); param0.add(78); param0.add(64); List param1 = new ArrayList<>(); param1.add(60); param1.add(45); param1.add(17); param1.add(68); param1.add(43); param1.add(46); param1.add(4); param1.add(64); param1.add(14); param1.add(80); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(k, n): f1 = 0 f2 = 1 i = 2 while i != 0: f3 = f1 + f2 f1 = f2 f2 = f3 if f2 % k == 0: return n * i i += 1 return ",,," if __name__ == '__main__': param = [ (50, 60,), (52, 45,), (42, 17,), (2, 68,), (37, 43,), (48, 46,), (31, 4,), (9, 64,), (78, 14,), (64, 80,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1{ static boolean f_gold ( int arr [ ] , int n ) { if ( n == 0 || n == 1 ) return true ; for ( int i = 1 ; i < n ; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97}); param0.add(new int[]{2,-90,66,24,-18,70,34,18,84,-62}); param0.add(new int[]{1,1}); param0.add(new int[]{12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45}); param0.add(new int[]{-38,38,40,72}); param0.add(new int[]{1,0,0,0,1}); param0.add(new int[]{11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97}); param0.add(new int[]{-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26}); param0.add(new int[]{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}); param0.add(new int[]{56,51,63,30,10,88,23,1,48,4,28,44}); List param1 = new ArrayList<>(); param1.add(22); param1.add(9); param1.add(1); param1.add(23); param1.add(2); param1.add(3); param1.add(44); param1.add(9); param1.add(23); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : if ( n == 0 or n == 1 ) : return True for i in range ( 1 , n ) : if ( arr [ i - 1 ] > arr [ i ] ) : return False return True "," using namespace std; bool f_gold ( int arr [ ], int n ) { if ( n == 0 || n == 1 ) return true; for ( int i = 1; i < n; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false; return true; } int main() { int n_success = 0; vector> param0 {{6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97},{2,-90,66,24,-18,70,34,18,84,-62},{1,1},{12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45},{-38,38,40,72},{1,0,0,0,1},{11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97},{-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26},{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},{56,51,63,30,10,88,23,1,48,4,28,44}}; vector param1 {22,9,1,23,2,3,44,9,23,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 8, 8, 16, 19, 19, 21, 23, 26, 33, 34, 36, 38, 39, 41, 41, 45, 47, 52, 52, 55, 57, 60, 60, 60, 61, 69, 69, 70, 70, 72, 73, 73, 75, 78, 81, 84, 84, 85, 88, 88, 89, 90, 91, 97],22,), ([2, -90, 66, 24, -18, 70, 34, 18, 84, -62],9,), ([1, 1],1,), ([12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45, 26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45],23,), ([-38, 38, 40, 72],2,), ([1, 0, 0, 0, 1],3,), ([11, 15, 16, 17, 17, 17, 22, 23, 23, 25, 27, 28, 28, 31, 33, 36, 38, 40, 42, 44, 46, 49, 51, 51, 52, 60, 62, 65, 67, 71, 74, 77, 77, 78, 78, 79, 83, 83, 86, 86, 87, 87, 87, 88, 91, 92, 97, 97, 97],44,), ([-26, -90, -78, -76, -58, -64, -72, -34, -58, -48, 78, -50, -30, 26, -60, 26],9,), ([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,), ([56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_SUBARRAY_SUM_DIVISIBLE_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_SUBARRAY_SUM_DIVISIBLE_K{ static int f_gold ( int arr [ ] , int n , int k ) { HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ; int mod_arr [ ] = new int [ n ] ; int max = 0 ; int curr_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { curr_sum += arr [ i ] ; mod_arr [ i ] = ( ( curr_sum % k ) + k ) % k ; } for ( int i = 0 ; i < n ; i ++ ) { if ( mod_arr [ i ] == 0 ) max = i + 1 ; else if ( um . containsKey ( mod_arr [ i ] ) == false ) um . put ( mod_arr [ i ] , i ) ; else if ( max < ( i - um . get ( mod_arr [ i ] ) ) ) max = i - um . get ( mod_arr [ i ] ) ; } return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{14,16,17,17,31,32,34,35,37,38,39,46,47,52,57,58,60,61,69,75,76,77,81,88,97}); param0.add(new int[]{-16,64,-62,-86,10,-40,52,50,-42,34,-32,-32,90,72,-96,-46,-6,92,14,98,-66,96,-48,-80,-22,-82,-50,-60,-70,82,-78,-68,88,-56,24,-52}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{33,1,92,27,17,46,79,78,95,34,3,56,12,26,24,60,58,63,98,8,76,73,26,58,38,49,43,59,83,21,13,99,3,89,32,21,14,95,8,7,99,83,59,2,69,44,66}); param0.add(new int[]{-92,-76,-58,-56,-54,-20,-18,-16,-14,8,20,52,72,82,82,84}); param0.add(new int[]{1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0}); param0.add(new int[]{7,7,8,9,13,14,16,18,19,20,24,24,30,32,32,45,49,55,62,62,84,90,90,93,95,98}); param0.add(new int[]{-28,-52,-84,-98,48,74,48,-34,-38,54}); param0.add(new int[]{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}); param0.add(new int[]{30,44,9,92,82,11,66,22,87,20}); List param1 = new ArrayList<>(); param1.add(23); param1.add(35); param1.add(13); param1.add(40); param1.add(15); param1.add(34); param1.add(22); param1.add(7); param1.add(28); param1.add(9); List param2 = new ArrayList<>(); param2.add(23); param2.add(21); param2.add(13); param2.add(37); param2.add(15); param2.add(26); param2.add(14); param2.add(8); param2.add(37); param2.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > um; int mod_arr [ n ], max = 0; int curr_sum = 0; for ( int i = 0; i < n; i ++ ) { curr_sum += arr [ i ]; mod_arr [ i ] = ( ( curr_sum % k ) + k ) % k; } for ( int i = 0; i < n; i ++ ) { if ( mod_arr [ i ] == 0 ) max = i + 1; else if ( um . find ( mod_arr [ i ] ) == um . end ( ) ) um [ mod_arr [ i ] ] = i; else if ( max < ( i - um [ mod_arr [ i ] ] ) ) max = i - um [ mod_arr [ i ] ]; } return max; } int main() { int n_success = 0; vector> param0 {{14,16,17,17,31,32,34,35,37,38,39,46,47,52,57,58,60,61,69,75,76,77,81,88,97},{-16,64,-62,-86,10,-40,52,50,-42,34,-32,-32,90,72,-96,-46,-6,92,14,98,-66,96,-48,-80,-22,-82,-50,-60,-70,82,-78,-68,88,-56,24,-52},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{33,1,92,27,17,46,79,78,95,34,3,56,12,26,24,60,58,63,98,8,76,73,26,58,38,49,43,59,83,21,13,99,3,89,32,21,14,95,8,7,99,83,59,2,69,44,66},{-92,-76,-58,-56,-54,-20,-18,-16,-14,8,20,52,72,82,82,84},{1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0},{7,7,8,9,13,14,16,18,19,20,24,24,30,32,32,45,49,55,62,62,84,90,90,93,95,98},{-28,-52,-84,-98,48,74,48,-34,-38,54},{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},{30,44,9,92,82,11,66,22,87,20}}; vector param1 {23,35,13,40,15,34,22,7,28,9}; vector param2 {23,21,13,37,15,26,14,8,37,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_AREA_RECTANGLES_POSSIBLE_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_AREA_RECTANGLES_POSSIBLE_ARRAY{ static int f_gold ( int [ ] a , int n ) { Arrays . sort ( a ) ; int sum = 0 ; boolean flag = false ; int len = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ! flag ) { flag = true ; len = a [ i + 1 ] ; i ++ ; } else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) { sum = sum + a [ i + 1 ] * len ; flag = false ; i ++ ; } } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,11,14,15,22,33,64,81,82,95}); param0.add(new int[]{-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1}); param0.add(new int[]{-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86}); param0.add(new int[]{1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1}); param0.add(new int[]{19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93}); param0.add(new int[]{-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12}); List param1 = new ArrayList<>(); param1.add(9); param1.add(22); param1.add(22); param1.add(32); param1.add(21); param1.add(38); param1.add(10); param1.add(33); param1.add(24); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int a [ ], int n ) { sort ( a, a + n, greater < int > ( ) ); int sum = 0; bool flag = false; int len; for ( int i = 0; i < n; i ++ ) { if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( ! flag ) ) { flag = true; len = a [ i + 1 ]; i ++; } else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) { sum = sum + a [ i + 1 ] * len; flag = false; i ++; } } return sum; } int main() { int n_success = 0; vector> param0 {{3,11,14,15,22,33,64,81,82,95},{-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-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,1,1,1,1,1,1,1,1,1,1},{50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1},{-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86},{1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1},{19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93},{-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12}}; vector param1 {9,22,22,32,21,38,10,33,24,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MAXIMUM_DISTANCE_TWO_OCCURRENCES_ELEMENT_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_DISTANCE_TWO_OCCURRENCES_ELEMENT_ARRAY{ static int f_gold ( int [ ] arr , int n ) { HashMap < Integer , Integer > map = new HashMap < > ( ) ; int max_dist = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! map . containsKey ( arr [ i ] ) ) map . put ( arr [ i ] , i ) ; else max_dist = Math . max ( max_dist , i - map . get ( arr [ i ] ) ) ; } return max_dist ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,20,25,28,29,31,34,35,38,39,41,43,46,55,56,60,65,66,74,77,79,80,81,83,84,88,88,88,90,91,99}); param0.add(new int[]{26,14,56,84,-56,-84,-98,12,-78,18,-42,58,46,-66,-46,66,98,34,-16,8,-20,66,74,26,42,-84,38,86,14,86,26,-42,-30,6,-54,-76,-66,18,58,66,74,-62,8,-42,62,-14,-90,98,-24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,87}); param0.add(new int[]{-98,-88,-86,-62,-52,-26,-24,-20,-12,6,8,26,36,40,42,54,68,72,84,92,94,98,98}); param0.add(new int[]{1,1,1,1,0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0}); param0.add(new int[]{11,16,17,19,20,21,21,22,27,37,45,49,64,77,81,85,96}); param0.add(new int[]{-20,0,18,-96}); param0.add(new int[]{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}); param0.add(new int[]{54,5,98,71,9,34,60,28,58,66,28,45,4}); List param1 = new ArrayList<>(); param1.add(27); param1.add(34); param1.add(11); param1.add(1); param1.add(12); param1.add(29); param1.add(9); param1.add(2); param1.add(22); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : mp = { } maxDict = 0 for i in range ( n ) : if arr [ i ] not in mp.keys ( ) : mp [ arr [ i ] ] = i else : maxDict = max ( maxDict , i - mp [ arr [ i ] ] ) return maxDict "," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > mp; int max_dist = 0; for ( int i = 0; i < n; i ++ ) { if ( mp . find ( arr [ i ] ) == mp . end ( ) ) mp [ arr [ i ] ] = i; else max_dist = max ( max_dist, i - mp [ arr [ i ] ] ); } return max_dist; } int main() { int n_success = 0; vector> param0 {{1,20,25,28,29,31,34,35,38,39,41,43,46,55,56,60,65,66,74,77,79,80,81,83,84,88,88,88,90,91,99},{26,14,56,84,-56,-84,-98,12,-78,18,-42,58,46,-66,-46,66,98,34,-16,8,-20,66,74,26,42,-84,38,86,14,86,26,-42,-30,6,-54,-76,-66,18,58,66,74,-62,8,-42,62,-14,-90,98,-24},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{69,87},{-98,-88,-86,-62,-52,-26,-24,-20,-12,6,8,26,36,40,42,54,68,72,84,92,94,98,98},{1,1,1,1,0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0},{11,16,17,19,20,21,21,22,27,37,45,49,64,77,81,85,96},{-20,0,18,-96},{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},{54,5,98,71,9,34,60,28,58,66,28,45,4}}; vector param1 {27,34,11,1,12,29,9,2,22,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 20, 25, 28, 29, 31, 34, 35, 38, 39, 41, 43, 46, 55, 56, 60, 65, 66, 74, 77, 79, 80, 81, 83, 84, 88, 88, 88, 90, 91, 99],27,), ([26, 14, 56, 84, -56, -84, -98, 12, -78, 18, -42, 58, 46, -66, -46, 66, 98, 34, -16, 8, -20, 66, 74, 26, 42, -84, 38, 86, 14, 86, 26, -42, -30, 6, -54, -76, -66, 18, 58, 66, 74, -62, 8, -42, 62, -14, -90, 98, -24],34,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,), ([69, 87],1,), ([-98, -88, -86, -62, -52, -26, -24, -20, -12, 6, 8, 26, 36, 40, 42, 54, 68, 72, 84, 92, 94, 98, 98],12,), ([1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0],29,), ([11, 16, 17, 19, 20, 21, 21, 22, 27, 37, 45, 49, 64, 77, 81, 85, 96],9,), ([-20, 0, 18, -96],2,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([54, 5, 98, 71, 9, 34, 60, 28, 58, 66, 28, 45, 4],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NTH_PENTAGONAL_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_PENTAGONAL_NUMBER{ static int f_gold ( int n ) { return ( 3 * n * n - n ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(96); param0.add(93); param0.add(15); param0.add(8); param0.add(21); param0.add(14); param0.add(11); param0.add(79); param0.add(24); param0.add(94); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( 3 * n * n - n ) / 2 "," using namespace std; int f_gold ( int n ) { return ( 3 * n * n - n ) / 2; } int main() { int n_success = 0; vector param0 {96,93,15,8,21,14,11,79,24,94}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (96,), (93,), (15,), (8,), (21,), (14,), (11,), (79,), (24,), (94,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N{ static int f_gold ( int n ) { int count = 0 ; if ( n > 0 && ( n & ( n - 1 ) ) == 0 ) return n ; while ( n != 0 ) { n >>= 1 ; count += 1 ; } return 1 << count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(13); param0.add(27); param0.add(1); param0.add(24); param0.add(98); param0.add(94); param0.add(36); param0.add(41); param0.add(74); param0.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," 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; } int main() { int n_success = 0; vector param0 {13,27,1,24,98,94,36,41,74,39}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (13,), (27,), (1,), (24,), (98,), (94,), (36,), (41,), (74,), (39,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", K_TH_ELEMENT_TWO_SORTED_ARRAYS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_ELEMENT_TWO_SORTED_ARRAYS{ static int f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n , int k ) { int [ ] sorted1 = new int [ m + n ] ; int i = 0 , j = 0 , d = 0 ; while ( i < m && j < n ) { if ( arr1 [ i ] < arr2 [ j ] ) sorted1 [ d ++ ] = arr1 [ i ++ ] ; else sorted1 [ d ++ ] = arr2 [ j ++ ] ; } while ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ] ; while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ] ; return sorted1 [ k - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,2,4,4,9,10,14,16,16,19,20,21,25,26,29,36,36,37,38,44,44,49,53,54,56,61,62,64,72,72,73,77,80,84,84,87,93,94}); param0.add(new int[]{2,4,-90,62,22,-94,-74,-22,44,-94,20,-40,20,0,32,24,78,8,4,98,-74,-60}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94}); param0.add(new int[]{-94,-84,-82,-70,-70,-60,-54,-54,-52,-52,-46,-40,-40,-36,-34,-32,-30,-22,-18,-16,-10,-4,8,12,18,22,32,38,38,44,50,56,64,82,84,86,88}); param0.add(new int[]{0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1}); param0.add(new int[]{53,96,99}); param0.add(new int[]{98,86,36,-68,86,22,52,-20,-2,74,-72,86,80,-78,14,62,10,94,-66,78,28,92,-8,46,-24,66}); param0.add(new int[]{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}); param0.add(new int[]{6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31}); List param1 = new ArrayList<>(); param1.add(new int[]{6,8,10,10,12,14,24,31,33,33,35,35,35,41,46,47,49,51,52,56,57,59,62,65,72,72,73,73,79,80,82,83,83,84,87,87,93,99}); param1.add(new int[]{58,74,-46,38,-58,-78,-32,-84,84,-54,84,-34,-26,88,74,48,26,-92,68,-86,74,88}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65}); param1.add(new int[]{-92,-68,-64,-62,-54,-52,-52,-34,-24,-22,-20,-12,-12,-10,6,10,14,22,22,24,24,30,30,36,36,48,50,56,58,64,68,80,84,88,88,92,94}); param1.add(new int[]{1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,1,0,1,0,1,1,0,0,0,1,0}); param1.add(new int[]{30,55,56}); param1.add(new int[]{72,-72,-90,24,-22,60,78,-68,98,26,-30,-20,44,-96,8,90,0,98,-24,-68,-32,-62,0,-60,26,-98}); param1.add(new int[]{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}); param1.add(new int[]{87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49}); List param2 = new ArrayList<>(); param2.add(27); param2.add(18); param2.add(30); param2.add(11); param2.add(19); param2.add(24); param2.add(1); param2.add(22); param2.add(42); param2.add(14); List param3 = new ArrayList<>(); param3.add(21); param3.add(11); param3.add(31); param3.add(11); param3.add(26); param3.add(17); param3.add(1); param3.add(19); param3.add(40); param3.add(22); List param4 = new ArrayList<>(); param4.add(23); param4.add(12); param4.add(42); param4.add(13); param4.add(28); param4.add(23); param4.add(1); param4.add(24); param4.add(42); param4.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , m , n , k ) : sorted1 = [ 0 ] * ( m + n ) i = 0 j = 0 d = 0 while ( i < m and j < n ) : if ( arr1 [ i ] < arr2 [ j ] ) : sorted1 [ d ] = arr1 [ i ] i += 1 else : sorted1 [ d ] = arr2 [ j ] j += 1 d += 1 while ( i < m ) : sorted1 [ d ] = arr1 [ i ] d += 1 i += 1 while ( j < n ) : sorted1 [ d ] = arr2 [ j ] d += 1 j += 1 return sorted1 [ k - 1 ] "," using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int k ) { int sorted1 [ m + n ]; int i = 0, j = 0, d = 0; while ( i < m && j < n ) { if ( arr1 [ i ] < arr2 [ j ] ) sorted1 [ d ++ ] = arr1 [ i ++ ]; else sorted1 [ d ++ ] = arr2 [ j ++ ]; } while ( i < m ) sorted1 [ d ++ ] = arr1 [ i ++ ]; while ( j < n ) sorted1 [ d ++ ] = arr2 [ j ++ ]; return sorted1 [ k - 1 ]; } int main() { int n_success = 0; vector> param0 {{2,2,4,4,9,10,14,16,16,19,20,21,25,26,29,36,36,37,38,44,44,49,53,54,56,61,62,64,72,72,73,77,80,84,84,87,93,94},{2,4,-90,62,22,-94,-74,-22,44,-94,20,-40,20,0,32,24,78,8,4,98,-74,-60},{0,0,0,0,0,0,0,0,0,0,0,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},{85,44,62,2,71,88,60,78,32,46,17,47,65,78,65,94},{-94,-84,-82,-70,-70,-60,-54,-54,-52,-52,-46,-40,-40,-36,-34,-32,-30,-22,-18,-16,-10,-4,8,12,18,22,32,38,38,44,50,56,64,82,84,86,88},{0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,1,1},{53,96,99},{98,86,36,-68,86,22,52,-20,-2,74,-72,86,80,-78,14,62,10,94,-66,78,28,92,-8,46,-24,66},{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},{6,21,86,58,48,27,18,73,16,79,51,33,63,26,37,88,48,58,44,32,58,23,31}}; vector> param1 {{6,8,10,10,12,14,24,31,33,33,35,35,35,41,46,47,49,51,52,56,57,59,62,65,72,72,73,73,79,80,82,83,83,84,87,87,93,99},{58,74,-46,38,-58,-78,-32,-84,84,-54,84,-34,-26,88,74,48,26,-92,68,-86,74,88},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{18,3,15,9,61,73,3,62,87,1,54,97,61,37,23,65},{-92,-68,-64,-62,-54,-52,-52,-34,-24,-22,-20,-12,-12,-10,6,10,14,22,22,24,24,30,30,36,36,48,50,56,58,64,68,80,84,88,88,92,94},{1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,1,0,1,0,1,1,0,0,0,1,0},{30,55,56},{72,-72,-90,24,-22,60,78,-68,98,26,-30,-20,44,-96,8,90,0,98,-24,-68,-32,-62,0,-60,26,-98},{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},{87,77,44,15,70,89,36,79,82,3,18,76,37,79,85,97,19,53,17,74,87,58,49}}; vector param2 {27,18,30,11,19,24,1,22,42,14}; vector param3 {21,11,31,11,26,17,1,19,40,22}; vector param4 {23,12,42,13,28,23,1,24,42,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 2, 4, 4, 9, 10, 14, 16, 16, 19, 20, 21, 25, 26, 29, 36, 36, 37, 38, 44, 44, 49, 53, 54, 56, 61, 62, 64, 72, 72, 73, 77, 80, 84, 84, 87, 93, 94],[6, 8, 10, 10, 12, 14, 24, 31, 33, 33, 35, 35, 35, 41, 46, 47, 49, 51, 52, 56, 57, 59, 62, 65, 72, 72, 73, 73, 79, 80, 82, 83, 83, 84, 87, 87, 93, 99],27,21,23,), ([2, 4, -90, 62, 22, -94, -74, -22, 44, -94, 20, -40, 20, 0, 32, 24, 78, 8, 4, 98, -74, -60],[58, 74, -46, 38, -58, -78, -32, -84, 84, -54, 84, -34, -26, 88, 74, 48, 26, -92, 68, -86, 74, 88],18,11,12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],30,31,42,), ([85, 44, 62, 2, 71, 88, 60, 78, 32, 46, 17, 47, 65, 78, 65, 94],[18, 3, 15, 9, 61, 73, 3, 62, 87, 1, 54, 97, 61, 37, 23, 65],11,11,13,), ([-94, -84, -82, -70, -70, -60, -54, -54, -52, -52, -46, -40, -40, -36, -34, -32, -30, -22, -18, -16, -10, -4, 8, 12, 18, 22, 32, 38, 38, 44, 50, 56, 64, 82, 84, 86, 88],[-92, -68, -64, -62, -54, -52, -52, -34, -24, -22, -20, -12, -12, -10, 6, 10, 14, 22, 22, 24, 24, 30, 30, 36, 36, 48, 50, 56, 58, 64, 68, 80, 84, 88, 88, 92, 94],19,26,28,), ([0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1],[1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0],24,17,23,), ([53, 96, 99],[30, 55, 56],1,1,1,), ([98, 86, 36, -68, 86, 22, 52, -20, -2, 74, -72, 86, 80, -78, 14, 62, 10, 94, -66, 78, 28, 92, -8, 46, -24, 66],[72, -72, -90, 24, -22, 60, 78, -68, 98, 26, -30, -20, 44, -96, 8, 90, 0, 98, -24, -68, -32, -62, 0, -60, 26, -98],22,19,24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],42,40,42,), ([6, 21, 86, 58, 48, 27, 18, 73, 16, 79, 51, 33, 63, 26, 37, 88, 48, 58, 44, 32, 58, 23, 31],[87, 77, 44, 15, 70, 89, 36, 79, 82, 3, 18, 76, 37, 79, 85, 97, 19, 53, 17, 74, 87, 58, 49],14,22,19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7{ static int f_gold ( String n ) { int k = 0 , pos = 0 , i = 0 ; while ( k != n . length ( ) ) { switch ( n . charAt ( i ) ) { case '4' : pos = pos * 2 + 1 ; break ; case '7' : pos = pos * 2 + 2 ; break ; } i ++ ; k ++ ; } return pos ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""7""); param0.add(""305745689""); param0.add(""444""); param0.add(""4""); param0.add(""2074""); param0.add(""27""); param0.add(""447""); param0.add(""255""); param0.add(""10000111111011""); param0.add(""fAKcSDRTNz""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): i = 0 j = len(n) pos = 0 while (i < j): if (n[i] == '4'): pos = pos * 2 + 1 if (n[i] == '7'): pos = pos * 2 + 2 i = i + 1 return pos "," using namespace std; int f_gold ( string n ) { int i = 0, pos = 0; while ( n [ i ] != '\0' ) { switch ( n [ i ] ) { case '4' : pos = pos * 2 + 1; break; case '7' : pos = pos * 2 + 2; break; } i ++; } return pos; } int main() { int n_success = 0; vector param0 {""7"",""305745689"",""444"",""4"",""2074"",""27"",""447"",""255"",""10000111111011"",""fAKcSDRTNz""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('7',), ('305745689',), ('444',), ('4',), ('2074',), ('27',), ('447',), ('255',), ('10000111111011',), ('fAKcSDRTNz',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT{ static int f_gold ( int n ) { if ( n == 0 ) return 0 ; while ( n != 1 ) { if ( n % 4 != 0 ) return 0 ; n = n / 4 ; } return 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(45); param0.add(16); param0.add(15); param0.add(91); param0.add(82); param0.add(18); param0.add(31); param0.add(6); param0.add(93); param0.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 ) : return False while ( n != 1 ) : if ( n % 4 != 0 ) : return False n = n // 4 return True ",,," if __name__ == '__main__': param = [ (45,), (16,), (15,), (91,), (82,), (18,), (31,), (6,), (93,), (35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", QUICK_WAY_CHECK_CHARACTERS_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class QUICK_WAY_CHECK_CHARACTERS_STRING{ static boolean f_gold ( String s ) { int n = s . length ( ) ; for ( int i = 1 ; i < n ; i ++ ) if ( s . charAt ( i ) != s . charAt ( 0 ) ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""""); param0.add(""ggg""); param0.add(""11""); param0.add(""KoYIHns""); param0.add(""232""); param0.add(""10111000011101""); param0.add(""DDDD""); param0.add(""11""); param0.add(""11111""); param0.add(""ewJvixQzu""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : n = len ( s ) for i in range ( 1 , n ) : if s [ i ] != s [ 0 ] : return False return True "," using namespace std; bool f_gold ( string s ) { int n = s . length ( ); for ( int i = 1; i < n; i ++ ) if ( s [ i ] != s [ 0 ] ) return false; return true; } int main() { int n_success = 0; vector param0 {"""",""ggg"",""11"",""KoYIHns"",""232"",""10111000011101"",""DDDD"",""11"",""11111"",""ewJvixQzu""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('',), ('ggg',), ('11',), ('KoYIHns',), ('232',), ('10111000011101',), ('DDDD',), ('11',), ('11111',), ('ewJvixQzu',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int min = arr [ 0 ] , min_index = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( min > arr [ i ] ) { min = arr [ i ] ; min_index = i ; } } return min_index ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,4,9,10,13,14,15,28,28,41,46,47,48,52,55,62,67,69,73,74,79,79,80,87,90,96,99}); param0.add(new int[]{44,62,-40,62,98,30,16,76,-4,-2,78,-96,78,-72,94,-66,-38,-80,40,78,-26,28,-40,-32,-64,76,26,-2,12,82,16,-46,10,70,-62,-54,-6,58,32,98}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{90,26,71,74,69,47,76,96,42,31,22,17,84,20,8,98,49,87,38,53,28,77,29}); param0.add(new int[]{-64,-56,-10,-10,-6,-2,0,22,78,86,98}); param0.add(new int[]{0,1,1,1,1,0,1}); param0.add(new int[]{2,3,3,5,8,10,11,16,17,26,35,36,38,42,59,73,73,75,75,81,82,82,86,87,88,88,90,95,96,98,98,99}); param0.add(new int[]{-96,70,-32,-46,-26,42,-56,36,-72,96,-54,-12,78,30,58,92,56,22,70,10,42,70,0,-76,58,-70,-66,-32,-30,-22,56,10,18,-90,-40,-92,-70,-30,48,10,32,20,-52}); param0.add(new int[]{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}); param0.add(new int[]{35,52,21,28,96,44,80,56,10,23,48,52,15,55,43,50,6,33,62,55,39,12,31,74,53,34,41,10,52,75,57,78,3}); List param1 = new ArrayList<>(); param1.add(27); param1.add(38); param1.add(11); param1.add(18); param1.add(9); param1.add(5); param1.add(29); param1.add(42); param1.add(28); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int min = arr [ 0 ], min_index; for ( int i = 0; i < n; i ++ ) { if ( min > arr [ i ] ) { min = arr [ i ]; min_index = i; } } return min_index; } int main() { int n_success = 0; vector> param0 {{2,4,4,9,10,13,14,15,28,28,41,46,47,48,52,55,62,67,69,73,74,79,79,80,87,90,96,99},{44,62,-40,62,98,30,16,76,-4,-2,78,-96,78,-72,94,-66,-38,-80,40,78,-26,28,-40,-32,-64,76,26,-2,12,82,16,-46,10,70,-62,-54,-6,58,32,98},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{90,26,71,74,69,47,76,96,42,31,22,17,84,20,8,98,49,87,38,53,28,77,29},{-64,-56,-10,-10,-6,-2,0,22,78,86,98},{0,1,1,1,1,0,1},{2,3,3,5,8,10,11,16,17,26,35,36,38,42,59,73,73,75,75,81,82,82,86,87,88,88,90,95,96,98,98,99},{-96,70,-32,-46,-26,42,-56,36,-72,96,-54,-12,78,30,58,92,56,22,70,10,42,70,0,-76,58,-70,-66,-32,-30,-22,56,10,18,-90,-40,-92,-70,-30,48,10,32,20,-52},{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},{35,52,21,28,96,44,80,56,10,23,48,52,15,55,43,50,6,33,62,55,39,12,31,74,53,34,41,10,52,75,57,78,3}}; vector param1 {27,38,11,18,9,5,29,42,28,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SWAP_ALL_ODD_AND_EVEN_BITS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SWAP_ALL_ODD_AND_EVEN_BITS{ static int f_gold ( int x ) { int even_bits = x & 0xAAAAAAAA ; int odd_bits = x & 0x55555555 ; even_bits >>= 1 ; odd_bits <<= 1 ; return ( even_bits | odd_bits ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(99); param0.add(94); param0.add(11); param0.add(3); param0.add(77); param0.add(57); param0.add(54); param0.add(66); param0.add(98); param0.add(36); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : even_bits = x & 0xAAAAAAAA odd_bits = x & 0x55555555 even_bits >>= 1 odd_bits <<= 1 return ( even_bits | odd_bits ) "," using namespace std; unsigned int f_gold ( unsigned int x ) { unsigned int even_bits = x & 0xAAAAAAAA; unsigned int odd_bits = x & 0x55555555; even_bits >>= 1; odd_bits <<= 1; return ( even_bits | odd_bits ); } int main() { int n_success = 0; vector param0 {99,94,11,3,77,57,54,66,98,36}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (99,), (94,), (11,), (3,), (77,), (57,), (54,), (66,), (98,), (36,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class QUERIES_COUNTS_ARRAY_ELEMENTS_VALUES_GIVEN_RANGE{ static int f_gold ( int arr [ ] , int n , int x , int y ) { int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] >= x && arr [ i ] <= y ) count ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,16,19,24,36,38,42,49,51,53,53,57,57,58,71,78,78,92,92,93}); param0.add(new int[]{28,-74,-18,10,26,28,-96,-80,82,94,22,50,72,-90,76,50,20,-44,-80}); param0.add(new int[]{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}); param0.add(new int[]{25,8,66,90,50,65,76,90,27}); param0.add(new int[]{-98,-96,-90,-82,-80,-78,-70,-66,-60,-60,-50,-48,-34,-26,-24,-16,-14,-8,-6,4,22,24,26,30,30,48,52,56,60,62,74,76,78,86}); param0.add(new int[]{1,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0}); param0.add(new int[]{4,6,17,19,24,29,30,31,32,37,37,40,43,44,44,45,57,64,69,70,73,78,86,89,91,92,94}); param0.add(new int[]{32,-88,70,-6,28,-48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{37,84,97,74,12,26,47,10,14,33}); List param1 = new ArrayList<>(); param1.add(13); param1.add(18); param1.add(30); param1.add(4); param1.add(32); param1.add(15); param1.add(17); param1.add(4); param1.add(13); param1.add(5); List param2 = new ArrayList<>(); param2.add(12); param2.add(13); param2.add(21); param2.add(8); param2.add(24); param2.add(16); param2.add(21); param2.add(3); param2.add(12); param2.add(9); List param3 = new ArrayList<>(); param3.add(13); param3.add(13); param3.add(31); param3.add(5); param3.add(24); param3.add(12); param3.add(15); param3.add(4); param3.add(11); param3.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x , y ) : count = 0 ; for i in range ( n ) : if ( arr [ i ] >= x and arr [ i ] <= y ) : count += 1 return count "," using namespace std; int f_gold ( int arr [ ], int n, int x, int y ) { int count = 0; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] >= x && arr [ i ] <= y ) count ++; } return count; } int main() { int n_success = 0; vector> param0 {{9,16,19,24,36,38,42,49,51,53,53,57,57,58,71,78,78,92,92,93},{28,-74,-18,10,26,28,-96,-80,82,94,22,50,72,-90,76,50,20,-44,-80},{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},{25,8,66,90,50,65,76,90,27},{-98,-96,-90,-82,-80,-78,-70,-66,-60,-60,-50,-48,-34,-26,-24,-16,-14,-8,-6,4,22,24,26,30,30,48,52,56,60,62,74,76,78,86},{1,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0},{4,6,17,19,24,29,30,31,32,37,37,40,43,44,44,45,57,64,69,70,73,78,86,89,91,92,94},{32,-88,70,-6,28,-48},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{37,84,97,74,12,26,47,10,14,33}}; vector param1 {13,18,30,4,32,15,17,4,13,5}; vector param2 {12,13,21,8,24,16,21,3,12,9}; vector param3 {13,13,31,5,24,12,15,4,11,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([9, 16, 19, 24, 36, 38, 42, 49, 51, 53, 53, 57, 57, 58, 71, 78, 78, 92, 92, 93],13,12,13,), ([28, -74, -18, 10, 26, 28, -96, -80, 82, 94, 22, 50, 72, -90, 76, 50, 20, -44, -80],18,13,13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],30,21,31,), ([25, 8, 66, 90, 50, 65, 76, 90, 27],4,8,5,), ([-98, -96, -90, -82, -80, -78, -70, -66, -60, -60, -50, -48, -34, -26, -24, -16, -14, -8, -6, 4, 22, 24, 26, 30, 30, 48, 52, 56, 60, 62, 74, 76, 78, 86],32,24,24,), ([1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0],15,16,12,), ([4, 6, 17, 19, 24, 29, 30, 31, 32, 37, 37, 40, 43, 44, 44, 45, 57, 64, 69, 70, 73, 78, 86, 89, 91, 92, 94],17,21,15,), ([32, -88, 70, -6, 28, -48],4,3,4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,12,11,), ([37, 84, 97, 74, 12, 26, 47, 10, 14, 33],5,9,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND{ static int f_gold ( double h , double m ) { if ( h < 0 || m < 0 || h > 12 || m > 60 ) System . out . println ( ""Wrong input"" ) ; if ( h == 12 ) h = 0 ; if ( m == 60 ) m = 0 ; int hour_angle = ( int ) ( 0.5 * ( h * 60 + m ) ) ; int minute_angle = ( int ) ( 6 * m ) ; int angle = Math . abs ( hour_angle - minute_angle ) ; angle = Math . min ( 360 - angle , angle ) ; return angle ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(7322.337365895532); param0.add(-0.5025472034247969); param0.add(8735.336068205026); param0.add(-5478.862697905712); param0.add(8264.126919165505); param0.add(-9671.311773842834); param0.add(9995.328351000411); param0.add(-5274.574323066984); param0.add(1310.8711644223736); param0.add(-2829.678131972794); List param1 = new ArrayList<>(); param1.add(6996.326968156217); param1.add(-2910.070017192333); param1.add(1910.3752934680874); param1.add(-9470.18148108585); param1.add(7058.937313484608); param1.add(-3867.070379361206); param1.add(2145.339179488316); param1.add(-3583.7503371694124); param1.add(5214.059687285893); param1.add(-9371.556600288217); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( h , m ) : if ( h < 0 or m < 0 or h > 12 or m > 60 ) : print ( 'Wrong input' ) if ( h == 12 ) : h = 0 if ( m == 60 ) : m = 0 hour_angle = 0.5 * ( h * 60 + m ) minute_angle = 6 * m angle = abs ( hour_angle - minute_angle ) angle = min ( 360 - angle , angle ) return angle "," using namespace std; int f_gold ( double h, double m ) { if ( h < 0 || m < 0 || h > 12 || m > 60 ) printf ( ""Wrong input"" ); if ( h == 12 ) h = 0; if ( m == 60 ) m = 0; int hour_angle = 0.5 * ( h * 60 + m ); int minute_angle = 6 * m; int angle = abs ( hour_angle - minute_angle ); angle = min ( 360 - angle, angle ); return angle; } int main() { int n_success = 0; vector param0 {7322.337365895532,-0.5025472034247969,8735.336068205026,-5478.862697905712,8264.126919165505,-9671.311773842834,9995.328351000411,-5274.574323066984,1310.8711644223736,-2829.678131972794}; vector param1 {6996.326968156217,-2910.070017192333,1910.3752934680874,-9470.18148108585,7058.937313484608,-3867.070379361206,2145.339179488316,-3583.7503371694124,5214.059687285893,-9371.556600288217}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (7322.337365895532,6996.326968156217,), (-0.5025472034247969,-2910.070017192333,), (8735.336068205026,1910.3752934680874,), (-5478.862697905712,-9470.18148108585,), (8264.126919165505,7058.937313484608,), (-9671.311773842834,-3867.070379361206,), (9995.328351000411,2145.339179488316,), (-5274.574323066984,-3583.7503371694124,), (1310.8711644223736,5214.059687285893,), (-2829.678131972794,-9371.556600288217,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TRIANGULAR_MATCHSTICK_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TRIANGULAR_MATCHSTICK_NUMBER{ public static int f_gold ( int x ) { return ( 3 * x * ( x + 1 ) ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(6); param0.add(25); param0.add(15); param0.add(30); param0.add(17); param0.add(80); param0.add(27); param0.add(13); param0.add(12); param0.add(67); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : return ( 3 * x * ( x + 1 ) ) / 2 "," using namespace std; int f_gold ( int x ) { return ( 3 * x * ( x + 1 ) ) / 2; } int main() { int n_success = 0; vector param0 {6,25,15,30,17,80,27,13,12,67}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (6,), (25,), (15,), (30,), (17,), (80,), (27,), (13,), (12,), (67,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1{ static boolean f_gold ( int arr [ ] , int n ) { if ( n == 1 ) { return true ; } int i ; for ( i = 1 ; arr [ i - 1 ] < arr [ i ] && i < n ; i ++ ) ; if ( i == n ) { return true ; } int j = i ++ ; while ( arr [ j ] < arr [ j - 1 ] ) { if ( i > 1 && arr [ j ] < arr [ i - 2 ] ) { return false ; } j ++ ; } if ( j == n ) { return true ; } int k = j ; if ( arr [ k ] < arr [ i - 1 ] ) { return false ; } while ( k > 1 && k < n ) { if ( arr [ k ] < arr [ k - 1 ] ) { return false ; } k ++ ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,5,4,3}); param0.add(new int[]{1,2,4,5,3}); param0.add(new int[]{1,1,0,0}); param0.add(new int[]{5,99,40,33,61,4,64,92,28,27,21,35,40,79,10,20,76,87,80,15,57,39,96,98,99,72,72,50,61,39,35,70,27}); param0.add(new int[]{-98,-92,-86,-58,-22,-12,0,26}); param0.add(new int[]{0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0}); param0.add(new int[]{6,10,27,30,40,47,49,55,59,60,68,82,91}); param0.add(new int[]{36,56,-56,94,52,-82,88,-62,70,-94,38,10,-78,66,-94,-72,18,96,-72,88,-6,48,6,-88,64,-96,-40,8,36,36,-90,-68,-20,-76,22,-92}); param0.add(new int[]{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}); param0.add(new int[]{2,5,42,28,47,26,88,16,30,30,36,49,21,95,99,21,41,52,57,39,69,2,42,22,55,92,64,27,95,71,19,38,40,65,7,21,29,38,13,11,41,54,38,40,35,51,88}); List param1 = new ArrayList<>(); param1.add(5); param1.add(5); param1.add(4); param1.add(32); param1.add(6); param1.add(24); param1.add(8); param1.add(30); param1.add(31); param1.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : if ( n == 1 ) : return True i = 1 for i in range ( 1 , n ) : if arr [ i - 1 ] < arr [ i ] : if ( i == n ) : return True j = i while ( arr [ j ] < arr [ j - 1 ] ) : if ( i > 1 and arr [ j ] < arr [ i - 2 ] ) : return False j += 1 if ( j == n ) : return True k = j if ( arr [ k ] < arr [ i - 1 ] ) : return False while ( k > 1 and k < n ) : if ( arr [ k ] < arr [ k - 1 ] ) : return False k += 1 return True "," using namespace std; bool f_gold ( int arr [ ], int n ) { if ( n == 1 ) return true; int i; for ( i = 1; i < n && arr [ i - 1 ] < arr [ i ]; i ++ ); if ( i == n ) return true; int j = i; while ( arr [ j ] < arr [ j - 1 ] ) { if ( i > 1 && arr [ j ] < arr [ i - 2 ] ) return false; j ++; } if ( j == n ) return true; int k = j; if ( arr [ k ] < arr [ i - 1 ] ) return false; while ( k > 1 && k < n ) { if ( arr [ k ] < arr [ k - 1 ] ) return false; k ++; } return true; } int main() { int n_success = 0; vector> param0 { {1,2,5,4,3}, {1,2,4,5,3}, {1,1,0,0}, {5,99,40,33,61,4,64,92,28,27,21,35,40,79,10,20,76,87,80,15,57,39,96,98,99,72,72,50,61,39,35,70,27}, {-98,-92,-86,-58,-22,-12,0,26}, {0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0}, {6,10,27,30,40,47,49,55,59,60,68,82,91}, {36,56,-56,94,52,-82,88,-62,70,-94,38,10,-78,66,-94,-72,18,96,-72,88,-6,48,6,-88,64,-96,-40,8,36,36,-90,-68,-20,-76,22,-92}, {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}, {2,5,42,28,47,26,88,16,30,30,36,49,21,95,99,21,41,52,57,39,69,2,42,22,55,92,64,27,95,71,19,38,40,65,7,21,29,38,13,11,41,54,38,40,35,51,88}}; vector param1 {5,5,4,32,6,24,8,30,31,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1,2,5,4,3],5,), ([1,2,4,5,3],5,), ([1,1,0,0],4,), ([5, 99, 40, 33, 61, 4, 64, 92, 28, 27, 21, 35, 40, 79, 10, 20, 76, 87, 80, 15, 57, 39, 96, 98, 99, 72, 72, 50, 61, 39, 35, 70, 27],32,), ([-98, -92, -86, -58, -22, -12, 0, 26],6,), ([0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0],24,), ([6, 10, 27, 30, 40, 47, 49, 55, 59, 60, 68, 82, 91],8,), ([36, 56, -56, 94, 52, -82, 88, -62, 70, -94, 38, 10, -78, 66, -94, -72, 18, 96, -72, 88, -6, 48, 6, -88, 64, -96, -40, 8, 36, 36, -90, -68, -20, -76, 22, -92],30,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([2, 5, 42, 28, 47, 26, 88, 16, 30, 30, 36, 49, 21, 95, 99, 21, 41, 52, 57, 39, 69, 2, 42, 22, 55, 92, 64, 27, 95, 71, 19, 38, 40, 65, 7, 21, 29, 38, 13, 11, 41, 54, 38, 40, 35, 51, 88],46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", C_PROGRAM_FIND_LARGEST_ELEMENT_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class C_PROGRAM_FIND_LARGEST_ELEMENT_ARRAY_1{ static int f_gold ( int [ ] arr , int n ) { Arrays . sort ( arr ) ; return arr [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{10,12,14,16,17,17,20,24,26,28,37,38,41,45,49,50,59,61,63,65,65,66,69,70,70,73,73,74,81,81,83,87,94,97}); param0.add(new int[]{-56,38,-22,84,-60,2,68,-78,62,-98,24,26,48,62,-80,-14,-84,12,-54,-12,-20,-82,10,-34,-50,-72,78,16,30,-76,72,34,6,52,44,18,-38,48,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{92,5,40,65,86,51,14,29,66,6,62,92,29,13,88,54,15,60,45,2,51,9,33,51,31,11,62,61,77,38,11,4,27,54,72,64,85,46,24,44,39,73,82,85}); param0.add(new int[]{-92,-90,-84,-80,-80,-76,-70,-70,-48,-44,-38,-28,-14,-14,-12,-2,2,4,6,10,16,16,20,22,24,26,50,52,56,56,58,58,74,80,82,84,86}); param0.add(new int[]{0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,1,0}); param0.add(new int[]{5,19,20,26,31,32,34,37,39,40,46,46,50,53,58,58,59,65,72,72,75,76,77,78,81,83,83,95,98,99}); param0.add(new int[]{32,-84,-84,86,-24,36,-12,82,48,-12,82,-76,84,-20,-12,-18,46,-74,-14,-86}); param0.add(new int[]{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}); param0.add(new int[]{95,73,74,14,73,74,19,93,34,53,85,75,80,15,36,57,15,98,51,37,8,9,62,71,28,24,37,53,84,76,22,48,15,19,43,88,58,38,63,68,27,22,37,76,59,66,22}); List param1 = new ArrayList<>(); param1.add(17); param1.add(25); param1.add(11); param1.add(40); param1.add(33); param1.add(29); param1.add(28); param1.add(14); param1.add(33); param1.add(34); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : return max ( arr ) "," using namespace std; int f_gold ( int arr [ ], int n ) { return * max_element ( arr, arr + n ); } int main() { int n_success = 0; vector> param0 {{10,12,14,16,17,17,20,24,26,28,37,38,41,45,49,50,59,61,63,65,65,66,69,70,70,73,73,74,81,81,83,87,94,97},{-56,38,-22,84,-60,2,68,-78,62,-98,24,26,48,62,-80,-14,-84,12,-54,-12,-20,-82,10,-34,-50,-72,78,16,30,-76,72,34,6,52,44,18,-38,48,-14},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{92,5,40,65,86,51,14,29,66,6,62,92,29,13,88,54,15,60,45,2,51,9,33,51,31,11,62,61,77,38,11,4,27,54,72,64,85,46,24,44,39,73,82,85},{-92,-90,-84,-80,-80,-76,-70,-70,-48,-44,-38,-28,-14,-14,-12,-2,2,4,6,10,16,16,20,22,24,26,50,52,56,56,58,58,74,80,82,84,86},{0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,1,0},{5,19,20,26,31,32,34,37,39,40,46,46,50,53,58,58,59,65,72,72,75,76,77,78,81,83,83,95,98,99},{32,-84,-84,86,-24,36,-12,82,48,-12,82,-76,84,-20,-12,-18,46,-74,-14,-86},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{95,73,74,14,73,74,19,93,34,53,85,75,80,15,36,57,15,98,51,37,8,9,62,71,28,24,37,53,84,76,22,48,15,19,43,88,58,38,63,68,27,22,37,76,59,66,22}}; vector param1 {17,25,11,40,33,29,28,14,33,34}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([10, 12, 14, 16, 17, 17, 20, 24, 26, 28, 37, 38, 41, 45, 49, 50, 59, 61, 63, 65, 65, 66, 69, 70, 70, 73, 73, 74, 81, 81, 83, 87, 94, 97],17,), ([-56, 38, -22, 84, -60, 2, 68, -78, 62, -98, 24, 26, 48, 62, -80, -14, -84, 12, -54, -12, -20, -82, 10, -34, -50, -72, 78, 16, 30, -76, 72, 34, 6, 52, 44, 18, -38, 48, -14],25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],11,), ([92, 5, 40, 65, 86, 51, 14, 29, 66, 6, 62, 92, 29, 13, 88, 54, 15, 60, 45, 2, 51, 9, 33, 51, 31, 11, 62, 61, 77, 38, 11, 4, 27, 54, 72, 64, 85, 46, 24, 44, 39, 73, 82, 85],40,), ([-92, -90, -84, -80, -80, -76, -70, -70, -48, -44, -38, -28, -14, -14, -12, -2, 2, 4, 6, 10, 16, 16, 20, 22, 24, 26, 50, 52, 56, 56, 58, 58, 74, 80, 82, 84, 86],33,), ([0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0],29,), ([5, 19, 20, 26, 31, 32, 34, 37, 39, 40, 46, 46, 50, 53, 58, 58, 59, 65, 72, 72, 75, 76, 77, 78, 81, 83, 83, 95, 98, 99],28,), ([32, -84, -84, 86, -24, 36, -12, 82, 48, -12, 82, -76, 84, -20, -12, -18, 46, -74, -14, -86],14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],33,), ([95, 73, 74, 14, 73, 74, 19, 93, 34, 53, 85, 75, 80, 15, 36, 57, 15, 98, 51, 37, 8, 9, 62, 71, 28, 24, 37, 53, 84, 76, 22, 48, 15, 19, 43, 88, 58, 38, 63, 68, 27, 22, 37, 76, 59, 66, 22],34,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR{ static int f_gold ( int num , int divisor ) { return ( num - divisor * ( num / divisor ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(80); param0.add(63); param0.add(1); param0.add(22); param0.add(66); param0.add(61); param0.add(45); param0.add(29); param0.add(95); param0.add(9); List param1 = new ArrayList<>(); param1.add(54); param1.add(21); param1.add(56); param1.add(39); param1.add(7); param1.add(67); param1.add(63); param1.add(44); param1.add(65); param1.add(68); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num , divisor ) : return ( num - divisor * ( num // divisor ) ) "," using namespace std; int f_gold ( int num, int divisor ) { return ( num - divisor * ( num / divisor ) ); } int main() { int n_success = 0; vector param0 {80,63,1,22,66,61,45,29,95,9}; vector param1 {54,21,56,39,7,67,63,44,65,68}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (80,54,), (63,21,), (1,56,), (22,39,), (66,7,), (61,67,), (45,63,), (29,44,), (95,65,), (9,68,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_INCREASING_SUBSEQUENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_INCREASING_SUBSEQUENCE_1{ static int f_gold ( int arr [ ] , int n ) { int f_gold [ ] = new int [ n ] ; int i , j , max = 0 ; for ( i = 0 ; i < n ; i ++ ) f_gold [ i ] = 1 ; for ( i = 1 ; i < n ; i ++ ) for ( j = 0 ; j < i ; j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1 ; for ( i = 0 ; i < n ; i ++ ) if ( max < f_gold [ i ] ) max = f_gold [ i ] ; return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{14,17,27,28,36,38,40,49,51,57,58,61,62,71,91,94,99}); param0.add(new int[]{-48,54,98,68,24,-46,4,-28,-34,40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{94,74,27,59,3,71,67,91,91,87,1,79,42,33,85,37,76,86,80,84,62,8,31,54,17,48,4,12,88,63,12,51,36,20,73,48,41,88,21,98,57,3,54}); param0.add(new int[]{-96,-94,-90,-88,-86,-82,-76,-74,-68,-54,-54,-50,-50,-46,-46,-40,-36,-34,-34,-32,-30,-26,-26,-20,-16,-6,-4,2,10,14,22,26,26,28,28,30,30,36,54,64,68,74,78,80,84,90,92,94}); param0.add(new int[]{0,0,0,0,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,1,0,0,1,0,0}); param0.add(new int[]{6,12,18,34,37,37,37,40,45,60,64,66,73,78,79,80,92}); param0.add(new int[]{64,-18,-22,96,-92,6,-46,-54,76,0,46,74,-8,22,-46,-44,-94,-88,-52,-54,2,98,-22,46,26,2,-64,-84,20,22,12,-32,-16,-96,46,-4,-8,46,-64,-58,58,92,0,-26,-58,82}); param0.add(new int[]{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}); param0.add(new int[]{57,34,3,67,21,69,31,49,7,70,27,53,94,23,74,24,44,53,78,46,6,29,5,41,38,22,40,38,40,59,9}); List param1 = new ArrayList<>(); param1.add(14); param1.add(8); param1.add(17); param1.add(24); param1.add(36); param1.add(34); param1.add(11); param1.add(24); param1.add(33); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int f_gold [ n ]; f_gold [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { f_gold [ i ] = 1; for ( int j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1; } return * max_element ( f_gold, f_gold + n ); } int main() { int n_success = 0; vector> param0 {{14,17,27,28,36,38,40,49,51,57,58,61,62,71,91,94,99},{-48,54,98,68,24,-46,4,-28,-34,40},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{94,74,27,59,3,71,67,91,91,87,1,79,42,33,85,37,76,86,80,84,62,8,31,54,17,48,4,12,88,63,12,51,36,20,73,48,41,88,21,98,57,3,54},{-96,-94,-90,-88,-86,-82,-76,-74,-68,-54,-54,-50,-50,-46,-46,-40,-36,-34,-34,-32,-30,-26,-26,-20,-16,-6,-4,2,10,14,22,26,26,28,28,30,30,36,54,64,68,74,78,80,84,90,92,94},{0,0,0,0,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,1,0,0,1,0,0},{6,12,18,34,37,37,37,40,45,60,64,66,73,78,79,80,92},{64,-18,-22,96,-92,6,-46,-54,76,0,46,74,-8,22,-46,-44,-94,-88,-52,-54,2,98,-22,46,26,2,-64,-84,20,22,12,-32,-16,-96,46,-4,-8,46,-64,-58,58,92,0,-26,-58,82},{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},{57,34,3,67,21,69,31,49,7,70,27,53,94,23,74,24,44,53,78,46,6,29,5,41,38,22,40,38,40,59,9}}; vector param1 {14,8,17,24,36,34,11,24,33,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, CONSTRUCT_LEXICOGRAPHICALLY_SMALLEST_PALINDROME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CONSTRUCT_LEXICOGRAPHICALLY_SMALLEST_PALINDROME{ static String f_gold ( char [ ] str , int len ) { int i = 0 , j = len - 1 ; for ( ; i < j ; i ++ , j -- ) { if ( str [ i ] == str [ j ] && str [ i ] != '*' ) continue ; else if ( str [ i ] == str [ j ] && str [ i ] == '*' ) { str [ i ] = 'a' ; str [ j ] = 'a' ; continue ; } else if ( str [ i ] == '*' ) { str [ i ] = str [ j ] ; continue ; } else if ( str [ j ] == '*' ) { str [ j ] = str [ i ] ; continue ; } System . out . println ( ""Not Possible"" ) ; return """" ; } return String . valueOf ( str ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'A','B','C','G','I','L','L','O','O','P','Q','S','W','Y','c','d','e','f','f','i','m','m','o','q','v','w','x','x','y','z'}); param0.add(new char[]{'3','2','3','6','8','9','0','5','0','5','8','7','9','0','3','6','9','6','2','4','2','3','1','2','7','9','1','8','8','7','1','1','6','1'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','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'}); param0.add(new char[]{'z','v','B','Y','n','K','h','C','T','L','g'}); param0.add(new char[]{'1','2','5','6','7'}); param0.add(new char[]{'0','0','1','0'}); param0.add(new char[]{'D','n','r'}); param0.add(new char[]{'0','9','9','1','2','1','5','3','7','5','9','2','4','4','8','9','6','4','2','8','8','5','5','7','1','7','6','2','2','2','3','3','7','9'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'E','s','I','S','h','H','i','m','v','B'}); List param1 = new ArrayList<>(); param1.add(27); param1.add(30); param1.add(27); param1.add(7); param1.add(4); param1.add(3); param1.add(1); param1.add(24); param1.add(21); param1.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( string , l ) : string = list ( string ) i = - 1 j = l while i < j : i += 1 j -= 1 if ( string [ i ] == string [ j ] and string [ i ] != '*' ) : continue elif ( string [ i ] == string [ j ] and string [ i ] == '*' ) : string [ i ] = 'a' string [ j ] = 'a' continue elif string [ i ] == '*' : string [ i ] = string [ j ] continue elif string [ j ] == '*' : string [ j ] = string [ i ] continue print ( ""Not Possible"" ) return """" return ''.join ( string ) ",,," if __name__ == '__main__': param = [ (['A', 'B', 'C', 'G', 'I', 'L', 'L', 'O', 'O', 'P', 'Q', 'S', 'W', 'Y', 'c', 'd', 'e', 'f', 'f', 'i', 'm', 'm', 'o', 'q', 'v', 'w', 'x', 'x', 'y', 'z'],27,), (['3', '2', '3', '6', '8', '9', '0', '5', '0', '5', '8', '7', '9', '0', '3', '6', '9', '6', '2', '4', '2', '3', '1', '2', '7', '9', '1', '8', '8', '7', '1', '1', '6', '1'],30,), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],27,), (['z', 'v', 'B', 'Y', 'n', 'K', 'h', 'C', 'T', 'L', 'g'],7,), (['1', '2', '5', '6', '7'],4,), (['0', '0', '1', '0'],3,), (['D', 'n', 'r'],1,), (['0', '9', '9', '1', '2', '1', '5', '3', '7', '5', '9', '2', '4', '4', '8', '9', '6', '4', '2', '8', '8', '5', '5', '7', '1', '7', '6', '2', '2', '2', '3', '3', '7', '9'],24,), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],21,), (['E', 's', 'I', 'S', 'h', 'H', 'i', 'm', 'v', 'B'],6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE{ public static void f_gold ( int arr [ ] , int n ) { int max_idx = n - 1 , min_idx = 0 ; int max_elem = arr [ n - 1 ] + 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 0 ) { arr [ i ] += ( arr [ max_idx ] % max_elem ) * max_elem ; max_idx -- ; } else { arr [ i ] += ( arr [ min_idx ] % max_elem ) * max_elem ; min_idx ++ ; } } for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = arr [ i ] / max_elem ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,2,3,9,10,14,22,26,28,29,29,30,32,32,32,34,37,39,40,42,42,42,43,45,47,49,52,53,54,56,58,59,68,71,73,76,81,81,83,84,91,94}); param0.add(new int[]{50,46,6,-57,67,34,-52,26,-93,97,-84,29,15,-63,65,25,-19,92,-38,-28,89,25,61,-34,-70,-80,88,-18,7,52,32,-63,32,-23,-11,46,-12,94,76,-67,-42}); param0.add(new int[]{0,0,0,0,0,0,1,1,1}); param0.add(new int[]{15,99,57,69,22,64,41,87,71,56,23,25,91,6,34,63,9,60,49,97,51,60,70,37,31,98,41,62,93,58,14,36,36,79,8,26,36,48,85,28,68,62,80,86,76,80,51}); param0.add(new int[]{-99,-99,-90,-90,-85,-85,-79,-77,-72,-71,-67,-66,-61,-39,-39,-35,-35,-23,-20,-18,-16,-13,-2,1,5,6,10,24,27,32,33,38,48,67,70,76,82,88}); param0.add(new int[]{0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0}); param0.add(new int[]{2,22,32,34,43,66,70,74,94,94}); param0.add(new int[]{-99,-28,76,-50,41,-85,-47,72,-92,-26,-54,-31,14,47,66,23}); param0.add(new int[]{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}); param0.add(new int[]{19,31,26,42,41,23,47,13,89,66,66,16,73,28,77,35,41,77,31,85,32,54,98,72,59}); List param1 = new ArrayList<>(); param1.add(29); param1.add(38); param1.add(4); param1.add(30); param1.add(34); param1.add(33); param1.add(6); param1.add(10); param1.add(42); param1.add(20); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{1,1,2,3,9,10,14,22,26,28,29,29,30,32,32,32,34,37,39,40,42,42,42,43,45,47,49,52,53,54,56,58,59,68,71,73,76,81,81,83,84,91,94}); filled_function_param0.add(new int[]{50,46,6,-57,67,34,-52,26,-93,97,-84,29,15,-63,65,25,-19,92,-38,-28,89,25,61,-34,-70,-80,88,-18,7,52,32,-63,32,-23,-11,46,-12,94,76,-67,-42}); filled_function_param0.add(new int[]{0,0,0,0,0,0,1,1,1}); filled_function_param0.add(new int[]{15,99,57,69,22,64,41,87,71,56,23,25,91,6,34,63,9,60,49,97,51,60,70,37,31,98,41,62,93,58,14,36,36,79,8,26,36,48,85,28,68,62,80,86,76,80,51}); filled_function_param0.add(new int[]{-99,-99,-90,-90,-85,-85,-79,-77,-72,-71,-67,-66,-61,-39,-39,-35,-35,-23,-20,-18,-16,-13,-2,1,5,6,10,24,27,32,33,38,48,67,70,76,82,88}); filled_function_param0.add(new int[]{0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0}); filled_function_param0.add(new int[]{2,22,32,34,43,66,70,74,94,94}); filled_function_param0.add(new int[]{-99,-28,76,-50,41,-85,-47,72,-92,-26,-54,-31,14,47,66,23}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{19,31,26,42,41,23,47,13,89,66,66,16,73,28,77,35,41,77,31,85,32,54,98,72,59}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(29); filled_function_param1.add(38); filled_function_param1.add(4); filled_function_param1.add(30); filled_function_param1.add(34); filled_function_param1.add(33); filled_function_param1.add(6); filled_function_param1.add(10); filled_function_param1.add(42); filled_function_param1.add(20); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : max_idx = n - 1 min_idx = 0 max_elem = arr [ n - 1 ] + 1 for i in range ( 0 , n ) : if i % 2 == 0 : arr [ i ] += ( arr [ max_idx ] % max_elem ) * max_elem max_idx -= 1 else : arr [ i ] += ( arr [ min_idx ] % max_elem ) * max_elem min_idx += 1 for i in range ( 0 , n ) : arr [ i ] = arr [ i ] / max_elem "," using namespace std; void f_gold ( int arr [ ], int n ) { int max_idx = n - 1, min_idx = 0; int max_elem = arr [ n - 1 ] + 1; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) { arr [ i ] += ( arr [ max_idx ] % max_elem ) * max_elem; max_idx --; } else { arr [ i ] += ( arr [ min_idx ] % max_elem ) * max_elem; min_idx ++; } } for ( int i = 0; i < n; i ++ ) arr [ i ] = arr [ i ] / max_elem; } int main() { int n_success = 0; vector> param0 {{1,1,2,3,9,10,14,22,26,28,29,29,30,32,32,32,34,37,39,40,42,42,42,43,45,47,49,52,53,54,56,58,59,68,71,73,76,81,81,83,84,91,94},{50,46,6,-57,67,34,-52,26,-93,97,-84,29,15,-63,65,25,-19,92,-38,-28,89,25,61,-34,-70,-80,88,-18,7,52,32,-63,32,-23,-11,46,-12,94,76,-67,-42},{0,0,0,0,0,0,1,1,1},{15,99,57,69,22,64,41,87,71,56,23,25,91,6,34,63,9,60,49,97,51,60,70,37,31,98,41,62,93,58,14,36,36,79,8,26,36,48,85,28,68,62,80,86,76,80,51},{-99,-99,-90,-90,-85,-85,-79,-77,-72,-71,-67,-66,-61,-39,-39,-35,-35,-23,-20,-18,-16,-13,-2,1,5,6,10,24,27,32,33,38,48,67,70,76,82,88},{0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0},{2,22,32,34,43,66,70,74,94,94},{-99,-28,76,-50,41,-85,-47,72,-92,-26,-54,-31,14,47,66,23},{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},{19,31,26,42,41,23,47,13,89,66,66,16,73,28,77,35,41,77,31,85,32,54,98,72,59}}; vector param1 {29,38,4,30,34,33,6,10,42,20}; vector> filled_function_param0 {{1,1,2,3,9,10,14,22,26,28,29,29,30,32,32,32,34,37,39,40,42,42,42,43,45,47,49,52,53,54,56,58,59,68,71,73,76,81,81,83,84,91,94},{50,46,6,-57,67,34,-52,26,-93,97,-84,29,15,-63,65,25,-19,92,-38,-28,89,25,61,-34,-70,-80,88,-18,7,52,32,-63,32,-23,-11,46,-12,94,76,-67,-42},{0,0,0,0,0,0,1,1,1},{15,99,57,69,22,64,41,87,71,56,23,25,91,6,34,63,9,60,49,97,51,60,70,37,31,98,41,62,93,58,14,36,36,79,8,26,36,48,85,28,68,62,80,86,76,80,51},{-99,-99,-90,-90,-85,-85,-79,-77,-72,-71,-67,-66,-61,-39,-39,-35,-35,-23,-20,-18,-16,-13,-2,1,5,6,10,24,27,32,33,38,48,67,70,76,82,88},{0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,0,1,0},{2,22,32,34,43,66,70,74,94,94},{-99,-28,76,-50,41,-85,-47,72,-92,-26,-54,-31,14,47,66,23},{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},{19,31,26,42,41,23,47,13,89,66,66,16,73,28,77,35,41,77,31,85,32,54,98,72,59}}; vector filled_function_param1 {29,38,4,30,34,33,6,10,42,20}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 1, 2, 3, 9, 10, 14, 22, 26, 28, 29, 29, 30, 32, 32, 32, 34, 37, 39, 40, 42, 42, 42, 43, 45, 47, 49, 52, 53, 54, 56, 58, 59, 68, 71, 73, 76, 81, 81, 83, 84, 91, 94],29,), ([50, 46, 6, -57, 67, 34, -52, 26, -93, 97, -84, 29, 15, -63, 65, 25, -19, 92, -38, -28, 89, 25, 61, -34, -70, -80, 88, -18, 7, 52, 32, -63, 32, -23, -11, 46, -12, 94, 76, -67, -42],38,), ([0, 0, 0, 0, 0, 0, 1, 1, 1],4,), ([15, 99, 57, 69, 22, 64, 41, 87, 71, 56, 23, 25, 91, 6, 34, 63, 9, 60, 49, 97, 51, 60, 70, 37, 31, 98, 41, 62, 93, 58, 14, 36, 36, 79, 8, 26, 36, 48, 85, 28, 68, 62, 80, 86, 76, 80, 51],30,), ([-99, -99, -90, -90, -85, -85, -79, -77, -72, -71, -67, -66, -61, -39, -39, -35, -35, -23, -20, -18, -16, -13, -2, 1, 5, 6, 10, 24, 27, 32, 33, 38, 48, 67, 70, 76, 82, 88],34,), ([0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0],33,), ([2, 22, 32, 34, 43, 66, 70, 74, 94, 94],6,), ([-99, -28, 76, -50, 41, -85, -47, 72, -92, -26, -54, -31, 14, 47, 66, 23],10,), ([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],42,), ([19, 31, 26, 42, 41, 23, 47, 13, 89, 66, 66, 16, 73, 28, 77, 35, 41, 77, 31, 85, 32, 54, 98, 72, 59],20,) ] filled_function_param = [ ([1, 1, 2, 3, 9, 10, 14, 22, 26, 28, 29, 29, 30, 32, 32, 32, 34, 37, 39, 40, 42, 42, 42, 43, 45, 47, 49, 52, 53, 54, 56, 58, 59, 68, 71, 73, 76, 81, 81, 83, 84, 91, 94],29,), ([50, 46, 6, -57, 67, 34, -52, 26, -93, 97, -84, 29, 15, -63, 65, 25, -19, 92, -38, -28, 89, 25, 61, -34, -70, -80, 88, -18, 7, 52, 32, -63, 32, -23, -11, 46, -12, 94, 76, -67, -42],38,), ([0, 0, 0, 0, 0, 0, 1, 1, 1],4,), ([15, 99, 57, 69, 22, 64, 41, 87, 71, 56, 23, 25, 91, 6, 34, 63, 9, 60, 49, 97, 51, 60, 70, 37, 31, 98, 41, 62, 93, 58, 14, 36, 36, 79, 8, 26, 36, 48, 85, 28, 68, 62, 80, 86, 76, 80, 51],30,), ([-99, -99, -90, -90, -85, -85, -79, -77, -72, -71, -67, -66, -61, -39, -39, -35, -35, -23, -20, -18, -16, -13, -2, 1, 5, 6, 10, 24, 27, 32, 33, 38, 48, 67, 70, 76, 82, 88],34,), ([0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0],33,), ([2, 22, 32, 34, 43, 66, 70, 74, 94, 94],6,), ([-99, -28, 76, -50, 41, -85, -47, 72, -92, -26, -54, -31, 14, 47, 66, 23],10,), ([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],42,), ([19, 31, 26, 42, 41, 23, 47, 13, 89, 66, 66, 16, 73, 28, 77, 35, 41, 77, 31, 85, 32, 54, 98, 72, 59],20,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HORNERS_METHOD_POLYNOMIAL_EVALUATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HORNERS_METHOD_POLYNOMIAL_EVALUATION{ static int f_gold ( int poly [ ] , int n , int x ) { int result = poly [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) result = result * x + poly [ i ] ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,18,22,27,31,33,36,36,37,37,40,48,49,49,50,58,66,71,75,85,89,91}); param0.add(new int[]{42,-88,28,8,30,-8,-16,86,50,84,12,-20,-70,-40,-54,-76,84,90,-40,-68,-40,36,-34,14,94,-44,70,58,-48,-72,14,-70,32}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{66,72,27,72,71,75,94,49,47,21,21,71,84,61,14,20,5,31,62,12,56,56,12,66,26,68,30,98,20}); param0.add(new int[]{-96,-96,-94,-82,-72,-54,-54,-46,-34,-30,-28,-18,-2,2,6,8,10,16,18,24,26,28,44,48,48,52,56,58,58,70,70,82,84,88,94}); param0.add(new int[]{0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1}); param0.add(new int[]{2,3,8,13,15,17,18,18,25,29,29,31,36,37,42,42,42,51,52,52,54,54,58,64,70,70,74,75,78,80,83,85,86,88,95,96,97,98,99}); param0.add(new int[]{-56,-12,-92,-48,-98,-80,-96,-42,-50,74,88,20,78,-74,-20,-32,-30,58,-22,-16,68,72,-50,-72,66,72,74,-98,-22,-40,-90,88,42,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{86,62,30,27,98,75,93,37,70,16,20,74,46,74,25,59,86,32,17,90,80,10,17}); List param1 = new ArrayList<>(); param1.add(16); param1.add(31); param1.add(10); param1.add(15); param1.add(25); param1.add(20); param1.add(19); param1.add(29); param1.add(20); param1.add(12); List param2 = new ArrayList<>(); param2.add(16); param2.add(20); param2.add(8); param2.add(26); param2.add(34); param2.add(25); param2.add(32); param2.add(23); param2.add(23); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( poly , n , x ) : result = poly [ 0 ] for i in range ( 1 , n ) : result = result * x + poly [ i ] return result "," using namespace std; int f_gold ( int poly [ ], int n, int x ) { int result = poly [ 0 ]; for ( int i = 1; i < n; i ++ ) result = result * x + poly [ i ]; return result; } int main() { int n_success = 0; vector> param0 {{3,18,22,27,31,33,36,36,37,37,40,48,49,49,50,58,66,71,75,85,89,91},{42,-88,28,8,30,-8,-16,86,50,84,12,-20,-70,-40,-54,-76,84,90,-40,-68,-40,36,-34,14,94,-44,70,58,-48,-72,14,-70,32},{0,0,0,0,0,0,0,1,1,1,1},{66,72,27,72,71,75,94,49,47,21,21,71,84,61,14,20,5,31,62,12,56,56,12,66,26,68,30,98,20},{-96,-96,-94,-82,-72,-54,-54,-46,-34,-30,-28,-18,-2,2,6,8,10,16,18,24,26,28,44,48,48,52,56,58,58,70,70,82,84,88,94},{0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1},{2,3,8,13,15,17,18,18,25,29,29,31,36,37,42,42,42,51,52,52,54,54,58,64,70,70,74,75,78,80,83,85,86,88,95,96,97,98,99},{-56,-12,-92,-48,-98,-80,-96,-42,-50,74,88,20,78,-74,-20,-32,-30,58,-22,-16,68,72,-50,-72,66,72,74,-98,-22,-40,-90,88,42,24},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{86,62,30,27,98,75,93,37,70,16,20,74,46,74,25,59,86,32,17,90,80,10,17}}; vector param1 {16,31,10,15,25,20,19,29,20,12}; vector param2 {16,20,8,26,34,25,32,23,23,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 18, 22, 27, 31, 33, 36, 36, 37, 37, 40, 48, 49, 49, 50, 58, 66, 71, 75, 85, 89, 91],16,16,), ([42, -88, 28, 8, 30, -8, -16, 86, 50, 84, 12, -20, -70, -40, -54, -76, 84, 90, -40, -68, -40, 36, -34, 14, 94, -44, 70, 58, -48, -72, 14, -70, 32],31,20,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],10,8,), ([66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20],15,26,), ([-96, -96, -94, -82, -72, -54, -54, -46, -34, -30, -28, -18, -2, 2, 6, 8, 10, 16, 18, 24, 26, 28, 44, 48, 48, 52, 56, 58, 58, 70, 70, 82, 84, 88, 94],25,34,), ([0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1],20,25,), ([2, 3, 8, 13, 15, 17, 18, 18, 25, 29, 29, 31, 36, 37, 42, 42, 42, 51, 52, 52, 54, 54, 58, 64, 70, 70, 74, 75, 78, 80, 83, 85, 86, 88, 95, 96, 97, 98, 99],19,32,), ([-56, -12, -92, -48, -98, -80, -96, -42, -50, 74, 88, 20, 78, -74, -20, -32, -30, 58, -22, -16, 68, 72, -50, -72, 66, 72, 74, -98, -22, -40, -90, 88, 42, 24],29,23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],20,23,), ([86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17],12,12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PAIR_WITH_GIVEN_PRODUCT_SET_1_FIND_IF_ANY_PAIR_EXISTS{ static boolean f_gold ( int arr [ ] , int n , int x ) { for ( int i = 0 ; i < n - 1 ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) if ( arr [ i ] * arr [ j ] == x ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{10, 20, 9, 40}); param0.add(new int[]{1,-10, 20, 9, -40}); param0.add(new int[]{0,0,0,0,0,1,1,1,1}); param0.add(new int[]{4,10, 20, 9, -40}); param0.add(new int[]{-90,-86,-76,-72,-70,-62,-56,-50,-18,-12,-10,4,16,26,42,48,52,54,54,70,84,86,88,98}); param0.add(new int[]{1}); param0.add(new int[]{4,7,14,14,16,18,19,20,22,24,29,38,38,38,40,40,46,46,47,51,51,52,55,56,56,62,62,62,78,79,81,84,86,88,89,89,89}); param0.add(new int[]{72,80,-82,24,-98,90,-32,-56,-22,8,-12,8,-78,60,-62,50,12,-60,10,-54,74,98,26,56,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{93,40,48,99,95,59,43,58,79,70,28}); List param1 = new ArrayList<>(); param1.add(4); param1.add(5); param1.add(7); param1.add(5); param1.add(23); param1.add(0); param1.add(23); param1.add(21); param1.add(22); param1.add(9); List param2 = new ArrayList<>(); param2.add(400); param2.add(400); param2.add(8); param2.add(-400); param2.add(23); param2.add(0); param2.add(32); param2.add(19); param2.add(18); param2.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( arr , n , x ) : for i in arr : for j in arr : if i * j == x : return True return False "," using namespace std; bool f_gold ( int arr [ ], int n, int x ) { for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; i < n; i ++ ) if ( arr [ i ] * arr [ j ] == x ) return true; return false; } int main() { int n_success = 0; vector> param0 {{3,4,5,5,6,11,18,29,29,30,35,36,38,38,40,43,43,43,50,53,58,61,62,63,64,64,65,72,73,77,78,78,84,90,94,96},{-72,16,0,68,-58,58,46,38,-28,-56,-28,-14,-56,40,30,80,94,-52,0,-88,8,-96,-52,-96,48,-10,-32,-74,88,18,70},{0,0,0,0,0,1,1,1,1},{78,49,30,28,71,70,29,43,91,56,51,47,21,57,69,28,68,78,38,31,35,33,55,18,88,15,69,7,51,75,8,64,6,84,79,23,62,10,71,52,77},{-90,-86,-76,-72,-70,-62,-56,-50,-18,-12,-10,4,16,26,42,48,52,54,54,70,84,86,88,98},{1},{4,7,14,14,16,18,19,20,22,24,29,38,38,38,40,40,46,46,47,51,51,52,55,56,56,62,62,62,78,79,81,84,86,88,89,89,89},{72,80,-82,24,-98,90,-32,-56,-22,8,-12,8,-78,60,-62,50,12,-60,10,-54,74,98,26,56,24},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{93,40,48,99,95,59,43,58,79,70,28}}; vector param1 {28,25,7,35,23,0,23,21,22,9}; vector param2 {26,16,8,25,23,0,32,19,18,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([10, 20, 9, 40],4,400,), ([1,-10, 20, 9, -40],5,400,), ([0,0,0,0,0,1,1,1,1],7,8,), ([4,10, 20, 9, -40],5,-400,), ([-90,-86,-76,-72,-70,-62,-56,-50,-18,-12,-10,4,16,26,42,48,52,54,54,70,84,86,88,98],23,23,), ([1],0,0,), ([4,7,14,14,16,18,19,20,22,24,29,38,38,38,40,40,46,46,47,51,51,52,55,56,56,62,62,62,78,79,81,84,86,88,89,89,89],23,32,), ([72,80,-82,24,-98,90,-32,-56,-22,8,-12,8,-78,60,-62,50,12,-60,10,-54,74,98,26,56,24],21,19,), ([0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1],22,18,), ([93,40,48,99,95,59,43,58,79,70,28],9,5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_LAST_DIGIT_FACTORIAL_DIVIDES_FACTORIAL_B{ static int f_gold ( long A , long B ) { int variable = 1 ; if ( A == B ) return 1 ; else if ( ( B - A ) >= 5 ) return 0 ; else { for ( long i = A + 1 ; i <= B ; i ++ ) variable = ( int ) ( variable * ( i % 10 ) ) % 10 ; return variable % 10 ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(79L); param0.add(61L); param0.add(39L); param0.add(39L); param0.add(61L); param0.add(86L); param0.add(7L); param0.add(86L); param0.add(86L); param0.add(11L); List param1 = new ArrayList<>(); param1.add(84L); param1.add(29L); param1.add(77L); param1.add(65L); param1.add(78L); param1.add(73L); param1.add(92L); param1.add(50L); param1.add(63L); param1.add(2L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , B ) : variable = 1 if ( A == B ) : return 1 elif ( ( B - A ) >= 5 ) : return 0 else : for i in range ( A + 1 , B + 1 ) : variable = ( variable * ( i % 10 ) ) % 10 return variable % 10 "," using namespace std; int f_gold ( long long int A, long long int B ) { int variable = 1; if ( A == B ) return 1; else if ( ( B - A ) >= 5 ) return 0; else { for ( long long int i = A + 1; i <= B; i ++ ) variable = ( variable * ( i % 10 ) ) % 10; return variable % 10; } } int main() { int n_success = 0; vector param0 {79,61,39,39,61,86,7,86,86,11}; vector param1 {84,29,77,65,78,73,92,50,63,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (79,84,), (61,29,), (39,77,), (39,65,), (61,78,), (86,73,), (7,92,), (86,50,), (86,63,), (11,2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES{ static int f_gold ( int s ) { int sum = 0 ; for ( int n = 1 ; sum < s ; n ++ ) { sum += n * n ; if ( sum == s ) return n ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(5); param0.add(14); param0.add(140); param0.add(204); param0.add(3); param0.add(506); param0.add(42); param0.add(4); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : _sum = 0 n = 1 while ( _sum < s ) : _sum += n * n n += 1 n -= 1 if _sum == s : return n return - 1 "," using namespace std; int f_gold ( int s ) { int sum = 0; for ( int n = 1; sum < s; n ++ ) { sum += n * n; if ( sum == s ) return n; } return - 1; } int main() { int n_success = 0; vector param0 {1,5,14,140,204,3,506,42,4,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (5,), (14,), (140,), (204,), (3,), (506,), (42,), (4,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MINIMUM_DIFFERENCE_PAIR," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MINIMUM_DIFFERENCE_PAIR{ static int f_gold ( int [ ] arr , int n ) { int diff = Integer . MAX_VALUE ; for ( int i = 0 ; i < n - 1 ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) if ( Math . abs ( ( arr [ i ] - arr [ j ] ) ) < diff ) diff = Math . abs ( ( arr [ i ] - arr [ j ] ) ) ; return diff ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,2,3,5,8,10,11,15,15,16,20,26,28,30,30,33,33,39,50,50,50,54,62,66,68,69,69,74,74,75,75,76,78,82,83,85,86,86,89,89,91,91,92,92,92,93,94,98}); param0.add(new int[]{6,6,-20,88,-78,-18,74,72,80,76,-62,38}); param0.add(new int[]{0,1,1,1,1}); param0.add(new int[]{75,85,49,66,44,89,80,39,64,70,25,21,81,33,90,68,51}); param0.add(new int[]{-96,-10,0,4,54,64}); param0.add(new int[]{1,0,1,0,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,0}); param0.add(new int[]{3,3,5,5,7,7,9,11,11,18,18,18,20,29,29,31,31,32,37,43,44,46,48,50,52,52,53,63,63,65,69,72,76,76,81,84,85,86,87,87,90,94,97,97}); param0.add(new int[]{40,-46,72,-28,8,90,86,-90,8,-66,-98,6,42,86,88,42,-50,74,-34,-16,-94,-56,-18,-18,84,-44,34,80,96,42,-50,-92,70,80,62,-38,-4,68,54,-14,30,-18,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{15,41,32,19,68,36,61,59,5,91,53,95,10,64,15,32,14,64,48,70,85,19,83,2,33,58,93,88,21,88,45,45,18,8}); List param1 = new ArrayList<>(); param1.add(32); param1.add(11); param1.add(3); param1.add(16); param1.add(3); param1.add(41); param1.add(27); param1.add(33); param1.add(26); param1.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : diff = 10 ** 20 for i in range ( n - 1 ) : for j in range ( i + 1 , n ) : if abs ( arr [ i ] - arr [ j ] ) < diff : diff = abs ( arr [ i ] - arr [ j ] ) return diff "," using namespace std; int f_gold ( int arr [ ], int n ) { int diff = INT_MAX; for ( int i = 0; i < n - 1; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( abs ( arr [ i ] - arr [ j ] ) < diff ) diff = abs ( arr [ i ] - arr [ j ] ); return diff; } int main() { int n_success = 0; vector> param0 {{1,1,2,3,5,8,10,11,15,15,16,20,26,28,30,30,33,33,39,50,50,50,54,62,66,68,69,69,74,74,75,75,76,78,82,83,85,86,86,89,89,91,91,92,92,92,93,94,98},{6,6,-20,88,-78,-18,74,72,80,76,-62,38},{0,1,1,1,1},{75,85,49,66,44,89,80,39,64,70,25,21,81,33,90,68,51},{-96,-10,0,4,54,64},{1,0,1,0,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,0},{3,3,5,5,7,7,9,11,11,18,18,18,20,29,29,31,31,32,37,43,44,46,48,50,52,52,53,63,63,65,69,72,76,76,81,84,85,86,87,87,90,94,97,97},{40,-46,72,-28,8,90,86,-90,8,-66,-98,6,42,86,88,42,-50,74,-34,-16,-94,-56,-18,-18,84,-44,34,80,96,42,-50,-92,70,80,62,-38,-4,68,54,-14,30,-18,-58},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{15,41,32,19,68,36,61,59,5,91,53,95,10,64,15,32,14,64,48,70,85,19,83,2,33,58,93,88,21,88,45,45,18,8}}; vector param1 {32,11,3,16,3,41,27,33,26,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 1, 2, 3, 5, 8, 10, 11, 15, 15, 16, 20, 26, 28, 30, 30, 33, 33, 39, 50, 50, 50, 54, 62, 66, 68, 69, 69, 74, 74, 75, 75, 76, 78, 82, 83, 85, 86, 86, 89, 89, 91, 91, 92, 92, 92, 93, 94, 98],32,), ([6, 6, -20, 88, -78, -18, 74, 72, 80, 76, -62, 38],11,), ([0, 1, 1, 1, 1],3,), ([75, 85, 49, 66, 44, 89, 80, 39, 64, 70, 25, 21, 81, 33, 90, 68, 51],16,), ([-96, -10, 0, 4, 54, 64],3,), ([1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0],41,), ([3, 3, 5, 5, 7, 7, 9, 11, 11, 18, 18, 18, 20, 29, 29, 31, 31, 32, 37, 43, 44, 46, 48, 50, 52, 52, 53, 63, 63, 65, 69, 72, 76, 76, 81, 84, 85, 86, 87, 87, 90, 94, 97, 97],27,), ([40, -46, 72, -28, 8, 90, 86, -90, 8, -66, -98, 6, 42, 86, 88, 42, -50, 74, -34, -16, -94, -56, -18, -18, 84, -44, 34, 80, 96, 42, -50, -92, 70, 80, 62, -38, -4, 68, 54, -14, 30, -18, -58],33,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,), ([15, 41, 32, 19, 68, 36, 61, 59, 5, 91, 53, 95, 10, 64, 15, 32, 14, 64, 48, 70, 85, 19, 83, 2, 33, 58, 93, 88, 21, 88, 45, 45, 18, 8],24,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POSITION_OF_RIGHTMOST_SET_BIT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POSITION_OF_RIGHTMOST_SET_BIT{ public static int f_gold ( int n ) { return ( int ) ( ( Math . log10 ( n & - n ) ) / Math . log10 ( 2 ) ) + 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(45); param0.add(26); param0.add(74); param0.add(80); param0.add(46); param0.add(67); param0.add(16); param0.add(87); param0.add(27); param0.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : return math.log2 ( n & - n ) + 1 ",,," if __name__ == '__main__': param = [ (45,), (26,), (74,), (80,), (46,), (67,), (16,), (87,), (27,), (17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER{ static boolean f_gold ( int ip [ ] , int op [ ] , int n ) { Queue < Integer > input = new LinkedList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { input . add ( ip [ i ] ) ; } Queue < Integer > output = new LinkedList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { output . add ( op [ i ] ) ; } Stack < Integer > tempStack = new Stack < > ( ) ; while ( ! input . isEmpty ( ) ) { int ele = input . poll ( ) ; if ( ele == output . peek ( ) ) { output . poll ( ) ; while ( ! tempStack . isEmpty ( ) ) { if ( tempStack . peek ( ) == output . peek ( ) ) { tempStack . pop ( ) ; output . poll ( ) ; } else break ; } } else { tempStack . push ( ele ) ; } } return ( input . isEmpty ( ) && tempStack . isEmpty ( ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,3,3,4,5,6,9,18,20,35,39,39,45,50,55,57,61,63,65,72,73,77,77,78,87,88,91,93,95,98}); param0.add(new int[]{-86,10,-8,8,-24,-2,-84,-86,-54,50,56,-22,-8,-62,0,-50,-32}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{3,42,88,89,41,71,67,5,84,20,75,36,34,20,31,16,86,89,53,47,57,27,47,93,59,66,40,18,69,36,98,99,81}); param0.add(new int[]{-98,-94,-94,-90,-88,-82,-80,-78,-78,-68,-58,-58,-52,-36,-30,-14,-12,-6,-2,-2,2,4,10,14,22,24,26,38,38,46,46,48,50,54,58,60,64,64,66,70,74,74,86,88,96,96}); param0.add(new int[]{1,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1}); param0.add(new int[]{19,37,44,65,72,87}); param0.add(new int[]{88}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{5,8,53,60,85,94,77,53,81,54,67,48,56,49,16,1,85,6,55,98,62,36,4,7,64}); List param1 = new ArrayList<>(); param1.add(new int[]{2,5,7,13,16,23,24,25,27,31,31,33,34,35,38,46,49,49,51,52,58,61,62,66,68,71,73,78,91,94,98}); param1.add(new int[]{-8,-46,22,-66,-94,-96,70,58,-4,-70,-96,34,-80,-26,-52,52,-76}); param1.add(new int[]{0,0,0,0,0,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}); param1.add(new int[]{16,61,39,99,71,73,35,47,62,80,1,49,54,35,39,55,7,6,85,84,11,51,38,4,72,10,33,65,64,32,16,99,9}); param1.add(new int[]{-92,-92,-80,-72,-72,-72,-70,-68,-64,-56,-40,-38,-34,-24,-10,-8,-8,-2,0,2,4,6,14,14,18,20,34,36,36,38,38,42,48,56,64,70,72,76,76,76,76,78,84,90,94,96}); param1.add(new int[]{0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0}); param1.add(new int[]{17,31,39,46,56,88}); param1.add(new int[]{-30}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1}); param1.add(new int[]{69,37,32,5,84,14,25,9,86,85,30,82,99,92,32,43,79,58,75,90,49,54,95,76,80}); List param2 = new ArrayList<>(); param2.add(23); param2.add(16); param2.add(21); param2.add(19); param2.add(27); param2.add(19); param2.add(4); param2.add(0); param2.add(13); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","from queue import Queue def f_gold ( ip , op , n ) : Input = Queue ( ) for i in range ( n ) : Input.put ( ip [ i ] ) output = Queue ( ) for i in range ( n ) : output.put ( op [ i ] ) tempStack = [ ] while ( not Input.empty ( ) ) : ele = Input.queue [ 0 ] Input.get ( ) if ( ele == output.queue [ 0 ] ) : output.get ( ) while ( len ( tempStack ) != 0 ) : if ( tempStack [ - 1 ] == output.queue [ 0 ] ) : tempStack.pop ( ) output.get ( ) else : break else : tempStack.append ( ele ) return ( Input.empty ( ) and len ( tempStack ) == 0 ) "," using namespace std; bool f_gold ( int ip [ ], int op [ ], int n ) { queue < int > input; for ( int i = 0; i < n; i ++ ) input . push ( ip [ i ] ); queue < int > output; for ( int i = 0; i < n; i ++ ) output . push ( op [ i ] ); stack < int > tempStack; while ( ! input . empty ( ) ) { int ele = input . front ( ); input . pop ( ); if ( ele == output . front ( ) ) { output . pop ( ); while ( ! tempStack . empty ( ) ) { if ( tempStack . top ( ) == output . front ( ) ) { tempStack . pop ( ); output . pop ( ); } else break; } } else tempStack . push ( ele ); } return ( input . empty ( ) && tempStack . empty ( ) ); } int main() { int n_success = 0; vector> param0 {{2,3,3,3,4,5,6,9,18,20,35,39,39,45,50,55,57,61,63,65,72,73,77,77,78,87,88,91,93,95,98},{-86,10,-8,8,-24,-2,-84,-86,-54,50,56,-22,-8,-62,0,-50,-32},{0,0,0,0,0,0,0,0,0,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},{3,42,88,89,41,71,67,5,84,20,75,36,34,20,31,16,86,89,53,47,57,27,47,93,59,66,40,18,69,36,98,99,81},{-98,-94,-94,-90,-88,-82,-80,-78,-78,-68,-58,-58,-52,-36,-30,-14,-12,-6,-2,-2,2,4,10,14,22,24,26,38,38,46,46,48,50,54,58,60,64,64,66,70,74,74,86,88,96,96},{1,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1},{19,37,44,65,72,87},{88},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{5,8,53,60,85,94,77,53,81,54,67,48,56,49,16,1,85,6,55,98,62,36,4,7,64}}; vector> param1 {{2,5,7,13,16,23,24,25,27,31,31,33,34,35,38,46,49,49,51,52,58,61,62,66,68,71,73,78,91,94,98},{-8,-46,22,-66,-94,-96,70,58,-4,-70,-96,34,-80,-26,-52,52,-76},{0,0,0,0,0,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},{16,61,39,99,71,73,35,47,62,80,1,49,54,35,39,55,7,6,85,84,11,51,38,4,72,10,33,65,64,32,16,99,9},{-92,-92,-80,-72,-72,-72,-70,-68,-64,-56,-40,-38,-34,-24,-10,-8,-8,-2,0,2,4,6,14,14,18,20,34,36,36,38,38,42,48,56,64,70,72,76,76,76,76,78,84,90,94,96},{0,0,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0},{17,31,39,46,56,88},{-30},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1},{69,37,32,5,84,14,25,9,86,85,30,82,99,92,32,43,79,58,75,90,49,54,95,76,80}}; vector param2 {23,16,21,19,27,19,4,0,13,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 3, 3, 4, 5, 6, 9, 18, 20, 35, 39, 39, 45, 50, 55, 57, 61, 63, 65, 72, 73, 77, 77, 78, 87, 88, 91, 93, 95, 98],[2, 5, 7, 13, 16, 23, 24, 25, 27, 31, 31, 33, 34, 35, 38, 46, 49, 49, 51, 52, 58, 61, 62, 66, 68, 71, 73, 78, 91, 94, 98],23,), ([-86, 10, -8, 8, -24, -2, -84, -86, -54, 50, 56, -22, -8, -62, 0, -50, -32],[-8, -46, 22, -66, -94, -96, 70, 58, -4, -70, -96, 34, -80, -26, -52, 52, -76],16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],21,), ([3, 42, 88, 89, 41, 71, 67, 5, 84, 20, 75, 36, 34, 20, 31, 16, 86, 89, 53, 47, 57, 27, 47, 93, 59, 66, 40, 18, 69, 36, 98, 99, 81],[16, 61, 39, 99, 71, 73, 35, 47, 62, 80, 1, 49, 54, 35, 39, 55, 7, 6, 85, 84, 11, 51, 38, 4, 72, 10, 33, 65, 64, 32, 16, 99, 9],19,), ([-98, -94, -94, -90, -88, -82, -80, -78, -78, -68, -58, -58, -52, -36, -30, -14, -12, -6, -2, -2, 2, 4, 10, 14, 22, 24, 26, 38, 38, 46, 46, 48, 50, 54, 58, 60, 64, 64, 66, 70, 74, 74, 86, 88, 96, 96],[-92, -92, -80, -72, -72, -72, -70, -68, -64, -56, -40, -38, -34, -24, -10, -8, -8, -2, 0, 2, 4, 6, 14, 14, 18, 20, 34, 36, 36, 38, 38, 42, 48, 56, 64, 70, 72, 76, 76, 76, 76, 78, 84, 90, 94, 96],27,), ([1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],[0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0],19,), ([19, 37, 44, 65, 72, 87],[17, 31, 39, 46, 56, 88],4,), ([88],[-30],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],13,), ([5, 8, 53, 60, 85, 94, 77, 53, 81, 54, 67, 48, 56, 49, 16, 1, 85, 6, 55, 98, 62, 36, 4, 7, 64],[69, 37, 32, 5, 84, 14, 25, 9, 86, 85, 30, 82, 99, 92, 32, 43, 79, 58, 75, 90, 49, 54, 95, 76, 80],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES_1{ static int f_gold ( int a [ ] , int n ) { return ( int ) Math . floor ( ( - 1 + Math . sqrt ( 1 + ( 8 * n ) ) ) / 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,2,3,5,6,7,8,8,12,15,16,18,18,20,21,21,22,22,24,24,25,30,35,42,49,52,55,55,63,68,70,72,73,77,80,83,87,87,88,88,94,95,97}); param0.add(new int[]{48,-72,84,-24,28,94,36,28,32,66,-62,64,6,-68,-12,46,4,98,18,86,-60,76,14,98}); param0.add(new int[]{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}); param0.add(new int[]{11,16,84,8,86,44,79,11,73,12,29,62,22,44,28,8,48,92,73,63,59,44,95,66}); param0.add(new int[]{-94,-94,-92,-88,-86,-82,-80,-80,-78,-76,-56,-56,-50,-44,-42,-36,-36,-32,-32,-26,-14,-12,-6,12,24,28,34,38,42,42,46,50,56,62,62,74,84,92,94}); param0.add(new int[]{0,1,0,1,0,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,0,0}); param0.add(new int[]{2,2,3,3,3,4,5,13,16,18,21,22,27,28,32,34,36,37,41,42,43,51,52,52,54,54,61,65,67,67,68,71,75,77,77,78,80,81,81,84,86,90,90,93,93,94,99,99}); param0.add(new int[]{54,-86}); param0.add(new int[]{0,1}); param0.add(new int[]{5,54,49,80,56,62,31,49,60,19,45,94,33,46,32}); List param1 = new ArrayList<>(); param1.add(22); param1.add(12); param1.add(25); param1.add(14); param1.add(19); param1.add(24); param1.add(31); param1.add(1); param1.add(1); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( a , n ) : return ( - 1 + int ( math.sqrt ( 1 + ( 8 * n ) ) ) ) // 2 "," using namespace std; int f_gold ( int a [ ], int n ) { return floor ( ( - 1 + sqrt ( 1 + ( 8 * n ) ) ) / 2 ); } int main() { int n_success = 0; vector> param0 {{1,2,2,3,5,6,7,8,8,12,15,16,18,18,20,21,21,22,22,24,24,25,30,35,42,49,52,55,55,63,68,70,72,73,77,80,83,87,87,88,88,94,95,97},{48,-72,84,-24,28,94,36,28,32,66,-62,64,6,-68,-12,46,4,98,18,86,-60,76,14,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{11,16,84,8,86,44,79,11,73,12,29,62,22,44,28,8,48,92,73,63,59,44,95,66},{-94,-94,-92,-88,-86,-82,-80,-80,-78,-76,-56,-56,-50,-44,-42,-36,-36,-32,-32,-26,-14,-12,-6,12,24,28,34,38,42,42,46,50,56,62,62,74,84,92,94},{0,1,0,1,0,1,1,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,0,0},{2,2,3,3,3,4,5,13,16,18,21,22,27,28,32,34,36,37,41,42,43,51,52,52,54,54,61,65,67,67,68,71,75,77,77,78,80,81,81,84,86,90,90,93,93,94,99,99},{54,-86},{0,1},{5,54,49,80,56,62,31,49,60,19,45,94,33,46,32}}; vector param1 {22,12,25,14,19,24,31,1,1,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 2, 2, 3, 5, 6, 7, 8, 8, 12, 15, 16, 18, 18, 20, 21, 21, 22, 22, 24, 24, 25, 30, 35, 42, 49, 52, 55, 55, 63, 68, 70, 72, 73, 77, 80, 83, 87, 87, 88, 88, 94, 95, 97],22,), ([48, -72, 84, -24, 28, 94, 36, 28, 32, 66, -62, 64, 6, -68, -12, 46, 4, 98, 18, 86, -60, 76, 14, 98],12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],25,), ([11, 16, 84, 8, 86, 44, 79, 11, 73, 12, 29, 62, 22, 44, 28, 8, 48, 92, 73, 63, 59, 44, 95, 66],14,), ([-94, -94, -92, -88, -86, -82, -80, -80, -78, -76, -56, -56, -50, -44, -42, -36, -36, -32, -32, -26, -14, -12, -6, 12, 24, 28, 34, 38, 42, 42, 46, 50, 56, 62, 62, 74, 84, 92, 94],19,), ([0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0],24,), ([2, 2, 3, 3, 3, 4, 5, 13, 16, 18, 21, 22, 27, 28, 32, 34, 36, 37, 41, 42, 43, 51, 52, 52, 54, 54, 61, 65, 67, 67, 68, 71, 75, 77, 77, 78, 80, 81, 81, 84, 86, 90, 90, 93, 93, 94, 99, 99],31,), ([54, -86],1,), ([0, 1],1,), ([5, 54, 49, 80, 56, 62, 31, 49, 60, 19, 45, 94, 33, 46, 32],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS{ static boolean f_gold ( int n , int p ) { n = n % p ; for ( int x = 2 ; x < p ; x ++ ) if ( ( x * x ) % p == n ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(71); param0.add(85); param0.add(4); param0.add(20); param0.add(71); param0.add(72); param0.add(36); param0.add(95); param0.add(83); param0.add(72); List param1 = new ArrayList<>(); param1.add(78); param1.add(75); param1.add(35); param1.add(99); param1.add(29); param1.add(88); param1.add(54); param1.add(52); param1.add(33); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , p ) : n = n % p for x in range ( 2 , p , 1 ) : if ( ( x * x ) % p == n ) : return True return False "," using namespace std; bool f_gold ( int n, int p ) { n = n % p; for ( int x = 2; x < p; x ++ ) if ( ( x * x ) % p == n ) return true; return false; } int main() { int n_success = 0; vector param0 {71,85,4,20,71,72,36,95,83,72}; vector param1 {78,75,35,99,29,88,54,52,33,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (71,78,), (85,75,), (4,35,), (20,99,), (71,29,), (72,88,), (36,54,), (95,52,), (83,33,), (72,13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_IF_A_GIVEN_ARRAY_CAN_REPRESENT_PREORDER_TRAVERSAL_OF_BINARY_SEARCH_TREE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_A_GIVEN_ARRAY_CAN_REPRESENT_PREORDER_TRAVERSAL_OF_BINARY_SEARCH_TREE{ static boolean f_gold ( int pre [ ] , int n ) { Stack < Integer > s = new Stack < Integer > ( ) ; int root = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { if ( pre [ i ] < root ) { return false ; } while ( ! s . empty ( ) && s . peek ( ) < pre [ i ] ) { root = s . peek ( ) ; s . pop ( ) ; } s . push ( pre [ i ] ) ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,9,21,25,33,36,44,48,55,55,56,58,66,66,66,66,78,92,96,97}); param0.add(new int[]{-16,80,70,72,-86,-28,42,28,-28,56,-32,40,-78,32,22,-52,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{10,85,45,52,98,9,59,58,61,91,4,90,43,48,47}); param0.add(new int[]{-92,-90,-88,-50,-48,-48,-44,-42,-40,-34,-28,-26,-26,-24,-8,-6,4,8,12,20,32,36,38,40,46,52,58,88,92}); param0.add(new int[]{1,0,1,1,1}); param0.add(new int[]{1,2,3,4,14,16,17,18,19,19,21,21,22,25,25,28,29,33,34,40,41,42,44,50,52,58,61,62,67,70,74,74,75,75,76,77,77,77,81,83,87,90,90,90,96,98,99,99}); param0.add(new int[]{-98,40,84,-8,42,-52,2,16,-68,-28,-54,88,8,-4,-98,-40,-32,-64,54,32,-76,-10,-48,-88,80,32,-2,-94,-26,-54,30,-56}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{9,35,62,78,55,29,55,36,77,89,73,31,53,94,22,23,87,96,7,15,71,61,25,61,99,34,1,87,21,14,58,69,61,49,54,7,89,52,78,97,11,78,27,37,56,19,20,21}); List param1 = new ArrayList<>(); param1.add(18); param1.add(16); param1.add(35); param1.add(8); param1.add(17); param1.add(2); param1.add(30); param1.add(26); param1.add(17); param1.add(34); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( int pre [ ], int n ) { stack < int > s; int root = INT_MIN; for ( int i = 0; i < n; i ++ ) { if ( pre [ i ] < root ) return false; while ( ! s . empty ( ) && s . top ( ) < pre [ i ] ) { root = s . top ( ); s . pop ( ); } s . push ( pre [ i ] ); } return true; } int main() { int n_success = 0; vector> param0 {{4,9,21,25,33,36,44,48,55,55,56,58,66,66,66,66,78,92,96,97},{-16,80,70,72,-86,-28,42,28,-28,56,-32,40,-78,32,22,-52,-58},{0,0,0,0,0,0,0,0,0,0,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},{10,85,45,52,98,9,59,58,61,91,4,90,43,48,47},{-92,-90,-88,-50,-48,-48,-44,-42,-40,-34,-28,-26,-26,-24,-8,-6,4,8,12,20,32,36,38,40,46,52,58,88,92},{1,0,1,1,1},{1,2,3,4,14,16,17,18,19,19,21,21,22,25,25,28,29,33,34,40,41,42,44,50,52,58,61,62,67,70,74,74,75,75,76,77,77,77,81,83,87,90,90,90,96,98,99,99},{-98,40,84,-8,42,-52,2,16,-68,-28,-54,88,8,-4,-98,-40,-32,-64,54,32,-76,-10,-48,-88,80,32,-2,-94,-26,-54,30,-56},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{9,35,62,78,55,29,55,36,77,89,73,31,53,94,22,23,87,96,7,15,71,61,25,61,99,34,1,87,21,14,58,69,61,49,54,7,89,52,78,97,11,78,27,37,56,19,20,21}}; vector param1 {18,16,35,8,17,2,30,26,17,34}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO{ static int f_gold ( String s ) { int one_count = 0 , zero_count = 0 ; char [ ] str = s . toCharArray ( ) ; int n = str . length ; for ( int i = 0 ; i < n ; i ++ ) if ( str [ i ] == '1' ) one_count ++ ; else zero_count ++ ; if ( one_count % 2 == 0 ) return zero_count ; return one_count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""KfcTJNP""); param0.add(""05312505872""); param0.add(""100111""); param0.add(""tDEEhKxrQ""); param0.add(""50824233019""); param0.add(""10001110010""); param0.add(""T SEZaNm MYQ""); param0.add(""838415739""); param0.add(""01110100""); param0.add(""WYQiAey H""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : one_count = 0 zero_count = 0 n = len ( str ) for i in range ( 0 , n , 1 ) : if ( str [ i ] == '1' ) : one_count += 1 else : zero_count += 1 if ( one_count % 2 == 0 ) : return zero_count return one_count "," using namespace std; int f_gold ( string str ) { int one_count = 0, zero_count = 0; int n = str . length ( ); for ( int i = 0; i < n; i ++ ) if ( str [ i ] == '1' ) one_count ++; else zero_count ++; if ( one_count % 2 == 0 ) return zero_count; return one_count; } int main() { int n_success = 0; vector param0 {""KfcTJNP"",""05312505872"",""100111"",""tDEEhKxrQ"",""50824233019"",""10001110010"",""T SEZaNm MYQ"",""838415739"",""01110100"",""WYQiAey H""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('KfcTJNP',), ('05312505872',), ('100111',), ('tDEEhKxrQ',), ('50824233019',), ('10001110010',), ('T SEZaNm MYQ',), ('838415739',), ('01110100',), ('WYQiAey H',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE{ static int f_gold ( int arr [ ] , int n ) { int dp [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) dp [ i ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { if ( ( arr [ i ] == arr [ j ] + 1 ) || ( arr [ i ] == arr [ j ] - 1 ) ) dp [ i ] = Math . max ( dp [ i ] , dp [ j ] + 1 ) ; } } int result = 1 ; for ( int i = 0 ; i < n ; i ++ ) if ( result < dp [ i ] ) result = dp [ i ] ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,13,15,17,18,20,22,24,28,34,37,43,46,47,49,51,52,54,58,64,65,77,78,79,87,90,92,93,94,97}); param0.add(new int[]{-86,-56,76,86,42,-40,8,34,-48,-54,-80,6,42,48,76,-26,6}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{5,22,15,26,29,47,22}); param0.add(new int[]{-90,-84,-76,-76,-74,-74,-66,-58,-58,-56,-56,-44,-38,-36,-34,-32,-16,-10,2,6,24,24,24,34,36,54,60,68,70,76,88}); param0.add(new int[]{0,1,1,1,0,0,1,0,1,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,1,1,1,1,0,0,0,1,0,0,1,1,1,0,0,1}); param0.add(new int[]{1,3,12,12,12,12,14,17,18,19,23,27,28,30,35,38,42,44,45,48,52,59,61,64,65,69,73,76,77,82,83,85,87,99}); param0.add(new int[]{-54,-20,24,-78,-58,64,34,70,-36,-24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{5,35,75,21,82,32,28,53,20,27,42,92,32,70,81,75,72,66,97,60,11,83,14,30,5,68,17,27,62,86,26,20,97,91,44,69}); List param1 = new ArrayList<>(); param1.add(23); param1.add(15); param1.add(16); param1.add(5); param1.add(17); param1.add(26); param1.add(23); param1.add(8); param1.add(27); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : dp = [ 1 for i in range ( n ) ] for i in range ( n ) : for j in range ( i ) : if ( ( arr [ i ] == arr [ j ] + 1 ) or ( arr [ i ] == arr [ j ] - 1 ) ) : dp [ i ] = max ( dp [ i ] , dp [ j ] + 1 ) result = 1 for i in range ( n ) : if ( result < dp [ i ] ) : result = dp [ i ] return result "," using namespace std; int f_gold ( int arr [ ], int n ) { int dp [ n ]; for ( int i = 0; i < n; i ++ ) dp [ i ] = 1; for ( int i = 1; i < n; i ++ ) { for ( int j = 0; j < i; j ++ ) { if ( ( arr [ i ] == arr [ j ] + 1 ) || ( arr [ i ] == arr [ j ] - 1 ) ) dp [ i ] = max ( dp [ i ], dp [ j ] + 1 ); } } int result = 1; for ( int i = 0; i < n; i ++ ) if ( result < dp [ i ] ) result = dp [ i ]; return result; } int main() { int n_success = 0; vector> param0 {{2,13,15,17,18,20,22,24,28,34,37,43,46,47,49,51,52,54,58,64,65,77,78,79,87,90,92,93,94,97},{-86,-56,76,86,42,-40,8,34,-48,-54,-80,6,42,48,76,-26,6},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{5,22,15,26,29,47,22},{-90,-84,-76,-76,-74,-74,-66,-58,-58,-56,-56,-44,-38,-36,-34,-32,-16,-10,2,6,24,24,24,34,36,54,60,68,70,76,88},{0,1,1,1,0,0,1,0,1,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,1,1,1,1,0,0,0,1,0,0,1,1,1,0,0,1},{1,3,12,12,12,12,14,17,18,19,23,27,28,30,35,38,42,44,45,48,52,59,61,64,65,69,73,76,77,82,83,85,87,99},{-54,-20,24,-78,-58,64,34,70,-36,-24},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{5,35,75,21,82,32,28,53,20,27,42,92,32,70,81,75,72,66,97,60,11,83,14,30,5,68,17,27,62,86,26,20,97,91,44,69}}; vector param1 {23,15,16,5,17,26,23,8,27,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 13, 15, 17, 18, 20, 22, 24, 28, 34, 37, 43, 46, 47, 49, 51, 52, 54, 58, 64, 65, 77, 78, 79, 87, 90, 92, 93, 94, 97],23,), ([-86, -56, 76, 86, 42, -40, 8, 34, -48, -54, -80, 6, 42, 48, 76, -26, 6],15,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,), ([5, 22, 15, 26, 29, 47, 22],5,), ([-90, -84, -76, -76, -74, -74, -66, -58, -58, -56, -56, -44, -38, -36, -34, -32, -16, -10, 2, 6, 24, 24, 24, 34, 36, 54, 60, 68, 70, 76, 88],17,), ([0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1],26,), ([1, 3, 12, 12, 12, 12, 14, 17, 18, 19, 23, 27, 28, 30, 35, 38, 42, 44, 45, 48, 52, 59, 61, 64, 65, 69, 73, 76, 77, 82, 83, 85, 87, 99],23,), ([-54, -20, 24, -78, -58, 64, 34, 70, -36, -24],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],27,), ([5, 35, 75, 21, 82, 32, 28, 53, 20, 27, 42, 92, 32, 70, 81, 75, 72, 66, 97, 60, 11, 83, 14, 30, 5, 68, 17, 27, 62, 86, 26, 20, 97, 91, 44, 69],20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MINIMUM_ELEMENT_IN_A_SORTED_AND_ROTATED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MINIMUM_ELEMENT_IN_A_SORTED_AND_ROTATED_ARRAY{ static int f_gold ( int arr [ ] , int low , int high ) { if ( high < low ) return arr [ 0 ] ; if ( high == low ) return arr [ low ] ; int mid = low + ( high - low ) / 2 ; if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return arr [ mid + 1 ] ; if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return arr [ mid ] ; if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr , low , mid - 1 ) ; return f_gold ( arr , mid + 1 , high ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{16,22,50,64,68,79,84,88,89}); param0.add(new int[]{88,-38,46,24,-52,-12,-90,28,18,14,-72,58,-98,28,-84,44,-42,-32,-22,-22,-82,-30,90,18,62,62,92,6,60,28,-90,92,82,62,98,-68,48,-74,-8,50,62,24,30,-86,98,-96,-98}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{26,66,94,28,38,31,92,66,81,8,36,64,80,32,48,71,72,54,61,60,89}); param0.add(new int[]{-46,-26,-22,-14,46,62}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{14,81,87}); param0.add(new int[]{4}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{3,41,40,53,82,9,90,43,90,59,37,21,92,98,36,99,35,67,24,29,40,31,46,12,29,8,93,67,44,83,71,29,22,32,33,11,44,97,84,44,8,10,31,50,22,8}); List param1 = new ArrayList<>(); param1.add(4); param1.add(42); param1.add(28); param1.add(19); param1.add(4); param1.add(2); param1.add(1); param1.add(0); param1.add(15); param1.add(42); List param2 = new ArrayList<>(); param2.add(6); param2.add(31); param2.add(21); param2.add(17); param2.add(4); param2.add(2); param2.add(1); param2.add(0); param2.add(17); param2.add(31); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , low , high ) : if high < low : return arr [ 0 ] if high == low : return arr [ low ] mid = int ( ( low + high ) / 2 ) if mid < high and arr [ mid + 1 ] < arr [ mid ] : return arr [ mid + 1 ] if mid > low and arr [ mid ] < arr [ mid - 1 ] : return arr [ mid ] if arr [ high ] > arr [ mid ] : return f_gold ( arr , low , mid - 1 ) return f_gold ( arr , mid + 1 , high ) "," using namespace std; int f_gold ( int arr [ ], int low, int high ) { if ( high < low ) return arr [ 0 ]; if ( high == low ) return arr [ low ]; int mid = low + ( high - low ) / 2; if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return arr [ mid + 1 ]; if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return arr [ mid ]; if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 ); return f_gold ( arr, mid + 1, high ); } int main() { int n_success = 0; vector> param0 {{16,22,50,64,68,79,84,88,89},{88,-38,46,24,-52,-12,-90,28,18,14,-72,58,-98,28,-84,44,-42,-32,-22,-22,-82,-30,90,18,62,62,92,6,60,28,-90,92,82,62,98,-68,48,-74,-8,50,62,24,30,-86,98,-96,-98},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{26,66,94,28,38,31,92,66,81,8,36,64,80,32,48,71,72,54,61,60,89},{-46,-26,-22,-14,46,62},{0,1,1,1},{14,81,87},{4},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{3,41,40,53,82,9,90,43,90,59,37,21,92,98,36,99,35,67,24,29,40,31,46,12,29,8,93,67,44,83,71,29,22,32,33,11,44,97,84,44,8,10,31,50,22,8}}; vector param1 {4,42,28,19,4,2,1,0,15,42}; vector param2 {6,31,21,17,4,2,1,0,17,31}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([16, 22, 50, 64, 68, 79, 84, 88, 89],4,6,), ([88, -38, 46, 24, -52, -12, -90, 28, 18, 14, -72, 58, -98, 28, -84, 44, -42, -32, -22, -22, -82, -30, 90, 18, 62, 62, 92, 6, 60, 28, -90, 92, 82, 62, 98, -68, 48, -74, -8, 50, 62, 24, 30, -86, 98, -96, -98],42,31,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,21,), ([26, 66, 94, 28, 38, 31, 92, 66, 81, 8, 36, 64, 80, 32, 48, 71, 72, 54, 61, 60, 89],19,17,), ([-46, -26, -22, -14, 46, 62],4,4,), ([0, 1, 1, 1],2,2,), ([14, 81, 87],1,1,), ([4],0,0,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,17,), ([3, 41, 40, 53, 82, 9, 90, 43, 90, 59, 37, 21, 92, 98, 36, 99, 35, 67, 24, 29, 40, 31, 46, 12, 29, 8, 93, 67, 44, 83, 71, 29, 22, 32, 33, 11, 44, 97, 84, 44, 8, 10, 31, 50, 22, 8],42,31,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_NUMBER_OF_SQUARES_WHOSE_SUM_EQUALS_TO_GIVEN_NUMBER_N_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_OF_SQUARES_WHOSE_SUM_EQUALS_TO_GIVEN_NUMBER_N_1{ static int f_gold ( int n ) { if ( n <= 3 ) return n ; int dp [ ] = new int [ n + 1 ] ; dp [ 0 ] = 0 ; dp [ 1 ] = 1 ; dp [ 2 ] = 2 ; dp [ 3 ] = 3 ; for ( int i = 4 ; i <= n ; i ++ ) { dp [ i ] = i ; for ( int x = 1 ; x <= Math . ceil ( Math . sqrt ( i ) ) ; x ++ ) { int temp = x * x ; if ( temp > i ) break ; else dp [ i ] = Math . min ( dp [ i ] , 1 + dp [ i - temp ] ) ; } } int res = dp [ n ] ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(16); param0.add(33); param0.add(47); param0.add(98); param0.add(36); param0.add(81); param0.add(55); param0.add(19); param0.add(4); param0.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int n ) { int * dp = new int [ n + 1 ]; dp [ 0 ] = 0; dp [ 1 ] = 1; dp [ 2 ] = 2; dp [ 3 ] = 3; for ( int i = 4; i <= n; i ++ ) { dp [ i ] = i; for ( int x = 1; x <= ceil ( sqrt ( i ) ); x ++ ) { int temp = x * x; if ( temp > i ) break; else dp [ i ] = min ( dp [ i ], 1 + dp [ i - temp ] ); } } int res = dp [ n ]; delete [ ] dp; return res; } int main() { int n_success = 0; vector param0 {16,33,47,98,36,81,55,19,4,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MINIMUM_COST_CONNECT_WEIGHTED_NODES_REPRESENTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_CONNECT_WEIGHTED_NODES_REPRESENTED_ARRAY{ static int f_gold ( int a [ ] , int n ) { int mn = Integer . MAX_VALUE ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { mn = Math . min ( a [ i ] , mn ) ; sum += a [ i ] ; } return mn * ( sum - mn ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,8,14,15,17,17,19,21,22,23,29,32,36,37,43,45,46,47,47,53,57,57,70,71,72,76,81,82,90,95,96,98,99}); param0.add(new int[]{94,-18,50,94,-74,-50,-44,-92,-58,14,-66,-78}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{15,18,64,28}); param0.add(new int[]{-96,-88,-88,-84,-82,-78,-78,-60,-58,-56,-54,-52,-48,-44,-28,-26,-14,-12,6,10,10,14,14,50,52,54,60,62,62,64,66,70,72,72,78,80,84}); param0.add(new int[]{0,1,1,0,1,1,1,1}); param0.add(new int[]{3,10,14,14,15,16,18,20,21,30,31,33,35,39,46,48,59,59,61,77,78,79,81,83,85,92,97,97,99}); param0.add(new int[]{4,-32,68,-48,54,24,78,98,-70,44,-82,-92,-16,-92,-70,52,-58,-62,-58,32,14,-4,80,-78,-26,-24,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{82,74,53,91,81,88,42,62,38,43,29,60,43,44,19,28,20,1,5,94,18,77,52,38,55,1,10,29,34,91,64,80,81,39,4,47,30,62,58,66,73,52,62,9,36,49}); List param1 = new ArrayList<>(); param1.add(32); param1.add(10); param1.add(24); param1.add(2); param1.add(31); param1.add(6); param1.add(23); param1.add(18); param1.add(35); param1.add(38); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( a , n ) : mn = sys.maxsize sum = 0 for i in range ( n ) : mn = min ( a [ i ] , mn ) sum += a [ i ] return mn * ( sum - mn ) "," using namespace std; int f_gold ( int a [ ], int n ) { int mn = INT_MAX; int sum = 0; for ( int i = 0; i < n; i ++ ) { mn = min ( a [ i ], mn ); sum += a [ i ]; } return mn * ( sum - mn ); } int main() { int n_success = 0; vector> param0 {{3,8,14,15,17,17,19,21,22,23,29,32,36,37,43,45,46,47,47,53,57,57,70,71,72,76,81,82,90,95,96,98,99},{94,-18,50,94,-74,-50,-44,-92,-58,14,-66,-78},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{15,18,64,28},{-96,-88,-88,-84,-82,-78,-78,-60,-58,-56,-54,-52,-48,-44,-28,-26,-14,-12,6,10,10,14,14,50,52,54,60,62,62,64,66,70,72,72,78,80,84},{0,1,1,0,1,1,1,1},{3,10,14,14,15,16,18,20,21,30,31,33,35,39,46,48,59,59,61,77,78,79,81,83,85,92,97,97,99},{4,-32,68,-48,54,24,78,98,-70,44,-82,-92,-16,-92,-70,52,-58,-62,-58,32,14,-4,80,-78,-26,-24,-8},{0,0,0,0,0,0,0,0,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},{82,74,53,91,81,88,42,62,38,43,29,60,43,44,19,28,20,1,5,94,18,77,52,38,55,1,10,29,34,91,64,80,81,39,4,47,30,62,58,66,73,52,62,9,36,49}}; vector param1 {32,10,24,2,31,6,23,18,35,38}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 8, 14, 15, 17, 17, 19, 21, 22, 23, 29, 32, 36, 37, 43, 45, 46, 47, 47, 53, 57, 57, 70, 71, 72, 76, 81, 82, 90, 95, 96, 98, 99],32,), ([94, -18, 50, 94, -74, -50, -44, -92, -58, 14, -66, -78],10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([15, 18, 64, 28],2,), ([-96, -88, -88, -84, -82, -78, -78, -60, -58, -56, -54, -52, -48, -44, -28, -26, -14, -12, 6, 10, 10, 14, 14, 50, 52, 54, 60, 62, 62, 64, 66, 70, 72, 72, 78, 80, 84],31,), ([0, 1, 1, 0, 1, 1, 1, 1],6,), ([3, 10, 14, 14, 15, 16, 18, 20, 21, 30, 31, 33, 35, 39, 46, 48, 59, 59, 61, 77, 78, 79, 81, 83, 85, 92, 97, 97, 99],23,), ([4, -32, 68, -48, 54, 24, 78, 98, -70, 44, -82, -92, -16, -92, -70, 52, -58, -62, -58, 32, 14, -4, 80, -78, -26, -24, -8],18,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],35,), ([82, 74, 53, 91, 81, 88, 42, 62, 38, 43, 29, 60, 43, 44, 19, 28, 20, 1, 5, 94, 18, 77, 52, 38, 55, 1, 10, 29, 34, 91, 64, 80, 81, 39, 4, 47, 30, 62, 58, 66, 73, 52, 62, 9, 36, 49],38,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE_2{ static boolean f_gold ( int A [ ] , int arr_size , int sum ) { for ( int i = 0 ; i < arr_size - 2 ; i ++ ) { HashSet < Integer > s = new HashSet < Integer > ( ) ; int curr_sum = sum - A [ i ] ; for ( int j = i + 1 ; j < arr_size ; j ++ ) { if ( s . contains ( curr_sum - A [ j ] ) && curr_sum - A [ j ] != ( int ) s . toArray ( ) [ s . size ( ) - 1 ] ) { System . out . printf ( ""Triplet is %d, %d, %d"" , A [ i ] , A [ j ] , curr_sum - A [ j ] ) ; return true ; } s . add ( A [ j ] ) ; } } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,6,8,8,9,11,13,13,15,17,21,24,38,38,42,43,46,46,47,54,55,56,57,58,60,60,60,62,63,63,65,66,67,67,69,81,84,84,85,86,95,99}); param0.add(new int[]{20,-86,-24,38,-32,-64,-72,72,68,94,18,-60,-4,-18,-18,-70,6,-86,46,-16,46,-28}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{13,96,31,39,23,39,50,10,21,64,41,54,44,97,24,91,79,86,38,49,77,71,8,98,85,36,37,65,42,48}); param0.add(new int[]{-86,-68,-58,-56,-54,-54,-48,-40,-36,-32,-26,-16,-14,-12,-12,-4,-4,-4,0,10,22,22,30,54,62,68,88,88}); param0.add(new int[]{0,1,1,1,1,0,0}); param0.add(new int[]{8,8,9,13,20,24,29,52,53,96}); param0.add(new int[]{18,-92,-10,26,58,-48,38,66,-98,-72,4,76,-52,20,60,-56,96,60,-10,-26,-64,-66,-22,-86,74,82,2,-14,76,82,40,70,-40,-2,-46,-38,22,98,58}); param0.add(new int[]{1,1,1,1}); param0.add(new int[]{72}); List param1 = new ArrayList<>(); param1.add(27); param1.add(21); param1.add(17); param1.add(17); param1.add(21); param1.add(5); param1.add(9); param1.add(30); param1.add(2); param1.add(0); List param2 = new ArrayList<>(); param2.add(24); param2.add(20); param2.add(13); param2.add(18); param2.add(25); param2.add(3); param2.add(8); param2.add(30); param2.add(2); param2.add(0); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , arr_size , sum ) : for i in range ( 0 , arr_size - 1 ) : s = set ( ) curr_sum = sum - A [ i ] for j in range ( i + 1 , arr_size ) : if ( curr_sum - A [ j ] ) in s : print ( ""Triplet is"" , A [ i ] , "", "" , A [ j ] , "", "" , curr_sum - A [ j ] ) return True s.add ( A [ j ] ) return False "," using namespace std; bool f_gold ( int A [ ], int arr_size, int sum ) { for ( int i = 0; i < arr_size - 2; i ++ ) { unordered_set < int > s; int curr_sum = sum - A [ i ]; for ( int j = i + 1; j < arr_size; j ++ ) { if ( s . find ( curr_sum - A [ j ] ) != s . end ( ) ) { printf ( ""Triplet is %d, %d, %d"", A [ i ], A [ j ], curr_sum - A [ j ] ); return true; } s . insert ( A [ j ] ); } } return false; } int main() { int n_success = 0; vector> param0 {{1,6,8,8,9,11,13,13,15,17,21,24,38,38,42,43,46,46,47,54,55,56,57,58,60,60,60,62,63,63,65,66,67,67,69,81,84,84,85,86,95,99},{20,-86,-24,38,-32,-64,-72,72,68,94,18,-60,-4,-18,-18,-70,6,-86,46,-16,46,-28},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{13,96,31,39,23,39,50,10,21,64,41,54,44,97,24,91,79,86,38,49,77,71,8,98,85,36,37,65,42,48},{-86,-68,-58,-56,-54,-54,-48,-40,-36,-32,-26,-16,-14,-12,-12,-4,-4,-4,0,10,22,22,30,54,62,68,88,88},{0,1,1,1,1,0,0},{8,8,9,13,20,24,29,52,53,96},{18,-92,-10,26,58,-48,38,66,-98,-72,4,76,-52,20,60,-56,96,60,-10,-26,-64,-66,-22,-86,74,82,2,-14,76,82,40,70,-40,-2,-46,-38,22,98,58},{1,1,1,1},{72}}; vector param1 {27,21,17,17,21,5,9,30,2,0}; vector param2 {24,20,13,18,25,3,8,30,2,0}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 6, 8, 8, 9, 11, 13, 13, 15, 17, 21, 24, 38, 38, 42, 43, 46, 46, 47, 54, 55, 56, 57, 58, 60, 60, 60, 62, 63, 63, 65, 66, 67, 67, 69, 81, 84, 84, 85, 86, 95, 99],27,24,), ([20, -86, -24, 38, -32, -64, -72, 72, 68, 94, 18, -60, -4, -18, -18, -70, 6, -86, 46, -16, 46, -28],21,20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],17,13,), ([13, 96, 31, 39, 23, 39, 50, 10, 21, 64, 41, 54, 44, 97, 24, 91, 79, 86, 38, 49, 77, 71, 8, 98, 85, 36, 37, 65, 42, 48],17,18,), ([-86, -68, -58, -56, -54, -54, -48, -40, -36, -32, -26, -16, -14, -12, -12, -4, -4, -4, 0, 10, 22, 22, 30, 54, 62, 68, 88, 88],21,25,), ([0, 1, 1, 1, 1, 0, 0],5,3,), ([8, 8, 9, 13, 20, 24, 29, 52, 53, 96],9,8,), ([18, -92, -10, 26, 58, -48, 38, 66, -98, -72, 4, 76, -52, 20, 60, -56, 96, 60, -10, -26, -64, -66, -22, -86, 74, 82, 2, -14, 76, 82, 40, 70, -40, -2, -46, -38, 22, 98, 58],30,30,), ([1, 1, 1, 1],2,2,), ([72],0,0,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_PRODUCT_INCREASING_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PRODUCT_INCREASING_SUBSEQUENCE{ static int f_gold ( int [ ] arr , int n ) { int [ ] mpis = new int [ n ] ; int max = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) mpis [ i ] = arr [ i ] ; for ( int i = 1 ; i < n ; i ++ ) for ( int j = 0 ; j < i ; j ++ ) if ( arr [ i ] > arr [ j ] && mpis [ i ] < ( mpis [ j ] * arr [ i ] ) ) mpis [ i ] = mpis [ j ] * arr [ i ] ; for ( int k = 0 ; k < mpis . length ; k ++ ) { if ( mpis [ k ] > max ) { max = mpis [ k ] ; } } return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,4,7,7,9,12,20,45,53,58,63,65,65,86,98,98}); param0.add(new int[]{46,-58,70,60,74,42,6,-26,78,32,14,-56,-48,86,-2,94,-44,-62,-50,-8,-4,-36,-62,-98,-98,-78,56,92,88}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{13,71,93,68,43,75,44,15,1,91,7,9,65,85,46,87,37,74,19,30,87,27,82,92,12,36,6,27,76,80,30,83,67,83,65,28,81,59,63,11,70}); param0.add(new int[]{-96,-94,-92,-88,-84,-80,-74,-70,-62,-56,-48,-46,-40,-34,-32,-26,-22,-22,-12,-10,-8,-6,-2,0,2,4,6,18,18,30,34,34,38,38,40,48,54,56,60,84,88,88,90,94,96}); param0.add(new int[]{1,1,1,1,1,0,1,0,0,1,1,0,1,1,0,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1}); param0.add(new int[]{1,1,5,5,6,7,18,35,39,51,64,73,87,90,91,92}); param0.add(new int[]{-54,8,-92,-28,72,54,-74,36,-10,54,-30,-16,-72,-32,-92,38,-76,-76,-50,-92,48}); param0.add(new int[]{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}); param0.add(new int[]{47,57,72,40,53,46,62,51,42,89,9,91,58,67,20,91,63,50,32,6,63,49,3,89,87,54,65,72,72,62,31,6,48,87,17,95,59,57}); List param1 = new ArrayList<>(); param1.add(12); param1.add(27); param1.add(14); param1.add(20); param1.add(30); param1.add(22); param1.add(11); param1.add(19); param1.add(26); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : mpis = [ 0 ] * ( n ) for i in range ( n ) : mpis [ i ] = arr [ i ] for i in range ( 1 , n ) : for j in range ( i ) : if ( arr [ i ] > arr [ j ] and mpis [ i ] < ( mpis [ j ] * arr [ i ] ) ) : mpis [ i ] = mpis [ j ] * arr [ i ] return max ( mpis ) ",,," if __name__ == '__main__': param = [ ([1, 1, 4, 7, 7, 9, 12, 20, 45, 53, 58, 63, 65, 65, 86, 98, 98],12,), ([46, -58, 70, 60, 74, 42, 6, -26, 78, 32, 14, -56, -48, 86, -2, 94, -44, -62, -50, -8, -4, -36, -62, -98, -98, -78, 56, 92, 88],27,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([13, 71, 93, 68, 43, 75, 44, 15, 1, 91, 7, 9, 65, 85, 46, 87, 37, 74, 19, 30, 87, 27, 82, 92, 12, 36, 6, 27, 76, 80, 30, 83, 67, 83, 65, 28, 81, 59, 63, 11, 70],20,), ([-96, -94, -92, -88, -84, -80, -74, -70, -62, -56, -48, -46, -40, -34, -32, -26, -22, -22, -12, -10, -8, -6, -2, 0, 2, 4, 6, 18, 18, 30, 34, 34, 38, 38, 40, 48, 54, 56, 60, 84, 88, 88, 90, 94, 96],30,), ([1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],22,), ([1, 1, 5, 5, 6, 7, 18, 35, 39, 51, 64, 73, 87, 90, 91, 92],11,), ([-54, 8, -92, -28, 72, 54, -74, 36, -10, 54, -30, -16, -72, -32, -92, 38, -76, -76, -50, -92, 48],19,), ([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],26,), ([47, 57, 72, 40, 53, 46, 62, 51, 42, 89, 9, 91, 58, 67, 20, 91, 63, 50, 32, 6, 63, 49, 3, 89, 87, 54, 65, 72, 72, 62, 31, 6, 48, 87, 17, 95, 59, 57],30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_NUMBER_PERFECT_SQUARES_TWO_GIVEN_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_NUMBER_PERFECT_SQUARES_TWO_GIVEN_NUMBERS{ static int f_gold ( int a , int b ) { int cnt = 0 ; for ( int i = a ; i <= b ; i ++ ) for ( int j = 1 ; j * j <= i ; j ++ ) if ( j * j == i ) cnt ++ ; return cnt ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(48); param0.add(3); param0.add(20); param0.add(98); param0.add(96); param0.add(40); param0.add(9); param0.add(57); param0.add(28); param0.add(98); List param1 = new ArrayList<>(); param1.add(42); param1.add(82); param1.add(72); param1.add(98); param1.add(90); param1.add(82); param1.add(15); param1.add(77); param1.add(80); param1.add(75); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int a, int b ) { int cnt = 0; for ( int i = a; i <= b; i ++ ) for ( int j = 1; j * j <= i; j ++ ) if ( j * j == i ) cnt ++; return cnt; } int main() { int n_success = 0; vector param0 {48,3,20,98,96,40,9,57,28,98}; vector param1 {42,82,72,98,90,82,15,77,80,75}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_SERIES_0_6_0_06_0_006_0_0006_N_TERMS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SERIES_0_6_0_06_0_006_0_0006_N_TERMS{ static double f_gold ( int n ) { return ( 0.666 ) * ( 1 - 1 / Math . pow ( 10 , n ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(2); param0.add(3); param0.add(4); param0.add(5); param0.add(74); param0.add(77); param0.add(67); param0.add(9); param0.add(12); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( ( 0.666 ) * ( 1 - 1 / pow ( 10 , n ) ) ) ; "," using namespace std; float f_gold ( int n ) { return ( 0.666 ) * ( 1 - 1 / pow ( 10, n ) ); } int main() { int n_success = 0; vector param0 {1,2,3,4,5,74,77,67,9,12}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (2,), (3,), (4,), (5,), (74,), (77,), (67,), (9,), (12,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMIZE_SUM_CONSECUTIVE_DIFFERENCES_CIRCULAR_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMIZE_SUM_CONSECUTIVE_DIFFERENCES_CIRCULAR_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int sum = 0 ; Arrays . sort ( arr ) ; for ( int i = 0 ; i < n / 2 ; i ++ ) { sum -= ( 2 * arr [ i ] ) ; sum += ( 2 * arr [ n - i - 1 ] ) ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,9,12,13,17,21,24,29,37,37,39,40,41,45,49,50,53,54,56,59,60,60,70,71,72,74,77,77,78,85,89,89,90,90,95,98,98}); param0.add(new int[]{0,48,-32,28,-84,14,30,-80,92,76,-52,-20,52,78,20,32,96,66,48,26,88,6,94,32,-40,44,-84,54,-84,-80,-80,-64,-92,-84,-16,-18}); param0.add(new int[]{0,0,0,1,1,1}); param0.add(new int[]{47,7,84,96,59,53,80}); param0.add(new int[]{-88,-80,-68,-62,-60,-60,-48,-46,-44,-38,-16,-16,0,0,2,8,20,36,40,40,44,54,60,68,70,82,82,84,92,94,96}); param0.add(new int[]{1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,0,1,1}); param0.add(new int[]{2,5,10,11,13,14,15,17,17,23,23,24,27,27,28,29,30,40,42,43,46,47,51,52,57,64,65,73,74,75,76,77,81,81,82,87,89,93,95,95,99}); param0.add(new int[]{-72,-84,84,2,-76,48,12,-72,-92,-72,38,26,-38,26,50,2,20,26,-48,30,24,-12,-84,-54,20,-16,-94,26,-22,86}); param0.add(new int[]{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}); param0.add(new int[]{57,74,53,52,80,31,27,53,8,57,46,73,46,56,73,84,37,7,97}); List param1 = new ArrayList<>(); param1.add(34); param1.add(24); param1.add(3); param1.add(5); param1.add(29); param1.add(32); param1.add(35); param1.add(21); param1.add(37); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : sum = 0 arr.sort ( ) for i in range ( 0 , int ( n / 2 ) ) : sum -= ( 2 * arr [ i ] ) sum += ( 2 * arr [ n - i - 1 ] ) return sum "," using namespace std; int f_gold ( int arr [ ], int n ) { int sum = 0; sort ( arr, arr + n ); for ( int i = 0; i < n / 2; i ++ ) { sum -= ( 2 * arr [ i ] ); sum += ( 2 * arr [ n - i - 1 ] ); } return sum; } int main() { int n_success = 0; vector> param0 {{8,9,12,13,17,21,24,29,37,37,39,40,41,45,49,50,53,54,56,59,60,60,70,71,72,74,77,77,78,85,89,89,90,90,95,98,98},{0,48,-32,28,-84,14,30,-80,92,76,-52,-20,52,78,20,32,96,66,48,26,88,6,94,32,-40,44,-84,54,-84,-80,-80,-64,-92,-84,-16,-18},{0,0,0,1,1,1},{47,7,84,96,59,53,80},{-88,-80,-68,-62,-60,-60,-48,-46,-44,-38,-16,-16,0,0,2,8,20,36,40,40,44,54,60,68,70,82,82,84,92,94,96},{1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,0,1,1},{2,5,10,11,13,14,15,17,17,23,23,24,27,27,28,29,30,40,42,43,46,47,51,52,57,64,65,73,74,75,76,77,81,81,82,87,89,93,95,95,99},{-72,-84,84,2,-76,48,12,-72,-92,-72,38,26,-38,26,50,2,20,26,-48,30,24,-12,-84,-54,20,-16,-94,26,-22,86},{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},{57,74,53,52,80,31,27,53,8,57,46,73,46,56,73,84,37,7,97}}; vector param1 {34,24,3,5,29,32,35,21,37,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 9, 12, 13, 17, 21, 24, 29, 37, 37, 39, 40, 41, 45, 49, 50, 53, 54, 56, 59, 60, 60, 70, 71, 72, 74, 77, 77, 78, 85, 89, 89, 90, 90, 95, 98, 98],34,), ([0, 48, -32, 28, -84, 14, 30, -80, 92, 76, -52, -20, 52, 78, 20, 32, 96, 66, 48, 26, 88, 6, 94, 32, -40, 44, -84, 54, -84, -80, -80, -64, -92, -84, -16, -18],24,), ([0, 0, 0, 1, 1, 1],3,), ([47, 7, 84, 96, 59, 53, 80],5,), ([-88, -80, -68, -62, -60, -60, -48, -46, -44, -38, -16, -16, 0, 0, 2, 8, 20, 36, 40, 40, 44, 54, 60, 68, 70, 82, 82, 84, 92, 94, 96],29,), ([1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1],32,), ([2, 5, 10, 11, 13, 14, 15, 17, 17, 23, 23, 24, 27, 27, 28, 29, 30, 40, 42, 43, 46, 47, 51, 52, 57, 64, 65, 73, 74, 75, 76, 77, 81, 81, 82, 87, 89, 93, 95, 95, 99],35,), ([-72, -84, 84, 2, -76, 48, 12, -72, -92, -72, 38, 26, -38, 26, 50, 2, 20, 26, -48, 30, 24, -12, -84, -54, 20, -16, -94, 26, -22, 86],21,), ([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],37,), ([57, 74, 53, 52, 80, 31, 27, 53, 8, 57, 46, 73, 46, 56, 73, 84, 37, 7, 97],13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FINDING_POWER_PRIME_NUMBER_P_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FINDING_POWER_PRIME_NUMBER_P_N{ static int f_gold ( int n , int p ) { int ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { int count = 0 , temp = i ; while ( temp % p == 0 ) { count ++ ; temp = temp / p ; } ans += count ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(49); param0.add(80); param0.add(10); param0.add(81); param0.add(11); param0.add(45); param0.add(86); param0.add(27); param0.add(80); param0.add(97); List param1 = new ArrayList<>(); param1.add(30); param1.add(25); param1.add(9); param1.add(57); param1.add(4); param1.add(34); param1.add(90); param1.add(78); param1.add(60); param1.add(31); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , p ) : ans = 0 ; temp = p ; while ( temp <= n ) : ans += n / temp ; temp = temp * p ; return ans ; "," using namespace std; int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; } int main() { int n_success = 0; vector param0 {49,80,10,81,11,45,86,27,80,97}; vector param1 {30,25,9,57,4,34,90,78,60,31}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (49,30,), (80,25,), (10,9,), (81,57,), (11,4,), (45,34,), (86,90,), (27,78,), (80,60,), (97,31,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION{ static int f_gold ( int p [ ] , int i , int j ) { if ( i == j ) return 0 ; int min = Integer . MAX_VALUE ; for ( int k = i ; k < j ; k ++ ) { int count = f_gold ( p , i , k ) + f_gold ( p , k + 1 , j ) + p [ i - 1 ] * p [ k ] * p [ j ] ; if ( count < min ) min = count ; } return min ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,12,16,30,31,31,33,34,45,48,57,63,81,83}); param0.add(new int[]{30,-78,42,-6,42,56,-38,28,-96,-96,84,-18,0,20,-56,-40,-58,-74,64,62,-22,78,10,-22,16,-48,2,14,82,-92,-64,-18,42,24,22,-50,12,-76,38,-30,-86,-58,-6,-4,10,28}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{54,46}); param0.add(new int[]{-80,-76,-68,-66,-54,-12,-10,-6,6,8,20,20,22,60,66,78,78,82,98}); param0.add(new int[]{0,0,1,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0}); param0.add(new int[]{14,21,29,31,37,50,51,54,57,62,64,72,85,98}); param0.add(new int[]{-86,98,90,-20,90,68,70,-24,-10,-80,70,-42,14,56,-26,-42,2,-62,24,10,-46,-66,-82,-98,-84,-2,-52,-50,0,-18,90,-32,98,86}); param0.add(new int[]{0,0,1,1,1,1}); param0.add(new int[]{52,15,61,73,45,5,15,54,69,90,5,56,13,54,27,72,58,21,35,2,59,55,64,92,54,63,50,95,38,53,38,53,73,27,86,86,99,42,85,80,43,32,80,57,78}); List param1 = new ArrayList<>(); param1.add(10); param1.add(30); param1.add(7); param1.add(1); param1.add(13); param1.add(20); param1.add(7); param1.add(23); param1.add(5); param1.add(26); List param2 = new ArrayList<>(); param2.add(9); param2.add(27); param2.add(7); param2.add(1); param2.add(10); param2.add(17); param2.add(11); param2.add(26); param2.add(4); param2.add(42); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int p [ ], int i, int j ) { if ( i == j ) return 0; int k; int min = INT_MAX; int count; for ( k = i; k < j; k ++ ) { count = f_gold ( p, i, k ) + f_gold ( p, k + 1, j ) + p [ i - 1 ] * p [ k ] * p [ j ]; if ( count < min ) min = count; } return min; } int main() { int n_success = 0; vector> param0 {{6,12,16,30,31,31,33,34,45,48,57,63,81,83},{30,-78,42,-6,42,56,-38,28,-96,-96,84,-18,0,20,-56,-40,-58,-74,64,62,-22,78,10,-22,16,-48,2,14,82,-92,-64,-18,42,24,22,-50,12,-76,38,-30,-86,-58,-6,-4,10,28},{0,0,0,0,0,0,1,1,1,1,1,1,1},{54,46},{-80,-76,-68,-66,-54,-12,-10,-6,6,8,20,20,22,60,66,78,78,82,98},{0,0,1,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0},{14,21,29,31,37,50,51,54,57,62,64,72,85,98},{-86,98,90,-20,90,68,70,-24,-10,-80,70,-42,14,56,-26,-42,2,-62,24,10,-46,-66,-82,-98,-84,-2,-52,-50,0,-18,90,-32,98,86},{0,0,1,1,1,1},{52,15,61,73,45,5,15,54,69,90,5,56,13,54,27,72,58,21,35,2,59,55,64,92,54,63,50,95,38,53,38,53,73,27,86,86,99,42,85,80,43,32,80,57,78}}; vector param1 {10,30,7,1,13,20,7,23,5,26}; vector param2 {9,27,7,1,10,17,11,26,4,42}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, NON_REPEATING_ELEMENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NON_REPEATING_ELEMENT{ static int f_gold ( int arr [ ] , int n ) { for ( int i = 0 ; i < n ; i ++ ) { int j ; for ( j = 0 ; j < n ; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break ; if ( j == n ) return arr [ i ] ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,3,4,6,6,7,9,10,13,16,23,30,32,36,42,42,43,44,47,48,48,49,52,52,53,55,56,58,59,60,60,63,67,68,68,74,75,76,80,81,81,83,83,86,87,91,92,97}); param0.add(new int[]{-96,-46,-86,56,-72,50,18,8,50}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{19,10,49,40,34,21,63,51}); param0.add(new int[]{-96,-96,-90,-88,-88,-84,-80,-76,-68,-64,-64,-52,-52,-52,-52,-50,-50,-48,-48,-40,-32,-26,-24,-22,-20,-14,-12,0,6,8,10,20,24,28,34,36,54,60,60,60,68,74,74,74,84,88,94}); param0.add(new int[]{1,0,0,1,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,0}); param0.add(new int[]{1,2,3,10,15,21,28,36,41,44,45,47,72,77,77,79,85}); param0.add(new int[]{42,-84,42,36,-10,24,-62,60}); param0.add(new int[]{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}); param0.add(new int[]{2,21,42,92,65,62,75,43,81,17,92,86,37,63,27,97,24,61,85,49,84,7,14,19,60,55,68,79,8,12,75,12,92,79,42}); List param1 = new ArrayList<>(); param1.add(47); param1.add(8); param1.add(14); param1.add(5); param1.add(27); param1.add(19); param1.add(15); param1.add(7); param1.add(35); param1.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : for i in range ( n ) : j = 0 while ( j < n ) : if ( i != j and arr [ i ] == arr [ j ] ) : break j += 1 if ( j == n ) : return arr [ i ] return - 1 "," using namespace std; int f_gold ( int arr [ ], int n ) { for ( int i = 0; i < n; i ++ ) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ i ] == arr [ j ] ) break; if ( j == n ) return arr [ i ]; } return - 1; } int main() { int n_success = 0; vector> param0 {{1,2,3,4,6,6,7,9,10,13,16,23,30,32,36,42,42,43,44,47,48,48,49,52,52,53,55,56,58,59,60,60,63,67,68,68,74,75,76,80,81,81,83,83,86,87,91,92,97},{-96,-46,-86,56,-72,50,18,8,50},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{19,10,49,40,34,21,63,51},{-96,-96,-90,-88,-88,-84,-80,-76,-68,-64,-64,-52,-52,-52,-52,-50,-50,-48,-48,-40,-32,-26,-24,-22,-20,-14,-12,0,6,8,10,20,24,28,34,36,54,60,60,60,68,74,74,74,84,88,94},{1,0,0,1,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,0},{1,2,3,10,15,21,28,36,41,44,45,47,72,77,77,79,85},{42,-84,42,36,-10,24,-62,60},{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},{2,21,42,92,65,62,75,43,81,17,92,86,37,63,27,97,24,61,85,49,84,7,14,19,60,55,68,79,8,12,75,12,92,79,42}}; vector param1 {47,8,14,5,27,19,15,7,35,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 2, 3, 4, 6, 6, 7, 9, 10, 13, 16, 23, 30, 32, 36, 42, 42, 43, 44, 47, 48, 48, 49, 52, 52, 53, 55, 56, 58, 59, 60, 60, 63, 67, 68, 68, 74, 75, 76, 80, 81, 81, 83, 83, 86, 87, 91, 92, 97],47,), ([-96, -46, -86, 56, -72, 50, 18, 8, 50],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([19, 10, 49, 40, 34, 21, 63, 51],5,), ([-96, -96, -90, -88, -88, -84, -80, -76, -68, -64, -64, -52, -52, -52, -52, -50, -50, -48, -48, -40, -32, -26, -24, -22, -20, -14, -12, 0, 6, 8, 10, 20, 24, 28, 34, 36, 54, 60, 60, 60, 68, 74, 74, 74, 84, 88, 94],27,), ([1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0],19,), ([1, 2, 3, 10, 15, 21, 28, 36, 41, 44, 45, 47, 72, 77, 77, 79, 85],15,), ([42, -84, 42, 36, -10, 24, -62, 60],7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],35,), ([2, 21, 42, 92, 65, 62, 75, 43, 81, 17, 92, 86, 37, 63, 27, 97, 24, 61, 85, 49, 84, 7, 14, 19, 60, 55, 68, 79, 8, 12, 75, 12, 92, 79, 42],27,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD_1{ static boolean f_gold ( int n ) { if ( n <= 1 ) return false ; if ( n <= 3 ) return true ; if ( n % 2 == 0 || n % 3 == 0 ) return false ; for ( int i = 5 ; i * i <= n ; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(15); param0.add(90); param0.add(38); param0.add(65); param0.add(91); param0.add(16); param0.add(48); param0.add(74); param0.add(14); param0.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): if (n <= 1): return False if (n <= 3): return True if (n % 2 == 0 or n % 3 == 0): return False i = 5 while (i * i <= n): if (n % i == 0 or n % (i + 2) == 0): return False i = i + 6 return True "," using namespace std; bool f_gold ( int n ) { if ( n <= 1 ) return false; if ( n <= 3 ) return true; if ( n % 2 == 0 || n % 3 == 0 ) return false; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false; return true; } int main() { int n_success = 0; vector param0 {15,90,38,65,91,16,48,74,14,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (15,), (90,), (38,), (65,), (91,), (16,), (48,), (74,), (14,), (47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_PRODUCT_OF_4_ADJACENT_ELEMENTS_IN_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PRODUCT_OF_4_ADJACENT_ELEMENTS_IN_MATRIX{ static int f_gold ( int arr [ ] [ ] , int n ) { int max = 0 , result ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( ( j - 3 ) >= 0 ) { result = arr [ i ] [ j ] * arr [ i ] [ j - 1 ] * arr [ i ] [ j - 2 ] * arr [ i ] [ j - 3 ] ; if ( max < result ) max = result ; } if ( ( i - 3 ) >= 0 ) { result = arr [ i ] [ j ] * arr [ i - 1 ] [ j ] * arr [ i - 2 ] [ j ] * arr [ i - 3 ] [ j ] ; if ( max < result ) max = result ; } if ( ( i - 3 ) >= 0 && ( j - 3 ) >= 0 ) { result = arr [ i ] [ j ] * arr [ i - 1 ] [ j - 1 ] * arr [ i - 2 ] [ j - 2 ] * arr [ i - 3 ] [ j - 3 ] ; if ( max < result ) max = result ; } } } return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,2,5,6,7,11,12,14,15,16,19,19,24,25,32,34,36,36,38,38,39,43,43,45,47,49,51,51,51,52,53,56,59,59,67,69,70,74,75,75,77,79,81,90,94,96,96,96},new int[]{1,2,4,6,9,9,9,16,18,21,23,26,26,30,36,37,37,38,39,42,45,49,51,52,52,53,56,59,61,61,64,64,69,72,77,79,82,82,87,88,89,91,91,91,94,95,95,98},new int[]{2,5,5,6,10,10,14,16,16,20,22,24,25,28,28,29,30,31,36,38,42,44,44,45,45,49,51,53,56,57,61,63,66,67,67,70,76,80,87,87,91,93,95,96,96,96,97,99},new int[]{4,9,10,11,12,13,13,18,20,23,24,26,27,28,33,35,35,37,42,42,44,45,49,52,55,56,59,60,60,63,64,64,72,72,74,77,78,81,85,85,87,89,93,93,95,98,98,99},new int[]{7,7,7,9,11,11,14,18,19,21,26,32,32,34,35,37,37,39,40,41,42,53,56,59,62,62,65,68,69,70,72,73,73,75,75,77,77,78,85,86,87,88,88,88,93,94,95,98},new int[]{4,4,5,12,16,19,20,23,25,27,28,37,38,39,40,41,45,46,47,48,49,49,55,58,61,61,62,67,67,69,69,71,72,73,75,76,76,77,77,79,81,85,86,90,90,97,97,99},new int[]{1,9,9,11,19,19,21,23,25,26,26,27,28,31,37,38,41,41,43,43,49,54,55,56,58,58,61,62,63,64,64,68,70,75,79,81,83,84,85,85,86,87,92,92,92,94,94,97},new int[]{2,6,8,10,11,11,12,13,14,15,15,19,23,25,27,29,33,33,41,43,45,47,49,49,51,52,55,59,60,62,64,64,65,65,72,74,76,79,83,83,84,90,91,92,93,93,94,96},new int[]{5,9,11,12,13,15,16,21,24,28,32,33,36,37,40,45,46,48,57,60,63,63,63,63,64,66,68,68,73,75,75,77,77,79,80,81,83,84,84,85,85,85,89,91,91,92,94,99},new int[]{2,2,4,6,6,11,14,15,15,18,25,25,27,28,30,31,32,36,37,40,40,41,42,46,52,59,60,60,61,62,63,65,68,68,69,71,73,74,75,78,79,82,93,93,93,94,97,99},new int[]{1,1,4,5,5,6,8,8,9,10,11,12,15,21,22,28,32,33,35,35,36,38,41,44,49,53,54,57,58,59,62,62,63,67,68,69,70,75,77,77,82,83,83,86,90,91,92,97},new int[]{1,1,3,4,5,9,9,13,15,24,27,28,33,37,37,39,40,41,41,48,50,50,51,52,54,63,63,64,65,68,70,71,73,74,74,74,79,79,80,83,89,90,90,93,94,98,99,99},new int[]{2,3,5,9,11,11,20,22,23,25,26,26,26,29,39,39,40,40,48,48,49,49,50,51,51,53,54,58,65,66,67,71,71,72,75,76,79,85,87,87,90,91,95,97,98,98,98,99},new int[]{4,4,9,9,10,13,15,22,23,23,24,26,26,27,28,29,31,33,34,38,40,45,45,47,48,50,50,58,59,60,64,65,66,70,80,80,81,83,84,84,88,89,90,90,95,98,99,99},new int[]{2,4,5,7,9,11,11,12,13,15,17,19,23,26,26,28,28,29,34,35,43,47,48,49,51,51,51,56,57,58,60,61,63,64,66,68,68,71,72,74,78,80,81,84,86,90,91,97},new int[]{1,2,3,4,6,7,7,12,13,17,19,22,23,33,33,38,40,44,44,47,47,51,52,54,56,56,57,58,64,65,67,68,74,74,76,79,80,83,85,88,90,92,92,93,93,94,97,99},new int[]{1,4,5,10,13,13,20,22,23,28,30,31,32,33,36,36,44,46,49,49,51,51,51,55,56,60,69,72,73,74,74,75,75,77,78,78,81,82,82,84,87,87,88,91,91,95,97,99},new int[]{2,3,4,10,13,13,14,16,18,23,31,35,39,41,42,42,43,43,48,49,49,53,56,57,57,58,64,65,68,68,68,74,75,77,78,78,82,83,84,87,88,89,89,91,92,93,99,99},new int[]{2,4,5,8,10,12,13,16,17,18,23,24,28,29,29,31,32,34,38,39,39,43,45,50,51,51,54,55,58,59,59,61,62,63,63,65,65,72,74,82,82,84,92,92,93,94,95,97},new int[]{6,7,9,10,10,10,11,14,16,19,22,24,33,38,41,47,50,50,51,52,52,54,55,57,57,57,59,62,66,66,66,67,68,72,72,73,80,81,81,83,87,88,89,94,96,97,97,98},new int[]{2,4,5,6,9,13,14,14,14,16,20,21,23,23,24,24,27,29,31,33,36,37,43,48,49,50,51,56,57,59,62,62,65,70,71,72,74,74,75,77,80,81,84,87,89,93,96,99},new int[]{1,2,3,6,8,17,27,28,30,31,32,32,33,33,37,40,41,42,42,45,49,51,52,54,57,60,62,62,64,64,65,67,67,70,73,77,77,80,83,83,83,83,85,85,92,95,97,97},new int[]{1,3,11,11,12,15,20,22,22,22,23,23,23,24,26,28,33,33,34,34,36,39,41,42,42,43,50,50,54,56,59,60,64,70,74,75,76,82,82,89,89,94,96,96,96,98,98,98},new int[]{2,2,3,4,7,11,14,18,18,18,21,23,28,29,32,33,33,33,34,39,39,40,41,42,48,49,50,52,56,57,57,58,59,66,66,70,72,74,76,77,77,79,86,86,89,92,94,99},new int[]{1,9,10,12,13,14,17,18,20,21,23,23,25,26,28,28,31,33,33,36,37,41,41,41,41,42,43,44,47,51,54,57,59,59,59,63,64,67,69,69,75,78,84,85,93,98,98,99},new int[]{1,3,5,8,9,9,10,18,18,18,19,21,23,24,24,25,26,27,29,34,34,35,37,37,39,39,41,48,56,57,59,61,64,65,68,69,75,75,75,76,78,83,85,86,90,94,97,98},new int[]{7,8,11,13,14,15,16,16,17,20,28,31,39,41,42,46,51,52,53,53,54,57,57,66,66,67,72,72,73,74,74,78,82,82,83,84,85,87,89,91,93,95,95,97,98,98,98,99},new int[]{1,2,4,5,6,8,8,12,12,12,20,20,25,29,30,31,38,38,39,39,42,43,43,44,45,47,47,51,56,56,57,58,62,65,65,65,66,69,69,73,78,82,83,85,87,90,95,96},new int[]{2,2,3,3,6,7,8,14,15,16,16,17,20,23,25,29,29,31,32,33,37,37,39,40,40,47,48,48,50,51,52,55,55,56,59,62,69,70,71,72,72,81,82,84,89,92,96,99},new int[]{2,8,9,10,16,17,23,30,32,37,38,41,41,46,49,49,55,57,59,59,63,63,64,66,68,68,69,70,72,74,76,77,80,81,83,84,84,85,86,90,90,91,91,92,96,96,97,97},new int[]{1,7,13,13,17,17,18,23,24,31,33,34,34,35,36,40,40,40,40,44,45,51,53,55,55,58,58,64,64,69,72,75,75,80,80,81,82,82,83,84,86,87,87,88,89,95,96,99},new int[]{1,4,7,9,10,11,13,15,15,19,21,23,23,24,25,27,32,32,33,37,38,41,43,43,45,45,47,51,52,53,54,58,59,61,63,63,65,73,76,77,80,80,85,87,90,92,94,96},new int[]{3,4,7,7,12,13,20,20,20,21,22,22,27,27,28,31,32,35,37,39,39,40,41,45,45,45,48,48,49,49,51,54,57,64,67,70,80,83,89,89,90,90,90,92,92,98,98,99},new int[]{1,1,7,10,12,16,16,21,27,31,33,34,36,44,45,46,46,46,47,49,49,53,54,57,57,58,58,62,62,63,67,69,77,79,82,82,84,85,85,85,85,86,92,93,94,94,96,99},new int[]{1,1,4,14,14,17,19,20,21,29,30,30,32,33,34,36,36,44,46,47,48,53,57,59,59,62,63,64,65,65,66,69,69,70,72,73,74,74,80,81,83,84,84,84,85,85,87,94},new int[]{9,13,16,18,19,19,21,23,24,24,25,30,32,33,35,36,37,42,46,47,48,48,52,54,55,62,62,66,67,69,70,70,71,71,73,74,75,77,78,79,80,82,83,86,88,89,94,99},new int[]{1,2,2,4,13,14,15,15,18,18,18,19,21,22,22,22,24,28,31,36,45,46,47,49,51,52,56,56,58,66,67,68,69,71,73,75,77,78,79,79,82,87,87,93,93,97,97,98},new int[]{2,3,4,4,8,11,14,14,16,19,25,29,32,36,39,45,46,46,46,47,50,51,52,55,56,57,61,63,63,64,66,67,70,72,75,76,80,82,83,84,84,87,89,90,92,94,96,97},new int[]{3,6,10,11,14,15,19,20,21,23,28,29,30,30,32,34,34,38,39,41,41,44,45,47,50,50,50,54,57,57,58,58,63,65,66,68,68,69,73,75,76,79,83,86,89,94,95,96},new int[]{4,10,13,18,18,21,21,22,22,22,24,24,25,25,26,29,29,39,50,51,51,53,55,56,56,56,57,60,61,62,67,67,69,69,73,76,76,76,77,79,79,80,82,84,89,90,95,97},new int[]{1,6,8,10,10,25,35,38,39,40,40,40,41,41,43,47,51,56,56,56,57,60,60,62,63,64,65,68,69,72,73,75,76,76,76,78,79,79,79,80,82,82,84,90,91,95,96,99},new int[]{2,3,7,10,11,11,17,17,19,21,21,23,24,26,28,29,31,33,44,44,44,45,48,48,50,50,52,54,56,58,61,65,66,67,69,70,72,72,74,81,84,85,86,87,92,93,98,99},new int[]{1,3,3,3,6,9,13,14,14,22,25,26,28,28,33,36,38,38,41,44,45,46,46,51,55,56,57,57,59,62,64,65,65,68,77,78,79,79,84,85,87,90,94,95,95,95,97,99},new int[]{7,7,8,9,14,18,24,24,25,27,28,28,30,31,31,31,33,36,36,37,37,38,40,43,45,46,46,47,50,51,51,52,52,53,53,60,62,65,65,67,73,76,79,88,91,94,95,95},new int[]{4,5,7,16,17,18,18,18,21,24,25,27,28,31,33,35,36,36,38,40,42,42,42,45,46,46,47,49,50,52,53,65,68,68,69,69,71,71,71,72,75,76,76,80,80,87,90,95},new int[]{9,11,12,14,15,20,22,23,29,29,29,33,35,35,37,37,41,42,44,45,45,47,50,51,51,51,55,57,62,64,66,66,67,76,80,82,82,83,83,83,83,83,85,86,90,90,92,93},new int[]{1,3,3,7,8,8,11,16,19,20,25,29,32,33,39,39,42,43,43,44,47,48,49,50,51,53,54,54,58,60,60,60,62,64,65,67,71,74,75,77,83,84,85,87,87,90,91,97},new int[]{2,5,5,12,13,16,17,19,20,22,26,28,28,30,30,31,36,37,41,44,44,44,46,50,51,51,51,54,54,57,58,58,59,60,62,66,66,68,68,71,75,76,84,85,89,90,91,95}}); param0.add(new int[][]{new int[]{36,16,60,44,14,-68,-28,-98,14,-6,24,56,54,70,70},new int[]{-14,28,-16,-26,-54,60,2,52,28,-42,36,6,14,2,-30},new int[]{-26,56,-60,-6,24,-36,76,-52,20,-54,-22,38,90,-2,-70},new int[]{62,-70,-50,18,62,-34,-74,66,30,64,6,94,-72,58,-82},new int[]{30,28,6,-38,-40,-98,-14,-80,-84,-20,-8,12,-90,-26,-48},new int[]{-2,64,-38,-82,-82,-18,-14,-20,28,16,-94,-78,-80,-4,32},new int[]{-82,-74,68,78,-56,24,-58,36,-10,28,98,42,26,-98,92},new int[]{40,-82,56,98,68,-8,48,-78,-72,-40,78,22,-76,68,10},new int[]{88,88,80,52,-66,-16,-24,-84,56,-10,70,-2,42,64,62},new int[]{-76,-52,70,-10,24,-46,62,-98,28,-78,58,-10,-76,40,-98},new int[]{-82,-58,-12,-98,-54,-62,-32,52,48,64,28,72,-84,48,-14},new int[]{-72,66,-84,34,-96,66,-90,48,86,-34,-4,-70,-88,-76,46},new int[]{40,70,22,-40,64,-32,-68,-6,-78,-56,-96,-98,-26,-38,-90},new int[]{98,32,20,2,-56,12,72,-40,24,78,98,76,98,-8,70},new int[]{-30,-34,-34,46,18,-48,-96,-12,-60,-90,-50,-64,12,60,-94}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{43,44,74,24,47,58,43,11,78,61},new int[]{93,7,12,81,39,13,50,62,27,87},new int[]{27,9,63,68,8,83,44,22,83,2},new int[]{70,73,44,15,37,38,42,21,20,75},new int[]{72,43,56,93,92,73,34,9,28,38},new int[]{4,83,97,56,44,89,92,51,82,68},new int[]{55,51,72,78,65,66,10,13,71,85},new int[]{97,15,49,86,56,56,92,84,98,73},new int[]{89,44,19,45,74,7,76,60,42,34},new int[]{65,47,3,34,46,97,98,78,19,57}}); param0.add(new int[][]{new int[]{-88,-82,-70,-46,-44,-18,12,38,66,90,96},new int[]{-98,-90,-84,-62,-42,-30,-16,4,14,18,26},new int[]{-94,-48,-32,-24,-22,-18,42,44,64,70,74},new int[]{-94,-60,-58,-56,-40,-34,2,18,32,76,96},new int[]{-94,-74,-62,-56,-50,-46,-2,34,34,44,68},new int[]{-74,-56,-50,-16,-14,0,14,30,30,66,82},new int[]{-80,-78,-60,-56,-46,-32,4,8,14,42,54},new int[]{-68,-66,-58,-50,-50,-40,-16,-2,4,10,80},new int[]{-70,-68,-24,-8,-4,34,36,60,82,84,92},new int[]{-90,-62,-60,-54,-6,-6,10,10,14,52,66},new int[]{-88,-72,-70,-18,-6,28,38,50,56,72,90}}); param0.add(new int[][]{new int[]{0,0,1,1,1,0,1,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1,1,1},new int[]{1,1,0,0,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,1,1,1,1,0,1,0,1,1,0,0},new int[]{1,1,1,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,1,0,1,1,0,0,0,1},new int[]{0,0,0,0,0,1,1,1,0,1,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,1,0},new int[]{1,1,1,1,0,1,1,0,0,1,1,1,0,1,0,0,1,1,1,1,1,0,1,0,1,1,1,0,0,1,1,0},new int[]{0,0,0,0,0,1,0,1,1,0,0,1,1,0,1,1,0,1,1,0,0,1,1,1,0,1,0,1,1,0,0,0},new int[]{0,1,1,1,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,1,0,0,1,1,1,0,0,0,0,1,1,0},new int[]{0,0,0,0,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1},new int[]{1,0,0,1,1,1,0,0,0,1,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,0,0,0,1,1,1},new int[]{1,0,1,0,1,1,1,0,1,1,1,1,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,1,0,1,0,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,1,0,0,1,1,1,0,1,1,0,0,1,1,0,0},new int[]{1,0,0,1,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,1,1,0,0,0,0,1},new int[]{0,0,1,1,1,0,1,1,0,0,0,1,0,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1},new int[]{0,1,0,0,1,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,0,1,0,0,1,1,1,0,0,0,1,0},new int[]{1,0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,0,1,1,0,1,1,0,1,1,0,0,0,1,1},new int[]{0,1,0,0,1,0,0,0,0,1,0,0,1,1,1,0,1,0,0,0,0,1,1,0,1,0,0,1,0,1,0,0},new int[]{0,0,0,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,1,1,0,1},new int[]{0,1,1,0,1,0,0,1,1,0,1,0,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,0,0,1,0,1},new int[]{1,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,0,1},new int[]{0,1,0,1,1,1,1,0,1,0,0,1,1,0,1,1,0,0,0,0,0,0,1,1,1,0,0,1,1,1,0,1},new int[]{1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0},new int[]{1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,0,1,1,0,1,0,0,1,1,1,0,0,1,1,1,1},new int[]{0,0,1,1,0,1,1,0,0,0,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,0,1,1},new int[]{0,0,0,1,1,0,0,0,1,0,1,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,1,1,0,1,0},new int[]{1,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,0,1,0,0,1,1,0,1,1,0,1,1,1,0,1,1},new int[]{1,0,0,0,0,1,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,1,1,0,0,1,1,1,1,1,1,0},new int[]{0,1,1,1,1,1,0,1,1,0,0,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1},new int[]{1,0,0,1,1,1,0,1,0,0,1,0,1,1,1,0,0,0,1,0,0,1,0,1,1,0,1,1,0,1,0,0},new int[]{0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1,0,1,0,0,1,1,0,1,1,0,1,0},new int[]{0,0,1,1,1,1,0,1,1,0,1,1,1,1,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1,1,0,0},new int[]{0,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,1,0,1,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0}}); param0.add(new int[][]{new int[]{8,14,19,21,33,35,37,40,44,49,52,68,68,72,77,80,86,88,88,99},new int[]{10,12,18,18,25,27,30,32,32,42,46,47,48,53,67,69,70,84,85,89},new int[]{12,15,18,24,26,33,41,45,55,71,73,79,82,87,88,88,89,91,92,98},new int[]{1,1,11,16,24,24,27,42,49,50,69,69,72,73,75,80,80,82,95,96},new int[]{1,6,12,13,14,22,28,30,39,51,53,66,68,68,69,77,86,90,96,99},new int[]{2,6,24,26,28,32,32,37,38,54,56,61,64,64,68,71,71,76,79,86},new int[]{22,31,32,34,39,47,54,57,59,61,62,72,72,74,79,79,80,85,91,93},new int[]{3,7,12,13,15,16,21,26,26,36,56,60,62,63,64,66,67,71,76,83},new int[]{3,22,29,30,34,35,36,39,41,42,43,51,57,58,72,72,80,84,88,92},new int[]{9,14,17,29,34,37,38,39,40,46,46,52,62,68,77,78,79,92,93,95},new int[]{1,17,17,18,19,23,26,27,36,37,48,53,56,62,62,68,69,78,78,84},new int[]{20,20,22,33,33,33,43,48,60,63,64,70,77,80,80,85,87,88,91,94},new int[]{7,10,10,13,14,14,23,42,64,65,65,72,73,74,75,76,77,78,79,91},new int[]{1,4,9,12,13,13,23,23,27,33,34,34,37,40,43,63,67,70,87,96},new int[]{1,2,8,11,12,14,14,23,24,33,44,45,47,55,78,79,83,98,98,99},new int[]{3,9,18,21,24,28,34,35,45,46,59,60,60,63,64,84,95,96,97,97},new int[]{4,11,17,19,20,20,20,30,31,41,45,47,64,68,76,81,83,89,93,93},new int[]{2,8,10,21,38,40,43,44,47,52,55,71,75,80,85,85,89,92,94,99},new int[]{3,7,13,14,27,28,29,30,44,47,50,53,55,64,64,75,79,86,98,99},new int[]{10,10,10,16,17,33,44,52,53,57,59,64,65,74,75,76,80,87,90,90}}); param0.add(new int[][]{new int[]{-78,34,-74,16,-10,-10,-14,28},new int[]{-22,-84,48,-20,2,86,88,-60},new int[]{32,16,98,30,-10,48,82,56},new int[]{48,-32,-76,-54,36,56,6,82},new int[]{6,-20,64,56,6,-28,30,-72},new int[]{-32,-48,10,26,40,-8,-26,-54},new int[]{-68,-36,-86,-12,-6,62,-90,26},new int[]{-76,80,44,-82,92,-12,-56,-8}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{76,57,99,99,95,61,64,17,58,47},new int[]{52,18,37,70,17,3,33,84,80,7},new int[]{2,34,4,49,17,71,12,76,74,44},new int[]{89,49,69,17,38,56,61,75,86,84},new int[]{32,56,87,23,66,67,97,5,23,51},new int[]{25,24,30,51,30,72,46,57,29,85},new int[]{80,62,87,29,37,90,88,40,55,26},new int[]{27,75,51,91,22,65,38,91,1,15},new int[]{11,56,38,93,54,94,23,90,37,51},new int[]{61,82,79,22,66,55,67,26,93,93}}); List param1 = new ArrayList<>(); param1.add(45); param1.add(8); param1.add(18); param1.add(8); param1.add(9); param1.add(18); param1.add(15); param1.add(7); param1.add(17); param1.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : max = 0 for i in range ( n ) : for j in range ( n ) : if ( ( j - 3 ) >= 0 ) : result = ( arr [ i ] [ j ] * arr [ i ] [ j - 1 ] * arr [ i ] [ j - 2 ] * arr [ i ] [ j - 3 ] ) if ( max < result ) : max = result if ( ( i - 3 ) >= 0 ) : result = ( arr [ i ] [ j ] * arr [ i - 1 ] [ j ] * arr [ i - 2 ] [ j ] * arr [ i - 3 ] [ j ] ) if ( max < result ) : max = result if ( ( i - 3 ) >= 0 and ( j - 3 ) >= 0 ) : result = ( arr [ i ] [ j ] * arr [ i - 1 ] [ j - 1 ] * arr [ i - 2 ] [ j - 2 ] * arr [ i - 3 ] [ j - 3 ] ) if ( max < result ) : max = result return max ",,," if __name__ == '__main__': param = [ ([[1, 2, 5, 6, 7, 11, 12, 14, 15, 16, 19, 19, 24, 25, 32, 34, 36, 36, 38, 38, 39, 43, 43, 45, 47, 49, 51, 51, 51, 52, 53, 56, 59, 59, 67, 69, 70, 74, 75, 75, 77, 79, 81, 90, 94, 96, 96, 96], [1, 2, 4, 6, 9, 9, 9, 16, 18, 21, 23, 26, 26, 30, 36, 37, 37, 38, 39, 42, 45, 49, 51, 52, 52, 53, 56, 59, 61, 61, 64, 64, 69, 72, 77, 79, 82, 82, 87, 88, 89, 91, 91, 91, 94, 95, 95, 98], [2, 5, 5, 6, 10, 10, 14, 16, 16, 20, 22, 24, 25, 28, 28, 29, 30, 31, 36, 38, 42, 44, 44, 45, 45, 49, 51, 53, 56, 57, 61, 63, 66, 67, 67, 70, 76, 80, 87, 87, 91, 93, 95, 96, 96, 96, 97, 99], [4, 9, 10, 11, 12, 13, 13, 18, 20, 23, 24, 26, 27, 28, 33, 35, 35, 37, 42, 42, 44, 45, 49, 52, 55, 56, 59, 60, 60, 63, 64, 64, 72, 72, 74, 77, 78, 81, 85, 85, 87, 89, 93, 93, 95, 98, 98, 99], [7, 7, 7, 9, 11, 11, 14, 18, 19, 21, 26, 32, 32, 34, 35, 37, 37, 39, 40, 41, 42, 53, 56, 59, 62, 62, 65, 68, 69, 70, 72, 73, 73, 75, 75, 77, 77, 78, 85, 86, 87, 88, 88, 88, 93, 94, 95, 98], [4, 4, 5, 12, 16, 19, 20, 23, 25, 27, 28, 37, 38, 39, 40, 41, 45, 46, 47, 48, 49, 49, 55, 58, 61, 61, 62, 67, 67, 69, 69, 71, 72, 73, 75, 76, 76, 77, 77, 79, 81, 85, 86, 90, 90, 97, 97, 99], [1, 9, 9, 11, 19, 19, 21, 23, 25, 26, 26, 27, 28, 31, 37, 38, 41, 41, 43, 43, 49, 54, 55, 56, 58, 58, 61, 62, 63, 64, 64, 68, 70, 75, 79, 81, 83, 84, 85, 85, 86, 87, 92, 92, 92, 94, 94, 97], [2, 6, 8, 10, 11, 11, 12, 13, 14, 15, 15, 19, 23, 25, 27, 29, 33, 33, 41, 43, 45, 47, 49, 49, 51, 52, 55, 59, 60, 62, 64, 64, 65, 65, 72, 74, 76, 79, 83, 83, 84, 90, 91, 92, 93, 93, 94, 96], [5, 9, 11, 12, 13, 15, 16, 21, 24, 28, 32, 33, 36, 37, 40, 45, 46, 48, 57, 60, 63, 63, 63, 63, 64, 66, 68, 68, 73, 75, 75, 77, 77, 79, 80, 81, 83, 84, 84, 85, 85, 85, 89, 91, 91, 92, 94, 99], [2, 2, 4, 6, 6, 11, 14, 15, 15, 18, 25, 25, 27, 28, 30, 31, 32, 36, 37, 40, 40, 41, 42, 46, 52, 59, 60, 60, 61, 62, 63, 65, 68, 68, 69, 71, 73, 74, 75, 78, 79, 82, 93, 93, 93, 94, 97, 99], [1, 1, 4, 5, 5, 6, 8, 8, 9, 10, 11, 12, 15, 21, 22, 28, 32, 33, 35, 35, 36, 38, 41, 44, 49, 53, 54, 57, 58, 59, 62, 62, 63, 67, 68, 69, 70, 75, 77, 77, 82, 83, 83, 86, 90, 91, 92, 97], [1, 1, 3, 4, 5, 9, 9, 13, 15, 24, 27, 28, 33, 37, 37, 39, 40, 41, 41, 48, 50, 50, 51, 52, 54, 63, 63, 64, 65, 68, 70, 71, 73, 74, 74, 74, 79, 79, 80, 83, 89, 90, 90, 93, 94, 98, 99, 99], [2, 3, 5, 9, 11, 11, 20, 22, 23, 25, 26, 26, 26, 29, 39, 39, 40, 40, 48, 48, 49, 49, 50, 51, 51, 53, 54, 58, 65, 66, 67, 71, 71, 72, 75, 76, 79, 85, 87, 87, 90, 91, 95, 97, 98, 98, 98, 99], [4, 4, 9, 9, 10, 13, 15, 22, 23, 23, 24, 26, 26, 27, 28, 29, 31, 33, 34, 38, 40, 45, 45, 47, 48, 50, 50, 58, 59, 60, 64, 65, 66, 70, 80, 80, 81, 83, 84, 84, 88, 89, 90, 90, 95, 98, 99, 99], [2, 4, 5, 7, 9, 11, 11, 12, 13, 15, 17, 19, 23, 26, 26, 28, 28, 29, 34, 35, 43, 47, 48, 49, 51, 51, 51, 56, 57, 58, 60, 61, 63, 64, 66, 68, 68, 71, 72, 74, 78, 80, 81, 84, 86, 90, 91, 97], [1, 2, 3, 4, 6, 7, 7, 12, 13, 17, 19, 22, 23, 33, 33, 38, 40, 44, 44, 47, 47, 51, 52, 54, 56, 56, 57, 58, 64, 65, 67, 68, 74, 74, 76, 79, 80, 83, 85, 88, 90, 92, 92, 93, 93, 94, 97, 99], [1, 4, 5, 10, 13, 13, 20, 22, 23, 28, 30, 31, 32, 33, 36, 36, 44, 46, 49, 49, 51, 51, 51, 55, 56, 60, 69, 72, 73, 74, 74, 75, 75, 77, 78, 78, 81, 82, 82, 84, 87, 87, 88, 91, 91, 95, 97, 99], [2, 3, 4, 10, 13, 13, 14, 16, 18, 23, 31, 35, 39, 41, 42, 42, 43, 43, 48, 49, 49, 53, 56, 57, 57, 58, 64, 65, 68, 68, 68, 74, 75, 77, 78, 78, 82, 83, 84, 87, 88, 89, 89, 91, 92, 93, 99, 99], [2, 4, 5, 8, 10, 12, 13, 16, 17, 18, 23, 24, 28, 29, 29, 31, 32, 34, 38, 39, 39, 43, 45, 50, 51, 51, 54, 55, 58, 59, 59, 61, 62, 63, 63, 65, 65, 72, 74, 82, 82, 84, 92, 92, 93, 94, 95, 97], [6, 7, 9, 10, 10, 10, 11, 14, 16, 19, 22, 24, 33, 38, 41, 47, 50, 50, 51, 52, 52, 54, 55, 57, 57, 57, 59, 62, 66, 66, 66, 67, 68, 72, 72, 73, 80, 81, 81, 83, 87, 88, 89, 94, 96, 97, 97, 98], [2, 4, 5, 6, 9, 13, 14, 14, 14, 16, 20, 21, 23, 23, 24, 24, 27, 29, 31, 33, 36, 37, 43, 48, 49, 50, 51, 56, 57, 59, 62, 62, 65, 70, 71, 72, 74, 74, 75, 77, 80, 81, 84, 87, 89, 93, 96, 99], [1, 2, 3, 6, 8, 17, 27, 28, 30, 31, 32, 32, 33, 33, 37, 40, 41, 42, 42, 45, 49, 51, 52, 54, 57, 60, 62, 62, 64, 64, 65, 67, 67, 70, 73, 77, 77, 80, 83, 83, 83, 83, 85, 85, 92, 95, 97, 97], [1, 3, 11, 11, 12, 15, 20, 22, 22, 22, 23, 23, 23, 24, 26, 28, 33, 33, 34, 34, 36, 39, 41, 42, 42, 43, 50, 50, 54, 56, 59, 60, 64, 70, 74, 75, 76, 82, 82, 89, 89, 94, 96, 96, 96, 98, 98, 98], [2, 2, 3, 4, 7, 11, 14, 18, 18, 18, 21, 23, 28, 29, 32, 33, 33, 33, 34, 39, 39, 40, 41, 42, 48, 49, 50, 52, 56, 57, 57, 58, 59, 66, 66, 70, 72, 74, 76, 77, 77, 79, 86, 86, 89, 92, 94, 99], [1, 9, 10, 12, 13, 14, 17, 18, 20, 21, 23, 23, 25, 26, 28, 28, 31, 33, 33, 36, 37, 41, 41, 41, 41, 42, 43, 44, 47, 51, 54, 57, 59, 59, 59, 63, 64, 67, 69, 69, 75, 78, 84, 85, 93, 98, 98, 99], [1, 3, 5, 8, 9, 9, 10, 18, 18, 18, 19, 21, 23, 24, 24, 25, 26, 27, 29, 34, 34, 35, 37, 37, 39, 39, 41, 48, 56, 57, 59, 61, 64, 65, 68, 69, 75, 75, 75, 76, 78, 83, 85, 86, 90, 94, 97, 98], [7, 8, 11, 13, 14, 15, 16, 16, 17, 20, 28, 31, 39, 41, 42, 46, 51, 52, 53, 53, 54, 57, 57, 66, 66, 67, 72, 72, 73, 74, 74, 78, 82, 82, 83, 84, 85, 87, 89, 91, 93, 95, 95, 97, 98, 98, 98, 99], [1, 2, 4, 5, 6, 8, 8, 12, 12, 12, 20, 20, 25, 29, 30, 31, 38, 38, 39, 39, 42, 43, 43, 44, 45, 47, 47, 51, 56, 56, 57, 58, 62, 65, 65, 65, 66, 69, 69, 73, 78, 82, 83, 85, 87, 90, 95, 96], [2, 2, 3, 3, 6, 7, 8, 14, 15, 16, 16, 17, 20, 23, 25, 29, 29, 31, 32, 33, 37, 37, 39, 40, 40, 47, 48, 48, 50, 51, 52, 55, 55, 56, 59, 62, 69, 70, 71, 72, 72, 81, 82, 84, 89, 92, 96, 99], [2, 8, 9, 10, 16, 17, 23, 30, 32, 37, 38, 41, 41, 46, 49, 49, 55, 57, 59, 59, 63, 63, 64, 66, 68, 68, 69, 70, 72, 74, 76, 77, 80, 81, 83, 84, 84, 85, 86, 90, 90, 91, 91, 92, 96, 96, 97, 97], [1, 7, 13, 13, 17, 17, 18, 23, 24, 31, 33, 34, 34, 35, 36, 40, 40, 40, 40, 44, 45, 51, 53, 55, 55, 58, 58, 64, 64, 69, 72, 75, 75, 80, 80, 81, 82, 82, 83, 84, 86, 87, 87, 88, 89, 95, 96, 99], [1, 4, 7, 9, 10, 11, 13, 15, 15, 19, 21, 23, 23, 24, 25, 27, 32, 32, 33, 37, 38, 41, 43, 43, 45, 45, 47, 51, 52, 53, 54, 58, 59, 61, 63, 63, 65, 73, 76, 77, 80, 80, 85, 87, 90, 92, 94, 96], [3, 4, 7, 7, 12, 13, 20, 20, 20, 21, 22, 22, 27, 27, 28, 31, 32, 35, 37, 39, 39, 40, 41, 45, 45, 45, 48, 48, 49, 49, 51, 54, 57, 64, 67, 70, 80, 83, 89, 89, 90, 90, 90, 92, 92, 98, 98, 99], [1, 1, 7, 10, 12, 16, 16, 21, 27, 31, 33, 34, 36, 44, 45, 46, 46, 46, 47, 49, 49, 53, 54, 57, 57, 58, 58, 62, 62, 63, 67, 69, 77, 79, 82, 82, 84, 85, 85, 85, 85, 86, 92, 93, 94, 94, 96, 99], [1, 1, 4, 14, 14, 17, 19, 20, 21, 29, 30, 30, 32, 33, 34, 36, 36, 44, 46, 47, 48, 53, 57, 59, 59, 62, 63, 64, 65, 65, 66, 69, 69, 70, 72, 73, 74, 74, 80, 81, 83, 84, 84, 84, 85, 85, 87, 94], [9, 13, 16, 18, 19, 19, 21, 23, 24, 24, 25, 30, 32, 33, 35, 36, 37, 42, 46, 47, 48, 48, 52, 54, 55, 62, 62, 66, 67, 69, 70, 70, 71, 71, 73, 74, 75, 77, 78, 79, 80, 82, 83, 86, 88, 89, 94, 99], [1, 2, 2, 4, 13, 14, 15, 15, 18, 18, 18, 19, 21, 22, 22, 22, 24, 28, 31, 36, 45, 46, 47, 49, 51, 52, 56, 56, 58, 66, 67, 68, 69, 71, 73, 75, 77, 78, 79, 79, 82, 87, 87, 93, 93, 97, 97, 98], [2, 3, 4, 4, 8, 11, 14, 14, 16, 19, 25, 29, 32, 36, 39, 45, 46, 46, 46, 47, 50, 51, 52, 55, 56, 57, 61, 63, 63, 64, 66, 67, 70, 72, 75, 76, 80, 82, 83, 84, 84, 87, 89, 90, 92, 94, 96, 97], [3, 6, 10, 11, 14, 15, 19, 20, 21, 23, 28, 29, 30, 30, 32, 34, 34, 38, 39, 41, 41, 44, 45, 47, 50, 50, 50, 54, 57, 57, 58, 58, 63, 65, 66, 68, 68, 69, 73, 75, 76, 79, 83, 86, 89, 94, 95, 96], [4, 10, 13, 18, 18, 21, 21, 22, 22, 22, 24, 24, 25, 25, 26, 29, 29, 39, 50, 51, 51, 53, 55, 56, 56, 56, 57, 60, 61, 62, 67, 67, 69, 69, 73, 76, 76, 76, 77, 79, 79, 80, 82, 84, 89, 90, 95, 97], [1, 6, 8, 10, 10, 25, 35, 38, 39, 40, 40, 40, 41, 41, 43, 47, 51, 56, 56, 56, 57, 60, 60, 62, 63, 64, 65, 68, 69, 72, 73, 75, 76, 76, 76, 78, 79, 79, 79, 80, 82, 82, 84, 90, 91, 95, 96, 99], [2, 3, 7, 10, 11, 11, 17, 17, 19, 21, 21, 23, 24, 26, 28, 29, 31, 33, 44, 44, 44, 45, 48, 48, 50, 50, 52, 54, 56, 58, 61, 65, 66, 67, 69, 70, 72, 72, 74, 81, 84, 85, 86, 87, 92, 93, 98, 99], [1, 3, 3, 3, 6, 9, 13, 14, 14, 22, 25, 26, 28, 28, 33, 36, 38, 38, 41, 44, 45, 46, 46, 51, 55, 56, 57, 57, 59, 62, 64, 65, 65, 68, 77, 78, 79, 79, 84, 85, 87, 90, 94, 95, 95, 95, 97, 99], [7, 7, 8, 9, 14, 18, 24, 24, 25, 27, 28, 28, 30, 31, 31, 31, 33, 36, 36, 37, 37, 38, 40, 43, 45, 46, 46, 47, 50, 51, 51, 52, 52, 53, 53, 60, 62, 65, 65, 67, 73, 76, 79, 88, 91, 94, 95, 95], [4, 5, 7, 16, 17, 18, 18, 18, 21, 24, 25, 27, 28, 31, 33, 35, 36, 36, 38, 40, 42, 42, 42, 45, 46, 46, 47, 49, 50, 52, 53, 65, 68, 68, 69, 69, 71, 71, 71, 72, 75, 76, 76, 80, 80, 87, 90, 95], [9, 11, 12, 14, 15, 20, 22, 23, 29, 29, 29, 33, 35, 35, 37, 37, 41, 42, 44, 45, 45, 47, 50, 51, 51, 51, 55, 57, 62, 64, 66, 66, 67, 76, 80, 82, 82, 83, 83, 83, 83, 83, 85, 86, 90, 90, 92, 93], [1, 3, 3, 7, 8, 8, 11, 16, 19, 20, 25, 29, 32, 33, 39, 39, 42, 43, 43, 44, 47, 48, 49, 50, 51, 53, 54, 54, 58, 60, 60, 60, 62, 64, 65, 67, 71, 74, 75, 77, 83, 84, 85, 87, 87, 90, 91, 97], [2, 5, 5, 12, 13, 16, 17, 19, 20, 22, 26, 28, 28, 30, 30, 31, 36, 37, 41, 44, 44, 44, 46, 50, 51, 51, 51, 54, 54, 57, 58, 58, 59, 60, 62, 66, 66, 68, 68, 71, 75, 76, 84, 85, 89, 90, 91, 95]],45,), ([[36, 16, 60, 44, 14, -68, -28, -98, 14, -6, 24, 56, 54, 70, 70], [-14, 28, -16, -26, -54, 60, 2, 52, 28, -42, 36, 6, 14, 2, -30], [-26, 56, -60, -6, 24, -36, 76, -52, 20, -54, -22, 38, 90, -2, -70], [62, -70, -50, 18, 62, -34, -74, 66, 30, 64, 6, 94, -72, 58, -82], [30, 28, 6, -38, -40, -98, -14, -80, -84, -20, -8, 12, -90, -26, -48], [-2, 64, -38, -82, -82, -18, -14, -20, 28, 16, -94, -78, -80, -4, 32], [-82, -74, 68, 78, -56, 24, -58, 36, -10, 28, 98, 42, 26, -98, 92], [40, -82, 56, 98, 68, -8, 48, -78, -72, -40, 78, 22, -76, 68, 10], [88, 88, 80, 52, -66, -16, -24, -84, 56, -10, 70, -2, 42, 64, 62], [-76, -52, 70, -10, 24, -46, 62, -98, 28, -78, 58, -10, -76, 40, -98], [-82, -58, -12, -98, -54, -62, -32, 52, 48, 64, 28, 72, -84, 48, -14], [-72, 66, -84, 34, -96, 66, -90, 48, 86, -34, -4, -70, -88, -76, 46], [40, 70, 22, -40, 64, -32, -68, -6, -78, -56, -96, -98, -26, -38, -90], [98, 32, 20, 2, -56, 12, 72, -40, 24, 78, 98, 76, 98, -8, 70], [-30, -34, -34, 46, 18, -48, -96, -12, -60, -90, -50, -64, 12, 60, -94]],8,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],18,), ([[43, 44, 74, 24, 47, 58, 43, 11, 78, 61], [93, 7, 12, 81, 39, 13, 50, 62, 27, 87], [27, 9, 63, 68, 8, 83, 44, 22, 83, 2], [70, 73, 44, 15, 37, 38, 42, 21, 20, 75], [72, 43, 56, 93, 92, 73, 34, 9, 28, 38], [4, 83, 97, 56, 44, 89, 92, 51, 82, 68], [55, 51, 72, 78, 65, 66, 10, 13, 71, 85], [97, 15, 49, 86, 56, 56, 92, 84, 98, 73], [89, 44, 19, 45, 74, 7, 76, 60, 42, 34], [65, 47, 3, 34, 46, 97, 98, 78, 19, 57]],8,), ([[-88, -82, -70, -46, -44, -18, 12, 38, 66, 90, 96], [-98, -90, -84, -62, -42, -30, -16, 4, 14, 18, 26], [-94, -48, -32, -24, -22, -18, 42, 44, 64, 70, 74], [-94, -60, -58, -56, -40, -34, 2, 18, 32, 76, 96], [-94, -74, -62, -56, -50, -46, -2, 34, 34, 44, 68], [-74, -56, -50, -16, -14, 0, 14, 30, 30, 66, 82], [-80, -78, -60, -56, -46, -32, 4, 8, 14, 42, 54], [-68, -66, -58, -50, -50, -40, -16, -2, 4, 10, 80], [-70, -68, -24, -8, -4, 34, 36, 60, 82, 84, 92], [-90, -62, -60, -54, -6, -6, 10, 10, 14, 52, 66], [-88, -72, -70, -18, -6, 28, 38, 50, 56, 72, 90]],9,), ([[0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0], [1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0]],18,), ([[8, 14, 19, 21, 33, 35, 37, 40, 44, 49, 52, 68, 68, 72, 77, 80, 86, 88, 88, 99], [10, 12, 18, 18, 25, 27, 30, 32, 32, 42, 46, 47, 48, 53, 67, 69, 70, 84, 85, 89], [12, 15, 18, 24, 26, 33, 41, 45, 55, 71, 73, 79, 82, 87, 88, 88, 89, 91, 92, 98], [1, 1, 11, 16, 24, 24, 27, 42, 49, 50, 69, 69, 72, 73, 75, 80, 80, 82, 95, 96], [1, 6, 12, 13, 14, 22, 28, 30, 39, 51, 53, 66, 68, 68, 69, 77, 86, 90, 96, 99], [2, 6, 24, 26, 28, 32, 32, 37, 38, 54, 56, 61, 64, 64, 68, 71, 71, 76, 79, 86], [22, 31, 32, 34, 39, 47, 54, 57, 59, 61, 62, 72, 72, 74, 79, 79, 80, 85, 91, 93], [3, 7, 12, 13, 15, 16, 21, 26, 26, 36, 56, 60, 62, 63, 64, 66, 67, 71, 76, 83], [3, 22, 29, 30, 34, 35, 36, 39, 41, 42, 43, 51, 57, 58, 72, 72, 80, 84, 88, 92], [9, 14, 17, 29, 34, 37, 38, 39, 40, 46, 46, 52, 62, 68, 77, 78, 79, 92, 93, 95], [1, 17, 17, 18, 19, 23, 26, 27, 36, 37, 48, 53, 56, 62, 62, 68, 69, 78, 78, 84], [20, 20, 22, 33, 33, 33, 43, 48, 60, 63, 64, 70, 77, 80, 80, 85, 87, 88, 91, 94], [7, 10, 10, 13, 14, 14, 23, 42, 64, 65, 65, 72, 73, 74, 75, 76, 77, 78, 79, 91], [1, 4, 9, 12, 13, 13, 23, 23, 27, 33, 34, 34, 37, 40, 43, 63, 67, 70, 87, 96], [1, 2, 8, 11, 12, 14, 14, 23, 24, 33, 44, 45, 47, 55, 78, 79, 83, 98, 98, 99], [3, 9, 18, 21, 24, 28, 34, 35, 45, 46, 59, 60, 60, 63, 64, 84, 95, 96, 97, 97], [4, 11, 17, 19, 20, 20, 20, 30, 31, 41, 45, 47, 64, 68, 76, 81, 83, 89, 93, 93], [2, 8, 10, 21, 38, 40, 43, 44, 47, 52, 55, 71, 75, 80, 85, 85, 89, 92, 94, 99], [3, 7, 13, 14, 27, 28, 29, 30, 44, 47, 50, 53, 55, 64, 64, 75, 79, 86, 98, 99], [10, 10, 10, 16, 17, 33, 44, 52, 53, 57, 59, 64, 65, 74, 75, 76, 80, 87, 90, 90]],15,), ([[-78, 34, -74, 16, -10, -10, -14, 28], [-22, -84, 48, -20, 2, 86, 88, -60], [32, 16, 98, 30, -10, 48, 82, 56], [48, -32, -76, -54, 36, 56, 6, 82], [6, -20, 64, 56, 6, -28, 30, -72], [-32, -48, 10, 26, 40, -8, -26, -54], [-68, -36, -86, -12, -6, 62, -90, 26], [-76, 80, 44, -82, 92, -12, -56, -8]],7,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 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], [0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 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], [0, 0, 0, 0, 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,), ([[76, 57, 99, 99, 95, 61, 64, 17, 58, 47], [52, 18, 37, 70, 17, 3, 33, 84, 80, 7], [2, 34, 4, 49, 17, 71, 12, 76, 74, 44], [89, 49, 69, 17, 38, 56, 61, 75, 86, 84], [32, 56, 87, 23, 66, 67, 97, 5, 23, 51], [25, 24, 30, 51, 30, 72, 46, 57, 29, 85], [80, 62, 87, 29, 37, 90, 88, 40, 55, 26], [27, 75, 51, 91, 22, 65, 38, 91, 1, 15], [11, 56, 38, 93, 54, 94, 23, 90, 37, 51], [61, 82, 79, 22, 66, 55, 67, 26, 93, 93]],6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_AVOID_OVERFLOW_IN_MODULAR_MULTIPLICATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_AVOID_OVERFLOW_IN_MODULAR_MULTIPLICATION{ static long f_gold ( long a , long b , long mod ) { long res = 0 ; a = a % mod ; while ( b > 0 ) { if ( b % 2 == 1 ) { res = ( res + a ) % mod ; } a = ( a * 2 ) % mod ; b /= 2 ; } return res % mod ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(99L); param0.add(11L); param0.add(51L); param0.add(49L); param0.add(9L); param0.add(90L); param0.add(19L); param0.add(17L); param0.add(54L); param0.add(5L); List param1 = new ArrayList<>(); param1.add(75L); param1.add(4L); param1.add(37L); param1.add(51L); param1.add(34L); param1.add(85L); param1.add(96L); param1.add(96L); param1.add(3L); param1.add(69L); List param2 = new ArrayList<>(); param2.add(40L); param2.add(41L); param2.add(23L); param2.add(88L); param2.add(30L); param2.add(55L); param2.add(41L); param2.add(37L); param2.add(51L); param2.add(60L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , mod ) : res = 0 ; a = a % mod ; while ( b > 0 ) : if ( b % 2 == 1 ) : res = ( res + a ) % mod ; a = ( a * 2 ) % mod ; b //= 2 ; return res % mod ; ",,," if __name__ == '__main__': param = [ (99,75,40,), (11,4,41,), (51,37,23,), (49,51,88,), (9,34,30,), (90,85,55,), (19,96,41,), (17,96,37,), (54,3,51,), (5,69,60,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_COST_TO_FILL_GIVEN_WEIGHT_IN_A_BAG," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_TO_FILL_GIVEN_WEIGHT_IN_A_BAG{ public static int f_gold ( int cost [ ] , int n , int W ) { Vector < Integer > val = new Vector < Integer > ( ) ; Vector < Integer > wt = new Vector < Integer > ( ) ; int size = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( cost [ i ] != - 1 ) { val . add ( cost [ i ] ) ; wt . add ( i + 1 ) ; size ++ ; } } n = size ; int min_cost [ ] [ ] = new int [ n + 1 ] [ W + 1 ] ; for ( int i = 0 ; i <= W ; i ++ ) min_cost [ 0 ] [ i ] = Integer . MAX_VALUE ; for ( int i = 1 ; i <= n ; i ++ ) min_cost [ i ] [ 0 ] = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= W ; j ++ ) { if ( wt . get ( i - 1 ) > j ) min_cost [ i ] [ j ] = min_cost [ i - 1 ] [ j ] ; else min_cost [ i ] [ j ] = Math . min ( min_cost [ i - 1 ] [ j ] , min_cost [ i ] [ j - wt . get ( i - 1 ) ] + val . get ( i - 1 ) ) ; } } return ( min_cost [ n ] [ W ] == Integer . MAX_VALUE ) ? - 1 : min_cost [ n ] [ W ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,38,74}); param0.add(new int[]{-40,52,-54,-26,66,-28,22,-10,-28,-12,38,-92,28,76,-34,30,-16,-68,-20,56,-34,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{77,50,40,94,43,9,36,29,39,69,7,45,91,97,94,89,76,86,96,1,12,94,92,39,4,22,49,31,34,84,61,11,39,8,59,9,27,66,33,37,25,18,36,78,8,45,91}); param0.add(new int[]{-94,-92,-84,-82,-74,-62,-56,-46,-46,-42,-32,-30,-28,-24,-20,-18,-12,-10,-6,0,4,12,18,38,42,48,66,78,84,90,92}); param0.add(new int[]{1,1,0,1,1,1,0,1,1,0,1,0}); param0.add(new int[]{1,6,10,10,14,15,16,19,22,25,28,31,36,37,37,39,41,43,45,48,49,50,54,54,57,60,66,70,71,71,72,72,75,75,76,79,81,83,83,83,85,87,87,88,89,90,94}); param0.add(new int[]{-30,-82,-14,-6,98,-22,54,-54,94,32,54,-6,60,30,62,-6,24}); param0.add(new int[]{0,0,1,1,1}); param0.add(new int[]{35,52,40,62,28,59,52,81,69,20,9,11,62,40,5,50,52,62,93,31,90,10,47,93,32,56,39,86}); List param1 = new ArrayList<>(); param1.add(1); param1.add(21); param1.add(19); param1.add(34); param1.add(15); param1.add(7); param1.add(45); param1.add(10); param1.add(2); param1.add(16); List param2 = new ArrayList<>(); param2.add(2); param2.add(20); param2.add(28); param2.add(40); param2.add(29); param2.add(9); param2.add(32); param2.add(12); param2.add(2); param2.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, PROGRAM_CENSOR_WORD_ASTERISKS_SENTENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CENSOR_WORD_ASTERISKS_SENTENCE{ static String f_gold ( String text , String word ) { String [ ] word_list = text . split ( ""\\s+"" ) ; String result = """" ; String stars = """" ; for ( int i = 0 ; i < word . length ( ) ; i ++ ) stars += '*' ; int index = 0 ; for ( String i : word_list ) { if ( i . compareTo ( word ) == 0 ) word_list [ index ] = stars ; index ++ ; } for ( String i : word_list ) result += i + ' ' ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""IggvAXtmJ""); param0.add(""76711241128""); param0.add(""010""); param0.add(""HIKOn""); param0.add(""3680369217""); param0.add(""1111""); param0.add(""zIi""); param0.add(""06""); param0.add(""111""); param0.add(""NJNnrVU""); List param1 = new ArrayList<>(); param1.add(""kzHdEJuCaO""); param1.add(""5""); param1.add(""0101001""); param1.add(""XlnBwpx""); param1.add(""017523""); param1.add(""1011""); param1.add(""ONNXygON""); param1.add(""54171617""); param1.add(""0010001011001""); param1.add(""AGwmS""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( text , word ) : word_list = text.split ( ) result = '' stars = '*' * len ( word ) count = 0 index = 0 ; for i in word_list : if i == word : word_list [ index ] = stars index += 1 result = ' '.join ( word_list ) return result ",,," if __name__ == '__main__': param = [ ('IggvAXtmJ','kzHdEJuCaO',), ('76711241128','5',), ('010','0101001',), ('HIKOn','XlnBwpx',), ('3680369217','017523',), ('1111','1011',), ('zIi','ONNXygON',), ('06','54171617',), ('111','0010001011001',), ('NJNnrVU','AGwmS',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_EXPRESSION_DUPLICATE_PARENTHESIS_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_EXPRESSION_DUPLICATE_PARENTHESIS_NOT{ static boolean f_gold ( String s ) { Stack < Character > Stack = new Stack < > ( ) ; char [ ] str = s . toCharArray ( ) ; for ( char ch : str ) { if ( ch == ')' ) { char top = Stack . peek ( ) ; Stack . pop ( ) ; int elementsInside = 0 ; while ( top != '(' ) { elementsInside ++ ; top = Stack . peek ( ) ; Stack . pop ( ) ; } if ( elementsInside < 1 ) { return true ; } } else { Stack . push ( ch ) ; } } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""((a+b)+((c+d)))""); param0.add(""(((a+(b)))+(c+d))""); param0.add(""(((a+(b))+c+d))""); param0.add(""((a+b)+(c+d))""); param0.add(""(8582007)""); param0.add(""((a+(b))+(c+d))""); param0.add(""(PylsShEdKAE)""); param0.add(""886980680541""); param0.add(""001""); param0.add(""jsVmFeOq""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( string ) : Stack = [ ] for ch in string : if ch == ')' : top = Stack.pop ( ) elementsInside = 0 while top != '(' : elementsInside += 1 top = Stack.pop ( ) if elementsInside < 1 : return True else : Stack.append ( ch ) return False "," using namespace std; bool f_gold ( string str ) { stack < char > Stack; for ( char ch : str ) { if ( ch == ')' ) { char top = Stack . top ( ); Stack . pop ( ); int elementsInside = 0; while ( top != '(' ) { elementsInside ++; top = Stack . top ( ); Stack . pop ( ); } if ( elementsInside < 1 ) { return 1; } } else Stack . push ( ch ); } return false; } int main() { int n_success = 0; vector param0 { ""((a+b)+((c+d)))"", ""(((a+(b)))+(c+d))"", ""(((a+(b))+c+d))"", ""((a+b)+(c+d))"", ""(8582007)"", ""((a+(b))+(c+d))"", ""(PylsShEdKAE)"", ""886980680541"", ""001"", ""jsVmFeOq""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (""((a+b)+((c+d)))"",), (""(((a+(b)))+(c+d))"",), (""(((a+(b))+c+d))"",), (""((a+b)+(c+d))"",), (""(8582007)"",), (""((a+(b))+(c+d))"",), (""(PylsShEdKAE)"",), ('886980680541',), ('001',), ('jsVmFeOq',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FIND_SLOPE_LINE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FIND_SLOPE_LINE{ static float f_gold ( float x1 , float y1 , float x2 , float y2 ) { return ( y2 - y1 ) / ( x2 - x1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(236.27324548309292F); param0.add(-9201.144918204123F); param0.add(3480.4716834445326F); param0.add(-6915.538971485092F); param0.add(8887.97173657486F); param0.add(-3785.5177159369946F); param0.add(3037.6696554256832F); param0.add(-7925.458496016523F); param0.add(1404.2919985268031F); param0.add(-4748.744241168378F); List param1 = new ArrayList<>(); param1.add(5792.493225762838F); param1.add(-2716.3347716140406F); param1.add(3577.9608612055613F); param1.add(-4113.601103381095F); param1.add(1678.4080012662428F); param1.add(-3084.67461899163F); param1.add(4432.445827549F); param1.add(-3350.27411882042F); param1.add(8971.636233373416F); param1.add(-675.557388148954F); List param2 = new ArrayList<>(); param2.add(7177.837879115863F); param2.add(-5161.142121227645F); param2.add(8611.515262945342F); param2.add(-748.3462104020822F); param2.add(8709.574949883017F); param2.add(-7415.76208254121F); param2.add(8387.304165588026F); param2.add(-5619.767086756504F); param2.add(3039.112051378511F); param2.add(-5998.241086029875F); List param3 = new ArrayList<>(); param3.add(1289.5700425822731F); param3.add(-3205.784279961129F); param3.add(6744.864707668983F); param3.add(-9245.271700539257F); param3.add(8548.492675510739F); param3.add(-887.5389305564152F); param3.add(611.3373507518394F); param3.add(-1185.7423219907591F); param3.add(1947.6756252708972F); param3.add(-4236.658178504375F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x1 , y1 , x2 , y2 ) : return ( float ) ( y2 - y1 ) / ( x2 - x1 ) "," using namespace std; float f_gold ( float x1, float y1, float x2, float y2 ) { return ( y2 - y1 ) / ( x2 - x1 ); } int main() { int n_success = 0; vector param0 {236.27324548309292F,-9201.144918204123F,3480.4716834445326F,-6915.538971485092F,8887.97173657486F,-3785.5177159369946F,3037.6696554256832F,-7925.458496016523F,1404.2919985268031F,-4748.744241168378F}; vector param1 {5792.493225762838F,-2716.3347716140406F,3577.9608612055613F,-4113.601103381095F,1678.4080012662428F,-3084.67461899163F,4432.445827549F,-3350.27411882042F,8971.636233373416F,-675.557388148954F}; vector param2 {7177.837879115863F,-5161.142121227645F,8611.515262945342F,-748.3462104020822F,8709.574949883017F,-7415.76208254121F,8387.304165588026F,-5619.767086756504F,3039.112051378511F,-5998.241086029875F}; vector param3 {1289.5700425822731F,-3205.784279961129F,6744.864707668983F,-9245.271700539257F,8548.492675510739F,-887.5389305564152F,611.3373507518394F,-1185.7423219907591F,1947.6756252708972F,-4236.658178504375F}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i],param2[i],param3[i])) )/ (abs(f_filled(param0[i],param1[i],param2[i],param3[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (236.27324548309292,5792.493225762838,7177.837879115863,1289.5700425822731,), (-9201.144918204123,-2716.3347716140406,-5161.142121227645,-3205.784279961129,), (3480.4716834445326,3577.9608612055613,8611.515262945342,6744.864707668983,), (-6915.538971485092,-4113.601103381095,-748.3462104020822,-9245.271700539257,), (8887.97173657486,1678.4080012662428,8709.574949883017,8548.492675510739,), (-3785.5177159369946,-3084.67461899163,-7415.76208254121,-887.5389305564152,), (3037.6696554256832,4432.445827549,8387.304165588026,611.3373507518394,), (-7925.458496016523,-3350.27411882042,-5619.767086756504,-1185.7423219907591,), (1404.2919985268031,8971.636233373416,3039.112051378511,1947.6756252708972,), (-4748.744241168378,-675.557388148954,-5998.241086029875,-4236.658178504375,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ZECKENDORFS_THEOREM_NON_NEIGHBOURING_FIBONACCI_REPRESENTATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ZECKENDORFS_THEOREM_NON_NEIGHBOURING_FIBONACCI_REPRESENTATION{ public static int f_gold ( int n ) { if ( n == 0 || n == 1 ) return n ; int f1 = 0 , f2 = 1 , f3 = 1 ; while ( f3 <= n ) { f1 = f2 ; f2 = f3 ; f3 = f1 + f2 ; } return f2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(54); param0.add(71); param0.add(64); param0.add(71); param0.add(96); param0.add(43); param0.add(70); param0.add(94); param0.add(95); param0.add(69); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 or n == 1 ) : return n f1 , f2 , f3 = 0 , 1 , 1 while ( f3 <= n ) : f1 = f2 ; f2 = f3 ; f3 = f1 + f2 ; return f2 ; "," using namespace std; int f_gold ( int n ) { if ( n == 0 || n == 1 ) return n; int f1 = 0, f2 = 1, f3 = 1; while ( f3 <= n ) { f1 = f2; f2 = f3; f3 = f1 + f2; } return f2; } int main() { int n_success = 0; vector param0 {54,71,64,71,96,43,70,94,95,69}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (54,), (71,), (64,), (71,), (96,), (43,), (70,), (94,), (95,), (69,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE{ static long f_gold ( int n ) { long sum = 0 ; for ( int row = 0 ; row < n ; row ++ ) { sum = sum + ( 1 << row ) ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(21); param0.add(4); param0.add(31); param0.add(79); param0.add(38); param0.add(75); param0.add(36); param0.add(32); param0.add(23); param0.add(65); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 for row in range ( n ) : sum = sum + ( 1 << row ) return sum "," using namespace std; long long int f_gold ( int n ) { long long int sum = 0; for ( int row = 0; row < n; row ++ ) { sum = sum + ( 1 << row ); } return sum; } int main() { int n_success = 0; vector param0 {21,4,31,79,38,75,36,32,23,65}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (21,), (4,), (31,), (79,), (38,), (75,), (36,), (32,), (23,), (65,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_N_DIGITS_NON_DECREASING_INTEGERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_N_DIGITS_NON_DECREASING_INTEGERS{ static int f_gold ( int n ) { int [ ] [ ] a = new int [ n + 1 ] [ 10 ] ; for ( int i = 0 ; i <= 9 ; i ++ ) a [ 0 ] [ i ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) a [ i ] [ 9 ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) for ( int j = 8 ; j >= 0 ; j -- ) a [ i ] [ j ] = a [ i - 1 ] [ j ] + a [ i ] [ j + 1 ] ; return a [ n ] [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(2); param0.add(19); param0.add(79); param0.add(62); param0.add(93); param0.add(39); param0.add(7); param0.add(31); param0.add(3); param0.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int n ) { int a [ n + 1 ] [ 10 ]; for ( int i = 0; i <= 9; i ++ ) a [ 0 ] [ i ] = 1; for ( int i = 1; i <= n; i ++ ) a [ i ] [ 9 ] = 1; for ( int i = 1; i <= n; i ++ ) for ( int j = 8; j >= 0; j -- ) a [ i ] [ j ] = a [ i - 1 ] [ j ] + a [ i ] [ j + 1 ]; return a [ n ] [ 0 ]; } int main() { int n_success = 0; vector param0 {2,19,79,62,93,39,7,31,3,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, ADD_1_TO_A_GIVEN_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ADD_1_TO_A_GIVEN_NUMBER{ static int f_gold ( int x ) { int m = 1 ; while ( ( int ) ( x & m ) >= 1 ) { x = x ^ m ; m <<= 1 ; } x = x ^ m ; return x ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(96); param0.add(66); param0.add(67); param0.add(13); param0.add(75); param0.add(78); param0.add(1); param0.add(83); param0.add(27); param0.add(65); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : m = 1 while ( x & m ) : x = x ^ m m <<= 1 x = x ^ m return x "," using namespace std; int f_gold ( int x ) { int m = 1; while ( x & m ) { x = x ^ m; m <<= 1; } x = x ^ m; return x; } int main() { int n_success = 0; vector param0 {96,66,67,13,75,78,1,83,27,65}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (96,), (66,), (67,), (13,), (75,), (78,), (1,), (83,), (27,), (65,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", SEARCH_INSERT_AND_DELETE_IN_AN_UNSORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_INSERT_AND_DELETE_IN_AN_UNSORTED_ARRAY{ static int f_gold ( int arr [ ] , int n , int key ) { for ( int i = 0 ; i < n ; i ++ ) if ( arr [ i ] == key ) return i ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,8,11,23,55,57,73,74,77,79,93}); param0.add(new int[]{-88,12,-62,-66,-24,18,12,22,94,30,-50,-42,-94,18,76,-6,-48,-68,48,36,-78,52,-82,76,2,-44,-10,88}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{33,9,93,70,81,70,56,66,72,81,74,32,71,72,3,81,70,22,82,2,75,18,90,29,48}); param0.add(new int[]{-98,-70,-62,-60,-60,-54,-48,-48,-46,-44,-34,-26,-18,-6,4,18,28,32,34,40,50,54,56,62,64,64,98}); param0.add(new int[]{1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,1}); param0.add(new int[]{4,6,7,10,10,12,13,18,23,29,29,34,46,54,60,61,63,67,69,70,72,76,79,79,81,82,88,90,99}); param0.add(new int[]{94,34,-60,-74,86,80,68,-48,78,-62,-98,-44,-44,92,-94,-86,-36,12,84,-90,52,42,-42,-66,88,76,66}); param0.add(new int[]{0,0,0,1}); param0.add(new int[]{76,59,38,83,38,93,27,11,17,80,26,28,35,53,88,10,9,75}); List param1 = new ArrayList<>(); param1.add(8); param1.add(27); param1.add(11); param1.add(24); param1.add(18); param1.add(17); param1.add(15); param1.add(21); param1.add(2); param1.add(12); List param2 = new ArrayList<>(); param2.add(11); param2.add(12); param2.add(0); param2.add(72); param2.add(23); param2.add(16); param2.add(28); param2.add(16); param2.add(3); param2.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } 11 12 0 72 ","def f_gold ( arr , n , key ) : for i in range ( n ) : if ( arr [ i ] == key ) : return i return - 1 "," using namespace std; int f_gold ( int arr [ ], int n, int key ) { int i; for ( i = 0; i < n; i ++ ) if ( arr [ i ] == key ) return i; return - 1; } int main() { int n_success = 0; vector> param0 {{4,8,11,23,55,57,73,74,77,79,93},{-88,12,-62,-66,-24,18,12,22,94,30,-50,-42,-94,18,76,-6,-48,-68,48,36,-78,52,-82,76,2,-44,-10,88},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{33,9,93,70,81,70,56,66,72,81,74,32,71,72,3,81,70,22,82,2,75,18,90,29,48},{-98,-70,-62,-60,-60,-54,-48,-48,-46,-44,-34,-26,-18,-6,4,18,28,32,34,40,50,54,56,62,64,64,98},{1,1,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,0,1},{4,6,7,10,10,12,13,18,23,29,29,34,46,54,60,61,63,67,69,70,72,76,79,79,81,82,88,90,99},{94,34,-60,-74,86,80,68,-48,78,-62,-98,-44,-44,92,-94,-86,-36,12,84,-90,52,42,-42,-66,88,76,66},{0,0,0,1},{76,59,38,83,38,93,27,11,17,80,26,28,35,53,88,10,9,75}}; vector param1 {8,27,11,24,18,17,15,21,2,12}; vector param2 {11,12,0,72,23,16,28,16,3,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([4, 8, 11, 23, 55, 57, 73, 74, 77, 79, 93],8,11,), ([-88, 12, -62, -66, -24, 18, 12, 22, 94, 30, -50, -42, -94, 18, 76, -6, -48, -68, 48, 36, -78, 52, -82, 76, 2, -44, -10, 88],27,12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],11,0,), ([33, 9, 93, 70, 81, 70, 56, 66, 72, 81, 74, 32, 71, 72, 3, 81, 70, 22, 82, 2, 75, 18, 90, 29, 48],24,72,), ([-98, -70, -62, -60, -60, -54, -48, -48, -46, -44, -34, -26, -18, -6, 4, 18, 28, 32, 34, 40, 50, 54, 56, 62, 64, 64, 98],18,23,), ([1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1],17,16,), ([4, 6, 7, 10, 10, 12, 13, 18, 23, 29, 29, 34, 46, 54, 60, 61, 63, 67, 69, 70, 72, 76, 79, 79, 81, 82, 88, 90, 99],15,28,), ([94, 34, -60, -74, 86, 80, 68, -48, 78, -62, -98, -44, -44, 92, -94, -86, -36, 12, 84, -90, 52, 42, -42, -66, 88, 76, 66],21,16,), ([0, 0, 0, 1],2,3,), ([76, 59, 38, 83, 38, 93, 27, 11, 17, 80, 26, 28, 35, 53, 88, 10, 9, 75],12,13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAKE_LARGEST_PALINDROME_CHANGING_K_DIGITS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAKE_LARGEST_PALINDROME_CHANGING_K_DIGITS{ static String f_gold ( String str , int k ) { char palin [ ] = str . toCharArray ( ) ; String ans = """" ; int l = 0 ; int r = str . length ( ) - 1 ; while ( l < r ) { if ( str . charAt ( l ) != str . charAt ( r ) ) { palin [ l ] = palin [ r ] = ( char ) Math . max ( str . charAt ( l ) , str . charAt ( r ) ) ; k -- ; } l ++ ; r -- ; } if ( k < 0 ) { return ""Not possible"" ; } l = 0 ; r = str . length ( ) - 1 ; while ( l <= r ) { if ( l == r ) { if ( k > 0 ) { palin [ l ] = '9' ; } } if ( palin [ l ] < '9' ) { if ( k >= 2 && palin [ l ] == str . charAt ( l ) && palin [ r ] == str . charAt ( r ) ) { k -= 2 ; palin [ l ] = palin [ r ] = '9' ; } else if ( k >= 1 && ( palin [ l ] != str . charAt ( l ) || palin [ r ] != str . charAt ( r ) ) ) { k -- ; palin [ l ] = palin [ r ] = '9' ; } } l ++ ; r -- ; } for ( int i = 0 ; i < palin . length ; i ++ ) ans += palin [ i ] ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""wUJmbRlwogtFv""); param0.add(""43435""); param0.add(""43435""); param0.add(""12345""); param0.add(""5032""); param0.add(""0100000001101""); param0.add(""sBrbNQiRwQd""); param0.add(""7549384614""); param0.add(""10000001""); param0.add(""VqrTsaoD""); List param1 = new ArrayList<>(); param1.add(5); param1.add(3); param1.add(1); param1.add(1); param1.add(3); param1.add(5); param1.add(4); param1.add(3); param1.add(4); param1.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; string f_gold ( string str, int k ) { string palin = str; int l = 0; int r = str . length ( ) - 1; while ( l < r ) { if ( str [ l ] != str [ r ] ) { palin [ l ] = palin [ r ] = max ( str [ l ], str [ r ] ); k --; } l ++; r --; } if ( k < 0 ) return ""Not possible""; l = 0; r = str . length ( ) - 1; while ( l <= r ) { if ( l == r ) { if ( k > 0 ) palin [ l ] = '9'; } if ( palin [ l ] < '9' ) { if ( k >= 2 && palin [ l ] == str [ l ] && palin [ r ] == str [ r ] ) { k -= 2; palin [ l ] = palin [ r ] = '9'; } else if ( k >= 1 && ( palin [ l ] != str [ l ] || palin [ r ] != str [ r ] ) ) { k --; palin [ l ] = palin [ r ] = '9'; } } l ++; r --; } return palin; } int main() { int n_success = 0; vector param0 {""wUJmbRlwogtFv"",""43435"",""43435"",""12345"",""5032"",""0100000001101"",""sBrbNQiRwQd"",""7549384614"",""10000001"",""VqrTsaoD""}; vector param1 {5,3,1,1,3,5,4,3,4,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_THE_MISSING_NUMBER_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_MISSING_NUMBER_2{ static int f_gold ( int a [ ] , int n ) { int x1 = a [ 0 ] ; int x2 = 1 ; for ( int i = 1 ; i < n ; i ++ ) x1 = x1 ^ a [ i ] ; for ( int i = 2 ; i <= n + 1 ; i ++ ) x2 = x2 ^ i ; return ( x1 ^ x2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,5,7,8,10,14,27,32,51,52,57,58,65,68,68,72,73,73,83,92,98}); param0.add(new int[]{-60,-48,38,-78,88,86,-4,-94,16,-64,32,88,58,-78,-16,48,38,30,66,-60,20,40,-28,-64,-48,-86,-80,-8,-58,52,80,-32,46,-4,-70,76,-4,78,-64,38,-40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,59,22,33,69,28,11,34,72,88,16,30,69,89,43,4,65,85,27}); param0.add(new int[]{-98,-98,-92,-88,-88,-82,-74,-70,-68,-60,-60,-48,-38,-34,-34,-24,14,38,50,58,62,64,64,68,76,78,78,86,88,90,92,98,98}); param0.add(new int[]{0,1,0,1,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0}); param0.add(new int[]{1,9,12,12,24,25,33,33,36,39,46,48,48,52,52,53,57,69,71,72,75,76,78,80,82,86,89,91,94,95,96,97,98,99}); param0.add(new int[]{62,-66,60,-92,46,6,-52,48,72,-64,34,20,50,70,-34,20,-70,14,-44,66,-70}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{33,10,6,71,18,22,15,57,56,63,35,93,31,43,98,99,62,39,44,86,78,95,6,76,71}); List param1 = new ArrayList<>(); param1.add(12); param1.add(28); param1.add(38); param1.add(13); param1.add(23); param1.add(41); param1.add(30); param1.add(17); param1.add(30); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : x1 = a [ 0 ] x2 = 1 for i in range ( 1 , n ) : x1 = x1 ^ a [ i ] for i in range ( 2 , n + 2 ) : x2 = x2 ^ i return x1 ^ x2 "," using namespace std; int f_gold ( int a [ ], int n ) { int x1 = a [ 0 ]; int x2 = 1; for ( int i = 1; i < n; i ++ ) x1 = x1 ^ a [ i ]; for ( int i = 2; i <= n + 1; i ++ ) x2 = x2 ^ i; return ( x1 ^ x2 ); } int main() { int n_success = 0; vector> param0 {{2,5,7,8,10,14,27,32,51,52,57,58,65,68,68,72,73,73,83,92,98},{-60,-48,38,-78,88,86,-4,-94,16,-64,32,88,58,-78,-16,48,38,30,66,-60,20,40,-28,-64,-48,-86,-80,-8,-58,52,80,-32,46,-4,-70,76,-4,78,-64,38,-40},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{69,59,22,33,69,28,11,34,72,88,16,30,69,89,43,4,65,85,27},{-98,-98,-92,-88,-88,-82,-74,-70,-68,-60,-60,-48,-38,-34,-34,-24,14,38,50,58,62,64,64,68,76,78,78,86,88,90,92,98,98},{0,1,0,1,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0},{1,9,12,12,24,25,33,33,36,39,46,48,48,52,52,53,57,69,71,72,75,76,78,80,82,86,89,91,94,95,96,97,98,99},{62,-66,60,-92,46,6,-52,48,72,-64,34,20,50,70,-34,20,-70,14,-44,66,-70},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{33,10,6,71,18,22,15,57,56,63,35,93,31,43,98,99,62,39,44,86,78,95,6,76,71}}; vector param1 {12,28,38,13,23,41,30,17,30,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 5, 7, 8, 10, 14, 27, 32, 51, 52, 57, 58, 65, 68, 68, 72, 73, 73, 83, 92, 98],12,), ([-60, -48, 38, -78, 88, 86, -4, -94, 16, -64, 32, 88, 58, -78, -16, 48, 38, 30, 66, -60, 20, 40, -28, -64, -48, -86, -80, -8, -58, 52, 80, -32, 46, -4, -70, 76, -4, 78, -64, 38, -40],28,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],38,), ([69, 59, 22, 33, 69, 28, 11, 34, 72, 88, 16, 30, 69, 89, 43, 4, 65, 85, 27],13,), ([-98, -98, -92, -88, -88, -82, -74, -70, -68, -60, -60, -48, -38, -34, -34, -24, 14, 38, 50, 58, 62, 64, 64, 68, 76, 78, 78, 86, 88, 90, 92, 98, 98],23,), ([0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0],41,), ([1, 9, 12, 12, 24, 25, 33, 33, 36, 39, 46, 48, 48, 52, 52, 53, 57, 69, 71, 72, 75, 76, 78, 80, 82, 86, 89, 91, 94, 95, 96, 97, 98, 99],30,), ([62, -66, 60, -92, 46, 6, -52, 48, 72, -64, 34, 20, 50, 70, -34, 20, -70, 14, -44, 66, -70],17,), ([0, 0, 0, 0, 0, 0, 0, 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],30,), ([33, 10, 6, 71, 18, 22, 15, 57, 56, 63, 35, 93, 31, 43, 98, 99, 62, 39, 44, 86, 78, 95, 6, 76, 71],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REMOVE_BRACKETS_ALGEBRAIC_STRING_CONTAINING_OPERATORS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMOVE_BRACKETS_ALGEBRAIC_STRING_CONTAINING_OPERATORS{ static String f_gold ( String str ) { int len = str . length ( ) ; char res [ ] = new char [ len ] ; int index = 0 , i = 0 ; Stack < Integer > s = new Stack < Integer > ( ) ; s . push ( 0 ) ; while ( i < len ) { if ( str . charAt ( i ) == '+' ) { if ( s . peek ( ) == 1 ) res [ index ++ ] = '-' ; if ( s . peek ( ) == 0 ) res [ index ++ ] = '+' ; } else if ( str . charAt ( i ) == '-' ) { if ( s . peek ( ) == 1 ) res [ index ++ ] = '+' ; else if ( s . peek ( ) == 0 ) res [ index ++ ] = '-' ; } else if ( str . charAt ( i ) == '(' && i > 0 ) { if ( str . charAt ( i - 1 ) == '-' ) { int x = ( s . peek ( ) == 1 ) ? 0 : 1 ; s . push ( x ) ; } else if ( str . charAt ( i - 1 ) == '+' ) s . push ( s . peek ( ) ) ; } else if ( str . charAt ( i ) == ')' ) s . pop ( ) ; else res [ index ++ ] = str . charAt ( i ) ; i ++ ; } return new String ( res ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ggbsMvMZcMOVd""); param0.add(""384292670""); param0.add(""10000100""); param0.add(""fdHME""); param0.add(""09198832""); param0.add(""0011111011""); param0.add(""SnXwRS""); param0.add(""071""); param0.add(""01101""); param0.add(""xwmqxgBa""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( Str ) : Len = len ( Str ) res = [ None ] * Len index = 0 i = 0 s = [ ] s.append ( 0 ) while ( i < Len ) : if ( Str [ i ] == '+' ) : if ( s [ - 1 ] == 1 ) : res [ index ] = '-' index += 1 if ( s [ - 1 ] == 0 ) : res [ index ] = '+' index += 1 elif ( Str [ i ] == '-' ) : if ( s [ - 1 ] == 1 ) : res [ index ] = '+' index += 1 elif ( s [ - 1 ] == 0 ) : res [ index ] = '-' index += 1 elif ( Str [ i ] == '(' and i > 0 ) : if ( Str [ i - 1 ] == '-' ) : x = 0 if ( s [ - 1 ] == 1 ) else 1 s.append ( x ) elif ( Str [ i - 1 ] == '+' ) : s.append ( s [ - 1 ] ) elif ( Str [ i ] == ')' ) : s.pop ( ) else : res [ index ] = Str [ i ] index += 1 i += 1 return res ",,," if __name__ == '__main__': param = [ ('ggbsMvMZcMOVd',), ('384292670',), ('10000100',), ('fdHME',), ('09198832',), ('0011111011',), ('SnXwRS',), ('071',), ('01101',), ('xwmqxgBa',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FINDING_POWER_PRIME_NUMBER_P_N_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FINDING_POWER_PRIME_NUMBER_P_N_1{ static int f_gold ( int n , int p ) { int ans = 0 ; int temp = p ; while ( temp <= n ) { ans += n / temp ; temp = temp * p ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(76); param0.add(77); param0.add(9); param0.add(59); param0.add(8); param0.add(97); param0.add(78); param0.add(41); param0.add(72); param0.add(71); List param1 = new ArrayList<>(); param1.add(43); param1.add(91); param1.add(42); param1.add(67); param1.add(52); param1.add(8); param1.add(24); param1.add(88); param1.add(61); param1.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , p ) : ans = 0 temp = p while ( temp <= n ) : ans += n / temp temp = temp * p return int ( ans ) "," using namespace std; int f_gold ( int n, int p ) { int ans = 0; int temp = p; while ( temp <= n ) { ans += n / temp; temp = temp * p; } return ans; } int main() { int n_success = 0; vector param0 {76,77,9,59,8,97,78,41,72,71}; vector param1 {43,91,42,67,52,8,24,88,61,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (76,43,), (77,91,), (9,42,), (59,67,), (8,52,), (97,8,), (78,24,), (41,88,), (72,61,), (71,28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DICE_THROW_PROBLEM_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DICE_THROW_PROBLEM_1{ public static long f_gold ( int f , int d , int s ) { long mem [ ] [ ] = new long [ d + 1 ] [ s + 1 ] ; mem [ 0 ] [ 0 ] = 1 ; for ( int i = 1 ; i <= d ; i ++ ) { for ( int j = i ; j <= s ; j ++ ) { mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ] ; if ( j - f - 1 >= 0 ) mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ] ; } } return mem [ d ] [ s ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(58); param0.add(38); param0.add(5); param0.add(91); param0.add(76); param0.add(38); param0.add(97); param0.add(97); param0.add(99); List param1 = new ArrayList<>(); param1.add(5); param1.add(45); param1.add(89); param1.add(39); param1.add(90); param1.add(56); param1.add(43); param1.add(26); param1.add(90); param1.add(2); List param2 = new ArrayList<>(); param2.add(33); param2.add(4); param2.add(9); param2.add(30); param2.add(47); param2.add(46); param2.add(84); param2.add(52); param2.add(90); param2.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( f , d , s ) : mem = [ [ 0 for i in range ( s + 1 ) ] for j in range ( d + 1 ) ] mem [ 0 ] [ 0 ] = 1 for i in range ( 1 , d + 1 ) : for j in range ( 1 , s + 1 ) : mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ] if j - f - 1 >= 0 : mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ] return mem [ d ] [ s ] "," using namespace std; long f_gold ( int f, int d, int s ) { long mem [ d + 1 ] [ s + 1 ]; memset ( mem, 0, sizeof mem ); mem [ 0 ] [ 0 ] = 1; for ( int i = 1; i <= d; i ++ ) { for ( int j = i; j <= s; j ++ ) { mem [ i ] [ j ] = mem [ i ] [ j - 1 ] + mem [ i - 1 ] [ j - 1 ]; if ( j - f - 1 >= 0 ) mem [ i ] [ j ] -= mem [ i - 1 ] [ j - f - 1 ]; } } return mem [ d ] [ s ]; } int main() { int n_success = 0; vector param0 {57,58,38,5,91,76,38,97,97,99}; vector param1 {5,45,89,39,90,56,43,26,90,2}; vector param2 {33,4,9,30,47,46,84,52,90,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,5,33,), (58,45,4,), (38,89,9,), (5,39,30,), (91,90,47,), (76,56,46,), (38,43,84,), (97,26,52,), (97,90,90,), (99,2,26,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_REPEATING_ELEMENT_SORTED_ARRAY_SIZE_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPEATING_ELEMENT_SORTED_ARRAY_SIZE_N{ static int f_gold ( int arr [ ] , int low , int high ) { if ( low > high ) return - 1 ; int mid = ( low + high ) / 2 ; if ( arr [ mid ] != mid + 1 ) { if ( mid > 0 && arr [ mid ] == arr [ mid - 1 ] ) return mid ; return f_gold ( arr , low , mid - 1 ) ; } return f_gold ( arr , mid + 1 , high ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{15,21,32,42,42,44,57,68,75,80,83,84}); param0.add(new int[]{-60,-90,-88,-80,-86,18,54,56,84,42,-60,-90,52,-44,-62,-56,-16,28,22,-24,-36,-56,80,68,-16}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{87,43,74}); param0.add(new int[]{-82,-66,-66,-62,-56,-52,-44,-42,-28,-22,-12,-6,-4,-2,18,26,26,28,42,42,56,58,78,90,92,94,96,96}); param0.add(new int[]{0,1,1,1,1,1,0,1,1,1,1,0,0,1,0,0,1,0,1,1,1}); param0.add(new int[]{6,9,14,17,22,31,32,33,36,39,42,43,46,46,46,47,49,53,60,61,67,68,72,75,77,77,84,84,85,89,94,94,95}); param0.add(new int[]{-88,82,-10,-10,68,-86,70,92,-54,-10,-56}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{35,66,47,42,95,10,84,80,23,35,21,71,39,9,38,40,22,65}); List param1 = new ArrayList<>(); param1.add(6); param1.add(23); param1.add(33); param1.add(2); param1.add(20); param1.add(19); param1.add(23); param1.add(7); param1.add(8); param1.add(14); List param2 = new ArrayList<>(); param2.add(11); param2.add(12); param2.add(32); param2.add(2); param2.add(21); param2.add(19); param2.add(19); param2.add(10); param2.add(8); param2.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int low, int high ) { if ( low > high ) return - 1; int mid = ( low + high ) / 2; if ( arr [ mid ] != mid + 1 ) { if ( mid > 0 && arr [ mid ] == arr [ mid - 1 ] ) return mid; return f_gold ( arr, low, mid - 1 ); } return f_gold ( arr, mid + 1, high ); } int main() { int n_success = 0; vector> param0 {{15,21,32,42,42,44,57,68,75,80,83,84},{-60,-90,-88,-80,-86,18,54,56,84,42,-60,-90,52,-44,-62,-56,-16,28,22,-24,-36,-56,80,68,-16},{0,0,0,0,0,0,0,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},{87,43,74},{-82,-66,-66,-62,-56,-52,-44,-42,-28,-22,-12,-6,-4,-2,18,26,26,28,42,42,56,58,78,90,92,94,96,96},{0,1,1,1,1,1,0,1,1,1,1,0,0,1,0,0,1,0,1,1,1},{6,9,14,17,22,31,32,33,36,39,42,43,46,46,46,47,49,53,60,61,67,68,72,75,77,77,84,84,85,89,94,94,95},{-88,82,-10,-10,68,-86,70,92,-54,-10,-56},{0,0,0,0,0,0,1,1,1,1,1},{35,66,47,42,95,10,84,80,23,35,21,71,39,9,38,40,22,65}}; vector param1 {6,23,33,2,20,19,23,7,8,14}; vector param2 {11,12,32,2,21,19,19,10,8,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, CHANGE_ARRAY_PERMUTATION_NUMBERS_1_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class CHANGE_ARRAY_PERMUTATION_NUMBERS_1_N{ static void f_gold ( int [ ] a , int n ) { HashMap < Integer , Integer > count = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( count . containsKey ( a [ i ] ) ) { count . put ( a [ i ] , count . get ( a [ i ] ) + 1 ) ; } else { count . put ( a [ i ] , 1 ) ; } } int next_missing = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( count . containsKey ( a [ i ] ) && count . get ( a [ i ] ) != 1 || a [ i ] > n || a [ i ] < 1 ) { count . put ( a [ i ] , count . get ( a [ i ] ) - 1 ) ; while ( count . containsKey ( next_missing ) ) next_missing ++ ; a [ i ] = next_missing ; count . put ( next_missing , 1 ) ; } } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{19}); param0.add(new int[]{-47,72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{93,3,20,59,36,19,90,67,19,20,96,71,52,33,40,39}); param0.add(new int[]{-98,-93,-91,-89,-63,-58,-52,-52,-46,-40,-25,-16,-10,-1,-1,4,12,12,13,13,16,20,29,29,31,40,44,47,48,51,52,52,59,60,61,64,66,78,85,97}); param0.add(new int[]{0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,1,1,1,1,0,0,0}); param0.add(new int[]{4,6,8,17,19,21,22,24,27,27,28,30,30,30,32,33,35,37,38,44,46,46,48,49,51,53,54,59,60,61,63,64,64,69,76,85,86,87,92,93,93,95,97,97,97,98,99,99}); param0.add(new int[]{-75,-46,-42,-33,4,74,-76,14,-68,75,-14,51,94,27,55,30,-83,4}); param0.add(new int[]{0,0,0,0,0,1,1,1,1}); param0.add(new int[]{24,13,60,7,57,36,45,20,65,8,16,14,76,87,15,92,98,66,32,87,63,86,51,25,58}); List param1 = new ArrayList<>(); param1.add(0); param1.add(1); param1.add(18); param1.add(9); param1.add(22); param1.add(12); param1.add(26); param1.add(9); param1.add(5); param1.add(24); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{19}); filled_function_param0.add(new int[]{-47,72}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{93,3,20,59,36,19,90,67,19,20,96,71,52,33,40,39}); filled_function_param0.add(new int[]{-98,-93,-91,-89,-63,-58,-52,-52,-46,-40,-25,-16,-10,-1,-1,4,12,12,13,13,16,20,29,29,31,40,44,47,48,51,52,52,59,60,61,64,66,78,85,97}); filled_function_param0.add(new int[]{0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,1,1,1,1,0,0,0}); filled_function_param0.add(new int[]{4,6,8,17,19,21,22,24,27,27,28,30,30,30,32,33,35,37,38,44,46,46,48,49,51,53,54,59,60,61,63,64,64,69,76,85,86,87,92,93,93,95,97,97,97,98,99,99}); filled_function_param0.add(new int[]{-75,-46,-42,-33,4,74,-76,14,-68,75,-14,51,94,27,55,30,-83,4}); filled_function_param0.add(new int[]{0,0,0,0,0,1,1,1,1}); filled_function_param0.add(new int[]{24,13,60,7,57,36,45,20,65,8,16,14,76,87,15,92,98,66,32,87,63,86,51,25,58}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(0); filled_function_param1.add(1); filled_function_param1.add(18); filled_function_param1.add(9); filled_function_param1.add(22); filled_function_param1.add(12); filled_function_param1.add(26); filled_function_param1.add(9); filled_function_param1.add(5); filled_function_param1.add(24); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : count = dict ( ) for i in range ( n ) : if count.get ( a [ i ] ) : count [ a [ i ] ] += 1 else : count [ a [ i ] ] = 1 ; next_missing = 1 for i in range ( n ) : if count [ a [ i ] ] != 1 or a [ i ] > n or a [ i ] < 1 : count [ a [ i ] ] -= 1 while count.get ( next_missing ) : next_missing += 1 a [ i ] = next_missing count [ next_missing ] = 1 "," using namespace std; void f_gold ( int a [ ], int n ) { unordered_map < int, int > count; for ( int i = 0; i < n; i ++ ) count [ a [ i ] ] ++; int next_missing = 1; for ( int i = 0; i < n; i ++ ) { if ( count [ a [ i ] ] != 1 || a [ i ] > n || a [ i ] < 1 ) { count [ a [ i ] ] --; while ( count . find ( next_missing ) != count . end ( ) ) next_missing ++; a [ i ] = next_missing; count [ next_missing ] = 1; } } } int main() { int n_success = 0; vector> param0 {{19},{-47,72},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{93,3,20,59,36,19,90,67,19,20,96,71,52,33,40,39},{-98,-93,-91,-89,-63,-58,-52,-52,-46,-40,-25,-16,-10,-1,-1,4,12,12,13,13,16,20,29,29,31,40,44,47,48,51,52,52,59,60,61,64,66,78,85,97},{0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,1,1,1,1,0,0,0},{4,6,8,17,19,21,22,24,27,27,28,30,30,30,32,33,35,37,38,44,46,46,48,49,51,53,54,59,60,61,63,64,64,69,76,85,86,87,92,93,93,95,97,97,97,98,99,99},{-75,-46,-42,-33,4,74,-76,14,-68,75,-14,51,94,27,55,30,-83,4},{0,0,0,0,0,1,1,1,1},{24,13,60,7,57,36,45,20,65,8,16,14,76,87,15,92,98,66,32,87,63,86,51,25,58}}; vector param1 {0,1,18,9,22,12,26,9,5,24}; vector> filled_function_param0 {{19},{-47,72},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{93,3,20,59,36,19,90,67,19,20,96,71,52,33,40,39},{-98,-93,-91,-89,-63,-58,-52,-52,-46,-40,-25,-16,-10,-1,-1,4,12,12,13,13,16,20,29,29,31,40,44,47,48,51,52,52,59,60,61,64,66,78,85,97},{0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,1,1,1,1,0,0,0},{4,6,8,17,19,21,22,24,27,27,28,30,30,30,32,33,35,37,38,44,46,46,48,49,51,53,54,59,60,61,63,64,64,69,76,85,86,87,92,93,93,95,97,97,97,98,99,99},{-75,-46,-42,-33,4,74,-76,14,-68,75,-14,51,94,27,55,30,-83,4},{0,0,0,0,0,1,1,1,1},{24,13,60,7,57,36,45,20,65,8,16,14,76,87,15,92,98,66,32,87,63,86,51,25,58}}; vector filled_function_param1 {0,1,18,9,22,12,26,9,5,24}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([19],0,), ([-47, 72],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],18,), ([93, 3, 20, 59, 36, 19, 90, 67, 19, 20, 96, 71, 52, 33, 40, 39],9,), ([-98, -93, -91, -89, -63, -58, -52, -52, -46, -40, -25, -16, -10, -1, -1, 4, 12, 12, 13, 13, 16, 20, 29, 29, 31, 40, 44, 47, 48, 51, 52, 52, 59, 60, 61, 64, 66, 78, 85, 97],22,), ([0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0],12,), ([4, 6, 8, 17, 19, 21, 22, 24, 27, 27, 28, 30, 30, 30, 32, 33, 35, 37, 38, 44, 46, 46, 48, 49, 51, 53, 54, 59, 60, 61, 63, 64, 64, 69, 76, 85, 86, 87, 92, 93, 93, 95, 97, 97, 97, 98, 99, 99],26,), ([-75, -46, -42, -33, 4, 74, -76, 14, -68, 75, -14, 51, 94, 27, 55, 30, -83, 4],9,), ([0, 0, 0, 0, 0, 1, 1, 1, 1],5,), ([24, 13, 60, 7, 57, 36, 45, 20, 65, 8, 16, 14, 76, 87, 15, 92, 98, 66, 32, 87, 63, 86, 51, 25, 58],24,) ] filled_function_param = [ ([19],0,), ([-47, 72],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],18,), ([93, 3, 20, 59, 36, 19, 90, 67, 19, 20, 96, 71, 52, 33, 40, 39],9,), ([-98, -93, -91, -89, -63, -58, -52, -52, -46, -40, -25, -16, -10, -1, -1, 4, 12, 12, 13, 13, 16, 20, 29, 29, 31, 40, 44, 47, 48, 51, 52, 52, 59, 60, 61, 64, 66, 78, 85, 97],22,), ([0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0],12,), ([4, 6, 8, 17, 19, 21, 22, 24, 27, 27, 28, 30, 30, 30, 32, 33, 35, 37, 38, 44, 46, 46, 48, 49, 51, 53, 54, 59, 60, 61, 63, 64, 64, 69, 76, 85, 86, 87, 92, 93, 93, 95, 97, 97, 97, 98, 99, 99],26,), ([-75, -46, -42, -33, 4, 74, -76, 14, -68, 75, -14, 51, 94, 27, 55, 30, -83, 4],9,), ([0, 0, 0, 0, 0, 1, 1, 1, 1],5,), ([24, 13, 60, 7, 57, 36, 45, 20, 65, 8, 16, 14, 76, 87, 15, 92, 98, 66, 32, 87, 63, 86, 51, 25, 58],24,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DIAGONALLY_DOMINANT_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIAGONALLY_DOMINANT_MATRIX{ static boolean f_gold ( int m [ ] [ ] , int n ) { for ( int i = 0 ; i < n ; i ++ ) { int sum = 0 ; for ( int j = 0 ; j < n ; j ++ ) sum += Math . abs ( m [ i ] [ j ] ) ; sum -= Math . abs ( m [ i ] [ i ] ) ; if ( Math . abs ( m [ i ] [ i ] ) < sum ) return false ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{ new int[] {3, -2, 1,}, new int[] {1 -3, 2}, new int[] {-1, 2, 4}}); param0.add(new int[][]{ new int[] {2, -2, 1,}, new int[] {1 -3, 2}, new int[] {-1, 2, 4}}); param0.add(new int[][]{new int[]{78,46,33,58,79,94,94,31,69},new int[]{83,48,11,74,33,61,88,15,29},new int[]{27,20,36,14,37,88,49,36,58},new int[]{93,15,39,5,97,45,1,47,34},new int[]{8,88,54,87,60,77,37,46,18},new int[]{10,68,71,86,76,24,47,37,72},new int[]{84,43,82,25,87,18,51,46,75},new int[]{59,39,78,86,38,55,79,5,5},new int[]{50,42,19,34,53,80,21,45,96}}); param0.add(new int[][]{new int[]{88,35,82,14,86,94,12,49,76,94,3,96,27,92,82,25,15,27,15},new int[]{30,75,59,45,53,78,45,92,72,61,11,78,51,86,89,74,39,24,6},new int[]{33,22,60,20,11,35,35,65,90,78,49,66,46,5,39,79,85,93,51},new int[]{21,38,36,14,33,23,72,84,38,47,64,47,1,42,68,78,86,76,25},new int[]{57,52,7,7,56,39,70,83,58,23,10,72,36,71,3,72,77,95,13},new int[]{90,48,66,3,63,15,2,61,59,17,11,5,70,67,23,96,63,4,29},new int[]{17,95,35,48,85,87,48,95,53,65,75,1,7,77,84,70,30,70,98},new int[]{99,84,38,30,97,54,88,95,16,16,27,22,15,46,1,28,33,15,95},new int[]{57,70,68,58,20,4,10,7,91,57,6,55,31,64,36,91,13,75,73},new int[]{72,61,10,66,24,99,34,50,75,1,5,27,7,1,32,17,18,68,49},new int[]{13,69,22,26,68,87,5,9,77,62,73,68,90,78,2,95,50,51,90},new int[]{2,41,64,44,52,37,66,92,56,23,71,39,86,60,56,36,1,98,4},new int[]{41,99,53,31,33,5,43,11,32,1,43,6,92,81,11,41,27,61,76},new int[]{13,95,35,25,94,36,21,55,36,28,27,12,74,26,93,45,6,89,8},new int[]{75,17,38,77,41,15,83,83,74,28,25,79,35,80,37,27,5,59,88},new int[]{66,99,57,61,97,96,60,64,32,16,44,87,90,69,61,71,34,74,86},new int[]{21,19,52,42,39,45,89,13,43,83,71,95,66,45,4,1,60,50,87},new int[]{47,17,86,35,8,56,60,55,7,65,25,24,97,75,96,93,65,47,8},new int[]{45,29,31,57,99,7,31,60,56,32,94,61,61,76,99,64,10,26,69}}); param0.add(new int[][]{new int[]{97,37,30,97,2,42,68,90,94},new int[]{35,10,31,79,85,6,65,74,2},new int[]{9,81,80,66,80,99,59,92,13},new int[]{6,25,63,59,90,46,15,66,86},new int[]{42,92,17,23,15,38,56,34,94},new int[]{65,80,89,87,97,34,73,16,50},new int[]{69,42,62,12,69,87,72,99,80},new int[]{84,28,30,75,50,17,10,88,95},new int[]{11,47,8,31,37,33,9,46,3}}); param0.add(new int[][]{new int[]{28,52,61,24,10,42,37,15,28,37,65,13,59},new int[]{68,56,30,64,67,20,99,27,12,41,80,96,51},new int[]{97,80,29,91,95,51,59,88,31,9,70,30,90},new int[]{40,7,72,59,11,3,4,97,20,5,34,14,13},new int[]{61,49,45,53,24,94,63,75,9,63,56,77,77},new int[]{96,71,75,42,1,64,92,72,15,69,22,20,68},new int[]{45,89,80,40,46,91,63,93,12,52,7,88,55},new int[]{5,47,97,38,43,70,8,86,50,78,9,13,50},new int[]{96,78,35,25,61,31,49,43,45,84,7,74,6},new int[]{89,50,70,45,54,17,86,87,29,64,71,99,20},new int[]{26,93,29,7,34,5,77,6,96,33,43,59,33},new int[]{83,61,18,14,21,39,34,31,81,7,85,71,1},new int[]{86,22,87,92,63,62,46,57,94,45,74,76,80}}); param0.add(new int[][]{new int[]{68,37,94,90,14,37,89,91,14,66,66,33,2},new int[]{98,53,89,55,45,37,27,90,52,86,47,58,7},new int[]{13,48,28,45,56,92,88,35,55,97,37,9,3},new int[]{2,58,22,85,24,78,54,97,17,58,58,21,77},new int[]{63,63,44,40,75,66,92,67,79,46,24,72,70},new int[]{96,51,99,77,92,4,31,65,30,72,40,14,44},new int[]{92,34,39,4,88,27,42,11,87,32,50,53,4},new int[]{19,71,33,78,77,70,83,55,9,62,99,62,48},new int[]{90,68,48,92,27,55,44,71,52,57,9,98,8},new int[]{56,10,65,72,45,39,46,17,82,98,99,67,76},new int[]{62,68,36,9,35,67,89,52,90,91,28,58,83},new int[]{24,59,37,38,25,98,15,16,55,4,26,39,57},new int[]{47,90,48,92,49,37,38,62,61,74,97,8,38}}); param0.add(new int[][]{new int[]{85,56,45,50,20,63,55,34,92,32,76,73,43,79,13,2,61,84,14,42,15,93,85,10,56,53,58,85,99,81,62,57,63,4,78,96},new int[]{82,34,32,78,34,70,40,35,15,51,20,92,37,38,21,88,10,54,9,86,42,16,24,4,44,23,42,86,66,92,19,20,28,24,91,2},new int[]{7,1,11,51,60,31,30,77,24,18,58,77,17,46,94,19,12,90,82,12,50,66,20,6,1,90,7,96,55,97,74,15,95,24,29,82},new int[]{71,34,78,84,93,37,42,64,95,19,23,71,6,99,93,55,77,39,25,98,83,4,88,33,66,2,14,50,11,34,38,92,39,22,42,97},new int[]{95,57,78,38,9,88,29,69,42,60,39,91,72,93,60,53,76,8,21,56,48,47,9,78,1,55,31,80,91,11,66,60,31,50,60,88},new int[]{62,39,3,58,68,30,67,68,58,77,53,14,10,78,81,22,63,61,46,37,21,89,3,19,32,79,24,73,74,48,96,58,40,7,46,91},new int[]{15,85,74,87,5,59,70,22,28,54,19,14,48,7,79,32,22,46,85,83,13,22,10,44,24,59,62,72,72,55,49,50,19,82,58,97},new int[]{48,93,96,72,96,12,86,20,45,26,81,98,31,82,59,3,18,84,21,57,99,42,62,30,61,36,55,4,15,71,96,97,57,63,77,64},new int[]{17,53,40,70,50,68,15,72,34,30,87,73,24,8,57,70,25,77,34,25,18,73,97,70,14,6,82,90,36,36,75,18,15,94,89,16},new int[]{76,14,47,54,58,77,30,46,16,1,41,93,27,77,62,81,28,20,55,51,69,88,73,97,34,27,97,38,29,35,20,19,5,25,93,26},new int[]{51,66,61,15,45,6,58,1,73,43,16,14,74,19,51,8,48,12,70,35,70,6,99,11,38,91,26,28,72,89,83,80,50,58,26,44},new int[]{15,76,24,77,59,57,17,77,81,1,11,20,31,99,39,63,6,99,28,51,53,44,65,80,12,28,79,72,68,95,30,35,6,85,30,80},new int[]{63,8,91,33,43,76,43,45,87,54,65,7,36,25,85,37,12,32,49,38,56,80,65,26,57,14,56,70,41,51,84,67,12,97,49,1},new int[]{19,66,58,87,72,98,4,8,27,26,97,43,40,50,67,73,74,29,85,42,18,81,21,67,62,27,96,93,47,93,26,9,91,12,16,47},new int[]{56,66,51,27,73,66,62,71,8,38,6,59,19,79,56,28,94,91,10,45,95,65,50,32,61,16,6,66,62,66,67,19,4,43,18,82},new int[]{46,46,85,21,30,64,41,17,5,5,73,75,48,78,38,6,58,14,72,94,59,65,89,13,27,25,56,68,59,95,49,18,81,75,76,3},new int[]{79,57,6,69,31,8,10,3,12,92,76,94,19,21,81,14,75,29,7,49,65,7,14,16,99,16,85,13,82,29,85,73,95,61,37,17},new int[]{31,59,88,47,6,32,31,18,9,3,71,26,13,34,43,93,33,69,36,79,74,68,47,61,45,96,88,84,48,41,38,68,75,11,16,65},new int[]{97,71,67,71,1,97,71,4,82,37,14,79,25,82,4,66,43,26,84,15,6,37,43,42,13,16,42,38,66,65,5,30,95,43,32,67},new int[]{67,42,5,99,86,96,59,23,8,68,70,91,19,44,93,38,44,6,3,96,80,33,66,58,26,99,28,43,75,88,16,89,23,59,35,89},new int[]{41,97,22,74,1,46,22,32,87,30,87,43,12,83,71,27,26,18,92,75,66,81,61,46,29,32,15,60,82,28,27,41,47,33,44,50},new int[]{10,24,34,91,20,25,55,90,43,53,85,50,55,13,49,97,10,92,97,11,78,84,20,72,79,97,83,48,76,17,33,20,46,31,51,83},new int[]{19,62,44,77,38,49,65,11,27,58,64,65,15,82,89,1,19,56,64,34,64,10,76,60,39,66,32,51,26,57,84,60,55,6,7,66},new int[]{81,26,95,98,82,78,5,87,1,84,2,65,10,50,51,69,41,58,77,68,24,91,56,36,2,96,56,81,12,12,85,72,22,74,84,62},new int[]{64,28,89,28,4,45,90,13,83,98,80,4,61,84,26,94,6,77,56,81,27,35,97,82,58,84,63,33,95,83,97,81,33,69,40,47},new int[]{45,27,7,58,14,4,82,34,80,91,38,20,46,19,1,23,62,73,28,84,80,77,33,3,79,16,30,25,78,1,33,37,29,37,61,8},new int[]{1,63,88,65,46,43,10,82,85,10,62,86,51,45,73,73,45,85,58,95,66,24,97,75,65,55,51,72,73,21,47,22,29,40,3,49},new int[]{25,82,11,94,89,75,98,88,48,32,3,45,89,20,20,51,81,20,82,14,98,80,32,72,42,80,39,38,64,4,99,92,63,61,78,5},new int[]{66,45,50,88,3,23,11,38,56,35,65,6,70,40,90,35,13,25,86,81,78,67,68,99,47,55,92,43,2,45,48,62,38,47,4,60},new int[]{49,76,34,44,94,85,56,92,42,50,69,33,98,96,91,67,42,44,68,57,36,41,56,3,56,56,65,39,40,39,27,67,94,65,74,3},new int[]{3,37,98,20,11,83,91,24,70,65,83,74,32,62,55,36,66,37,14,46,77,56,50,61,17,27,54,29,13,49,25,88,23,26,48,36},new int[]{6,80,74,39,57,91,66,10,72,9,77,72,27,46,63,42,85,41,34,93,30,44,80,1,45,47,93,30,22,15,84,38,23,31,57,81},new int[]{35,66,53,31,26,31,72,80,12,53,56,83,62,44,58,77,65,13,61,68,51,62,48,95,63,72,91,72,51,24,86,40,29,73,17,1},new int[]{96,84,1,25,41,91,23,18,95,28,85,12,88,49,97,81,97,16,27,53,92,36,7,34,65,4,26,20,51,77,99,10,8,18,17,69},new int[]{30,95,39,61,24,81,98,35,79,61,75,98,72,15,36,55,37,87,62,64,39,90,98,75,12,72,8,41,69,74,3,43,37,86,57,25},new int[]{4,58,37,8,94,9,79,1,13,68,16,44,65,14,91,26,32,2,16,92,49,90,75,23,94,60,95,66,20,93,74,18,59,31,4,27}}); param0.add(new int[][]{new int[]{95,71,19,39,66,78,46,92,38,67,29,91,57,48,52,48,61,67,48,94,82,8,74,86,88,67,14,47,24,91,62,58,34,31,48,91,45,29,29,63,48,12,78,27},new int[]{47,66,37,45,57,18,13,73,29,56,74,20,29,6,26,61,86,43,47,26,81,1,95,73,26,64,62,6,62,66,42,27,65,30,82,98,85,65,47,32,34,47,14,5},new int[]{36,96,9,35,25,75,46,13,61,30,98,32,30,82,56,67,71,55,98,8,43,48,58,32,78,69,7,74,20,62,21,92,29,70,38,42,3,37,17,33,10,37,33,28},new int[]{87,42,58,48,51,10,8,16,96,62,49,89,15,16,81,27,47,26,72,41,11,91,9,54,11,7,28,94,62,55,36,73,99,63,51,77,48,68,10,26,67,53,43,17},new int[]{27,22,36,72,33,90,95,53,11,93,29,38,58,15,54,62,57,79,71,58,49,53,29,33,46,54,80,98,85,7,29,9,49,71,78,94,88,51,98,8,55,65,98,84},new int[]{95,79,15,51,34,69,86,12,45,31,54,93,22,72,64,60,28,21,75,75,87,77,43,27,23,97,90,36,97,38,16,74,43,41,44,52,17,52,43,23,1,93,25,6},new int[]{74,54,78,23,19,56,53,31,38,19,1,77,50,98,58,81,32,49,98,97,92,44,29,88,48,80,77,26,7,44,14,52,32,75,32,75,84,57,52,34,61,62,86,87},new int[]{93,76,31,29,31,12,35,57,41,27,15,94,71,36,24,82,24,96,76,28,75,3,3,29,32,54,38,95,56,65,21,41,20,60,75,59,74,55,3,14,45,95,99,60},new int[]{49,9,54,70,93,52,63,52,22,55,3,2,59,28,37,69,9,62,32,81,75,35,47,18,36,19,25,46,60,95,23,78,27,35,77,55,36,88,97,71,9,21,32,66},new int[]{44,89,65,75,80,87,15,27,16,46,97,72,48,65,19,90,37,58,55,53,47,3,88,86,62,1,39,73,33,23,34,49,49,99,49,10,96,66,71,88,67,76,39,42},new int[]{91,1,46,36,96,91,44,31,97,58,96,4,53,89,93,57,73,78,50,5,52,17,32,6,69,93,92,61,10,23,53,61,19,4,46,32,84,46,62,92,54,87,67,24},new int[]{66,18,96,48,46,48,62,94,27,62,78,65,52,1,50,40,72,17,1,78,77,30,77,67,22,35,56,14,45,86,33,12,24,69,57,9,2,59,95,29,93,55,94,22},new int[]{85,49,12,71,89,8,97,16,40,45,64,63,51,10,76,86,71,45,85,56,86,73,84,13,64,88,30,52,54,57,18,25,53,20,11,40,98,23,90,87,42,47,56,33},new int[]{89,98,26,69,29,94,60,91,37,25,74,44,34,12,93,39,19,19,29,66,90,98,94,76,20,57,97,9,2,28,34,21,83,78,81,56,5,85,22,59,40,84,92,63},new int[]{32,45,83,92,87,33,82,35,46,36,62,83,90,26,7,87,5,87,32,79,91,81,84,57,80,62,28,95,80,78,74,66,97,41,86,66,64,7,41,45,44,30,38,39},new int[]{19,47,38,17,74,79,69,99,4,35,1,81,85,58,22,5,60,36,9,84,57,78,84,90,4,51,39,84,52,75,71,55,31,50,8,87,15,65,10,41,88,79,48,21},new int[]{86,24,74,23,80,69,33,36,25,58,90,66,98,31,44,63,45,83,82,50,67,71,87,1,71,86,67,83,94,9,99,35,13,26,45,51,92,25,56,39,3,75,94,53},new int[]{33,62,98,67,69,95,4,72,59,17,22,38,88,31,49,52,89,38,96,49,90,27,23,84,27,81,14,3,27,62,14,92,44,25,61,75,52,12,97,84,34,23,19,1},new int[]{74,65,5,57,22,43,2,73,7,21,71,59,9,40,73,49,12,73,10,74,17,4,64,16,49,27,6,9,58,32,38,30,78,45,29,92,22,31,81,17,54,79,47,32},new int[]{28,11,39,17,76,39,73,25,26,68,62,19,13,29,54,73,42,62,71,71,21,9,45,27,48,85,69,5,72,15,77,97,44,47,32,36,49,53,23,34,18,12,87,2},new int[]{27,50,31,48,86,69,17,43,71,18,66,31,63,28,67,9,97,28,92,18,15,75,89,5,41,91,76,74,73,66,73,51,16,65,85,57,37,39,65,49,47,40,14,40},new int[]{48,32,88,39,33,30,26,43,55,44,78,76,3,7,85,58,91,10,10,81,42,34,82,26,60,2,73,45,5,26,79,25,26,92,87,85,22,19,10,42,31,31,99,75},new int[]{81,97,86,90,36,66,32,67,63,23,50,65,69,44,58,57,37,65,18,5,82,99,96,26,33,42,88,27,54,83,82,79,91,75,24,3,39,71,12,33,22,35,14,26},new int[]{83,85,54,41,45,31,69,99,17,60,96,4,10,94,9,61,90,22,21,23,61,12,95,17,55,21,54,47,41,97,15,96,59,99,15,29,11,29,86,90,82,89,85,88},new int[]{56,92,53,3,13,38,70,11,23,73,56,17,9,83,99,96,92,28,79,19,97,87,92,4,47,47,31,99,5,33,48,32,79,59,98,64,47,9,35,47,88,82,17,1},new int[]{55,11,33,70,56,64,93,58,20,18,78,45,43,20,57,82,27,18,17,60,89,5,6,97,15,39,80,39,88,21,13,29,98,5,67,21,9,67,44,62,94,67,62,62},new int[]{60,49,39,41,50,98,17,53,55,78,75,56,1,65,64,52,15,2,12,45,57,42,2,87,62,34,17,41,78,75,84,71,65,15,38,98,73,65,9,42,66,86,89,51},new int[]{78,99,80,19,31,66,32,75,8,69,98,32,47,70,8,34,4,36,44,25,26,33,9,47,72,17,15,42,54,13,50,44,3,53,56,54,57,12,93,59,65,96,37,20},new int[]{72,37,31,95,25,50,49,8,94,94,91,35,13,21,73,24,48,33,1,72,3,14,14,49,33,4,38,25,47,13,39,25,73,43,38,35,93,55,50,78,34,25,42,92},new int[]{51,94,37,66,85,34,83,38,31,26,76,94,26,63,48,95,79,10,36,40,26,9,53,81,70,86,80,86,53,39,61,52,68,68,73,78,42,90,67,96,75,51,3,13},new int[]{13,61,24,20,74,87,97,55,35,78,80,30,83,33,41,66,49,8,84,3,85,65,85,72,2,87,41,53,75,16,9,96,39,64,36,23,47,49,55,94,10,63,95,26},new int[]{48,30,2,29,54,32,38,21,27,88,34,23,78,39,69,73,45,63,8,7,30,12,20,64,29,55,12,84,22,23,48,45,26,28,55,73,69,2,28,77,79,53,14,46},new int[]{78,67,74,70,20,35,48,43,20,56,3,68,11,62,61,95,58,29,38,84,88,87,22,86,41,84,63,38,50,7,24,46,25,78,29,67,93,80,85,22,85,86,9,87},new int[]{49,73,96,36,5,90,4,24,41,14,91,12,82,44,9,66,38,96,77,57,47,55,88,2,83,18,66,90,57,64,88,27,53,59,29,72,95,98,14,68,43,29,57,33},new int[]{21,41,1,27,2,64,51,54,74,74,30,1,95,99,29,13,73,43,41,75,88,89,58,77,14,41,67,54,6,46,77,1,29,78,76,26,58,87,3,60,14,98,23,62},new int[]{10,4,39,74,88,34,88,25,52,15,12,1,9,59,14,31,88,53,63,10,43,18,67,59,76,99,23,86,75,46,49,23,12,29,89,88,59,53,68,63,29,3,95,89},new int[]{37,63,23,49,86,93,77,3,22,36,10,9,56,55,19,72,33,20,94,35,31,83,50,46,78,10,67,34,51,92,83,39,90,68,12,26,71,67,90,2,12,59,32,51},new int[]{11,32,64,45,79,54,6,26,8,8,38,8,17,83,3,41,73,53,97,96,96,70,62,53,59,93,81,83,95,83,23,47,35,14,65,97,49,36,1,84,22,35,3,12},new int[]{37,58,77,12,2,84,65,58,60,41,35,88,90,11,52,52,62,63,15,70,40,9,70,17,23,58,95,80,51,57,86,16,45,61,12,73,6,4,81,74,35,47,85,19},new int[]{27,11,70,59,41,43,28,63,67,45,24,77,64,79,73,39,99,45,61,82,43,67,92,80,42,41,47,43,23,32,74,57,38,77,15,28,13,35,2,61,65,41,96,94},new int[]{86,4,53,88,14,17,14,41,62,52,27,85,40,35,90,95,59,97,49,63,11,80,6,98,41,32,21,93,75,57,5,91,28,95,75,77,70,27,94,53,48,83,78,58},new int[]{9,55,45,28,28,46,25,26,62,68,67,34,21,81,34,44,76,89,21,18,36,70,84,53,20,96,95,84,94,3,84,8,85,48,23,1,2,74,37,94,51,44,24,32},new int[]{56,50,64,30,38,78,55,3,25,45,62,7,81,27,23,32,2,75,34,52,61,34,7,10,89,2,30,81,29,82,60,99,17,56,86,51,25,84,16,25,15,79,57,15},new int[]{56,82,37,65,33,3,49,22,54,21,27,4,99,1,4,55,24,29,22,23,85,78,8,58,80,99,88,59,90,7,25,45,90,26,30,66,53,73,39,11,79,12,99,50}}); param0.add(new int[][]{new int[]{16,49,32,82,45,85,80,71,5,44,41,97,95,85,67,74,75,22,17,89,92,50,84,94,31,13,74,51,33,20,48,78,72,72,92,74,14,62,51,78,70,98,81,21,92,38,15},new int[]{36,9,99,59,82,54,17,82,4,84,13,75,43,97,92,8,20,82,71,61,44,97,51,58,75,30,99,84,10,94,18,25,96,34,44,39,95,92,90,68,43,20,72,2,27,34,55},new int[]{36,85,72,87,72,69,65,85,44,43,74,66,21,61,13,28,30,82,2,58,83,21,90,46,89,83,25,57,20,6,18,49,82,20,34,10,33,55,19,66,47,49,67,30,83,85,59},new int[]{78,31,21,17,53,51,24,40,98,47,20,16,58,49,42,12,41,58,60,24,13,34,61,27,85,67,14,41,57,30,45,74,1,92,83,94,84,52,20,23,95,96,90,78,6,33,8},new int[]{63,4,13,35,93,89,34,56,11,38,93,45,86,58,34,75,92,72,24,74,79,63,39,21,36,48,84,13,2,27,7,90,94,19,40,21,58,26,74,36,44,64,27,8,90,1,23},new int[]{73,31,7,9,71,92,98,53,16,74,24,74,46,29,89,30,51,83,31,30,34,92,19,75,28,6,17,91,36,1,16,68,47,23,96,67,62,85,88,15,75,67,83,43,8,98,98},new int[]{44,26,67,32,64,43,74,74,62,11,78,95,9,48,6,54,62,54,99,98,56,82,87,30,3,61,15,3,15,67,29,31,71,71,55,75,92,43,25,81,55,50,38,60,85,52,84},new int[]{74,70,76,81,45,97,19,5,42,93,30,65,76,79,5,38,11,84,29,14,90,98,74,91,89,10,39,60,96,98,23,97,96,22,86,87,83,23,22,62,94,19,22,1,34,26,4},new int[]{48,45,12,92,37,3,28,93,84,2,56,65,46,44,18,73,37,54,25,83,62,25,52,63,15,46,56,26,64,20,67,25,21,34,88,25,65,29,32,1,35,56,16,32,79,5,10},new int[]{86,72,79,20,89,12,90,68,63,26,60,74,61,15,5,32,96,22,22,12,64,75,88,80,16,65,51,87,92,32,53,3,13,92,92,58,45,24,51,13,24,5,81,50,76,49,18},new int[]{33,58,31,34,94,96,74,31,99,79,27,59,27,1,76,68,23,98,52,57,87,51,83,84,63,84,93,77,28,24,22,86,40,75,8,96,88,12,49,21,67,39,62,82,58,62,70},new int[]{36,45,79,15,62,38,64,88,71,9,75,80,71,25,78,65,20,28,49,34,73,20,95,85,22,77,44,47,25,22,61,52,20,96,80,20,86,45,37,15,76,9,44,15,44,86,12},new int[]{27,19,25,74,99,64,12,50,72,11,83,23,88,15,63,20,89,78,10,61,93,47,49,49,76,33,87,78,23,53,37,22,93,2,20,5,91,3,82,77,86,77,12,32,58,71,70},new int[]{40,6,63,25,91,69,83,73,50,40,1,46,73,39,10,49,14,46,40,89,19,17,82,46,73,65,70,38,17,73,11,53,18,7,35,44,71,39,11,10,98,88,76,9,86,96,8},new int[]{48,21,80,97,89,6,59,68,23,73,75,35,12,99,71,57,29,85,67,61,61,88,30,27,93,30,55,23,37,26,36,92,63,37,51,68,93,78,63,37,97,31,78,25,73,25,46},new int[]{89,30,20,23,1,15,21,30,11,90,52,30,9,69,47,34,33,98,65,51,79,31,56,76,71,45,33,96,51,5,38,5,56,81,71,89,25,67,52,36,92,23,8,31,63,21,99},new int[]{50,29,60,67,44,89,2,98,15,39,40,47,76,52,88,6,70,48,58,90,3,96,46,18,56,92,33,17,32,76,85,2,26,39,63,17,34,19,62,32,50,86,45,54,82,88,1},new int[]{66,40,24,52,2,61,27,66,87,33,34,62,32,3,55,27,76,8,20,52,17,33,55,75,73,98,71,16,91,79,64,88,40,58,83,23,95,94,7,59,59,3,30,10,98,13,39},new int[]{77,64,25,41,98,40,62,40,34,79,3,52,46,86,98,69,41,86,60,29,8,98,4,25,50,23,25,98,70,98,21,94,56,3,79,21,83,83,49,46,98,78,68,31,46,75,44},new int[]{45,75,49,4,80,57,56,38,6,82,89,24,52,39,73,37,98,34,40,40,37,92,50,11,78,59,26,60,8,28,84,60,89,10,63,61,75,26,23,63,19,18,50,19,15,16,20},new int[]{19,75,71,19,88,31,52,48,8,50,61,88,8,13,74,19,50,23,57,97,30,94,29,61,35,9,72,25,64,37,38,8,90,75,40,23,96,45,1,49,9,40,28,97,96,8,37},new int[]{82,71,18,76,68,77,75,80,44,78,16,52,53,86,18,40,61,25,35,71,84,27,93,10,75,20,33,77,80,11,69,67,59,66,53,38,10,6,85,95,34,49,32,29,65,33,17},new int[]{98,49,16,7,13,84,4,63,69,80,73,76,78,15,5,42,18,72,8,89,68,26,75,70,33,22,93,69,1,86,35,56,95,67,3,71,1,42,58,88,94,96,96,85,64,80,4},new int[]{17,77,99,40,34,56,11,89,40,94,13,24,34,8,82,7,62,46,86,71,13,2,2,29,91,82,58,2,59,53,68,61,49,46,72,59,48,9,18,50,86,75,27,32,66,66,94},new int[]{22,86,24,91,75,13,91,15,49,17,39,73,87,4,57,15,43,31,6,90,59,65,86,30,58,86,97,56,69,36,46,74,1,12,67,10,1,19,82,95,55,49,55,86,68,41,55},new int[]{74,74,79,69,43,81,82,57,48,50,69,8,56,91,89,26,23,41,87,93,97,59,18,71,96,71,8,58,85,17,51,33,30,66,60,46,22,32,25,8,97,63,29,81,40,45,2},new int[]{49,31,68,90,9,95,10,51,70,44,26,75,79,84,78,21,91,30,71,15,80,59,84,84,86,70,20,69,53,75,2,30,8,40,8,17,99,30,1,69,64,80,36,79,49,81,77},new int[]{24,4,77,62,9,26,47,16,37,70,11,2,94,83,23,47,62,76,39,6,36,62,60,79,36,77,72,89,88,31,40,60,13,93,96,37,61,18,90,18,34,54,31,79,37,84,92},new int[]{68,72,58,82,96,53,87,62,79,7,31,96,40,78,83,50,80,9,65,25,8,39,32,8,13,67,66,28,4,23,34,55,71,94,58,73,19,9,23,75,13,93,31,72,19,5,91},new int[]{39,14,22,22,5,62,52,80,39,26,80,56,12,80,49,12,96,5,92,51,4,93,83,25,99,24,56,19,23,95,83,96,77,46,18,61,71,45,88,46,17,15,73,34,99,8,50},new int[]{11,88,42,94,85,43,35,59,12,73,12,28,93,46,40,99,29,70,16,46,92,65,29,52,40,6,27,37,22,7,1,77,48,51,14,79,12,49,41,68,85,2,85,62,57,14,44},new int[]{66,75,37,78,47,61,84,99,27,49,60,70,71,45,1,13,38,17,38,1,1,83,30,77,7,20,44,73,13,39,20,89,5,52,25,12,90,56,86,1,72,49,67,22,85,85,31},new int[]{1,27,2,93,1,42,8,35,35,7,23,23,46,19,79,72,97,99,13,50,31,71,84,38,57,8,14,94,51,9,13,76,66,38,21,29,84,50,64,9,15,53,97,53,71,3,87},new int[]{22,39,77,9,34,12,34,45,97,50,99,28,39,3,47,12,43,77,67,18,90,10,4,12,53,51,16,17,95,26,2,29,94,47,11,34,71,29,97,49,91,16,81,75,14,13,35},new int[]{90,52,25,59,76,68,42,48,91,45,72,72,29,3,21,31,13,95,81,48,96,24,2,3,26,2,33,34,90,98,38,78,95,20,10,84,33,45,60,66,61,51,12,80,9,11,21},new int[]{76,68,26,63,19,17,44,61,1,72,58,94,41,24,43,81,94,9,66,90,32,91,41,11,65,18,8,27,82,9,2,81,75,46,70,5,12,44,42,99,88,30,52,81,47,36,70},new int[]{32,98,44,16,71,96,17,32,14,26,73,13,89,12,45,16,94,52,21,24,43,5,33,31,9,35,8,75,17,80,20,91,78,22,54,71,75,81,77,81,75,68,80,31,85,97,13},new int[]{29,79,10,33,15,77,35,54,21,30,46,42,71,49,24,80,69,6,2,3,53,10,24,33,84,22,61,96,94,67,4,51,4,39,31,57,73,30,93,89,39,99,25,58,36,11,90},new int[]{46,89,21,2,74,39,99,33,31,4,67,69,81,13,65,45,39,87,89,53,31,13,1,98,29,61,95,72,2,12,56,97,94,41,27,89,38,97,52,80,32,88,2,66,20,57,62},new int[]{91,86,48,83,7,67,50,34,87,69,67,88,91,34,43,21,12,32,47,86,98,87,55,65,68,17,26,95,33,64,92,10,46,73,90,51,34,14,41,90,95,38,48,43,28,41,56},new int[]{81,76,91,65,60,97,13,69,52,43,92,88,84,40,42,37,84,23,67,69,79,69,98,58,46,87,47,17,9,68,94,78,30,95,61,65,58,27,66,45,40,61,41,74,88,84,42},new int[]{62,80,38,60,49,18,99,94,5,11,4,61,75,12,49,28,90,34,56,65,6,33,47,24,34,72,16,80,16,98,84,14,59,62,90,66,19,61,66,26,89,49,19,49,81,30,76},new int[]{57,85,36,40,28,97,46,73,82,88,32,87,58,76,98,26,70,69,87,50,79,32,58,64,77,28,97,72,80,39,96,80,45,13,20,58,19,75,91,80,9,77,19,94,55,39,17},new int[]{62,94,93,60,42,2,50,67,20,1,5,97,39,87,18,68,97,90,22,30,90,1,70,81,95,51,68,74,61,48,53,34,86,86,7,39,37,63,55,15,83,74,62,68,50,41,61},new int[]{25,28,82,35,83,53,84,39,97,59,65,1,45,19,48,49,73,14,67,30,65,69,87,6,84,46,42,72,61,31,79,26,58,33,52,32,54,1,5,22,95,5,8,70,63,10,62},new int[]{40,47,80,56,28,56,1,52,82,62,42,47,37,11,67,29,4,95,11,30,79,79,58,32,29,43,92,85,39,11,96,27,24,37,65,32,53,1,56,34,82,29,6,57,95,14,75},new int[]{69,62,86,51,13,76,4,38,4,30,54,65,61,49,31,42,50,23,78,99,81,60,32,56,56,87,34,41,39,86,42,66,20,14,38,37,37,12,92,56,8,93,21,39,48,18,63}}); List param1 = new ArrayList<>(); param1.add(2); param1.add(3); param1.add(1); param1.add(2); param1.add(4); param1.add(10); param1.add(7); param1.add(35); param1.add(29); param1.add(41); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( m , n ) : for i in range ( 0 , n ) : sum = 0 for j in range ( 0 , n ) : sum = sum + abs ( m [ i ] [ j ] ) sum = sum - abs ( m [ i ] [ i ] ) if ( abs ( m [ i ] [ i ] ) < sum ) : return False return True ",,," if __name__ == '__main__': param = [ ([[ 3, -2, 1 ], [ 1, -3, 2 ], [ -1, 2, 4 ]],2,), ([[ 2, -2, 1 ], [ 1, -3, 2 ], [ -1, 2, 4 ]],3,), ([[78, 46, 33, 58, 79, 94, 94, 31, 69], [83, 48, 11, 74, 33, 61, 88, 15, 29], [27, 20, 36, 14, 37, 88, 49, 36, 58], [93, 15, 39, 5, 97, 45, 1, 47, 34], [8, 88, 54, 87, 60, 77, 37, 46, 18], [10, 68, 71, 86, 76, 24, 47, 37, 72], [84, 43, 82, 25, 87, 18, 51, 46, 75], [59, 39, 78, 86, 38, 55, 79, 5, 5], [50, 42, 19, 34, 53, 80, 21, 45, 96]],1,), ([[88, 35, 82, 14, 86, 94, 12, 49, 76, 94, 3, 96, 27, 92, 82, 25, 15, 27, 15], [30, 75, 59, 45, 53, 78, 45, 92, 72, 61, 11, 78, 51, 86, 89, 74, 39, 24, 6], [33, 22, 60, 20, 11, 35, 35, 65, 90, 78, 49, 66, 46, 5, 39, 79, 85, 93, 51], [21, 38, 36, 14, 33, 23, 72, 84, 38, 47, 64, 47, 1, 42, 68, 78, 86, 76, 25], [57, 52, 7, 7, 56, 39, 70, 83, 58, 23, 10, 72, 36, 71, 3, 72, 77, 95, 13], [90, 48, 66, 3, 63, 15, 2, 61, 59, 17, 11, 5, 70, 67, 23, 96, 63, 4, 29], [17, 95, 35, 48, 85, 87, 48, 95, 53, 65, 75, 1, 7, 77, 84, 70, 30, 70, 98], [99, 84, 38, 30, 97, 54, 88, 95, 16, 16, 27, 22, 15, 46, 1, 28, 33, 15, 95], [57, 70, 68, 58, 20, 4, 10, 7, 91, 57, 6, 55, 31, 64, 36, 91, 13, 75, 73], [72, 61, 10, 66, 24, 99, 34, 50, 75, 1, 5, 27, 7, 1, 32, 17, 18, 68, 49], [13, 69, 22, 26, 68, 87, 5, 9, 77, 62, 73, 68, 90, 78, 2, 95, 50, 51, 90], [2, 41, 64, 44, 52, 37, 66, 92, 56, 23, 71, 39, 86, 60, 56, 36, 1, 98, 4], [41, 99, 53, 31, 33, 5, 43, 11, 32, 1, 43, 6, 92, 81, 11, 41, 27, 61, 76], [13, 95, 35, 25, 94, 36, 21, 55, 36, 28, 27, 12, 74, 26, 93, 45, 6, 89, 8], [75, 17, 38, 77, 41, 15, 83, 83, 74, 28, 25, 79, 35, 80, 37, 27, 5, 59, 88], [66, 99, 57, 61, 97, 96, 60, 64, 32, 16, 44, 87, 90, 69, 61, 71, 34, 74, 86], [21, 19, 52, 42, 39, 45, 89, 13, 43, 83, 71, 95, 66, 45, 4, 1, 60, 50, 87], [47, 17, 86, 35, 8, 56, 60, 55, 7, 65, 25, 24, 97, 75, 96, 93, 65, 47, 8], [45, 29, 31, 57, 99, 7, 31, 60, 56, 32, 94, 61, 61, 76, 99, 64, 10, 26, 69]],2,), ([[97, 37, 30, 97, 2, 42, 68, 90, 94], [35, 10, 31, 79, 85, 6, 65, 74, 2], [9, 81, 80, 66, 80, 99, 59, 92, 13], [6, 25, 63, 59, 90, 46, 15, 66, 86], [42, 92, 17, 23, 15, 38, 56, 34, 94], [65, 80, 89, 87, 97, 34, 73, 16, 50], [69, 42, 62, 12, 69, 87, 72, 99, 80], [84, 28, 30, 75, 50, 17, 10, 88, 95], [11, 47, 8, 31, 37, 33, 9, 46, 3]],4,), ([[28, 52, 61, 24, 10, 42, 37, 15, 28, 37, 65, 13, 59], [68, 56, 30, 64, 67, 20, 99, 27, 12, 41, 80, 96, 51], [97, 80, 29, 91, 95, 51, 59, 88, 31, 9, 70, 30, 90], [40, 7, 72, 59, 11, 3, 4, 97, 20, 5, 34, 14, 13], [61, 49, 45, 53, 24, 94, 63, 75, 9, 63, 56, 77, 77], [96, 71, 75, 42, 1, 64, 92, 72, 15, 69, 22, 20, 68], [45, 89, 80, 40, 46, 91, 63, 93, 12, 52, 7, 88, 55], [5, 47, 97, 38, 43, 70, 8, 86, 50, 78, 9, 13, 50], [96, 78, 35, 25, 61, 31, 49, 43, 45, 84, 7, 74, 6], [89, 50, 70, 45, 54, 17, 86, 87, 29, 64, 71, 99, 20], [26, 93, 29, 7, 34, 5, 77, 6, 96, 33, 43, 59, 33], [83, 61, 18, 14, 21, 39, 34, 31, 81, 7, 85, 71, 1], [86, 22, 87, 92, 63, 62, 46, 57, 94, 45, 74, 76, 80]],10,), ([[68, 37, 94, 90, 14, 37, 89, 91, 14, 66, 66, 33, 2], [98, 53, 89, 55, 45, 37, 27, 90, 52, 86, 47, 58, 7], [13, 48, 28, 45, 56, 92, 88, 35, 55, 97, 37, 9, 3], [2, 58, 22, 85, 24, 78, 54, 97, 17, 58, 58, 21, 77], [63, 63, 44, 40, 75, 66, 92, 67, 79, 46, 24, 72, 70], [96, 51, 99, 77, 92, 4, 31, 65, 30, 72, 40, 14, 44], [92, 34, 39, 4, 88, 27, 42, 11, 87, 32, 50, 53, 4], [19, 71, 33, 78, 77, 70, 83, 55, 9, 62, 99, 62, 48], [90, 68, 48, 92, 27, 55, 44, 71, 52, 57, 9, 98, 8], [56, 10, 65, 72, 45, 39, 46, 17, 82, 98, 99, 67, 76], [62, 68, 36, 9, 35, 67, 89, 52, 90, 91, 28, 58, 83], [24, 59, 37, 38, 25, 98, 15, 16, 55, 4, 26, 39, 57], [47, 90, 48, 92, 49, 37, 38, 62, 61, 74, 97, 8, 38]],7,), ([[85, 56, 45, 50, 20, 63, 55, 34, 92, 32, 76, 73, 43, 79, 13, 2, 61, 84, 14, 42, 15, 93, 85, 10, 56, 53, 58, 85, 99, 81, 62, 57, 63, 4, 78, 96], [82, 34, 32, 78, 34, 70, 40, 35, 15, 51, 20, 92, 37, 38, 21, 88, 10, 54, 9, 86, 42, 16, 24, 4, 44, 23, 42, 86, 66, 92, 19, 20, 28, 24, 91, 2], [7, 1, 11, 51, 60, 31, 30, 77, 24, 18, 58, 77, 17, 46, 94, 19, 12, 90, 82, 12, 50, 66, 20, 6, 1, 90, 7, 96, 55, 97, 74, 15, 95, 24, 29, 82], [71, 34, 78, 84, 93, 37, 42, 64, 95, 19, 23, 71, 6, 99, 93, 55, 77, 39, 25, 98, 83, 4, 88, 33, 66, 2, 14, 50, 11, 34, 38, 92, 39, 22, 42, 97], [95, 57, 78, 38, 9, 88, 29, 69, 42, 60, 39, 91, 72, 93, 60, 53, 76, 8, 21, 56, 48, 47, 9, 78, 1, 55, 31, 80, 91, 11, 66, 60, 31, 50, 60, 88], [62, 39, 3, 58, 68, 30, 67, 68, 58, 77, 53, 14, 10, 78, 81, 22, 63, 61, 46, 37, 21, 89, 3, 19, 32, 79, 24, 73, 74, 48, 96, 58, 40, 7, 46, 91], [15, 85, 74, 87, 5, 59, 70, 22, 28, 54, 19, 14, 48, 7, 79, 32, 22, 46, 85, 83, 13, 22, 10, 44, 24, 59, 62, 72, 72, 55, 49, 50, 19, 82, 58, 97], [48, 93, 96, 72, 96, 12, 86, 20, 45, 26, 81, 98, 31, 82, 59, 3, 18, 84, 21, 57, 99, 42, 62, 30, 61, 36, 55, 4, 15, 71, 96, 97, 57, 63, 77, 64], [17, 53, 40, 70, 50, 68, 15, 72, 34, 30, 87, 73, 24, 8, 57, 70, 25, 77, 34, 25, 18, 73, 97, 70, 14, 6, 82, 90, 36, 36, 75, 18, 15, 94, 89, 16], [76, 14, 47, 54, 58, 77, 30, 46, 16, 1, 41, 93, 27, 77, 62, 81, 28, 20, 55, 51, 69, 88, 73, 97, 34, 27, 97, 38, 29, 35, 20, 19, 5, 25, 93, 26], [51, 66, 61, 15, 45, 6, 58, 1, 73, 43, 16, 14, 74, 19, 51, 8, 48, 12, 70, 35, 70, 6, 99, 11, 38, 91, 26, 28, 72, 89, 83, 80, 50, 58, 26, 44], [15, 76, 24, 77, 59, 57, 17, 77, 81, 1, 11, 20, 31, 99, 39, 63, 6, 99, 28, 51, 53, 44, 65, 80, 12, 28, 79, 72, 68, 95, 30, 35, 6, 85, 30, 80], [63, 8, 91, 33, 43, 76, 43, 45, 87, 54, 65, 7, 36, 25, 85, 37, 12, 32, 49, 38, 56, 80, 65, 26, 57, 14, 56, 70, 41, 51, 84, 67, 12, 97, 49, 1], [19, 66, 58, 87, 72, 98, 4, 8, 27, 26, 97, 43, 40, 50, 67, 73, 74, 29, 85, 42, 18, 81, 21, 67, 62, 27, 96, 93, 47, 93, 26, 9, 91, 12, 16, 47], [56, 66, 51, 27, 73, 66, 62, 71, 8, 38, 6, 59, 19, 79, 56, 28, 94, 91, 10, 45, 95, 65, 50, 32, 61, 16, 6, 66, 62, 66, 67, 19, 4, 43, 18, 82], [46, 46, 85, 21, 30, 64, 41, 17, 5, 5, 73, 75, 48, 78, 38, 6, 58, 14, 72, 94, 59, 65, 89, 13, 27, 25, 56, 68, 59, 95, 49, 18, 81, 75, 76, 3], [79, 57, 6, 69, 31, 8, 10, 3, 12, 92, 76, 94, 19, 21, 81, 14, 75, 29, 7, 49, 65, 7, 14, 16, 99, 16, 85, 13, 82, 29, 85, 73, 95, 61, 37, 17], [31, 59, 88, 47, 6, 32, 31, 18, 9, 3, 71, 26, 13, 34, 43, 93, 33, 69, 36, 79, 74, 68, 47, 61, 45, 96, 88, 84, 48, 41, 38, 68, 75, 11, 16, 65], [97, 71, 67, 71, 1, 97, 71, 4, 82, 37, 14, 79, 25, 82, 4, 66, 43, 26, 84, 15, 6, 37, 43, 42, 13, 16, 42, 38, 66, 65, 5, 30, 95, 43, 32, 67], [67, 42, 5, 99, 86, 96, 59, 23, 8, 68, 70, 91, 19, 44, 93, 38, 44, 6, 3, 96, 80, 33, 66, 58, 26, 99, 28, 43, 75, 88, 16, 89, 23, 59, 35, 89], [41, 97, 22, 74, 1, 46, 22, 32, 87, 30, 87, 43, 12, 83, 71, 27, 26, 18, 92, 75, 66, 81, 61, 46, 29, 32, 15, 60, 82, 28, 27, 41, 47, 33, 44, 50], [10, 24, 34, 91, 20, 25, 55, 90, 43, 53, 85, 50, 55, 13, 49, 97, 10, 92, 97, 11, 78, 84, 20, 72, 79, 97, 83, 48, 76, 17, 33, 20, 46, 31, 51, 83], [19, 62, 44, 77, 38, 49, 65, 11, 27, 58, 64, 65, 15, 82, 89, 1, 19, 56, 64, 34, 64, 10, 76, 60, 39, 66, 32, 51, 26, 57, 84, 60, 55, 6, 7, 66], [81, 26, 95, 98, 82, 78, 5, 87, 1, 84, 2, 65, 10, 50, 51, 69, 41, 58, 77, 68, 24, 91, 56, 36, 2, 96, 56, 81, 12, 12, 85, 72, 22, 74, 84, 62], [64, 28, 89, 28, 4, 45, 90, 13, 83, 98, 80, 4, 61, 84, 26, 94, 6, 77, 56, 81, 27, 35, 97, 82, 58, 84, 63, 33, 95, 83, 97, 81, 33, 69, 40, 47], [45, 27, 7, 58, 14, 4, 82, 34, 80, 91, 38, 20, 46, 19, 1, 23, 62, 73, 28, 84, 80, 77, 33, 3, 79, 16, 30, 25, 78, 1, 33, 37, 29, 37, 61, 8], [1, 63, 88, 65, 46, 43, 10, 82, 85, 10, 62, 86, 51, 45, 73, 73, 45, 85, 58, 95, 66, 24, 97, 75, 65, 55, 51, 72, 73, 21, 47, 22, 29, 40, 3, 49], [25, 82, 11, 94, 89, 75, 98, 88, 48, 32, 3, 45, 89, 20, 20, 51, 81, 20, 82, 14, 98, 80, 32, 72, 42, 80, 39, 38, 64, 4, 99, 92, 63, 61, 78, 5], [66, 45, 50, 88, 3, 23, 11, 38, 56, 35, 65, 6, 70, 40, 90, 35, 13, 25, 86, 81, 78, 67, 68, 99, 47, 55, 92, 43, 2, 45, 48, 62, 38, 47, 4, 60], [49, 76, 34, 44, 94, 85, 56, 92, 42, 50, 69, 33, 98, 96, 91, 67, 42, 44, 68, 57, 36, 41, 56, 3, 56, 56, 65, 39, 40, 39, 27, 67, 94, 65, 74, 3], [3, 37, 98, 20, 11, 83, 91, 24, 70, 65, 83, 74, 32, 62, 55, 36, 66, 37, 14, 46, 77, 56, 50, 61, 17, 27, 54, 29, 13, 49, 25, 88, 23, 26, 48, 36], [6, 80, 74, 39, 57, 91, 66, 10, 72, 9, 77, 72, 27, 46, 63, 42, 85, 41, 34, 93, 30, 44, 80, 1, 45, 47, 93, 30, 22, 15, 84, 38, 23, 31, 57, 81], [35, 66, 53, 31, 26, 31, 72, 80, 12, 53, 56, 83, 62, 44, 58, 77, 65, 13, 61, 68, 51, 62, 48, 95, 63, 72, 91, 72, 51, 24, 86, 40, 29, 73, 17, 1], [96, 84, 1, 25, 41, 91, 23, 18, 95, 28, 85, 12, 88, 49, 97, 81, 97, 16, 27, 53, 92, 36, 7, 34, 65, 4, 26, 20, 51, 77, 99, 10, 8, 18, 17, 69], [30, 95, 39, 61, 24, 81, 98, 35, 79, 61, 75, 98, 72, 15, 36, 55, 37, 87, 62, 64, 39, 90, 98, 75, 12, 72, 8, 41, 69, 74, 3, 43, 37, 86, 57, 25], [4, 58, 37, 8, 94, 9, 79, 1, 13, 68, 16, 44, 65, 14, 91, 26, 32, 2, 16, 92, 49, 90, 75, 23, 94, 60, 95, 66, 20, 93, 74, 18, 59, 31, 4, 27]],35,), ([[95, 71, 19, 39, 66, 78, 46, 92, 38, 67, 29, 91, 57, 48, 52, 48, 61, 67, 48, 94, 82, 8, 74, 86, 88, 67, 14, 47, 24, 91, 62, 58, 34, 31, 48, 91, 45, 29, 29, 63, 48, 12, 78, 27], [47, 66, 37, 45, 57, 18, 13, 73, 29, 56, 74, 20, 29, 6, 26, 61, 86, 43, 47, 26, 81, 1, 95, 73, 26, 64, 62, 6, 62, 66, 42, 27, 65, 30, 82, 98, 85, 65, 47, 32, 34, 47, 14, 5], [36, 96, 9, 35, 25, 75, 46, 13, 61, 30, 98, 32, 30, 82, 56, 67, 71, 55, 98, 8, 43, 48, 58, 32, 78, 69, 7, 74, 20, 62, 21, 92, 29, 70, 38, 42, 3, 37, 17, 33, 10, 37, 33, 28], [87, 42, 58, 48, 51, 10, 8, 16, 96, 62, 49, 89, 15, 16, 81, 27, 47, 26, 72, 41, 11, 91, 9, 54, 11, 7, 28, 94, 62, 55, 36, 73, 99, 63, 51, 77, 48, 68, 10, 26, 67, 53, 43, 17], [27, 22, 36, 72, 33, 90, 95, 53, 11, 93, 29, 38, 58, 15, 54, 62, 57, 79, 71, 58, 49, 53, 29, 33, 46, 54, 80, 98, 85, 7, 29, 9, 49, 71, 78, 94, 88, 51, 98, 8, 55, 65, 98, 84], [95, 79, 15, 51, 34, 69, 86, 12, 45, 31, 54, 93, 22, 72, 64, 60, 28, 21, 75, 75, 87, 77, 43, 27, 23, 97, 90, 36, 97, 38, 16, 74, 43, 41, 44, 52, 17, 52, 43, 23, 1, 93, 25, 6], [74, 54, 78, 23, 19, 56, 53, 31, 38, 19, 1, 77, 50, 98, 58, 81, 32, 49, 98, 97, 92, 44, 29, 88, 48, 80, 77, 26, 7, 44, 14, 52, 32, 75, 32, 75, 84, 57, 52, 34, 61, 62, 86, 87], [93, 76, 31, 29, 31, 12, 35, 57, 41, 27, 15, 94, 71, 36, 24, 82, 24, 96, 76, 28, 75, 3, 3, 29, 32, 54, 38, 95, 56, 65, 21, 41, 20, 60, 75, 59, 74, 55, 3, 14, 45, 95, 99, 60], [49, 9, 54, 70, 93, 52, 63, 52, 22, 55, 3, 2, 59, 28, 37, 69, 9, 62, 32, 81, 75, 35, 47, 18, 36, 19, 25, 46, 60, 95, 23, 78, 27, 35, 77, 55, 36, 88, 97, 71, 9, 21, 32, 66], [44, 89, 65, 75, 80, 87, 15, 27, 16, 46, 97, 72, 48, 65, 19, 90, 37, 58, 55, 53, 47, 3, 88, 86, 62, 1, 39, 73, 33, 23, 34, 49, 49, 99, 49, 10, 96, 66, 71, 88, 67, 76, 39, 42], [91, 1, 46, 36, 96, 91, 44, 31, 97, 58, 96, 4, 53, 89, 93, 57, 73, 78, 50, 5, 52, 17, 32, 6, 69, 93, 92, 61, 10, 23, 53, 61, 19, 4, 46, 32, 84, 46, 62, 92, 54, 87, 67, 24], [66, 18, 96, 48, 46, 48, 62, 94, 27, 62, 78, 65, 52, 1, 50, 40, 72, 17, 1, 78, 77, 30, 77, 67, 22, 35, 56, 14, 45, 86, 33, 12, 24, 69, 57, 9, 2, 59, 95, 29, 93, 55, 94, 22], [85, 49, 12, 71, 89, 8, 97, 16, 40, 45, 64, 63, 51, 10, 76, 86, 71, 45, 85, 56, 86, 73, 84, 13, 64, 88, 30, 52, 54, 57, 18, 25, 53, 20, 11, 40, 98, 23, 90, 87, 42, 47, 56, 33], [89, 98, 26, 69, 29, 94, 60, 91, 37, 25, 74, 44, 34, 12, 93, 39, 19, 19, 29, 66, 90, 98, 94, 76, 20, 57, 97, 9, 2, 28, 34, 21, 83, 78, 81, 56, 5, 85, 22, 59, 40, 84, 92, 63], [32, 45, 83, 92, 87, 33, 82, 35, 46, 36, 62, 83, 90, 26, 7, 87, 5, 87, 32, 79, 91, 81, 84, 57, 80, 62, 28, 95, 80, 78, 74, 66, 97, 41, 86, 66, 64, 7, 41, 45, 44, 30, 38, 39], [19, 47, 38, 17, 74, 79, 69, 99, 4, 35, 1, 81, 85, 58, 22, 5, 60, 36, 9, 84, 57, 78, 84, 90, 4, 51, 39, 84, 52, 75, 71, 55, 31, 50, 8, 87, 15, 65, 10, 41, 88, 79, 48, 21], [86, 24, 74, 23, 80, 69, 33, 36, 25, 58, 90, 66, 98, 31, 44, 63, 45, 83, 82, 50, 67, 71, 87, 1, 71, 86, 67, 83, 94, 9, 99, 35, 13, 26, 45, 51, 92, 25, 56, 39, 3, 75, 94, 53], [33, 62, 98, 67, 69, 95, 4, 72, 59, 17, 22, 38, 88, 31, 49, 52, 89, 38, 96, 49, 90, 27, 23, 84, 27, 81, 14, 3, 27, 62, 14, 92, 44, 25, 61, 75, 52, 12, 97, 84, 34, 23, 19, 1], [74, 65, 5, 57, 22, 43, 2, 73, 7, 21, 71, 59, 9, 40, 73, 49, 12, 73, 10, 74, 17, 4, 64, 16, 49, 27, 6, 9, 58, 32, 38, 30, 78, 45, 29, 92, 22, 31, 81, 17, 54, 79, 47, 32], [28, 11, 39, 17, 76, 39, 73, 25, 26, 68, 62, 19, 13, 29, 54, 73, 42, 62, 71, 71, 21, 9, 45, 27, 48, 85, 69, 5, 72, 15, 77, 97, 44, 47, 32, 36, 49, 53, 23, 34, 18, 12, 87, 2], [27, 50, 31, 48, 86, 69, 17, 43, 71, 18, 66, 31, 63, 28, 67, 9, 97, 28, 92, 18, 15, 75, 89, 5, 41, 91, 76, 74, 73, 66, 73, 51, 16, 65, 85, 57, 37, 39, 65, 49, 47, 40, 14, 40], [48, 32, 88, 39, 33, 30, 26, 43, 55, 44, 78, 76, 3, 7, 85, 58, 91, 10, 10, 81, 42, 34, 82, 26, 60, 2, 73, 45, 5, 26, 79, 25, 26, 92, 87, 85, 22, 19, 10, 42, 31, 31, 99, 75], [81, 97, 86, 90, 36, 66, 32, 67, 63, 23, 50, 65, 69, 44, 58, 57, 37, 65, 18, 5, 82, 99, 96, 26, 33, 42, 88, 27, 54, 83, 82, 79, 91, 75, 24, 3, 39, 71, 12, 33, 22, 35, 14, 26], [83, 85, 54, 41, 45, 31, 69, 99, 17, 60, 96, 4, 10, 94, 9, 61, 90, 22, 21, 23, 61, 12, 95, 17, 55, 21, 54, 47, 41, 97, 15, 96, 59, 99, 15, 29, 11, 29, 86, 90, 82, 89, 85, 88], [56, 92, 53, 3, 13, 38, 70, 11, 23, 73, 56, 17, 9, 83, 99, 96, 92, 28, 79, 19, 97, 87, 92, 4, 47, 47, 31, 99, 5, 33, 48, 32, 79, 59, 98, 64, 47, 9, 35, 47, 88, 82, 17, 1], [55, 11, 33, 70, 56, 64, 93, 58, 20, 18, 78, 45, 43, 20, 57, 82, 27, 18, 17, 60, 89, 5, 6, 97, 15, 39, 80, 39, 88, 21, 13, 29, 98, 5, 67, 21, 9, 67, 44, 62, 94, 67, 62, 62], [60, 49, 39, 41, 50, 98, 17, 53, 55, 78, 75, 56, 1, 65, 64, 52, 15, 2, 12, 45, 57, 42, 2, 87, 62, 34, 17, 41, 78, 75, 84, 71, 65, 15, 38, 98, 73, 65, 9, 42, 66, 86, 89, 51], [78, 99, 80, 19, 31, 66, 32, 75, 8, 69, 98, 32, 47, 70, 8, 34, 4, 36, 44, 25, 26, 33, 9, 47, 72, 17, 15, 42, 54, 13, 50, 44, 3, 53, 56, 54, 57, 12, 93, 59, 65, 96, 37, 20], [72, 37, 31, 95, 25, 50, 49, 8, 94, 94, 91, 35, 13, 21, 73, 24, 48, 33, 1, 72, 3, 14, 14, 49, 33, 4, 38, 25, 47, 13, 39, 25, 73, 43, 38, 35, 93, 55, 50, 78, 34, 25, 42, 92], [51, 94, 37, 66, 85, 34, 83, 38, 31, 26, 76, 94, 26, 63, 48, 95, 79, 10, 36, 40, 26, 9, 53, 81, 70, 86, 80, 86, 53, 39, 61, 52, 68, 68, 73, 78, 42, 90, 67, 96, 75, 51, 3, 13], [13, 61, 24, 20, 74, 87, 97, 55, 35, 78, 80, 30, 83, 33, 41, 66, 49, 8, 84, 3, 85, 65, 85, 72, 2, 87, 41, 53, 75, 16, 9, 96, 39, 64, 36, 23, 47, 49, 55, 94, 10, 63, 95, 26], [48, 30, 2, 29, 54, 32, 38, 21, 27, 88, 34, 23, 78, 39, 69, 73, 45, 63, 8, 7, 30, 12, 20, 64, 29, 55, 12, 84, 22, 23, 48, 45, 26, 28, 55, 73, 69, 2, 28, 77, 79, 53, 14, 46], [78, 67, 74, 70, 20, 35, 48, 43, 20, 56, 3, 68, 11, 62, 61, 95, 58, 29, 38, 84, 88, 87, 22, 86, 41, 84, 63, 38, 50, 7, 24, 46, 25, 78, 29, 67, 93, 80, 85, 22, 85, 86, 9, 87], [49, 73, 96, 36, 5, 90, 4, 24, 41, 14, 91, 12, 82, 44, 9, 66, 38, 96, 77, 57, 47, 55, 88, 2, 83, 18, 66, 90, 57, 64, 88, 27, 53, 59, 29, 72, 95, 98, 14, 68, 43, 29, 57, 33], [21, 41, 1, 27, 2, 64, 51, 54, 74, 74, 30, 1, 95, 99, 29, 13, 73, 43, 41, 75, 88, 89, 58, 77, 14, 41, 67, 54, 6, 46, 77, 1, 29, 78, 76, 26, 58, 87, 3, 60, 14, 98, 23, 62], [10, 4, 39, 74, 88, 34, 88, 25, 52, 15, 12, 1, 9, 59, 14, 31, 88, 53, 63, 10, 43, 18, 67, 59, 76, 99, 23, 86, 75, 46, 49, 23, 12, 29, 89, 88, 59, 53, 68, 63, 29, 3, 95, 89], [37, 63, 23, 49, 86, 93, 77, 3, 22, 36, 10, 9, 56, 55, 19, 72, 33, 20, 94, 35, 31, 83, 50, 46, 78, 10, 67, 34, 51, 92, 83, 39, 90, 68, 12, 26, 71, 67, 90, 2, 12, 59, 32, 51], [11, 32, 64, 45, 79, 54, 6, 26, 8, 8, 38, 8, 17, 83, 3, 41, 73, 53, 97, 96, 96, 70, 62, 53, 59, 93, 81, 83, 95, 83, 23, 47, 35, 14, 65, 97, 49, 36, 1, 84, 22, 35, 3, 12], [37, 58, 77, 12, 2, 84, 65, 58, 60, 41, 35, 88, 90, 11, 52, 52, 62, 63, 15, 70, 40, 9, 70, 17, 23, 58, 95, 80, 51, 57, 86, 16, 45, 61, 12, 73, 6, 4, 81, 74, 35, 47, 85, 19], [27, 11, 70, 59, 41, 43, 28, 63, 67, 45, 24, 77, 64, 79, 73, 39, 99, 45, 61, 82, 43, 67, 92, 80, 42, 41, 47, 43, 23, 32, 74, 57, 38, 77, 15, 28, 13, 35, 2, 61, 65, 41, 96, 94], [86, 4, 53, 88, 14, 17, 14, 41, 62, 52, 27, 85, 40, 35, 90, 95, 59, 97, 49, 63, 11, 80, 6, 98, 41, 32, 21, 93, 75, 57, 5, 91, 28, 95, 75, 77, 70, 27, 94, 53, 48, 83, 78, 58], [9, 55, 45, 28, 28, 46, 25, 26, 62, 68, 67, 34, 21, 81, 34, 44, 76, 89, 21, 18, 36, 70, 84, 53, 20, 96, 95, 84, 94, 3, 84, 8, 85, 48, 23, 1, 2, 74, 37, 94, 51, 44, 24, 32], [56, 50, 64, 30, 38, 78, 55, 3, 25, 45, 62, 7, 81, 27, 23, 32, 2, 75, 34, 52, 61, 34, 7, 10, 89, 2, 30, 81, 29, 82, 60, 99, 17, 56, 86, 51, 25, 84, 16, 25, 15, 79, 57, 15], [56, 82, 37, 65, 33, 3, 49, 22, 54, 21, 27, 4, 99, 1, 4, 55, 24, 29, 22, 23, 85, 78, 8, 58, 80, 99, 88, 59, 90, 7, 25, 45, 90, 26, 30, 66, 53, 73, 39, 11, 79, 12, 99, 50]],29,), ([[16, 49, 32, 82, 45, 85, 80, 71, 5, 44, 41, 97, 95, 85, 67, 74, 75, 22, 17, 89, 92, 50, 84, 94, 31, 13, 74, 51, 33, 20, 48, 78, 72, 72, 92, 74, 14, 62, 51, 78, 70, 98, 81, 21, 92, 38, 15], [36, 9, 99, 59, 82, 54, 17, 82, 4, 84, 13, 75, 43, 97, 92, 8, 20, 82, 71, 61, 44, 97, 51, 58, 75, 30, 99, 84, 10, 94, 18, 25, 96, 34, 44, 39, 95, 92, 90, 68, 43, 20, 72, 2, 27, 34, 55], [36, 85, 72, 87, 72, 69, 65, 85, 44, 43, 74, 66, 21, 61, 13, 28, 30, 82, 2, 58, 83, 21, 90, 46, 89, 83, 25, 57, 20, 6, 18, 49, 82, 20, 34, 10, 33, 55, 19, 66, 47, 49, 67, 30, 83, 85, 59], [78, 31, 21, 17, 53, 51, 24, 40, 98, 47, 20, 16, 58, 49, 42, 12, 41, 58, 60, 24, 13, 34, 61, 27, 85, 67, 14, 41, 57, 30, 45, 74, 1, 92, 83, 94, 84, 52, 20, 23, 95, 96, 90, 78, 6, 33, 8], [63, 4, 13, 35, 93, 89, 34, 56, 11, 38, 93, 45, 86, 58, 34, 75, 92, 72, 24, 74, 79, 63, 39, 21, 36, 48, 84, 13, 2, 27, 7, 90, 94, 19, 40, 21, 58, 26, 74, 36, 44, 64, 27, 8, 90, 1, 23], [73, 31, 7, 9, 71, 92, 98, 53, 16, 74, 24, 74, 46, 29, 89, 30, 51, 83, 31, 30, 34, 92, 19, 75, 28, 6, 17, 91, 36, 1, 16, 68, 47, 23, 96, 67, 62, 85, 88, 15, 75, 67, 83, 43, 8, 98, 98], [44, 26, 67, 32, 64, 43, 74, 74, 62, 11, 78, 95, 9, 48, 6, 54, 62, 54, 99, 98, 56, 82, 87, 30, 3, 61, 15, 3, 15, 67, 29, 31, 71, 71, 55, 75, 92, 43, 25, 81, 55, 50, 38, 60, 85, 52, 84], [74, 70, 76, 81, 45, 97, 19, 5, 42, 93, 30, 65, 76, 79, 5, 38, 11, 84, 29, 14, 90, 98, 74, 91, 89, 10, 39, 60, 96, 98, 23, 97, 96, 22, 86, 87, 83, 23, 22, 62, 94, 19, 22, 1, 34, 26, 4], [48, 45, 12, 92, 37, 3, 28, 93, 84, 2, 56, 65, 46, 44, 18, 73, 37, 54, 25, 83, 62, 25, 52, 63, 15, 46, 56, 26, 64, 20, 67, 25, 21, 34, 88, 25, 65, 29, 32, 1, 35, 56, 16, 32, 79, 5, 10], [86, 72, 79, 20, 89, 12, 90, 68, 63, 26, 60, 74, 61, 15, 5, 32, 96, 22, 22, 12, 64, 75, 88, 80, 16, 65, 51, 87, 92, 32, 53, 3, 13, 92, 92, 58, 45, 24, 51, 13, 24, 5, 81, 50, 76, 49, 18], [33, 58, 31, 34, 94, 96, 74, 31, 99, 79, 27, 59, 27, 1, 76, 68, 23, 98, 52, 57, 87, 51, 83, 84, 63, 84, 93, 77, 28, 24, 22, 86, 40, 75, 8, 96, 88, 12, 49, 21, 67, 39, 62, 82, 58, 62, 70], [36, 45, 79, 15, 62, 38, 64, 88, 71, 9, 75, 80, 71, 25, 78, 65, 20, 28, 49, 34, 73, 20, 95, 85, 22, 77, 44, 47, 25, 22, 61, 52, 20, 96, 80, 20, 86, 45, 37, 15, 76, 9, 44, 15, 44, 86, 12], [27, 19, 25, 74, 99, 64, 12, 50, 72, 11, 83, 23, 88, 15, 63, 20, 89, 78, 10, 61, 93, 47, 49, 49, 76, 33, 87, 78, 23, 53, 37, 22, 93, 2, 20, 5, 91, 3, 82, 77, 86, 77, 12, 32, 58, 71, 70], [40, 6, 63, 25, 91, 69, 83, 73, 50, 40, 1, 46, 73, 39, 10, 49, 14, 46, 40, 89, 19, 17, 82, 46, 73, 65, 70, 38, 17, 73, 11, 53, 18, 7, 35, 44, 71, 39, 11, 10, 98, 88, 76, 9, 86, 96, 8], [48, 21, 80, 97, 89, 6, 59, 68, 23, 73, 75, 35, 12, 99, 71, 57, 29, 85, 67, 61, 61, 88, 30, 27, 93, 30, 55, 23, 37, 26, 36, 92, 63, 37, 51, 68, 93, 78, 63, 37, 97, 31, 78, 25, 73, 25, 46], [89, 30, 20, 23, 1, 15, 21, 30, 11, 90, 52, 30, 9, 69, 47, 34, 33, 98, 65, 51, 79, 31, 56, 76, 71, 45, 33, 96, 51, 5, 38, 5, 56, 81, 71, 89, 25, 67, 52, 36, 92, 23, 8, 31, 63, 21, 99], [50, 29, 60, 67, 44, 89, 2, 98, 15, 39, 40, 47, 76, 52, 88, 6, 70, 48, 58, 90, 3, 96, 46, 18, 56, 92, 33, 17, 32, 76, 85, 2, 26, 39, 63, 17, 34, 19, 62, 32, 50, 86, 45, 54, 82, 88, 1], [66, 40, 24, 52, 2, 61, 27, 66, 87, 33, 34, 62, 32, 3, 55, 27, 76, 8, 20, 52, 17, 33, 55, 75, 73, 98, 71, 16, 91, 79, 64, 88, 40, 58, 83, 23, 95, 94, 7, 59, 59, 3, 30, 10, 98, 13, 39], [77, 64, 25, 41, 98, 40, 62, 40, 34, 79, 3, 52, 46, 86, 98, 69, 41, 86, 60, 29, 8, 98, 4, 25, 50, 23, 25, 98, 70, 98, 21, 94, 56, 3, 79, 21, 83, 83, 49, 46, 98, 78, 68, 31, 46, 75, 44], [45, 75, 49, 4, 80, 57, 56, 38, 6, 82, 89, 24, 52, 39, 73, 37, 98, 34, 40, 40, 37, 92, 50, 11, 78, 59, 26, 60, 8, 28, 84, 60, 89, 10, 63, 61, 75, 26, 23, 63, 19, 18, 50, 19, 15, 16, 20], [19, 75, 71, 19, 88, 31, 52, 48, 8, 50, 61, 88, 8, 13, 74, 19, 50, 23, 57, 97, 30, 94, 29, 61, 35, 9, 72, 25, 64, 37, 38, 8, 90, 75, 40, 23, 96, 45, 1, 49, 9, 40, 28, 97, 96, 8, 37], [82, 71, 18, 76, 68, 77, 75, 80, 44, 78, 16, 52, 53, 86, 18, 40, 61, 25, 35, 71, 84, 27, 93, 10, 75, 20, 33, 77, 80, 11, 69, 67, 59, 66, 53, 38, 10, 6, 85, 95, 34, 49, 32, 29, 65, 33, 17], [98, 49, 16, 7, 13, 84, 4, 63, 69, 80, 73, 76, 78, 15, 5, 42, 18, 72, 8, 89, 68, 26, 75, 70, 33, 22, 93, 69, 1, 86, 35, 56, 95, 67, 3, 71, 1, 42, 58, 88, 94, 96, 96, 85, 64, 80, 4], [17, 77, 99, 40, 34, 56, 11, 89, 40, 94, 13, 24, 34, 8, 82, 7, 62, 46, 86, 71, 13, 2, 2, 29, 91, 82, 58, 2, 59, 53, 68, 61, 49, 46, 72, 59, 48, 9, 18, 50, 86, 75, 27, 32, 66, 66, 94], [22, 86, 24, 91, 75, 13, 91, 15, 49, 17, 39, 73, 87, 4, 57, 15, 43, 31, 6, 90, 59, 65, 86, 30, 58, 86, 97, 56, 69, 36, 46, 74, 1, 12, 67, 10, 1, 19, 82, 95, 55, 49, 55, 86, 68, 41, 55], [74, 74, 79, 69, 43, 81, 82, 57, 48, 50, 69, 8, 56, 91, 89, 26, 23, 41, 87, 93, 97, 59, 18, 71, 96, 71, 8, 58, 85, 17, 51, 33, 30, 66, 60, 46, 22, 32, 25, 8, 97, 63, 29, 81, 40, 45, 2], [49, 31, 68, 90, 9, 95, 10, 51, 70, 44, 26, 75, 79, 84, 78, 21, 91, 30, 71, 15, 80, 59, 84, 84, 86, 70, 20, 69, 53, 75, 2, 30, 8, 40, 8, 17, 99, 30, 1, 69, 64, 80, 36, 79, 49, 81, 77], [24, 4, 77, 62, 9, 26, 47, 16, 37, 70, 11, 2, 94, 83, 23, 47, 62, 76, 39, 6, 36, 62, 60, 79, 36, 77, 72, 89, 88, 31, 40, 60, 13, 93, 96, 37, 61, 18, 90, 18, 34, 54, 31, 79, 37, 84, 92], [68, 72, 58, 82, 96, 53, 87, 62, 79, 7, 31, 96, 40, 78, 83, 50, 80, 9, 65, 25, 8, 39, 32, 8, 13, 67, 66, 28, 4, 23, 34, 55, 71, 94, 58, 73, 19, 9, 23, 75, 13, 93, 31, 72, 19, 5, 91], [39, 14, 22, 22, 5, 62, 52, 80, 39, 26, 80, 56, 12, 80, 49, 12, 96, 5, 92, 51, 4, 93, 83, 25, 99, 24, 56, 19, 23, 95, 83, 96, 77, 46, 18, 61, 71, 45, 88, 46, 17, 15, 73, 34, 99, 8, 50], [11, 88, 42, 94, 85, 43, 35, 59, 12, 73, 12, 28, 93, 46, 40, 99, 29, 70, 16, 46, 92, 65, 29, 52, 40, 6, 27, 37, 22, 7, 1, 77, 48, 51, 14, 79, 12, 49, 41, 68, 85, 2, 85, 62, 57, 14, 44], [66, 75, 37, 78, 47, 61, 84, 99, 27, 49, 60, 70, 71, 45, 1, 13, 38, 17, 38, 1, 1, 83, 30, 77, 7, 20, 44, 73, 13, 39, 20, 89, 5, 52, 25, 12, 90, 56, 86, 1, 72, 49, 67, 22, 85, 85, 31], [1, 27, 2, 93, 1, 42, 8, 35, 35, 7, 23, 23, 46, 19, 79, 72, 97, 99, 13, 50, 31, 71, 84, 38, 57, 8, 14, 94, 51, 9, 13, 76, 66, 38, 21, 29, 84, 50, 64, 9, 15, 53, 97, 53, 71, 3, 87], [22, 39, 77, 9, 34, 12, 34, 45, 97, 50, 99, 28, 39, 3, 47, 12, 43, 77, 67, 18, 90, 10, 4, 12, 53, 51, 16, 17, 95, 26, 2, 29, 94, 47, 11, 34, 71, 29, 97, 49, 91, 16, 81, 75, 14, 13, 35], [90, 52, 25, 59, 76, 68, 42, 48, 91, 45, 72, 72, 29, 3, 21, 31, 13, 95, 81, 48, 96, 24, 2, 3, 26, 2, 33, 34, 90, 98, 38, 78, 95, 20, 10, 84, 33, 45, 60, 66, 61, 51, 12, 80, 9, 11, 21], [76, 68, 26, 63, 19, 17, 44, 61, 1, 72, 58, 94, 41, 24, 43, 81, 94, 9, 66, 90, 32, 91, 41, 11, 65, 18, 8, 27, 82, 9, 2, 81, 75, 46, 70, 5, 12, 44, 42, 99, 88, 30, 52, 81, 47, 36, 70], [32, 98, 44, 16, 71, 96, 17, 32, 14, 26, 73, 13, 89, 12, 45, 16, 94, 52, 21, 24, 43, 5, 33, 31, 9, 35, 8, 75, 17, 80, 20, 91, 78, 22, 54, 71, 75, 81, 77, 81, 75, 68, 80, 31, 85, 97, 13], [29, 79, 10, 33, 15, 77, 35, 54, 21, 30, 46, 42, 71, 49, 24, 80, 69, 6, 2, 3, 53, 10, 24, 33, 84, 22, 61, 96, 94, 67, 4, 51, 4, 39, 31, 57, 73, 30, 93, 89, 39, 99, 25, 58, 36, 11, 90], [46, 89, 21, 2, 74, 39, 99, 33, 31, 4, 67, 69, 81, 13, 65, 45, 39, 87, 89, 53, 31, 13, 1, 98, 29, 61, 95, 72, 2, 12, 56, 97, 94, 41, 27, 89, 38, 97, 52, 80, 32, 88, 2, 66, 20, 57, 62], [91, 86, 48, 83, 7, 67, 50, 34, 87, 69, 67, 88, 91, 34, 43, 21, 12, 32, 47, 86, 98, 87, 55, 65, 68, 17, 26, 95, 33, 64, 92, 10, 46, 73, 90, 51, 34, 14, 41, 90, 95, 38, 48, 43, 28, 41, 56], [81, 76, 91, 65, 60, 97, 13, 69, 52, 43, 92, 88, 84, 40, 42, 37, 84, 23, 67, 69, 79, 69, 98, 58, 46, 87, 47, 17, 9, 68, 94, 78, 30, 95, 61, 65, 58, 27, 66, 45, 40, 61, 41, 74, 88, 84, 42], [62, 80, 38, 60, 49, 18, 99, 94, 5, 11, 4, 61, 75, 12, 49, 28, 90, 34, 56, 65, 6, 33, 47, 24, 34, 72, 16, 80, 16, 98, 84, 14, 59, 62, 90, 66, 19, 61, 66, 26, 89, 49, 19, 49, 81, 30, 76], [57, 85, 36, 40, 28, 97, 46, 73, 82, 88, 32, 87, 58, 76, 98, 26, 70, 69, 87, 50, 79, 32, 58, 64, 77, 28, 97, 72, 80, 39, 96, 80, 45, 13, 20, 58, 19, 75, 91, 80, 9, 77, 19, 94, 55, 39, 17], [62, 94, 93, 60, 42, 2, 50, 67, 20, 1, 5, 97, 39, 87, 18, 68, 97, 90, 22, 30, 90, 1, 70, 81, 95, 51, 68, 74, 61, 48, 53, 34, 86, 86, 7, 39, 37, 63, 55, 15, 83, 74, 62, 68, 50, 41, 61], [25, 28, 82, 35, 83, 53, 84, 39, 97, 59, 65, 1, 45, 19, 48, 49, 73, 14, 67, 30, 65, 69, 87, 6, 84, 46, 42, 72, 61, 31, 79, 26, 58, 33, 52, 32, 54, 1, 5, 22, 95, 5, 8, 70, 63, 10, 62], [40, 47, 80, 56, 28, 56, 1, 52, 82, 62, 42, 47, 37, 11, 67, 29, 4, 95, 11, 30, 79, 79, 58, 32, 29, 43, 92, 85, 39, 11, 96, 27, 24, 37, 65, 32, 53, 1, 56, 34, 82, 29, 6, 57, 95, 14, 75], [69, 62, 86, 51, 13, 76, 4, 38, 4, 30, 54, 65, 61, 49, 31, 42, 50, 23, 78, 99, 81, 60, 32, 56, 56, 87, 34, 41, 39, 86, 42, 66, 20, 14, 38, 37, 37, 12, 92, 56, 8, 93, 21, 39, 48, 18, 63]],41,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS{ static int f_gold ( int x , int y , int z ) { int c = 0 ; while ( x != 0 && y != 0 && z != 0 ) { x -- ; y -- ; z -- ; c ++ ; } return c ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(23); param0.add(87); param0.add(35); param0.add(25); param0.add(93); param0.add(52); param0.add(95); param0.add(91); param0.add(75); param0.add(96); List param1 = new ArrayList<>(); param1.add(98); param1.add(55); param1.add(90); param1.add(9); param1.add(22); param1.add(42); param1.add(88); param1.add(64); param1.add(1); param1.add(44); List param2 = new ArrayList<>(); param2.add(25); param2.add(94); param2.add(29); param2.add(41); param2.add(39); param2.add(96); param2.add(26); param2.add(51); param2.add(6); param2.add(76); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y , z ) : c = 0 while ( x and y and z ) : x = x - 1 y = y - 1 z = z - 1 c = c + 1 return c "," using namespace std; int f_gold ( int x, int y, int z ) { int c = 0; while ( x && y && z ) { x --; y --; z --; c ++; } return c; } int main() { int n_success = 0; vector param0 {23,87,35,25,93,52,95,91,75,96}; vector param1 {98,55,90,9,22,42,88,64,1,44}; vector param2 {25,94,29,41,39,96,26,51,6,76}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (23,98,25,), (87,55,94,), (35,90,29,), (25,9,41,), (93,22,39,), (52,42,96,), (95,88,26,), (91,64,51,), (75,1,6,), (96,44,76,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_SUM_CONTIGUOUS_SUBARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_SUM_CONTIGUOUS_SUBARRAY{ static int f_gold ( int arr [ ] , int n ) { int min_ending_here = 2147483647 ; int min_so_far = 2147483647 ; for ( int i = 0 ; i < n ; i ++ ) { if ( min_ending_here > 0 ) min_ending_here = arr [ i ] ; else min_ending_here += arr [ i ] ; min_so_far = Math . min ( min_so_far , min_ending_here ) ; } return min_so_far ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,9,13,14,15,18,19,19,25,26,29,29,29,30,31,36,37,37,38,39,39,40,40,42,42,46,50,53,58,60,62,64,65,67,68,69,72,77,78,83,85,89,90,93,95,95,97}); param0.add(new int[]{14,-58,8,78,-26,-20,-60,42,-64,-12}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{44,88,20,47,69,42,26,49,71,91,18,95,9,66,60,37,47,29,98,63,15,9,80,66,1,9,57,56,20,2,1}); param0.add(new int[]{-78,-64,-62,-60,-52,4,8,46,72,74}); param0.add(new int[]{0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,1}); param0.add(new int[]{3,7,16,17,23,23,23,28,29,30,34,38,40,41,43,43,44,46,51,51,51,55,57,58,61,62,66,66,67,69,70,73,75,77,79,80,85,85,87,87,93,96}); param0.add(new int[]{80,22,38,26,62,-48,-48,46,-54,4,76,46,48,40,-92,-98,-88,12,-42,-94,76,-16,-82,62,18,-24}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{85,44,1,97,50,74,62,90,3,78,8,48,96,41,36,91,57,97,85,90,78,43,28,92,85,59,29,38,34,65,20,26,27,23,71,22,47,99,68,93,67,66,69,82,98,15,44,51,65}); List param1 = new ArrayList<>(); param1.add(24); param1.add(6); param1.add(8); param1.add(26); param1.add(8); param1.add(11); param1.add(38); param1.add(22); param1.add(13); param1.add(45); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n ) : min_ending_here = sys.maxsize min_so_far = sys.maxsize for i in range ( n ) : if ( min_ending_here > 0 ) : min_ending_here = arr [ i ] else : min_ending_here += arr [ i ] min_so_far = min ( min_so_far , min_ending_here ) return min_so_far "," using namespace std; int f_gold ( int arr [ ], int n ) { int min_ending_here = INT_MAX; int min_so_far = INT_MAX; for ( int i = 0; i < n; i ++ ) { if ( min_ending_here > 0 ) min_ending_here = arr [ i ]; else min_ending_here += arr [ i ]; min_so_far = min ( min_so_far, min_ending_here ); } return min_so_far; } int main() { int n_success = 0; vector> param0 {{2,9,13,14,15,18,19,19,25,26,29,29,29,30,31,36,37,37,38,39,39,40,40,42,42,46,50,53,58,60,62,64,65,67,68,69,72,77,78,83,85,89,90,93,95,95,97},{14,-58,8,78,-26,-20,-60,42,-64,-12},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{44,88,20,47,69,42,26,49,71,91,18,95,9,66,60,37,47,29,98,63,15,9,80,66,1,9,57,56,20,2,1},{-78,-64,-62,-60,-52,4,8,46,72,74},{0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,1},{3,7,16,17,23,23,23,28,29,30,34,38,40,41,43,43,44,46,51,51,51,55,57,58,61,62,66,66,67,69,70,73,75,77,79,80,85,85,87,87,93,96},{80,22,38,26,62,-48,-48,46,-54,4,76,46,48,40,-92,-98,-88,12,-42,-94,76,-16,-82,62,18,-24},{0,0,0,0,0,0,0,0,1,1,1,1,1,1},{85,44,1,97,50,74,62,90,3,78,8,48,96,41,36,91,57,97,85,90,78,43,28,92,85,59,29,38,34,65,20,26,27,23,71,22,47,99,68,93,67,66,69,82,98,15,44,51,65}}; vector param1 {24,6,8,26,8,11,38,22,13,45}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 9, 13, 14, 15, 18, 19, 19, 25, 26, 29, 29, 29, 30, 31, 36, 37, 37, 38, 39, 39, 40, 40, 42, 42, 46, 50, 53, 58, 60, 62, 64, 65, 67, 68, 69, 72, 77, 78, 83, 85, 89, 90, 93, 95, 95, 97],24,), ([14, -58, 8, 78, -26, -20, -60, 42, -64, -12],6,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],8,), ([44, 88, 20, 47, 69, 42, 26, 49, 71, 91, 18, 95, 9, 66, 60, 37, 47, 29, 98, 63, 15, 9, 80, 66, 1, 9, 57, 56, 20, 2, 1],26,), ([-78, -64, -62, -60, -52, 4, 8, 46, 72, 74],8,), ([0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1],11,), ([3, 7, 16, 17, 23, 23, 23, 28, 29, 30, 34, 38, 40, 41, 43, 43, 44, 46, 51, 51, 51, 55, 57, 58, 61, 62, 66, 66, 67, 69, 70, 73, 75, 77, 79, 80, 85, 85, 87, 87, 93, 96],38,), ([80, 22, 38, 26, 62, -48, -48, 46, -54, 4, 76, 46, 48, 40, -92, -98, -88, 12, -42, -94, 76, -16, -82, 62, 18, -24],22,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],13,), ([85, 44, 1, 97, 50, 74, 62, 90, 3, 78, 8, 48, 96, 41, 36, 91, 57, 97, 85, 90, 78, 43, 28, 92, 85, 59, 29, 38, 34, 65, 20, 26, 27, 23, 71, 22, 47, 99, 68, 93, 67, 66, 69, 82, 98, 15, 44, 51, 65],45,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TRIANGULAR_NUMBERS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TRIANGULAR_NUMBERS_1{ static boolean f_gold ( int num ) { if ( num < 0 ) return false ; int c = ( - 2 * num ) ; int b = 1 , a = 1 ; int d = ( b * b ) - ( 4 * a * c ) ; if ( d < 0 ) return false ; float root1 = ( - b + ( float ) Math . sqrt ( d ) ) / ( 2 * a ) ; float root2 = ( - b - ( float ) Math . sqrt ( d ) ) / ( 2 * a ) ; if ( root1 > 0 && Math . floor ( root1 ) == root1 ) return true ; if ( root2 > 0 && Math . floor ( root2 ) == root2 ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(3); param0.add(6); param0.add(10); param0.add(55); param0.add(48); param0.add(63); param0.add(72); param0.add(16); param0.add(85); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( num ) : if ( num < 0 ) : return False c = ( - 2 * num ) b , a = 1 , 1 d = ( b * b ) - ( 4 * a * c ) if ( d < 0 ) : return False root1 = ( - b + math.sqrt ( d ) ) / ( 2 * a ) root2 = ( - b - math.sqrt ( d ) ) / ( 2 * a ) if ( root1 > 0 and math.floor ( root1 ) == root1 ) : return True if ( root2 > 0 and math.floor ( root2 ) == root2 ) : return True return False "," using namespace std; bool f_gold ( int num ) { if ( num < 0 ) return false; int c = ( - 2 * num ); int b = 1, a = 1; int d = ( b * b ) - ( 4 * a * c ); if ( d < 0 ) return false; float root1 = ( - b + sqrt ( d ) ) / ( 2 * a ); float root2 = ( - b - sqrt ( d ) ) / ( 2 * a ); if ( root1 > 0 && floor ( root1 ) == root1 ) return true; if ( root2 > 0 && floor ( root2 ) == root2 ) return true; return false; } int main() { int n_success = 0; vector param0 {1,3,6,10,55,48,63,72,16,85}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (3,), (6,), (10,), (55,), (48,), (63,), (72,), (16,), (85,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS{ static boolean f_gold ( String str1 , String str2 , int k ) { if ( ( str1 . length ( ) + str2 . length ( ) ) < k ) return true ; int commonLength = 0 ; for ( int i = 0 ; i < Math . min ( str1 . length ( ) , str2 . length ( ) ) ; i ++ ) { if ( str1 == str2 ) commonLength ++ ; else break ; } if ( ( k - str1 . length ( ) - str2 . length ( ) + 2 * commonLength ) % 2 == 0 ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ZNHGro""); param0.add(""382880806774""); param0.add(""0""); param0.add(""lxHTRFCTSQ""); param0.add(""6399914758""); param0.add(""01100011100000""); param0.add(""WkGqlob""); param0.add(""46974006151""); param0.add(""1001001""); param0.add(""IJQ""); List param1 = new ArrayList<>(); param1.add(""jAdbtDUYQu""); param1.add(""65565""); param1.add(""00100010100""); param1.add(""sViXYE""); param1.add(""780990121""); param1.add(""0100""); param1.add(""NpQVdXzEtUZy""); param1.add(""74438""); param1.add(""1000010""); param1.add(""nFOHAeYEAp""); List param2 = new ArrayList<>(); param2.add(3); param2.add(10); param2.add(2); param2.add(89); param2.add(9); param2.add(0); param2.add(6); param2.add(11); param2.add(15); param2.add(42); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(str1, str2, k): if ((len(str1) + len(str2)) < k): return True commonLength = 0 for i in range(0, min(len(str1), len(str2)), 1): if (str1[i] == str2[i]): commonLength += 1 else: break if ((k - len(str1) - len(str2) + 2 * commonLength) % 2 == 0): return True return False "," using namespace std; bool f_gold ( string str1, string str2, int k ) { if ( ( str1 . length ( ) + str2 . length ( ) ) < k ) return true; int commonLength = 0; for ( int i = 0; i < min ( str1 . length ( ), str2 . length ( ) ); i ++ ) { if ( str1 [ i ] == str2 [ i ] ) commonLength ++; else break; } if ( ( k - str1 . length ( ) - str2 . length ( ) + 2 * commonLength ) % 2 == 0 ) return true; return false; } int main() { int n_success = 0; vector param0 {""ZNHGro"",""382880806774"",""0"",""lxHTRFCTSQ"",""6399914758"",""01100011100000"",""WkGqlob"",""46974006151"",""1001001"",""IJQ""}; vector param1 {""jAdbtDUYQu"",""65565"",""00100010100"",""sViXYE"",""780990121"",""0100"",""NpQVdXzEtUZy"",""74438"",""1000010"",""nFOHAeYEAp""}; vector param2 {3,10,2,89,9,0,6,11,15,42}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('ZNHGro', 'jAdbtDUYQu', 3,), ('382880806774', '65565', 10,), ('0', '00100010100', 2,), ('lxHTRFCTSQ', 'sViXYE', 89,), ('6399914758', '780990121', 9,), ('01100011100000', '0100', 0,), ('WkGqlob', 'NpQVdXzEtUZy', 6,), ('46974006151', '74438', 11,), ('1001001', '1000010', 15,), ('IJQ', 'nFOHAeYEAp', 42,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K_1{ static boolean f_gold ( int a1 [ ] , int a2 [ ] , int a3 [ ] , int n1 , int n2 , int n3 , int sum ) { HashSet < Integer > s = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n1 ; i ++ ) { s . add ( a1 [ i ] ) ; } ArrayList < Integer > al = new ArrayList < > ( s ) ; for ( int i = 0 ; i < n2 ; i ++ ) { for ( int j = 0 ; j < n3 ; j ++ ) { if ( al . contains ( sum - a2 [ i ] - a3 [ j ] ) & al . indexOf ( sum - a2 [ i ] - a3 [ j ] ) != al . get ( al . size ( ) - 1 ) ) { return true ; } } } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,7,10,15,28,30,30,35,38,43,44,44,54,55,64,68,69,73,75,75,86,87,92,93,94}); param0.add(new int[]{-72,-90,-92,4,22,14,-50,16,-56,-66,62,-32,82,8,12,-24,92,-98,-94,56,-74,-66,26,-98,10,-74,-14,2,60,-88,-84,34,82,28,-86,-90,-92,52,72,90,92,-20,-86,74,-96,-46,28}); param0.add(new int[]{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}); param0.add(new int[]{85,34,78,64,22,94,52,71,44,48,46,88,59,95,4,55,21,83,56,19,85,6,87,13}); param0.add(new int[]{-98,-98,-96,-94,-90,-90,-84,-36,-34,-34,-32,16,26,26,56,74,80}); param0.add(new int[]{1,1,1,0,0,0,1,1,1,1}); param0.add(new int[]{4,4,25,27,35,39,50,60,60,63,67,73,75,81,84,85,91,98}); param0.add(new int[]{54,-64,76,78,24,40,44,-56,80,-10,-12,-8,-18,42,70,14,-70,48,-68,-98,-74,-40,-16,-90,48,92,-64,58,-98,60,-10,-10}); param0.add(new int[]{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}); param0.add(new int[]{28,88,75,86,51,82,2,20,22,18,96,11}); List param1 = new ArrayList<>(); param1.add(new int[]{11,17,18,24,26,26,33,35,38,41,55,60,63,63,69,73,78,81,82,87,90,91,93,94,99}); param1.add(new int[]{50,-20,26,32,-46,38,36,0,-96,60,-70,-36,-12,50,64,-70,22,-22,32,60,-94,98,-58,-86,-16,40,-68,2,-50,6,-36,-28,-68,44,-98,-38,-46,68,4,60,-36,28,-38,4,50,-84,-12}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{58,45,14,13,73,82,34,78,83,84,39,34,65,84,84,61,26,67,48,51,41,46,89,10}); param1.add(new int[]{-92,-70,-70,-56,-54,-48,-38,-14,-10,0,4,30,34,70,72,76,78}); param1.add(new int[]{0,0,1,0,0,1,0,1,0,1}); param1.add(new int[]{20,21,23,25,37,41,51,57,62,66,74,77,77,79,80,87,88,95}); param1.add(new int[]{88,-66,-50,74,-44,-32,-58,-24,-40,62,52,88,-48,-2,-46,38,30,-56,76,56,60,52,-32,36,90,92,-74,88,-36,-14,-16,-14}); param1.add(new int[]{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}); param1.add(new int[]{62,54,79,88,27,13,48,94,86,28,86,60}); List param2 = new ArrayList<>(); param2.add(new int[]{3,3,8,22,24,24,28,30,32,32,34,39,40,45,46,50,54,59,75,78,79,90,95,95,97}); param2.add(new int[]{-28,20,-62,-84,14,10,28,-10,94,-2,52,66,38,-50,48,-88,-28,92,-48,86,4,-16,26,26,-82,44,70,72,-6,-98,80,56,38,42,-20,64,36,80,12,4,-50,54,22,98,-30,-52,4}); param2.add(new int[]{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}); param2.add(new int[]{46,1,2,90,31,49,62,10,28,4,48,84,87,51,88,74,99,15,35,24,32,66,10,66}); param2.add(new int[]{-92,-88,-70,-56,-50,-50,-48,-36,-20,-10,-8,2,16,22,48,70,78}); param2.add(new int[]{1,1,1,1,0,1,1,1,0,1}); param2.add(new int[]{2,3,9,10,10,18,24,40,41,47,68,69,70,86,90,95,96,98}); param2.add(new int[]{38,-96,16,38,-48,-22,-52,-78,42,94,-26,-20,12,-10,72,16,-8,-2,-36,-76,-6,-92,10,34,-76,-54,-20,20,-76,-46,24,44}); param2.add(new int[]{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}); param2.add(new int[]{49,14,18,61,94,54,12,56,97,59,85,44}); List param3 = new ArrayList<>(); param3.add(21); param3.add(41); param3.add(26); param3.add(15); param3.add(15); param3.add(5); param3.add(12); param3.add(23); param3.add(38); param3.add(6); List param4 = new ArrayList<>(); param4.add(16); param4.add(42); param4.add(20); param4.add(16); param4.add(10); param4.add(7); param4.add(17); param4.add(18); param4.add(22); param4.add(6); List param5 = new ArrayList<>(); param5.add(17); param5.add(34); param5.add(30); param5.add(23); param5.add(15); param5.add(9); param5.add(13); param5.add(29); param5.add(40); param5.add(8); List param6 = new ArrayList<>(); param6.add(18); param6.add(32); param6.add(16); param6.add(15); param6.add(15); param6.add(6); param6.add(9); param6.add(19); param6.add(32); param6.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i),param6.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i),param6.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a1 , a2 , a3 , n1 , n2 , n3 , sum ) : s = set ( ) for i in range ( n1 ) : s.add ( a1 [ i ] ) for i in range ( n2 ) : for j in range ( n3 ) : if sum - a2 [ i ] - a3 [ j ] in s : return True return False "," using namespace std; bool f_gold ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) { unordered_set < int > s; for ( int i = 0; i < n1; i ++ ) s . insert ( a1 [ i ] ); for ( int i = 0; i < n2; i ++ ) { for ( int j = 0; j < n3; j ++ ) { if ( s . find ( sum - a2 [ i ] - a3 [ j ] ) != s . end ( ) ) return true; } } return false; } int main() { int n_success = 0; vector> param0 {{6,7,10,15,28,30,30,35,38,43,44,44,54,55,64,68,69,73,75,75,86,87,92,93,94},{-72,-90,-92,4,22,14,-50,16,-56,-66,62,-32,82,8,12,-24,92,-98,-94,56,-74,-66,26,-98,10,-74,-14,2,60,-88,-84,34,82,28,-86,-90,-92,52,72,90,92,-20,-86,74,-96,-46,28},{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},{85,34,78,64,22,94,52,71,44,48,46,88,59,95,4,55,21,83,56,19,85,6,87,13},{-98,-98,-96,-94,-90,-90,-84,-36,-34,-34,-32,16,26,26,56,74,80},{1,1,1,0,0,0,1,1,1,1},{4,4,25,27,35,39,50,60,60,63,67,73,75,81,84,85,91,98},{54,-64,76,78,24,40,44,-56,80,-10,-12,-8,-18,42,70,14,-70,48,-68,-98,-74,-40,-16,-90,48,92,-64,58,-98,60,-10,-10},{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},{28,88,75,86,51,82,2,20,22,18,96,11}}; vector> param1 {{11,17,18,24,26,26,33,35,38,41,55,60,63,63,69,73,78,81,82,87,90,91,93,94,99},{50,-20,26,32,-46,38,36,0,-96,60,-70,-36,-12,50,64,-70,22,-22,32,60,-94,98,-58,-86,-16,40,-68,2,-50,6,-36,-28,-68,44,-98,-38,-46,68,4,60,-36,28,-38,4,50,-84,-12},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{58,45,14,13,73,82,34,78,83,84,39,34,65,84,84,61,26,67,48,51,41,46,89,10},{-92,-70,-70,-56,-54,-48,-38,-14,-10,0,4,30,34,70,72,76,78},{0,0,1,0,0,1,0,1,0,1},{20,21,23,25,37,41,51,57,62,66,74,77,77,79,80,87,88,95},{88,-66,-50,74,-44,-32,-58,-24,-40,62,52,88,-48,-2,-46,38,30,-56,76,56,60,52,-32,36,90,92,-74,88,-36,-14,-16,-14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{62,54,79,88,27,13,48,94,86,28,86,60}}; vector> param2 {{3,3,8,22,24,24,28,30,32,32,34,39,40,45,46,50,54,59,75,78,79,90,95,95,97},{-28,20,-62,-84,14,10,28,-10,94,-2,52,66,38,-50,48,-88,-28,92,-48,86,4,-16,26,26,-82,44,70,72,-6,-98,80,56,38,42,-20,64,36,80,12,4,-50,54,22,98,-30,-52,4},{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},{46,1,2,90,31,49,62,10,28,4,48,84,87,51,88,74,99,15,35,24,32,66,10,66},{-92,-88,-70,-56,-50,-50,-48,-36,-20,-10,-8,2,16,22,48,70,78},{1,1,1,1,0,1,1,1,0,1},{2,3,9,10,10,18,24,40,41,47,68,69,70,86,90,95,96,98},{38,-96,16,38,-48,-22,-52,-78,42,94,-26,-20,12,-10,72,16,-8,-2,-36,-76,-6,-92,10,34,-76,-54,-20,20,-76,-46,24,44},{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},{49,14,18,61,94,54,12,56,97,59,85,44}}; vector param3 {21,41,26,15,15,5,12,23,38,6}; vector param4 {16,42,20,16,10,7,17,18,22,6}; vector param5 {17,34,30,23,15,9,13,29,40,8}; vector param6 {18,32,16,15,15,6,9,19,32,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i],param6[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i],param6[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 7, 10, 15, 28, 30, 30, 35, 38, 43, 44, 44, 54, 55, 64, 68, 69, 73, 75, 75, 86, 87, 92, 93, 94],[11, 17, 18, 24, 26, 26, 33, 35, 38, 41, 55, 60, 63, 63, 69, 73, 78, 81, 82, 87, 90, 91, 93, 94, 99],[3, 3, 8, 22, 24, 24, 28, 30, 32, 32, 34, 39, 40, 45, 46, 50, 54, 59, 75, 78, 79, 90, 95, 95, 97],21,16,17,18,), ([-72, -90, -92, 4, 22, 14, -50, 16, -56, -66, 62, -32, 82, 8, 12, -24, 92, -98, -94, 56, -74, -66, 26, -98, 10, -74, -14, 2, 60, -88, -84, 34, 82, 28, -86, -90, -92, 52, 72, 90, 92, -20, -86, 74, -96, -46, 28],[50, -20, 26, 32, -46, 38, 36, 0, -96, 60, -70, -36, -12, 50, 64, -70, 22, -22, 32, 60, -94, 98, -58, -86, -16, 40, -68, 2, -50, 6, -36, -28, -68, 44, -98, -38, -46, 68, 4, 60, -36, 28, -38, 4, 50, -84, -12],[-28, 20, -62, -84, 14, 10, 28, -10, 94, -2, 52, 66, 38, -50, 48, -88, -28, 92, -48, 86, 4, -16, 26, 26, -82, 44, 70, 72, -6, -98, 80, 56, 38, 42, -20, 64, 36, 80, 12, 4, -50, 54, 22, 98, -30, -52, 4],41,42,34,32,), ([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, 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],26,20,30,16,), ([85, 34, 78, 64, 22, 94, 52, 71, 44, 48, 46, 88, 59, 95, 4, 55, 21, 83, 56, 19, 85, 6, 87, 13],[58, 45, 14, 13, 73, 82, 34, 78, 83, 84, 39, 34, 65, 84, 84, 61, 26, 67, 48, 51, 41, 46, 89, 10],[46, 1, 2, 90, 31, 49, 62, 10, 28, 4, 48, 84, 87, 51, 88, 74, 99, 15, 35, 24, 32, 66, 10, 66],15,16,23,15,), ([-98, -98, -96, -94, -90, -90, -84, -36, -34, -34, -32, 16, 26, 26, 56, 74, 80],[-92, -70, -70, -56, -54, -48, -38, -14, -10, 0, 4, 30, 34, 70, 72, 76, 78],[-92, -88, -70, -56, -50, -50, -48, -36, -20, -10, -8, 2, 16, 22, 48, 70, 78],15,10,15,15,), ([1, 1, 1, 0, 0, 0, 1, 1, 1, 1],[0, 0, 1, 0, 0, 1, 0, 1, 0, 1],[1, 1, 1, 1, 0, 1, 1, 1, 0, 1],5,7,9,6,), ([4, 4, 25, 27, 35, 39, 50, 60, 60, 63, 67, 73, 75, 81, 84, 85, 91, 98],[20, 21, 23, 25, 37, 41, 51, 57, 62, 66, 74, 77, 77, 79, 80, 87, 88, 95],[2, 3, 9, 10, 10, 18, 24, 40, 41, 47, 68, 69, 70, 86, 90, 95, 96, 98],12,17,13,9,), ([54, -64, 76, 78, 24, 40, 44, -56, 80, -10, -12, -8, -18, 42, 70, 14, -70, 48, -68, -98, -74, -40, -16, -90, 48, 92, -64, 58, -98, 60, -10, -10],[88, -66, -50, 74, -44, -32, -58, -24, -40, 62, 52, 88, -48, -2, -46, 38, 30, -56, 76, 56, 60, 52, -32, 36, 90, 92, -74, 88, -36, -14, -16, -14],[38, -96, 16, 38, -48, -22, -52, -78, 42, 94, -26, -20, 12, -10, 72, 16, -8, -2, -36, -76, -6, -92, 10, 34, -76, -54, -20, 20, -76, -46, 24, 44],23,18,29,19,), ([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, 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],38,22,40,32,), ([28, 88, 75, 86, 51, 82, 2, 20, 22, 18, 96, 11],[62, 54, 79, 88, 27, 13, 48, 94, 86, 28, 86, 60],[49, 14, 18, 61, 94, 54, 12, 56, 97, 59, 85, 44],6,6,8,9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS{ static int f_gold ( int N ) { if ( N <= 6 ) return N ; int [ ] screen = new int [ N ] ; int b ; int n ; for ( n = 1 ; n <= 6 ; n ++ ) screen [ n - 1 ] = n ; for ( n = 7 ; n <= N ; n ++ ) { screen [ n - 1 ] = Math . max ( 2 * screen [ n - 4 ] , Math . max ( 3 * screen [ n - 5 ] , 4 * screen [ n - 6 ] ) ) ; } return screen [ N - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(41); param0.add(94); param0.add(80); param0.add(40); param0.add(76); param0.add(5); param0.add(43); param0.add(67); param0.add(24); param0.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N ) : if ( N <= 6 ) : return N screen = [ 0 ] * N for n in range ( 1 , 7 ) : screen [ n - 1 ] = n for n in range ( 7 , N + 1 ) : screen [ n - 1 ] = max ( 2 * screen [ n - 4 ] , max ( 3 * screen [ n - 5 ] , 4 * screen [ n - 6 ] ) ) ; return screen [ N - 1 ] "," using namespace std; int f_gold ( int N ) { if ( N <= 6 ) return N; int screen [ N ]; int b; int n; for ( n = 1; n <= 6; n ++ ) screen [ n - 1 ] = n; for ( n = 7; n <= N; n ++ ) { screen [ n - 1 ] = max ( 2 * screen [ n - 4 ], max ( 3 * screen [ n - 5 ], 4 * screen [ n - 6 ] ) ); } return screen [ N - 1 ]; } int main() { int n_success = 0; vector param0 {41,94,80,40,76,5,43,67,24,90}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (41,), (94,), (80,), (40,), (76,), (5,), (43,), (67,), (24,), (90,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2{ static int f_gold ( int n ) { int res = 0 ; for ( int x = 0 ; x * x < n ; x ++ ) for ( int y = 0 ; x * x + y * y < n ; y ++ ) res ++ ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(61); param0.add(45); param0.add(53); param0.add(4); param0.add(82); param0.add(86); param0.add(37); param0.add(48); param0.add(81); param0.add(50); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : res = 0 x = 0 while ( x * x < n ) : y = 0 while ( x * x + y * y < n ) : res = res + 1 y = y + 1 x = x + 1 return res "," using namespace std; int f_gold ( int n ) { int res = 0; for ( int x = 0; x * x < n; x ++ ) for ( int y = 0; x * x + y * y < n; y ++ ) res ++; return res; } int main() { int n_success = 0; vector param0 {61,45,53,4,82,86,37,48,81,50}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (61,), (45,), (53,), (4,), (82,), (86,), (37,), (48,), (81,), (50,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HIGHWAY_BILLBOARD_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HIGHWAY_BILLBOARD_PROBLEM{ static int f_gold ( int m , int [ ] x , int [ ] revenue , int n , int t ) { int [ ] maxRev = new int [ m + 1 ] ; for ( int i = 0 ; i < m + 1 ; i ++ ) maxRev [ i ] = 0 ; int nxtbb = 0 ; for ( int i = 1 ; i <= m ; i ++ ) { if ( nxtbb < n ) { if ( x [ nxtbb ] != i ) maxRev [ i ] = maxRev [ i - 1 ] ; else { if ( i <= t ) maxRev [ i ] = Math . max ( maxRev [ i - 1 ] , revenue [ nxtbb ] ) ; else maxRev [ i ] = Math . max ( maxRev [ i - t - 1 ] + revenue [ nxtbb ] , maxRev [ i - 1 ] ) ; nxtbb ++ ; } } else maxRev [ i ] = maxRev [ i - 1 ] ; } return maxRev [ m ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(16); param0.add(39); param0.add(5); param0.add(10); param0.add(14); param0.add(32); param0.add(2); param0.add(22); param0.add(15); param0.add(8); List param1 = new ArrayList<>(); param1.add(new int[]{6,15,15,18,23,29,32,36,37,39,40,41,44,49,51,52,53,57,66,68,82,89,96}); param1.add(new int[]{76,60,88,46,-20,-78,-22,54,-18,92,-42,-66,-90,-72,-48,22,-72,-42,-46,94,82,-78,14,86,10,-64,-78,66,78,-36,50,-20,-40,-12,10,-46,56,-18,4,-76,-64,74,22,34,4,-2}); param1.add(new int[]{0,0,0,1,1,1,1,1,1,1}); param1.add(new int[]{21,69,30,10,71,72,71,78,30,9,72,10,7,87,30,46,56,74,73,60,86}); param1.add(new int[]{-76,-76,-66,-64,-62,-60,-52,-48,-42,-28,-14,-6,-6,16,20,20,38,46,58,60,70,72,86,98}); param1.add(new int[]{1,1,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,1,1,0,1,0,1}); param1.add(new int[]{16,38,72,82}); param1.add(new int[]{28,-76,42,-2,30,-10,52,66,26,96,96,-72,26,-86,-30,-78,32,-32,58,12,-72,8,34,-68,-28,-66}); param1.add(new int[]{0,0,0,0,0,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}); param1.add(new int[]{95,12,65,97,92,49,94,32,37,97,9,35}); List param2 = new ArrayList<>(); param2.add(new int[]{1,2,5,5,24,26,31,32,33,41,57,59,71,75,79,87,87,88,92,94,96,96,99}); param2.add(new int[]{28,8,-60,84,68,-54,-56,0,-68,-84,-6,92,-80,-24,86,-6,-44,82,74,90,-46,40,62,50,-42,38,78,94,46,-14,-48,66,70,52,10,-88,54,-10,98,34,16,-2,-62,-56,-40,86}); param2.add(new int[]{0,0,0,0,0,0,0,1,1,1}); param2.add(new int[]{72,45,7,30,76,35,75,72,4,7,55,56,7,52,48,27,11,76,66,48,33}); param2.add(new int[]{-90,-82,-78,-76,-74,-52,-48,-44,-44,-40,-38,-14,-6,10,20,38,38,40,44,48,52,54,76,78}); param2.add(new int[]{0,1,0,1,0,0,0,1,0,0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,1}); param2.add(new int[]{15,34,56,74}); param2.add(new int[]{68,-38,34,20,40,78,52,80,58,-12,-18,10,40,34,20,-32,-8,-46,8,62,94,-30,-94,26,-40,64}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param2.add(new int[]{25,32,14,49,90,37,92,1,8,75,50,9}); List param3 = new ArrayList<>(); param3.add(12); param3.add(25); param3.add(9); param3.add(18); param3.add(15); param3.add(28); param3.add(2); param3.add(13); param3.add(25); param3.add(9); List param4 = new ArrayList<>(); param4.add(12); param4.add(27); param4.add(6); param4.add(20); param4.add(17); param4.add(36); param4.add(3); param4.add(16); param4.add(15); param4.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( m , x , revenue , n , t ) : maxRev = [ 0 ] * ( m + 1 ) nxtbb = 0 ; for i in range ( 1 , m + 1 ) : if ( nxtbb < n ) : if ( x [ nxtbb ] != i ) : maxRev [ i ] = maxRev [ i - 1 ] else : if ( i <= t ) : maxRev [ i ] = max ( maxRev [ i - 1 ] , revenue [ nxtbb ] ) else : maxRev [ i ] = max ( maxRev [ i - t - 1 ] + revenue [ nxtbb ] , maxRev [ i - 1 ] ) ; nxtbb += 1 else : maxRev [ i ] = maxRev [ i - 1 ] return maxRev [ m ] "," using namespace std; int f_gold ( int m, int x [ ], int revenue [ ], int n, int t ) { int maxRev [ m + 1 ]; memset ( maxRev, 0, sizeof ( maxRev ) ); int nxtbb = 0; for ( int i = 1; i <= m; i ++ ) { if ( nxtbb < n ) { if ( x [ nxtbb ] != i ) maxRev [ i ] = maxRev [ i - 1 ]; else { if ( i <= t ) maxRev [ i ] = max ( maxRev [ i - 1 ], revenue [ nxtbb ] ); else maxRev [ i ] = max ( maxRev [ i - t - 1 ] + revenue [ nxtbb ], maxRev [ i - 1 ] ); nxtbb ++; } } else maxRev [ i ] = maxRev [ i - 1 ]; } return maxRev [ m ]; } int main() { int n_success = 0; vector param0 {16,39,5,10,14,32,2,22,15,8}; vector> param1 {{6,15,15,18,23,29,32,36,37,39,40,41,44,49,51,52,53,57,66,68,82,89,96},{76,60,88,46,-20,-78,-22,54,-18,92,-42,-66,-90,-72,-48,22,-72,-42,-46,94,82,-78,14,86,10,-64,-78,66,78,-36,50,-20,-40,-12,10,-46,56,-18,4,-76,-64,74,22,34,4,-2},{0,0,0,1,1,1,1,1,1,1},{21,69,30,10,71,72,71,78,30,9,72,10,7,87,30,46,56,74,73,60,86},{-76,-76,-66,-64,-62,-60,-52,-48,-42,-28,-14,-6,-6,16,20,20,38,46,58,60,70,72,86,98},{1,1,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,1,1,0,1,0,1},{16,38,72,82},{28,-76,42,-2,30,-10,52,66,26,96,96,-72,26,-86,-30,-78,32,-32,58,12,-72,8,34,-68,-28,-66},{0,0,0,0,0,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},{95,12,65,97,92,49,94,32,37,97,9,35}}; vector> param2 {{1,2,5,5,24,26,31,32,33,41,57,59,71,75,79,87,87,88,92,94,96,96,99},{28,8,-60,84,68,-54,-56,0,-68,-84,-6,92,-80,-24,86,-6,-44,82,74,90,-46,40,62,50,-42,38,78,94,46,-14,-48,66,70,52,10,-88,54,-10,98,34,16,-2,-62,-56,-40,86},{0,0,0,0,0,0,0,1,1,1},{72,45,7,30,76,35,75,72,4,7,55,56,7,52,48,27,11,76,66,48,33},{-90,-82,-78,-76,-74,-52,-48,-44,-44,-40,-38,-14,-6,10,20,38,38,40,44,48,52,54,76,78},{0,1,0,1,0,0,0,1,0,0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,1},{15,34,56,74},{68,-38,34,20,40,78,52,80,58,-12,-18,10,40,34,20,-32,-8,-46,8,62,94,-30,-94,26,-40,64},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{25,32,14,49,90,37,92,1,8,75,50,9}}; vector param3 {12,25,9,18,15,28,2,13,25,9}; vector param4 {12,27,6,20,17,36,3,16,15,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],¶m1[i].front(),¶m2[i].front(),param3[i],param4[i]) == f_gold(param0[i],¶m1[i].front(),¶m2[i].front(),param3[i],param4[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (16,[6, 15, 15, 18, 23, 29, 32, 36, 37, 39, 40, 41, 44, 49, 51, 52, 53, 57, 66, 68, 82, 89, 96],[1, 2, 5, 5, 24, 26, 31, 32, 33, 41, 57, 59, 71, 75, 79, 87, 87, 88, 92, 94, 96, 96, 99],12,12,), (39,[76, 60, 88, 46, -20, -78, -22, 54, -18, 92, -42, -66, -90, -72, -48, 22, -72, -42, -46, 94, 82, -78, 14, 86, 10, -64, -78, 66, 78, -36, 50, -20, -40, -12, 10, -46, 56, -18, 4, -76, -64, 74, 22, 34, 4, -2],[28, 8, -60, 84, 68, -54, -56, 0, -68, -84, -6, 92, -80, -24, 86, -6, -44, 82, 74, 90, -46, 40, 62, 50, -42, 38, 78, 94, 46, -14, -48, 66, 70, 52, 10, -88, 54, -10, 98, 34, 16, -2, -62, -56, -40, 86],25,27,), (5,[0, 0, 0, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 1, 1, 1],9,6,), (10,[21, 69, 30, 10, 71, 72, 71, 78, 30, 9, 72, 10, 7, 87, 30, 46, 56, 74, 73, 60, 86],[72, 45, 7, 30, 76, 35, 75, 72, 4, 7, 55, 56, 7, 52, 48, 27, 11, 76, 66, 48, 33],18,20,), (14,[-76, -76, -66, -64, -62, -60, -52, -48, -42, -28, -14, -6, -6, 16, 20, 20, 38, 46, 58, 60, 70, 72, 86, 98],[-90, -82, -78, -76, -74, -52, -48, -44, -44, -40, -38, -14, -6, 10, 20, 38, 38, 40, 44, 48, 52, 54, 76, 78],15,17,), (32,[1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1],[0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1],28,36,), (2,[16, 38, 72, 82],[15, 34, 56, 74],2,3,), (22,[28, -76, 42, -2, 30, -10, 52, 66, 26, 96, 96, -72, 26, -86, -30, -78, 32, -32, 58, 12, -72, 8, 34, -68, -28, -66],[68, -38, 34, 20, 40, 78, 52, 80, 58, -12, -18, 10, 40, 34, 20, -32, -8, -46, 8, 62, 94, -30, -94, 26, -40, 64],13,16,), (15,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],25,15,), (8,[95, 12, 65, 97, 92, 49, 94, 32, 37, 97, 9, 35],[25, 32, 14, 49, 90, 37, 92, 1, 8, 75, 50, 9],9,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_OF_OCCURRENCES_OF_A_101_PATTERN_IN_A_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OF_OCCURRENCES_OF_A_101_PATTERN_IN_A_STRING{ static int f_gold ( String str ) { int len = str . length ( ) ; boolean oneSeen = false ; int count = 0 ; for ( int i = 0 ; i < len ; i ++ ) { char getChar = str . charAt ( i ) ; if ( getChar == '1' && oneSeen == true ) { if ( str . charAt ( i - 1 ) == '0' ) count ++ ; } if ( getChar == '1' && oneSeen == false ) oneSeen = true ; if ( getChar != '0' && str . charAt ( i ) != '1' ) oneSeen = false ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""1001ab010abc01001""); param0.add(""1001010001""); param0.add(""010100010100""); param0.add(""DLCu""); param0.add(""7072430592""); param0.add(""011""); param0.add(""pnJpypYOza""); param0.add(""1037""); param0.add(""111""); param0.add(""HxK""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : length = len ( s ) oneSeen = False count = 0 for i in range ( length ) : if ( s [ i ] == '1' and oneSeen ) : if ( s [ i - 1 ] == '0' ) : count += 1 if ( s [ i ] == '1' and oneSeen == 0 ) : oneSeen = True if ( s [ i ] != '0' and s [ i ] != '1' ) : oneSeen = False return count "," using namespace std; int f_gold ( string str ) { int len = str . size ( ); bool oneSeen = 0; int count = 0; for ( int i = 0; i < len; i ++ ) { if ( str [ i ] == '1' && oneSeen == 1 ) if ( str [ i - 1 ] == '0' ) count ++; if ( str [ i ] == '1' && oneSeen == 0 ) { oneSeen = 1; continue; } if ( str [ i ] != '0' && str [ i ] != '1' ) oneSeen = 0; } return count; } int main() { int n_success = 0; vector param0 {""1001ab010abc01001"",""1001010001"",""010100010100"",""DLCu"",""7072430592"",""011"",""pnJpypYOza"",""1037"",""111"",""HxK""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('1001ab010abc01001',), ('1001010001',), ('010100010100',), ('DLCu',), ('7072430592',), ('011',), ('pnJpypYOza',), ('1037',), ('111',), ('HxK',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_INTEGER_OVERFLOW_MULTIPLICATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_INTEGER_OVERFLOW_MULTIPLICATION{ static Boolean f_gold ( long a , long b ) { if ( a == 0 || b == 0 ) return false ; long result = a * b ; if ( a == result / b ) return false ; else return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37L); param0.add(Long.parseLong(""10000000000"")); param0.add(Long.parseLong(""10000000000"")); param0.add(Long.parseLong(""999999999"")); param0.add(39L); param0.add(92L); param0.add(14L); param0.add(19L); param0.add(14L); param0.add(88L); List param1 = new ArrayList<>(); param1.add(80L); param1.add(Long.parseLong(""-10000000000"")); param1.add(Long.parseLong(""10000000000"")); param1.add(Long.parseLong(""999999999"")); param1.add(36L); param1.add(56L); param1.add(21L); param1.add(38L); param1.add(82L); param1.add(41L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : if ( a == 0 or b == 0 ) : return False result = a * b if ( result >= 9223372036854775807 or result <= - 9223372036854775808 ) : result = 0 if ( a == ( result // b ) ) : print ( result // b ) return False else : return True "," using namespace std; bool f_gold ( long long a, long long b ) { if ( a == 0 || b == 0 ) return false; long long result = a * b; if ( a == result / b ) return false; else return true; } int main() { int n_success = 0; vector param0 {37,10000000000,10000000000,999999999,39,92,14,19,14,88}; vector param1 {80,-10000000000,10000000000,999999999,36,56,21,38,82,41}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,80,), (10000000000,-10000000000,), (10000000000,10000000000,), (999999999,999999999,), (39,36,), (92,56,), (14,21,), (19,38,), (14,82,), (88,41,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHANGE_BITS_CAN_MADE_ONE_FLIP_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHANGE_BITS_CAN_MADE_ONE_FLIP_1{ static boolean f_gold ( String str ) { int sum = 0 ; int n = str . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) sum += str . charAt ( i ) - '0' ; return ( sum == n - 1 || sum == 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""00001""); param0.add(""0000""); param0.add(""11""); param0.add(""111110""); param0.add(""1""); param0.add(""111010111010""); param0.add(""hUInqJXNdbfP""); param0.add(""5191""); param0.add(""1110101101""); param0.add(""NupSrU xz""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string str ) { int sum = 0; int n = str . length ( ); for ( int i = 0; i < n; i ++ ) sum += str [ i ] - '0'; return ( sum == n - 1 || sum == 1 ); } int main() { int n_success = 0; vector param0 {""00001"",""0000"",""11"",""111110"",""1"",""111010111010"",""hUInqJXNdbfP"",""5191"",""1110101101"",""NupSrU xz""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, CENTER_ELEMENT_OF_MATRIX_EQUALS_SUMS_OF_HALF_DIAGONALS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CENTER_ELEMENT_OF_MATRIX_EQUALS_SUMS_OF_HALF_DIAGONALS{ static boolean f_gold ( int mat [ ] [ ] , int n ) { int diag1_left = 0 , diag1_right = 0 ; int diag2_left = 0 , diag2_right = 0 ; for ( int i = 0 , j = n - 1 ; i < n ; i ++ , j -- ) { if ( i < n / 2 ) { diag1_left += mat [ i ] [ i ] ; diag2_left += mat [ j ] [ i ] ; } else if ( i > n / 2 ) { diag1_right += mat [ i ] [ i ] ; diag2_right += mat [ j ] [ i ] ; } } return ( diag1_left == diag2_right && diag2_right == diag2_left && diag1_right == diag2_left && diag2_right == mat [ n / 2 ] [ n / 2 ] ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{ new int[]{ 2, 9, 1, 4, -2}, new int[]{ 6, 7, 2, 11, 4}, new int[]{ 4, 2, 9, 2, 4}, new int[]{ 1, 9, 2, 4, 4}, new int[]{ 0, 2, 4, 2, 5} }); param0.add(new int[][]{ new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82}}); param0.add(new int[][]{new int[]{52,88,22,69,1,83,30,39,79,35,69,70,89,11,51,63,86,34,55,78,73,20,80,58,81,17,34,75,99,62,34,72,19,97,87,66,72,93,42,51,71,49,29,95},new int[]{30,99,25,68,62,38,17,74,1,18,63,46,19,50,96,54,31,97,86,65,46,35,49,81,34,29,6,1,55,27,12,4,80,52,11,52,84,26,28,72,66,90,27,97},new int[]{55,71,54,46,36,21,49,34,87,34,40,7,90,52,49,81,95,89,37,62,15,2,11,96,94,17,88,45,68,61,46,32,19,67,4,25,73,21,87,93,94,89,93,98},new int[]{14,22,48,51,80,11,59,14,7,69,58,40,93,81,94,25,78,42,86,44,5,28,76,60,77,21,96,49,56,57,85,61,38,73,2,3,43,74,35,73,40,96,85,58},new int[]{34,25,56,32,22,89,65,21,80,96,21,28,19,14,87,24,20,32,74,52,65,95,52,58,79,95,92,10,70,15,47,91,10,21,19,68,22,63,38,15,70,75,44,30},new int[]{24,86,94,46,4,6,38,26,19,2,68,69,47,99,29,64,80,12,85,73,11,8,60,26,32,39,4,98,92,89,44,99,83,35,51,51,29,78,85,36,78,60,15,51},new int[]{50,94,55,12,50,62,5,27,79,90,9,35,13,44,46,97,98,68,77,74,53,1,11,50,9,38,87,13,5,25,10,5,22,42,89,20,28,21,11,93,69,37,49,69},new int[]{33,45,8,6,15,15,9,61,56,5,26,87,80,57,35,10,91,80,21,12,9,16,73,93,54,23,39,88,22,55,31,74,47,27,98,48,39,88,21,15,81,45,19,53},new int[]{89,55,86,49,78,61,60,92,76,91,24,86,39,61,23,72,92,93,79,39,72,92,97,11,42,25,34,22,2,51,16,11,78,96,86,69,87,62,19,29,42,23,60,73},new int[]{18,95,81,55,18,27,85,1,96,14,59,78,33,36,39,76,45,25,15,20,34,58,60,78,30,13,78,93,90,67,89,91,45,40,80,38,75,93,47,88,29,34,11,20},new int[]{20,73,56,23,91,88,25,89,33,31,74,79,1,54,16,85,59,66,3,15,32,50,91,99,60,88,8,7,4,94,10,60,25,42,47,96,96,32,74,73,25,89,16,49},new int[]{16,94,38,5,7,77,8,33,62,74,84,32,93,1,91,20,55,63,78,79,6,52,2,93,39,32,51,69,86,92,32,93,3,62,95,13,70,21,61,14,89,71,22,32},new int[]{41,32,42,52,94,81,54,62,85,90,43,3,38,81,39,70,85,45,46,13,52,9,57,69,43,7,44,44,95,68,77,44,79,40,77,43,62,43,90,19,49,65,77,25},new int[]{84,41,23,58,88,43,40,30,34,10,60,1,12,46,93,75,17,84,58,38,6,62,84,74,10,95,26,58,17,53,78,5,67,20,51,46,79,67,3,23,9,11,47,49},new int[]{44,13,8,63,22,38,27,26,23,95,93,65,74,47,61,46,4,31,4,29,73,79,44,3,59,79,53,11,6,47,7,68,85,1,56,87,77,43,28,29,18,87,92,73},new int[]{62,6,16,1,22,46,62,23,21,51,95,38,28,44,91,39,42,42,60,57,77,96,7,51,97,77,32,7,76,40,15,59,85,12,77,42,39,63,2,29,61,29,38,7},new int[]{30,87,92,56,87,36,42,93,4,84,5,46,75,2,54,88,59,33,22,47,6,24,93,49,96,94,51,41,67,89,92,79,81,2,91,78,43,32,12,23,16,44,2,7},new int[]{21,58,95,23,60,25,35,99,45,7,69,32,53,69,25,95,84,86,77,2,86,61,9,51,2,45,32,72,80,97,75,32,8,96,85,89,20,65,21,7,89,9,86,2},new int[]{19,60,70,59,69,45,62,10,65,26,90,60,18,59,21,46,12,78,32,39,99,81,55,55,10,35,80,6,68,62,9,29,71,80,6,44,64,67,44,78,14,9,23,57},new int[]{57,15,64,7,20,64,19,6,51,39,65,71,99,25,23,89,58,11,34,31,38,46,12,9,13,64,20,59,85,22,65,60,41,81,45,4,70,45,58,83,94,23,32,63},new int[]{93,8,85,81,81,85,79,91,25,33,66,16,55,36,72,80,7,69,87,8,3,35,36,79,30,15,93,68,98,87,58,99,28,95,42,97,18,5,9,84,9,18,56,15},new int[]{79,78,62,35,40,51,60,56,84,75,41,54,17,25,93,87,9,56,89,23,2,45,65,38,6,48,44,79,7,66,62,30,93,76,52,98,94,36,35,66,50,3,76,4},new int[]{55,52,59,71,20,19,8,67,27,79,8,18,29,46,36,3,9,10,84,66,1,91,4,48,96,18,78,45,15,51,61,4,19,88,94,77,11,28,57,75,54,65,47,4},new int[]{34,76,54,88,61,96,83,93,93,83,20,3,40,69,23,69,94,32,24,51,58,42,35,32,54,45,48,86,85,92,49,34,16,11,97,19,92,29,54,53,67,82,82,76},new int[]{82,32,83,56,63,4,11,3,27,80,44,18,30,88,70,47,34,76,42,23,40,15,80,57,14,79,12,35,25,78,2,18,35,9,11,90,67,69,96,74,38,70,75,81},new int[]{59,66,41,24,50,5,21,6,4,9,69,68,9,18,59,43,80,66,29,48,51,42,36,76,45,98,35,6,37,36,84,16,72,22,69,69,63,75,19,81,18,73,17,41},new int[]{33,84,55,82,24,77,40,28,67,75,39,21,37,2,6,52,5,47,43,96,40,11,81,14,2,39,63,63,18,97,94,79,93,90,1,17,54,39,48,66,15,22,20,93},new int[]{89,43,56,24,98,43,21,48,66,16,40,21,52,8,78,55,86,82,58,5,42,30,95,9,95,95,41,51,57,73,61,6,26,74,6,53,61,33,45,94,40,24,92,45},new int[]{38,29,79,8,64,87,73,51,75,6,47,49,76,98,85,32,54,36,89,99,98,19,37,17,80,16,58,44,68,49,94,51,98,5,97,58,46,55,73,17,12,24,56,55},new int[]{76,79,16,87,82,22,44,95,43,79,21,8,49,6,81,47,36,92,23,31,75,62,84,96,81,57,70,65,37,68,95,75,17,7,52,35,2,40,37,57,10,76,81,46},new int[]{90,5,5,27,5,61,8,31,97,21,99,21,51,79,59,2,30,58,92,81,20,40,29,5,89,10,83,61,1,47,98,57,14,25,90,21,16,74,32,45,64,84,73,60},new int[]{98,95,19,47,95,64,30,47,88,33,82,21,95,63,42,61,43,68,26,33,33,49,84,41,72,36,72,95,22,47,83,20,87,24,43,88,73,16,27,45,37,13,51,2},new int[]{76,97,87,59,14,49,30,98,9,79,24,41,60,89,32,47,21,42,70,89,2,31,56,30,63,15,18,32,14,62,82,99,52,22,14,78,34,86,80,56,53,49,63,16},new int[]{80,40,38,18,23,48,82,46,22,54,40,30,55,56,42,42,62,82,53,82,53,64,1,79,69,27,17,63,41,58,57,96,38,90,66,92,45,23,20,36,42,22,60,11},new int[]{28,45,22,81,63,31,11,36,78,35,23,29,23,16,84,89,19,90,96,63,50,85,73,43,19,85,18,6,35,14,64,9,35,2,6,99,25,73,50,95,7,63,28,2},new int[]{65,59,24,62,99,71,38,93,62,65,51,94,52,96,74,98,63,11,48,54,91,50,74,38,86,88,8,6,68,69,6,32,38,57,84,64,54,14,64,50,47,54,19,75},new int[]{39,65,99,83,60,33,32,36,24,43,71,71,46,47,69,14,45,52,90,50,65,77,64,23,84,71,70,59,73,92,74,54,99,71,89,94,26,44,76,13,54,40,4,53},new int[]{1,6,55,66,91,18,29,53,33,3,20,4,82,8,86,86,83,28,66,73,99,86,26,34,71,94,49,89,49,73,27,65,33,72,49,63,32,19,50,22,90,67,9,35},new int[]{71,79,4,37,28,9,35,25,9,61,52,97,17,76,9,54,5,63,47,90,19,99,66,45,71,73,86,33,80,43,88,72,94,26,45,35,81,53,10,41,17,71,66,11},new int[]{63,67,46,20,13,87,17,93,32,99,99,98,85,16,23,11,14,67,71,45,75,33,83,45,54,51,87,23,29,6,39,5,96,40,90,78,82,21,59,89,20,24,3,86},new int[]{72,57,93,71,70,70,76,63,86,47,90,89,19,99,13,89,45,32,30,85,42,72,42,7,3,37,3,18,42,9,57,24,7,97,89,42,98,58,85,56,58,18,39,50},new int[]{33,28,56,25,14,55,84,84,7,4,95,30,62,57,37,55,85,65,52,3,77,7,70,70,34,96,16,8,21,11,50,87,6,15,11,27,79,45,38,4,78,45,10,54},new int[]{29,12,56,40,84,37,66,20,12,38,30,47,82,74,71,42,5,48,93,99,51,12,10,37,66,67,14,47,20,52,68,26,47,79,73,3,2,41,30,37,81,3,9,8},new int[]{9,17,24,72,14,54,80,18,88,39,47,27,92,71,98,91,34,19,6,30,92,12,15,39,64,64,15,58,67,1,7,9,1,5,47,10,2,23,93,56,19,38,47,84}}); param0.add(new int[][]{new int[]{99,52,49,71,23,50,17,48,2,69,62},new int[]{85,13,61,11,88,97,27,35,18,85,68},new int[]{61,41,96,43,49,11,67,51,52,85,43},new int[]{58,78,70,29,31,28,50,36,92,19,67},new int[]{12,88,76,24,65,92,80,21,94,98,26},new int[]{35,95,80,58,42,29,29,9,78,72,2},new int[]{75,2,18,69,57,71,23,19,19,58,83},new int[]{49,45,28,75,50,11,55,9,14,98,93},new int[]{21,48,58,69,97,9,67,78,18,12,87},new int[]{78,16,37,20,20,15,25,17,12,42,39},new int[]{56,53,71,72,88,47,25,85,50,33,74}}); param0.add(new int[][]{new int[]{29,3,39,4,37,95,6,92,10,12,66,3,65,64,35,24,47,52,34},new int[]{84,80,94,25,69,29,92,64,53,58,41,87,96,51,18,41,99,61,24},new int[]{47,28,36,21,56,69,26,54,87,44,33,26,22,20,2,41,54,57,18},new int[]{5,96,46,75,21,22,3,9,2,28,34,53,59,10,83,93,2,48,6},new int[]{44,54,71,36,8,83,10,33,91,93,19,18,51,23,1,59,3,10,71},new int[]{49,56,90,16,39,96,76,44,8,8,45,11,97,25,17,95,83,55,79},new int[]{56,44,53,35,39,2,98,25,38,68,80,32,79,78,41,79,71,7,72},new int[]{83,18,17,82,83,77,59,11,51,7,27,59,37,5,62,72,74,90,79},new int[]{55,16,93,92,74,56,51,68,46,61,78,33,55,18,12,74,21,97,78},new int[]{73,26,79,21,22,55,46,41,5,44,16,35,5,62,90,26,61,51,69},new int[]{56,50,36,24,79,30,69,48,22,33,69,96,50,23,10,36,17,53,91},new int[]{8,44,61,6,71,90,81,37,54,23,91,57,51,58,19,27,89,25,21},new int[]{25,51,71,35,70,50,15,24,49,68,7,94,81,54,38,94,45,9,55},new int[]{83,52,77,49,55,83,70,76,79,3,68,38,70,49,92,8,95,85,45},new int[]{29,79,49,24,21,23,95,98,28,32,22,62,67,73,6,65,22,51,68},new int[]{57,72,55,42,52,61,19,1,41,63,88,48,81,32,50,14,17,96,97},new int[]{30,51,98,92,62,24,63,14,34,59,65,86,33,58,18,12,74,66,2},new int[]{70,84,28,42,3,48,89,87,13,57,88,3,63,38,59,28,26,84,91},new int[]{65,74,74,61,57,1,32,32,27,13,17,28,89,52,36,47,66,32,32}}); param0.add(new int[][]{new int[]{55,73,80,89,40,28,81,31,87,31,26,4,58,79,23,69,60,43,89,94,26,67,68,55,47,82,59,75,75,16,58},new int[]{89,1,90,45,94,6,91,52,19,43,19,39,32,65,89,47,13,74,82,36,86,70,27,72,24,20,86,9,39,83,1},new int[]{11,74,1,91,81,44,51,17,66,23,41,59,74,94,99,25,17,19,82,82,46,35,74,23,86,44,9,32,90,93,59},new int[]{42,62,19,93,35,76,8,89,91,43,45,6,13,11,70,69,7,55,55,19,6,89,9,20,25,50,72,50,38,66,57},new int[]{22,56,36,51,68,1,48,33,24,49,69,58,48,57,64,99,53,60,90,43,41,26,59,49,64,5,44,18,57,89,40},new int[]{46,58,85,24,28,46,68,72,54,33,67,84,35,39,47,71,91,5,37,1,86,56,7,64,8,94,64,57,28,26,34},new int[]{96,22,20,14,23,67,19,78,39,37,99,1,19,15,89,1,31,52,43,46,86,50,20,62,43,5,79,66,12,57,60},new int[]{55,71,66,72,73,27,28,37,79,19,94,51,13,45,6,94,1,25,99,26,13,19,10,45,71,15,87,31,8,30,98},new int[]{97,1,16,11,27,86,40,83,44,70,57,48,40,39,84,3,55,1,23,67,62,34,17,48,91,53,61,87,11,15,90},new int[]{11,7,47,8,5,81,87,66,91,63,21,71,90,94,12,11,54,81,10,16,15,58,79,84,4,96,22,35,14,94,31},new int[]{74,70,91,11,36,74,80,24,85,40,42,87,21,96,81,51,81,55,85,4,62,87,25,96,70,14,41,57,38,62,41},new int[]{45,80,96,16,19,37,85,79,61,26,94,79,64,13,91,87,34,98,23,20,54,73,58,59,20,39,78,90,91,98,93},new int[]{32,41,69,68,87,21,97,24,16,32,83,26,3,99,82,7,96,88,16,53,88,4,45,32,98,83,78,58,13,22,95},new int[]{44,44,30,23,12,14,36,45,72,24,3,78,51,75,55,38,92,87,82,20,97,2,26,2,67,84,74,42,85,40,9},new int[]{2,28,3,16,4,23,94,77,6,74,55,81,8,73,98,81,86,64,67,41,40,93,27,39,53,40,52,37,67,19,34},new int[]{78,85,66,10,52,42,60,81,2,91,1,50,36,97,22,99,98,82,36,3,44,16,11,10,51,42,85,25,99,6,44},new int[]{8,34,41,1,3,52,91,77,43,47,83,19,70,47,78,5,64,45,64,45,36,9,23,32,93,45,28,52,11,19,64},new int[]{65,73,57,66,4,29,4,1,92,18,13,70,49,47,86,30,27,72,28,2,20,75,78,24,77,72,44,21,22,73,58},new int[]{11,80,53,9,67,52,13,1,44,75,24,5,66,81,81,20,64,15,68,54,11,23,1,42,47,68,38,2,45,27,98},new int[]{77,61,82,11,69,29,25,78,54,48,46,41,41,61,11,44,32,49,6,57,6,47,63,49,22,67,19,55,34,41,7},new int[]{57,16,59,38,9,77,34,46,37,43,47,6,38,61,4,5,70,60,77,88,92,77,56,82,59,7,68,31,88,86,85},new int[]{48,42,90,30,51,35,62,51,87,50,30,19,96,50,54,83,86,4,12,15,15,10,61,19,53,72,57,95,9,29,7},new int[]{72,17,79,16,71,83,38,89,76,96,47,10,24,50,68,43,37,45,54,43,68,37,89,41,94,1,93,16,37,37,7},new int[]{40,51,64,97,22,43,62,54,27,29,16,85,11,21,9,27,86,79,23,51,93,80,3,16,8,90,42,73,35,71,72},new int[]{99,48,54,36,6,71,12,59,65,50,43,43,49,89,76,55,91,87,83,85,50,21,88,13,42,15,50,1,51,34,42},new int[]{62,95,32,61,93,54,74,58,85,24,27,21,18,55,68,47,54,18,73,64,49,94,35,94,39,58,57,6,78,93,96},new int[]{78,20,50,9,76,14,23,48,98,80,82,56,40,97,69,39,74,86,43,97,31,70,3,4,27,89,27,47,60,36,46},new int[]{61,42,7,30,50,47,93,40,5,70,58,44,71,32,79,77,82,74,40,57,11,40,47,2,91,52,72,49,59,38,16},new int[]{88,87,78,27,74,28,89,66,45,33,60,50,46,35,41,58,77,55,5,5,22,34,65,59,17,51,49,9,74,15,29},new int[]{53,25,85,81,91,28,23,3,33,71,69,90,17,81,67,67,34,8,45,60,56,70,22,33,50,71,83,46,52,74,87},new int[]{66,21,24,48,13,64,5,18,75,37,54,32,28,86,45,28,65,70,75,42,33,16,13,21,59,47,39,88,43,27,37}}); param0.add(new int[][]{new int[]{76,7,58},new int[]{20,79,65},new int[]{74,14,79}}); param0.add(new int[][]{new int[]{89,95,74,37,6,6,28,78,13,13,10,80,39,99,79,23,37,8,90,60,86,5,98,27,19,43,43,35,84,55,61,47,77,56,82,18,65,96,53,89,85,91,11,1,83,96,8,19,55},new int[]{16,99,66,12,93,74,62,86,98,58,21,37,5,70,32,67,10,69,88,84,62,37,95,47,81,49,24,82,26,55,7,78,41,2,30,81,20,56,74,24,12,91,15,73,82,48,61,71,28},new int[]{3,16,36,4,99,9,12,74,44,66,19,13,55,97,65,92,70,3,25,52,16,43,56,68,8,80,44,38,23,6,43,44,80,80,23,16,76,9,82,9,85,58,65,59,23,69,19,35,97},new int[]{55,82,40,14,84,13,53,80,95,39,99,84,65,56,40,46,77,7,45,22,7,84,52,68,70,67,3,58,67,54,9,54,80,51,16,12,20,53,31,94,21,3,21,92,28,5,71,69,73},new int[]{47,85,20,38,37,58,17,42,92,95,97,32,62,96,87,21,89,33,67,6,92,66,32,64,26,62,5,11,74,79,82,49,78,92,94,62,60,77,84,2,89,59,76,25,68,42,76,71,55},new int[]{38,96,43,70,53,91,99,21,20,19,33,63,68,60,19,28,22,51,88,63,62,94,29,74,32,73,25,16,15,59,48,18,23,55,42,3,71,52,11,55,88,99,25,92,76,87,81,41,37},new int[]{82,55,9,99,36,57,63,82,20,85,47,20,6,73,93,29,77,91,49,6,39,32,49,43,28,45,65,50,54,51,43,64,95,30,82,93,42,38,87,86,66,69,15,61,96,6,78,24,85},new int[]{14,12,55,68,44,85,81,93,51,80,82,38,41,44,75,96,92,16,98,50,94,38,86,5,9,77,39,87,27,32,64,95,33,90,18,76,67,5,78,59,76,4,16,75,48,66,77,8,44},new int[]{21,26,35,15,40,30,66,80,13,1,43,28,1,40,34,13,61,66,4,89,98,13,36,96,61,58,85,90,15,93,90,85,12,76,69,61,42,90,32,2,8,91,54,8,88,13,29,13,58},new int[]{63,87,47,79,88,87,74,38,69,69,95,40,1,2,29,7,93,57,55,73,36,7,92,10,80,74,39,58,90,98,98,40,14,82,1,17,49,86,16,7,15,21,66,59,48,89,73,84,50},new int[]{10,52,85,68,30,34,94,78,86,65,60,8,75,65,69,57,45,49,74,62,39,77,21,53,45,97,28,53,9,75,93,71,61,27,22,95,30,92,84,15,15,53,76,81,23,70,16,91,87},new int[]{65,45,7,45,39,50,49,48,49,40,39,57,82,63,56,86,2,26,96,23,18,83,88,68,60,2,94,49,38,31,40,80,53,64,33,58,50,64,3,61,82,10,66,51,94,30,25,43,88},new int[]{64,59,62,99,10,64,94,60,90,99,88,20,49,99,74,27,51,57,79,79,37,99,3,29,68,47,80,69,21,42,21,2,78,69,7,75,35,30,44,46,55,1,54,80,1,63,55,86,77},new int[]{27,15,81,9,69,59,23,11,24,72,98,54,31,22,14,5,17,82,83,71,90,89,82,44,79,93,49,65,4,9,36,51,32,88,18,15,20,58,40,66,89,13,91,13,62,28,46,15,93},new int[]{85,44,95,23,67,99,78,66,50,13,2,76,91,34,40,69,61,25,75,77,63,28,85,56,26,27,26,15,50,6,68,4,30,77,9,42,14,92,40,3,41,93,33,79,60,64,62,79,7},new int[]{76,50,39,71,47,70,26,58,73,51,88,52,94,16,48,27,33,23,45,83,83,22,42,33,10,47,96,79,39,46,72,51,25,82,15,58,59,26,41,44,85,22,98,37,14,4,24,66,63},new int[]{65,66,13,27,81,17,69,88,57,72,73,18,16,51,96,40,39,56,54,44,46,32,48,61,66,38,43,4,5,58,37,26,9,15,88,88,99,89,26,63,87,70,27,54,83,31,32,2,18},new int[]{28,71,87,88,92,25,39,49,4,52,83,68,57,13,65,63,98,71,25,23,30,61,7,54,17,97,60,66,38,13,52,52,32,86,9,17,82,40,91,75,54,54,28,72,50,18,13,33,15},new int[]{86,38,94,6,45,59,98,83,97,78,48,41,83,79,74,55,61,2,2,85,76,10,76,39,2,65,66,87,92,81,52,85,44,34,73,81,45,32,5,78,89,86,63,69,54,38,9,61,95},new int[]{21,36,1,22,87,87,15,46,65,6,40,35,81,61,23,20,28,37,82,7,49,84,24,80,13,92,7,15,87,23,95,69,91,60,10,51,64,71,56,32,23,54,73,93,91,85,70,90,84},new int[]{61,79,20,53,15,29,70,80,65,62,70,16,54,97,7,60,10,53,8,85,90,37,82,4,84,83,97,23,9,38,45,45,18,46,2,48,17,16,45,48,24,95,65,92,33,4,1,33,74},new int[]{62,3,45,21,64,73,57,40,62,43,88,46,72,24,24,10,99,68,57,44,73,75,48,77,27,30,46,12,60,19,68,54,34,87,90,7,82,42,68,53,8,22,26,77,63,46,81,44,62},new int[]{36,41,79,82,27,70,98,41,5,57,76,29,12,25,34,75,87,24,82,63,63,10,5,95,89,53,81,28,65,45,66,49,40,66,91,8,27,17,68,44,31,5,60,89,92,19,42,23,77},new int[]{17,94,58,87,49,3,77,96,45,35,2,47,3,29,74,20,34,79,40,65,90,63,56,32,66,96,41,29,84,87,51,12,44,10,83,74,83,90,88,9,29,29,92,61,64,3,87,4,55},new int[]{14,77,28,63,39,64,60,20,28,96,14,77,75,58,39,58,15,73,3,5,92,42,15,3,35,7,94,24,31,78,80,4,3,99,9,68,83,88,60,11,79,36,95,72,2,50,3,67,85},new int[]{62,76,14,23,77,16,81,18,13,56,90,45,40,31,81,32,1,35,36,83,92,66,29,43,29,43,19,64,92,98,31,19,96,29,73,7,58,76,60,51,95,82,92,50,21,9,34,34,47},new int[]{24,80,28,46,51,99,6,63,53,64,52,60,41,11,4,14,13,15,8,88,11,99,89,23,7,69,32,92,44,3,94,44,69,51,61,51,33,20,30,44,86,86,29,21,82,53,11,10,35},new int[]{26,44,4,74,57,39,80,41,94,67,98,89,36,4,74,13,70,7,28,59,37,15,30,74,12,81,30,1,36,88,21,32,63,82,13,37,44,21,18,46,47,26,5,5,31,28,77,75,65},new int[]{88,13,18,24,29,28,45,86,84,11,51,59,84,13,47,88,43,24,48,63,17,69,54,94,14,15,73,78,10,22,95,13,81,65,14,44,39,35,65,27,45,57,22,34,9,50,54,58,96},new int[]{62,38,84,27,64,3,11,24,29,69,97,8,19,68,99,94,69,48,40,67,16,64,8,5,99,72,25,53,49,72,21,51,46,9,64,96,77,23,60,59,8,64,99,54,92,15,52,93,51},new int[]{4,34,24,21,2,7,56,75,76,68,35,26,18,64,56,80,55,12,37,52,19,15,86,84,52,77,87,95,26,45,96,21,81,93,53,29,48,86,19,54,78,87,2,32,62,97,7,98,68},new int[]{87,84,22,29,3,22,84,89,98,53,93,57,10,40,20,87,11,8,93,36,25,39,98,96,62,87,21,19,25,87,83,5,83,99,12,25,5,76,27,4,83,45,47,88,28,97,35,16,12},new int[]{80,75,43,28,87,81,19,75,68,74,55,83,36,62,39,41,60,86,66,59,97,40,91,19,55,46,4,83,62,25,63,70,13,86,4,2,67,30,4,48,43,93,45,97,13,47,96,28,37},new int[]{28,27,89,30,6,94,9,6,29,87,70,86,66,95,53,70,5,20,12,8,58,49,64,50,97,39,40,31,3,83,72,30,95,29,70,56,66,87,63,30,53,46,9,7,63,47,44,49,79},new int[]{79,85,62,59,78,75,75,84,13,30,84,43,51,8,37,97,90,64,39,8,62,82,39,14,52,82,57,21,23,4,74,43,11,84,19,65,95,2,49,69,34,4,91,39,49,3,26,41,65},new int[]{16,58,35,83,16,33,31,22,61,84,64,70,35,39,3,96,13,14,41,8,19,14,75,50,99,61,36,67,89,77,80,92,45,91,74,82,72,7,22,9,60,42,59,40,29,55,64,42,29},new int[]{92,21,97,63,63,90,38,79,66,12,33,79,1,97,68,28,62,78,59,49,45,76,6,20,85,16,12,52,20,58,45,97,2,34,26,33,42,94,65,8,65,10,32,51,57,40,66,31,63},new int[]{68,56,12,31,23,33,8,62,80,15,41,52,26,78,12,27,95,68,30,4,54,95,34,68,84,56,18,47,72,60,59,2,73,16,86,58,12,5,39,15,72,88,19,82,85,49,39,78,15},new int[]{55,67,56,45,75,57,67,94,6,70,31,22,85,38,58,70,29,56,11,48,86,60,51,39,6,30,89,1,86,9,45,8,34,80,83,8,12,43,56,31,42,33,19,91,88,92,55,4,12},new int[]{87,84,28,58,48,1,75,44,63,95,38,9,6,70,52,67,96,99,16,2,36,71,35,30,45,46,93,65,1,57,71,67,31,25,47,56,88,1,95,37,75,67,12,20,30,74,64,79,85},new int[]{64,18,32,19,94,33,62,22,29,88,4,50,76,4,5,83,39,57,31,7,12,10,29,85,13,87,70,31,9,51,88,16,59,58,11,36,1,21,44,37,6,14,93,1,8,44,83,87,75},new int[]{27,36,42,20,8,46,52,26,35,60,3,4,93,62,64,50,92,19,43,92,82,14,14,54,29,3,98,73,5,93,5,45,64,64,43,43,51,13,90,73,68,95,69,7,92,78,88,42,5},new int[]{47,48,98,92,47,8,21,88,24,13,15,89,53,92,72,31,71,51,47,39,81,57,50,57,35,86,7,53,10,92,39,58,93,35,59,22,9,8,94,94,58,95,22,95,40,28,46,69,81},new int[]{52,11,22,47,89,13,45,75,69,78,22,67,35,32,38,58,40,88,92,21,49,97,92,39,61,10,40,58,89,45,17,68,10,62,89,32,72,42,45,76,21,27,30,74,85,1,9,3,53},new int[]{42,19,6,7,43,80,36,68,82,96,96,82,39,43,37,28,50,39,2,37,66,19,69,44,13,22,7,2,62,78,89,90,5,20,54,76,63,36,95,81,16,57,64,10,99,97,99,51,27},new int[]{7,91,41,76,97,13,66,3,11,5,60,2,92,77,99,64,13,54,12,18,18,17,39,86,13,45,19,88,19,21,24,30,92,48,35,59,17,48,98,55,9,77,14,26,52,85,44,84,11},new int[]{51,42,62,35,64,95,18,14,49,69,17,21,14,3,31,89,47,44,17,90,81,56,83,27,71,90,69,2,80,62,75,87,99,6,65,97,18,55,67,57,19,74,84,11,96,84,55,96,37},new int[]{86,4,13,70,93,58,2,60,89,32,63,60,26,90,22,74,87,4,16,63,42,33,13,46,13,33,14,8,90,86,46,1,59,60,49,80,93,61,23,5,85,50,36,20,43,8,90,41,25},new int[]{7,86,61,33,69,38,12,44,53,14,71,92,52,52,46,80,41,2,49,95,78,28,32,92,76,77,22,42,29,94,79,68,33,46,9,38,80,26,43,53,27,11,26,78,57,1,11,30,88}}); param0.add(new int[][]{new int[]{4,86,72,80,33,33,74,66,4,87,51,27,33,97,84,77,75,83,32,67,77,28,86,57,19,31,84,53,88,32,9,51,83,23,25,97,46,44,66,67,28,99,78,24,56,50,3,23,34},new int[]{9,82,59,66,22,35,31,90,78,48,53,92,75,32,85,87,88,12,62,3,6,12,53,20,6,84,14,56,41,49,65,84,86,95,31,28,12,16,97,35,44,68,10,98,3,31,52,95,65},new int[]{5,5,66,15,65,21,71,11,90,42,66,94,61,60,14,5,31,48,32,57,34,74,95,27,82,5,17,75,69,56,38,54,48,85,88,94,80,49,41,22,57,66,19,2,75,33,73,59,89},new int[]{6,11,27,72,45,31,91,63,44,41,47,69,79,2,15,95,20,3,39,74,90,10,40,13,85,98,44,32,73,30,1,53,76,44,35,88,40,45,60,63,10,47,24,57,18,57,72,46,43},new int[]{77,16,14,9,73,69,61,11,19,64,38,10,16,93,69,82,42,44,53,35,36,22,24,76,12,35,50,83,78,87,40,22,47,75,66,10,43,69,94,85,97,25,47,7,28,80,45,67,83},new int[]{12,83,11,3,61,66,56,26,86,81,34,55,79,76,16,80,39,6,72,52,25,56,83,19,76,73,93,27,5,26,30,78,97,35,75,53,68,33,70,28,74,36,49,90,94,86,53,69,2},new int[]{97,80,71,64,21,35,46,86,48,22,6,33,39,43,25,18,41,35,24,55,40,87,97,29,10,79,10,90,64,29,98,18,2,25,85,51,95,22,9,91,89,89,91,74,94,4,21,30,33},new int[]{43,90,2,87,31,4,47,84,89,45,65,66,6,7,51,68,18,41,69,25,56,1,98,55,3,54,81,32,88,2,65,98,8,58,53,44,73,28,19,56,20,71,56,35,19,81,63,82,7},new int[]{27,39,30,23,84,23,90,47,78,48,95,91,63,9,23,63,74,47,87,74,66,37,38,1,48,82,35,71,86,53,25,42,23,9,27,75,51,91,92,57,82,36,34,13,55,46,52,94,28},new int[]{86,88,30,45,38,20,70,97,47,59,79,79,96,14,42,61,59,8,57,22,84,88,21,28,49,23,88,54,23,68,46,68,94,28,95,97,50,83,63,10,89,37,13,70,30,87,80,72,80},new int[]{11,1,86,18,11,84,10,48,61,10,60,22,75,99,9,15,83,37,70,44,69,3,10,77,4,56,40,33,98,33,60,21,69,45,57,77,40,81,64,10,74,66,85,65,30,82,35,53,39},new int[]{22,67,70,80,67,75,17,19,60,72,78,90,89,51,48,57,10,32,79,68,28,4,61,77,12,15,29,87,13,38,58,35,40,76,94,5,2,30,99,10,73,81,38,59,94,35,71,12,42},new int[]{98,49,67,33,13,75,20,95,33,34,50,50,9,7,9,26,2,5,66,10,31,33,6,14,78,15,97,95,81,43,79,20,21,64,29,59,73,64,93,44,34,47,9,60,30,17,52,59,4},new int[]{40,96,96,7,38,32,69,67,56,20,64,17,16,11,13,18,14,34,76,86,85,26,42,61,39,2,57,50,16,62,98,11,83,63,30,54,71,27,86,64,81,79,9,76,72,2,49,48,55},new int[]{80,67,31,26,66,30,77,78,1,96,70,22,75,87,54,14,14,84,71,19,26,59,22,6,63,77,74,54,19,95,10,37,77,17,55,5,21,39,20,71,15,79,53,87,33,44,66,50,32},new int[]{79,71,73,55,28,86,3,53,42,2,22,25,89,32,7,62,31,63,37,68,97,79,9,70,46,95,34,60,13,36,96,86,48,93,75,6,5,65,50,74,74,24,7,86,58,21,86,33,44},new int[]{25,95,80,15,29,83,52,17,90,36,35,40,23,73,34,58,82,80,61,96,28,60,32,58,82,44,34,93,21,1,55,80,49,97,21,99,55,27,20,95,16,78,48,32,32,53,53,2,57},new int[]{22,52,81,96,81,58,34,71,93,17,88,72,23,33,29,19,69,37,87,26,24,54,21,97,90,10,42,29,57,35,28,12,58,44,7,16,84,93,35,92,7,86,14,59,62,74,66,22,16},new int[]{99,75,43,97,98,97,83,20,10,19,12,10,71,56,11,80,97,61,38,17,54,45,25,31,65,39,20,73,43,66,1,55,51,5,12,14,60,96,40,9,42,42,33,25,78,9,91,44,83},new int[]{58,25,32,22,93,55,92,61,57,77,61,92,67,94,75,2,57,73,33,90,63,16,89,1,85,64,84,69,17,40,1,13,18,68,14,5,62,33,26,61,68,30,62,62,81,92,70,57,91},new int[]{36,7,65,74,77,41,32,14,33,30,73,6,10,75,20,89,12,22,76,14,48,54,36,61,55,14,2,2,61,6,25,67,23,73,95,28,25,99,65,66,79,43,40,80,23,49,99,8,7},new int[]{21,35,97,99,82,61,83,74,68,30,97,68,9,17,43,88,57,13,57,26,61,62,19,81,30,90,13,49,82,85,98,51,9,94,29,93,83,8,81,76,15,69,34,52,50,67,5,98,9},new int[]{88,5,27,84,47,62,45,66,23,98,61,93,43,35,30,67,10,56,34,65,6,70,43,16,63,65,5,25,27,42,55,26,16,90,28,92,30,77,89,45,19,13,75,23,14,74,98,23,40},new int[]{64,85,59,20,32,78,24,46,18,94,92,48,14,54,21,98,5,31,67,87,59,44,64,94,42,94,38,7,59,69,70,49,78,11,2,95,27,16,64,66,49,90,16,73,52,73,5,36,7},new int[]{61,96,29,67,30,40,31,48,91,6,62,29,9,54,84,11,19,74,5,87,70,95,18,21,15,59,95,74,6,24,97,60,28,92,74,23,79,46,37,14,48,78,71,36,82,60,54,79,63},new int[]{97,48,22,43,41,17,63,90,79,18,72,3,54,14,34,97,1,48,99,10,83,11,99,66,3,15,59,64,47,92,2,30,38,5,6,5,12,4,24,25,26,55,46,46,43,60,33,21,87},new int[]{37,12,21,13,33,70,76,61,30,37,82,16,45,71,1,53,28,53,44,67,39,10,51,14,79,6,39,80,82,99,48,25,97,33,83,75,67,65,40,25,57,32,46,4,23,80,75,22,33},new int[]{41,62,38,56,63,77,85,76,55,51,90,65,57,86,27,57,55,96,72,98,82,4,65,56,53,44,16,94,23,31,28,50,16,41,9,2,43,66,96,80,77,49,91,95,97,21,19,57,77},new int[]{60,19,99,64,35,33,67,85,87,48,60,45,75,68,68,15,92,72,88,98,15,23,60,91,14,2,99,43,71,16,86,28,32,71,86,2,72,7,38,48,85,86,99,82,73,2,42,42,81},new int[]{20,6,11,69,74,87,97,40,36,51,47,98,17,26,53,48,27,46,67,19,72,81,65,71,36,67,83,42,91,67,98,69,49,37,46,80,56,63,78,30,96,63,76,91,26,93,23,86,20},new int[]{46,80,31,67,21,51,39,63,69,20,23,96,42,73,3,27,91,74,80,24,87,9,2,6,99,71,79,21,87,29,13,69,42,1,20,43,1,99,40,7,35,52,34,50,69,29,91,71,1},new int[]{73,58,65,91,17,62,96,94,79,42,28,3,92,5,66,54,38,80,44,81,76,90,57,71,24,80,82,59,8,91,90,95,82,2,41,87,56,48,22,97,18,79,41,67,48,23,2,4,26},new int[]{19,49,74,86,53,6,62,1,16,52,7,88,35,78,68,15,57,23,83,78,91,86,11,4,58,96,40,58,88,98,67,38,2,87,40,84,56,72,35,49,67,96,95,44,31,65,76,18,88},new int[]{36,62,29,89,23,3,30,81,45,49,94,19,64,5,56,34,73,48,26,5,88,31,24,85,22,22,85,57,30,47,74,67,39,93,89,66,77,91,29,14,4,72,5,44,91,24,98,28,24},new int[]{5,13,82,55,81,30,83,86,49,82,90,15,92,30,28,84,4,68,15,34,75,87,99,43,99,75,61,63,2,52,52,15,40,28,95,96,98,55,50,22,29,72,86,12,87,38,2,12,55},new int[]{85,12,95,9,79,32,73,88,8,28,56,82,36,37,32,85,39,49,93,18,23,33,73,51,43,4,80,67,72,80,2,45,83,88,80,40,2,32,1,18,64,32,9,55,67,24,11,28,16},new int[]{93,12,68,90,4,75,66,31,56,50,67,89,98,1,69,39,52,95,36,67,12,61,80,72,11,14,91,82,54,8,33,4,30,84,94,91,89,54,6,5,78,51,14,34,41,89,39,18,20},new int[]{8,26,85,27,32,42,50,81,49,65,63,27,75,35,38,38,42,42,49,57,54,10,60,40,1,86,64,81,12,57,77,89,26,40,43,97,72,13,90,56,17,88,24,76,95,58,80,61,80},new int[]{94,28,67,97,51,88,94,92,39,66,77,74,40,13,19,6,18,9,81,68,54,50,70,11,55,42,90,11,72,67,2,82,66,26,76,37,90,36,16,78,66,21,7,11,56,44,54,93,57},new int[]{58,37,48,62,39,92,64,68,68,27,70,98,82,60,44,30,97,58,84,36,5,99,19,12,90,60,83,11,53,20,73,84,27,58,5,74,9,89,77,32,72,54,45,27,86,28,18,87,31},new int[]{41,34,7,5,21,6,45,35,87,3,33,38,87,80,89,16,89,71,8,3,69,19,7,86,90,50,89,6,5,61,86,95,58,22,57,75,32,17,58,41,22,80,42,79,8,46,48,3,77},new int[]{30,28,73,76,25,37,85,51,39,83,72,67,86,1,38,52,63,52,83,85,60,13,91,17,84,30,38,11,27,38,28,26,33,32,54,25,24,40,27,46,86,84,97,69,93,69,39,81,29},new int[]{75,86,31,65,15,83,74,9,13,45,90,6,44,2,29,48,12,87,67,50,11,5,45,74,47,6,80,95,87,94,84,89,99,69,63,67,47,34,12,27,69,86,68,28,71,45,98,2,9},new int[]{79,31,36,15,97,62,31,27,2,73,43,1,83,9,60,2,58,65,12,55,90,10,65,65,61,95,75,69,35,11,68,38,39,21,36,92,72,20,43,21,35,64,32,36,69,52,4,7,98},new int[]{84,71,24,21,57,73,19,84,28,32,34,16,38,81,75,4,56,40,50,40,82,49,48,6,96,5,79,45,16,17,59,56,79,35,8,99,61,27,78,87,20,57,70,88,23,76,2,27,32},new int[]{93,50,64,40,33,29,33,17,74,65,43,63,81,92,58,91,43,37,46,25,98,67,93,99,51,74,38,38,1,54,65,96,22,61,58,54,19,99,70,34,79,44,67,52,22,29,14,94,62},new int[]{15,93,14,67,22,97,87,7,84,7,17,32,79,77,56,62,58,58,3,89,96,80,1,67,20,92,86,62,56,53,65,56,78,45,79,96,18,48,38,22,80,75,71,73,1,42,72,75,69},new int[]{29,6,56,12,39,71,12,33,83,53,19,58,85,83,43,73,45,86,19,37,11,56,25,99,69,45,62,95,14,77,34,98,82,60,64,70,51,42,21,5,66,70,61,8,66,87,62,20,4},new int[]{15,94,56,20,24,9,21,41,13,5,64,46,78,71,70,59,76,51,16,51,96,42,11,68,93,52,98,73,10,72,63,36,96,45,6,6,91,66,73,64,38,69,98,61,78,74,63,71,20}}); param0.add(new int[][]{new int[]{64,81,37,36,97,10,34,45,63,13,25,44,97},new int[]{74,24,69,74,47,91,50,36,33,92,3,31,60},new int[]{29,44,45,42,21,32,28,85,47,99,94,47,17},new int[]{29,48,2,33,63,68,39,89,5,68,52,52,29},new int[]{37,8,20,41,70,36,32,5,20,68,22,97,31},new int[]{41,93,5,10,75,37,56,86,24,85,16,2,15},new int[]{41,63,49,26,94,66,29,70,60,65,40,11,52},new int[]{87,90,95,79,73,64,98,81,99,3,11,28,62},new int[]{48,28,46,64,55,83,2,96,75,16,11,3,55},new int[]{42,29,69,92,31,77,25,6,60,67,22,41,53},new int[]{60,39,55,96,30,71,89,2,8,63,59,97,28},new int[]{74,38,18,62,77,85,97,23,65,40,60,85,5},new int[]{99,18,38,29,26,60,36,82,29,31,63,13,94}}); List param1 = new ArrayList<>(); param1.add(5); param1.add(8); param1.add(33); param1.add(10); param1.add(0); param1.add(16); param1.add(2); param1.add(41); param1.add(34); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , n ) : diag1_left = 0 diag1_right = 0 diag2_left = 0 diag2_right = 0 i = 0 j = n - 1 while i < n : if ( i < n // 2 ) : diag1_left += mat [ i ] [ i ] diag2_left += mat [ j ] [ i ] elif ( i > n // 2 ) : diag1_right += mat [ i ] [ i ] diag2_right += mat [ j ] [ i ] i += 1 j -= 1 return ( diag1_left == diag2_right and diag2_right == diag2_left and diag1_right == diag2_left and diag2_right == mat [ n // 2 ] [ n // 2 ] ) ",,," if __name__ == '__main__': param = [ ([[2, 9, 1, 4, -2], [6, 7, 2, 11, 4], [ 4, 2, 9, 2, 4], [1, 9, 2, 4, 4 ], [ 0, 2, 4, 2, 5]],5,), ([[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],8,), ([[52, 88, 22, 69, 1, 83, 30, 39, 79, 35, 69, 70, 89, 11, 51, 63, 86, 34, 55, 78, 73, 20, 80, 58, 81, 17, 34, 75, 99, 62, 34, 72, 19, 97, 87, 66, 72, 93, 42, 51, 71, 49, 29, 95], [30, 99, 25, 68, 62, 38, 17, 74, 1, 18, 63, 46, 19, 50, 96, 54, 31, 97, 86, 65, 46, 35, 49, 81, 34, 29, 6, 1, 55, 27, 12, 4, 80, 52, 11, 52, 84, 26, 28, 72, 66, 90, 27, 97], [55, 71, 54, 46, 36, 21, 49, 34, 87, 34, 40, 7, 90, 52, 49, 81, 95, 89, 37, 62, 15, 2, 11, 96, 94, 17, 88, 45, 68, 61, 46, 32, 19, 67, 4, 25, 73, 21, 87, 93, 94, 89, 93, 98], [14, 22, 48, 51, 80, 11, 59, 14, 7, 69, 58, 40, 93, 81, 94, 25, 78, 42, 86, 44, 5, 28, 76, 60, 77, 21, 96, 49, 56, 57, 85, 61, 38, 73, 2, 3, 43, 74, 35, 73, 40, 96, 85, 58], [34, 25, 56, 32, 22, 89, 65, 21, 80, 96, 21, 28, 19, 14, 87, 24, 20, 32, 74, 52, 65, 95, 52, 58, 79, 95, 92, 10, 70, 15, 47, 91, 10, 21, 19, 68, 22, 63, 38, 15, 70, 75, 44, 30], [24, 86, 94, 46, 4, 6, 38, 26, 19, 2, 68, 69, 47, 99, 29, 64, 80, 12, 85, 73, 11, 8, 60, 26, 32, 39, 4, 98, 92, 89, 44, 99, 83, 35, 51, 51, 29, 78, 85, 36, 78, 60, 15, 51], [50, 94, 55, 12, 50, 62, 5, 27, 79, 90, 9, 35, 13, 44, 46, 97, 98, 68, 77, 74, 53, 1, 11, 50, 9, 38, 87, 13, 5, 25, 10, 5, 22, 42, 89, 20, 28, 21, 11, 93, 69, 37, 49, 69], [33, 45, 8, 6, 15, 15, 9, 61, 56, 5, 26, 87, 80, 57, 35, 10, 91, 80, 21, 12, 9, 16, 73, 93, 54, 23, 39, 88, 22, 55, 31, 74, 47, 27, 98, 48, 39, 88, 21, 15, 81, 45, 19, 53], [89, 55, 86, 49, 78, 61, 60, 92, 76, 91, 24, 86, 39, 61, 23, 72, 92, 93, 79, 39, 72, 92, 97, 11, 42, 25, 34, 22, 2, 51, 16, 11, 78, 96, 86, 69, 87, 62, 19, 29, 42, 23, 60, 73], [18, 95, 81, 55, 18, 27, 85, 1, 96, 14, 59, 78, 33, 36, 39, 76, 45, 25, 15, 20, 34, 58, 60, 78, 30, 13, 78, 93, 90, 67, 89, 91, 45, 40, 80, 38, 75, 93, 47, 88, 29, 34, 11, 20], [20, 73, 56, 23, 91, 88, 25, 89, 33, 31, 74, 79, 1, 54, 16, 85, 59, 66, 3, 15, 32, 50, 91, 99, 60, 88, 8, 7, 4, 94, 10, 60, 25, 42, 47, 96, 96, 32, 74, 73, 25, 89, 16, 49], [16, 94, 38, 5, 7, 77, 8, 33, 62, 74, 84, 32, 93, 1, 91, 20, 55, 63, 78, 79, 6, 52, 2, 93, 39, 32, 51, 69, 86, 92, 32, 93, 3, 62, 95, 13, 70, 21, 61, 14, 89, 71, 22, 32], [41, 32, 42, 52, 94, 81, 54, 62, 85, 90, 43, 3, 38, 81, 39, 70, 85, 45, 46, 13, 52, 9, 57, 69, 43, 7, 44, 44, 95, 68, 77, 44, 79, 40, 77, 43, 62, 43, 90, 19, 49, 65, 77, 25], [84, 41, 23, 58, 88, 43, 40, 30, 34, 10, 60, 1, 12, 46, 93, 75, 17, 84, 58, 38, 6, 62, 84, 74, 10, 95, 26, 58, 17, 53, 78, 5, 67, 20, 51, 46, 79, 67, 3, 23, 9, 11, 47, 49], [44, 13, 8, 63, 22, 38, 27, 26, 23, 95, 93, 65, 74, 47, 61, 46, 4, 31, 4, 29, 73, 79, 44, 3, 59, 79, 53, 11, 6, 47, 7, 68, 85, 1, 56, 87, 77, 43, 28, 29, 18, 87, 92, 73], [62, 6, 16, 1, 22, 46, 62, 23, 21, 51, 95, 38, 28, 44, 91, 39, 42, 42, 60, 57, 77, 96, 7, 51, 97, 77, 32, 7, 76, 40, 15, 59, 85, 12, 77, 42, 39, 63, 2, 29, 61, 29, 38, 7], [30, 87, 92, 56, 87, 36, 42, 93, 4, 84, 5, 46, 75, 2, 54, 88, 59, 33, 22, 47, 6, 24, 93, 49, 96, 94, 51, 41, 67, 89, 92, 79, 81, 2, 91, 78, 43, 32, 12, 23, 16, 44, 2, 7], [21, 58, 95, 23, 60, 25, 35, 99, 45, 7, 69, 32, 53, 69, 25, 95, 84, 86, 77, 2, 86, 61, 9, 51, 2, 45, 32, 72, 80, 97, 75, 32, 8, 96, 85, 89, 20, 65, 21, 7, 89, 9, 86, 2], [19, 60, 70, 59, 69, 45, 62, 10, 65, 26, 90, 60, 18, 59, 21, 46, 12, 78, 32, 39, 99, 81, 55, 55, 10, 35, 80, 6, 68, 62, 9, 29, 71, 80, 6, 44, 64, 67, 44, 78, 14, 9, 23, 57], [57, 15, 64, 7, 20, 64, 19, 6, 51, 39, 65, 71, 99, 25, 23, 89, 58, 11, 34, 31, 38, 46, 12, 9, 13, 64, 20, 59, 85, 22, 65, 60, 41, 81, 45, 4, 70, 45, 58, 83, 94, 23, 32, 63], [93, 8, 85, 81, 81, 85, 79, 91, 25, 33, 66, 16, 55, 36, 72, 80, 7, 69, 87, 8, 3, 35, 36, 79, 30, 15, 93, 68, 98, 87, 58, 99, 28, 95, 42, 97, 18, 5, 9, 84, 9, 18, 56, 15], [79, 78, 62, 35, 40, 51, 60, 56, 84, 75, 41, 54, 17, 25, 93, 87, 9, 56, 89, 23, 2, 45, 65, 38, 6, 48, 44, 79, 7, 66, 62, 30, 93, 76, 52, 98, 94, 36, 35, 66, 50, 3, 76, 4], [55, 52, 59, 71, 20, 19, 8, 67, 27, 79, 8, 18, 29, 46, 36, 3, 9, 10, 84, 66, 1, 91, 4, 48, 96, 18, 78, 45, 15, 51, 61, 4, 19, 88, 94, 77, 11, 28, 57, 75, 54, 65, 47, 4], [34, 76, 54, 88, 61, 96, 83, 93, 93, 83, 20, 3, 40, 69, 23, 69, 94, 32, 24, 51, 58, 42, 35, 32, 54, 45, 48, 86, 85, 92, 49, 34, 16, 11, 97, 19, 92, 29, 54, 53, 67, 82, 82, 76], [82, 32, 83, 56, 63, 4, 11, 3, 27, 80, 44, 18, 30, 88, 70, 47, 34, 76, 42, 23, 40, 15, 80, 57, 14, 79, 12, 35, 25, 78, 2, 18, 35, 9, 11, 90, 67, 69, 96, 74, 38, 70, 75, 81], [59, 66, 41, 24, 50, 5, 21, 6, 4, 9, 69, 68, 9, 18, 59, 43, 80, 66, 29, 48, 51, 42, 36, 76, 45, 98, 35, 6, 37, 36, 84, 16, 72, 22, 69, 69, 63, 75, 19, 81, 18, 73, 17, 41], [33, 84, 55, 82, 24, 77, 40, 28, 67, 75, 39, 21, 37, 2, 6, 52, 5, 47, 43, 96, 40, 11, 81, 14, 2, 39, 63, 63, 18, 97, 94, 79, 93, 90, 1, 17, 54, 39, 48, 66, 15, 22, 20, 93], [89, 43, 56, 24, 98, 43, 21, 48, 66, 16, 40, 21, 52, 8, 78, 55, 86, 82, 58, 5, 42, 30, 95, 9, 95, 95, 41, 51, 57, 73, 61, 6, 26, 74, 6, 53, 61, 33, 45, 94, 40, 24, 92, 45], [38, 29, 79, 8, 64, 87, 73, 51, 75, 6, 47, 49, 76, 98, 85, 32, 54, 36, 89, 99, 98, 19, 37, 17, 80, 16, 58, 44, 68, 49, 94, 51, 98, 5, 97, 58, 46, 55, 73, 17, 12, 24, 56, 55], [76, 79, 16, 87, 82, 22, 44, 95, 43, 79, 21, 8, 49, 6, 81, 47, 36, 92, 23, 31, 75, 62, 84, 96, 81, 57, 70, 65, 37, 68, 95, 75, 17, 7, 52, 35, 2, 40, 37, 57, 10, 76, 81, 46], [90, 5, 5, 27, 5, 61, 8, 31, 97, 21, 99, 21, 51, 79, 59, 2, 30, 58, 92, 81, 20, 40, 29, 5, 89, 10, 83, 61, 1, 47, 98, 57, 14, 25, 90, 21, 16, 74, 32, 45, 64, 84, 73, 60], [98, 95, 19, 47, 95, 64, 30, 47, 88, 33, 82, 21, 95, 63, 42, 61, 43, 68, 26, 33, 33, 49, 84, 41, 72, 36, 72, 95, 22, 47, 83, 20, 87, 24, 43, 88, 73, 16, 27, 45, 37, 13, 51, 2], [76, 97, 87, 59, 14, 49, 30, 98, 9, 79, 24, 41, 60, 89, 32, 47, 21, 42, 70, 89, 2, 31, 56, 30, 63, 15, 18, 32, 14, 62, 82, 99, 52, 22, 14, 78, 34, 86, 80, 56, 53, 49, 63, 16], [80, 40, 38, 18, 23, 48, 82, 46, 22, 54, 40, 30, 55, 56, 42, 42, 62, 82, 53, 82, 53, 64, 1, 79, 69, 27, 17, 63, 41, 58, 57, 96, 38, 90, 66, 92, 45, 23, 20, 36, 42, 22, 60, 11], [28, 45, 22, 81, 63, 31, 11, 36, 78, 35, 23, 29, 23, 16, 84, 89, 19, 90, 96, 63, 50, 85, 73, 43, 19, 85, 18, 6, 35, 14, 64, 9, 35, 2, 6, 99, 25, 73, 50, 95, 7, 63, 28, 2], [65, 59, 24, 62, 99, 71, 38, 93, 62, 65, 51, 94, 52, 96, 74, 98, 63, 11, 48, 54, 91, 50, 74, 38, 86, 88, 8, 6, 68, 69, 6, 32, 38, 57, 84, 64, 54, 14, 64, 50, 47, 54, 19, 75], [39, 65, 99, 83, 60, 33, 32, 36, 24, 43, 71, 71, 46, 47, 69, 14, 45, 52, 90, 50, 65, 77, 64, 23, 84, 71, 70, 59, 73, 92, 74, 54, 99, 71, 89, 94, 26, 44, 76, 13, 54, 40, 4, 53], [1, 6, 55, 66, 91, 18, 29, 53, 33, 3, 20, 4, 82, 8, 86, 86, 83, 28, 66, 73, 99, 86, 26, 34, 71, 94, 49, 89, 49, 73, 27, 65, 33, 72, 49, 63, 32, 19, 50, 22, 90, 67, 9, 35], [71, 79, 4, 37, 28, 9, 35, 25, 9, 61, 52, 97, 17, 76, 9, 54, 5, 63, 47, 90, 19, 99, 66, 45, 71, 73, 86, 33, 80, 43, 88, 72, 94, 26, 45, 35, 81, 53, 10, 41, 17, 71, 66, 11], [63, 67, 46, 20, 13, 87, 17, 93, 32, 99, 99, 98, 85, 16, 23, 11, 14, 67, 71, 45, 75, 33, 83, 45, 54, 51, 87, 23, 29, 6, 39, 5, 96, 40, 90, 78, 82, 21, 59, 89, 20, 24, 3, 86], [72, 57, 93, 71, 70, 70, 76, 63, 86, 47, 90, 89, 19, 99, 13, 89, 45, 32, 30, 85, 42, 72, 42, 7, 3, 37, 3, 18, 42, 9, 57, 24, 7, 97, 89, 42, 98, 58, 85, 56, 58, 18, 39, 50], [33, 28, 56, 25, 14, 55, 84, 84, 7, 4, 95, 30, 62, 57, 37, 55, 85, 65, 52, 3, 77, 7, 70, 70, 34, 96, 16, 8, 21, 11, 50, 87, 6, 15, 11, 27, 79, 45, 38, 4, 78, 45, 10, 54], [29, 12, 56, 40, 84, 37, 66, 20, 12, 38, 30, 47, 82, 74, 71, 42, 5, 48, 93, 99, 51, 12, 10, 37, 66, 67, 14, 47, 20, 52, 68, 26, 47, 79, 73, 3, 2, 41, 30, 37, 81, 3, 9, 8], [9, 17, 24, 72, 14, 54, 80, 18, 88, 39, 47, 27, 92, 71, 98, 91, 34, 19, 6, 30, 92, 12, 15, 39, 64, 64, 15, 58, 67, 1, 7, 9, 1, 5, 47, 10, 2, 23, 93, 56, 19, 38, 47, 84]],33,), ([[99, 52, 49, 71, 23, 50, 17, 48, 2, 69, 62], [85, 13, 61, 11, 88, 97, 27, 35, 18, 85, 68], [61, 41, 96, 43, 49, 11, 67, 51, 52, 85, 43], [58, 78, 70, 29, 31, 28, 50, 36, 92, 19, 67], [12, 88, 76, 24, 65, 92, 80, 21, 94, 98, 26], [35, 95, 80, 58, 42, 29, 29, 9, 78, 72, 2], [75, 2, 18, 69, 57, 71, 23, 19, 19, 58, 83], [49, 45, 28, 75, 50, 11, 55, 9, 14, 98, 93], [21, 48, 58, 69, 97, 9, 67, 78, 18, 12, 87], [78, 16, 37, 20, 20, 15, 25, 17, 12, 42, 39], [56, 53, 71, 72, 88, 47, 25, 85, 50, 33, 74]],10,), ([[29, 3, 39, 4, 37, 95, 6, 92, 10, 12, 66, 3, 65, 64, 35, 24, 47, 52, 34], [84, 80, 94, 25, 69, 29, 92, 64, 53, 58, 41, 87, 96, 51, 18, 41, 99, 61, 24], [47, 28, 36, 21, 56, 69, 26, 54, 87, 44, 33, 26, 22, 20, 2, 41, 54, 57, 18], [5, 96, 46, 75, 21, 22, 3, 9, 2, 28, 34, 53, 59, 10, 83, 93, 2, 48, 6], [44, 54, 71, 36, 8, 83, 10, 33, 91, 93, 19, 18, 51, 23, 1, 59, 3, 10, 71], [49, 56, 90, 16, 39, 96, 76, 44, 8, 8, 45, 11, 97, 25, 17, 95, 83, 55, 79], [56, 44, 53, 35, 39, 2, 98, 25, 38, 68, 80, 32, 79, 78, 41, 79, 71, 7, 72], [83, 18, 17, 82, 83, 77, 59, 11, 51, 7, 27, 59, 37, 5, 62, 72, 74, 90, 79], [55, 16, 93, 92, 74, 56, 51, 68, 46, 61, 78, 33, 55, 18, 12, 74, 21, 97, 78], [73, 26, 79, 21, 22, 55, 46, 41, 5, 44, 16, 35, 5, 62, 90, 26, 61, 51, 69], [56, 50, 36, 24, 79, 30, 69, 48, 22, 33, 69, 96, 50, 23, 10, 36, 17, 53, 91], [8, 44, 61, 6, 71, 90, 81, 37, 54, 23, 91, 57, 51, 58, 19, 27, 89, 25, 21], [25, 51, 71, 35, 70, 50, 15, 24, 49, 68, 7, 94, 81, 54, 38, 94, 45, 9, 55], [83, 52, 77, 49, 55, 83, 70, 76, 79, 3, 68, 38, 70, 49, 92, 8, 95, 85, 45], [29, 79, 49, 24, 21, 23, 95, 98, 28, 32, 22, 62, 67, 73, 6, 65, 22, 51, 68], [57, 72, 55, 42, 52, 61, 19, 1, 41, 63, 88, 48, 81, 32, 50, 14, 17, 96, 97], [30, 51, 98, 92, 62, 24, 63, 14, 34, 59, 65, 86, 33, 58, 18, 12, 74, 66, 2], [70, 84, 28, 42, 3, 48, 89, 87, 13, 57, 88, 3, 63, 38, 59, 28, 26, 84, 91], [65, 74, 74, 61, 57, 1, 32, 32, 27, 13, 17, 28, 89, 52, 36, 47, 66, 32, 32]],0,), ([[55, 73, 80, 89, 40, 28, 81, 31, 87, 31, 26, 4, 58, 79, 23, 69, 60, 43, 89, 94, 26, 67, 68, 55, 47, 82, 59, 75, 75, 16, 58], [89, 1, 90, 45, 94, 6, 91, 52, 19, 43, 19, 39, 32, 65, 89, 47, 13, 74, 82, 36, 86, 70, 27, 72, 24, 20, 86, 9, 39, 83, 1], [11, 74, 1, 91, 81, 44, 51, 17, 66, 23, 41, 59, 74, 94, 99, 25, 17, 19, 82, 82, 46, 35, 74, 23, 86, 44, 9, 32, 90, 93, 59], [42, 62, 19, 93, 35, 76, 8, 89, 91, 43, 45, 6, 13, 11, 70, 69, 7, 55, 55, 19, 6, 89, 9, 20, 25, 50, 72, 50, 38, 66, 57], [22, 56, 36, 51, 68, 1, 48, 33, 24, 49, 69, 58, 48, 57, 64, 99, 53, 60, 90, 43, 41, 26, 59, 49, 64, 5, 44, 18, 57, 89, 40], [46, 58, 85, 24, 28, 46, 68, 72, 54, 33, 67, 84, 35, 39, 47, 71, 91, 5, 37, 1, 86, 56, 7, 64, 8, 94, 64, 57, 28, 26, 34], [96, 22, 20, 14, 23, 67, 19, 78, 39, 37, 99, 1, 19, 15, 89, 1, 31, 52, 43, 46, 86, 50, 20, 62, 43, 5, 79, 66, 12, 57, 60], [55, 71, 66, 72, 73, 27, 28, 37, 79, 19, 94, 51, 13, 45, 6, 94, 1, 25, 99, 26, 13, 19, 10, 45, 71, 15, 87, 31, 8, 30, 98], [97, 1, 16, 11, 27, 86, 40, 83, 44, 70, 57, 48, 40, 39, 84, 3, 55, 1, 23, 67, 62, 34, 17, 48, 91, 53, 61, 87, 11, 15, 90], [11, 7, 47, 8, 5, 81, 87, 66, 91, 63, 21, 71, 90, 94, 12, 11, 54, 81, 10, 16, 15, 58, 79, 84, 4, 96, 22, 35, 14, 94, 31], [74, 70, 91, 11, 36, 74, 80, 24, 85, 40, 42, 87, 21, 96, 81, 51, 81, 55, 85, 4, 62, 87, 25, 96, 70, 14, 41, 57, 38, 62, 41], [45, 80, 96, 16, 19, 37, 85, 79, 61, 26, 94, 79, 64, 13, 91, 87, 34, 98, 23, 20, 54, 73, 58, 59, 20, 39, 78, 90, 91, 98, 93], [32, 41, 69, 68, 87, 21, 97, 24, 16, 32, 83, 26, 3, 99, 82, 7, 96, 88, 16, 53, 88, 4, 45, 32, 98, 83, 78, 58, 13, 22, 95], [44, 44, 30, 23, 12, 14, 36, 45, 72, 24, 3, 78, 51, 75, 55, 38, 92, 87, 82, 20, 97, 2, 26, 2, 67, 84, 74, 42, 85, 40, 9], [2, 28, 3, 16, 4, 23, 94, 77, 6, 74, 55, 81, 8, 73, 98, 81, 86, 64, 67, 41, 40, 93, 27, 39, 53, 40, 52, 37, 67, 19, 34], [78, 85, 66, 10, 52, 42, 60, 81, 2, 91, 1, 50, 36, 97, 22, 99, 98, 82, 36, 3, 44, 16, 11, 10, 51, 42, 85, 25, 99, 6, 44], [8, 34, 41, 1, 3, 52, 91, 77, 43, 47, 83, 19, 70, 47, 78, 5, 64, 45, 64, 45, 36, 9, 23, 32, 93, 45, 28, 52, 11, 19, 64], [65, 73, 57, 66, 4, 29, 4, 1, 92, 18, 13, 70, 49, 47, 86, 30, 27, 72, 28, 2, 20, 75, 78, 24, 77, 72, 44, 21, 22, 73, 58], [11, 80, 53, 9, 67, 52, 13, 1, 44, 75, 24, 5, 66, 81, 81, 20, 64, 15, 68, 54, 11, 23, 1, 42, 47, 68, 38, 2, 45, 27, 98], [77, 61, 82, 11, 69, 29, 25, 78, 54, 48, 46, 41, 41, 61, 11, 44, 32, 49, 6, 57, 6, 47, 63, 49, 22, 67, 19, 55, 34, 41, 7], [57, 16, 59, 38, 9, 77, 34, 46, 37, 43, 47, 6, 38, 61, 4, 5, 70, 60, 77, 88, 92, 77, 56, 82, 59, 7, 68, 31, 88, 86, 85], [48, 42, 90, 30, 51, 35, 62, 51, 87, 50, 30, 19, 96, 50, 54, 83, 86, 4, 12, 15, 15, 10, 61, 19, 53, 72, 57, 95, 9, 29, 7], [72, 17, 79, 16, 71, 83, 38, 89, 76, 96, 47, 10, 24, 50, 68, 43, 37, 45, 54, 43, 68, 37, 89, 41, 94, 1, 93, 16, 37, 37, 7], [40, 51, 64, 97, 22, 43, 62, 54, 27, 29, 16, 85, 11, 21, 9, 27, 86, 79, 23, 51, 93, 80, 3, 16, 8, 90, 42, 73, 35, 71, 72], [99, 48, 54, 36, 6, 71, 12, 59, 65, 50, 43, 43, 49, 89, 76, 55, 91, 87, 83, 85, 50, 21, 88, 13, 42, 15, 50, 1, 51, 34, 42], [62, 95, 32, 61, 93, 54, 74, 58, 85, 24, 27, 21, 18, 55, 68, 47, 54, 18, 73, 64, 49, 94, 35, 94, 39, 58, 57, 6, 78, 93, 96], [78, 20, 50, 9, 76, 14, 23, 48, 98, 80, 82, 56, 40, 97, 69, 39, 74, 86, 43, 97, 31, 70, 3, 4, 27, 89, 27, 47, 60, 36, 46], [61, 42, 7, 30, 50, 47, 93, 40, 5, 70, 58, 44, 71, 32, 79, 77, 82, 74, 40, 57, 11, 40, 47, 2, 91, 52, 72, 49, 59, 38, 16], [88, 87, 78, 27, 74, 28, 89, 66, 45, 33, 60, 50, 46, 35, 41, 58, 77, 55, 5, 5, 22, 34, 65, 59, 17, 51, 49, 9, 74, 15, 29], [53, 25, 85, 81, 91, 28, 23, 3, 33, 71, 69, 90, 17, 81, 67, 67, 34, 8, 45, 60, 56, 70, 22, 33, 50, 71, 83, 46, 52, 74, 87], [66, 21, 24, 48, 13, 64, 5, 18, 75, 37, 54, 32, 28, 86, 45, 28, 65, 70, 75, 42, 33, 16, 13, 21, 59, 47, 39, 88, 43, 27, 37]],16,), ([[76, 7, 58], [20, 79, 65], [74, 14, 79]],2,), ([[89, 95, 74, 37, 6, 6, 28, 78, 13, 13, 10, 80, 39, 99, 79, 23, 37, 8, 90, 60, 86, 5, 98, 27, 19, 43, 43, 35, 84, 55, 61, 47, 77, 56, 82, 18, 65, 96, 53, 89, 85, 91, 11, 1, 83, 96, 8, 19, 55], [16, 99, 66, 12, 93, 74, 62, 86, 98, 58, 21, 37, 5, 70, 32, 67, 10, 69, 88, 84, 62, 37, 95, 47, 81, 49, 24, 82, 26, 55, 7, 78, 41, 2, 30, 81, 20, 56, 74, 24, 12, 91, 15, 73, 82, 48, 61, 71, 28], [3, 16, 36, 4, 99, 9, 12, 74, 44, 66, 19, 13, 55, 97, 65, 92, 70, 3, 25, 52, 16, 43, 56, 68, 8, 80, 44, 38, 23, 6, 43, 44, 80, 80, 23, 16, 76, 9, 82, 9, 85, 58, 65, 59, 23, 69, 19, 35, 97], [55, 82, 40, 14, 84, 13, 53, 80, 95, 39, 99, 84, 65, 56, 40, 46, 77, 7, 45, 22, 7, 84, 52, 68, 70, 67, 3, 58, 67, 54, 9, 54, 80, 51, 16, 12, 20, 53, 31, 94, 21, 3, 21, 92, 28, 5, 71, 69, 73], [47, 85, 20, 38, 37, 58, 17, 42, 92, 95, 97, 32, 62, 96, 87, 21, 89, 33, 67, 6, 92, 66, 32, 64, 26, 62, 5, 11, 74, 79, 82, 49, 78, 92, 94, 62, 60, 77, 84, 2, 89, 59, 76, 25, 68, 42, 76, 71, 55], [38, 96, 43, 70, 53, 91, 99, 21, 20, 19, 33, 63, 68, 60, 19, 28, 22, 51, 88, 63, 62, 94, 29, 74, 32, 73, 25, 16, 15, 59, 48, 18, 23, 55, 42, 3, 71, 52, 11, 55, 88, 99, 25, 92, 76, 87, 81, 41, 37], [82, 55, 9, 99, 36, 57, 63, 82, 20, 85, 47, 20, 6, 73, 93, 29, 77, 91, 49, 6, 39, 32, 49, 43, 28, 45, 65, 50, 54, 51, 43, 64, 95, 30, 82, 93, 42, 38, 87, 86, 66, 69, 15, 61, 96, 6, 78, 24, 85], [14, 12, 55, 68, 44, 85, 81, 93, 51, 80, 82, 38, 41, 44, 75, 96, 92, 16, 98, 50, 94, 38, 86, 5, 9, 77, 39, 87, 27, 32, 64, 95, 33, 90, 18, 76, 67, 5, 78, 59, 76, 4, 16, 75, 48, 66, 77, 8, 44], [21, 26, 35, 15, 40, 30, 66, 80, 13, 1, 43, 28, 1, 40, 34, 13, 61, 66, 4, 89, 98, 13, 36, 96, 61, 58, 85, 90, 15, 93, 90, 85, 12, 76, 69, 61, 42, 90, 32, 2, 8, 91, 54, 8, 88, 13, 29, 13, 58], [63, 87, 47, 79, 88, 87, 74, 38, 69, 69, 95, 40, 1, 2, 29, 7, 93, 57, 55, 73, 36, 7, 92, 10, 80, 74, 39, 58, 90, 98, 98, 40, 14, 82, 1, 17, 49, 86, 16, 7, 15, 21, 66, 59, 48, 89, 73, 84, 50], [10, 52, 85, 68, 30, 34, 94, 78, 86, 65, 60, 8, 75, 65, 69, 57, 45, 49, 74, 62, 39, 77, 21, 53, 45, 97, 28, 53, 9, 75, 93, 71, 61, 27, 22, 95, 30, 92, 84, 15, 15, 53, 76, 81, 23, 70, 16, 91, 87], [65, 45, 7, 45, 39, 50, 49, 48, 49, 40, 39, 57, 82, 63, 56, 86, 2, 26, 96, 23, 18, 83, 88, 68, 60, 2, 94, 49, 38, 31, 40, 80, 53, 64, 33, 58, 50, 64, 3, 61, 82, 10, 66, 51, 94, 30, 25, 43, 88], [64, 59, 62, 99, 10, 64, 94, 60, 90, 99, 88, 20, 49, 99, 74, 27, 51, 57, 79, 79, 37, 99, 3, 29, 68, 47, 80, 69, 21, 42, 21, 2, 78, 69, 7, 75, 35, 30, 44, 46, 55, 1, 54, 80, 1, 63, 55, 86, 77], [27, 15, 81, 9, 69, 59, 23, 11, 24, 72, 98, 54, 31, 22, 14, 5, 17, 82, 83, 71, 90, 89, 82, 44, 79, 93, 49, 65, 4, 9, 36, 51, 32, 88, 18, 15, 20, 58, 40, 66, 89, 13, 91, 13, 62, 28, 46, 15, 93], [85, 44, 95, 23, 67, 99, 78, 66, 50, 13, 2, 76, 91, 34, 40, 69, 61, 25, 75, 77, 63, 28, 85, 56, 26, 27, 26, 15, 50, 6, 68, 4, 30, 77, 9, 42, 14, 92, 40, 3, 41, 93, 33, 79, 60, 64, 62, 79, 7], [76, 50, 39, 71, 47, 70, 26, 58, 73, 51, 88, 52, 94, 16, 48, 27, 33, 23, 45, 83, 83, 22, 42, 33, 10, 47, 96, 79, 39, 46, 72, 51, 25, 82, 15, 58, 59, 26, 41, 44, 85, 22, 98, 37, 14, 4, 24, 66, 63], [65, 66, 13, 27, 81, 17, 69, 88, 57, 72, 73, 18, 16, 51, 96, 40, 39, 56, 54, 44, 46, 32, 48, 61, 66, 38, 43, 4, 5, 58, 37, 26, 9, 15, 88, 88, 99, 89, 26, 63, 87, 70, 27, 54, 83, 31, 32, 2, 18], [28, 71, 87, 88, 92, 25, 39, 49, 4, 52, 83, 68, 57, 13, 65, 63, 98, 71, 25, 23, 30, 61, 7, 54, 17, 97, 60, 66, 38, 13, 52, 52, 32, 86, 9, 17, 82, 40, 91, 75, 54, 54, 28, 72, 50, 18, 13, 33, 15], [86, 38, 94, 6, 45, 59, 98, 83, 97, 78, 48, 41, 83, 79, 74, 55, 61, 2, 2, 85, 76, 10, 76, 39, 2, 65, 66, 87, 92, 81, 52, 85, 44, 34, 73, 81, 45, 32, 5, 78, 89, 86, 63, 69, 54, 38, 9, 61, 95], [21, 36, 1, 22, 87, 87, 15, 46, 65, 6, 40, 35, 81, 61, 23, 20, 28, 37, 82, 7, 49, 84, 24, 80, 13, 92, 7, 15, 87, 23, 95, 69, 91, 60, 10, 51, 64, 71, 56, 32, 23, 54, 73, 93, 91, 85, 70, 90, 84], [61, 79, 20, 53, 15, 29, 70, 80, 65, 62, 70, 16, 54, 97, 7, 60, 10, 53, 8, 85, 90, 37, 82, 4, 84, 83, 97, 23, 9, 38, 45, 45, 18, 46, 2, 48, 17, 16, 45, 48, 24, 95, 65, 92, 33, 4, 1, 33, 74], [62, 3, 45, 21, 64, 73, 57, 40, 62, 43, 88, 46, 72, 24, 24, 10, 99, 68, 57, 44, 73, 75, 48, 77, 27, 30, 46, 12, 60, 19, 68, 54, 34, 87, 90, 7, 82, 42, 68, 53, 8, 22, 26, 77, 63, 46, 81, 44, 62], [36, 41, 79, 82, 27, 70, 98, 41, 5, 57, 76, 29, 12, 25, 34, 75, 87, 24, 82, 63, 63, 10, 5, 95, 89, 53, 81, 28, 65, 45, 66, 49, 40, 66, 91, 8, 27, 17, 68, 44, 31, 5, 60, 89, 92, 19, 42, 23, 77], [17, 94, 58, 87, 49, 3, 77, 96, 45, 35, 2, 47, 3, 29, 74, 20, 34, 79, 40, 65, 90, 63, 56, 32, 66, 96, 41, 29, 84, 87, 51, 12, 44, 10, 83, 74, 83, 90, 88, 9, 29, 29, 92, 61, 64, 3, 87, 4, 55], [14, 77, 28, 63, 39, 64, 60, 20, 28, 96, 14, 77, 75, 58, 39, 58, 15, 73, 3, 5, 92, 42, 15, 3, 35, 7, 94, 24, 31, 78, 80, 4, 3, 99, 9, 68, 83, 88, 60, 11, 79, 36, 95, 72, 2, 50, 3, 67, 85], [62, 76, 14, 23, 77, 16, 81, 18, 13, 56, 90, 45, 40, 31, 81, 32, 1, 35, 36, 83, 92, 66, 29, 43, 29, 43, 19, 64, 92, 98, 31, 19, 96, 29, 73, 7, 58, 76, 60, 51, 95, 82, 92, 50, 21, 9, 34, 34, 47], [24, 80, 28, 46, 51, 99, 6, 63, 53, 64, 52, 60, 41, 11, 4, 14, 13, 15, 8, 88, 11, 99, 89, 23, 7, 69, 32, 92, 44, 3, 94, 44, 69, 51, 61, 51, 33, 20, 30, 44, 86, 86, 29, 21, 82, 53, 11, 10, 35], [26, 44, 4, 74, 57, 39, 80, 41, 94, 67, 98, 89, 36, 4, 74, 13, 70, 7, 28, 59, 37, 15, 30, 74, 12, 81, 30, 1, 36, 88, 21, 32, 63, 82, 13, 37, 44, 21, 18, 46, 47, 26, 5, 5, 31, 28, 77, 75, 65], [88, 13, 18, 24, 29, 28, 45, 86, 84, 11, 51, 59, 84, 13, 47, 88, 43, 24, 48, 63, 17, 69, 54, 94, 14, 15, 73, 78, 10, 22, 95, 13, 81, 65, 14, 44, 39, 35, 65, 27, 45, 57, 22, 34, 9, 50, 54, 58, 96], [62, 38, 84, 27, 64, 3, 11, 24, 29, 69, 97, 8, 19, 68, 99, 94, 69, 48, 40, 67, 16, 64, 8, 5, 99, 72, 25, 53, 49, 72, 21, 51, 46, 9, 64, 96, 77, 23, 60, 59, 8, 64, 99, 54, 92, 15, 52, 93, 51], [4, 34, 24, 21, 2, 7, 56, 75, 76, 68, 35, 26, 18, 64, 56, 80, 55, 12, 37, 52, 19, 15, 86, 84, 52, 77, 87, 95, 26, 45, 96, 21, 81, 93, 53, 29, 48, 86, 19, 54, 78, 87, 2, 32, 62, 97, 7, 98, 68], [87, 84, 22, 29, 3, 22, 84, 89, 98, 53, 93, 57, 10, 40, 20, 87, 11, 8, 93, 36, 25, 39, 98, 96, 62, 87, 21, 19, 25, 87, 83, 5, 83, 99, 12, 25, 5, 76, 27, 4, 83, 45, 47, 88, 28, 97, 35, 16, 12], [80, 75, 43, 28, 87, 81, 19, 75, 68, 74, 55, 83, 36, 62, 39, 41, 60, 86, 66, 59, 97, 40, 91, 19, 55, 46, 4, 83, 62, 25, 63, 70, 13, 86, 4, 2, 67, 30, 4, 48, 43, 93, 45, 97, 13, 47, 96, 28, 37], [28, 27, 89, 30, 6, 94, 9, 6, 29, 87, 70, 86, 66, 95, 53, 70, 5, 20, 12, 8, 58, 49, 64, 50, 97, 39, 40, 31, 3, 83, 72, 30, 95, 29, 70, 56, 66, 87, 63, 30, 53, 46, 9, 7, 63, 47, 44, 49, 79], [79, 85, 62, 59, 78, 75, 75, 84, 13, 30, 84, 43, 51, 8, 37, 97, 90, 64, 39, 8, 62, 82, 39, 14, 52, 82, 57, 21, 23, 4, 74, 43, 11, 84, 19, 65, 95, 2, 49, 69, 34, 4, 91, 39, 49, 3, 26, 41, 65], [16, 58, 35, 83, 16, 33, 31, 22, 61, 84, 64, 70, 35, 39, 3, 96, 13, 14, 41, 8, 19, 14, 75, 50, 99, 61, 36, 67, 89, 77, 80, 92, 45, 91, 74, 82, 72, 7, 22, 9, 60, 42, 59, 40, 29, 55, 64, 42, 29], [92, 21, 97, 63, 63, 90, 38, 79, 66, 12, 33, 79, 1, 97, 68, 28, 62, 78, 59, 49, 45, 76, 6, 20, 85, 16, 12, 52, 20, 58, 45, 97, 2, 34, 26, 33, 42, 94, 65, 8, 65, 10, 32, 51, 57, 40, 66, 31, 63], [68, 56, 12, 31, 23, 33, 8, 62, 80, 15, 41, 52, 26, 78, 12, 27, 95, 68, 30, 4, 54, 95, 34, 68, 84, 56, 18, 47, 72, 60, 59, 2, 73, 16, 86, 58, 12, 5, 39, 15, 72, 88, 19, 82, 85, 49, 39, 78, 15], [55, 67, 56, 45, 75, 57, 67, 94, 6, 70, 31, 22, 85, 38, 58, 70, 29, 56, 11, 48, 86, 60, 51, 39, 6, 30, 89, 1, 86, 9, 45, 8, 34, 80, 83, 8, 12, 43, 56, 31, 42, 33, 19, 91, 88, 92, 55, 4, 12], [87, 84, 28, 58, 48, 1, 75, 44, 63, 95, 38, 9, 6, 70, 52, 67, 96, 99, 16, 2, 36, 71, 35, 30, 45, 46, 93, 65, 1, 57, 71, 67, 31, 25, 47, 56, 88, 1, 95, 37, 75, 67, 12, 20, 30, 74, 64, 79, 85], [64, 18, 32, 19, 94, 33, 62, 22, 29, 88, 4, 50, 76, 4, 5, 83, 39, 57, 31, 7, 12, 10, 29, 85, 13, 87, 70, 31, 9, 51, 88, 16, 59, 58, 11, 36, 1, 21, 44, 37, 6, 14, 93, 1, 8, 44, 83, 87, 75], [27, 36, 42, 20, 8, 46, 52, 26, 35, 60, 3, 4, 93, 62, 64, 50, 92, 19, 43, 92, 82, 14, 14, 54, 29, 3, 98, 73, 5, 93, 5, 45, 64, 64, 43, 43, 51, 13, 90, 73, 68, 95, 69, 7, 92, 78, 88, 42, 5], [47, 48, 98, 92, 47, 8, 21, 88, 24, 13, 15, 89, 53, 92, 72, 31, 71, 51, 47, 39, 81, 57, 50, 57, 35, 86, 7, 53, 10, 92, 39, 58, 93, 35, 59, 22, 9, 8, 94, 94, 58, 95, 22, 95, 40, 28, 46, 69, 81], [52, 11, 22, 47, 89, 13, 45, 75, 69, 78, 22, 67, 35, 32, 38, 58, 40, 88, 92, 21, 49, 97, 92, 39, 61, 10, 40, 58, 89, 45, 17, 68, 10, 62, 89, 32, 72, 42, 45, 76, 21, 27, 30, 74, 85, 1, 9, 3, 53], [42, 19, 6, 7, 43, 80, 36, 68, 82, 96, 96, 82, 39, 43, 37, 28, 50, 39, 2, 37, 66, 19, 69, 44, 13, 22, 7, 2, 62, 78, 89, 90, 5, 20, 54, 76, 63, 36, 95, 81, 16, 57, 64, 10, 99, 97, 99, 51, 27], [7, 91, 41, 76, 97, 13, 66, 3, 11, 5, 60, 2, 92, 77, 99, 64, 13, 54, 12, 18, 18, 17, 39, 86, 13, 45, 19, 88, 19, 21, 24, 30, 92, 48, 35, 59, 17, 48, 98, 55, 9, 77, 14, 26, 52, 85, 44, 84, 11], [51, 42, 62, 35, 64, 95, 18, 14, 49, 69, 17, 21, 14, 3, 31, 89, 47, 44, 17, 90, 81, 56, 83, 27, 71, 90, 69, 2, 80, 62, 75, 87, 99, 6, 65, 97, 18, 55, 67, 57, 19, 74, 84, 11, 96, 84, 55, 96, 37], [86, 4, 13, 70, 93, 58, 2, 60, 89, 32, 63, 60, 26, 90, 22, 74, 87, 4, 16, 63, 42, 33, 13, 46, 13, 33, 14, 8, 90, 86, 46, 1, 59, 60, 49, 80, 93, 61, 23, 5, 85, 50, 36, 20, 43, 8, 90, 41, 25], [7, 86, 61, 33, 69, 38, 12, 44, 53, 14, 71, 92, 52, 52, 46, 80, 41, 2, 49, 95, 78, 28, 32, 92, 76, 77, 22, 42, 29, 94, 79, 68, 33, 46, 9, 38, 80, 26, 43, 53, 27, 11, 26, 78, 57, 1, 11, 30, 88]],41,), ([[4, 86, 72, 80, 33, 33, 74, 66, 4, 87, 51, 27, 33, 97, 84, 77, 75, 83, 32, 67, 77, 28, 86, 57, 19, 31, 84, 53, 88, 32, 9, 51, 83, 23, 25, 97, 46, 44, 66, 67, 28, 99, 78, 24, 56, 50, 3, 23, 34], [9, 82, 59, 66, 22, 35, 31, 90, 78, 48, 53, 92, 75, 32, 85, 87, 88, 12, 62, 3, 6, 12, 53, 20, 6, 84, 14, 56, 41, 49, 65, 84, 86, 95, 31, 28, 12, 16, 97, 35, 44, 68, 10, 98, 3, 31, 52, 95, 65], [5, 5, 66, 15, 65, 21, 71, 11, 90, 42, 66, 94, 61, 60, 14, 5, 31, 48, 32, 57, 34, 74, 95, 27, 82, 5, 17, 75, 69, 56, 38, 54, 48, 85, 88, 94, 80, 49, 41, 22, 57, 66, 19, 2, 75, 33, 73, 59, 89], [6, 11, 27, 72, 45, 31, 91, 63, 44, 41, 47, 69, 79, 2, 15, 95, 20, 3, 39, 74, 90, 10, 40, 13, 85, 98, 44, 32, 73, 30, 1, 53, 76, 44, 35, 88, 40, 45, 60, 63, 10, 47, 24, 57, 18, 57, 72, 46, 43], [77, 16, 14, 9, 73, 69, 61, 11, 19, 64, 38, 10, 16, 93, 69, 82, 42, 44, 53, 35, 36, 22, 24, 76, 12, 35, 50, 83, 78, 87, 40, 22, 47, 75, 66, 10, 43, 69, 94, 85, 97, 25, 47, 7, 28, 80, 45, 67, 83], [12, 83, 11, 3, 61, 66, 56, 26, 86, 81, 34, 55, 79, 76, 16, 80, 39, 6, 72, 52, 25, 56, 83, 19, 76, 73, 93, 27, 5, 26, 30, 78, 97, 35, 75, 53, 68, 33, 70, 28, 74, 36, 49, 90, 94, 86, 53, 69, 2], [97, 80, 71, 64, 21, 35, 46, 86, 48, 22, 6, 33, 39, 43, 25, 18, 41, 35, 24, 55, 40, 87, 97, 29, 10, 79, 10, 90, 64, 29, 98, 18, 2, 25, 85, 51, 95, 22, 9, 91, 89, 89, 91, 74, 94, 4, 21, 30, 33], [43, 90, 2, 87, 31, 4, 47, 84, 89, 45, 65, 66, 6, 7, 51, 68, 18, 41, 69, 25, 56, 1, 98, 55, 3, 54, 81, 32, 88, 2, 65, 98, 8, 58, 53, 44, 73, 28, 19, 56, 20, 71, 56, 35, 19, 81, 63, 82, 7], [27, 39, 30, 23, 84, 23, 90, 47, 78, 48, 95, 91, 63, 9, 23, 63, 74, 47, 87, 74, 66, 37, 38, 1, 48, 82, 35, 71, 86, 53, 25, 42, 23, 9, 27, 75, 51, 91, 92, 57, 82, 36, 34, 13, 55, 46, 52, 94, 28], [86, 88, 30, 45, 38, 20, 70, 97, 47, 59, 79, 79, 96, 14, 42, 61, 59, 8, 57, 22, 84, 88, 21, 28, 49, 23, 88, 54, 23, 68, 46, 68, 94, 28, 95, 97, 50, 83, 63, 10, 89, 37, 13, 70, 30, 87, 80, 72, 80], [11, 1, 86, 18, 11, 84, 10, 48, 61, 10, 60, 22, 75, 99, 9, 15, 83, 37, 70, 44, 69, 3, 10, 77, 4, 56, 40, 33, 98, 33, 60, 21, 69, 45, 57, 77, 40, 81, 64, 10, 74, 66, 85, 65, 30, 82, 35, 53, 39], [22, 67, 70, 80, 67, 75, 17, 19, 60, 72, 78, 90, 89, 51, 48, 57, 10, 32, 79, 68, 28, 4, 61, 77, 12, 15, 29, 87, 13, 38, 58, 35, 40, 76, 94, 5, 2, 30, 99, 10, 73, 81, 38, 59, 94, 35, 71, 12, 42], [98, 49, 67, 33, 13, 75, 20, 95, 33, 34, 50, 50, 9, 7, 9, 26, 2, 5, 66, 10, 31, 33, 6, 14, 78, 15, 97, 95, 81, 43, 79, 20, 21, 64, 29, 59, 73, 64, 93, 44, 34, 47, 9, 60, 30, 17, 52, 59, 4], [40, 96, 96, 7, 38, 32, 69, 67, 56, 20, 64, 17, 16, 11, 13, 18, 14, 34, 76, 86, 85, 26, 42, 61, 39, 2, 57, 50, 16, 62, 98, 11, 83, 63, 30, 54, 71, 27, 86, 64, 81, 79, 9, 76, 72, 2, 49, 48, 55], [80, 67, 31, 26, 66, 30, 77, 78, 1, 96, 70, 22, 75, 87, 54, 14, 14, 84, 71, 19, 26, 59, 22, 6, 63, 77, 74, 54, 19, 95, 10, 37, 77, 17, 55, 5, 21, 39, 20, 71, 15, 79, 53, 87, 33, 44, 66, 50, 32], [79, 71, 73, 55, 28, 86, 3, 53, 42, 2, 22, 25, 89, 32, 7, 62, 31, 63, 37, 68, 97, 79, 9, 70, 46, 95, 34, 60, 13, 36, 96, 86, 48, 93, 75, 6, 5, 65, 50, 74, 74, 24, 7, 86, 58, 21, 86, 33, 44], [25, 95, 80, 15, 29, 83, 52, 17, 90, 36, 35, 40, 23, 73, 34, 58, 82, 80, 61, 96, 28, 60, 32, 58, 82, 44, 34, 93, 21, 1, 55, 80, 49, 97, 21, 99, 55, 27, 20, 95, 16, 78, 48, 32, 32, 53, 53, 2, 57], [22, 52, 81, 96, 81, 58, 34, 71, 93, 17, 88, 72, 23, 33, 29, 19, 69, 37, 87, 26, 24, 54, 21, 97, 90, 10, 42, 29, 57, 35, 28, 12, 58, 44, 7, 16, 84, 93, 35, 92, 7, 86, 14, 59, 62, 74, 66, 22, 16], [99, 75, 43, 97, 98, 97, 83, 20, 10, 19, 12, 10, 71, 56, 11, 80, 97, 61, 38, 17, 54, 45, 25, 31, 65, 39, 20, 73, 43, 66, 1, 55, 51, 5, 12, 14, 60, 96, 40, 9, 42, 42, 33, 25, 78, 9, 91, 44, 83], [58, 25, 32, 22, 93, 55, 92, 61, 57, 77, 61, 92, 67, 94, 75, 2, 57, 73, 33, 90, 63, 16, 89, 1, 85, 64, 84, 69, 17, 40, 1, 13, 18, 68, 14, 5, 62, 33, 26, 61, 68, 30, 62, 62, 81, 92, 70, 57, 91], [36, 7, 65, 74, 77, 41, 32, 14, 33, 30, 73, 6, 10, 75, 20, 89, 12, 22, 76, 14, 48, 54, 36, 61, 55, 14, 2, 2, 61, 6, 25, 67, 23, 73, 95, 28, 25, 99, 65, 66, 79, 43, 40, 80, 23, 49, 99, 8, 7], [21, 35, 97, 99, 82, 61, 83, 74, 68, 30, 97, 68, 9, 17, 43, 88, 57, 13, 57, 26, 61, 62, 19, 81, 30, 90, 13, 49, 82, 85, 98, 51, 9, 94, 29, 93, 83, 8, 81, 76, 15, 69, 34, 52, 50, 67, 5, 98, 9], [88, 5, 27, 84, 47, 62, 45, 66, 23, 98, 61, 93, 43, 35, 30, 67, 10, 56, 34, 65, 6, 70, 43, 16, 63, 65, 5, 25, 27, 42, 55, 26, 16, 90, 28, 92, 30, 77, 89, 45, 19, 13, 75, 23, 14, 74, 98, 23, 40], [64, 85, 59, 20, 32, 78, 24, 46, 18, 94, 92, 48, 14, 54, 21, 98, 5, 31, 67, 87, 59, 44, 64, 94, 42, 94, 38, 7, 59, 69, 70, 49, 78, 11, 2, 95, 27, 16, 64, 66, 49, 90, 16, 73, 52, 73, 5, 36, 7], [61, 96, 29, 67, 30, 40, 31, 48, 91, 6, 62, 29, 9, 54, 84, 11, 19, 74, 5, 87, 70, 95, 18, 21, 15, 59, 95, 74, 6, 24, 97, 60, 28, 92, 74, 23, 79, 46, 37, 14, 48, 78, 71, 36, 82, 60, 54, 79, 63], [97, 48, 22, 43, 41, 17, 63, 90, 79, 18, 72, 3, 54, 14, 34, 97, 1, 48, 99, 10, 83, 11, 99, 66, 3, 15, 59, 64, 47, 92, 2, 30, 38, 5, 6, 5, 12, 4, 24, 25, 26, 55, 46, 46, 43, 60, 33, 21, 87], [37, 12, 21, 13, 33, 70, 76, 61, 30, 37, 82, 16, 45, 71, 1, 53, 28, 53, 44, 67, 39, 10, 51, 14, 79, 6, 39, 80, 82, 99, 48, 25, 97, 33, 83, 75, 67, 65, 40, 25, 57, 32, 46, 4, 23, 80, 75, 22, 33], [41, 62, 38, 56, 63, 77, 85, 76, 55, 51, 90, 65, 57, 86, 27, 57, 55, 96, 72, 98, 82, 4, 65, 56, 53, 44, 16, 94, 23, 31, 28, 50, 16, 41, 9, 2, 43, 66, 96, 80, 77, 49, 91, 95, 97, 21, 19, 57, 77], [60, 19, 99, 64, 35, 33, 67, 85, 87, 48, 60, 45, 75, 68, 68, 15, 92, 72, 88, 98, 15, 23, 60, 91, 14, 2, 99, 43, 71, 16, 86, 28, 32, 71, 86, 2, 72, 7, 38, 48, 85, 86, 99, 82, 73, 2, 42, 42, 81], [20, 6, 11, 69, 74, 87, 97, 40, 36, 51, 47, 98, 17, 26, 53, 48, 27, 46, 67, 19, 72, 81, 65, 71, 36, 67, 83, 42, 91, 67, 98, 69, 49, 37, 46, 80, 56, 63, 78, 30, 96, 63, 76, 91, 26, 93, 23, 86, 20], [46, 80, 31, 67, 21, 51, 39, 63, 69, 20, 23, 96, 42, 73, 3, 27, 91, 74, 80, 24, 87, 9, 2, 6, 99, 71, 79, 21, 87, 29, 13, 69, 42, 1, 20, 43, 1, 99, 40, 7, 35, 52, 34, 50, 69, 29, 91, 71, 1], [73, 58, 65, 91, 17, 62, 96, 94, 79, 42, 28, 3, 92, 5, 66, 54, 38, 80, 44, 81, 76, 90, 57, 71, 24, 80, 82, 59, 8, 91, 90, 95, 82, 2, 41, 87, 56, 48, 22, 97, 18, 79, 41, 67, 48, 23, 2, 4, 26], [19, 49, 74, 86, 53, 6, 62, 1, 16, 52, 7, 88, 35, 78, 68, 15, 57, 23, 83, 78, 91, 86, 11, 4, 58, 96, 40, 58, 88, 98, 67, 38, 2, 87, 40, 84, 56, 72, 35, 49, 67, 96, 95, 44, 31, 65, 76, 18, 88], [36, 62, 29, 89, 23, 3, 30, 81, 45, 49, 94, 19, 64, 5, 56, 34, 73, 48, 26, 5, 88, 31, 24, 85, 22, 22, 85, 57, 30, 47, 74, 67, 39, 93, 89, 66, 77, 91, 29, 14, 4, 72, 5, 44, 91, 24, 98, 28, 24], [5, 13, 82, 55, 81, 30, 83, 86, 49, 82, 90, 15, 92, 30, 28, 84, 4, 68, 15, 34, 75, 87, 99, 43, 99, 75, 61, 63, 2, 52, 52, 15, 40, 28, 95, 96, 98, 55, 50, 22, 29, 72, 86, 12, 87, 38, 2, 12, 55], [85, 12, 95, 9, 79, 32, 73, 88, 8, 28, 56, 82, 36, 37, 32, 85, 39, 49, 93, 18, 23, 33, 73, 51, 43, 4, 80, 67, 72, 80, 2, 45, 83, 88, 80, 40, 2, 32, 1, 18, 64, 32, 9, 55, 67, 24, 11, 28, 16], [93, 12, 68, 90, 4, 75, 66, 31, 56, 50, 67, 89, 98, 1, 69, 39, 52, 95, 36, 67, 12, 61, 80, 72, 11, 14, 91, 82, 54, 8, 33, 4, 30, 84, 94, 91, 89, 54, 6, 5, 78, 51, 14, 34, 41, 89, 39, 18, 20], [8, 26, 85, 27, 32, 42, 50, 81, 49, 65, 63, 27, 75, 35, 38, 38, 42, 42, 49, 57, 54, 10, 60, 40, 1, 86, 64, 81, 12, 57, 77, 89, 26, 40, 43, 97, 72, 13, 90, 56, 17, 88, 24, 76, 95, 58, 80, 61, 80], [94, 28, 67, 97, 51, 88, 94, 92, 39, 66, 77, 74, 40, 13, 19, 6, 18, 9, 81, 68, 54, 50, 70, 11, 55, 42, 90, 11, 72, 67, 2, 82, 66, 26, 76, 37, 90, 36, 16, 78, 66, 21, 7, 11, 56, 44, 54, 93, 57], [58, 37, 48, 62, 39, 92, 64, 68, 68, 27, 70, 98, 82, 60, 44, 30, 97, 58, 84, 36, 5, 99, 19, 12, 90, 60, 83, 11, 53, 20, 73, 84, 27, 58, 5, 74, 9, 89, 77, 32, 72, 54, 45, 27, 86, 28, 18, 87, 31], [41, 34, 7, 5, 21, 6, 45, 35, 87, 3, 33, 38, 87, 80, 89, 16, 89, 71, 8, 3, 69, 19, 7, 86, 90, 50, 89, 6, 5, 61, 86, 95, 58, 22, 57, 75, 32, 17, 58, 41, 22, 80, 42, 79, 8, 46, 48, 3, 77], [30, 28, 73, 76, 25, 37, 85, 51, 39, 83, 72, 67, 86, 1, 38, 52, 63, 52, 83, 85, 60, 13, 91, 17, 84, 30, 38, 11, 27, 38, 28, 26, 33, 32, 54, 25, 24, 40, 27, 46, 86, 84, 97, 69, 93, 69, 39, 81, 29], [75, 86, 31, 65, 15, 83, 74, 9, 13, 45, 90, 6, 44, 2, 29, 48, 12, 87, 67, 50, 11, 5, 45, 74, 47, 6, 80, 95, 87, 94, 84, 89, 99, 69, 63, 67, 47, 34, 12, 27, 69, 86, 68, 28, 71, 45, 98, 2, 9], [79, 31, 36, 15, 97, 62, 31, 27, 2, 73, 43, 1, 83, 9, 60, 2, 58, 65, 12, 55, 90, 10, 65, 65, 61, 95, 75, 69, 35, 11, 68, 38, 39, 21, 36, 92, 72, 20, 43, 21, 35, 64, 32, 36, 69, 52, 4, 7, 98], [84, 71, 24, 21, 57, 73, 19, 84, 28, 32, 34, 16, 38, 81, 75, 4, 56, 40, 50, 40, 82, 49, 48, 6, 96, 5, 79, 45, 16, 17, 59, 56, 79, 35, 8, 99, 61, 27, 78, 87, 20, 57, 70, 88, 23, 76, 2, 27, 32], [93, 50, 64, 40, 33, 29, 33, 17, 74, 65, 43, 63, 81, 92, 58, 91, 43, 37, 46, 25, 98, 67, 93, 99, 51, 74, 38, 38, 1, 54, 65, 96, 22, 61, 58, 54, 19, 99, 70, 34, 79, 44, 67, 52, 22, 29, 14, 94, 62], [15, 93, 14, 67, 22, 97, 87, 7, 84, 7, 17, 32, 79, 77, 56, 62, 58, 58, 3, 89, 96, 80, 1, 67, 20, 92, 86, 62, 56, 53, 65, 56, 78, 45, 79, 96, 18, 48, 38, 22, 80, 75, 71, 73, 1, 42, 72, 75, 69], [29, 6, 56, 12, 39, 71, 12, 33, 83, 53, 19, 58, 85, 83, 43, 73, 45, 86, 19, 37, 11, 56, 25, 99, 69, 45, 62, 95, 14, 77, 34, 98, 82, 60, 64, 70, 51, 42, 21, 5, 66, 70, 61, 8, 66, 87, 62, 20, 4], [15, 94, 56, 20, 24, 9, 21, 41, 13, 5, 64, 46, 78, 71, 70, 59, 76, 51, 16, 51, 96, 42, 11, 68, 93, 52, 98, 73, 10, 72, 63, 36, 96, 45, 6, 6, 91, 66, 73, 64, 38, 69, 98, 61, 78, 74, 63, 71, 20]],34,), ([[64, 81, 37, 36, 97, 10, 34, 45, 63, 13, 25, 44, 97], [74, 24, 69, 74, 47, 91, 50, 36, 33, 92, 3, 31, 60], [29, 44, 45, 42, 21, 32, 28, 85, 47, 99, 94, 47, 17], [29, 48, 2, 33, 63, 68, 39, 89, 5, 68, 52, 52, 29], [37, 8, 20, 41, 70, 36, 32, 5, 20, 68, 22, 97, 31], [41, 93, 5, 10, 75, 37, 56, 86, 24, 85, 16, 2, 15], [41, 63, 49, 26, 94, 66, 29, 70, 60, 65, 40, 11, 52], [87, 90, 95, 79, 73, 64, 98, 81, 99, 3, 11, 28, 62], [48, 28, 46, 64, 55, 83, 2, 96, 75, 16, 11, 3, 55], [42, 29, 69, 92, 31, 77, 25, 6, 60, 67, 22, 41, 53], [60, 39, 55, 96, 30, 71, 89, 2, 8, 63, 59, 97, 28], [74, 38, 18, 62, 77, 85, 97, 23, 65, 40, 60, 85, 5], [99, 18, 38, 29, 26, 60, 36, 82, 29, 31, 63, 13, 94]],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMIZE_SUM_PRODUCT_TWO_ARRAYS_PERMUTATIONS_ALLOWED," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMIZE_SUM_PRODUCT_TWO_ARRAYS_PERMUTATIONS_ALLOWED{ static int f_gold ( int A [ ] , int B [ ] , int n ) { Arrays . sort ( A ) ; Arrays . sort ( B ) ; int result = 0 ; for ( int i = 0 ; i < n ; i ++ ) result += ( A [ i ] * B [ n - i - 1 ] ) ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{31,85}); param0.add(new int[]{22,-6,84,70,84,6,28,-74,-14,68,22,90,-10}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{12,33,93,2,83,9,61,84,9,69,2}); param0.add(new int[]{-92,-88,-84,-78,-78,-76,-66,-54,-52,-48,-46,-44,-40,-34,-32,-24,-20,-14,-6,-4,2,6,10,10,22,26,32,36,36,40,46,48,56,58,64,76,80,80,80,84,84,84,92}); param0.add(new int[]{1,0,1,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,0,1,0,1,1,0,1,0,1,1,0,0,0,1,0}); param0.add(new int[]{4,6,6,20,22,23,26,39,40,47,50,68,68,70,73,77,80,82,85}); param0.add(new int[]{78,60,-8,46,-12}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{60,66,84,99,85,89,28,97,85,71,53,93,23,9,45,26,49,95,64,33,70,34,10,1,68,39,53,12}); List param1 = new ArrayList<>(); param1.add(new int[]{18,33}); param1.add(new int[]{2,-48,-36,-4,-22,-98,-74,-92,-72,-4,48,-32,94}); param1.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{85,92,92,1,54,31,69,4,39,81,52}); param1.add(new int[]{-98,-90,-82,-80,-76,-66,-62,-62,-62,-50,-50,-50,-32,-30,-14,-12,4,6,12,14,16,30,30,30,32,34,40,42,50,52,56,58,60,62,62,64,66,68,78,82,86,90,94}); param1.add(new int[]{0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1}); param1.add(new int[]{2,3,15,21,22,26,35,37,37,38,57,59,62,63,64,76,81,85,91}); param1.add(new int[]{-72,-80,-30,16,-38}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{37,33,33,77,78,34,28,1,63,15,51,50,90,22,71,23,68,55,2,22,31,54,76,36,2,27,96,89}); List param2 = new ArrayList<>(); param2.add(1); param2.add(6); param2.add(14); param2.add(7); param2.add(26); param2.add(32); param2.add(17); param2.add(2); param2.add(17); param2.add(15); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , B , n ) : sorted ( A ) sorted ( B ) result = 0 for i in range ( n ) : result += ( A [ i ] * B [ n - i - 1 ] ) return result "," using namespace std; int f_gold ( int A [ ], int B [ ], int n ) { sort ( A, A + n ); sort ( B, B + n ); int result = 0; for ( int i = 0; i < n; i ++ ) result += ( A [ i ] * B [ n - i - 1 ] ); return result; } int main() { int n_success = 0; vector> param0 {{31,85},{22,-6,84,70,84,6,28,-74,-14,68,22,90,-10},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{12,33,93,2,83,9,61,84,9,69,2},{-92,-88,-84,-78,-78,-76,-66,-54,-52,-48,-46,-44,-40,-34,-32,-24,-20,-14,-6,-4,2,6,10,10,22,26,32,36,36,40,46,48,56,58,64,76,80,80,80,84,84,84,92},{1,0,1,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,0,1,0,1,1,0,1,0,1,1,0,0,0,1,0},{4,6,6,20,22,23,26,39,40,47,50,68,68,70,73,77,80,82,85},{78,60,-8,46,-12},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{60,66,84,99,85,89,28,97,85,71,53,93,23,9,45,26,49,95,64,33,70,34,10,1,68,39,53,12}}; vector> param1 {{18,33},{2,-48,-36,-4,-22,-98,-74,-92,-72,-4,48,-32,94},{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{85,92,92,1,54,31,69,4,39,81,52},{-98,-90,-82,-80,-76,-66,-62,-62,-62,-50,-50,-50,-32,-30,-14,-12,4,6,12,14,16,30,30,30,32,34,40,42,50,52,56,58,60,62,62,64,66,68,78,82,86,90,94},{0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1},{2,3,15,21,22,26,35,37,37,38,57,59,62,63,64,76,81,85,91},{-72,-80,-30,16,-38},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{37,33,33,77,78,34,28,1,63,15,51,50,90,22,71,23,68,55,2,22,31,54,76,36,2,27,96,89}}; vector param2 {1,6,14,7,26,32,17,2,17,15}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([31, 85],[18, 33],1,), ([22, -6, 84, 70, 84, 6, 28, -74, -14, 68, 22, 90, -10],[2, -48, -36, -4, -22, -98, -74, -92, -72, -4, 48, -32, 94],6,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([12, 33, 93, 2, 83, 9, 61, 84, 9, 69, 2],[85, 92, 92, 1, 54, 31, 69, 4, 39, 81, 52],7,), ([-92, -88, -84, -78, -78, -76, -66, -54, -52, -48, -46, -44, -40, -34, -32, -24, -20, -14, -6, -4, 2, 6, 10, 10, 22, 26, 32, 36, 36, 40, 46, 48, 56, 58, 64, 76, 80, 80, 80, 84, 84, 84, 92],[-98, -90, -82, -80, -76, -66, -62, -62, -62, -50, -50, -50, -32, -30, -14, -12, 4, 6, 12, 14, 16, 30, 30, 30, 32, 34, 40, 42, 50, 52, 56, 58, 60, 62, 62, 64, 66, 68, 78, 82, 86, 90, 94],26,), ([1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0],[0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1],32,), ([4, 6, 6, 20, 22, 23, 26, 39, 40, 47, 50, 68, 68, 70, 73, 77, 80, 82, 85],[2, 3, 15, 21, 22, 26, 35, 37, 37, 38, 57, 59, 62, 63, 64, 76, 81, 85, 91],17,), ([78, 60, -8, 46, -12],[-72, -80, -30, 16, -38],2,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],17,), ([60, 66, 84, 99, 85, 89, 28, 97, 85, 71, 53, 93, 23, 9, 45, 26, 49, 95, 64, 33, 70, 34, 10, 1, 68, 39, 53, 12],[37, 33, 33, 77, 78, 34, 28, 1, 63, 15, 51, 50, 90, 22, 71, 23, 68, 55, 2, 22, 31, 54, 76, 36, 2, 27, 96, 89],15,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", AREA_CIRCUMSCRIBED_CIRCLE_SQUARE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class AREA_CIRCUMSCRIBED_CIRCLE_SQUARE{ static float f_gold ( float a ) { float PI = 3.14159265f ; return ( a * a * ( PI / 2 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(3296.590241413969F); param0.add(-1688.6061770081972F); param0.add(1571.9067680023313F); param0.add(-3117.129927920369F); param0.add(8561.027934208052F); param0.add(-5052.211066243729F); param0.add(3601.752337206948F); param0.add(-651.9008970363393F); param0.add(4415.044414999076F); param0.add(-1453.219956352866F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, MINIMUM_INCREMENT_K_OPERATIONS_MAKE_ELEMENTS_EQUAL," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_INCREMENT_K_OPERATIONS_MAKE_ELEMENTS_EQUAL{ static int f_gold ( int arr [ ] , int n , int k ) { Arrays . sort ( arr ) ; int max = arr [ arr . length - 1 ] ; int res = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( max - arr [ i ] ) % k != 0 ) return - 1 ; else res += ( max - arr [ i ] ) / k ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4, 7, 19, 16}); param0.add(new int[]{4,4,4,4,4}); param0.add(new int[]{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}); param0.add(new int[]{85,36,52,8,52,15,16}); param0.add(new int[]{-10,-5,-5,-20,10,30}); param0.add(new int[]{0,1,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0}); param0.add(new int[]{1,5,5,9,11,12,12,13,13,14,16,18,26,26,28,28,30,31,32,37,37,38,40,43,44,45,47,47,55,58,60,62,63,64,69,78,83,84,92,96,96,99}); param0.add(new int[]{76,-78,92,-98,16,44,86,96,-8,2,-96,74,-28,12,54,-40,-64,-12,4,48,68,-82,8,0,-4,88,48,-54,90,62,-84,76,-48,62,-80,-94,38,-4,36}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{62,99,29,23,55,30,79,63,1,88,59,8,11,80,23,51,97,32,80,48,84,36,73,59,1,34,92,10}); List param1 = new ArrayList<>(); param1.add(4); param1.add(5); param1.add(39); param1.add(5); param1.add(6); param1.add(10); param1.add(26); param1.add(34); param1.add(39); param1.add(18); List param2 = new ArrayList<>(); param2.add(3); param2.add(3); param2.add(1); param2.add(6); param2.add(5); param2.add(15); param2.add(33); param2.add(3); param2.add(10); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( arr , n , k ) : max1 = max ( arr ) res = 0 for i in range ( 0 , n ) : if ( ( max1 - arr [ i ] ) % k != 0 ) : return - 1 else : res += ( max1 - arr [ i ] ) / k return int ( res ) "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { int max = * max_element ( arr, arr + n ); int res = 0; for ( int i = 0; i < n; i ++ ) { if ( ( max - arr [ i ] ) % k != 0 ) return - 1; else res += ( max - arr [ i ] ) / k; } return res; } int main() { int n_success = 0; vector> param0 {{4, 7, 19, 16},{4,4,4,4,4},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{85,36,52,8,52,15,16},{-10,-5,-5,-20,10,30},{0,1,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0},{1,5,5,9,11,12,12,13,13,14,16,18,26,26,28,28,30,31,32,37,37,38,40,43,44,45,47,47,55,58,60,62,63,64,69,78,83,84,92,96,96,99},{76,-78,92,-98,16,44,86,96,-8,2,-96,74,-28,12,54,-40,-64,-12,4,48,68,-82,8,0,-4,88,48,-54,90,62,-84,76,-48,62,-80,-94,38,-4,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,1,1,1,1,1,1},{62,99,29,23,55,30,79,63,1,88,59,8,11,80,23,51,97,32,80,48,84,36,73,59,1,34,92,10}}; vector param1 {4,5,39,5,6,10,26,34,39,18}; vector param2 {3,3,1,6,5,15,33,3,10,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([4, 7, 19, 16],4,3), ([4,4,4,4,4],5,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],39,1), ([85,36,52,8,52,15,16],5,6), ([-10,-5,-5,-20,10,30],6,5), ([0,1,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0],10,15), ([1,5,5,9,11,12,12,13,13,14,16,18,26,26,28,28,30,31,32,37,37,38,40,43,44,45,47,47,55,58,60,62,63,64,69,78,83,84,92,96,96,99],26,33), ([76,-78,92,-98,16,44,86,96,-8,2,-96,74,-28,12,54,-40,-64,-12,4,48,68,-82,8,0,-4,88,48,-54,90,62,-84,76,-48,62,-80,-94,38,-4,36],34,3), ([0,0,0,0,0,0,0,0,0,0,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],39,10), ([62,99,29,23,55,30,79,63,1,88,59,8,11,80,23,51,97,32,80,48,84,36,73,59,1,34,92,10],18,1), ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM{ static int f_gold ( int n ) { if ( n == 0 || n == 1 ) return n ; return Math . max ( ( f_gold ( n / 2 ) + f_gold ( n / 3 ) + f_gold ( n / 4 ) ) , n ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(39); param0.add(79); param0.add(7); param0.add(76); param0.add(48); param0.add(18); param0.add(58); param0.add(17); param0.add(36); param0.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 or n == 1 ) : return n return max ( ( f_gold ( n // 2 ) + f_gold ( n // 3 ) + f_gold ( n // 4 ) ) , n ) "," using namespace std; int f_gold ( int n ) { if ( n == 0 || n == 1 ) return n; return max ( ( f_gold ( n / 2 ) + f_gold ( n / 3 ) + f_gold ( n / 4 ) ), n ); } int main() { int n_success = 0; vector param0 {39,79,7,76,48,18,58,17,36,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (39,), (79,), (7,), (76,), (48,), (18,), (58,), (17,), (36,), (5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUM_SUBARRAY_REMOVING_ONE_ELEMENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_SUBARRAY_REMOVING_ONE_ELEMENT{ static int f_gold ( int arr [ ] , int n ) { int fw [ ] = new int [ n ] ; int bw [ ] = new int [ n ] ; int cur_max = arr [ 0 ] , max_so_far = arr [ 0 ] ; fw [ 0 ] = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { cur_max = Math . max ( arr [ i ] , cur_max + arr [ i ] ) ; max_so_far = Math . max ( max_so_far , cur_max ) ; fw [ i ] = cur_max ; } cur_max = max_so_far = bw [ n - 1 ] = arr [ n - 1 ] ; for ( int i = n - 2 ; i >= 0 ; i -- ) { cur_max = Math . max ( arr [ i ] , cur_max + arr [ i ] ) ; max_so_far = Math . max ( max_so_far , cur_max ) ; bw [ i ] = cur_max ; } int fans = max_so_far ; for ( int i = 1 ; i < n - 1 ; i ++ ) fans = Math . max ( fans , fw [ i - 1 ] + bw [ i + 1 ] ) ; return fans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,8,14,17,19,35,38,45,50,53,55,70,82,88,92,96}); param0.add(new int[]{-64,-56,-80,-82,72,62,-8,48,-96,34,64,-38,-60,80,4,-64,-62,34,94,-16,38,62,-84,48,42,-40}); param0.add(new int[]{0,0,0,0,1,1,1}); param0.add(new int[]{3,7,50,53,72,14,18,74,27,65,41,20,54,17,87,40,63,15,47}); param0.add(new int[]{-96,-96,-94,-80,-74,-74,-74,-74,-70,-64,-60,-58,-52,-52,-44,-42,-40,-38,-36,-34,-30,-14,-12,-8,-2,6,12,16,24,24,48,48,66,76,76,84,90}); param0.add(new int[]{1,1,0,1,1,1,1,0,0,0,1,0,1,0,0}); param0.add(new int[]{4,4,5,9,11,13,13,15,16,21,23,25,27,30,31,35,35,43,43,47,49,50,52,54,55,55,57,57,57,59,62,64,66,68,69,71,73,76,80,84,88,88,90,90,97,97,99}); param0.add(new int[]{-86,-60,4,14,6,-6,-50,46,-50,-62,-56,16,-76,90,40,2,36,48,-26,34,78,84,2,-54,94,60,-26,60,84,2,-98,2,-74}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{36,99,27,8,90,74,67,77,49,23,43,25,68,56,85,6}); List param1 = new ArrayList<>(); param1.add(13); param1.add(22); param1.add(6); param1.add(11); param1.add(32); param1.add(8); param1.add(34); param1.add(25); param1.add(9); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : fw = [ 0 for k in range ( n ) ] bw = [ 0 for k in range ( n ) ] cur_max , max_so_far = arr [ 0 ] , arr [ 0 ] for i in range ( n ) : cur_max = max ( arr [ i ] , cur_max + arr [ i ] ) max_so_far = max ( max_so_far , cur_max ) fw [ i ] = cur_max cur_max = max_so_far = bw [ n - 1 ] = arr [ n - 1 ] i = n - 2 while i >= 0 : cur_max = max ( arr [ i ] , cur_max + arr [ i ] ) max_so_far = max ( max_so_far , cur_max ) bw [ i ] = cur_max i -= 1 fans = max_so_far for i in range ( 1 , n - 1 ) : fans = max ( fans , fw [ i - 1 ] + bw [ i + 1 ] ) return fans "," using namespace std; int f_gold ( int arr [ ], int n ) { int fw [ n ], bw [ n ]; int cur_max = arr [ 0 ], max_so_far = arr [ 0 ]; fw [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) { cur_max = max ( arr [ i ], cur_max + arr [ i ] ); max_so_far = max ( max_so_far, cur_max ); fw [ i ] = cur_max; } cur_max = max_so_far = bw [ n - 1 ] = arr [ n - 1 ]; for ( int i = n - 2; i >= 0; i -- ) { cur_max = max ( arr [ i ], cur_max + arr [ i ] ); max_so_far = max ( max_so_far, cur_max ); bw [ i ] = cur_max; } int fans = max_so_far; for ( int i = 1; i < n - 1; i ++ ) fans = max ( fans, fw [ i - 1 ] + bw [ i + 1 ] ); return fans; } int main() { int n_success = 0; vector> param0 {{2,8,14,17,19,35,38,45,50,53,55,70,82,88,92,96},{-64,-56,-80,-82,72,62,-8,48,-96,34,64,-38,-60,80,4,-64,-62,34,94,-16,38,62,-84,48,42,-40},{0,0,0,0,1,1,1},{3,7,50,53,72,14,18,74,27,65,41,20,54,17,87,40,63,15,47},{-96,-96,-94,-80,-74,-74,-74,-74,-70,-64,-60,-58,-52,-52,-44,-42,-40,-38,-36,-34,-30,-14,-12,-8,-2,6,12,16,24,24,48,48,66,76,76,84,90},{1,1,0,1,1,1,1,0,0,0,1,0,1,0,0},{4,4,5,9,11,13,13,15,16,21,23,25,27,30,31,35,35,43,43,47,49,50,52,54,55,55,57,57,57,59,62,64,66,68,69,71,73,76,80,84,88,88,90,90,97,97,99},{-86,-60,4,14,6,-6,-50,46,-50,-62,-56,16,-76,90,40,2,36,48,-26,34,78,84,2,-54,94,60,-26,60,84,2,-98,2,-74},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{36,99,27,8,90,74,67,77,49,23,43,25,68,56,85,6}}; vector param1 {13,22,6,11,32,8,34,25,9,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 8, 14, 17, 19, 35, 38, 45, 50, 53, 55, 70, 82, 88, 92, 96],13,), ([-64, -56, -80, -82, 72, 62, -8, 48, -96, 34, 64, -38, -60, 80, 4, -64, -62, 34, 94, -16, 38, 62, -84, 48, 42, -40],22,), ([0, 0, 0, 0, 1, 1, 1],6,), ([3, 7, 50, 53, 72, 14, 18, 74, 27, 65, 41, 20, 54, 17, 87, 40, 63, 15, 47],11,), ([-96, -96, -94, -80, -74, -74, -74, -74, -70, -64, -60, -58, -52, -52, -44, -42, -40, -38, -36, -34, -30, -14, -12, -8, -2, 6, 12, 16, 24, 24, 48, 48, 66, 76, 76, 84, 90],32,), ([1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0],8,), ([4, 4, 5, 9, 11, 13, 13, 15, 16, 21, 23, 25, 27, 30, 31, 35, 35, 43, 43, 47, 49, 50, 52, 54, 55, 55, 57, 57, 57, 59, 62, 64, 66, 68, 69, 71, 73, 76, 80, 84, 88, 88, 90, 90, 97, 97, 99],34,), ([-86, -60, 4, 14, 6, -6, -50, 46, -50, -62, -56, 16, -76, 90, 40, 2, 36, 48, -26, 34, 78, 84, 2, -54, 94, 60, -26, 60, 84, 2, -98, 2, -74],25,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],9,), ([36, 99, 27, 8, 90, 74, 67, 77, 49, 23, 43, 25, 68, 56, 85, 6],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_IS_DIVISIBLE_BY_29_OR_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_IS_DIVISIBLE_BY_29_OR_NOT{ static boolean f_gold ( long n ) { while ( n / 100 > 0 ) { int last_digit = ( int ) n % 10 ; n /= 10 ; n += last_digit * 3 ; } return ( n % 29 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(29L); param0.add(0L); param0.add(65L); param0.add(1419L); param0.add(54L); param0.add(7L); param0.add(44L); param0.add(34L); param0.add(1160L); param0.add(292929002929L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( n ) : while ( int ( n / 100 ) ) : last_digit = int ( n % 10 ) n = int ( n / 10 ) n += last_digit * 3 return ( n % 29 == 0 ) "," using namespace std; bool f_gold ( long long int n ) { while ( n / 100 ) { int last_digit = n % 10; n /= 10; n += last_digit * 3; } return ( n % 29 == 0 ); } int main() { int n_success = 0; vector param0 {50,11,65,32,8,54,7,44,34,63}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (29,), (0,), (65,), (1419,), (54,), (7,), (44,), (34,), (1160,), (292929002929,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MINIMUM_PRODUCT_SUBSET_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_PRODUCT_SUBSET_ARRAY{ static int f_gold ( int a [ ] , int n ) { if ( n == 1 ) return a [ 0 ] ; int negmax = Integer . MIN_VALUE ; int posmin = Integer . MAX_VALUE ; int count_neg = 0 , count_zero = 0 ; int product = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == 0 ) { count_zero ++ ; continue ; } if ( a [ i ] < 0 ) { count_neg ++ ; negmax = Math . max ( negmax , a [ i ] ) ; } if ( a [ i ] > 0 && a [ i ] < posmin ) posmin = a [ i ] ; product *= a [ i ] ; } if ( count_zero == n || ( count_neg == 0 && count_zero > 0 ) ) return 0 ; if ( count_neg == 0 ) return posmin ; if ( count_neg % 2 == 0 && count_neg != 0 ) { product = product / negmax ; } return product ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,6,7,8,8,9,12,12,12,13,15,15,15,16,18,18,18,19,20,21,22,22,23,28,29,30,30,33,33,35,35,36,40,43,58,63,73,78,82,83,84,87,89,89,92,94}); param0.add(new int[]{18,-6,-8,98,66,-86,24,6,58,74,82}); param0.add(new int[]{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}); param0.add(new int[]{97,79,93,41,76,34,94,57,63,98,52,62,96,7,63,44,55,43,36,66,35,14,24,40,26,16,67,19,31,86,64,93,85,86,66,24,73,86,45,99,25,98,38,57}); param0.add(new int[]{-58,-48,-46,-36,0,18}); param0.add(new int[]{1,1,1,0,0,0,1,0,1,0,0,1,1,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,1,0,1,0,0,1,0}); param0.add(new int[]{1,3,5,15,18,19,21,23,29,29,33,33,34,37,39,43,43,68,73,74,75,84,87,88,89,90,93}); param0.add(new int[]{74,70,-36,16,10,60,-82,96,-30,58,56,-54,-14,94,10,-82,-80,-40,-72,-68,8,38,-50,-76,34,2,-66,-30,26}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{74,74,8,74,85,41,31,3,84,46,73,39,64,72,28,83,98,27,64,7,95,37,10,38,77,32,69,72,62,96,5,81,34,96,80,25,38}); List param1 = new ArrayList<>(); param1.add(23); param1.add(10); param1.add(25); param1.add(30); param1.add(3); param1.add(36); param1.add(18); param1.add(15); param1.add(20); param1.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : if ( n == 1 ) : return a [ 0 ] max_neg = float ( '-inf' ) min_pos = float ( 'inf' ) count_neg = 0 count_zero = 0 prod = 1 for i in range ( 0 , n ) : if ( a [ i ] == 0 ) : count_zero = count_zero + 1 continue if ( a [ i ] < 0 ) : count_neg = count_neg + 1 max_neg = max ( max_neg , a [ i ] ) if ( a [ i ] > 0 ) : min_pos = min ( min_pos , a [ i ] ) prod = prod * a [ i ] if ( count_zero == n or ( count_neg == 0 and count_zero > 0 ) ) : return 0 ; if ( count_neg == 0 ) : return min_pos if ( ( count_neg & 1 ) == 0 and count_neg != 0 ) : prod = int ( prod / max_neg ) return prod ; "," using namespace std; int f_gold ( int a [ ], int n ) { if ( n == 1 ) return a [ 0 ]; int max_neg = INT_MIN; int min_pos = INT_MAX; int count_neg = 0, count_zero = 0; int prod = 1; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] == 0 ) { count_zero ++; continue; } if ( a [ i ] < 0 ) { count_neg ++; max_neg = max ( max_neg, a [ i ] ); } if ( a [ i ] > 0 ) min_pos = min ( min_pos, a [ i ] ); prod = prod * a [ i ]; } if ( count_zero == n || ( count_neg == 0 && count_zero > 0 ) ) return 0; if ( count_neg == 0 ) return min_pos; if ( ! ( count_neg & 1 ) && count_neg != 0 ) { prod = prod / max_neg; } return prod; } int main() { int n_success = 0; vector> param0 {{3,6,7,8,8,9,12,12,12,13,15,15,15,16,18,18,18,19,20,21,22,22,23,28,29,30,30,33,33,35,35,36,40,43,58,63,73,78,82,83,84,87,89,89,92,94},{18,-6,-8,98,66,-86,24,6,58,74,82},{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},{97,79,93,41,76,34,94,57,63,98,52,62,96,7,63,44,55,43,36,66,35,14,24,40,26,16,67,19,31,86,64,93,85,86,66,24,73,86,45,99,25,98,38,57},{-58,-48,-46,-36,0,18},{1,1,1,0,0,0,1,0,1,0,0,1,1,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,1,0,1,0,0,1,0},{1,3,5,15,18,19,21,23,29,29,33,33,34,37,39,43,43,68,73,74,75,84,87,88,89,90,93},{74,70,-36,16,10,60,-82,96,-30,58,56,-54,-14,94,10,-82,-80,-40,-72,-68,8,38,-50,-76,34,2,-66,-30,26},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{74,74,8,74,85,41,31,3,84,46,73,39,64,72,28,83,98,27,64,7,95,37,10,38,77,32,69,72,62,96,5,81,34,96,80,25,38}}; vector param1 {23,10,25,30,3,36,18,15,20,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 6, 7, 8, 8, 9, 12, 12, 12, 13, 15, 15, 15, 16, 18, 18, 18, 19, 20, 21, 22, 22, 23, 28, 29, 30, 30, 33, 33, 35, 35, 36, 40, 43, 58, 63, 73, 78, 82, 83, 84, 87, 89, 89, 92, 94],23,), ([18, -6, -8, 98, 66, -86, 24, 6, 58, 74, 82],10,), ([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],25,), ([97, 79, 93, 41, 76, 34, 94, 57, 63, 98, 52, 62, 96, 7, 63, 44, 55, 43, 36, 66, 35, 14, 24, 40, 26, 16, 67, 19, 31, 86, 64, 93, 85, 86, 66, 24, 73, 86, 45, 99, 25, 98, 38, 57],30,), ([-58, -48, -46, -36, 0, 18],3,), ([1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0],36,), ([1, 3, 5, 15, 18, 19, 21, 23, 29, 29, 33, 33, 34, 37, 39, 43, 43, 68, 73, 74, 75, 84, 87, 88, 89, 90, 93],18,), ([74, 70, -36, 16, 10, 60, -82, 96, -30, 58, 56, -54, -14, 94, 10, -82, -80, -40, -72, -68, 8, 38, -50, -76, 34, 2, -66, -30, 26],15,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],20,), ([74, 74, 8, 74, 85, 41, 31, 3, 84, 46, 73, 39, 64, 72, 28, 83, 98, 27, 64, 7, 95, 37, 10, 38, 77, 32, 69, 72, 62, 96, 5, 81, 34, 96, 80, 25, 38],33,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRIMALITY_TEST_SET_1_INTRODUCTION_AND_SCHOOL_METHOD{ static boolean f_gold ( int n ) { if ( n <= 1 ) return false ; for ( int i = 2 ; i < n ; i ++ ) if ( n % i == 0 ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(39); param0.add(73); param0.add(8); param0.add(28); param0.add(66); param0.add(20); param0.add(36); param0.add(6); param0.add(51); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if n <= 1 : return False for i in range ( 2 , n ) : if n % i == 0 : return False ; return True "," using namespace std; bool f_gold ( int n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } int main() { int n_success = 0; vector param0 {37,39,73,8,28,66,20,36,6,51}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,), (39,), (73,), (8,), (28,), (66,), (20,), (36,), (6,), (51,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIRST_UPPERCASE_LETTER_IN_A_STRING_ITERATIVE_AND_RECURSIVE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIRST_UPPERCASE_LETTER_IN_A_STRING_ITERATIVE_AND_RECURSIVE{ static char f_gold ( String str ) { for ( int i = 0 ; i < str . length ( ) ; i ++ ) if ( Character . isUpperCase ( str . charAt ( i ) ) ) return str . charAt ( i ) ; return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""pH""); param0.add(""96544000""); param0.add(""000010000""); param0.add(""ujqpx""); param0.add(""20684847994""); param0.add(""111""); param0.add(""rclkv""); param0.add(""45173693434""); param0.add(""11111011001101""); param0.add(""f""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : for i in range ( 0 , len ( str ) ) : if ( str [ i ].istitle ( ) ) : return str [ i ] return 0 "," using namespace std; char f_gold ( string str ) { for ( int i = 0; i < str . length ( ); i ++ ) if ( isupper ( str [ i ] ) ) return str [ i ]; return 0; } int main() { int n_success = 0; vector param0 {""pH"",""96544000"",""000010000"",""ujqpx"",""20684847994"",""111"",""rclkv"",""45173693434"",""11111011001101"",""f""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('pH',), ('96544000',), ('000010000',), ('ujqpx',), ('20684847994',), ('111',), ('rclkv',), ('45173693434',), ('11111011001101',), ('f',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_COUNT_OCCURRENCE_GIVEN_CHARACTER_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_COUNT_OCCURRENCE_GIVEN_CHARACTER_STRING{ public static int f_gold ( String s , char c ) { int res = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == c ) res ++ ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""mhjnKfd""); param0.add(""716662107""); param0.add(""01""); param0.add(""wPHSxIbnHakGRO""); param0.add(""721106""); param0.add(""111""); param0.add(""TIBFU""); param0.add(""0""); param0.add(""10""); param0.add(""lqq""); List param1 = new ArrayList<>(); param1.add('l'); param1.add('6'); param1.add('1'); param1.add('n'); param1.add('8'); param1.add('0'); param1.add('Q'); param1.add('3'); param1.add('0'); param1.add('d'); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s , c ) : res = 0 for i in range ( len ( s ) ) : if ( s [ i ] == c ) : res = res + 1 return res "," using namespace std; int f_gold ( string s, char c ) { int res = 0; for ( int i = 0; i < s . length ( ); i ++ ) if ( s [ i ] == c ) res ++; return res; } int main() { int n_success = 0; vector param0 {""mhjnKfd"",""716662107"",""01"",""wPHSxIbnHakGRO"",""721106"",""111"",""TIBFU"",""0"",""10"",""lqq""}; vector param1 {'l','6','1','n','8','0','Q','3','0','d'}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('mhjnKfd','l',), ('716662107','6',), ('01','1',), ('wPHSxIbnHakGRO','n',), ('721106','8',), ('111','0',), ('TIBFU','Q',), ('0','3',), ('10','0',), ('lqq','d',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_ODD_FACTORS_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_ODD_FACTORS_NUMBER{ static int f_gold ( int n ) { int res = 1 ; while ( n % 2 == 0 ) n = n / 2 ; for ( int i = 3 ; i <= Math . sqrt ( n ) ; i ++ ) { int count = 0 , curr_sum = 1 ; int curr_term = 1 ; while ( n % i == 0 ) { count ++ ; n = n / i ; curr_term *= i ; curr_sum += curr_term ; } res *= curr_sum ; } if ( n >= 2 ) res *= ( 1 + n ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(20); param0.add(6); param0.add(39); param0.add(80); param0.add(88); param0.add(7); param0.add(16); param0.add(27); param0.add(83); param0.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : res = 1 while n % 2 == 0 : n = n // 2 for i in range ( 3 , int ( math.sqrt ( n ) + 1 ) ) : count = 0 curr_sum = 1 curr_term = 1 while n % i == 0 : count += 1 n = n // i curr_term *= i curr_sum += curr_term res *= curr_sum if n >= 2 : res *= ( 1 + n ) return res "," using namespace std; int f_gold ( int n ) { int res = 1; while ( n % 2 == 0 ) n = n / 2; for ( int i = 3; i <= sqrt ( n ); i ++ ) { int count = 0, curr_sum = 1; int curr_term = 1; while ( n % i == 0 ) { count ++; n = n / i; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int main() { int n_success = 0; vector param0 {20,6,39,80,88,7,16,27,83,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (20,), (6,), (39,), (80,), (88,), (7,), (16,), (27,), (83,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LARGE_NUMBER_DIVISIBLE_13_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_13_NOT{ static boolean f_gold ( String num ) { int length = num . length ( ) ; if ( length == 1 && num . charAt ( 0 ) == '0' ) return true ; if ( length % 3 == 1 ) { num += ""00"" ; length += 2 ; } else if ( length % 3 == 2 ) { num += ""0"" ; length += 1 ; } int sum = 0 , p = 1 ; for ( int i = length - 1 ; i >= 0 ; i -- ) { int group = 0 ; group += num . charAt ( i -- ) - '0' ; group += ( num . charAt ( i -- ) - '0' ) * 10 ; group += ( num . charAt ( i ) - '0' ) * 100 ; sum = sum + group * p ; p *= ( - 1 ) ; } sum = Math . abs ( sum ) ; return ( sum % 13 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""vzTUaItpCpLnjY""); param0.add(""33855""); param0.add(""0011110101011""); param0.add(""MMQ""); param0.add(""439340517954""); param0.add(""000000000""); param0.add(""UugAuRRJbjEgl""); param0.add(""6406553695441""); param0.add(""011001""); param0.add(""yjFqEEvgiNjEX""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num ) : length = len ( num ) if ( length == 1 and num [ 0 ] == '0' ) : return True if ( length % 3 == 1 ) : num = str ( num ) + ""00"" length += 2 elif ( length % 3 == 2 ) : num = str ( num ) + ""0"" length += 1 sum = 0 p = 1 for i in range ( length - 1 , - 1 , - 1 ) : group = 0 group += ord ( num [ i ] ) - ord ( '0' ) i -= 1 group += ( ord ( num [ i ] ) - ord ( '0' ) ) * 10 i -= 1 group += ( ord ( num [ i ] ) - ord ( '0' ) ) * 100 sum = sum + group * p p *= ( - 1 ) sum = abs ( sum ) return ( sum % 13 == 0 ) "," using namespace std; bool f_gold ( string num ) { int length = num . size ( ); if ( length == 1 && num [ 0 ] == '0' ) return true; if ( length % 3 == 1 ) { num += ""00""; length += 2; } else if ( length % 3 == 2 ) { num += ""0""; length += 1; } int sum = 0, p = 1; for ( int i = length - 1; i >= 0; i -- ) { int group = 0; group += num [ i -- ] - '0'; group += ( num [ i -- ] - '0' ) * 10; group += ( num [ i ] - '0' ) * 100; sum = sum + group * p; p *= ( - 1 ); } sum = abs ( sum ); return ( sum % 13 == 0 ); } int main() { int n_success = 0; vector param0 {""vzTUaItpCpLnjY"",""33855"",""0011110101011"",""MMQ"",""439340517954"",""000000000"",""UugAuRRJbjEgl"",""6406553695441"",""011001"",""yjFqEEvgiNjEX""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('vzTUaItpCpLnjY',), ('33855',), ('0011110101011',), ('MMQ',), ('439340517954',), ('000000000',), ('UugAuRRJbjEgl',), ('6406553695441',), ('011001',), ('yjFqEEvgiNjEX',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LARGEST_SUBSEQUENCE_GCD_GREATER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LARGEST_SUBSEQUENCE_GCD_GREATER_1{ static int f_gold ( int arr [ ] , int n ) { int ans = 0 ; int maxele = Arrays . stream ( arr ) . max ( ) . getAsInt ( ) ; ; for ( int i = 2 ; i <= maxele ; ++ i ) { int count = 0 ; for ( int j = 0 ; j < n ; ++ j ) { if ( arr [ j ] % i == 0 ) ++ count ; } ans = Math . max ( ans , count ) ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{10,18,22,22,22,29,30,32,33,34,37,39,40,41,44,47,49,50,50,51,53,67,69,70,71,71,73,75,78,80,81,82,91,91,93,97,97,99}); param0.add(new int[]{-42,62,6,98,38,-4,-38,72,42,4,-22,-94,78,-90,14}); param0.add(new int[]{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}); param0.add(new int[]{89,92,96,71,24,27,18,19,41,1,45,8}); param0.add(new int[]{-98,-94,-92,-90,-82,-80,-76,-76,-72,-62,-60,-58,-56,-52,-42,-36,-32,-32,-24,-22,-20,-10,-10,-10,-8,-2,-2,0,2,4,6,6,8,10,14,18,22,26,30,46,46,62,68,74,78,82,86,86}); param0.add(new int[]{1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,1}); param0.add(new int[]{4,8,10,10,11,17,18,25,32,33,34,37,40,41,44,47,47,52,63,77,85,87,89,89,91,95,96,98}); param0.add(new int[]{-86,52,-48,70,10,-94,16,14,38,62}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{95,32,87,37,86,71,30,88,96,52,88,92,79,86,19,5,74,67}); List param1 = new ArrayList<>(); param1.add(35); param1.add(10); param1.add(23); param1.add(7); param1.add(40); param1.add(41); param1.add(23); param1.add(9); param1.add(30); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : ans = 0 maxele = max ( arr ) for i in range ( 2 , maxele + 1 ) : count = 0 for j in range ( n ) : if ( arr [ j ] % i == 0 ) : count += 1 ans = max ( ans , count ) return ans "," using namespace std; int f_gold ( int arr [ ], int n ) { int ans = 0; int maxele = * max_element ( arr, arr + n ); for ( int i = 2; i <= maxele; ++ i ) { int count = 0; for ( int j = 0; j < n; ++ j ) { if ( arr [ j ] % i == 0 ) ++ count; } ans = max ( ans, count ); } return ans; } int main() { int n_success = 0; vector> param0 {{10,18,22,22,22,29,30,32,33,34,37,39,40,41,44,47,49,50,50,51,53,67,69,70,71,71,73,75,78,80,81,82,91,91,93,97,97,99},{-42,62,6,98,38,-4,-38,72,42,4,-22,-94,78,-90,14},{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},{89,92,96,71,24,27,18,19,41,1,45,8},{-98,-94,-92,-90,-82,-80,-76,-76,-72,-62,-60,-58,-56,-52,-42,-36,-32,-32,-24,-22,-20,-10,-10,-10,-8,-2,-2,0,2,4,6,6,8,10,14,18,22,26,30,46,46,62,68,74,78,82,86,86},{1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,1},{4,8,10,10,11,17,18,25,32,33,34,37,40,41,44,47,47,52,63,77,85,87,89,89,91,95,96,98},{-86,52,-48,70,10,-94,16,14,38,62},{0,0,0,0,0,0,0,0,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},{95,32,87,37,86,71,30,88,96,52,88,92,79,86,19,5,74,67}}; vector param1 {35,10,23,7,40,41,23,9,30,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([10, 18, 22, 22, 22, 29, 30, 32, 33, 34, 37, 39, 40, 41, 44, 47, 49, 50, 50, 51, 53, 67, 69, 70, 71, 71, 73, 75, 78, 80, 81, 82, 91, 91, 93, 97, 97, 99],35,), ([-42, 62, 6, 98, 38, -4, -38, 72, 42, 4, -22, -94, 78, -90, 14],10,), ([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,), ([89, 92, 96, 71, 24, 27, 18, 19, 41, 1, 45, 8],7,), ([-98, -94, -92, -90, -82, -80, -76, -76, -72, -62, -60, -58, -56, -52, -42, -36, -32, -32, -24, -22, -20, -10, -10, -10, -8, -2, -2, 0, 2, 4, 6, 6, 8, 10, 14, 18, 22, 26, 30, 46, 46, 62, 68, 74, 78, 82, 86, 86],40,), ([1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1],41,), ([4, 8, 10, 10, 11, 17, 18, 25, 32, 33, 34, 37, 40, 41, 44, 47, 47, 52, 63, 77, 85, 87, 89, 89, 91, 95, 96, 98],23,), ([-86, 52, -48, 70, 10, -94, 16, 14, 38, 62],9,), ([0, 0, 0, 0, 0, 0, 0, 0, 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],30,), ([95, 32, 87, 37, 86, 71, 30, 88, 96, 52, 88, 92, 79, 86, 19, 5, 74, 67],13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRINT_WORDS_STRING_REVERSE_ORDER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRINT_WORDS_STRING_REVERSE_ORDER{ static String f_gold ( String str ) { int i = str . length ( ) - 1 ; int start , end = i + 1 ; String result = """" ; while ( i >= 0 ) { if ( str . charAt ( i ) == ' ' ) { start = i + 1 ; while ( start != end ) result += str . charAt ( start ++ ) ; result += ' ' ; end = i ; } i -- ; } start = 0 ; while ( start != end ) result += str . charAt ( start ++ ) ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""m Dm YZ""); param0.add(""65 48 57 71""); param0.add(""01 010""); param0.add(""mT vhByi""); param0.add(""19 44 9 1""); param0.add(""0""); param0.add(""z vUi ""); param0.add(""7 591 36643 9 055""); param0.add(""01""); param0.add(""ti YGaijPY""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : i = len ( str ) - 1 start = end = i + 1 result = '' while i >= 0 : if str [ i ] == ' ' : start = i + 1 while start != end : result += str [ start ] start += 1 result += ' ' end = i i -= 1 start = 0 while start != end : result += str [ start ] start += 1 return result "," using namespace std; string f_gold ( string str ) { int i = str . length ( ) - 1; int start, end = i + 1; string result = """"; while ( i >= 0 ) { if ( str [ i ] == ' ' ) { start = i + 1; while ( start != end ) result += str [ start ++ ]; result += ' '; end = i; } i --; } start = 0; while ( start != end ) result += str [ start ++ ]; return result; } int main() { int n_success = 0; vector param0 { ""m Dm YZ"", ""65 48 57 71"", ""01 010"", ""mT vhByi"", ""19 44 9 1"", ""0"", ""z vUi "", ""7 591 36643 9 055"", ""01"", ""ti YGaijPY"" }; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('m Dm YZ',), ('65 48 57 71',), ('01 010',), ('mT vhByi',), ('19 44 9 1',), ('0',), ('z vUi ',), ('7 591 36643 9 055',), ('01',), ('ti YGaijPY',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_DECIMAL_BINARY_CONVERSION_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_DECIMAL_BINARY_CONVERSION_2{ static int f_gold ( int N ) { int B_Number = 0 ; int cnt = 0 ; while ( N != 0 ) { int rem = N % 2 ; double c = Math . pow ( 10 , cnt ) ; B_Number += rem * c ; N /= 2 ; cnt ++ ; } return B_Number ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(18); param0.add(92); param0.add(87); param0.add(50); param0.add(56); param0.add(88); param0.add(3); param0.add(16); param0.add(45); param0.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N ) : B_Number = 0 cnt = 0 while ( N != 0 ) : rem = N % 2 c = pow ( 10 , cnt ) B_Number += rem * c N //= 2 cnt += 1 return B_Number ",,," if __name__ == '__main__': param = [ (18,), (92,), (87,), (50,), (56,), (88,), (3,), (16,), (45,), (58,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE{ static int f_gold ( int b , int m ) { return ( b / m - 1 ) * ( b / m ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(40); param0.add(38); param0.add(47); param0.add(52); param0.add(21); param0.add(50); param0.add(8); param0.add(56); param0.add(93); param0.add(21); List param1 = new ArrayList<>(); param1.add(74); param1.add(35); param1.add(71); param1.add(29); param1.add(9); param1.add(33); param1.add(82); param1.add(80); param1.add(5); param1.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( b , m ) : return ( b / m - 1 ) * ( b / m ) / 2 "," using namespace std; int f_gold ( int b, int m ) { return ( b / m - 1 ) * ( b / m ) / 2; } int main() { int n_success = 0; vector param0 {40,38,47,52,21,50,8,56,93,21}; vector param1 {74,35,71,29,9,33,82,80,5,90}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (40,74,), (38,35,), (47,71,), (52,29,), (21,9,), (50,33,), (8,82,), (56,80,), (93,5,), (21,90,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", K_TH_DIGIT_RAISED_POWER_B," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_DIGIT_RAISED_POWER_B{ public static int f_gold ( int a , int b , int k ) { int p = ( int ) Math . pow ( a , b ) ; int count = 0 ; while ( p > 0 && count < k ) { int rem = p % 10 ; count ++ ; if ( count == k ) return rem ; p = p / 10 ; } return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(11); param0.add(41); param0.add(5); param0.add(1); param0.add(24); param0.add(5); param0.add(66); param0.add(7); param0.add(77); param0.add(60); List param1 = new ArrayList<>(); param1.add(2); param1.add(3); param1.add(4); param1.add(2); param1.add(1); param1.add(2); param1.add(5); param1.add(10); param1.add(30); param1.add(50); List param2 = new ArrayList<>(); param2.add(1); param2.add(0); param2.add(3); param2.add(4); param2.add(5); param2.add(3); param2.add(8); param2.add(3); param2.add(10); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( a , b , k ) : p = a ** b count = 0 while ( p > 0 and count < k ) : rem = p % 10 count = count + 1 if ( count == k ) : return rem p = p / 10 ; "," using namespace std; int f_gold ( int a, int b, int k ) { int p = pow ( a, b ); int count = 0; while ( p > 0 && count < k ) { int rem = p % 10; count ++; if ( count == k ) return rem; p = p / 10; } return 0; } int main() { int n_success = 0; vector param0 {11,41,5,1,24,5,66,7,77,60}; vector param1 {2,3,4,2,1,2,5,10,30,50}; vector param2 {1,0,3,4,5,3,8,3,10,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ (11,2,1), (41,3,3), (5,4,3), (1,2,4), (24,1,5), (5,2,3), (66,5,8), (7,10,3), (77,30,10), (60,50,1) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", ARRAY_RANGE_QUERIES_ELEMENTS_FREQUENCY_VALUE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ARRAY_RANGE_QUERIES_ELEMENTS_FREQUENCY_VALUE{ static int f_gold ( int start , int end , int arr [ ] ) { Map < Integer , Integer > mp = new HashMap < > ( ) ; for ( int i = start ; i <= end ; i ++ ) mp . put ( arr [ i ] , mp . get ( arr [ i ] ) == null ? 1 : mp . get ( arr [ i ] ) + 1 ) ; int count = 0 ; for ( Map . Entry < Integer , Integer > entry : mp . entrySet ( ) ) if ( entry . getKey ( ) == entry . getValue ( ) ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(0); param0.add(1); param0.add(3); param0.add(10); param0.add(2); param0.add(0); param0.add(14); param0.add(29); param0.add(31); param0.add(21); List param1 = new ArrayList<>(); param1.add(31); param1.add(25); param1.add(4); param1.add(15); param1.add(3); param1.add(6); param1.add(18); param1.add(33); param1.add(19); param1.add(32); List param2 = new ArrayList<>(); param2.add(new int[]{1,2,2,3,3,3,12,13,18,18,26,28,29,36,37,39,40,49,55,57,63,69,69,73,85,86,87,87,89,89,90,91,92,93,93,93,95,99}); param2.add(new int[]{24,-62,2,1,94,56,-22,-70,-22,-34,-92,-18,56,2,60,38,-88,16,-28,30,-30,58,-80,94,6,56}); param2.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param2.add(new int[]{84,13,81,40,87,82,50,30,90,80,81,70,14,54,72,93,78,27,61}); param2.add(new int[]{-20,20,34,60,90}); param2.add(new int[]{1,0,0,0,0,0,0,0,0,0}); param2.add(new int[]{11,18,18,19,25,30,42,42,56,58,63,66,67,68,69,75,78,83,83}); param2.add(new int[]{-24,-82,24,-84,94,2,-30,86,58,-56,-96,60,-38,76,94,74,-98,-84,-38,46,4,-84,-90,-28,-50,46,16,28,-14,-82,-64,42,64,-2,-40,96,60,2,-86,32,38,-66}); param2.add(new int[]{0,0,0,0,0,0,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}); param2.add(new int[]{2,91,42,85,97,92,24,39,63,89,31,59,51,89,72,62,26,92,75,4,6,13,20,95,22,30,52,60,37,27,49,15,67,26}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( start , end , arr ) : frequency = dict ( ) for i in range ( start , end + 1 ) : if arr [ i ] in frequency.keys ( ) : frequency [ arr [ i ] ] += 1 else : frequency [ arr [ i ] ] = 1 count = 0 for x in frequency : if x == frequency [ x ] : count += 1 return count "," using namespace std; int f_gold ( int start, int end, int arr [ ] ) { unordered_map < int, int > frequency; for ( int i = start; i <= end; i ++ ) frequency [ arr [ i ] ] ++; int count = 0; for ( auto x : frequency ) if ( x . first == x . second ) count ++; return count; } int main() { int n_success = 0; vector param0 {0,1,3,10,2,0,14,29,31,21}; vector param1 {31,25,4,15,3,6,18,33,19,32}; vector> param2 { {1,2,2,3,3,3,12,13,18,18,26,28,29,36,37,39,40,49,55,57,63,69,69,73,85,86,87,87,89,89,90,91,92,93,93,93,95,99}, {24,-62,2,1,94,56,-22,-70,-22,-34,-92,-18,56,2,60,38,-88,16,-28,30,-30,58,-80,94,6,56}, {0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, {84,13,81,40,87,82,50,30,90,80,81,70,14,54,72,93,78,27,61}, {-20,20,34,60,90}, {1,0,0,0,0,0,0,0,0,0}, {11,18,18,19,25,30,42,42,56,58,63,66,67,68,69,75,78,83,83}, {-24,-82,24,-84,94,2,-30,86,58,-56,-96,60,-38,76,94,74,-98,-84,-38,46,4,-84,-90,-28,-50,46,16,28,-14,-82,-64,42,64,-2,-40,96,60,2,-86,32,38,-66}, {0,0,0,0,0,0,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}, {2,91,42,85,97,92,24,39,63,89,31,59,51,89,72,62,26,92,75,4,6,13,20,95,22,30,52,60,37,27,49,15,67,26}}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],¶m2[i].front()) == f_gold(param0[i],param1[i],¶m2[i].front())) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (0,31,[1,2,2,3,3,3,12,13,18,18,26,28,29,36,37,39,40,49,55,57,63,69,69,73,85,86,87,87,89,89,90,91,92,93,93,93,95,99],), (1,25,[24,-62,2,1,94,56,-22,-70,-22,-34,-92,-18,56,2,60,38,-88,16,-28,30,-30,58,-80,94,6,56],), (3,4,[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1],), (10,15,[84, 13, 81, 40, 87, 82, 50, 30, 90, 80, 81, 70, 14, 54, 72, 93, 78, 27, 61],), (2,3,[-20, 20, 34, 60, 90],), (0,6,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0],), (14,18,[11, 18, 18, 19, 25, 30, 42, 42, 56, 58, 63, 66, 67, 68, 69, 75, 78, 83, 83],), (29,33,[-24, -82, 24, -84, 94, 2, -30, 86, 58, -56, -96, 60, -38, 76, 94, 74, -98, -84, -38, 46, 4, -84, -90, -28, -50, 46, 16, 28, -14, -82, -64, 42, 64, -2, -40, 96, 60, 2, -86, 32, 38, -66],), (31,19,[0, 0, 0, 0, 0, 0, 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],), (21,32,[2, 91, 42, 85, 97, 92, 24, 39, 63, 89, 31, 59, 51, 89, 72, 62, 26, 92, 75, 4, 6, 13, 20, 95, 22, 30, 52, 60, 37, 27, 49, 15, 67, 26],) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUBARRAY_WITH_GIVEN_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUBARRAY_WITH_GIVEN_SUM{ static int f_gold ( int arr [ ] , int n , int sum ) { int curr_sum , i , j ; for ( i = 0 ; i < n ; i ++ ) { curr_sum = arr [ i ] ; for ( j = i + 1 ; j <= n ; j ++ ) { if ( curr_sum == sum ) { int p = j - 1 ; System . out . println ( ""Sum found between indexes "" + i + "" and "" + p ) ; return 1 ; } if ( curr_sum > sum || j == n ) break ; curr_sum = curr_sum + arr [ j ] ; } } System . out . println ( ""No subarray found"" ) ; return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,8,8,10,15,18,19,22,25,26,30,32,35,36,40,41,43,48,53,57,59,63,64,68,71,76,76,77,78,89,96,97}); param0.add(new int[]{-78,16,-16,-10,-2,-38,58,-72,-78,50,-68,-16,-96,82,70,2,-20}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{16,10,55,43,46,74,57,65,86,60,28,6,92}); param0.add(new int[]{-98,-98,-90,-84,-84,-80,-76,-76,-70,-54,-48,-46,-44,-42,-38,-14,-12,-4,6,8,24,28,32,40,40,42,64,84,98}); param0.add(new int[]{0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,1}); param0.add(new int[]{2,10,40,45,56,66,66,70,75,83,93,98}); param0.add(new int[]{-20,30,56,-68,54,-6,78,-86,88,-66,76,-66,62,78,22,46,-94,-10,18,16,-36,34,-98,-84,-40,98,82,10,12,54,-88}); param0.add(new int[]{0,0,1,1}); param0.add(new int[]{38,24,12}); List param1 = new ArrayList<>(); param1.add(26); param1.add(9); param1.add(9); param1.add(10); param1.add(23); param1.add(12); param1.add(10); param1.add(30); param1.add(2); param1.add(1); List param2 = new ArrayList<>(); param2.add(23); param2.add(12); param2.add(11); param2.add(6); param2.add(19); param2.add(8); param2.add(10); param2.add(17); param2.add(2); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , sum ) : for i in range ( n ) : curr_sum = arr [ i ] j = i + 1 while j <= n : if curr_sum == sum : print ( ""Sum found between"" ) print ( ""indexes %d and %d"" % ( i , j - 1 ) ) return 1 if curr_sum > sum or j == n : break curr_sum = curr_sum + arr [ j ] j += 1 print ( ""No subarray found"" ) return 0 "," using namespace std; int f_gold ( int arr [ ], int n, int sum ) { int curr_sum, i, j; for ( i = 0; i < n; i ++ ) { curr_sum = arr [ i ]; for ( j = i + 1; j <= n; j ++ ) { if ( curr_sum == sum ) { cout << ""Sum found between indexes "" << i << "" and "" << j - 1; return 1; } if ( curr_sum > sum || j == n ) break; curr_sum = curr_sum + arr [ j ]; } } cout << ""No subarray found""; return 0; } int main() { int n_success = 0; vector> param0 {{4,8,8,10,15,18,19,22,25,26,30,32,35,36,40,41,43,48,53,57,59,63,64,68,71,76,76,77,78,89,96,97},{-78,16,-16,-10,-2,-38,58,-72,-78,50,-68,-16,-96,82,70,2,-20},{0,0,0,0,0,0,0,0,1,1,1,1,1,1},{16,10,55,43,46,74,57,65,86,60,28,6,92},{-98,-98,-90,-84,-84,-80,-76,-76,-70,-54,-48,-46,-44,-42,-38,-14,-12,-4,6,8,24,28,32,40,40,42,64,84,98},{0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,1},{2,10,40,45,56,66,66,70,75,83,93,98},{-20,30,56,-68,54,-6,78,-86,88,-66,76,-66,62,78,22,46,-94,-10,18,16,-36,34,-98,-84,-40,98,82,10,12,54,-88},{0,0,1,1},{38,24,12}}; vector param1 {26,9,9,10,23,12,10,30,2,1}; vector param2 {23,12,11,6,19,8,10,17,2,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 8, 8, 10, 15, 18, 19, 22, 25, 26, 30, 32, 35, 36, 40, 41, 43, 48, 53, 57, 59, 63, 64, 68, 71, 76, 76, 77, 78, 89, 96, 97],26,23,), ([-78, 16, -16, -10, -2, -38, 58, -72, -78, 50, -68, -16, -96, 82, 70, 2, -20],9,12,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],9,11,), ([16, 10, 55, 43, 46, 74, 57, 65, 86, 60, 28, 6, 92],10,6,), ([-98, -98, -90, -84, -84, -80, -76, -76, -70, -54, -48, -46, -44, -42, -38, -14, -12, -4, 6, 8, 24, 28, 32, 40, 40, 42, 64, 84, 98],23,19,), ([0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],12,8,), ([2, 10, 40, 45, 56, 66, 66, 70, 75, 83, 93, 98],10,10,), ([-20, 30, 56, -68, 54, -6, 78, -86, 88, -66, 76, -66, 62, 78, 22, 46, -94, -10, 18, 16, -36, 34, -98, -84, -40, 98, 82, 10, 12, 54, -88],30,17,), ([0, 0, 1, 1],2,2,), ([38, 24, 12],1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int res = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int curr_sum = 0 ; for ( int j = 0 ; j < n ; j ++ ) { int index = ( i + j ) % n ; curr_sum += j * arr [ index ] ; } res = Math . max ( res , curr_sum ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97}); param0.add(new int[]{-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{48,2,79,98,28,17,41,47,61,76,82,5,74,4,80,51,22,45,91,75,91,93,42,45,69,98,76,74,83,17,30,88,53,25,35,19,26}); param0.add(new int[]{-88,-84,-82,-74,-44,-34,-32,-20,-20,-14,6,6,10,12,16,24,32,34,38,46,54,54,56,60,82,88,90,94,98}); param0.add(new int[]{0,1,1,1,1,0,1,1,1,1,1,1,1}); param0.add(new int[]{10,14,14,14,19,20,22,26,35,36,40,53,54,55,55,57,57,67,72,72,77,78,83,84,95,96}); param0.add(new int[]{-80,18,-76,48,-52,-38,52,-82,40,-44,-90,86,-86,-36,-32,-2,56,-12,-88,14,-16,8,52,24,46,56,84,-36,84,-60,72,-46,32,-16,-20,68,-86,-62,58,8,78,-52,22,-28,-22,-42,12,-48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{20,94,36,2,50,62,84,50,66,75,1,18,41,48,72,61,86,22,54,6,71,46,92,68,59,51,89,31,58,78,82,84}); List param1 = new ArrayList<>(); param1.add(11); param1.add(22); param1.add(33); param1.add(20); param1.add(24); param1.add(7); param1.add(16); param1.add(30); param1.add(14); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n ) : res = - sys.maxsize for i in range ( 0 , n ) : curr_sum = 0 for j in range ( 0 , n ) : index = int ( ( i + j ) % n ) curr_sum += j * arr [ index ] res = max ( res , curr_sum ) return res "," using namespace std; int f_gold ( int arr [ ], int n ) { int res = INT_MIN; for ( int i = 0; i < n; i ++ ) { int curr_sum = 0; for ( int j = 0; j < n; j ++ ) { int index = ( i + j ) % n; curr_sum += j * arr [ index ]; } res = max ( res, curr_sum ); } return res; } int main() { int n_success = 0; vector> param0 {{11,12,16,26,29,40,54,59,65,70,71,73,78,81,87,87,88,90,95,97},{-46,-32,54,96,-72,-58,-36,-44,26,-2,-68,42,90,26,-92,-96,88,-42,-18,46,-70,24,0,24,34,34,-52,50,94,-60,64,58},{0,0,0,0,0,0,0,0,0,0,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},{48,2,79,98,28,17,41,47,61,76,82,5,74,4,80,51,22,45,91,75,91,93,42,45,69,98,76,74,83,17,30,88,53,25,35,19,26},{-88,-84,-82,-74,-44,-34,-32,-20,-20,-14,6,6,10,12,16,24,32,34,38,46,54,54,56,60,82,88,90,94,98},{0,1,1,1,1,0,1,1,1,1,1,1,1},{10,14,14,14,19,20,22,26,35,36,40,53,54,55,55,57,57,67,72,72,77,78,83,84,95,96},{-80,18,-76,48,-52,-38,52,-82,40,-44,-90,86,-86,-36,-32,-2,56,-12,-88,14,-16,8,52,24,46,56,84,-36,84,-60,72,-46,32,-16,-20,68,-86,-62,58,8,78,-52,22,-28,-22,-42,12,-48},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{20,94,36,2,50,62,84,50,66,75,1,18,41,48,72,61,86,22,54,6,71,46,92,68,59,51,89,31,58,78,82,84}}; vector param1 {11,22,33,20,24,7,16,30,14,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([11, 12, 16, 26, 29, 40, 54, 59, 65, 70, 71, 73, 78, 81, 87, 87, 88, 90, 95, 97],11,), ([-46, -32, 54, 96, -72, -58, -36, -44, 26, -2, -68, 42, 90, 26, -92, -96, 88, -42, -18, 46, -70, 24, 0, 24, 34, 34, -52, 50, 94, -60, 64, 58],22,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],33,), ([48, 2, 79, 98, 28, 17, 41, 47, 61, 76, 82, 5, 74, 4, 80, 51, 22, 45, 91, 75, 91, 93, 42, 45, 69, 98, 76, 74, 83, 17, 30, 88, 53, 25, 35, 19, 26],20,), ([-88, -84, -82, -74, -44, -34, -32, -20, -20, -14, 6, 6, 10, 12, 16, 24, 32, 34, 38, 46, 54, 54, 56, 60, 82, 88, 90, 94, 98],24,), ([0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1],7,), ([10, 14, 14, 14, 19, 20, 22, 26, 35, 36, 40, 53, 54, 55, 55, 57, 57, 67, 72, 72, 77, 78, 83, 84, 95, 96],16,), ([-80, 18, -76, 48, -52, -38, 52, -82, 40, -44, -90, 86, -86, -36, -32, -2, 56, -12, -88, 14, -16, 8, 52, 24, 46, 56, 84, -36, 84, -60, 72, -46, 32, -16, -20, 68, -86, -62, 58, 8, 78, -52, 22, -28, -22, -42, 12, -48],30,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],14,), ([20, 94, 36, 2, 50, 62, 84, 50, 66, 75, 1, 18, 41, 48, 72, 61, 86, 22, 54, 6, 71, 46, 92, 68, 59, 51, 89, 31, 58, 78, 82, 84],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND{ public static int f_gold ( int arr1 [ ] , int arr2 [ ] , int n1 , int n2 ) { Arrays . sort ( arr1 ) ; Arrays . sort ( arr2 ) ; return arr1 [ n1 - 1 ] * arr2 [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,11,12,12,14,14,15,33,51,51,61,63,68,69,75,83,84,97}); param0.add(new int[]{88,-10,-18,74,56,-36,-86,72,76,26,-36,10,-6,-80,-34,14,-82,74,48,-76,-78,-50,-62,-86,96,22,42,-28,18,6,58,-72,54}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{84,2,52,25,38,63,10,44,36,12,67,25,79,36,12,14,14,18,32,8,94,34,9,72,27,44,75,80,28,57,34,67,26,21,53,92,31,87,62}); param0.add(new int[]{-64,-60,-36,-36,-34,-32,-18,-16,-2,6,22,36,42,46,52,54,70,94}); param0.add(new int[]{0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,1,0,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0}); param0.add(new int[]{24,36,73}); param0.add(new int[]{86,-46,76,66,38,24,-10,-10,-88,-22,54,12,42,20,-6,-44,-26,78,-46,-88,-6,-24,72,-38,26,84,-70,90,56,-4,94,-72,-44,-40,-8,18,4,-72,72,-72,-38}); param0.add(new int[]{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}); param0.add(new int[]{41,47,59,85,10,38,4,63,74,71,76,32,54,40,20,38,17,76,87,49,53,73,92,90,36,76,1,65,62,10,93,65}); List param1 = new ArrayList<>(); param1.add(new int[]{4,4,5,12,16,27,28,41,44,60,73,76,77,90,91,92,96,96}); param1.add(new int[]{24,-26,38,28,94,64,-36,42,62,-50,-12,-18,-72,-76,26,-4,44,-98,32,-48,54,-66,-84,16,-12,-30,-58,42,-88,-40,66,-66,30}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param1.add(new int[]{92,20,7,22,79,50,27,19,2,58,93,19,60,45,16,50,87,31,45,8,89,39,61,76,48,92,22,18,19,35,54,32,81,57,22,29,63,83,20}); param1.add(new int[]{-96,-92,-64,-44,-22,-22,-22,-20,6,8,14,16,24,40,46,54,76,78}); param1.add(new int[]{0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1}); param1.add(new int[]{5,41,60}); param1.add(new int[]{-30,-38,58,-6,-2,-18,34,24,-52,56,-80,-82,20,64,54,-96,70,-78,78,54,6,-4,34,0,90,-74,-50,-40,16,-48,-4,78,80,-98,-12,-64,94,-42,-22,-34,96}); param1.add(new int[]{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}); param1.add(new int[]{62,30,71,1,83,88,62,50,88,80,22,98,62,43,84,21,23,89,78,5,36,21,17,30,54,88,66,48,83,12,4,50}); List param2 = new ArrayList<>(); param2.add(10); param2.add(20); param2.add(40); param2.add(32); param2.add(11); param2.add(37); param2.add(2); param2.add(20); param2.add(38); param2.add(26); List param3 = new ArrayList<>(); param3.add(15); param3.add(27); param3.add(39); param3.add(19); param3.add(10); param3.add(44); param3.add(2); param3.add(28); param3.add(35); param3.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) { sort ( arr1, arr1 + n1 ); sort ( arr2, arr2 + n2 ); return arr1 [ n1 - 1 ] * arr2 [ 0 ]; } int main() { int n_success = 0; vector> param0 {{4,11,12,12,14,14,15,33,51,51,61,63,68,69,75,83,84,97},{88,-10,-18,74,56,-36,-86,72,76,26,-36,10,-6,-80,-34,14,-82,74,48,-76,-78,-50,-62,-86,96,22,42,-28,18,6,58,-72,54},{0,0,0,0,0,0,0,0,0,0,0,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},{84,2,52,25,38,63,10,44,36,12,67,25,79,36,12,14,14,18,32,8,94,34,9,72,27,44,75,80,28,57,34,67,26,21,53,92,31,87,62},{-64,-60,-36,-36,-34,-32,-18,-16,-2,6,22,36,42,46,52,54,70,94},{0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,1,0,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0},{24,36,73},{86,-46,76,66,38,24,-10,-10,-88,-22,54,12,42,20,-6,-44,-26,78,-46,-88,-6,-24,72,-38,26,84,-70,90,56,-4,94,-72,-44,-40,-8,18,4,-72,72,-72,-38},{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},{41,47,59,85,10,38,4,63,74,71,76,32,54,40,20,38,17,76,87,49,53,73,92,90,36,76,1,65,62,10,93,65}}; vector> param1 {{4,4,5,12,16,27,28,41,44,60,73,76,77,90,91,92,96,96},{24,-26,38,28,94,64,-36,42,62,-50,-12,-18,-72,-76,26,-4,44,-98,32,-48,54,-66,-84,16,-12,-30,-58,42,-88,-40,66,-66,30},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{92,20,7,22,79,50,27,19,2,58,93,19,60,45,16,50,87,31,45,8,89,39,61,76,48,92,22,18,19,35,54,32,81,57,22,29,63,83,20},{-96,-92,-64,-44,-22,-22,-22,-20,6,8,14,16,24,40,46,54,76,78},{0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1},{5,41,60},{-30,-38,58,-6,-2,-18,34,24,-52,56,-80,-82,20,64,54,-96,70,-78,78,54,6,-4,34,0,90,-74,-50,-40,16,-48,-4,78,80,-98,-12,-64,94,-42,-22,-34,96},{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},{62,30,71,1,83,88,62,50,88,80,22,98,62,43,84,21,23,89,78,5,36,21,17,30,54,88,66,48,83,12,4,50}}; vector param2 {10,20,40,32,11,37,2,20,38,26}; vector param3 {15,27,39,19,10,44,2,28,35,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, PRINT_MAXIMUM_SHORTEST_DISTANCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRINT_MAXIMUM_SHORTEST_DISTANCE{ static int f_gold ( int a [ ] , int n , int k ) { HashMap < Integer , Integer > b = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int x = a [ i ] ; int d = Math . min ( 1 + i , n - i ) ; if ( ! b . containsKey ( x ) ) b . put ( x , d ) ; else { b . put ( x , Math . min ( d , b . get ( x ) ) ) ; } } int ans = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int x = a [ i ] ; if ( x != k - x && b . containsKey ( k - x ) ) ans = Math . min ( Math . max ( b . get ( x ) , b . get ( k - x ) ) , ans ) ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,27,66,89,96,96}); param0.add(new int[]{84,-38,-56,-20,-98,-40,-16,22,20,98,-56,-32,-44,30,-58,26,-44,-32,50,46,92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{20,71,66,58,74,2,63,13,1,36,28,83,24,20,85,30,59,56,8,97,58,28,28,42}); param0.add(new int[]{-94,-88,-86,-68,-66,-64,-28,-12,4,18,22,28,32,34,34,40,44,46,60,68,72,78,80,84,88,96}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,0,0,0,1,1,1}); param0.add(new int[]{8,13,54,59,61,69,89,90,92}); param0.add(new int[]{-58,50,-74,-8,-50,90,90,-2,-22,8,-76,16,4,56,94,36,28,-42,80,-88,88,52,74,40,12,-72,-50,50,88,-54,32,-24,-48,-66,-86,40,-6,14,10,-88,56,80,-34}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{2,60,66,39,18,60,37,75,3,64,24,16,72,95,96,44,23,58,58,33,24,96}); List param1 = new ArrayList<>(); param1.add(4); param1.add(13); param1.add(23); param1.add(23); param1.add(16); param1.add(8); param1.add(4); param1.add(27); param1.add(9); param1.add(21); List param2 = new ArrayList<>(); param2.add(4); param2.add(11); param2.add(13); param2.add(17); param2.add(15); param2.add(13); param2.add(8); param2.add(42); param2.add(12); param2.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n , k ) : b = dict ( ) for i in range ( n ) : x = a [ i ] d = min ( 1 + i , n - i ) if x not in b.keys ( ) : b [ x ] = d else : b [ x ] = min ( d , b [ x ] ) ans = 10 ** 9 for i in range ( n ) : x = a [ i ] if ( x != ( k - x ) and ( k - x ) in b.keys ( ) ) : ans = min ( max ( b [ x ] , b [ k - x ] ) , ans ) return ans "," using namespace std; int f_gold ( int a [ ], int n, int k ) { unordered_map < int, int > b; for ( int i = 0; i < n; i ++ ) { int x = a [ i ]; int d = min ( 1 + i, n - i ); if ( b . find ( x ) == b . end ( ) ) b [ x ] = d; else b [ x ] = min ( d, b [ x ] ); } int ans = INT_MAX; for ( int i = 0; i < n; i ++ ) { int x = a [ i ]; if ( x != k - x && b . find ( k - x ) != b . end ( ) ) ans = min ( max ( b [ x ], b [ k - x ] ), ans ); } return ans; } int main() { int n_success = 0; vector> param0 {{2,27,66,89,96,96},{84,-38,-56,-20,-98,-40,-16,22,20,98,-56,-32,-44,30,-58,26,-44,-32,50,46,92},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{20,71,66,58,74,2,63,13,1,36,28,83,24,20,85,30,59,56,8,97,58,28,28,42},{-94,-88,-86,-68,-66,-64,-28,-12,4,18,22,28,32,34,34,40,44,46,60,68,72,78,80,84,88,96},{0,0,0,0,0,1,1,1,1,0,0,0,1,1,1},{8,13,54,59,61,69,89,90,92},{-58,50,-74,-8,-50,90,90,-2,-22,8,-76,16,4,56,94,36,28,-42,80,-88,88,52,74,40,12,-72,-50,50,88,-54,32,-24,-48,-66,-86,40,-6,14,10,-88,56,80,-34},{0,0,0,0,0,0,0,1,1,1,1,1,1,1},{2,60,66,39,18,60,37,75,3,64,24,16,72,95,96,44,23,58,58,33,24,96}}; vector param1 {4,13,23,23,16,8,4,27,9,21}; vector param2 {4,11,13,17,15,13,8,42,12,17}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 27, 66, 89, 96, 96],4,4,), ([84, -38, -56, -20, -98, -40, -16, 22, 20, 98, -56, -32, -44, 30, -58, 26, -44, -32, 50, 46, 92],13,11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,13,), ([20, 71, 66, 58, 74, 2, 63, 13, 1, 36, 28, 83, 24, 20, 85, 30, 59, 56, 8, 97, 58, 28, 28, 42],23,17,), ([-94, -88, -86, -68, -66, -64, -28, -12, 4, 18, 22, 28, 32, 34, 34, 40, 44, 46, 60, 68, 72, 78, 80, 84, 88, 96],16,15,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1],8,13,), ([8, 13, 54, 59, 61, 69, 89, 90, 92],4,8,), ([-58, 50, -74, -8, -50, 90, 90, -2, -22, 8, -76, 16, 4, 56, 94, 36, 28, -42, 80, -88, 88, 52, 74, 40, 12, -72, -50, 50, 88, -54, 32, -24, -48, -66, -86, 40, -6, 14, 10, -88, 56, 80, -34],27,42,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],9,12,), ([2, 60, 66, 39, 18, 60, 37, 75, 3, 64, 24, 16, 72, 95, 96, 44, 23, 58, 58, 33, 24, 96],21,17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N_1{ static int f_gold ( int n ) { return ( ( n + 1 ) * ( n + 2 ) ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(41); param0.add(72); param0.add(54); param0.add(75); param0.add(87); param0.add(41); param0.add(78); param0.add(80); param0.add(46); param0.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return int ( ( ( n + 1 ) * ( n + 2 ) ) / 2 ) "," using namespace std; int f_gold ( int n ) { return ( ( n + 1 ) * ( n + 2 ) ) / 2; } int main() { int n_success = 0; vector param0 {41,72,54,75,87,41,78,80,46,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (41,), (72,), (54,), (75,), (87,), (41,), (78,), (80,), (46,), (9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS_1{ public static int f_gold ( int a , int b , int x , int y ) { if ( a == 0 ) { x = 0 ; y = 1 ; return b ; } int x1 = 1 , y1 = 1 ; int gcd = f_gold ( b % a , a , x1 , y1 ) ; x = y1 - ( b / a ) * x1 ; y = x1 ; return gcd ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(44); param0.add(33); param0.add(39); param0.add(52); param0.add(64); param0.add(45); param0.add(53); param0.add(86); param0.add(57); param0.add(11); List param1 = new ArrayList<>(); param1.add(17); param1.add(81); param1.add(77); param1.add(96); param1.add(48); param1.add(32); param1.add(88); param1.add(19); param1.add(67); param1.add(86); List param2 = new ArrayList<>(); param2.add(10); param2.add(67); param2.add(21); param2.add(23); param2.add(17); param2.add(89); param2.add(24); param2.add(29); param2.add(30); param2.add(96); List param3 = new ArrayList<>(); param3.add(65); param3.add(20); param3.add(34); param3.add(97); param3.add(33); param3.add(3); param3.add(74); param3.add(21); param3.add(32); param3.add(81); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , x , y ) : if a == 0 : x = 0 y = 1 return b x1 = 1 y1 = 1 gcd = f_gold ( b % a , a , x1 , y1 ) x = y1 - ( b / a ) * x1 y = x1 return gcd ",,," if __name__ == '__main__': param = [ (44,17,10,65,), (33,81,67,20,), (39,77,21,34,), (52,96,23,97,), (64,48,17,33,), (45,32,89,3,), (53,88,24,74,), (86,19,29,21,), (57,67,30,32,), (11,86,96,81,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING{ static int f_gold ( String str ) { int n = str . length ( ) ; int [ ] [ ] C = new int [ n ] [ n ] ; boolean [ ] [ ] P = new boolean [ n ] [ n ] ; int i , j , k , L ; for ( i = 0 ; i < n ; i ++ ) { P [ i ] [ i ] = true ; C [ i ] [ i ] = 0 ; } for ( L = 2 ; L <= n ; L ++ ) { for ( i = 0 ; i < n - L + 1 ; i ++ ) { j = i + L - 1 ; if ( L == 2 ) P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) ; else P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) && P [ i + 1 ] [ j - 1 ] ; if ( P [ i ] [ j ] == true ) C [ i ] [ j ] = 0 ; else { C [ i ] [ j ] = Integer . MAX_VALUE ; for ( k = i ; k <= j - 1 ; k ++ ) C [ i ] [ j ] = Integer . min ( C [ i ] [ j ] , C [ i ] [ k ] + C [ k + 1 ] [ j ] + 1 ) ; } } } return C [ 0 ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ydYdV""); param0.add(""4446057""); param0.add(""0111""); param0.add(""keEj""); param0.add(""642861576557""); param0.add(""11111000101""); param0.add(""ram""); param0.add(""09773261""); param0.add(""1""); param0.add(""AVBEKClFdj""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) C = [ [ 0 for i in range ( n ) ] for i in range ( n ) ] P = [ [ False for i in range ( n ) ] for i in range ( n ) ] j = 0 k = 0 L = 0 for i in range ( n ) : P [ i ] [ i ] = True ; C [ i ] [ i ] = 0 ; for L in range ( 2 , n + 1 ) : for i in range ( n - L + 1 ) : j = i + L - 1 if L == 2 : P [ i ] [ j ] = ( str [ i ] == str [ j ] ) else : P [ i ] [ j ] = ( ( str [ i ] == str [ j ] ) and P [ i + 1 ] [ j - 1 ] ) if P [ i ] [ j ] == True : C [ i ] [ j ] = 0 else : C [ i ] [ j ] = 100000000 for k in range ( i , j ) : C [ i ] [ j ] = min ( C [ i ] [ j ] , C [ i ] [ k ] + C [ k + 1 ] [ j ] + 1 ) return C [ 0 ] [ n - 1 ] ",,," if __name__ == '__main__': param = [ ('ydYdV',), ('4446057',), ('0111',), ('keEj',), ('642861576557',), ('11111000101',), ('ram',), ('09773261',), ('1',), ('AVBEKClFdj',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_WORDS_APPEAR_EXACTLY_TWO_TIMES_ARRAY_WORDS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_WORDS_APPEAR_EXACTLY_TWO_TIMES_ARRAY_WORDS{ static int f_gold ( String str [ ] , int n ) { HashMap < String , Integer > m = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( m . containsKey ( str [ i ] ) ) { int get = m . get ( str [ i ] ) ; m . put ( str [ i ] , get + 1 ) ; } else { m . put ( str [ i ] , 1 ) ; } } int res = 0 ; for ( Map . Entry < String , Integer > it : m . entrySet ( ) ) { if ( it . getValue ( ) == 2 ) res ++ ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new String[]{""hate"", ""love"", ""peace"", ""love"", ""peace"", ""hate"", ""love"", ""peace"", ""love"", ""peace""}); param0.add(new String[]{""16"",""946613197072"",""532052"",""42780833"",""511552"",""1241934"",""4"",""3444540"",""47487223670074"",""23753"",""14158"",""4"",""95420017116714"",""16"",""0845"",""689000748"",""976403809728"",""8922"",""487784120896"",""329"",""611"",""59101"",""611"",""2131059721"",""53952148295020"",""445948587"",""3905249775372"",""4683180907"",""7169093"",""01413852276627"",""63"",""5864"",""40862536595"",""2280304422294"",""930028582"",""05"",""33447""}); param0.add(new String[]{""001000100000"",""1010"",""01011"",""11"",""011"",""1010""}); param0.add(new String[]{""Om"", ""Om"", ""Shankar"", ""Tripathi"", ""Tom"", ""Jerry"", ""Jerry""}); param0.add(new String[]{""2"",""644"",""2"",""42484637089"",""81578664"",""0778""}); param0.add(new String[]{""001000101"",""011010"",""1"",""101010011"",""011010"",""01"",""10111000101"",""0"",""1"",""00101101"",""0"",""0""}); param0.add(new String[]{""kl"",""p sH"",""PwCPMPu"",""tQoIgPpk"",""wtsNP WjS"",""kl "",""TXsFWgU"",""kl"",""AD"",""NjjTyFGwNWZcB"",""jpFQslbGbDI"",""cEpGAgvpk"",""EMaDkMOm"",""YZuNZgfwDIjG"",""k"",""hJx jHmGpQYwQP"",""CIETe"",""RH"",""Pj"",""h"",""DInR"",""AEsqOvliQtz"",""NwzHTALTt LS"",""LwLR"",""WvDCzlQF"",""soJb"",""WktoldCbWyTO"",""pIdRJxY"",""BmpWxjOwTXkjjL"",""zmtCiQ"",""g"",""yBmDW"",""QhaBZrQnOJaAJ"",""u"",""MGTwCKve"",""UxYQrONag"",""xsGSz"",""dqNPTT"",""U W"",""ygJKvCEKDClby"",""M"",""yXJQHxjyDQDLkT"",""oJmaREOEk YA"",""zUwiwhSMdiC"",""jYgZEktcdgLD"",""fwyTAAW"",""GENttdzeGY ""}); param0.add(new String[]{""938"",""074209"",""0949093096"",""218622476"",""71692175"",""0714"",""81217924991"",""74016430795374"",""52213147"",""338"",""939"",""798161500954"",""90528060774015"",""68715"",""75810"",""43450"",""8017"",""0193164"",""5945740"",""212"",""4589289"",""2912211026"",""0"",""49"",""8230114"",""0733435391403"",""5429"",""10070""}); param0.add(new String[]{""00"",""0"",""00"",""0101111010100"",""110""}); param0.add(new String[]{""g"",""h"",""ok"",""h"",""ok"",""sqozuC"",""ut"",""ZwRcG"",""ok"",""MR"",""jHrWyy"",""qaJlrokgRHuZH"",""LjPNzDUKszYmCq"",""g"",""ZGjLfMnyAGL"",""kEZoSxOMEWSFpw"",""IFtqNaDVnG"",""iJoJXl"",""vjrQMyWor"",""FTEHZqbHGlmHph"",""QeSdzm"",""nPostKHkigyJt"",""mOSekk""}); List param1 = new ArrayList<>(); param1.add(10); param1.add(32); param1.add(6); param1.add(7); param1.add(6); param1.add(12); param1.add(43); param1.add(20); param1.add(4); param1.add(15); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( stri , n ) : m = dict ( ) for i in range ( n ) : m [ stri [ i ] ] = m.get ( stri [ i ] , 0 ) + 1 res = 0 for i in m.values ( ) : if i == 2 : res += 1 return res "," using namespace std; int f_gold ( string str [ ], int n ) { unordered_map < string, int > m; for ( int i = 0; i < n; i ++ ) m [ str [ i ] ] += 1; int res = 0; for ( auto it = m . begin ( ); it != m . end ( ); it ++ ) if ( ( it -> second == 2 ) ) res ++; return res; } int main() { int n_success = 0; vector> param0 { {""hate"", ""love"", ""peace"", ""love"", ""peace"", ""hate"", ""love"", ""peace"", ""love"", ""peace""}, {""16"",""946613197072"",""532052"",""42780833"",""511552"",""1241934"",""4"",""3444540"",""47487223670074"",""23753"",""14158"",""4"",""95420017116714"",""16"",""0845"",""689000748"",""976403809728"",""8922"",""487784120896"",""329"",""611"",""59101"",""611"",""2131059721"",""53952148295020"",""445948587"",""3905249775372"",""4683180907"",""7169093"",""01413852276627"",""63"",""5864"",""40862536595"",""2280304422294"",""930028582"",""05"",""33447""}, {""001000100000"",""1010"",""01011"",""11"",""011"",""1010""}, {""Om"", ""Om"", ""Shankar"", ""Tripathi"", ""Tom"", ""Jerry"", ""Jerry""}, {""2"",""644"",""2"",""42484637089"",""81578664"",""0778""}, {""001000101"",""011010"",""1"",""101010011"",""011010"",""01"",""10111000101"",""0"",""1"",""00101101"",""0"",""0""}, {""kl"",""p sH"",""PwCPMPu"",""tQoIgPpk"",""wtsNP WjS"",""kl "",""TXsFWgU"",""kl"",""AD"",""NjjTyFGwNWZcB"",""jpFQslbGbDI"",""cEpGAgvpk"",""EMaDkMOm"",""YZuNZgfwDIjG"",""k"",""hJx jHmGpQYwQP"",""CIETe"",""RH"",""Pj"",""h"",""DInR"",""AEsqOvliQtz"",""NwzHTALTt LS"",""LwLR"",""WvDCzlQF"",""soJb"",""WktoldCbWyTO"",""pIdRJxY"",""BmpWxjOwTXkjjL"",""zmtCiQ"",""g"",""yBmDW"",""QhaBZrQnOJaAJ"",""u"",""MGTwCKve"",""UxYQrONag"",""xsGSz"",""dqNPTT"",""U W"",""ygJKvCEKDClby"",""M"",""yXJQHxjyDQDLkT"",""oJmaREOEk YA"",""zUwiwhSMdiC"",""jYgZEktcdgLD"",""fwyTAAW"",""GENttdzeGY ""}, {""938"",""074209"",""0949093096"",""218622476"",""71692175"",""0714"",""81217924991"",""74016430795374"",""52213147"",""338"",""939"",""798161500954"",""90528060774015"",""68715"",""75810"",""43450"",""8017"",""0193164"",""5945740"",""212"",""4589289"",""2912211026"",""0"",""49"",""8230114"",""0733435391403"",""5429"",""10070""}, {""00"",""0"",""00"",""0101111010100"",""110""}, {""g"",""h"",""ok"",""h"",""ok"",""sqozuC"",""ut"",""ZwRcG"",""ok"",""MR"",""jHrWyy"",""qaJlrokgRHuZH"",""LjPNzDUKszYmCq"",""g"",""ZGjLfMnyAGL"",""kEZoSxOMEWSFpw"",""IFtqNaDVnG"",""iJoJXl"",""vjrQMyWor"",""FTEHZqbHGlmHph"",""QeSdzm"",""nPostKHkigyJt"",""mOSekk""}}; vector param1 {10,32,6,7,6,12,43,20,4,15}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([""hate"", ""love"", ""peace"", ""love"", ""peace"", ""hate"", ""love"", ""peace"", ""love"", ""peace""],10,), ([""16"",""946613197072"",""532052"",""42780833"",""511552"",""1241934"",""4"",""3444540"",""47487223670074"",""23753"",""14158"",""4"",""95420017116714"",""16"",""0845"",""689000748"",""976403809728"",""8922"",""487784120896"",""329"",""611"",""59101"",""611"",""2131059721"",""53952148295020"",""445948587"",""3905249775372"",""4683180907"",""7169093"",""01413852276627"",""63"",""5864"",""40862536595"",""2280304422294"",""930028582"",""05"",""33447""],32,), ([""001000100000"",""1010"",""01011"",""11"",""011"",""1010""],6,), ([""Om"", ""Om"", ""Shankar"", ""Tripathi"", ""Tom"", ""Jerry"", ""Jerry""],7,), ([""2"",""644"",""2"",""42484637089"",""81578664"",""0778""],6,), ([""001000101"",""011010"",""1"",""101010011"",""011010"",""01"",""10111000101"",""0"",""1"",""00101101"",""0"",""0""],12,), ([""kl"",""p sH"",""PwCPMPu"",""tQoIgPpk"",""wtsNP WjS"",""kl "",""TXsFWgU"",""kl"",""AD"",""NjjTyFGwNWZcB"",""jpFQslbGbDI"",""cEpGAgvpk"",""EMaDkMOm"",""YZuNZgfwDIjG"",""k"",""hJx jHmGpQYwQP"",""CIETe"",""RH"",""Pj"",""h"",""DInR"",""AEsqOvliQtz"",""NwzHTALTt LS"",""LwLR"",""WvDCzlQF"",""soJb"",""WktoldCbWyTO"",""pIdRJxY"",""BmpWxjOwTXkjjL"",""zmtCiQ"",""g"",""yBmDW"",""QhaBZrQnOJaAJ"",""u"",""MGTwCKve"",""UxYQrONag"",""xsGSz"",""dqNPTT"",""U W"",""ygJKvCEKDClby"",""M"",""yXJQHxjyDQDLkT"",""oJmaREOEk YA"",""zUwiwhSMdiC"",""jYgZEktcdgLD"",""fwyTAAW"",""GENttdzeGY ""],43,), ([""938"",""074209"",""0949093096"",""218622476"",""71692175"",""0714"",""81217924991"",""74016430795374"",""52213147"",""338"",""939"",""798161500954"",""90528060774015"",""68715"",""75810"",""43450"",""8017"",""0193164"",""5945740"",""212"",""4589289"",""2912211026"",""0"",""49"",""8230114"",""0733435391403"",""5429"",""10070""],20,), ([""00"",""0"",""00"",""0101111010100"",""110""],4,), ([""g"",""h"",""ok"",""h"",""ok"",""sqozuC"",""ut"",""ZwRcG"",""ok"",""MR"",""jHrWyy"",""qaJlrokgRHuZH"",""LjPNzDUKszYmCq"",""g"",""ZGjLfMnyAGL"",""kEZoSxOMEWSFpw"",""IFtqNaDVnG"",""iJoJXl"",""vjrQMyWor"",""FTEHZqbHGlmHph"",""QeSdzm"",""nPostKHkigyJt"",""mOSekk""],15,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NEXT_POWER_OF_2_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NEXT_POWER_OF_2_2{ static int f_gold ( int n ) { n -- ; n |= n >> 1 ; n |= n >> 2 ; n |= n >> 4 ; n |= n >> 8 ; n |= n >> 16 ; n ++ ; return n ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(63); param0.add(78); param0.add(13); param0.add(5); param0.add(34); param0.add(69); param0.add(63); param0.add(78); param0.add(80); param0.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : n -= 1 n |= n >> 1 n |= n >> 2 n |= n >> 4 n |= n >> 8 n |= n >> 16 n += 1 return n "," using namespace std; unsigned int f_gold ( unsigned int n ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; } int main() { int n_success = 0; vector param0 {63,78,13,5,34,69,63,78,80,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (63,), (78,), (13,), (5,), (34,), (69,), (63,), (78,), (80,), (19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S{ static int f_gold ( int A [ ] , int B [ ] , int m , int n ) { int dp [ ] [ ] = new int [ n + 1 ] [ m + 1 ] ; for ( int [ ] row : dp ) Arrays . fill ( row , 0 ) ; for ( int i = 1 ; i <= n ; i ++ ) for ( int j = i ; j <= m ; j ++ ) dp [ i ] [ j ] = Math . max ( ( dp [ i - 1 ] [ j - 1 ] + ( A [ j - 1 ] * B [ i - 1 ] ) ) , dp [ i ] [ j - 1 ] ) ; return dp [ n ] [ m ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,9,22,68}); param0.add(new int[]{24,40,98,58,-24,24,76,48,-92,-16,-46,-48,-70,88,66,2,44,36,34,34,46,90,-80,-24,-58,68,72,-20,-62,-40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{32,15,41,41,4,42,22,33,33,11,68,5,41,80,39,15,36,75,41,11,25,40,50,19,39,12,75,28,52,20,63,5,27,53,19,62,98,72,10,90,74,93,52,81,91,65,90,93}); param0.add(new int[]{-94,-76,-68,-50,-28,-20,18,24,30,54,74,84,98}); param0.add(new int[]{1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,1,0}); param0.add(new int[]{14,27,43,49}); param0.add(new int[]{78,-26,-12,38,-90}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{12,69,57,7,52,14,15,83,67,57,15,86,81,43,1,64,45,68,30,23,14,70,13,51,23,33,98,68,24,43,12,82,46}); List param1 = new ArrayList<>(); param1.add(new int[]{14,22,54,58}); param1.add(new int[]{30,-88,6,-26,-76,14,-80,-30,-58,76,40,-28,-54,38,-60,-60,88,-80,-22,90,50,-48,68,-26,26,-2,68,-16,88,-72}); param1.add(new int[]{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}); param1.add(new int[]{80,18,9,29,62,89,4,40,47,15,35,82,22,97,63,54,7,58,64,73,54,79,21,21,20,19,56,42,6,97,7,34,55,35,57,86,73,88,20,29,48,52,8,77,2,12,6,47}); param1.add(new int[]{-88,-80,-78,-68,-44,-38,42,50,62,68,70,80,92}); param1.add(new int[]{1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,1,0,1,0,1,0,1}); param1.add(new int[]{51,59,76,83}); param1.add(new int[]{14,50,-6,-38,80}); param1.add(new int[]{0,0,0,1}); param1.add(new int[]{12,48,57,40,47,36,22,50,68,98,77,78,39,55,87,75,65,27,33,27,70,34,67,71,84,33,7,61,3,9,67,92,60}); List param2 = new ArrayList<>(); param2.add(3); param2.add(22); param2.add(22); param2.add(30); param2.add(11); param2.add(21); param2.add(2); param2.add(3); param2.add(3); param2.add(17); List param3 = new ArrayList<>(); param3.add(2); param3.add(22); param3.add(19); param3.add(25); param3.add(8); param3.add(33); param3.add(2); param3.add(2); param3.add(2); param3.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , B , m , n ) : dp = [ [ 0 for i in range ( m + 1 ) ] for j in range ( n + 1 ) ] for i in range ( 1 , n + 1 , 1 ) : for j in range ( i , m + 1 , 1 ) : dp [ i ] [ j ] = max ( ( dp [ i - 1 ] [ j - 1 ] + ( A [ j - 1 ] * B [ i - 1 ] ) ) , dp [ i ] [ j - 1 ] ) return dp [ n ] [ m ] "," using namespace std; long long int f_gold ( int A [ ], int B [ ], int m, int n ) { long long int dp [ n + 1 ] [ m + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 1; i <= n; i ++ ) for ( int j = i; j <= m; j ++ ) dp [ i ] [ j ] = max ( ( dp [ i - 1 ] [ j - 1 ] + ( A [ j - 1 ] * B [ i - 1 ] ) ), dp [ i ] [ j - 1 ] ); return dp [ n ] [ m ]; } int main() { int n_success = 0; vector> param0 {{7,9,22,68},{24,40,98,58,-24,24,76,48,-92,-16,-46,-48,-70,88,66,2,44,36,34,34,46,90,-80,-24,-58,68,72,-20,-62,-40},{0,0,0,0,0,0,0,0,0,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,15,41,41,4,42,22,33,33,11,68,5,41,80,39,15,36,75,41,11,25,40,50,19,39,12,75,28,52,20,63,5,27,53,19,62,98,72,10,90,74,93,52,81,91,65,90,93},{-94,-76,-68,-50,-28,-20,18,24,30,54,74,84,98},{1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,1,0},{14,27,43,49},{78,-26,-12,38,-90},{0,1,1,1},{12,69,57,7,52,14,15,83,67,57,15,86,81,43,1,64,45,68,30,23,14,70,13,51,23,33,98,68,24,43,12,82,46}}; vector> param1 {{14,22,54,58},{30,-88,6,-26,-76,14,-80,-30,-58,76,40,-28,-54,38,-60,-60,88,-80,-22,90,50,-48,68,-26,26,-2,68,-16,88,-72},{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},{80,18,9,29,62,89,4,40,47,15,35,82,22,97,63,54,7,58,64,73,54,79,21,21,20,19,56,42,6,97,7,34,55,35,57,86,73,88,20,29,48,52,8,77,2,12,6,47},{-88,-80,-78,-68,-44,-38,42,50,62,68,70,80,92},{1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,1,0,1,0,1,0,1},{51,59,76,83},{14,50,-6,-38,80},{0,0,0,1},{12,48,57,40,47,36,22,50,68,98,77,78,39,55,87,75,65,27,33,27,70,34,67,71,84,33,7,61,3,9,67,92,60}}; vector param2 {3,22,22,30,11,21,2,3,3,17}; vector param3 {2,22,19,25,8,33,2,2,2,32}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 9, 22, 68],[14, 22, 54, 58],3,2,), ([24, 40, 98, 58, -24, 24, 76, 48, -92, -16, -46, -48, -70, 88, 66, 2, 44, 36, 34, 34, 46, 90, -80, -24, -58, 68, 72, -20, -62, -40],[30, -88, 6, -26, -76, 14, -80, -30, -58, 76, 40, -28, -54, 38, -60, -60, 88, -80, -22, 90, 50, -48, 68, -26, 26, -2, 68, -16, 88, -72],22,22,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,19,), ([32, 15, 41, 41, 4, 42, 22, 33, 33, 11, 68, 5, 41, 80, 39, 15, 36, 75, 41, 11, 25, 40, 50, 19, 39, 12, 75, 28, 52, 20, 63, 5, 27, 53, 19, 62, 98, 72, 10, 90, 74, 93, 52, 81, 91, 65, 90, 93],[80, 18, 9, 29, 62, 89, 4, 40, 47, 15, 35, 82, 22, 97, 63, 54, 7, 58, 64, 73, 54, 79, 21, 21, 20, 19, 56, 42, 6, 97, 7, 34, 55, 35, 57, 86, 73, 88, 20, 29, 48, 52, 8, 77, 2, 12, 6, 47],30,25,), ([-94, -76, -68, -50, -28, -20, 18, 24, 30, 54, 74, 84, 98],[-88, -80, -78, -68, -44, -38, 42, 50, 62, 68, 70, 80, 92],11,8,), ([1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0],[1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1],21,33,), ([14, 27, 43, 49],[51, 59, 76, 83],2,2,), ([78, -26, -12, 38, -90],[14, 50, -6, -38, 80],3,2,), ([0, 1, 1, 1],[0, 0, 0, 1],3,2,), ([12, 69, 57, 7, 52, 14, 15, 83, 67, 57, 15, 86, 81, 43, 1, 64, 45, 68, 30, 23, 14, 70, 13, 51, 23, 33, 98, 68, 24, 43, 12, 82, 46],[12, 48, 57, 40, 47, 36, 22, 50, 68, 98, 77, 78, 39, 55, 87, 75, 65, 27, 33, 27, 70, 34, 67, 71, 84, 33, 7, 61, 3, 9, 67, 92, 60],17,32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUBARRAYS_DISTINCT_ELEMENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUBARRAYS_DISTINCT_ELEMENTS{ public static int f_gold ( int [ ] arr , int n ) { Set < Integer > s = new HashSet < > ( ) ; int j = 0 , ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { while ( j < n && ! s . contains ( arr [ j ] ) ) { s . add ( arr [ i ] ) ; j ++ ; } ans += ( ( j - i ) * ( j - i + 1 ) ) / 2 ; s . remove ( arr [ i ] ) ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,4,5,6,12,15,16,17,20,20,22,24,24,27,28,34,37,39,39,41,43,49,49,51,55,62,63,67,71,74,74,74,77,84,84,89,89,97,99}); param0.add(new int[]{-8,54,-22,18,20,44,0,54,90,-4,4,40,-74,-16}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{36,71,36,58,38,90,17}); param0.add(new int[]{-90,-32,-16,18,38,82}); param0.add(new int[]{1,0,1}); param0.add(new int[]{3,11,21,25,28,28,38,42,48,53,55,55,55,58,71,75,79,80,80,94,96,99}); param0.add(new int[]{-16,-52,-4,-46,54,0,8,-64,-82,-10,-62,-10,58,44,-28,86,-24,16,44,22,-28,-42,-52,8,76,-44,-34,2,88,-88,-14,-84,-36,-68,76,20,20,-50}); param0.add(new int[]{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}); param0.add(new int[]{19,13,61,32,92,90,12,81,52}); List param1 = new ArrayList<>(); param1.add(24); param1.add(13); param1.add(28); param1.add(4); param1.add(5); param1.add(2); param1.add(20); param1.add(35); param1.add(27); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : s = [ ] j = 0 ans = 0 for i in range ( n ) : while ( j < n and ( arr [ j ] not in s ) ) : s.append ( arr [ j ] ) j += 1 ans += ( ( j - i ) * ( j - i + 1 ) ) // 2 s.remove ( arr [ i ] ) return ans "," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_set < int > s; int j = 0, ans = 0; for ( int i = 0; i < n; i ++ ) { while ( j < n && s . find ( arr [ j ] ) == s . end ( ) ) { s . insert ( arr [ j ] ); j ++; } ans += ( ( j - i ) * ( j - i + 1 ) ) / 2; s . erase ( arr [ i ] ); } return ans; } int main() { int n_success = 0; vector> param0 {{3,4,5,6,12,15,16,17,20,20,22,24,24,27,28,34,37,39,39,41,43,49,49,51,55,62,63,67,71,74,74,74,77,84,84,89,89,97,99},{-8,54,-22,18,20,44,0,54,90,-4,4,40,-74,-16},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{36,71,36,58,38,90,17},{-90,-32,-16,18,38,82},{1,0,1},{3,11,21,25,28,28,38,42,48,53,55,55,55,58,71,75,79,80,80,94,96,99},{-16,-52,-4,-46,54,0,8,-64,-82,-10,-62,-10,58,44,-28,86,-24,16,44,22,-28,-42,-52,8,76,-44,-34,2,88,-88,-14,-84,-36,-68,76,20,20,-50},{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},{19,13,61,32,92,90,12,81,52}}; vector param1 {24,13,28,4,5,2,20,35,27,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 4, 5, 6, 12, 15, 16, 17, 20, 20, 22, 24, 24, 27, 28, 34, 37, 39, 39, 41, 43, 49, 49, 51, 55, 62, 63, 67, 71, 74, 74, 74, 77, 84, 84, 89, 89, 97, 99],24,), ([-8, 54, -22, 18, 20, 44, 0, 54, 90, -4, 4, 40, -74, -16],13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,), ([36, 71, 36, 58, 38, 90, 17],4,), ([-90, -32, -16, 18, 38, 82],5,), ([1, 0, 1],2,), ([3, 11, 21, 25, 28, 28, 38, 42, 48, 53, 55, 55, 55, 58, 71, 75, 79, 80, 80, 94, 96, 99],20,), ([-16, -52, -4, -46, 54, 0, 8, -64, -82, -10, -62, -10, 58, 44, -28, 86, -24, 16, 44, 22, -28, -42, -52, 8, 76, -44, -34, 2, 88, -88, -14, -84, -36, -68, 76, 20, 20, -50],35,), ([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],27,), ([19, 13, 61, 32, 92, 90, 12, 81, 52],5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2{ static int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(24); param0.add(46); param0.add(47); param0.add(41); param0.add(98); param0.add(69); param0.add(83); param0.add(2); param0.add(12); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) "," using namespace std; int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {24,46,47,41,98,69,83,2,12,11}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (24,), (46,), (47,), (41,), (98,), (69,), (83,), (2,), (12,), (11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SQUARE_ROOT_OF_AN_INTEGER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_ROOT_OF_AN_INTEGER_1{ public static int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x ; int start = 1 , end = x , ans = 0 ; while ( start <= end ) { int mid = ( start + end ) / 2 ; if ( mid * mid == x ) return mid ; if ( mid * mid < x ) { start = mid + 1 ; ans = mid ; } else end = mid - 1 ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(40); param0.add(10); param0.add(46); param0.add(54); param0.add(1); param0.add(67); param0.add(64); param0.add(10); param0.add(75); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : if ( x == 0 or x == 1 ) : return x start = 1 end = x while ( start <= end ) : mid = ( start + end ) // 2 if ( mid * mid == x ) : return mid if ( mid * mid < x ) : start = mid + 1 ans = mid else : end = mid - 1 return ans "," using namespace std; int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x; int start = 1, end = x, ans; while ( start <= end ) { int mid = ( start + end ) / 2; if ( mid * mid == x ) return mid; if ( mid * mid < x ) { start = mid + 1; ans = mid; } else end = mid - 1; } return ans; } int main() { int n_success = 0; vector param0 {40,10,46,54,1,67,64,10,75,11}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (40,), (10,), (46,), (54,), (1,), (67,), (64,), (10,), (75,), (11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_FAI_AJ_PAIRS_ARRAY_N_INTEGERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_FAI_AJ_PAIRS_ARRAY_N_INTEGERS{ public static int f_gold ( int a [ ] , int n ) { Map < Integer , Integer > cnt = new HashMap < Integer , Integer > ( ) ; int ans = 0 , pre_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { ans += ( i * a [ i ] ) - pre_sum ; pre_sum += a [ i ] ; if ( cnt . containsKey ( a [ i ] - 1 ) ) ans -= cnt . get ( a [ i ] - 1 ) ; if ( cnt . containsKey ( a [ i ] + 1 ) ) ans += cnt . get ( a [ i ] + 1 ) ; if ( cnt . containsKey ( a [ i ] ) ) { cnt . put ( a [ i ] , cnt . get ( a [ i ] ) + 1 ) ; } else { cnt . put ( a [ i ] , 1 ) ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,8,12,19,23,23,26,39,54,56,57,57,73,78,83,83,89,91}); param0.add(new int[]{62,-34,10,-28,-42,-12,4,20,-20,-84,-76,-16,-44,26,-78,-40,50,-10,-56,76,-88,24,64,10,64,-8,-68,-42,26,24,62,36,-68,8,-68,-2,8,38,-18}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{23,14,44,29,93,56,22,29,97,71,43,72,74,8,92,40,18,34,78,79,93,63,79,44,35,72,88,83,40,89,66,66,54,56,44,62,72,94,79,79,24,55,72,37,27,55,16,58,83}); param0.add(new int[]{-96,-94,-90,-90,-86,-82,-80,-80,-58,-48,-40,-32,-32,-20,-20,-20,-12,-12,-6,-6,-2,0,4,16,16,16,42,48,58,64,68,76,76,76,78,80,82,88,88,88,92,94,96,98}); param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,1}); param0.add(new int[]{3,4,4,8,10,10,11,15,19,19,20,24,25,25,27,30,41,43,44,45,47,55,59,59,61,63,63,67,67,69,72,73,75,77,77,78,81,81,83,84,92,94,99}); param0.add(new int[]{94,-86,94,54,-52,86,68,64,98,54,-14,-60,-60,-92,80,-16,28,16,-74,68,32,-54,58,-16,-2,-52,-92,-36,96,-18,14,76,16}); param0.add(new int[]{0,0,0,0,1,1,1,1}); param0.add(new int[]{10,28,63,2,78,12,51,82,89,65,99}); List param1 = new ArrayList<>(); param1.add(15); param1.add(20); param1.add(18); param1.add(25); param1.add(27); param1.add(34); param1.add(31); param1.add(26); param1.add(7); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : cnt = dict ( ) ans = 0 pre_sum = 0 for i in range ( n ) : ans += ( i * a [ i ] ) - pre_sum pre_sum += a [ i ] if ( a [ i ] - 1 ) in cnt : ans -= cnt [ a [ i ] - 1 ] if ( a [ i ] + 1 ) in cnt : ans += cnt [ a [ i ] + 1 ] if a [ i ] not in cnt : cnt [ a [ i ] ] = 0 cnt [ a [ i ] ] += 1 return ans "," using namespace std; int f_gold ( int a [ ], int n ) { unordered_map < int, int > cnt; int ans = 0, pre_sum = 0; for ( int i = 0; i < n; i ++ ) { ans += ( i * a [ i ] ) - pre_sum; pre_sum += a [ i ]; if ( cnt [ a [ i ] - 1 ] ) ans -= cnt [ a [ i ] - 1 ]; if ( cnt [ a [ i ] + 1 ] ) ans += cnt [ a [ i ] + 1 ]; cnt [ a [ i ] ] ++; } return ans; } int main() { int n_success = 0; vector> param0 {{2,8,12,19,23,23,26,39,54,56,57,57,73,78,83,83,89,91},{62,-34,10,-28,-42,-12,4,20,-20,-84,-76,-16,-44,26,-78,-40,50,-10,-56,76,-88,24,64,10,64,-8,-68,-42,26,24,62,36,-68,8,-68,-2,8,38,-18},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{23,14,44,29,93,56,22,29,97,71,43,72,74,8,92,40,18,34,78,79,93,63,79,44,35,72,88,83,40,89,66,66,54,56,44,62,72,94,79,79,24,55,72,37,27,55,16,58,83},{-96,-94,-90,-90,-86,-82,-80,-80,-58,-48,-40,-32,-32,-20,-20,-20,-12,-12,-6,-6,-2,0,4,16,16,16,42,48,58,64,68,76,76,76,78,80,82,88,88,88,92,94,96,98},{1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,1},{3,4,4,8,10,10,11,15,19,19,20,24,25,25,27,30,41,43,44,45,47,55,59,59,61,63,63,67,67,69,72,73,75,77,77,78,81,81,83,84,92,94,99},{94,-86,94,54,-52,86,68,64,98,54,-14,-60,-60,-92,80,-16,28,16,-74,68,32,-54,58,-16,-2,-52,-92,-36,96,-18,14,76,16},{0,0,0,0,1,1,1,1},{10,28,63,2,78,12,51,82,89,65,99}}; vector param1 {15,20,18,25,27,34,31,26,7,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 8, 12, 19, 23, 23, 26, 39, 54, 56, 57, 57, 73, 78, 83, 83, 89, 91],15,), ([62, -34, 10, -28, -42, -12, 4, 20, -20, -84, -76, -16, -44, 26, -78, -40, 50, -10, -56, 76, -88, 24, 64, 10, 64, -8, -68, -42, 26, 24, 62, 36, -68, 8, -68, -2, 8, 38, -18],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],18,), ([23, 14, 44, 29, 93, 56, 22, 29, 97, 71, 43, 72, 74, 8, 92, 40, 18, 34, 78, 79, 93, 63, 79, 44, 35, 72, 88, 83, 40, 89, 66, 66, 54, 56, 44, 62, 72, 94, 79, 79, 24, 55, 72, 37, 27, 55, 16, 58, 83],25,), ([-96, -94, -90, -90, -86, -82, -80, -80, -58, -48, -40, -32, -32, -20, -20, -20, -12, -12, -6, -6, -2, 0, 4, 16, 16, 16, 42, 48, 58, 64, 68, 76, 76, 76, 78, 80, 82, 88, 88, 88, 92, 94, 96, 98],27,), ([1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1],34,), ([3, 4, 4, 8, 10, 10, 11, 15, 19, 19, 20, 24, 25, 25, 27, 30, 41, 43, 44, 45, 47, 55, 59, 59, 61, 63, 63, 67, 67, 69, 72, 73, 75, 77, 77, 78, 81, 81, 83, 84, 92, 94, 99],31,), ([94, -86, 94, 54, -52, 86, 68, 64, 98, 54, -14, -60, -60, -92, 80, -16, 28, 16, -74, 68, 32, -54, 58, -16, -2, -52, -92, -36, 96, -18, 14, 76, 16],26,), ([0, 0, 0, 0, 1, 1, 1, 1],7,), ([10, 28, 63, 2, 78, 12, 51, 82, 89, 65, 99],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DIVISIBILITY_9_USING_BITWISE_OPERATORS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIVISIBILITY_9_USING_BITWISE_OPERATORS{ static boolean f_gold ( int n ) { if ( n == 0 || n == 9 ) return true ; if ( n < 9 ) return false ; return f_gold ( ( int ) ( n >> 3 ) - ( int ) ( n & 7 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(96); param0.add(85); param0.add(54); param0.add(14); param0.add(47); param0.add(11); param0.add(49); param0.add(99); param0.add(28); param0.add(82); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 or n == 9 ) : return True if ( n < 9 ) : return False return f_gold ( ( int ) ( n >> 3 ) - ( int ) ( n & 7 ) ) "," using namespace std; bool f_gold ( int n ) { if ( n == 0 || n == 9 ) return true; if ( n < 9 ) return false; return f_gold ( ( int ) ( n >> 3 ) - ( int ) ( n & 7 ) ); } int main() { int n_success = 0; vector param0 {96,85,54,14,47,11,49,99,28,82}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (96,), (85,), (54,), (14,), (47,), (11,), (49,), (99,), (28,), (82,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LEXICOGRAPHICAL_CONCATENATION_SUBSTRINGS_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEXICOGRAPHICAL_CONCATENATION_SUBSTRINGS_STRING{ static String f_gold ( String s ) { int n = s . length ( ) ; int sub_count = n * ( n + 1 ) / 2 ; String [ ] arr = new String [ sub_count ] ; int index = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int len = 1 ; len <= n - i ; len ++ ) { arr [ index ++ ] = s . substring ( i , i + len ) ; } Arrays . sort ( arr ) ; String res = """" ; for ( int i = 0 ; i < sub_count ; i ++ ) res += arr [ i ] ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""sqGOi""); param0.add(""848580""); param0.add(""01001110011001""); param0.add(""ZhWXUKmeiI""); param0.add(""0917296541285""); param0.add(""01101001111100""); param0.add(""tjP kR""); param0.add(""999907""); param0.add(""011100""); param0.add(""qJPHNSJOUj""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : n = len ( s ) ; sub_count = ( n * ( n + 1 ) ) // 2 ; arr = [ 0 ] * sub_count ; index = 0 ; for i in range ( n ) : for j in range ( 1 , n - i + 1 ) : arr [ index ] = s [ i : i + j ] ; index += 1 ; arr.sort ( ) ; res = """" ; for i in range ( sub_count ) : res += arr [ i ] ; return res ; "," using namespace std; string f_gold ( string s ) { int n = s . length ( ); int sub_count = n * ( n + 1 ) / 2; string arr [ sub_count ]; int index = 0; for ( int i = 0; i < n; i ++ ) for ( int len = 1; len <= n - i; len ++ ) arr [ index ++ ] = s . substr ( i, len ); sort ( arr, arr + sub_count ); string res = """"; for ( int i = 0; i < sub_count; i ++ ) res += arr [ i ]; return res; } int main() { int n_success = 0; vector param0 {""sqGOi"",""848580"",""01001110011001"",""ZhWXUKmeiI"",""0917296541285"",""01101001111100"",""tjP kR"",""999907"",""011100"",""qJPHNSJOUj""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('sqGOi',), ('848580',), ('01001110011001',), ('ZhWXUKmeiI',), ('0917296541285',), ('01101001111100',), ('tjP kR',), ('999907',), ('011100',), ('qJPHNSJOUj',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WRITE_A_C_PROGRAM_TO_CALCULATE_POWXN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_A_C_PROGRAM_TO_CALCULATE_POWXN{ static int f_gold ( int x , int y ) { if ( y == 0 ) return 1 ; else if ( y % 2 == 0 ) return f_gold ( x , y / 2 ) * f_gold ( x , y / 2 ) ; else return x * f_gold ( x , y / 2 ) * f_gold ( x , y / 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(46); param0.add(99); param0.add(30); param0.add(1); param0.add(26); param0.add(1); param0.add(27); param0.add(10); param0.add(26); param0.add(29); List param1 = new ArrayList<>(); param1.add(92); param1.add(87); param1.add(32); param1.add(86); param1.add(81); param1.add(49); param1.add(46); param1.add(52); param1.add(38); param1.add(80); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y ) : if ( y == 0 ) : return 1 elif ( int ( y % 2 ) == 0 ) : return ( f_gold ( x , int ( y / 2 ) ) * f_gold ( x , int ( y / 2 ) ) ) else : return ( x * f_gold ( x , int ( y / 2 ) ) * f_gold ( x , int ( y / 2 ) ) ) ",,," if __name__ == '__main__': param = [ (46,92,), (99,87,), (30,32,), (1,86,), (26,81,), (1,49,), (27,46,), (10,52,), (26,38,), (29,80,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSEQUENCES_FORM_AI_BJ_CK{ static int f_gold ( String s ) { int aCount = 0 ; int bCount = 0 ; int cCount = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == 'a' ) aCount = ( 1 + 2 * aCount ) ; else if ( s . charAt ( i ) == 'b' ) bCount = ( aCount + 2 * bCount ) ; else if ( s . charAt ( i ) == 'c' ) cCount = ( bCount + 2 * cCount ) ; } return cCount ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""""); param0.add(""abbc""); param0.add(""abcabc""); param0.add(""agsdbkfdc ""); param0.add(""ababab""); param0.add(""aaaaaaa""); param0.add(""aabaaabcc""); param0.add(""19""); param0.add(""1001100""); param0.add(""DtAnuQbU""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : aCount = 0 bCount = 0 cCount = 0 for i in range ( len ( s ) ) : if ( s [ i ] == 'a' ) : aCount = ( 1 + 2 * aCount ) elif ( s [ i ] == 'b' ) : bCount = ( aCount + 2 * bCount ) elif ( s [ i ] == 'c' ) : cCount = ( bCount + 2 * cCount ) return cCount "," using namespace std; int f_gold ( string s ) { int aCount = 0; int bCount = 0; int cCount = 0; for ( unsigned int i = 0; i < s . size ( ); i ++ ) { if ( s [ i ] == 'a' ) aCount = ( 1 + 2 * aCount ); else if ( s [ i ] == 'b' ) bCount = ( aCount + 2 * bCount ); else if ( s [ i ] == 'c' ) cCount = ( bCount + 2 * cCount ); } return cCount; } int main() { int n_success = 0; vector param0 {"""",""abbc"",""abcabc"",""agsdbkfdc"",""ababab"",""aaaaaaa"",""aabaaabcc"",""19"",""1001100"",""DtAnuQbU""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('',), ('abbc',), ('abcabc',), ('agsdbkfdc ',), ('ababab',), ('aaaaaaa',), ('aabaaabcc',), ('19',), ('1001100',), ('DtAnuQbU',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_COMMON_SUBSTRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_COMMON_SUBSTRING{ static int f_gold ( char X [ ] , char Y [ ] , int m , int n ) { int LCStuff [ ] [ ] = new int [ m + 1 ] [ n + 1 ] ; int result = 0 ; for ( int i = 0 ; i <= m ; i ++ ) { for ( int j = 0 ; j <= n ; j ++ ) { if ( i == 0 || j == 0 ) LCStuff [ i ] [ j ] = 0 ; else if ( X [ i - 1 ] == Y [ j - 1 ] ) { LCStuff [ i ] [ j ] = LCStuff [ i - 1 ] [ j - 1 ] + 1 ; result = Integer . max ( result , LCStuff [ i ] [ j ] ) ; } else LCStuff [ i ] [ j ] = 0 ; } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'A','D','E','E','L','L','T','r','x'}); param0.add(new char[]{'9','3','4','8','7','6','3','8','3','3','5','3','5','4','2','5','5','3','6','2','1','7','4','2','7','3','2','1','3','7','6','5','0','6','3','8','5','1','7','9','2','7'}); param0.add(new char[]{'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'}); param0.add(new char[]{'W','X','P','u','s','k','O','y','Q','i','t','z','F','f','s','N','K','m','I','M','g','e','E','P','b','Y','c','O',' ','G','F','x'}); param0.add(new char[]{'0','1','2','4','5','7','7','7','8','8','9','9','9'}); param0.add(new char[]{'0','0','1'}); param0.add(new char[]{'A','C','F','G','G','H','I','K','K','N','O','Q','R','V','V','W','Y','a','a','c','d','k','k','m','o','p','t','u','y','y','y','z'}); param0.add(new char[]{'0','0','0','2','8','3','5','1','0','7','7','9','9','4','8','9','5'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','1','1','1'}); param0.add(new char[]{'B','o','R','k','Y','M','g','b','h','A','i','X','p','i','j','f','V','n','d','P','T','U','f','G','M','W','g','a','C','E','v','C',' '}); List param1 = new ArrayList<>(); param1.add(new char[]{'D','F','H','O','g','o','u','v','w'}); param1.add(new char[]{'5','5','3','7','8','0','9','8','5','8','5','1','4','4','0','2','9','2','3','1','1','3','6','1','2','0','5','4','3','7','5','5','8','1','1','4','8','1','7','5','5','4'}); param1.add(new char[]{'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'}); param1.add(new char[]{'e','R','P','W','d','a','A','j','H','v','T','w','x','I','d','o','z','K','B','M','J','L','a',' ','T','L','V','t','M','U','z','R'}); param1.add(new char[]{'0','0','2','2','2','3','4','6','6','7','8','9','9'}); param1.add(new char[]{'0','0','1'}); param1.add(new char[]{' ',' ','B','C','C','C','D','E','I','J','M','N','P','T','U','U','V','V','W','W','Y','b','c','e','i','o','p','r','t','y','y','z'}); param1.add(new char[]{'8','5','8','7','1','4','0','2','2','7','2','4','0','8','3','8','7'}); param1.add(new char[]{'0','0','0','0','0','0','1','1','1','1','1'}); param1.add(new char[]{'F','h','G','H','Q','Q','K','g','k','u','l','c','c','o','n','G','i','Z','d','b','c','b','v','t','S','t','P','A','K','g','G','i','m'}); List param2 = new ArrayList<>(); param2.add(4); param2.add(41); param2.add(35); param2.add(31); param2.add(12); param2.add(1); param2.add(21); param2.add(13); param2.add(9); param2.add(19); List param3 = new ArrayList<>(); param3.add(4); param3.add(37); param3.add(29); param3.add(18); param3.add(8); param3.add(1); param3.add(23); param3.add(12); param3.add(9); param3.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( X , Y , m , n ) : LCSuff = [ [ 0 for k in range ( n + 1 ) ] for l in range ( m + 1 ) ] result = 0 for i in range ( m + 1 ) : for j in range ( n + 1 ) : if ( i == 0 or j == 0 ) : LCSuff [ i ] [ j ] = 0 elif ( X [ i - 1 ] == Y [ j - 1 ] ) : LCSuff [ i ] [ j ] = LCSuff [ i - 1 ] [ j - 1 ] + 1 result = max ( result , LCSuff [ i ] [ j ] ) else : LCSuff [ i ] [ j ] = 0 return result ",,," if __name__ == '__main__': param = [ (['A', 'D', 'E', 'E', 'L', 'L', 'T', 'r', 'x'],['D', 'F', 'H', 'O', 'g', 'o', 'u', 'v', 'w'],4,4,), (['9', '3', '4', '8', '7', '6', '3', '8', '3', '3', '5', '3', '5', '4', '2', '5', '5', '3', '6', '2', '1', '7', '4', '2', '7', '3', '2', '1', '3', '7', '6', '5', '0', '6', '3', '8', '5', '1', '7', '9', '2', '7'],['5', '5', '3', '7', '8', '0', '9', '8', '5', '8', '5', '1', '4', '4', '0', '2', '9', '2', '3', '1', '1', '3', '6', '1', '2', '0', '5', '4', '3', '7', '5', '5', '8', '1', '1', '4', '8', '1', '7', '5', '5', '4'],41,37,), (['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'],35,29,), (['W', 'X', 'P', 'u', 's', 'k', 'O', 'y', 'Q', 'i', 't', 'z', 'F', 'f', 's', 'N', 'K', 'm', 'I', 'M', 'g', 'e', 'E', 'P', 'b', 'Y', 'c', 'O', ' ', 'G', 'F', 'x'],['e', 'R', 'P', 'W', 'd', 'a', 'A', 'j', 'H', 'v', 'T', 'w', 'x', 'I', 'd', 'o', 'z', 'K', 'B', 'M', 'J', 'L', 'a', ' ', 'T', 'L', 'V', 't', 'M', 'U', 'z', 'R'],31,18,), (['0', '1', '2', '4', '5', '7', '7', '7', '8', '8', '9', '9', '9'],['0', '0', '2', '2', '2', '3', '4', '6', '6', '7', '8', '9', '9'],12,8,), (['0', '0', '1'],['0', '0', '1'],1,1,), (['A', 'C', 'F', 'G', 'G', 'H', 'I', 'K', 'K', 'N', 'O', 'Q', 'R', 'V', 'V', 'W', 'Y', 'a', 'a', 'c', 'd', 'k', 'k', 'm', 'o', 'p', 't', 'u', 'y', 'y', 'y', 'z'],[' ', ' ', 'B', 'C', 'C', 'C', 'D', 'E', 'I', 'J', 'M', 'N', 'P', 'T', 'U', 'U', 'V', 'V', 'W', 'W', 'Y', 'b', 'c', 'e', 'i', 'o', 'p', 'r', 't', 'y', 'y', 'z'],21,23,), (['0', '0', '0', '2', '8', '3', '5', '1', '0', '7', '7', '9', '9', '4', '8', '9', '5'],['8', '5', '8', '7', '1', '4', '0', '2', '2', '7', '2', '4', '0', '8', '3', '8', '7'],13,12,), (['0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1'],['0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1'],9,9,), (['B', 'o', 'R', 'k', 'Y', 'M', 'g', 'b', 'h', 'A', 'i', 'X', 'p', 'i', 'j', 'f', 'V', 'n', 'd', 'P', 'T', 'U', 'f', 'G', 'M', 'W', 'g', 'a', 'C', 'E', 'v', 'C', ' '],['F', 'h', 'G', 'H', 'Q', 'Q', 'K', 'g', 'k', 'u', 'l', 'c', 'c', 'o', 'n', 'G', 'i', 'Z', 'd', 'b', 'c', 'b', 'v', 't', 'S', 't', 'P', 'A', 'K', 'g', 'G', 'i', 'm'],19,32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CEILING_IN_A_SORTED_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CEILING_IN_A_SORTED_ARRAY_1{ static int f_gold ( int arr [ ] , int low , int high , int x ) { int mid ; if ( x <= arr [ low ] ) return low ; if ( x > arr [ high ] ) return - 1 ; mid = ( low + high ) / 2 ; if ( arr [ mid ] == x ) return mid ; else if ( arr [ mid ] < x ) { if ( mid + 1 <= high && x <= arr [ mid + 1 ] ) return mid + 1 ; else return f_gold ( arr , mid + 1 , high , x ) ; } else { if ( mid - 1 >= low && x > arr [ mid - 1 ] ) return mid ; else return f_gold ( arr , low , mid - 1 , x ) ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,6,13,16,23,24,24,27,30,32,34,34,55,56,56,63,66,81,83,96}); param0.add(new int[]{-28,-96,48,22,-12,72,48,-70,-96,-84,-62,22,18,-92,-74,14,28,52,64,72,16,-76,46}); param0.add(new int[]{0,1}); param0.add(new int[]{51,98,25,10,43,91,33,25,85,51,94,6,35,48,11,97,67,21,50,9,11,51,86,61,22,88,89,11}); param0.add(new int[]{-94,-92,-88,-74,-52,-50,-48,-44,-40,-36,-32,-26,20,22,30,32,46,56,56,60,62,64,80,84,86,94,96,96}); param0.add(new int[]{1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0}); param0.add(new int[]{4,5,5,13,26,40,46,51,58,60,64,66,68,69,71,74,78,81,83,88,88,90,98,99}); param0.add(new int[]{92,6,-54,84,-10,32,50,40,-38,64,-64,-10,70,-68,-6,-16,68,34,-66,-82,84,98,50,82,78,4,34,-34,78,64,32,58,-94,40,50,0,-92,-36,10,-54,58,-78,-88,32,6}); param0.add(new int[]{0,0,0,0,0,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}); param0.add(new int[]{80,67,30,35,9}); List param1 = new ArrayList<>(); param1.add(13); param1.add(11); param1.add(1); param1.add(20); param1.add(20); param1.add(15); param1.add(12); param1.add(23); param1.add(24); param1.add(2); List param2 = new ArrayList<>(); param2.add(11); param2.add(18); param2.add(1); param2.add(20); param2.add(15); param2.add(17); param2.add(17); param2.add(28); param2.add(17); param2.add(3); List param3 = new ArrayList<>(); param3.add(18); param3.add(21); param3.add(1); param3.add(15); param3.add(15); param3.add(22); param3.add(14); param3.add(28); param3.add(22); param3.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , low , high , x ) : if x <= arr [ low ] : return low if x > arr [ high ] : return - 1 mid = ( low + high ) / 2 ; if arr [ mid ] == x : return mid elif arr [ mid ] < x : if mid + 1 <= high and x <= arr [ mid + 1 ] : return mid + 1 else : return f_gold ( arr , mid + 1 , high , x ) else : if mid - 1 >= low and x > arr [ mid - 1 ] : return mid else : return f_gold ( arr , low , mid - 1 , x ) "," using namespace std; int f_gold ( int arr [ ], int low, int high, int x ) { int mid; if ( x <= arr [ low ] ) return low; if ( x > arr [ high ] ) return - 1; mid = ( low + high ) / 2; if ( arr [ mid ] == x ) return mid; else if ( arr [ mid ] < x ) { if ( mid + 1 <= high && x <= arr [ mid + 1 ] ) return mid + 1; else return f_gold ( arr, mid + 1, high, x ); } else { if ( mid - 1 >= low && x > arr [ mid - 1 ] ) return mid; else return f_gold ( arr, low, mid - 1, x ); } } int main() { int n_success = 0; vector> param0 {{2,6,13,16,23,24,24,27,30,32,34,34,55,56,56,63,66,81,83,96},{-28,-96,48,22,-12,72,48,-70,-96,-84,-62,22,18,-92,-74,14,28,52,64,72,16,-76,46},{0,1},{51,98,25,10,43,91,33,25,85,51,94,6,35,48,11,97,67,21,50,9,11,51,86,61,22,88,89,11},{-94,-92,-88,-74,-52,-50,-48,-44,-40,-36,-32,-26,20,22,30,32,46,56,56,60,62,64,80,84,86,94,96,96},{1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0},{4,5,5,13,26,40,46,51,58,60,64,66,68,69,71,74,78,81,83,88,88,90,98,99},{92,6,-54,84,-10,32,50,40,-38,64,-64,-10,70,-68,-6,-16,68,34,-66,-82,84,98,50,82,78,4,34,-34,78,64,32,58,-94,40,50,0,-92,-36,10,-54,58,-78,-88,32,6},{0,0,0,0,0,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},{80,67,30,35,9}}; vector param1 {13,11,1,20,20,15,12,23,24,2}; vector param2 {11,18,1,20,15,17,17,28,17,3}; vector param3 {18,21,1,15,15,22,14,28,22,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 6, 13, 16, 23, 24, 24, 27, 30, 32, 34, 34, 55, 56, 56, 63, 66, 81, 83, 96],13,11,18,), ([-28, -96, 48, 22, -12, 72, 48, -70, -96, -84, -62, 22, 18, -92, -74, 14, 28, 52, 64, 72, 16, -76, 46],11,18,21,), ([0, 1],1,1,1,), ([51, 98, 25, 10, 43, 91, 33, 25, 85, 51, 94, 6, 35, 48, 11, 97, 67, 21, 50, 9, 11, 51, 86, 61, 22, 88, 89, 11],20,20,15,), ([-94, -92, -88, -74, -52, -50, -48, -44, -40, -36, -32, -26, 20, 22, 30, 32, 46, 56, 56, 60, 62, 64, 80, 84, 86, 94, 96, 96],20,15,15,), ([1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],15,17,22,), ([4, 5, 5, 13, 26, 40, 46, 51, 58, 60, 64, 66, 68, 69, 71, 74, 78, 81, 83, 88, 88, 90, 98, 99],12,17,14,), ([92, 6, -54, 84, -10, 32, 50, 40, -38, 64, -64, -10, 70, -68, -6, -16, 68, 34, -66, -82, 84, 98, 50, 82, 78, 4, 34, -34, 78, 64, 32, 58, -94, 40, 50, 0, -92, -36, 10, -54, 58, -78, -88, 32, 6],23,28,28,), ([0, 0, 0, 0, 0, 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],24,17,22,), ([80, 67, 30, 35, 9],2,3,2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_EQULIBRIUM_SUM_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_EQULIBRIUM_SUM_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int res = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int prefix_sum = arr [ i ] ; for ( int j = 0 ; j < i ; j ++ ) prefix_sum += arr [ j ] ; int suffix_sum = arr [ i ] ; for ( int j = n - 1 ; j > i ; j -- ) suffix_sum += arr [ j ] ; if ( prefix_sum == suffix_sum ) res = Math . max ( res , prefix_sum ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,3,9,19,22,27,32,41,45,63,66,67,81,91}); param0.add(new int[]{-64,-2,68,-48,22,-14,-98}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{86,79,23,55,4,22,37,1,72,22,82,62,96,47}); param0.add(new int[]{-96,-96,-96,-96,-92,-82,-72,-72,-62,-58,-52,-48,-44,-44,-40,-34,-28,-26,-26,0,0,2,4,4,12,12,18,34,36,40,48,48,54,60,66,66,72,76,78,82,82,96,98}); param0.add(new int[]{0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1,0}); param0.add(new int[]{2,3,7,13,20,24,39,49,53,58,72,80,90,99}); param0.add(new int[]{-48,44,60,-30,8,20,70,-50,80,-2,-28,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,13,18,3,22,29,51,45,21,13,47,15,17,34,60,99,30,54,16,47,13,49,60,66,28,57,85,66,65,7,62,29,9}); List param1 = new ArrayList<>(); param1.add(13); param1.add(4); param1.add(19); param1.add(8); param1.add(33); param1.add(38); param1.add(11); param1.add(11); param1.add(16); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n ) : res = - sys.maxsize - 1 for i in range ( n ) : prefix_sum = arr [ i ] for j in range ( i ) : prefix_sum += arr [ j ] suffix_sum = arr [ i ] j = n - 1 while ( j > i ) : suffix_sum += arr [ j ] j -= 1 if ( prefix_sum == suffix_sum ) : res = max ( res , prefix_sum ) return res "," using namespace std; int f_gold ( int arr [ ], int n ) { int res = INT_MIN; for ( int i = 0; i < n; i ++ ) { int prefix_sum = arr [ i ]; for ( int j = 0; j < i; j ++ ) prefix_sum += arr [ j ]; int suffix_sum = arr [ i ]; for ( int j = n - 1; j > i; j -- ) suffix_sum += arr [ j ]; if ( prefix_sum == suffix_sum ) res = max ( res, prefix_sum ); } return res; } int main() { int n_success = 0; vector> param0 {{3,3,9,19,22,27,32,41,45,63,66,67,81,91},{-64,-2,68,-48,22,-14,-98},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{86,79,23,55,4,22,37,1,72,22,82,62,96,47},{-96,-96,-96,-96,-92,-82,-72,-72,-62,-58,-52,-48,-44,-44,-40,-34,-28,-26,-26,0,0,2,4,4,12,12,18,34,36,40,48,48,54,60,66,66,72,76,78,82,82,96,98},{0,1,0,1,1,0,0,0,1,1,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1,0},{2,3,7,13,20,24,39,49,53,58,72,80,90,99},{-48,44,60,-30,8,20,70,-50,80,-2,-28,-14},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{64,13,18,3,22,29,51,45,21,13,47,15,17,34,60,99,30,54,16,47,13,49,60,66,28,57,85,66,65,7,62,29,9}}; vector param1 {13,4,19,8,33,38,11,11,16,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 3, 9, 19, 22, 27, 32, 41, 45, 63, 66, 67, 81, 91],13,), ([-64, -2, 68, -48, 22, -14, -98],4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([86, 79, 23, 55, 4, 22, 37, 1, 72, 22, 82, 62, 96, 47],8,), ([-96, -96, -96, -96, -92, -82, -72, -72, -62, -58, -52, -48, -44, -44, -40, -34, -28, -26, -26, 0, 0, 2, 4, 4, 12, 12, 18, 34, 36, 40, 48, 48, 54, 60, 66, 66, 72, 76, 78, 82, 82, 96, 98],33,), ([0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0],38,), ([2, 3, 7, 13, 20, 24, 39, 49, 53, 58, 72, 80, 90, 99],11,), ([-48, 44, 60, -30, 8, 20, 70, -50, 80, -2, -28, -14],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,), ([64, 13, 18, 3, 22, 29, 51, 45, 21, 13, 47, 15, 17, 34, 60, 99, 30, 54, 16, 47, 13, 49, 60, 66, 28, 57, 85, 66, 65, 7, 62, 29, 9],21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME{ static int f_gold ( int low , int high ) { int f1 = 0 , f2 = 1 , f3 = 1 ; int result = 0 ; while ( f1 <= high ) { if ( f1 >= low ) result ++ ; f1 = f2 ; f2 = f3 ; f3 = f1 + f2 ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(76); param0.add(96); param0.add(19); param0.add(36); param0.add(60); param0.add(20); param0.add(76); param0.add(63); param0.add(2); param0.add(41); List param1 = new ArrayList<>(); param1.add(43); param1.add(52); param1.add(79); param1.add(2); param1.add(11); param1.add(15); param1.add(4); param1.add(93); param1.add(25); param1.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( low , high ) : f1 , f2 , f3 = 0 , 1 , 1 result = 0 while ( f1 <= high ) : if ( f1 >= low ) : result += 1 f1 = f2 f2 = f3 f3 = f1 + f2 return result "," using namespace std; int f_gold ( int low, int high ) { int f1 = 0, f2 = 1, f3 = 1; int result = 0; while ( f1 <= high ) { if ( f1 >= low ) result ++; f1 = f2; f2 = f3; f3 = f1 + f2; } return result; } int main() { int n_success = 0; vector param0 {76,96,19,36,60,20,76,63,2,41}; vector param1 {43,52,79,2,11,15,4,93,25,39}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (76,43,), (96,52,), (19,79,), (36,2,), (60,11,), (20,15,), (76,4,), (63,93,), (2,25,), (41,39,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_LENGTH_SUBARRAY_SUM_GREATER_GIVEN_VALUE_1{ static int f_gold ( int arr [ ] , int n , int x ) { int curr_sum = 0 , min_len = n + 1 ; int start = 0 , end = 0 ; while ( end < n ) { while ( curr_sum <= x && end < n ) { if ( curr_sum <= 0 && x > 0 ) { start = end ; curr_sum = 0 ; } curr_sum += arr [ end ++ ] ; } while ( curr_sum > x && start < n ) { if ( end - start < min_len ) min_len = end - start ; curr_sum -= arr [ start ++ ] ; } } return min_len ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,5,10,14,15,16,20,23,28,31,35,36,36,43,48,49,55,57,57,58,61,64,64,68,70,70,73,74,76,76,77,81,81,82,87,89,92,99}); param0.add(new int[]{66,-20,12,-48,22,28,40,-30,-6,-96,10,-88,40}); param0.add(new int[]{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}); param0.add(new int[]{28,19,38,31,17,27,60,35,19,47,34,51,3,95,33,29,84,46,74,87}); param0.add(new int[]{-48,-2}); param0.add(new int[]{1,1,0,1,1,1,1,0,1,0,1,1,0,1,1,0,1,1,0,1,1,1}); param0.add(new int[]{1,4,4,6,8,10,12,12,13,15,18,20,21,23,25,28,28,33,33,35,35,36,37,38,42,44,63,63,65,65,65,66,70,74,77,78,80,80,84,87,87,89,92,93,94,97,98,99}); param0.add(new int[]{-82,-12,-40,58,22,-76,-94,-28,42,36,64}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{76,65,96,76,1,91,22,29,95,21,73,68,30,52,73,86,52,66,67,37,76,53,68,6,95,81,98,42,63,38,92,78,59,86,10,38,18,15,52,62,16,66}); List param1 = new ArrayList<>(); param1.add(33); param1.add(11); param1.add(42); param1.add(15); param1.add(1); param1.add(12); param1.add(42); param1.add(10); param1.add(10); param1.add(23); List param2 = new ArrayList<>(); param2.add(28); param2.add(12); param2.add(23); param2.add(15); param2.add(1); param2.add(15); param2.add(27); param2.add(6); param2.add(14); param2.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x ) : curr_sum = 0 ; min_len = n + 1 ; start = 0 ; end = 0 ; while ( end < n ) : while ( curr_sum <= x and end < n ) : if ( curr_sum <= 0 and x > 0 ) : start = end ; curr_sum = 0 ; curr_sum += arr [ end ] ; end += 1 ; while ( curr_sum > x and start < n ) : if ( end - start < min_len ) : min_len = end - start ; curr_sum -= arr [ start ] ; start += 1 ; return min_len ; "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int curr_sum = 0, min_len = n + 1; int start = 0, end = 0; while ( end < n ) { while ( curr_sum <= x && end < n ) { if ( curr_sum <= 0 && x > 0 ) { start = end; curr_sum = 0; } curr_sum += arr [ end ++ ]; } while ( curr_sum > x && start < n ) { if ( end - start < min_len ) min_len = end - start; curr_sum -= arr [ start ++ ]; } } return min_len; } int main() { int n_success = 0; vector> param0 {{2,4,5,10,14,15,16,20,23,28,31,35,36,36,43,48,49,55,57,57,58,61,64,64,68,70,70,73,74,76,76,77,81,81,82,87,89,92,99},{66,-20,12,-48,22,28,40,-30,-6,-96,10,-88,40},{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},{28,19,38,31,17,27,60,35,19,47,34,51,3,95,33,29,84,46,74,87},{-48,-2},{1,1,0,1,1,1,1,0,1,0,1,1,0,1,1,0,1,1,0,1,1,1},{1,4,4,6,8,10,12,12,13,15,18,20,21,23,25,28,28,33,33,35,35,36,37,38,42,44,63,63,65,65,65,66,70,74,77,78,80,80,84,87,87,89,92,93,94,97,98,99},{-82,-12,-40,58,22,-76,-94,-28,42,36,64},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{76,65,96,76,1,91,22,29,95,21,73,68,30,52,73,86,52,66,67,37,76,53,68,6,95,81,98,42,63,38,92,78,59,86,10,38,18,15,52,62,16,66}}; vector param1 {33,11,42,15,1,12,42,10,10,23}; vector param2 {28,12,23,15,1,15,27,6,14,35}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 4, 5, 10, 14, 15, 16, 20, 23, 28, 31, 35, 36, 36, 43, 48, 49, 55, 57, 57, 58, 61, 64, 64, 68, 70, 70, 73, 74, 76, 76, 77, 81, 81, 82, 87, 89, 92, 99],33,28,), ([66, -20, 12, -48, 22, 28, 40, -30, -6, -96, 10, -88, 40],11,12,), ([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],42,23,), ([28, 19, 38, 31, 17, 27, 60, 35, 19, 47, 34, 51, 3, 95, 33, 29, 84, 46, 74, 87],15,15,), ([-48, -2],1,1,), ([1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1],12,15,), ([1, 4, 4, 6, 8, 10, 12, 12, 13, 15, 18, 20, 21, 23, 25, 28, 28, 33, 33, 35, 35, 36, 37, 38, 42, 44, 63, 63, 65, 65, 65, 66, 70, 74, 77, 78, 80, 80, 84, 87, 87, 89, 92, 93, 94, 97, 98, 99],42,27,), ([-82, -12, -40, 58, 22, -76, -94, -28, 42, 36, 64],10,6,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],10,14,), ([76, 65, 96, 76, 1, 91, 22, 29, 95, 21, 73, 68, 30, 52, 73, 86, 52, 66, 67, 37, 76, 53, 68, 6, 95, 81, 98, 42, 63, 38, 92, 78, 59, 86, 10, 38, 18, 15, 52, 62, 16, 66],23,35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE{ static boolean f_gold ( int [ ] arr , int n , int k ) { int count ; for ( int i = 0 ; i < n ; i ++ ) { count = 0 ; for ( int j = 0 ; j < n ; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++ ; if ( count > 2 * k ) return false ; } } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,2,3,1}); param0.add(new int[]{2,3,3,5,3,3}); param0.add(new int[]{0,0,1,1,1}); param0.add(new int[]{7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31}); param0.add(new int[]{-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94}); param0.add(new int[]{0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0}); param0.add(new int[]{16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94}); param0.add(new int[]{-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10}); param0.add(new int[]{0,0,0,0,0,1,1,1}); param0.add(new int[]{83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}); List param1 = new ArrayList<>(); param1.add(5); param1.add(6); param1.add(2); param1.add(24); param1.add(24); param1.add(34); param1.add(10); param1.add(20); param1.add(5); param1.add(21); List param2 = new ArrayList<>(); param2.add(2); param2.add(2); param2.add(1); param2.add(2); param2.add(3); param2.add(2); param2.add(8); param2.add(4); param2.add(2); param2.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : for i in range ( n ) : count = 0 for j in range ( n ) : if arr [ j ] == arr [ i ] : count += 1 if count > 2 * k : return False return True "," using namespace std; bool f_gold ( int arr [ ], int n, int k ) { int count; for ( int i = 0; i < n; i ++ ) { count = 0; for ( int j = 0; j < n; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++; if ( count > 2 * k ) return false; } } return true; } int main() { int n_success = 0; vector> param0 {{1,1,2,3,1},{2,3,3,5,3,3},{0,0,1,1,1},{7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31},{-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94},{0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0},{16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94},{-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10},{0,0,0,0,0,1,1,1},{83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}}; vector param1 {5,6,2,24,24,34,10,20,5,21}; vector param2 {2,2,1,2,3,2,8,4,2,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1,1,2,3,1],5,2,), ([2,3,3,5,3,3],6,2,), ([0, 0, 1, 1, 1],2,1,), ([7, 60, 78, 91, 80, 75, 85, 21, 41, 63, 1, 84, 69, 13, 94, 25, 54, 54, 52, 68, 53, 35, 17, 37, 98, 27, 2, 31],24,2,), ([-96, -94, -82, -80, -78, -66, -36, -24, -18, -12, -2, -2, 6, 8, 10, 12, 36, 38, 42, 58, 64, 68, 82, 84, 86, 88, 94],24,3,), ([0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0],34,2,), ([16, 19, 25, 25, 32, 37, 48, 59, 60, 60, 71, 74, 77, 81, 91, 94],10,8,), ([-62, -94, 72, -22, 86, -80, 64, 98, -82, -50, 12, -4, 56, 46, -80, 2, -86, -44, -26, 68, -94, -82, 74, 26, 94, 40, 50, -40, -42, -10],20,4,), ([0, 0, 0, 0, 0, 1, 1, 1],5,2,), ([83, 57, 2, 47, 70, 22, 49, 51, 25, 57, 32, 7, 8, 99, 6, 86, 24, 79, 42, 43, 1, 24, 68, 11, 24, 12, 43, 40, 14, 45, 11, 46, 12, 80, 66],21,33,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_FIRST_MISSING_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_FIRST_MISSING_NUMBER{ static int f_gold ( int array [ ] , int start , int end ) { if ( start > end ) return end + 1 ; if ( start != array [ start ] ) return start ; int mid = ( start + end ) / 2 ; if ( array [ mid ] == mid ) return f_gold ( array , mid + 1 , end ) ; return f_gold ( array , start , mid ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,6,7,9,11,14,18,30,30,32,32,34,37,44,45,45,48,48,48,52,58,60,63,67,69,69,81,83,87,89,97,99}); param0.add(new int[]{88,-62,16,80,66,78,88,38,52,-96,48,98,96,-62,18,34,-58,30,-10,26,-98,48,-96,4,92,36,36,-36,-32,-70,62,-58,-58,-84,86,-98}); param0.add(new int[]{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}); param0.add(new int[]{79,99,79,85,61,58,62,61,39,87,39,74,36,70,30,43,20,52,54,50,81,98,42}); param0.add(new int[]{-98,-72,-46,-44,-42,-40,-16,-4,62,70,74}); param0.add(new int[]{1,1,0,1,0,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0}); param0.add(new int[]{58}); param0.add(new int[]{4,-84,-42,12,-50,42,-36,-38,-36,98,-2,20,6,-96,-78,24,34,88,0,74,0,-8,-86,-68,-42,98,-26,86,-70,-32,-82,78,46,58,84,4,-60,-90,-52,-78}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{8}); List param1 = new ArrayList<>(); param1.add(24); param1.add(19); param1.add(26); param1.add(20); param1.add(8); param1.add(26); param1.add(0); param1.add(37); param1.add(28); param1.add(0); List param2 = new ArrayList<>(); param2.add(18); param2.add(26); param2.add(28); param2.add(20); param2.add(10); param2.add(23); param2.add(0); param2.add(31); param2.add(28); param2.add(0); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( array , start , end ) : if ( start > end ) : return end + 1 if ( start != array [ start ] ) : return start ; mid = int ( ( start + end ) / 2 ) if ( array [ mid ] == mid ) : return f_gold ( array , mid + 1 , end ) return f_gold ( array , start , mid ) "," using namespace std; int f_gold ( int array [ ], int start, int end ) { if ( start > end ) return end + 1; if ( start != array [ start ] ) return start; int mid = ( start + end ) / 2; if ( array [ mid ] == mid ) return f_gold ( array, mid + 1, end ); return f_gold ( array, start, mid ); } int main() { int n_success = 0; vector> param0 {{3,6,7,9,11,14,18,30,30,32,32,34,37,44,45,45,48,48,48,52,58,60,63,67,69,69,81,83,87,89,97,99},{88,-62,16,80,66,78,88,38,52,-96,48,98,96,-62,18,34,-58,30,-10,26,-98,48,-96,4,92,36,36,-36,-32,-70,62,-58,-58,-84,86,-98},{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},{79,99,79,85,61,58,62,61,39,87,39,74,36,70,30,43,20,52,54,50,81,98,42},{-98,-72,-46,-44,-42,-40,-16,-4,62,70,74},{1,1,0,1,0,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0},{58},{4,-84,-42,12,-50,42,-36,-38,-36,98,-2,20,6,-96,-78,24,34,88,0,74,0,-8,-86,-68,-42,98,-26,86,-70,-32,-82,78,46,58,84,4,-60,-90,-52,-78},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{8}}; vector param1 {24,19,26,20,8,26,0,37,28,0}; vector param2 {18,26,28,20,10,23,0,31,28,0}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 6, 7, 9, 11, 14, 18, 30, 30, 32, 32, 34, 37, 44, 45, 45, 48, 48, 48, 52, 58, 60, 63, 67, 69, 69, 81, 83, 87, 89, 97, 99],24,18,), ([88, -62, 16, 80, 66, 78, 88, 38, 52, -96, 48, 98, 96, -62, 18, 34, -58, 30, -10, 26, -98, 48, -96, 4, 92, 36, 36, -36, -32, -70, 62, -58, -58, -84, 86, -98],19,26,), ([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],26,28,), ([79, 99, 79, 85, 61, 58, 62, 61, 39, 87, 39, 74, 36, 70, 30, 43, 20, 52, 54, 50, 81, 98, 42],20,20,), ([-98, -72, -46, -44, -42, -40, -16, -4, 62, 70, 74],8,10,), ([1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],26,23,), ([58],0,0,), ([4, -84, -42, 12, -50, 42, -36, -38, -36, 98, -2, 20, 6, -96, -78, 24, 34, 88, 0, 74, 0, -8, -86, -68, -42, 98, -26, 86, -70, -32, -82, 78, 46, 58, 84, 4, -60, -90, -52, -78],37,31,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,28,), ([8],0,0,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SWAP_BITS_IN_A_GIVEN_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SWAP_BITS_IN_A_GIVEN_NUMBER{ static int f_gold ( int x , int p1 , int p2 , int n ) { int set1 = ( x >> p1 ) & ( ( 1 << n ) - 1 ) ; int set2 = ( x >> p2 ) & ( ( 1 << n ) - 1 ) ; int xor = ( set1 ^ set2 ) ; xor = ( xor << p1 ) | ( xor << p2 ) ; int result = x ^ xor ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(95); param0.add(16); param0.add(55); param0.add(75); param0.add(90); param0.add(58); param0.add(69); param0.add(5); param0.add(36); param0.add(62); List param1 = new ArrayList<>(); param1.add(88); param1.add(26); param1.add(56); param1.add(35); param1.add(12); param1.add(65); param1.add(64); param1.add(1); param1.add(33); param1.add(69); List param2 = new ArrayList<>(); param2.add(97); param2.add(59); param2.add(40); param2.add(79); param2.add(59); param2.add(25); param2.add(17); param2.add(59); param2.add(97); param2.add(66); List param3 = new ArrayList<>(); param3.add(92); param3.add(42); param3.add(41); param3.add(30); param3.add(34); param3.add(19); param3.add(94); param3.add(38); param3.add(44); param3.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , p1 , p2 , n ) : set1 = ( x >> p1 ) & ( ( 1 << n ) - 1 ) set2 = ( x >> p2 ) & ( ( 1 << n ) - 1 ) xor = ( set1 ^ set2 ) xor = ( xor << p1 ) | ( xor << p2 ) result = x ^ xor return result "," using namespace std; int f_gold ( unsigned int x, unsigned int p1, unsigned int p2, unsigned int n ) { unsigned int set1 = ( x >> p1 ) & ( ( 1U << n ) - 1 ); unsigned int set2 = ( x >> p2 ) & ( ( 1U << n ) - 1 ); unsigned int Xor = ( set1 ^ set2 ); Xor = ( Xor << p1 ) | ( Xor << p2 ); unsigned int result = x ^ Xor; return result; } int main() { int n_success = 0; vector param0 {95,16,55,75,90,58,69,5,36,62}; vector param1 {88,26,56,35,12,65,64,1,33,69}; vector param2 {97,59,40,79,59,25,17,59,97,66}; vector param3 {92,42,41,30,34,19,94,38,44,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (95,88,97,92,), (16,26,59,42,), (55,56,40,41,), (75,35,79,30,), (90,12,59,34,), (58,65,25,19,), (69,64,17,94,), (5,1,59,38,), (36,33,97,44,), (62,69,66,9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_COST_CUT_BOARD_SQUARES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_CUT_BOARD_SQUARES{ static int f_gold ( Integer X [ ] , Integer Y [ ] , int m , int n ) { int res = 0 ; Arrays . sort ( X , Collections . reverseOrder ( ) ) ; Arrays . sort ( Y , Collections . reverseOrder ( ) ) ; int hzntl = 1 , vert = 1 ; int i = 0 , j = 0 ; while ( i < m && j < n ) { if ( X [ i ] > Y [ j ] ) { res += X [ i ] * vert ; hzntl ++ ; i ++ ; } else { res += Y [ j ] * hzntl ; vert ++ ; j ++ ; } } int total = 0 ; while ( i < m ) total += X [ i ++ ] ; res += total * vert ; total = 0 ; while ( j < n ) total += Y [ j ++ ] ; res += total * hzntl ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new Integer[]{1,9,9,16,18,20,22,22,23,25,25,26,28,32,33,33,33,34,37,40,44,46,46,52,53,56,58,58,59,60,61,67,67,69,70,70,73,75,77,83,87,87,87,90,90,93,97,98}); param0.add(new Integer[]{-52,66,66,-4,-74,78,52,-72}); param0.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new Integer[]{58,78,48,44,63,37,89,76,66,83,52,97,19,28,67,38,54,77,2,96,28,87}); param0.add(new Integer[]{-84,-78,-76,-72,-68,-62,-62,-60,-58,-44,-34,-10,-8,-4,-2,-2,14,16,20,26,26,32,70,78,86,90,96}); param0.add(new Integer[]{0,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,0}); param0.add(new Integer[]{30,75}); param0.add(new Integer[]{70,78,-60,-10,-8,46,38,60,-54,-68,16,10,36,-10,38,-96,-52,-82,-56,22,-56,0,96,-60,24,70,40,62,-20,-36,74,32,44,14,-18,50,58}); param0.add(new Integer[]{0,0,0,1}); param0.add(new Integer[]{81,40,29,74,13,67,10,25,24,81,90}); List param1 = new ArrayList<>(); param1.add(new Integer[]{2,3,9,10,13,16,17,19,20,23,25,27,29,30,30,35,37,39,39,45,47,50,55,55,55,56,59,60,62,63,67,70,70,71,72,73,73,74,77,86,87,88,91,92,95,96,97,99}); param1.add(new Integer[]{-40,30,-34,-76,84,88,-78,72}); param1.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new Integer[]{37,36,26,5,83,75,33,33,72,63,91,94,75,92,9,19,79,29,40,47,63,36}); param1.add(new Integer[]{-98,-98,-86,-82,-76,-62,-60,-48,-32,-32,-24,-18,-10,-4,0,16,16,26,36,42,48,50,64,66,78,92,98}); param1.add(new Integer[]{1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,1,0}); param1.add(new Integer[]{10,39}); param1.add(new Integer[]{64,-42,-50,-76,46,32,-66,86,-6,46,94,70,-62,90,78,4,6,-20,92,-18,-34,-96,92,-24,-90,-94,62,40,-14,-28,80,-86,-86,-56,40,-92,-22}); param1.add(new Integer[]{0,1,1,1}); param1.add(new Integer[]{51,45,23,7,53,14,49,58,25,75,74}); List param2 = new ArrayList<>(); param2.add(25); param2.add(6); param2.add(15); param2.add(13); param2.add(15); param2.add(25); param2.add(1); param2.add(19); param2.add(2); param2.add(8); List param3 = new ArrayList<>(); param3.add(27); param3.add(7); param3.add(19); param3.add(14); param3.add(24); param3.add(26); param3.add(1); param3.add(19); param3.add(2); param3.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( X , Y , m , n ) : res = 0 X.sort ( reverse = True ) Y.sort ( reverse = True ) hzntl = 1 ; vert = 1 i = 0 ; j = 0 while ( i < m and j < n ) : if ( X [ i ] > Y [ j ] ) : res += X [ i ] * vert hzntl += 1 i += 1 else : res += Y [ j ] * hzntl vert += 1 j += 1 total = 0 while ( i < m ) : total += X [ i ] i += 1 res += total * vert total = 0 while ( j < n ) : total += Y [ j ] j += 1 res += total * hzntl return res "," using namespace std; int f_gold ( int X [ ], int Y [ ], int m, int n ) { int res = 0; sort ( X, X + m, greater < int > ( ) ); sort ( Y, Y + n, greater < int > ( ) ); int hzntl = 1, vert = 1; int i = 0, j = 0; while ( i < m && j < n ) { if ( X [ i ] > Y [ j ] ) { res += X [ i ] * vert; hzntl ++; i ++; } else { res += Y [ j ] * hzntl; vert ++; j ++; } } int total = 0; while ( i < m ) total += X [ i ++ ]; res += total * vert; total = 0; while ( j < n ) total += Y [ j ++ ]; res += total * hzntl; return res; } int main() { int n_success = 0; vector> param0 {{1,9,9,16,18,20,22,22,23,25,25,26,28,32,33,33,33,34,37,40,44,46,46,52,53,56,58,58,59,60,61,67,67,69,70,70,73,75,77,83,87,87,87,90,90,93,97,98},{-52,66,66,-4,-74,78,52,-72},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{58,78,48,44,63,37,89,76,66,83,52,97,19,28,67,38,54,77,2,96,28,87},{-84,-78,-76,-72,-68,-62,-62,-60,-58,-44,-34,-10,-8,-4,-2,-2,14,16,20,26,26,32,70,78,86,90,96},{0,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,1,1,1,0,0,0,1,1,0},{30,75},{70,78,-60,-10,-8,46,38,60,-54,-68,16,10,36,-10,38,-96,-52,-82,-56,22,-56,0,96,-60,24,70,40,62,-20,-36,74,32,44,14,-18,50,58},{0,0,0,1},{81,40,29,74,13,67,10,25,24,81,90}}; vector> param1 {{2,3,9,10,13,16,17,19,20,23,25,27,29,30,30,35,37,39,39,45,47,50,55,55,55,56,59,60,62,63,67,70,70,71,72,73,73,74,77,86,87,88,91,92,95,96,97,99},{-40,30,-34,-76,84,88,-78,72},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{37,36,26,5,83,75,33,33,72,63,91,94,75,92,9,19,79,29,40,47,63,36},{-98,-98,-86,-82,-76,-62,-60,-48,-32,-32,-24,-18,-10,-4,0,16,16,26,36,42,48,50,64,66,78,92,98},{1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,1,0},{10,39},{64,-42,-50,-76,46,32,-66,86,-6,46,94,70,-62,90,78,4,6,-20,92,-18,-34,-96,92,-24,-90,-94,62,40,-14,-28,80,-86,-86,-56,40,-92,-22},{0,1,1,1},{51,45,23,7,53,14,49,58,25,75,74}}; vector param2 {25,6,15,13,15,25,1,19,2,8}; vector param3 {27,7,19,14,24,26,1,19,2,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 9, 9, 16, 18, 20, 22, 22, 23, 25, 25, 26, 28, 32, 33, 33, 33, 34, 37, 40, 44, 46, 46, 52, 53, 56, 58, 58, 59, 60, 61, 67, 67, 69, 70, 70, 73, 75, 77, 83, 87, 87, 87, 90, 90, 93, 97, 98],[2, 3, 9, 10, 13, 16, 17, 19, 20, 23, 25, 27, 29, 30, 30, 35, 37, 39, 39, 45, 47, 50, 55, 55, 55, 56, 59, 60, 62, 63, 67, 70, 70, 71, 72, 73, 73, 74, 77, 86, 87, 88, 91, 92, 95, 96, 97, 99],25,27,), ([-52, 66, 66, -4, -74, 78, 52, -72],[-40, 30, -34, -76, 84, 88, -78, 72],6,7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,19,), ([58, 78, 48, 44, 63, 37, 89, 76, 66, 83, 52, 97, 19, 28, 67, 38, 54, 77, 2, 96, 28, 87],[37, 36, 26, 5, 83, 75, 33, 33, 72, 63, 91, 94, 75, 92, 9, 19, 79, 29, 40, 47, 63, 36],13,14,), ([-84, -78, -76, -72, -68, -62, -62, -60, -58, -44, -34, -10, -8, -4, -2, -2, 14, 16, 20, 26, 26, 32, 70, 78, 86, 90, 96],[-98, -98, -86, -82, -76, -62, -60, -48, -32, -32, -24, -18, -10, -4, 0, 16, 16, 26, 36, 42, 48, 50, 64, 66, 78, 92, 98],15,24,), ([0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0],[1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0],25,26,), ([30, 75],[10, 39],1,1,), ([70, 78, -60, -10, -8, 46, 38, 60, -54, -68, 16, 10, 36, -10, 38, -96, -52, -82, -56, 22, -56, 0, 96, -60, 24, 70, 40, 62, -20, -36, 74, 32, 44, 14, -18, 50, 58],[64, -42, -50, -76, 46, 32, -66, 86, -6, 46, 94, 70, -62, 90, 78, 4, 6, -20, 92, -18, -34, -96, 92, -24, -90, -94, 62, 40, -14, -28, 80, -86, -86, -56, 40, -92, -22],19,19,), ([0, 0, 0, 1],[0, 1, 1, 1],2,2,), ([81, 40, 29, 74, 13, 67, 10, 25, 24, 81, 90],[51, 45, 23, 7, 53, 14, 49, 58, 25, 75, 74],8,10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_MANHATTAN_DISTANCES_PAIRS_POINTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MANHATTAN_DISTANCES_PAIRS_POINTS{ static int f_gold ( int x [ ] , int y [ ] , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) sum += ( Math . abs ( x [ i ] - x [ j ] ) + Math . abs ( y [ i ] - y [ j ] ) ) ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,6,6,8,11,12,13,14,19,20,22,24,28,29,30,32,35,37,44,48,49,51,51,56,59,59,62,65,68,68,68,72,75,77,78,89,89,91,93,95,99}); param0.add(new int[]{16,76,2,42,-24,-82,68,-2,98,-42,-72,28,-22,-52,28,-38,36,66,84,64,-28,86,52,84,-98,-30}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{61,37,57,99,22,72,38,85,23,85,15,4,49,9,15,25,7,63,79,6,85,30,12,34,38,6,59,62,59,34,72,97,70,44,95,58,99}); param0.add(new int[]{-96,-86,-82,-72,-72,-64,-62,-60,-56,-56,-56,-54,-52,-40,-36,-30,-10,10,18,26,28,56,56,56,64,90,92,94}); param0.add(new int[]{1,0,1,1,1,0,1}); param0.add(new int[]{6,10,24,25,31,41,43,45,47,65,67,90}); param0.add(new int[]{-74,92,34,56,-54,-98,-76,-34,16,32,-4,-16,22,90,-52,-90,-60,70,-40,78,96,-68,78,-56,-94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{20,32}); List param1 = new ArrayList<>(); param1.add(new int[]{6,19,19,22,25,27,31,33,34,35,37,38,38,44,46,50,51,55,58,58,64,64,64,64,65,66,66,66,67,70,75,78,79,81,81,81,82,84,84,86,94,96}); param1.add(new int[]{-34,92,-24,-62,28,72,-10,10,8,90,-72,-24,50,-46,52,58,68,-62,-64,-78,-12,24,62,-30,62,-60}); param1.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param1.add(new int[]{72,41,77,62,78,36,75,28,91,39,32,56,60,64,21,15,80,85,28,22,53,58,69,62,60,48,66,91,38,66,54,5,24,1,49,71,49}); param1.add(new int[]{-98,-98,-96,-96,-82,-80,-80,-68,-62,-60,-46,-38,-26,-26,-20,-18,16,22,24,26,34,46,52,52,74,76,90,92}); param1.add(new int[]{1,0,1,0,0,1,1}); param1.add(new int[]{4,7,11,19,21,39,57,80,84,93,94,97}); param1.add(new int[]{14,20,24,-92,58,12,78,78,-90,96,-44,36,30,-46,-30,-80,26,-2,26,28,-16,-50,-2,-36,-8}); param1.add(new int[]{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}); param1.add(new int[]{23,50}); List param2 = new ArrayList<>(); param2.add(37); param2.add(24); param2.add(5); param2.add(26); param2.add(26); param2.add(3); param2.add(10); param2.add(21); param2.add(23); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(x, y, n): sum = 0 for i in range(n): for j in range(i + 1, n): sum += (abs(x[i] - x[j]) + abs(y[i] - y[j])) return sum "," using namespace std; int f_gold ( int x [ ], int y [ ], int n ) { int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) sum += ( abs ( x [ i ] - x [ j ] ) + abs ( y [ i ] - y [ j ] ) ); return sum; } int main() { int n_success = 0; vector> param0 {{2,4,6,6,8,11,12,13,14,19,20,22,24,28,29,30,32,35,37,44,48,49,51,51,56,59,59,62,65,68,68,68,72,75,77,78,89,89,91,93,95,99},{16,76,2,42,-24,-82,68,-2,98,-42,-72,28,-22,-52,28,-38,36,66,84,64,-28,86,52,84,-98,-30},{0,0,0,0,0,1,1,1,1,1},{61,37,57,99,22,72,38,85,23,85,15,4,49,9,15,25,7,63,79,6,85,30,12,34,38,6,59,62,59,34,72,97,70,44,95,58,99},{-96,-86,-82,-72,-72,-64,-62,-60,-56,-56,-56,-54,-52,-40,-36,-30,-10,10,18,26,28,56,56,56,64,90,92,94},{1,0,1,1,1,0,1},{6,10,24,25,31,41,43,45,47,65,67,90},{-74,92,34,56,-54,-98,-76,-34,16,32,-4,-16,22,90,-52,-90,-60,70,-40,78,96,-68,78,-56,-94},{0,0,0,0,0,0,0,0,0,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},{20,32}}; vector> param1 {{6,19,19,22,25,27,31,33,34,35,37,38,38,44,46,50,51,55,58,58,64,64,64,64,65,66,66,66,67,70,75,78,79,81,81,81,82,84,84,86,94,96},{-34,92,-24,-62,28,72,-10,10,8,90,-72,-24,50,-46,52,58,68,-62,-64,-78,-12,24,62,-30,62,-60},{0,0,0,0,1,1,1,1,1,1},{72,41,77,62,78,36,75,28,91,39,32,56,60,64,21,15,80,85,28,22,53,58,69,62,60,48,66,91,38,66,54,5,24,1,49,71,49},{-98,-98,-96,-96,-82,-80,-80,-68,-62,-60,-46,-38,-26,-26,-20,-18,16,22,24,26,34,46,52,52,74,76,90,92},{1,0,1,0,0,1,1},{4,7,11,19,21,39,57,80,84,93,94,97},{14,20,24,-92,58,12,78,78,-90,96,-44,36,30,-46,-30,-80,26,-2,26,28,-16,-50,-2,-36,-8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{23,50}}; vector param2 {37,24,5,26,26,3,10,21,23,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 4, 6, 6, 8, 11, 12, 13, 14, 19, 20, 22, 24, 28, 29, 30, 32, 35, 37, 44, 48, 49, 51, 51, 56, 59, 59, 62, 65, 68, 68, 68, 72, 75, 77, 78, 89, 89, 91, 93, 95, 99], [ 6, 19, 19, 22, 25, 27, 31, 33, 34, 35, 37, 38, 38, 44, 46, 50, 51, 55, 58, 58, 64, 64, 64, 64, 65, 66, 66, 66, 67, 70, 75, 78, 79, 81, 81, 81, 82, 84, 84, 86, 94, 96], 37,), ([16, 76, 2, 42, -24, -82, 68, -2, 98, -42, -72, 28, -22, -52, 28, -38, 36, 66, 84, 64, -28, 86, 52, 84, -98, -30], [-34, 92, -24, -62, 28, 72, -10, 10, 8, 90, -72, -24, 50, -46, 52, 58, 68, -62, -64, -78, -12, 24, 62, -30, 62, -60], 24,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 5,), ([61, 37, 57, 99, 22, 72, 38, 85, 23, 85, 15, 4, 49, 9, 15, 25, 7, 63, 79, 6, 85, 30, 12, 34, 38, 6, 59, 62, 59, 34, 72, 97, 70, 44, 95, 58, 99], [ 72, 41, 77, 62, 78, 36, 75, 28, 91, 39, 32, 56, 60, 64, 21, 15, 80, 85, 28, 22, 53, 58, 69, 62, 60, 48, 66, 91, 38, 66, 54, 5, 24, 1, 49, 71, 49], 26,), ([-96, -86, -82, -72, -72, -64, -62, -60, -56, -56, -56, -54, -52, -40, -36, -30, -10, 10, 18, 26, 28, 56, 56, 56, 64, 90, 92, 94], [-98, -98, -96, -96, -82, -80, -80, -68, -62, -60, -46, -38, -26, -26, -20, -18, 16, 22, 24, 26, 34, 46, 52, 52, 74, 76, 90, 92], 26,), ([1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 1], 3,), ([6, 10, 24, 25, 31, 41, 43, 45, 47, 65, 67, 90], [ 4, 7, 11, 19, 21, 39, 57, 80, 84, 93, 94, 97], 10,), ([-74, 92, 34, 56, -54, -98, -76, -34, 16, 32, -4, -16, 22, 90, -52, -90, -60, 70, -40, 78, 96, -68, 78, -56, -94], [14, 20, 24, -92, 58, 12, 78, 78, -90, 96, -44, 36, 30, -46, -30, -80, 26, -2, 26, 28, -16, -50, -2, -36, -8], 21,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 23,), ([20, 32], [23, 50], 1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_1{ static int f_gold ( int n ) { float fibo = 2.078087F * ( float ) Math . log ( n ) + 1.672276F ; return Math . round ( fibo ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(20); param0.add(95); param0.add(39); param0.add(21); param0.add(94); param0.add(79); param0.add(56); param0.add(62); param0.add(23); param0.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : fibo = 2.078087 * math.log ( n ) + 1.672276 return round ( fibo ) "," using namespace std; int f_gold ( int n ) { float fibo = 2.078087 * log ( n ) + 1.672276; return round ( fibo ); } int main() { int n_success = 0; vector param0 {20,95,39,21,94,79,56,62,23,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (20,), (95,), (39,), (21,), (94,), (79,), (56,), (62,), (23,), (3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_ENTRIES_EQUAL_TO_X_IN_A_SPECIAL_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_ENTRIES_EQUAL_TO_X_IN_A_SPECIAL_MATRIX{ static int f_gold ( int n , int x ) { int f_gold = 0 ; for ( int i = 1 ; i <= n && i <= x ; i ++ ) { if ( x / i <= n && x % i == 0 ) f_gold ++ ; } return f_gold ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(47); param0.add(57); param0.add(55); param0.add(11); param0.add(55); param0.add(63); param0.add(64); param0.add(28); param0.add(49); param0.add(48); List param1 = new ArrayList<>(); param1.add(30); param1.add(16); param1.add(63); param1.add(23); param1.add(49); param1.add(64); param1.add(98); param1.add(30); param1.add(61); param1.add(64); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , x ) : cnt = 0 for i in range ( 1 , n + 1 ) : if i <= x : if x // i <= n and x % i == 0 : cnt += 1 return cnt ",,," if __name__ == '__main__': param = [ (47,30,), (57,16,), (55,63,), (11,23,), (55,49,), (63,64,), (64,98,), (28,30,), (49,61,), (48,64,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_CONSECUTIVE_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_CONSECUTIVE_SUBSEQUENCE{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > S = new HashSet < Integer > ( ) ; int ans = 0 ; for ( int i = 0 ; i < n ; ++ i ) S . add ( arr [ i ] ) ; for ( int i = 0 ; i < n ; ++ i ) { if ( ! S . contains ( arr [ i ] - 1 ) ) { int j = arr [ i ] ; while ( S . contains ( j ) ) j ++ ; if ( ans < j - arr [ i ] ) ans = j - arr [ i ] ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,28,31,64,73}); param0.add(new int[]{46,26,-84,-24,50,94,-14,74,-52,-62,2,46,62,54,-30,-70,-76,74,60,10,60,98,-92,98,-96,34,30,58,-60,-52,-66,-40,-78,-26,80,-58,-26,80,92,66,90,4,46,-78,80,62,30,0,38}); param0.add(new int[]{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}); param0.add(new int[]{24,72,87,81,90,59,18,29,12,24,78,59,93,80,79,26,17,28,43,85,85,76,83,71,28,99,80,14,9,92,46,59,66,34}); param0.add(new int[]{-94,-94,-94,-76,-68,-64,-64,-56,-48,-46,-36,-26,-12,-6,-6,-2,-2,6,6,24,46,48,50,52,58,76,88}); param0.add(new int[]{1}); param0.add(new int[]{1,8,22,27,28,58,80,89,95}); param0.add(new int[]{46,38,-50,98,-22,92,84,-48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{74,2,85,72,1,49,53,48,46,44,98,75,5,13,98,69,65,68,37,38,77,69,14,17,46,54,55,20,23,59,98,44,22,12,71,18,94,49,57,82,7,64,33,7,29,58,45,98}); List param1 = new ArrayList<>(); param1.add(3); param1.add(29); param1.add(38); param1.add(32); param1.add(19); param1.add(0); param1.add(5); param1.add(6); param1.add(19); param1.add(36); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_set < int > S; int ans = 0; for ( int i = 0; i < n; i ++ ) S . insert ( arr [ i ] ); for ( int i = 0; i < n; i ++ ) { if ( S . find ( arr [ i ] - 1 ) == S . end ( ) ) { int j = arr [ i ]; while ( S . find ( j ) != S . end ( ) ) j ++; ans = max ( ans, j - arr [ i ] ); } } return ans; } int main() { int n_success = 0; vector> param0 {{2,28,31,64,73},{46,26,-84,-24,50,94,-14,74,-52,-62,2,46,62,54,-30,-70,-76,74,60,10,60,98,-92,98,-96,34,30,58,-60,-52,-66,-40,-78,-26,80,-58,-26,80,92,66,90,4,46,-78,80,62,30,0,38},{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},{24,72,87,81,90,59,18,29,12,24,78,59,93,80,79,26,17,28,43,85,85,76,83,71,28,99,80,14,9,92,46,59,66,34},{-94,-94,-94,-76,-68,-64,-64,-56,-48,-46,-36,-26,-12,-6,-6,-2,-2,6,6,24,46,48,50,52,58,76,88},{1},{1,8,22,27,28,58,80,89,95},{46,38,-50,98,-22,92,84,-48},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{74,2,85,72,1,49,53,48,46,44,98,75,5,13,98,69,65,68,37,38,77,69,14,17,46,54,55,20,23,59,98,44,22,12,71,18,94,49,57,82,7,64,33,7,29,58,45,98}}; vector param1 {3,29,38,32,19,0,5,6,19,36}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION{ public static int f_gold ( double n ) { if ( n == 1 ) return 1 ; double z ; double e = 2.71 ; z = Math . sqrt ( 2 * 3.14 * n ) * Math . pow ( ( n / e ) , n ) ; return ( int ) ( z ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1.0); param0.add(5.0); param0.add(10.0); param0.add(20.0); param0.add(40.0); param0.add(2.0); param0.add(3.0); param0.add(-1.0); param0.add(4663.43115050185); param0.add(-3722.039522409859); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; long int f_gold ( int n ) { if ( n == 1 ) return 1; long int z; float e = 2.71; z = sqrt ( 2 * 3.14 * n ) * pow ( ( n / e ), n ); return z; } int main() { int n_success = 0; vector param0 {1.0,5.0,10.0,20.0,40.0,2.0,3.0,-1.0,4663.43115050185,-3722.039522409859}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS{ static int f_gold ( int n ) { if ( n < 4 ) return - 1 ; int rem = n % 4 ; if ( rem == 0 ) return n / 4 ; if ( rem == 1 ) { if ( n < 9 ) return - 1 ; return ( n - 9 ) / 4 + 1 ; } if ( rem == 2 ) return ( n - 6 ) / 4 + 1 ; if ( rem == 3 ) { if ( n < 15 ) return - 1 ; return ( n - 15 ) / 4 + 2 ; } return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(55); param0.add(35); param0.add(24); param0.add(75); param0.add(5); param0.add(7); param0.add(50); param0.add(28); param0.add(67); param0.add(59); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): if (n < 4): return - 1 rem = n % 4 if (rem == 0): return n // 4 if (rem == 1): if (n < 9): return - 1 return (n - 9) // 4 + 1 if (rem == 2): return (n - 6) // 4 + 1 if (rem == 3): if (n < 15): return - 1 return (n - 15) // 4 + 2 "," using namespace std; int f_gold ( int n ) { if ( n < 4 ) return - 1; int rem = n % 4; if ( rem == 0 ) return n / 4; if ( rem == 1 ) { if ( n < 9 ) return - 1; return ( n - 9 ) / 4 + 1; } if ( rem == 2 ) return ( n - 6 ) / 4 + 1; if ( rem == 3 ) { if ( n < 15 ) return - 1; return ( n - 15 ) / 4 + 2; } } int main() { int n_success = 0; vector param0 {55,35,24,75,5,7,50,28,67,59}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (55,), (35,), (24,), (75,), (5,), (7,), (50,), (28,), (67,), (59,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_LENGTH_PREFIX_ONE_STRING_OCCURS_SUBSEQUENCE_ANOTHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_LENGTH_PREFIX_ONE_STRING_OCCURS_SUBSEQUENCE_ANOTHER{ static int f_gold ( String s , String t ) { int count = 0 ; for ( int i = 0 ; i < t . length ( ) ; i ++ ) { if ( count == t . length ( ) ) break ; if ( t . charAt ( i ) == s . charAt ( count ) ) count ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""nObYIOjEQZ""); param0.add(""84574""); param0.add(""1010001010010""); param0.add(""DjZtAfUudk""); param0.add(""550""); param0.add(""1110""); param0.add(""GywyxwH""); param0.add(""67318370914755""); param0.add(""11011000000101""); param0.add(""G""); List param1 = new ArrayList<>(); param1.add(""uARTDTQbmGI""); param1.add(""8538229""); param1.add(""11""); param1.add(""OewGm""); param1.add(""132744553919""); param1.add(""0101""); param1.add(""LPQqEqrDZiwY""); param1.add(""9928""); param1.add(""00000""); param1.add(""V""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s , t ) : count = 0 for i in range ( 0 , len ( t ) ) : if ( count == len ( s ) ) : break if ( t [ i ] == s [ count ] ) : count = count + 1 return count "," using namespace std; int f_gold ( char s [ ], char t [ ] ) { int count = 0; for ( int i = 0; i < strlen ( t ); i ++ ) { if ( count == strlen ( s ) ) break; if ( t [ i ] == s [ count ] ) count ++; } return count; } int main() { int n_success = 0; vector param0 {""nObYIOjEQZ"",""84574"",""1010001010010"",""DjZtAfUudk"",""550"",""1110"",""GywyxwH"",""67318370914755"",""11011000000101"",""G""}; vector param1 {""uARTDTQbmGI"",""8538229"",""11"",""OewGm"",""132744553919"",""0101"",""LPQqEqrDZiwY"",""9928"",""00000"",""V""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front()) == f_gold(¶m0[i].front(),¶m1[i].front())) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('nObYIOjEQZ','uARTDTQbmGI',), ('84574','8538229',), ('1010001010010','11',), ('DjZtAfUudk','OewGm',), ('550','132744553919',), ('1110','0101',), ('GywyxwH','LPQqEqrDZiwY',), ('67318370914755','9928',), ('11011000000101','00000',), ('G','V',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_DIFFERENCE_PAIR_VALUES_TWO_UNSORTED_ARRAYS{ static int f_gold ( int A [ ] , int B [ ] , int m , int n ) { Arrays . sort ( A ) ; Arrays . sort ( B ) ; int a = 0 , b = 0 ; int result = Integer . MAX_VALUE ; while ( a < m && b < n ) { if ( Math . abs ( A [ a ] - B [ b ] ) < result ) result = Math . abs ( A [ a ] - B [ b ] ) ; if ( A [ a ] < B [ b ] ) a ++ ; else b ++ ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,2,11,13,18,18,23,25,28,28,37,39,53,56,67,70,74,74,75,79,80,82,84,89,94,95,95,98,98}); param0.add(new int[]{-78,10,-8,30,-70,-94,-48,-4,-22,-40,-36,-48,-4,86,-50,62,-72,-44,-62,22,-30,-72,6,-24,-78,72,-44,56,38,-36,0,-72,-10,-12,-70,-64,-24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{57,82,90,9,61,71,15,2,39,24,28,28,47}); param0.add(new int[]{-92,-90,-90,-28,-16,-14,-14,-8,42,52,62,84}); param0.add(new int[]{1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,1,0,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0}); param0.add(new int[]{6,7,7,12,15,15,21,24,26,26,28,36,38,42,46,52,55,56,59,62,63,65,65,66,68,71,73,77,77,77,77,85,87,87,88,90,93,94,98}); param0.add(new int[]{-68,44,88,-68,22,34,-82,18,-60,30,24,18,78,90,-20,-60,94,70,4,-16,-38}); param0.add(new int[]{0,0,1}); param0.add(new int[]{14,7,9,71,37,20,85,62,70,67,26,47,61,99,2,90,70,46,53,16,56,7,15,81,85,94,73,40,35,58,21,98,45}); List param1 = new ArrayList<>(); param1.add(new int[]{5,6,11,13,13,16,17,19,23,25,28,31,31,39,41,44,45,52,62,64,70,71,73,78,78,79,85,86,92}); param1.add(new int[]{78,-80,-24,-50,-26,-62,26,-12,22,-90,84,10,18,62,26,-68,92,64,-52,76,-84,64,50,36,-24,-98,42,72,-78,-98,-24,86,2,60,-30,14,-42}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{85,92,84,27,54,77,26,49,47,51,70,11,41}); param1.add(new int[]{-98,-98,-58,-6,14,16,18,46,52,52,52,56}); param1.add(new int[]{0,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1}); param1.add(new int[]{1,3,4,4,6,7,8,8,15,17,18,18,20,23,23,24,25,25,26,33,39,43,46,54,59,67,69,69,69,69,76,76,81,81,85,86,86,91,95}); param1.add(new int[]{-18,-30,-74,-50,98,-44,-62,-20,18,84,62,-64,-2,62,-32,-34,-14,-52,-36,-60,-68}); param1.add(new int[]{0,0,1}); param1.add(new int[]{99,72,29,55,88,1,88,19,7,80,79,18,28,41,48,49,67,27,24,94,86,14,45,84,37,71,92,98,16,64,67,44,29}); List param2 = new ArrayList<>(); param2.add(28); param2.add(23); param2.add(14); param2.add(7); param2.add(11); param2.add(35); param2.add(30); param2.add(16); param2.add(2); param2.add(20); List param3 = new ArrayList<>(); param3.add(14); param3.add(33); param3.add(16); param3.add(8); param3.add(6); param3.add(33); param3.add(20); param3.add(12); param3.add(1); param3.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold(A, B, m, n): A.sort() B.sort() a = 0 b = 0 result = sys.maxsize while (a < m and b < n): if (abs(A[a] - B[b]) < result): result = abs(A[a] - B[b]) if (A[a] < B[b]): a += 1 else: b += 1 return result "," using namespace std; int f_gold ( int A [ ], int B [ ], int m, int n ) { sort ( A, A + m ); sort ( B, B + n ); int a = 0, b = 0; int result = INT_MAX; while ( a < m && b < n ) { if ( abs ( A [ a ] - B [ b ] ) < result ) result = abs ( A [ a ] - B [ b ] ); if ( A [ a ] < B [ b ] ) a ++; else b ++; } return result; } int main() { int n_success = 0; vector> param0 {{2,2,11,13,18,18,23,25,28,28,37,39,53,56,67,70,74,74,75,79,80,82,84,89,94,95,95,98,98},{-78,10,-8,30,-70,-94,-48,-4,-22,-40,-36,-48,-4,86,-50,62,-72,-44,-62,22,-30,-72,6,-24,-78,72,-44,56,38,-36,0,-72,-10,-12,-70,-64,-24},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{57,82,90,9,61,71,15,2,39,24,28,28,47},{-92,-90,-90,-28,-16,-14,-14,-8,42,52,62,84},{1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,1,1,0,0,1,1,0,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0},{6,7,7,12,15,15,21,24,26,26,28,36,38,42,46,52,55,56,59,62,63,65,65,66,68,71,73,77,77,77,77,85,87,87,88,90,93,94,98},{-68,44,88,-68,22,34,-82,18,-60,30,24,18,78,90,-20,-60,94,70,4,-16,-38},{0,0,1},{14,7,9,71,37,20,85,62,70,67,26,47,61,99,2,90,70,46,53,16,56,7,15,81,85,94,73,40,35,58,21,98,45}}; vector> param1 {{5,6,11,13,13,16,17,19,23,25,28,31,31,39,41,44,45,52,62,64,70,71,73,78,78,79,85,86,92},{78,-80,-24,-50,-26,-62,26,-12,22,-90,84,10,18,62,26,-68,92,64,-52,76,-84,64,50,36,-24,-98,42,72,-78,-98,-24,86,2,60,-30,14,-42},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{85,92,84,27,54,77,26,49,47,51,70,11,41},{-98,-98,-58,-6,14,16,18,46,52,52,52,56},{0,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1},{1,3,4,4,6,7,8,8,15,17,18,18,20,23,23,24,25,25,26,33,39,43,46,54,59,67,69,69,69,69,76,76,81,81,85,86,86,91,95},{-18,-30,-74,-50,98,-44,-62,-20,18,84,62,-64,-2,62,-32,-34,-14,-52,-36,-60,-68},{0,0,1},{99,72,29,55,88,1,88,19,7,80,79,18,28,41,48,49,67,27,24,94,86,14,45,84,37,71,92,98,16,64,67,44,29}}; vector param2 {28,23,14,7,11,35,30,16,2,20}; vector param3 {14,33,16,8,6,33,20,12,1,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 2, 11, 13, 18, 18, 23, 25, 28, 28, 37, 39, 53, 56, 67, 70, 74, 74, 75, 79, 80, 82, 84, 89, 94, 95, 95, 98, 98], [ 5, 6, 11, 13, 13, 16, 17, 19, 23, 25, 28, 31, 31, 39, 41, 44, 45, 52, 62, 64, 70, 71, 73, 78, 78, 79, 85, 86, 92], 28, 14,), ([-78, 10, -8, 30, -70, -94, -48, -4, -22, -40, -36, -48, -4, 86, -50, 62, -72, -44, -62, 22, -30, -72, 6, -24, -78, 72, -44, 56, 38, -36, 0, -72, -10, -12, -70, -64, -24], [78, -80, -24, -50, -26, -62, 26, -12, 22, -90, 84, 10, 18, 62, 26, -68, 92, 64, -52, 76, -84, 64, 50, 36, -24, -98, 42, 72, -78, -98, -24, 86, 2, 60, -30, 14, -42], 23, 33,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 14, 16,), ([57, 82, 90, 9, 61, 71, 15, 2, 39, 24, 28, 28, 47], [ 85, 92, 84, 27, 54, 77, 26, 49, 47, 51, 70, 11, 41], 7, 8,), ([-92, -90, -90, -28, -16, -14, -14, -8, 42, 52, 62, 84], [-98, -98, -58, -6, 14, 16, 18, 46, 52, 52, 52, 56], 11, 6,), ([1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0], [ 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1], 35, 33,), ([6, 7, 7, 12, 15, 15, 21, 24, 26, 26, 28, 36, 38, 42, 46, 52, 55, 56, 59, 62, 63, 65, 65, 66, 68, 71, 73, 77, 77, 77, 77, 85, 87, 87, 88, 90, 93, 94, 98], [ 1, 3, 4, 4, 6, 7, 8, 8, 15, 17, 18, 18, 20, 23, 23, 24, 25, 25, 26, 33, 39, 43, 46, 54, 59, 67, 69, 69, 69, 69, 76, 76, 81, 81, 85, 86, 86, 91, 95], 30, 20,), ([-68, 44, 88, -68, 22, 34, -82, 18, -60, 30, 24, 18, 78, 90, -20, -60, 94, 70, 4, -16, -38], [-18, - 30, -74, -50, 98, -44, -62, -20, 18, 84, 62, -64, -2, 62, -32, -34, -14, -52, -36, -60, -68], 16, 12,), ([0, 0, 1], [0, 0, 1], 2, 1,), ([14, 7, 9, 71, 37, 20, 85, 62, 70, 67, 26, 47, 61, 99, 2, 90, 70, 46, 53, 16, 56, 7, 15, 81, 85, 94, 73, 40, 35, 58, 21, 98, 45], [ 99, 72, 29, 55, 88, 1, 88, 19, 7, 80, 79, 18, 28, 41, 48, 49, 67, 27, 24, 94, 86, 14, 45, 84, 37, 71, 92, 98, 16, 64, 67, 44, 29], 20, 25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD_1{ public static boolean f_gold ( int n ) { if ( ( n & 1 ) == 0 ) return true ; else return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(73); param0.add(79); param0.add(36); param0.add(71); param0.add(23); param0.add(41); param0.add(66); param0.add(46); param0.add(50); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( not ( n & 1 ) ) "," using namespace std; bool f_gold ( int n ) { return ( ! ( n & 1 ) ); } int main() { int n_success = 0; vector param0 {57,73,79,36,71,23,41,66,46,50}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,), (73,), (79,), (36,), (71,), (23,), (41,), (66,), (46,), (50,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAKING_ELEMENTS_OF_TWO_ARRAYS_SAME_WITH_MINIMUM_INCREMENTDECREMENT{ static int f_gold ( int a [ ] , int b [ ] , int n ) { Arrays . sort ( a ) ; Arrays . sort ( b ) ; int result = 0 ; for ( int i = 0 ; i < n ; ++ i ) { if ( a [ i ] > b [ i ] ) result = result + Math . abs ( a [ i ] - b [ i ] ) ; else if ( a [ i ] < b [ i ] ) result = result + Math . abs ( a [ i ] - b [ i ] ) ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,6,6,7,10,11,13,18,19,19,19,31,34,37,37,40,41,41,47,47,53,54,55,55,56,56,60,60,62,62,66,73,75,76,78,81,81,85,88,90,91,92,93,95,97,98}); param0.add(new int[]{-12,-6,78,62,86,-32}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{76,74}); param0.add(new int[]{-92,-90,-88,-84,-76,-54,-44,-42,-38,-30,34,42}); param0.add(new int[]{1,1,0,0,1,1,1,0,1,1,0,0,1,0,0,1,1,1}); param0.add(new int[]{4,5,6,13,16,24,36,40,40,44,47,52,58,58,59,63,66,67,69,70,74,77,81,88,89,90,94,96}); param0.add(new int[]{-16,66,-2,54,-8,10,44,-36,-54,50,92,84,-36,40,-12,98,36,22,-10}); param0.add(new int[]{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}); param0.add(new int[]{42,24,43,64,55,94,26,30,76,3,37,43,81,7,15,64,63,88,34,8,55,32,19,55}); List param1 = new ArrayList<>(); param1.add(new int[]{2,2,4,7,8,8,8,8,8,9,9,12,15,16,21,25,26,27,29,34,34,35,38,40,40,44,44,47,48,54,58,61,63,64,66,69,69,70,73,74,75,76,79,80,80,93}); param1.add(new int[]{-86,20,32,52,50,-60}); param1.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{16,98}); param1.add(new int[]{-80,-54,-34,12,14,16,16,46,50,64,84,92}); param1.add(new int[]{0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1}); param1.add(new int[]{1,7,10,17,21,22,22,27,36,37,39,46,52,53,56,59,65,67,70,75,78,78,79,89,89,94,96,97}); param1.add(new int[]{-76,-74,62,22,50,84,78,26,-62,-10,86,-10,-92,-10,86,-6,-58,-26,-18}); param1.add(new int[]{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}); param1.add(new int[]{96,11,63,90,28,80,44,63,17,81,80,69,66,22,81,4,86,74,91,17,3,81,65,98}); List param2 = new ArrayList<>(); param2.add(23); param2.add(4); param2.add(14); param2.add(1); param2.add(8); param2.add(14); param2.add(24); param2.add(16); param2.add(36); param2.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , n ) : a.sort ( reverse = False ) b.sort ( reverse = False ) result = 0 for i in range ( 0 , n , 1 ) : if ( a [ i ] > b [ i ] ) : result = result + abs ( a [ i ] - b [ i ] ) elif ( a [ i ] < b [ i ] ) : result = result + abs ( a [ i ] - b [ i ] ) return result "," using namespace std; int f_gold ( int a [ ], int b [ ], int n ) { sort ( a, a + n ); sort ( b, b + n ); int result = 0; for ( int i = 0; i < n; ++ i ) { result = result + abs ( a [ i ] - b [ i ] ); } return result; } int main() { int n_success = 0; vector> param0 {{1,6,6,7,10,11,13,18,19,19,19,31,34,37,37,40,41,41,47,47,53,54,55,55,56,56,60,60,62,62,66,73,75,76,78,81,81,85,88,90,91,92,93,95,97,98},{-12,-6,78,62,86,-32},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{76,74},{-92,-90,-88,-84,-76,-54,-44,-42,-38,-30,34,42},{1,1,0,0,1,1,1,0,1,1,0,0,1,0,0,1,1,1},{4,5,6,13,16,24,36,40,40,44,47,52,58,58,59,63,66,67,69,70,74,77,81,88,89,90,94,96},{-16,66,-2,54,-8,10,44,-36,-54,50,92,84,-36,40,-12,98,36,22,-10},{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},{42,24,43,64,55,94,26,30,76,3,37,43,81,7,15,64,63,88,34,8,55,32,19,55}}; vector> param1 {{2,2,4,7,8,8,8,8,8,9,9,12,15,16,21,25,26,27,29,34,34,35,38,40,40,44,44,47,48,54,58,61,63,64,66,69,69,70,73,74,75,76,79,80,80,93},{-86,20,32,52,50,-60},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{16,98},{-80,-54,-34,12,14,16,16,46,50,64,84,92},{0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1},{1,7,10,17,21,22,22,27,36,37,39,46,52,53,56,59,65,67,70,75,78,78,79,89,89,94,96,97},{-76,-74,62,22,50,84,78,26,-62,-10,86,-10,-92,-10,86,-6,-58,-26,-18},{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},{96,11,63,90,28,80,44,63,17,81,80,69,66,22,81,4,86,74,91,17,3,81,65,98}}; vector param2 {23,4,14,1,8,14,24,16,36,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 6, 6, 7, 10, 11, 13, 18, 19, 19, 19, 31, 34, 37, 37, 40, 41, 41, 47, 47, 53, 54, 55, 55, 56, 56, 60, 60, 62, 62, 66, 73, 75, 76, 78, 81, 81, 85, 88, 90, 91, 92, 93, 95, 97, 98],[2, 2, 4, 7, 8, 8, 8, 8, 8, 9, 9, 12, 15, 16, 21, 25, 26, 27, 29, 34, 34, 35, 38, 40, 40, 44, 44, 47, 48, 54, 58, 61, 63, 64, 66, 69, 69, 70, 73, 74, 75, 76, 79, 80, 80, 93],23,), ([-12, -6, 78, 62, 86, -32],[-86, 20, 32, 52, 50, -60],4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([76, 74],[16, 98],1,), ([-92, -90, -88, -84, -76, -54, -44, -42, -38, -30, 34, 42],[-80, -54, -34, 12, 14, 16, 16, 46, 50, 64, 84, 92],8,), ([1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1],[0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],14,), ([4, 5, 6, 13, 16, 24, 36, 40, 40, 44, 47, 52, 58, 58, 59, 63, 66, 67, 69, 70, 74, 77, 81, 88, 89, 90, 94, 96],[1, 7, 10, 17, 21, 22, 22, 27, 36, 37, 39, 46, 52, 53, 56, 59, 65, 67, 70, 75, 78, 78, 79, 89, 89, 94, 96, 97],24,), ([-16, 66, -2, 54, -8, 10, 44, -36, -54, 50, 92, 84, -36, 40, -12, 98, 36, 22, -10],[-76, -74, 62, 22, 50, 84, 78, 26, -62, -10, 86, -10, -92, -10, 86, -6, -58, -26, -18],16,), ([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, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],36,), ([42, 24, 43, 64, 55, 94, 26, 30, 76, 3, 37, 43, 81, 7, 15, 64, 63, 88, 34, 8, 55, 32, 19, 55],[96, 11, 63, 90, 28, 80, 44, 63, 17, 81, 80, 69, 66, 22, 81, 4, 86, 74, 91, 17, 3, 81, 65, 98],22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2{ static int f_gold ( int num , int divisor ) { while ( num >= divisor ) num -= divisor ; return num ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(70); param0.add(77); param0.add(77); param0.add(88); param0.add(96); param0.add(6); param0.add(79); param0.add(44); param0.add(26); param0.add(82); List param1 = new ArrayList<>(); param1.add(13); param1.add(3); param1.add(73); param1.add(54); param1.add(39); param1.add(10); param1.add(95); param1.add(32); param1.add(86); param1.add(91); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num , divisor ) : while ( num >= divisor ) : num -= divisor ; return num ; "," using namespace std; int f_gold ( int num, int divisor ) { while ( num >= divisor ) num -= divisor; return num; } int main() { int n_success = 0; vector param0 {70,77,77,88,96,6,79,44,26,82}; vector param1 {13,3,73,54,39,10,95,32,86,91}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (70,13,), (77,3,), (77,73,), (88,54,), (96,39,), (6,10,), (79,95,), (44,32,), (26,86,), (82,91,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_TRIPLET_SUM_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_TRIPLET_SUM_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; return arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,8,18,18,27,33,33,38,42,43,44,47,52,58,64,65,67,68,71,75,85,89,91,94,94,95,95}); param0.add(new int[]{24,24,44,28,-88,18,34,92,-84,94,-12,30,-82,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{95,75,5,51,67,63,26,47,70,11,21,9,18,31,76,66,81,73,63,55,16,72,15,28,25,25,35,79,4,73,23,87,2,1,92,94,18,70,87,27,34,84,12}); param0.add(new int[]{-86,-86,-78,-56,-24,-14,-10,-6,12,12,18,22,22,26,50,50,72,78,94}); param0.add(new int[]{0,1,1,1,1,1,0,0,0,1,1,1,0,0,0}); param0.add(new int[]{2,13,17,19,20,23,28,28,29,40,45,51,52,58,58,68,70,75,79,81,92,96,97}); param0.add(new int[]{94,6,52,6,-78,40,-46,-20,64,76,-36,-62,50,-4,4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{34,11,15,42,32,4,6,25,52,44,14,57,3,44,7,89,35,3,70,66,58,22,5,17,33,11}); List param1 = new ArrayList<>(); param1.add(26); param1.add(8); param1.add(15); param1.add(37); param1.add(9); param1.add(9); param1.add(15); param1.add(13); param1.add(27); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( ) return ( arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ] ) "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); return arr [ n - 1 ] + arr [ n - 2 ] + arr [ n - 3 ]; } int main() { int n_success = 0; vector> param0 {{6,8,18,18,27,33,33,38,42,43,44,47,52,58,64,65,67,68,71,75,85,89,91,94,94,95,95},{24,24,44,28,-88,18,34,92,-84,94,-12,30,-82,-58},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{95,75,5,51,67,63,26,47,70,11,21,9,18,31,76,66,81,73,63,55,16,72,15,28,25,25,35,79,4,73,23,87,2,1,92,94,18,70,87,27,34,84,12},{-86,-86,-78,-56,-24,-14,-10,-6,12,12,18,22,22,26,50,50,72,78,94},{0,1,1,1,1,1,0,0,0,1,1,1,0,0,0},{2,13,17,19,20,23,28,28,29,40,45,51,52,58,58,68,70,75,79,81,92,96,97},{94,6,52,6,-78,40,-46,-20,64,76,-36,-62,50,-4,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,1,1,1,1,1,1,1},{34,11,15,42,32,4,6,25,52,44,14,57,3,44,7,89,35,3,70,66,58,22,5,17,33,11}}; vector param1 {26,8,15,37,9,9,15,13,27,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 8, 18, 18, 27, 33, 33, 38, 42, 43, 44, 47, 52, 58, 64, 65, 67, 68, 71, 75, 85, 89, 91, 94, 94, 95, 95],26,), ([24, 24, 44, 28, -88, 18, 34, 92, -84, 94, -12, 30, -82, -58],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],15,), ([95, 75, 5, 51, 67, 63, 26, 47, 70, 11, 21, 9, 18, 31, 76, 66, 81, 73, 63, 55, 16, 72, 15, 28, 25, 25, 35, 79, 4, 73, 23, 87, 2, 1, 92, 94, 18, 70, 87, 27, 34, 84, 12],37,), ([-86, -86, -78, -56, -24, -14, -10, -6, 12, 12, 18, 22, 22, 26, 50, 50, 72, 78, 94],9,), ([0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0],9,), ([2, 13, 17, 19, 20, 23, 28, 28, 29, 40, 45, 51, 52, 58, 58, 68, 70, 75, 79, 81, 92, 96, 97],15,), ([94, 6, 52, 6, -78, 40, -46, -20, 64, 76, -36, -62, 50, -4, 4],13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 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],27,), ([34, 11, 15, 42, 32, 4, 6, 25, 52, 44, 14, 57, 3, 44, 7, 89, 35, 3, 70, 66, 58, 22, 5, 17, 33, 11],13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++ ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,6,9,16,16,21,36,41,58,60,62,73,77,81,95}); param0.add(new int[]{-86,-72,-26,-34,18,-62,-66}); param0.add(new int[]{1}); param0.add(new int[]{16}); param0.add(new int[]{-88,-80,-72,-68,-64,-26,4,14,16,22,30,32,60,74,82}); param0.add(new int[]{0,0,1,1,1,0,1,0,0,0,1}); param0.add(new int[]{3,9,10,12,17,23,27,29,42,44,59,61,71,76,78,82,84,84,89,90,93,93,97,97}); param0.add(new int[]{68,-40,-46,-20,-64,90}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{99,17,94,43,97,17,11,58,75,94,37,22,54,31,41,4,55,69,92,80,45,97,16,33,36,17,43,82,81,64,22,65,85,44,47,14}); List param1 = new ArrayList<>(); param1.add(12); param1.add(3); param1.add(0); param1.add(0); param1.add(11); param1.add(9); param1.add(15); param1.add(5); param1.add(15); param1.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : ans = 0 for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : if ( arr [ i ] == arr [ j ] ) : ans += 1 return ans "," using namespace std; int f_gold ( int arr [ ], int n ) { int ans = 0; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) if ( arr [ i ] == arr [ j ] ) ans ++; return ans; } int main() { int n_success = 0; vector> param0 {{4,6,9,16,16,21,36,41,58,60,62,73,77,81,95},{-86,-72,-26,-34,18,-62,-66},{1},{16},{-88,-80,-72,-68,-64,-26,4,14,16,22,30,32,60,74,82},{0,0,1,1,1,0,1,0,0,0,1},{3,9,10,12,17,23,27,29,42,44,59,61,71,76,78,82,84,84,89,90,93,93,97,97},{68,-40,-46,-20,-64,90},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{99,17,94,43,97,17,11,58,75,94,37,22,54,31,41,4,55,69,92,80,45,97,16,33,36,17,43,82,81,64,22,65,85,44,47,14}}; vector param1 {12,3,0,0,11,9,15,5,15,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 6, 9, 16, 16, 21, 36, 41, 58, 60, 62, 73, 77, 81, 95],12,), ([-86, -72, -26, -34, 18, -62, -66],3,), ([1],0,), ([16],0,), ([-88, -80, -72, -68, -64, -26, 4, 14, 16, 22, 30, 32, 60, 74, 82],11,), ([0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1],9,), ([3, 9, 10, 12, 17, 23, 27, 29, 42, 44, 59, 61, 71, 76, 78, 82, 84, 84, 89, 90, 93, 93, 97, 97],15,), ([68, -40, -46, -20, -64, 90],5,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,), ([99, 17, 94, 43, 97, 17, 11, 58, 75, 94, 37, 22, 54, 31, 41, 4, 55, 69, 92, 80, 45, 97, 16, 33, 36, 17, 43, 82, 81, 64, 22, 65, 85, 44, 47, 14],23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DISTRIBUTING_M_ITEMS_CIRCLE_SIZE_N_STARTING_K_TH_POSITION{ static int f_gold ( int n , int m , int k ) { if ( m <= n - k + 1 ) return m + k - 1 ; m = m - ( n - k + 1 ) ; return ( m % n == 0 ) ? n : ( m % n ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(19); param0.add(23); param0.add(92); param0.add(9); param0.add(20); param0.add(68); param0.add(66); param0.add(77); param0.add(90); param0.add(26); List param1 = new ArrayList<>(); param1.add(14); param1.add(51); param1.add(10); param1.add(50); param1.add(67); param1.add(25); param1.add(30); param1.add(22); param1.add(1); param1.add(34); List param2 = new ArrayList<>(); param2.add(34); param2.add(5); param2.add(24); param2.add(34); param2.add(20); param2.add(40); param2.add(24); param2.add(32); param2.add(71); param2.add(54); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , m , k ) : if ( m <= n - k + 1 ) : return m + k - 1 m = m - ( n - k + 1 ) if ( m % n == 0 ) : return n else : return m % n "," using namespace std; int f_gold ( int n, int m, int k ) { if ( m <= n - k + 1 ) return m + k - 1; m = m - ( n - k + 1 ); return ( m % n == 0 ) ? n : ( m % n ); } int main() { int n_success = 0; vector param0 {19,23,92,9,20,68,66,77,90,26}; vector param1 {14,51,10,50,67,25,30,22,1,34}; vector param2 {34,5,24,34,20,40,24,32,71,54}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (19,14,34,), (23,51,5,), (92,10,24,), (9,50,34,), (20,67,20,), (68,25,40,), (66,30,24,), (77,22,32,), (90,1,71,), (26,34,54,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TAIL_RECURSION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TAIL_RECURSION{ static int f_gold ( int n ) { if ( n == 0 ) return 1 ; return n * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(77); param0.add(62); param0.add(42); param0.add(16); param0.add(82); param0.add(37); param0.add(29); param0.add(32); param0.add(82); param0.add(91); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 ) : return 1 return n * f_gold ( n - 1 ) "," using namespace std; unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {77,62,42,16,82,37,29,32,82,91}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (77,), (62,), (42,), (16,), (82,), (37,), (29,), (32,), (82,), (91,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_MODULUS_DIVISION_BY_A_POWER_OF_2_NUMBER{ static int f_gold ( int n , int d ) { return ( n & ( d - 1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(54); param0.add(39); param0.add(35); param0.add(9); param0.add(62); param0.add(16); param0.add(93); param0.add(32); param0.add(39); param0.add(63); List param1 = new ArrayList<>(); param1.add(59); param1.add(84); param1.add(81); param1.add(60); param1.add(68); param1.add(16); param1.add(96); param1.add(38); param1.add(62); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , d ) : return ( n & ( d - 1 ) ) "," using namespace std; unsigned int f_gold ( unsigned int n, unsigned int d ) { return ( n & ( d - 1 ) ); } int main() { int n_success = 0; vector param0 {54,39,35,9,62,16,93,32,39,63}; vector param1 {59,84,81,60,68,16,96,38,62,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (54,59,), (39,84,), (35,81,), (9,60,), (62,68,), (16,16,), (93,96,), (32,38,), (39,62,), (63,16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_2{ public static int f_gold ( int a , int b , int c ) { int x = a - b ; int y = b - c ; int z = a - c ; if ( x * y > 0 ) return b ; else if ( x * z > 0 ) return c ; else return a ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(48); param0.add(21); param0.add(71); param0.add(93); param0.add(3); param0.add(58); param0.add(88); param0.add(8); param0.add(17); param0.add(13); List param1 = new ArrayList<>(); param1.add(46); param1.add(7); param1.add(4); param1.add(34); param1.add(61); param1.add(78); param1.add(41); param1.add(84); param1.add(66); param1.add(3); List param2 = new ArrayList<>(); param2.add(38); param2.add(16); param2.add(31); param2.add(11); param2.add(32); param2.add(6); param2.add(66); param2.add(38); param2.add(27); param2.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , c ) : x = a - b y = b - c z = a - c if x * y > 0 : return b elif ( x * z > 0 ) : return else : return a "," using namespace std; int f_gold ( int a, int b, int c ) { int x = a - b; int y = b - c; int z = a - c; if ( x * y > 0 ) return b; else if ( x * z > 0 ) return c; else return a; } int main() { int n_success = 0; vector param0 {48,21,71,93,3,58,88,8,17,13}; vector param1 {46,7,4,34,61,78,41,84,66,3}; vector param2 {38,16,31,11,32,6,66,38,27,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (48,46,38,), (21,7,16,), (71,4,31,), (93,34,11,), (3,61,32,), (58,78,6,), (88,41,66,), (8,84,38,), (17,66,27,), (13,3,23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_INSERTIONS_SORT_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_INSERTIONS_SORT_ARRAY{ static int f_gold ( int arr [ ] , int N ) { int [ ] lis = new int [ N ] ; for ( int i = 0 ; i < N ; i ++ ) lis [ i ] = 1 ; for ( int i = 1 ; i < N ; i ++ ) for ( int j = 0 ; j < i ; j ++ ) if ( arr [ i ] >= arr [ j ] && lis [ i ] < lis [ j ] + 1 ) lis [ i ] = lis [ j ] + 1 ; int max = 0 ; for ( int i = 0 ; i < N ; i ++ ) if ( max < lis [ i ] ) max = lis [ i ] ; return ( N - max ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,7,20,22,23,31,33,36,47,61,63,63,71,74,82,91,95,99}); param0.add(new int[]{-84,12,-42,-78,22,72,56,70,28,-72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{29,41,4,62,77,74,30,2,14,90,93,10,78,36,66,22,48,89,36,73,70,23,90}); param0.add(new int[]{-80,-72,-68,-66,-58,-50,-48,-32,-28,-24,-22,-18,0,2,6,10,12,14,14,18,24,24,24,28,28,28,34,38,42,42,46,46,46,58,80,82,82,84,84,86,88,90,92,96}); param0.add(new int[]{1,1,0,1,0,1,0,0,1,0}); param0.add(new int[]{26,36,58,64,69,72,79,82,82,87,89,90,95}); param0.add(new int[]{-52,-40,98,40,42,-50,60,-64,-92,36,-88,72,-72,38,-80,-52,68,70,16,22,-30,-74,56,-80,62,-54,-32,-22,-86,-70,88,-76,-46,28,40,-2,-84,68,-98,-16,90,36,-38,-86,20,-40,82,98,54}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{36,62,58,24,99,12,46,3,4,40,54,97,48,94,98,7,17,5,3,36,3}); List param1 = new ArrayList<>(); param1.add(15); param1.add(7); param1.add(16); param1.add(13); param1.add(36); param1.add(8); param1.add(8); param1.add(41); param1.add(10); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , N ) : lis = [ 0 ] * N for i in range ( N ) : lis [ i ] = 1 for i in range ( 1 , N ) : for j in range ( i ) : if ( arr [ i ] >= arr [ j ] and lis [ i ] < lis [ j ] + 1 ) : lis [ i ] = lis [ j ] + 1 max = 0 for i in range ( N ) : if ( max < lis [ i ] ) : max = lis [ i ] return ( N - max ) "," using namespace std; int f_gold ( int arr [ ], int N ) { int lis [ N ]; for ( int i = 0; i < N; i ++ ) lis [ i ] = 1; for ( int i = 1; i < N; i ++ ) for ( int j = 0; j < i; j ++ ) if ( arr [ i ] >= arr [ j ] && lis [ i ] < lis [ j ] + 1 ) lis [ i ] = lis [ j ] + 1; int max = 0; for ( int i = 0; i < N; i ++ ) if ( max < lis [ i ] ) max = lis [ i ]; return ( N - max ); } int main() { int n_success = 0; vector> param0 {{4,7,20,22,23,31,33,36,47,61,63,63,71,74,82,91,95,99},{-84,12,-42,-78,22,72,56,70,28,-72},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{29,41,4,62,77,74,30,2,14,90,93,10,78,36,66,22,48,89,36,73,70,23,90},{-80,-72,-68,-66,-58,-50,-48,-32,-28,-24,-22,-18,0,2,6,10,12,14,14,18,24,24,24,28,28,28,34,38,42,42,46,46,46,58,80,82,82,84,84,86,88,90,92,96},{1,1,0,1,0,1,0,0,1,0},{26,36,58,64,69,72,79,82,82,87,89,90,95},{-52,-40,98,40,42,-50,60,-64,-92,36,-88,72,-72,38,-80,-52,68,70,16,22,-30,-74,56,-80,62,-54,-32,-22,-86,-70,88,-76,-46,28,40,-2,-84,68,-98,-16,90,36,-38,-86,20,-40,82,98,54},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{36,62,58,24,99,12,46,3,4,40,54,97,48,94,98,7,17,5,3,36,3}}; vector param1 {15,7,16,13,36,8,8,41,10,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 7, 20, 22, 23, 31, 33, 36, 47, 61, 63, 63, 71, 74, 82, 91, 95, 99],15,), ([-84, 12, -42, -78, 22, 72, 56, 70, 28, -72],7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,), ([29, 41, 4, 62, 77, 74, 30, 2, 14, 90, 93, 10, 78, 36, 66, 22, 48, 89, 36, 73, 70, 23, 90],13,), ([-80, -72, -68, -66, -58, -50, -48, -32, -28, -24, -22, -18, 0, 2, 6, 10, 12, 14, 14, 18, 24, 24, 24, 28, 28, 28, 34, 38, 42, 42, 46, 46, 46, 58, 80, 82, 82, 84, 84, 86, 88, 90, 92, 96],36,), ([1, 1, 0, 1, 0, 1, 0, 0, 1, 0],8,), ([26, 36, 58, 64, 69, 72, 79, 82, 82, 87, 89, 90, 95],8,), ([-52, -40, 98, 40, 42, -50, 60, -64, -92, 36, -88, 72, -72, 38, -80, -52, 68, 70, 16, 22, -30, -74, 56, -80, 62, -54, -32, -22, -86, -70, 88, -76, -46, 28, 40, -2, -84, 68, -98, -16, 90, 36, -38, -86, 20, -40, 82, 98, 54],41,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],10,), ([36, 62, 58, 24, 99, 12, 46, 3, 4, 40, 54, 97, 48, 94, 98, 7, 17, 5, 3, 36, 3],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_17_PALINDROME_PARTITIONING_1{ static int f_gold ( String str ) { int n = str . length ( ) ; int [ ] C = new int [ n ] ; boolean [ ] [ ] P = new boolean [ n ] [ n ] ; int i , j , k , L ; for ( i = 0 ; i < n ; i ++ ) { P [ i ] [ i ] = true ; } for ( L = 2 ; L <= n ; L ++ ) { for ( i = 0 ; i < n - L + 1 ; i ++ ) { j = i + L - 1 ; if ( L == 2 ) P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) ; else P [ i ] [ j ] = ( str . charAt ( i ) == str . charAt ( j ) ) && P [ i + 1 ] [ j - 1 ] ; } } for ( i = 0 ; i < n ; i ++ ) { if ( P [ 0 ] [ i ] == true ) C [ i ] = 0 ; else { C [ i ] = Integer . MAX_VALUE ; for ( j = 0 ; j < i ; j ++ ) { if ( P [ j + 1 ] [ i ] == true && 1 + C [ j ] < C [ i ] ) C [ i ] = 1 + C [ j ] ; } } } return C [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""YYGWgYrovdsh""); param0.add(""56109778""); param0.add(""101""); param0.add(""RxM""); param0.add(""187546405""); param0.add(""0110010""); param0.add(""wVODAmgvI""); param0.add(""56719""); param0.add(""10100011001100""); param0.add(""Wtpai""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( str1 ) : n = len ( str1 ) ; C = [ 0 ] * ( n + 1 ) ; P = [ [ False for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] ; for i in range ( n ) : P [ i ] [ i ] = True ; for L in range ( 2 , n + 1 ) : for i in range ( n - L + 1 ) : j = i + L - 1 ; if ( L == 2 ) : P [ i ] [ j ] = ( str1 [ i ] == str1 [ j ] ) ; else : P [ i ] [ j ] = ( ( str1 [ i ] == str1 [ j ] ) and P [ i + 1 ] [ j - 1 ] ) ; for i in range ( n ) : if ( P [ 0 ] [ i ] == True ) : C [ i ] = 0 ; else : C [ i ] = sys.maxsize ; for j in range ( i ) : if ( P [ j + 1 ] [ i ] == True and 1 + C [ j ] < C [ i ] ) : C [ i ] = 1 + C [ j ] ; return C [ n - 1 ] ; ",,," if __name__ == '__main__': param = [ ('YYGWgYrovdsh',), ('56109778',), ('101',), ('RxM',), ('187546405',), ('0110010',), ('wVODAmgvI',), ('56719',), ('10100011001100',), ('Wtpai',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY{ static int f_gold ( int arr1 [ ] , int arr2 [ ] , int n ) { for ( int i = 0 ; i < n ; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i ; return n ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,6,7,10,11,12,12,16,17,29,32,33,35,35,45,49,52,56,57,58,61,62,63,64,68,71,71,77,79,79,81,82,82,83,83,89,89,93,94,94}); param0.add(new int[]{-48,-92,96,-18,10,-24,-4,96,-16,-78,4,-80,-96,-28,-78,68,2,-60,0}); param0.add(new int[]{1}); param0.add(new int[]{68,98,21,29,71,49}); param0.add(new int[]{-80,-76,-76,-76,-68,-66,-56,-44,-38,-28,-24,-10,8,14,16,18,24,26,30,32,50,64,76,80,90,94,94,94}); param0.add(new int[]{0,0,1,0,1,0,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,1,1,1,0,1}); param0.add(new int[]{3,7,16,17,20,22,29,32,34,34,35,40,40,40,41,46,49,58,60,62,63,64,64,68,70,73,76,79,83,86,90,92,99}); param0.add(new int[]{18,-68,-6,-32,-76,-86,-8,76,-46,20,-80,54,-88,-58,-48,-66,-66,18,-28,-74,-72,-26,-92,-78,24,-22,-80,-80,82,-2,-72,-88,-54,-84,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{74,75,52,58,34,53,51,45,34,28,53,94,10,20,23,12,95,78,48,11}); List param1 = new ArrayList<>(); param1.add(new int[]{3,12,13,14,15,17,18,19,22,24,28,29,33,37,41,42,44,49,51,51,52,53,56,56,59,60,64,64,67,70,71,78,83,88,88,90,92,93,93,95}); param1.add(new int[]{-38,-40,-50,50,-26,-80,64,54,74,-44,-40,-92,-16,4,-60,-42,-60,-74,38}); param1.add(new int[]{0}); param1.add(new int[]{97,90,25,89,57,41}); param1.add(new int[]{-90,-88,-66,-60,-48,-48,-46,-42,-40,-36,-26,-4,2,4,4,8,16,18,34,50,52,56,64,80,86,90,92,96}); param1.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,1}); param1.add(new int[]{4,4,7,13,23,23,25,25,26,34,38,39,39,45,48,50,52,54,58,59,60,65,72,76,80,80,80,84,87,90,92,94,96}); param1.add(new int[]{-30,96,92,-12,-14,-68,-16,20,74,-42,36,84,-82,66,44,70,-92,-56,-28,-68,-4,10,-4,90,72,84,68,14,32,60,40,60,-34,58,-56}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{62,56,17,1,11,30,59,18,99,21,86,49,24,85,25,56,21,66,23,96}); List param2 = new ArrayList<>(); param2.add(36); param2.add(16); param2.add(0); param2.add(3); param2.add(14); param2.add(22); param2.add(26); param2.add(17); param2.add(24); param2.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , n ) : for i in range ( 0 , n ) : if ( arr1 [ i ] != arr2 [ i ] ) : return i return n "," using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int n ) { for ( int i = 0; i < n; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return i; return n; } int main() { int n_success = 0; vector> param0 {{1,6,7,10,11,12,12,16,17,29,32,33,35,35,45,49,52,56,57,58,61,62,63,64,68,71,71,77,79,79,81,82,82,83,83,89,89,93,94,94},{-48,-92,96,-18,10,-24,-4,96,-16,-78,4,-80,-96,-28,-78,68,2,-60,0},{1},{68,98,21,29,71,49},{-80,-76,-76,-76,-68,-66,-56,-44,-38,-28,-24,-10,8,14,16,18,24,26,30,32,50,64,76,80,90,94,94,94},{0,0,1,0,1,0,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,1,1,1,0,1},{3,7,16,17,20,22,29,32,34,34,35,40,40,40,41,46,49,58,60,62,63,64,64,68,70,73,76,79,83,86,90,92,99},{18,-68,-6,-32,-76,-86,-8,76,-46,20,-80,54,-88,-58,-48,-66,-66,18,-28,-74,-72,-26,-92,-78,24,-22,-80,-80,82,-2,-72,-88,-54,-84,-8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{74,75,52,58,34,53,51,45,34,28,53,94,10,20,23,12,95,78,48,11}}; vector> param1 {{3,12,13,14,15,17,18,19,22,24,28,29,33,37,41,42,44,49,51,51,52,53,56,56,59,60,64,64,67,70,71,78,83,88,88,90,92,93,93,95},{-38,-40,-50,50,-26,-80,64,54,74,-44,-40,-92,-16,4,-60,-42,-60,-74,38},{0},{97,90,25,89,57,41},{-90,-88,-66,-60,-48,-48,-46,-42,-40,-36,-26,-4,2,4,4,8,16,18,34,50,52,56,64,80,86,90,92,96},{0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,1},{4,4,7,13,23,23,25,25,26,34,38,39,39,45,48,50,52,54,58,59,60,65,72,76,80,80,80,84,87,90,92,94,96},{-30,96,92,-12,-14,-68,-16,20,74,-42,36,84,-82,66,44,70,-92,-56,-28,-68,-4,10,-4,90,72,84,68,14,32,60,40,60,-34,58,-56},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{62,56,17,1,11,30,59,18,99,21,86,49,24,85,25,56,21,66,23,96}}; vector param2 {36,16,0,3,14,22,26,17,24,17}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 6, 7, 10, 11, 12, 12, 16, 17, 29, 32, 33, 35, 35, 45, 49, 52, 56, 57, 58, 61, 62, 63, 64, 68, 71, 71, 77, 79, 79, 81, 82, 82, 83, 83, 89, 89, 93, 94, 94],[3, 12, 13, 14, 15, 17, 18, 19, 22, 24, 28, 29, 33, 37, 41, 42, 44, 49, 51, 51, 52, 53, 56, 56, 59, 60, 64, 64, 67, 70, 71, 78, 83, 88, 88, 90, 92, 93, 93, 95],36,), ([-48, -92, 96, -18, 10, -24, -4, 96, -16, -78, 4, -80, -96, -28, -78, 68, 2, -60, 0],[-38, -40, -50, 50, -26, -80, 64, 54, 74, -44, -40, -92, -16, 4, -60, -42, -60, -74, 38],16,), ([1],[0],0,), ([68, 98, 21, 29, 71, 49],[97, 90, 25, 89, 57, 41],3,), ([-80, -76, -76, -76, -68, -66, -56, -44, -38, -28, -24, -10, 8, 14, 16, 18, 24, 26, 30, 32, 50, 64, 76, 80, 90, 94, 94, 94],[-90, -88, -66, -60, -48, -48, -46, -42, -40, -36, -26, -4, 2, 4, 4, 8, 16, 18, 34, 50, 52, 56, 64, 80, 86, 90, 92, 96],14,), ([0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1],[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1],22,), ([3, 7, 16, 17, 20, 22, 29, 32, 34, 34, 35, 40, 40, 40, 41, 46, 49, 58, 60, 62, 63, 64, 64, 68, 70, 73, 76, 79, 83, 86, 90, 92, 99],[4, 4, 7, 13, 23, 23, 25, 25, 26, 34, 38, 39, 39, 45, 48, 50, 52, 54, 58, 59, 60, 65, 72, 76, 80, 80, 80, 84, 87, 90, 92, 94, 96],26,), ([18, -68, -6, -32, -76, -86, -8, 76, -46, 20, -80, 54, -88, -58, -48, -66, -66, 18, -28, -74, -72, -26, -92, -78, 24, -22, -80, -80, 82, -2, -72, -88, -54, -84, -8],[-30, 96, 92, -12, -14, -68, -16, 20, 74, -42, 36, 84, -82, 66, 44, 70, -92, -56, -28, -68, -4, 10, -4, 90, 72, 84, 68, 14, 32, 60, 40, 60, -34, 58, -56],17,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([74, 75, 52, 58, 34, 53, 51, 45, 34, 28, 53, 94, 10, 20, 23, 12, 95, 78, 48, 11],[62, 56, 17, 1, 11, 30, 59, 18, 99, 21, 86, 49, 24, 85, 25, 56, 21, 66, 23, 96],17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MEDIAN_ROW_WISE_SORTED_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MEDIAN_ROW_WISE_SORTED_MATRIX{ static int f_gold ( int m [ ] [ ] , int r , int c ) { int max = Integer . MIN_VALUE ; int min = Integer . MAX_VALUE ; for ( int i = 0 ; i < r ; i ++ ) { if ( m [ i ] [ 0 ] < min ) min = m [ i ] [ 0 ] ; if ( m [ i ] [ c - 1 ] > max ) max = m [ i ] [ c - 1 ] ; } int desired = ( r * c + 1 ) / 2 ; while ( min < max ) { int mid = min + ( max - min ) / 2 ; int place = 0 ; int get = 0 ; for ( int i = 0 ; i < r ; ++ i ) { get = Arrays . binarySearch ( m [ i ] , mid ) ; if ( get < 0 ) get = Math . abs ( get ) - 1 ; else { while ( get < m [ i ] . length && m [ i ] [ get ] == mid ) get += 1 ; } place = place + get ; } if ( place < desired ) min = mid + 1 ; else max = mid ; } return min ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,3,5}, new int[]{2,6,9}, new int[]{3,6,9}}); param0.add(new int[][]{new int[]{7,22,92,20,32,19,28,89,86,66,85,70,97,42,54,67,64,24,12,69},new int[]{86,84,97,68,26,16,84,19,31,3,79,55,11,16,47,39,52,1,32,72},new int[]{19,59,90,41,85,86,11,71,70,25,96,33,95,16,36,17,45,26,23,45},new int[]{47,56,11,30,25,98,21,2,67,5,45,66,95,64,23,78,18,75,58,60},new int[]{15,85,69,67,82,8,38,26,96,64,77,64,74,1,42,11,69,1,65,83},new int[]{50,69,76,92,60,37,23,5,87,88,81,4,17,30,54,89,81,78,23,24},new int[]{17,59,52,46,81,78,59,79,19,69,17,97,6,25,47,17,33,11,33,28},new int[]{41,59,5,85,30,46,90,56,3,85,12,7,26,44,56,55,13,78,25,81},new int[]{16,92,41,82,4,40,51,81,55,33,39,24,83,63,60,98,94,52,49,95},new int[]{66,41,15,57,49,59,74,6,97,64,23,42,69,40,31,14,70,97,45,96},new int[]{12,39,22,78,35,88,99,79,13,40,21,58,67,72,14,63,10,97,72,56},new int[]{4,55,9,61,65,61,56,87,77,93,53,44,56,94,39,23,21,77,95,13},new int[]{59,26,88,89,47,4,85,71,70,70,43,39,31,73,2,85,7,1,7,9},new int[]{89,48,55,77,95,60,70,78,58,49,30,22,4,93,66,30,24,80,25,65},new int[]{76,16,55,27,93,93,68,60,58,96,57,48,41,68,34,34,2,92,1,87},new int[]{37,83,59,91,43,59,76,65,13,1,45,74,14,40,22,46,84,47,59,92},new int[]{12,57,80,65,18,68,70,58,51,62,62,35,76,27,56,29,43,17,37,40},new int[]{91,57,6,59,59,71,43,84,74,15,15,87,10,68,33,76,9,27,62,11},new int[]{96,15,71,90,8,69,66,2,74,17,77,9,80,71,76,4,31,96,3,41},new int[]{7,66,75,50,60,71,47,57,84,22,22,89,18,74,62,12,29,3,53,26}}); param0.add(new int[][]{new int[]{99,84,78,41,13,40,92,51,96,2,36,14,26,66,11,73,50,71,35,81,90,29,38,33,75,98,6,18,31,79,94,77,5,84,40,47},new int[]{63,82,43,2,76,20,24,73,35,55,52,95,45,47,93,51,29,68,50,14,28,58,33,72,51,1,68,29,35,18,44,55,36,19,49,21},new int[]{53,80,70,90,1,82,1,27,19,99,90,52,79,70,63,95,98,81,67,84,2,37,53,73,87,97,39,31,19,42,51,68,34,54,58,15},new int[]{29,57,6,46,71,27,89,1,73,22,22,53,66,70,93,65,55,81,96,44,37,38,68,5,23,60,42,81,98,24,42,48,98,99,6,67},new int[]{16,29,74,58,93,95,3,22,65,31,5,91,38,20,65,87,64,68,30,68,7,61,92,52,31,17,78,19,7,23,66,54,76,43,11,29},new int[]{35,61,28,58,96,7,17,66,22,28,57,2,92,84,61,75,45,21,82,56,60,95,67,36,41,19,48,7,94,75,11,81,61,96,4,56},new int[]{6,62,30,59,43,61,56,58,59,77,65,60,53,11,80,49,42,89,62,66,91,20,94,17,89,44,16,58,21,53,82,10,6,17,12,42},new int[]{60,33,36,94,23,3,73,67,62,46,9,83,22,78,50,95,98,54,53,87,33,41,92,21,26,10,64,23,67,10,1,28,77,39,78,58},new int[]{38,65,2,70,18,52,54,18,22,47,76,75,73,28,42,39,19,20,68,27,65,91,46,64,64,57,50,92,99,1,3,4,27,37,23,27},new int[]{89,82,2,10,44,98,90,27,96,37,75,49,29,77,8,88,60,93,65,77,54,25,7,22,97,15,3,55,8,48,65,76,95,92,83,82},new int[]{52,77,99,38,22,57,13,36,54,47,47,70,72,88,80,83,38,48,67,22,22,62,87,1,86,63,80,42,67,2,61,61,10,36,57,16},new int[]{13,34,22,19,18,48,10,83,27,14,12,76,86,9,35,14,24,67,90,46,26,46,99,71,29,5,30,12,89,61,14,31,43,76,62,52},new int[]{67,89,45,23,94,5,58,97,40,12,94,17,15,43,67,75,14,59,81,96,35,30,69,13,98,21,90,38,56,70,68,82,95,24,73,27},new int[]{8,90,77,64,57,5,19,52,78,45,37,96,15,58,27,81,98,91,91,8,48,26,78,9,76,15,98,86,12,89,33,4,5,16,53,45},new int[]{68,19,13,3,5,15,91,33,84,41,34,17,41,58,7,44,37,44,37,15,98,3,66,98,60,99,63,84,17,95,81,74,87,30,37,44},new int[]{66,41,60,70,13,56,24,3,64,29,16,88,4,71,54,20,79,73,57,99,67,56,89,64,67,15,75,88,70,21,78,27,77,87,66,95},new int[]{77,16,1,66,96,66,4,66,4,77,45,1,57,67,15,67,97,14,10,87,43,8,1,45,92,75,73,43,11,41,65,40,52,67,87,83},new int[]{45,9,70,80,45,83,19,3,44,13,26,20,64,23,83,31,70,99,51,6,17,65,92,44,61,95,16,68,67,7,60,23,68,20,77,72},new int[]{36,98,68,26,35,53,20,10,70,94,3,84,46,67,80,4,40,39,17,29,4,74,73,75,65,95,17,64,47,18,71,26,24,33,90,29},new int[]{88,46,76,92,26,41,25,15,95,34,51,72,27,4,76,95,85,20,48,53,63,17,95,79,32,66,92,85,50,13,97,27,26,53,34,82},new int[]{74,83,57,12,88,65,9,93,45,92,99,82,44,48,19,86,82,54,76,73,36,15,9,9,46,31,55,70,58,15,40,10,1,72,24,85},new int[]{64,48,94,50,3,70,64,25,56,41,59,33,75,12,1,68,69,99,59,75,30,33,40,85,22,25,98,4,12,4,23,70,58,97,35,58},new int[]{97,6,7,21,15,66,87,67,12,49,79,62,33,61,13,13,59,28,77,24,30,4,13,76,1,44,49,81,24,34,39,42,7,23,21,43},new int[]{60,24,67,93,28,66,4,81,84,36,57,90,57,86,19,31,42,60,89,30,48,73,30,41,32,59,48,79,99,65,21,36,67,79,88,16},new int[]{58,7,80,28,50,12,25,30,72,11,60,42,55,36,49,46,94,70,35,94,14,37,92,40,52,41,5,21,55,49,61,6,51,61,62,24},new int[]{52,16,7,42,90,21,48,60,82,17,21,52,6,19,66,19,22,80,25,44,11,76,28,66,38,76,25,2,33,13,56,52,45,50,59,64},new int[]{88,84,84,47,12,45,37,8,97,31,29,18,56,20,72,46,88,1,58,67,75,42,43,3,21,69,65,78,68,19,47,20,7,60,48,9},new int[]{34,42,13,68,36,19,81,60,89,14,5,7,78,97,76,52,4,52,56,6,65,84,90,87,76,13,59,57,82,95,46,53,28,69,39,20},new int[]{20,98,50,14,15,36,30,18,98,26,83,64,68,91,55,67,44,59,12,36,2,42,34,31,69,20,38,75,95,89,4,85,62,1,42,51},new int[]{37,43,92,62,51,53,1,64,16,2,2,58,17,86,80,77,7,62,17,21,95,79,64,43,87,53,41,26,94,75,26,70,67,89,79,59},new int[]{21,42,70,23,57,53,76,27,62,79,72,25,43,48,61,19,35,21,18,93,91,40,74,53,5,22,56,14,40,1,77,27,49,58,81,72},new int[]{92,26,20,83,14,25,36,28,8,49,97,6,89,1,94,5,73,8,88,89,41,72,85,19,3,39,16,65,74,70,69,17,21,93,62,31},new int[]{3,38,60,92,92,65,76,16,89,82,8,70,51,50,73,18,94,84,82,29,75,82,33,3,92,5,80,59,4,18,27,18,66,6,99,83},new int[]{93,11,38,65,59,54,21,99,8,67,15,81,92,61,51,41,78,17,39,20,39,70,70,77,35,99,27,32,98,3,32,71,34,21,29,4},new int[]{68,1,31,45,81,71,52,44,50,36,21,23,77,34,69,31,12,28,48,28,7,34,86,51,88,78,80,11,94,38,42,7,46,45,3,79},new int[]{57,30,97,52,81,54,48,84,33,91,20,98,95,5,82,83,17,87,2,24,51,48,44,1,52,22,14,77,76,71,66,67,40,36,77,58}}); param0.add(new int[][]{new int[]{37,14,64,26,40,7,92,8,79,5,97,43,36,59,3,62,22,22,96,38,50,87,53,85,4,79,21,20,84,25,45,64,61,53,95,68},new int[]{56,93,99,94,58,73,37,5,18,33,13,33,40,66,12,93,93,47,48,23,40,5,36,31,23,16,72,9,54,66,18,47,83,37,40,72},new int[]{81,69,72,74,3,67,95,91,92,38,27,16,15,72,49,28,79,60,24,69,70,60,55,5,25,40,7,31,61,3,52,82,64,93,65,56},new int[]{29,59,40,33,88,35,71,97,68,35,34,74,74,20,44,81,41,77,7,94,22,11,13,23,74,28,17,47,94,22,49,40,84,6,82,95},new int[]{26,47,66,45,31,50,13,38,99,25,96,29,35,28,83,19,7,49,83,72,14,99,8,66,64,93,24,15,72,3,11,71,39,5,21,22},new int[]{96,38,7,90,91,53,53,43,51,4,18,2,58,33,65,94,63,89,90,31,80,68,13,27,57,14,52,63,80,73,94,9,39,91,7,57},new int[]{55,7,83,80,16,47,98,63,93,96,79,33,21,95,39,29,16,45,87,71,32,43,30,10,15,13,58,86,23,53,34,70,45,32,53,76},new int[]{31,44,79,76,99,65,25,10,33,57,42,52,63,15,8,38,28,72,88,2,3,25,34,36,81,52,19,93,62,52,83,30,11,9,98,20},new int[]{4,69,53,77,68,10,66,55,10,47,66,80,71,73,24,73,46,93,8,12,2,9,71,29,96,84,23,89,79,33,94,16,9,74,36,55},new int[]{32,47,14,35,14,1,51,88,76,48,58,41,73,13,57,26,15,80,10,17,10,47,10,61,35,8,10,71,98,65,69,81,48,20,68,46},new int[]{98,36,1,50,60,29,20,29,16,80,40,88,17,91,73,20,46,24,42,85,81,50,31,14,37,13,93,97,85,43,6,79,14,32,63,9},new int[]{46,74,83,67,32,1,16,32,66,83,47,79,5,14,69,11,27,39,7,2,49,42,23,21,87,1,29,51,35,35,37,47,18,97,6,74},new int[]{28,58,76,68,25,71,38,84,55,44,23,59,72,81,29,48,99,54,26,10,75,79,82,68,91,69,70,10,19,76,59,24,80,73,77,18},new int[]{32,19,38,21,56,85,57,49,6,55,2,6,81,30,55,11,25,35,73,89,8,67,90,86,24,21,16,46,36,10,66,97,91,17,75,73},new int[]{57,10,75,79,66,17,75,32,69,18,46,46,2,27,8,92,28,56,49,69,94,91,27,89,27,12,4,52,57,34,50,24,36,53,17,32},new int[]{54,60,55,62,59,76,6,32,2,16,55,91,68,28,80,23,47,10,61,82,99,53,68,85,59,90,16,36,19,21,99,39,37,57,21,85},new int[]{13,1,35,97,50,53,9,95,86,57,6,48,59,91,87,94,67,84,22,21,15,49,79,50,47,79,69,41,84,22,92,91,77,62,78,10},new int[]{74,19,91,88,43,65,27,8,54,81,28,44,91,97,24,65,8,2,18,79,61,42,40,4,64,39,79,90,77,10,34,91,27,45,88,95},new int[]{10,77,83,37,3,15,62,9,67,4,29,29,31,60,22,82,66,44,35,12,22,90,89,32,9,64,59,74,64,99,48,53,32,54,41,67},new int[]{55,94,35,58,69,94,1,9,49,68,46,84,88,37,77,77,19,81,20,39,15,97,93,72,21,54,10,49,1,32,88,14,28,40,52,27},new int[]{15,61,89,62,1,4,39,27,31,51,84,42,63,88,81,30,7,54,97,59,68,72,66,29,59,34,53,81,40,58,84,29,70,84,91,70},new int[]{49,6,7,36,70,98,1,94,22,81,42,84,32,32,6,6,72,11,29,33,1,91,72,77,37,37,93,26,41,90,96,42,60,88,3,13},new int[]{11,57,69,65,98,32,13,17,66,21,85,70,54,94,15,15,9,76,71,88,21,9,96,66,71,2,56,12,56,79,99,51,70,59,71,11},new int[]{3,34,95,85,93,19,7,11,63,67,56,43,56,45,60,33,28,96,57,52,4,99,17,35,42,60,26,48,64,17,98,72,73,7,65,52},new int[]{41,16,66,72,86,56,27,18,63,80,26,22,58,1,96,46,86,27,44,33,94,83,33,54,25,6,48,93,60,62,15,76,59,38,15,31},new int[]{65,20,29,75,73,16,80,33,55,19,89,50,34,64,24,32,3,13,94,87,94,12,62,45,24,24,94,81,15,50,88,96,88,67,45,65},new int[]{20,21,12,85,83,19,2,33,37,10,32,94,81,30,14,5,36,77,58,80,13,93,88,18,8,69,48,78,3,70,17,51,57,43,42,29},new int[]{86,98,55,70,43,60,41,91,49,78,84,27,3,81,68,42,77,54,1,21,67,47,89,59,1,14,98,40,67,9,69,25,64,60,33,5},new int[]{76,52,75,33,16,3,5,62,19,11,85,73,18,12,43,87,50,40,77,35,57,56,28,62,99,87,15,8,15,65,35,58,76,9,39,97},new int[]{21,95,60,94,43,63,42,83,34,17,98,65,25,99,58,10,97,78,6,50,20,46,76,91,11,79,28,2,64,14,69,74,78,82,98,81},new int[]{28,38,95,33,54,60,4,54,87,21,25,51,15,78,13,61,97,21,44,61,24,89,35,23,68,55,21,24,90,61,89,8,70,62,98,3},new int[]{16,6,21,3,65,71,24,20,34,46,72,89,38,28,37,61,25,76,43,20,82,33,33,39,12,78,20,18,74,17,5,64,28,33,38,85},new int[]{39,92,65,3,77,26,70,89,35,19,50,35,86,11,89,26,10,46,28,83,19,36,18,26,49,55,8,5,72,30,8,36,74,27,15,84},new int[]{38,82,39,76,43,82,35,51,38,91,72,35,52,96,9,44,8,72,1,25,71,32,62,10,86,17,11,47,56,41,16,25,30,76,41,61},new int[]{49,90,90,76,42,63,95,26,38,28,70,1,66,91,42,8,50,10,73,52,11,4,30,37,91,17,9,6,93,69,49,1,18,14,12,68},new int[]{72,70,60,84,87,81,65,53,39,49,78,2,16,48,45,26,11,55,97,13,27,62,12,63,3,4,15,92,47,78,24,41,70,75,93,16}}); param0.add(new int[][]{new int[]{82,57,41,47,46,74,62,36,30,15,18,29,58,93,22,55,23,93,44,70,60,88,5,87,34,12,75,67,88,93,41,95,8,2},new int[]{93,58,37,80,60,41,72,36,78,76,91,19,51,54,77,29,67,8,61,56,78,7,68,21,45,12,95,73,7,45,35,40,11,42},new int[]{2,34,54,99,80,51,32,79,74,12,13,30,86,71,80,45,97,87,97,70,46,32,83,36,30,3,37,82,98,80,4,68,43,7},new int[]{82,43,37,99,66,46,69,3,35,15,80,27,76,69,53,67,75,39,6,14,87,4,16,7,27,67,3,32,48,68,10,1,18,94},new int[]{28,43,80,22,64,30,41,39,74,25,11,87,22,20,5,22,81,18,79,94,76,2,3,44,78,36,37,78,23,53,79,62,71,58},new int[]{33,57,49,38,76,51,58,24,78,42,71,20,93,44,54,47,7,5,97,52,77,32,27,50,66,77,38,56,63,30,46,70,67,51},new int[]{94,59,83,59,50,80,68,52,45,9,64,8,49,55,90,9,12,92,69,80,19,87,8,18,26,43,26,79,14,7,89,2,48,70},new int[]{73,56,21,75,7,96,40,27,77,2,13,4,68,26,87,20,94,89,57,27,64,20,80,4,73,71,47,20,41,61,96,65,73,40},new int[]{83,40,98,54,98,23,65,36,56,87,64,93,87,47,87,42,27,91,91,23,87,85,71,85,45,84,32,39,54,44,64,70,82,6},new int[]{8,66,40,63,84,42,77,72,90,62,74,73,92,7,1,97,43,13,98,11,93,91,35,38,89,45,51,15,59,66,14,14,41,24},new int[]{5,34,32,92,46,77,16,85,22,87,32,76,41,22,53,23,35,89,43,62,45,94,57,94,67,55,31,54,36,35,14,22,15,87},new int[]{72,50,24,42,40,49,97,71,9,98,43,62,20,19,96,21,90,9,61,34,70,33,79,82,87,59,71,14,78,53,54,84,98,94},new int[]{44,29,7,94,94,46,90,69,89,94,34,46,19,30,8,86,94,18,87,60,88,44,52,80,8,13,42,78,20,96,35,72,66,87},new int[]{49,66,92,69,89,1,51,86,71,54,87,88,26,78,95,91,22,49,46,17,94,60,85,8,61,61,2,48,46,61,6,13,29,63},new int[]{99,94,46,34,84,15,74,24,82,3,28,50,76,97,16,49,42,3,33,88,1,51,78,9,99,16,73,76,31,49,6,30,45,89},new int[]{29,52,29,86,68,73,85,11,77,20,74,57,87,96,88,44,11,33,91,59,87,68,49,15,3,67,89,86,11,75,55,8,37,28},new int[]{20,22,58,46,75,23,98,34,50,47,88,49,3,30,23,65,18,52,67,88,25,2,58,86,73,54,16,63,43,44,16,79,7,27},new int[]{18,7,86,62,61,62,62,13,59,83,26,17,17,16,57,13,69,98,19,93,93,91,76,54,69,61,94,49,29,59,23,61,1,69},new int[]{48,4,11,43,14,32,56,77,96,50,62,9,31,51,50,81,77,30,26,11,3,54,83,22,49,55,86,63,96,71,64,88,73,47},new int[]{89,86,24,44,7,53,23,65,37,69,23,42,85,15,66,85,18,40,18,18,79,59,75,76,65,99,32,63,10,12,87,91,1,97},new int[]{19,23,11,49,68,67,75,48,9,24,39,9,15,1,75,23,9,6,12,54,15,3,1,13,97,75,62,80,3,16,32,90,28,91},new int[]{81,48,48,27,12,35,19,97,17,9,46,12,33,79,29,13,67,99,58,85,99,99,95,77,96,63,82,18,10,80,87,31,53,98},new int[]{44,29,49,80,57,94,89,37,48,83,96,59,12,15,56,79,84,60,70,19,53,29,62,27,99,97,83,40,36,69,20,98,48,71},new int[]{98,55,58,92,39,86,41,50,59,56,53,63,41,30,55,85,61,40,73,36,13,46,97,90,1,60,2,36,45,94,80,9,15,39},new int[]{55,59,86,79,4,16,11,96,22,65,54,90,3,96,97,97,66,86,57,12,66,8,81,4,44,65,6,62,40,86,35,50,40,11},new int[]{66,18,73,70,34,12,21,60,90,10,16,79,23,21,61,43,16,58,11,84,21,16,75,33,86,89,33,98,15,65,4,81,92,32},new int[]{8,36,83,56,88,3,14,96,76,95,34,95,36,96,35,32,80,1,52,13,75,75,25,64,5,63,85,99,76,52,46,77,67,76},new int[]{47,34,20,39,52,50,68,41,43,49,71,47,57,67,46,41,77,29,41,85,46,25,3,30,86,2,9,58,4,72,19,85,14,1},new int[]{20,83,80,74,66,65,8,9,39,64,57,82,15,80,85,25,88,16,49,73,79,48,77,60,61,44,24,51,33,12,10,31,56,4},new int[]{36,10,67,22,85,38,46,67,29,51,60,59,5,3,64,94,47,40,8,56,77,54,84,77,6,74,53,26,70,26,28,76,53,61},new int[]{40,68,88,15,88,13,67,91,45,79,26,56,23,39,97,21,14,13,32,12,63,52,74,22,47,25,93,71,35,93,80,72,51,59},new int[]{73,20,19,16,62,29,98,92,34,81,4,55,52,98,30,59,64,38,30,95,43,96,56,98,82,6,3,40,78,38,17,51,27,37},new int[]{26,78,60,88,21,65,62,42,96,63,75,58,81,62,67,29,19,97,5,66,9,41,25,84,75,12,65,88,81,16,55,38,43,8},new int[]{53,61,88,70,46,9,67,23,31,34,35,48,81,21,67,38,53,35,98,14,80,58,68,73,38,15,54,65,10,11,95,36,98,57}}); param0.add(new int[][]{new int[]{37,18,39,36},new int[]{40,7,76,19},new int[]{37,8,74,36},new int[]{71,92,41,43}}); param0.add(new int[][]{new int[]{65,54,93,86,22,47,45,88,25,20,30,51,71,3,70,80,77,7,29,55,75,2,88,26,45,54,38,9,70,54,47,94,78,48,78,78,24},new int[]{82,2,96,90,31,21,93,78,64,49,47,1,34,32,63,63,52,39,76,48,3,14,86,26,35,87,4,45,26,53,64,26,90,94,29,96,61},new int[]{14,93,53,59,69,30,22,96,81,94,6,5,41,86,47,23,77,53,40,61,80,14,22,68,81,3,67,73,38,7,13,96,55,2,37,77,93},new int[]{77,50,20,49,11,50,41,73,4,43,79,31,2,12,85,30,44,87,75,36,25,71,50,72,22,36,3,78,27,90,7,37,55,44,72,60,59},new int[]{52,4,2,17,85,84,30,48,2,79,66,27,21,89,93,5,65,25,25,48,11,97,19,18,7,87,4,21,41,77,91,6,77,63,18,27,87},new int[]{46,46,95,85,89,45,43,80,50,80,21,33,92,30,1,69,33,75,72,95,85,89,18,12,12,99,64,29,78,77,19,84,2,12,44,74,36},new int[]{17,7,18,13,77,60,12,79,48,51,67,60,10,23,4,25,65,61,69,69,47,27,62,71,49,61,88,87,72,30,31,16,92,65,11,62,38},new int[]{87,96,96,93,95,59,19,9,96,95,69,23,55,85,20,13,57,20,47,77,7,34,56,53,53,81,63,30,68,4,37,39,36,15,86,75,36},new int[]{96,19,16,74,81,43,6,97,84,14,28,6,19,6,5,66,48,70,14,78,94,45,40,88,30,75,78,22,3,29,48,8,49,7,24,5,84},new int[]{64,5,49,70,92,15,59,90,21,85,9,47,41,56,74,48,62,89,85,98,31,66,16,35,49,31,76,54,23,17,14,97,48,48,6,23,48},new int[]{49,61,31,5,67,38,28,31,58,54,17,22,64,13,44,85,47,85,6,10,58,40,14,23,71,88,15,87,5,41,20,52,10,87,27,51,60},new int[]{95,6,77,28,16,17,46,95,10,31,59,39,6,84,49,21,16,25,39,36,34,72,14,57,49,87,76,84,60,88,77,33,34,32,55,29,27},new int[]{77,86,71,71,93,14,2,7,81,33,22,14,54,1,72,41,8,29,81,91,45,8,6,51,94,23,79,60,41,14,27,67,12,67,40,65,17},new int[]{18,10,59,12,17,22,14,41,8,17,79,6,71,50,96,43,9,84,42,45,39,66,64,82,61,38,66,79,11,3,9,43,87,63,10,88,32},new int[]{68,7,93,45,46,60,29,64,73,46,2,3,92,84,42,68,62,30,31,41,22,73,9,31,16,35,22,52,59,95,13,92,51,39,59,39,71},new int[]{89,48,65,50,46,35,63,75,98,82,31,60,16,51,94,55,37,25,28,24,98,21,11,53,91,73,16,11,14,43,79,86,42,86,89,86,67},new int[]{30,65,45,3,47,81,97,77,61,56,8,32,57,26,70,76,8,93,20,13,45,8,18,26,84,33,8,76,66,16,43,11,81,94,44,8,87},new int[]{74,70,65,75,87,67,78,77,20,99,49,15,5,53,41,85,49,75,71,76,68,23,26,48,60,66,16,98,75,87,51,23,51,55,94,45,84},new int[]{80,11,46,95,88,58,26,66,57,79,45,22,26,49,68,6,22,38,23,64,89,67,20,33,20,70,76,44,83,25,49,82,15,27,88,21,79},new int[]{26,10,67,93,38,55,69,88,69,32,90,48,27,76,32,36,55,70,13,50,95,18,29,10,39,3,82,48,93,42,47,26,32,27,75,70,95},new int[]{8,88,18,73,22,63,50,74,1,3,90,56,7,27,15,87,85,77,32,49,84,69,32,53,28,92,76,70,90,81,36,62,10,90,80,96,80},new int[]{14,25,65,39,43,80,97,86,92,50,23,2,15,44,44,63,37,5,32,87,23,97,70,48,33,20,2,84,87,90,54,26,2,66,97,74,28},new int[]{15,82,91,52,39,76,14,31,73,46,40,59,26,91,16,2,81,93,96,63,25,67,41,55,99,3,27,14,33,85,10,53,81,71,91,95,40},new int[]{98,24,10,49,28,33,47,13,44,93,27,75,74,29,78,85,40,89,7,79,72,86,77,39,25,28,51,80,71,49,57,70,15,99,2,12,78},new int[]{53,60,66,43,34,28,5,35,16,38,99,46,44,44,5,46,46,77,65,29,2,63,81,36,38,88,18,8,28,4,38,82,64,72,58,63,20},new int[]{60,35,81,37,75,63,35,52,18,57,20,59,68,26,13,21,88,95,55,42,83,97,99,23,70,44,26,65,76,51,74,90,27,37,40,27,65},new int[]{60,56,78,52,53,14,32,96,83,72,35,49,14,59,5,95,32,88,22,61,21,33,79,51,48,15,3,94,57,56,62,18,72,83,56,48,91},new int[]{5,90,14,41,60,50,63,65,32,91,18,18,41,75,70,51,93,36,5,34,15,9,97,81,11,42,63,41,61,30,13,75,7,58,42,64,45},new int[]{85,71,22,96,4,79,39,85,41,41,41,28,43,64,6,66,31,91,9,1,15,23,17,58,71,67,98,53,83,30,10,55,42,48,82,23,87},new int[]{4,99,73,75,65,10,95,14,92,36,88,28,59,4,78,69,96,17,98,37,62,90,31,92,28,93,53,36,26,86,99,28,61,22,50,35,82},new int[]{69,93,11,88,38,59,45,44,25,16,20,54,13,35,12,63,4,36,94,93,82,93,9,74,10,53,8,59,19,44,44,34,53,3,87,2,60},new int[]{46,15,99,7,61,35,35,69,49,83,95,2,34,13,64,35,98,78,35,26,44,7,39,85,79,13,84,98,90,4,98,84,19,31,83,43,64},new int[]{2,90,22,81,88,76,22,84,67,15,43,14,74,20,23,54,73,62,62,64,74,53,61,53,3,12,20,25,89,28,16,51,40,21,71,76,99},new int[]{82,82,11,32,97,47,45,97,79,18,86,6,59,86,6,15,94,61,30,46,96,84,17,93,75,84,84,8,50,17,57,58,76,96,86,27,58},new int[]{51,47,57,50,90,31,29,95,24,63,68,78,77,23,8,13,1,63,27,81,41,9,27,90,21,46,48,68,14,42,59,75,62,4,59,34,5},new int[]{32,80,92,66,35,8,57,25,23,36,25,17,63,64,90,37,85,5,24,74,66,90,73,48,30,39,63,96,57,72,61,3,4,89,49,91,16},new int[]{23,26,79,26,25,42,75,77,44,1,36,95,22,5,19,95,87,61,86,57,95,21,67,53,60,61,75,12,42,89,48,85,71,95,75,65,78}}); param0.add(new int[][]{new int[]{69,40,56,69,66,38,70,81,5,78,60,47,92,76,97,40,24,18,75,89,83,68,62,7,82,15,79,66,36,59,71,29,25,55,21,49,12,8,85,41,24,36,2},new int[]{29,13,89,7,40,59,58,11,29,17,13,9,94,42,9,21,78,27,55,35,91,40,89,12,72,29,5,60,19,35,46,46,45,39,41,89,18,59,87,30,65,90,84},new int[]{41,85,55,59,45,84,67,17,91,82,74,20,23,64,8,65,60,7,4,28,19,6,26,40,19,81,93,21,5,17,38,62,40,7,27,31,98,62,26,70,31,12,15},new int[]{58,1,62,59,90,37,6,24,47,64,36,83,56,82,80,17,11,4,80,9,87,74,90,39,67,84,81,47,28,1,36,89,97,50,85,94,77,39,50,23,53,6,83},new int[]{10,16,77,22,66,42,90,5,94,37,86,51,82,93,19,4,72,27,55,93,97,7,61,99,68,26,59,77,75,39,34,25,85,36,66,89,96,65,97,6,13,17,80},new int[]{38,86,43,41,71,2,1,19,16,34,93,72,90,11,74,68,51,98,49,23,2,97,32,54,20,77,67,93,18,70,14,68,90,76,61,38,58,92,41,6,4,72,44},new int[]{95,96,4,28,7,9,67,53,97,20,19,16,3,6,93,54,98,78,26,34,9,55,33,60,19,73,39,6,23,57,9,90,10,70,14,17,68,78,24,13,59,65,38},new int[]{97,17,14,81,46,16,71,47,76,23,6,38,30,22,1,67,40,1,97,48,39,44,49,61,75,54,96,19,21,75,86,19,28,96,90,19,15,5,12,23,49,81,11},new int[]{95,41,58,72,40,22,96,10,39,51,45,70,99,75,18,97,41,77,69,53,64,46,25,68,47,29,24,85,58,75,27,48,41,74,11,43,73,3,49,49,44,6,48},new int[]{89,71,27,50,86,83,94,86,23,76,66,29,93,14,73,90,29,5,86,59,93,77,18,71,77,61,48,85,92,44,38,3,28,54,45,86,43,33,13,41,57,5,8},new int[]{66,44,43,81,4,19,34,62,81,89,5,81,11,58,16,80,70,82,3,18,7,75,47,15,62,78,23,36,17,22,24,27,17,23,71,1,50,63,50,91,98,37,15},new int[]{56,82,56,68,29,87,43,86,20,86,12,99,90,14,61,84,76,61,9,97,88,73,24,94,69,8,79,45,53,20,58,79,86,96,70,33,61,11,92,3,49,57,67},new int[]{29,11,55,96,50,15,4,32,52,62,98,74,94,41,82,17,5,72,69,81,39,91,32,7,86,76,50,88,49,43,17,71,81,20,91,45,74,70,48,32,8,44,62},new int[]{83,83,22,35,28,33,6,12,97,50,98,61,50,76,37,67,61,92,11,80,54,67,86,58,49,79,99,84,43,68,93,84,29,14,1,18,81,15,89,13,97,24,34},new int[]{11,62,47,25,32,65,29,41,75,22,76,1,16,16,3,94,3,99,52,31,35,50,76,94,89,23,81,65,81,59,35,63,18,10,47,33,6,21,47,30,90,71,21},new int[]{45,97,50,3,76,33,88,71,58,72,47,37,54,35,63,7,4,34,39,86,33,75,9,15,92,30,44,23,68,78,83,88,57,45,71,18,45,49,15,47,5,62,84},new int[]{7,74,65,98,87,94,40,83,57,33,98,80,34,30,24,96,36,16,83,58,3,81,31,3,12,38,46,94,62,70,77,53,34,5,86,73,33,27,12,18,47,42,73},new int[]{89,30,37,42,16,27,23,70,95,78,27,17,6,78,83,10,45,56,31,91,40,3,47,92,24,11,75,31,47,78,43,11,56,6,1,76,2,36,73,80,41,98,65},new int[]{33,66,93,73,8,92,3,44,11,1,48,70,42,77,45,91,87,34,32,61,93,6,78,78,97,88,62,35,11,14,45,26,90,40,34,79,92,95,66,22,41,59,99},new int[]{82,32,35,70,4,94,76,8,53,85,31,22,14,73,33,16,18,16,30,12,14,94,85,6,24,13,52,92,81,74,77,97,71,69,97,98,14,85,82,78,91,39,48},new int[]{26,28,65,13,99,86,45,3,50,85,1,99,52,38,10,88,63,52,8,58,49,4,34,32,25,31,10,35,40,77,60,78,68,3,67,3,64,48,53,8,47,61,27},new int[]{73,70,20,10,28,68,52,2,38,1,43,58,64,3,69,8,16,76,84,14,92,33,43,42,46,47,88,2,70,33,69,59,44,88,28,48,64,97,58,18,89,37,29},new int[]{52,61,77,53,80,77,20,67,43,58,14,12,33,81,82,12,45,26,28,77,12,57,4,84,57,10,49,45,47,74,28,12,22,64,85,45,15,80,64,66,50,79,79},new int[]{87,82,93,43,33,93,37,17,26,43,58,9,21,65,63,73,27,78,36,59,95,46,99,30,82,17,81,52,47,92,88,37,99,92,14,36,35,58,50,6,62,62,38},new int[]{85,92,9,13,80,23,96,33,54,45,48,85,68,61,99,52,46,44,75,49,37,41,22,42,58,52,53,49,13,62,36,52,41,37,19,58,24,63,55,4,25,61,31},new int[]{21,94,5,68,96,5,16,91,12,65,66,72,43,98,25,98,46,1,78,32,61,29,48,83,94,23,69,87,99,53,71,95,78,91,87,26,71,21,88,81,60,55,73},new int[]{79,68,88,95,12,8,17,43,9,17,16,51,35,52,77,12,94,67,69,13,13,28,47,44,63,69,20,92,36,45,82,57,87,91,2,42,50,31,82,48,87,80,26},new int[]{25,35,86,73,34,45,23,91,74,16,4,54,95,68,53,14,80,83,3,42,67,50,20,55,66,84,53,26,19,63,33,98,28,48,53,56,49,78,63,14,29,53,26},new int[]{33,69,66,73,19,91,59,91,90,78,3,58,21,46,40,72,70,66,57,6,59,39,75,69,74,52,38,71,82,74,57,7,36,95,50,72,40,74,40,51,92,90,20},new int[]{2,87,23,81,41,57,21,39,26,95,72,51,71,21,58,50,23,77,42,42,92,40,27,96,20,62,13,42,66,43,83,49,79,91,12,40,74,92,68,4,92,42,93},new int[]{12,22,68,89,72,93,71,8,18,90,60,73,61,31,6,79,18,54,40,51,74,72,89,98,36,6,23,48,20,61,87,55,87,36,45,86,87,42,73,29,21,62,37},new int[]{37,30,67,33,61,48,43,80,28,20,43,74,28,8,88,65,17,60,20,13,13,31,22,15,79,98,47,36,96,13,84,25,53,86,67,41,29,41,68,82,54,40,21},new int[]{95,98,17,90,89,4,60,92,38,66,52,67,29,28,60,91,7,21,38,78,44,87,52,99,94,93,73,51,23,69,14,15,15,35,11,93,37,72,21,15,45,76,97},new int[]{8,24,32,71,25,46,81,95,10,50,56,72,1,9,48,26,10,90,58,45,18,59,57,67,28,81,15,35,42,25,13,66,99,57,61,86,82,85,11,57,43,47,42},new int[]{4,62,25,34,56,69,41,33,44,71,92,84,74,30,67,28,95,40,31,66,95,18,10,32,72,85,85,43,46,85,95,27,93,78,9,11,71,5,72,59,67,33,83},new int[]{47,32,41,9,11,35,12,12,98,50,51,36,98,30,41,3,98,49,55,32,79,8,51,49,73,90,63,22,38,94,33,14,69,10,44,25,84,52,75,51,51,34,16},new int[]{68,57,53,52,28,74,88,48,73,6,37,10,61,95,41,52,34,9,29,41,1,64,12,23,1,95,25,38,4,43,90,61,32,28,33,27,1,8,85,23,32,3,44},new int[]{54,6,70,49,59,57,89,61,56,41,14,83,77,37,41,30,92,42,36,56,71,83,78,26,84,14,39,96,60,94,28,44,45,18,30,70,70,3,7,34,82,65,27},new int[]{54,79,43,24,91,62,93,84,40,30,44,82,83,15,49,87,43,6,50,46,40,30,74,30,1,29,89,95,15,17,8,74,46,57,79,28,90,84,77,31,51,78,29},new int[]{78,14,84,41,35,5,64,79,56,77,1,7,12,96,21,76,36,33,4,51,49,73,39,71,18,59,23,20,31,89,67,53,54,62,20,25,94,51,21,48,99,54,99},new int[]{94,16,87,60,75,12,99,69,56,44,38,22,81,21,91,13,94,46,59,79,18,43,55,75,71,98,32,77,16,90,40,41,54,34,85,18,20,76,85,96,9,47,61},new int[]{11,11,28,81,97,98,24,21,35,37,11,32,26,18,76,20,34,91,54,98,65,79,14,43,27,67,2,76,63,51,98,93,87,49,73,15,1,37,10,21,35,50,34},new int[]{75,48,54,68,74,10,31,11,4,87,75,5,22,39,41,11,58,11,48,72,53,57,40,98,49,62,61,52,28,66,77,42,78,69,35,98,9,7,57,36,35,14,74}}); param0.add(new int[][]{new int[]{74,32,24,39,84,34,39,40,15,49,60,14,15,12,18,15,6},new int[]{61,8,50,18,95,67,24,95,91,88,40,24,56,45,12,39,91},new int[]{29,1,1,37,12,68,71,48,40,15,26,55,25,95,42,25,25},new int[]{25,17,75,21,58,16,97,7,75,5,98,79,25,8,1,62,33},new int[]{78,47,60,43,5,90,22,63,2,99,3,1,98,11,99,69,93},new int[]{17,1,33,46,30,77,52,9,72,75,3,48,26,84,53,12,66},new int[]{83,65,93,23,6,43,98,83,96,83,59,94,97,61,42,65,24},new int[]{35,25,15,27,15,16,62,56,22,87,65,17,59,11,2,93,58},new int[]{70,12,55,3,77,66,92,66,1,80,65,31,96,18,46,26,24},new int[]{41,30,8,68,46,60,46,89,90,74,1,95,62,46,19,3,86},new int[]{58,90,79,63,77,10,54,18,69,59,44,96,49,56,20,24,79},new int[]{40,58,23,41,59,14,43,11,86,99,31,17,82,53,46,78,25},new int[]{25,55,22,90,42,12,55,43,96,38,5,54,17,85,17,32,62},new int[]{34,59,69,90,4,84,95,72,70,81,89,4,14,81,60,79,89},new int[]{51,13,99,74,30,82,67,18,21,89,44,57,56,47,7,95,99},new int[]{69,73,65,19,41,96,66,82,17,58,99,68,47,65,14,77,16},new int[]{33,99,5,56,37,12,73,65,37,82,65,47,7,23,17,42,62}}); param0.add(new int[][]{new int[]{49,31,43,10,49,12,37,33,44,33,45,47,72,76,53,27,59,99,91,75,50,74,20,97,56,18,80,65,79,54,5,15,62,86,38,45,89,61,52,97,60,24,63,60},new int[]{10,46,68,6,73,44,78,92,82,31,35,35,19,33,95,89,59,47,71,68,2,89,25,34,53,25,22,37,1,32,79,48,78,7,67,66,57,36,93,74,13,83,44,82},new int[]{62,68,47,30,73,35,51,53,10,43,1,2,5,32,95,39,28,71,51,2,75,48,83,27,48,64,87,95,70,49,9,33,23,93,94,70,60,17,2,39,14,80,37,88},new int[]{68,29,90,19,18,92,92,31,12,85,32,68,23,58,13,17,95,22,73,6,73,66,59,62,8,48,9,99,21,38,76,41,3,24,28,61,55,42,73,4,91,3,75,73},new int[]{62,47,94,35,62,61,97,15,94,75,52,64,56,31,2,71,61,57,9,90,52,10,31,15,17,27,54,61,14,92,72,50,92,30,41,93,12,99,83,54,46,69,76,70},new int[]{5,88,18,25,58,56,28,49,88,87,65,78,83,38,97,70,34,23,91,14,86,38,78,86,45,61,9,75,76,89,2,9,50,45,35,96,62,78,93,57,83,46,69,81},new int[]{98,86,75,30,50,93,15,36,39,81,60,27,54,2,70,4,87,47,95,48,57,65,58,51,47,77,70,34,37,80,55,96,44,79,68,43,76,10,66,88,16,35,40,81},new int[]{72,93,62,34,42,95,81,4,63,23,11,23,61,69,52,61,96,5,17,87,34,94,91,97,16,95,4,52,20,48,96,98,51,45,80,93,49,93,56,3,42,71,42,85},new int[]{99,29,95,17,85,28,60,87,95,92,47,11,65,60,88,61,77,43,39,91,1,9,85,74,9,3,29,86,42,43,94,24,3,8,45,26,99,51,95,55,33,35,80,11},new int[]{49,79,25,78,73,10,87,45,6,28,13,77,64,30,5,71,55,90,87,52,28,24,97,77,49,98,77,95,93,95,48,31,24,94,71,20,2,82,76,58,54,85,39,19},new int[]{70,73,4,20,3,73,91,62,69,68,19,16,22,80,21,56,60,34,69,80,66,13,96,78,21,60,68,74,46,16,55,11,33,86,50,52,75,92,62,98,41,11,7,79},new int[]{84,16,29,5,85,64,15,6,49,87,51,42,93,65,5,73,79,97,24,37,53,6,39,75,89,62,82,86,60,41,78,10,81,93,70,7,5,27,35,55,17,7,61,65},new int[]{15,58,49,75,52,26,43,53,56,78,77,68,33,14,77,17,39,48,6,22,87,37,43,45,99,96,65,4,68,97,57,34,30,39,79,96,90,39,72,90,17,94,99,12},new int[]{6,29,14,1,91,39,6,97,44,41,95,32,97,84,5,47,17,33,42,23,70,50,29,64,4,7,79,62,59,21,16,70,13,8,97,61,3,46,62,23,8,20,30,75},new int[]{54,20,2,98,17,15,65,69,98,69,72,68,43,12,94,83,22,92,94,70,20,15,8,37,28,11,70,27,42,75,83,76,81,8,59,60,95,62,19,43,60,51,84,64},new int[]{66,70,91,48,18,20,73,67,40,18,12,83,26,97,33,6,58,57,9,10,44,53,27,81,52,84,64,54,13,31,81,49,75,27,13,46,51,43,79,86,89,19,29,87},new int[]{83,67,19,13,97,88,38,35,33,45,57,49,66,83,39,47,33,91,50,66,33,49,71,10,28,89,95,44,13,95,29,40,9,95,29,4,81,81,19,48,67,97,42,82},new int[]{85,58,88,59,16,95,60,67,17,64,33,71,22,7,97,5,13,94,10,14,71,31,4,48,63,4,78,79,57,35,98,14,77,24,23,53,80,99,27,98,85,8,33,92},new int[]{91,17,58,62,78,30,46,17,67,57,6,56,89,70,50,67,35,19,75,15,37,96,31,55,86,71,1,96,54,85,34,72,27,43,87,16,78,25,69,3,68,75,72,59},new int[]{97,61,86,15,61,12,63,24,71,24,78,62,13,10,65,5,98,47,8,51,78,37,81,43,86,57,44,65,49,39,76,30,93,80,66,51,79,46,8,6,59,5,78,68},new int[]{3,32,88,62,88,30,49,12,89,50,82,18,93,47,63,44,21,48,66,32,94,45,51,53,28,89,62,29,61,8,46,31,66,62,18,55,85,37,86,30,83,21,78,13},new int[]{99,19,4,21,24,45,13,22,87,49,48,17,20,32,50,62,15,42,11,37,68,38,81,61,61,93,15,28,87,67,21,29,61,16,43,24,96,31,98,85,13,25,6,86},new int[]{79,43,82,95,51,75,89,41,89,82,35,44,14,56,84,58,43,59,55,37,34,46,48,90,40,20,42,72,64,23,51,99,12,51,3,7,37,20,88,58,89,19,27,77},new int[]{86,36,60,23,84,30,83,91,39,66,34,9,85,84,72,50,85,80,1,2,69,35,74,45,10,63,26,79,3,79,46,39,80,50,60,87,19,10,4,97,39,77,75,43},new int[]{72,93,98,37,85,18,29,94,46,50,17,23,6,91,35,37,89,49,3,40,60,35,40,59,4,41,55,5,65,31,60,43,9,91,58,16,70,88,89,34,35,85,96,77},new int[]{38,50,94,12,97,30,44,87,89,94,96,94,92,2,74,9,71,12,34,79,49,51,12,6,26,69,49,51,74,85,92,41,11,47,14,16,44,58,21,14,76,26,73,3},new int[]{88,49,41,19,12,55,2,28,42,65,29,3,87,8,78,28,42,85,3,60,51,78,19,4,87,7,41,16,65,53,55,20,90,4,37,82,81,22,44,98,61,72,46,26},new int[]{3,89,55,37,47,48,36,15,7,31,61,46,15,13,22,50,52,56,44,87,67,20,83,46,48,30,42,96,41,30,24,12,44,53,17,73,79,25,12,78,84,46,49,45},new int[]{37,27,30,25,92,81,26,71,47,39,84,8,28,15,81,91,26,53,15,55,13,20,81,89,85,8,17,34,48,10,95,78,75,75,29,16,19,86,24,43,56,39,9,93},new int[]{48,33,42,91,92,34,45,36,32,82,26,80,96,33,88,43,6,52,60,78,84,90,78,59,44,24,71,67,40,90,20,25,94,32,71,52,85,21,49,23,64,12,68,83},new int[]{5,65,95,64,43,48,2,66,75,73,67,33,23,82,62,74,59,95,80,27,68,43,54,65,46,12,55,58,9,93,46,37,65,83,77,64,73,22,25,9,35,53,46,46},new int[]{63,57,73,7,81,76,73,6,88,19,55,64,81,78,65,56,82,94,88,80,18,11,64,34,38,66,36,27,8,80,79,1,90,95,67,65,4,10,97,71,79,73,69,33},new int[]{42,29,63,25,19,81,29,85,79,90,3,30,81,6,77,71,41,80,5,81,65,73,50,77,92,21,71,69,56,72,23,33,65,94,24,87,21,77,98,41,87,85,22,46},new int[]{29,53,23,22,98,8,88,44,9,31,11,49,95,52,54,67,25,77,80,44,22,13,19,58,61,92,21,26,41,42,51,81,61,7,90,57,58,24,17,58,64,14,4,80},new int[]{20,33,49,18,28,82,53,12,84,69,58,36,63,64,11,41,32,1,22,22,54,77,47,69,31,80,30,90,83,9,54,83,69,10,97,89,8,56,26,32,87,12,38,32},new int[]{96,26,2,94,39,99,5,84,60,81,23,97,60,40,76,57,59,28,5,86,2,41,66,33,69,88,83,38,29,72,50,68,71,89,58,2,7,72,63,47,29,61,85,85},new int[]{89,31,91,33,39,14,34,31,48,70,26,93,52,32,5,52,61,19,73,17,38,65,77,21,14,83,53,14,72,63,25,18,77,88,56,9,90,23,98,13,39,14,61,93},new int[]{91,86,41,21,62,43,25,29,22,77,92,13,86,46,91,94,58,28,41,41,20,99,51,8,50,32,43,61,85,86,88,85,44,36,68,11,8,4,74,12,97,37,65,81},new int[]{14,98,40,91,24,82,63,16,51,16,58,35,68,98,33,87,74,57,75,68,92,12,17,69,96,2,77,85,13,32,41,20,59,1,47,47,87,77,5,99,4,93,66,48},new int[]{54,3,22,78,77,2,55,73,16,12,56,50,66,97,85,79,78,11,18,51,89,72,66,84,57,26,74,72,94,6,98,56,47,80,19,3,13,82,41,41,7,22,31,83},new int[]{19,47,15,72,93,56,50,17,34,42,85,29,72,6,68,24,20,83,81,52,88,91,23,78,54,75,87,8,12,45,57,65,68,4,62,77,31,54,31,32,40,4,7,56},new int[]{57,46,49,50,49,80,43,65,6,86,30,72,67,54,74,25,42,72,61,38,36,41,47,87,31,2,68,34,8,56,96,11,87,70,74,68,67,12,61,1,78,92,11,30},new int[]{2,6,24,78,36,2,67,26,29,87,50,7,60,68,79,23,22,71,50,82,89,48,15,6,59,76,80,26,39,72,27,91,65,43,41,61,32,3,94,61,17,9,57,48},new int[]{7,32,93,58,82,5,98,39,15,70,32,53,59,3,25,57,51,17,47,11,35,6,25,17,55,30,10,28,67,55,82,80,26,83,81,41,61,57,45,28,20,38,94,13}}); List param1 = new ArrayList<>(); param1.add(3); param1.add(10); param1.add(24); param1.add(30); param1.add(22); param1.add(3); param1.add(32); param1.add(39); param1.add(14); param1.add(34); List param2 = new ArrayList<>(); param2.add(3); param2.add(13); param2.add(29); param2.add(28); param2.add(33); param2.add(3); param2.add(21); param2.add(39); param2.add(13); param2.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, FIND_REPETITIVE_ELEMENT_1_N_1_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPETITIVE_ELEMENT_1_N_1_2{ static int f_gold ( int arr [ ] , int n ) { int res = 0 ; for ( int i = 0 ; i < n - 1 ; i ++ ) res = res ^ ( i + 1 ) ^ arr [ i ] ; res = res ^ arr [ n - 1 ] ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,2,4,5,5,7,7,7,8,11,14,15,18,19,20,25,25,29,29,31,32,32,33,38,42,48,52,55,60,61,63,71,74,78,82,82,84,84,87,87,88,90,93,94,94}); param0.add(new int[]{46,2,62,60,92,4,26,66,66,90,26,-14,76,-20,-68}); param0.add(new int[]{0,0,0,1,1,1,1,1}); param0.add(new int[]{87,67,11,47,64,81,94,75,58,77,18,2,85,26,6,44,55,19,46,49,5,69,44,12,42,66,46,9,26,49,68,95,6,9,11,72,5,67}); param0.add(new int[]{-98,-94,-92,-82,-78,-64,-62,-58,-52,-44,-40,-38,-8,6,10,20,22,28,30,30,36,54,54,58,64,68,76,78,84,88,90,94,96}); param0.add(new int[]{1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,0,0,0,0,1,1}); param0.add(new int[]{1,14,15,15,21,34,38,39,41,50,60,74,96,97}); param0.add(new int[]{96,-12,-16,-52}); param0.add(new int[]{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}); param0.add(new int[]{66,21,21,59,78,8,46,41,16,32,97,93,32,86,91,61,67,61,97,49,66,35,24,35,65,45,83}); List param1 = new ArrayList<>(); param1.add(31); param1.add(8); param1.add(4); param1.add(34); param1.add(29); param1.add(17); param1.add(7); param1.add(3); param1.add(21); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : res = 0 for i in range ( 0 , n - 1 ) : res = res ^ ( i + 1 ) ^ arr [ i ] res = res ^ arr [ n - 1 ] return res "," using namespace std; int f_gold ( int arr [ ], int n ) { int res = 0; for ( int i = 0; i < n - 1; i ++ ) res = res ^ ( i + 1 ) ^ arr [ i ]; res = res ^ arr [ n - 1 ]; return res; } int main() { int n_success = 0; vector> param0 {{2,2,4,5,5,7,7,7,8,11,14,15,18,19,20,25,25,29,29,31,32,32,33,38,42,48,52,55,60,61,63,71,74,78,82,82,84,84,87,87,88,90,93,94,94},{46,2,62,60,92,4,26,66,66,90,26,-14,76,-20,-68},{0,0,0,1,1,1,1,1},{87,67,11,47,64,81,94,75,58,77,18,2,85,26,6,44,55,19,46,49,5,69,44,12,42,66,46,9,26,49,68,95,6,9,11,72,5,67},{-98,-94,-92,-82,-78,-64,-62,-58,-52,-44,-40,-38,-8,6,10,20,22,28,30,30,36,54,54,58,64,68,76,78,84,88,90,94,96},{1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,0,0,0,0,1,1},{1,14,15,15,21,34,38,39,41,50,60,74,96,97},{96,-12,-16,-52},{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},{66,21,21,59,78,8,46,41,16,32,97,93,32,86,91,61,67,61,97,49,66,35,24,35,65,45,83}}; vector param1 {31,8,4,34,29,17,7,3,21,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 2, 4, 5, 5, 7, 7, 7, 8, 11, 14, 15, 18, 19, 20, 25, 25, 29, 29, 31, 32, 32, 33, 38, 42, 48, 52, 55, 60, 61, 63, 71, 74, 78, 82, 82, 84, 84, 87, 87, 88, 90, 93, 94, 94],31,), ([46, 2, 62, 60, 92, 4, 26, 66, 66, 90, 26, -14, 76, -20, -68],8,), ([0, 0, 0, 1, 1, 1, 1, 1],4,), ([87, 67, 11, 47, 64, 81, 94, 75, 58, 77, 18, 2, 85, 26, 6, 44, 55, 19, 46, 49, 5, 69, 44, 12, 42, 66, 46, 9, 26, 49, 68, 95, 6, 9, 11, 72, 5, 67],34,), ([-98, -94, -92, -82, -78, -64, -62, -58, -52, -44, -40, -38, -8, 6, 10, 20, 22, 28, 30, 30, 36, 54, 54, 58, 64, 68, 76, 78, 84, 88, 90, 94, 96],29,), ([1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1],17,), ([1, 14, 15, 15, 21, 34, 38, 39, 41, 50, 60, 74, 96, 97],7,), ([96, -12, -16, -52],3,), ([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],21,), ([66, 21, 21, 59, 78, 8, 46, 41, 16, 32, 97, 93, 32, 86, 91, 61, 67, 61, 97, 49, 66, 35, 24, 35, 65, 45, 83],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DECIMAL_BINARY_CONVERSION_WITHOUT_USING_ARITHMETIC_OPERATORS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DECIMAL_BINARY_CONVERSION_WITHOUT_USING_ARITHMETIC_OPERATORS{ static String f_gold ( int n ) { if ( n == 0 ) return ""0"" ; String bin = """" ; while ( n > 0 ) { bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin ; n >>= 1 ; } return bin ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(35); param0.add(17); param0.add(8); param0.add(99); param0.add(57); param0.add(39); param0.add(99); param0.add(14); param0.add(22); param0.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 ) : return ""0"" ; bin = """" ; while ( n > 0 ) : if ( n & 1 == 0 ) : bin = '0' + bin ; else : bin = '1' + bin ; n = n >> 1 ; return bin ; "," using namespace std; string f_gold ( int n ) { if ( n == 0 ) return ""0""; string bin = """"; while ( n > 0 ) { bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin; n >>= 1; } return bin; } int main() { int n_success = 0; vector param0 {35,17,8,99,57,39,99,14,22,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (35,), (17,), (8,), (99,), (57,), (39,), (99,), (14,), (22,), (7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHANGE_BITS_CAN_MADE_ONE_FLIP," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHANGE_BITS_CAN_MADE_ONE_FLIP{ static boolean f_gold ( String str ) { int zeros = 0 , ones = 0 ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { char ch = str . charAt ( i ) ; if ( ch == '0' ) ++ zeros ; else ++ ones ; } return ( zeros == 1 || ones == 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""00001""); param0.add(""0000""); param0.add(""11""); param0.add(""111110""); param0.add(""1""); param0.add(""111010111010""); param0.add(""hUInqJXNdbfP""); param0.add(""5191""); param0.add(""1110101101""); param0.add(""NupSrU xz""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : zeros = 0 ones = 0 for i in range ( 0 , len ( str ) ) : ch = str [ i ] ; if ( ch == '0' ) : zeros = zeros + 1 else : ones = ones + 1 return ( zeros == 1 or ones == 1 ) ; "," using namespace std; bool f_gold ( string str ) { int zeros = 0, ones = 0; for ( char ch : str ) ( ch == '0' ) ? ++ zeros : ++ ones; return ( zeros == 1 || ones == 1 ); } int main() { int n_success = 0; vector param0 {""00001"",""0000"",""11"",""111110"",""1"",""111010111010"",""hUInqJXNdbfP"",""5191"",""1110101101"",""NupSrU xz""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (""00001"",), (""0000"",), (""11"",), (""111110"",), (""1"",), (""111010111010"",), (""hUInqJXNdbfP"",), (""5191"",), (""1110101101"",), ('NupSrU xz',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POSITION_OF_RIGHTMOST_SET_BIT_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POSITION_OF_RIGHTMOST_SET_BIT_1{ static int f_gold ( int n ) { int position = 1 ; int m = 1 ; while ( ( n & m ) == 0 ) { m = m << 1 ; position ++ ; } return position ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(17); param0.add(97); param0.add(73); param0.add(68); param0.add(6); param0.add(84); param0.add(72); param0.add(66); param0.add(57); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : position = 1 m = 1 while ( not ( n & m ) ) : m = m << 1 position += 1 return position "," using namespace std; int f_gold ( int n ) { int position = 1; int m = 1; while ( ! ( n & m ) ) { m = m << 1; position ++; } return position; } int main() { int n_success = 0; vector param0 {17,97,73,68,6,84,72,66,57,11}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (17,), (97,), (73,), (68,), (6,), (84,), (72,), (66,), (57,), (11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_4_NOT{ static boolean f_gold ( String str ) { int n = str . length ( ) ; if ( n == 0 ) return false ; if ( n == 1 ) return ( ( str . charAt ( 0 ) - '0' ) % 4 == 0 ) ; int last = str . charAt ( n - 1 ) - '0' ; int second_last = str . charAt ( n - 2 ) - '0' ; return ( ( second_last * 10 + last ) % 4 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""PjAFZXQgN""); param0.add(""12325195609714""); param0.add(""00101111101""); param0.add(""xOtbXZiA""); param0.add(""980""); param0.add(""000000100""); param0.add(""zFacc W""); param0.add(""8""); param0.add(""110011""); param0.add(""afiutekeSfYrX""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string str ) { int n = str . length ( ); if ( n == 0 ) return false; if ( n == 1 ) return ( ( str [ 0 ] - '0' ) % 4 == 0 ); int last = str [ n - 1 ] - '0'; int second_last = str [ n - 2 ] - '0'; return ( ( second_last * 10 + last ) % 4 == 0 ); } int main() { int n_success = 0; vector param0 {""PjAFZXQgN"",""12325195609714"",""00101111101"",""xOtbXZiA"",""980"",""000000100"",""zFacc W"",""8"",""110011"",""afiutekeSfYrX""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, NUMBER_SUBSTRINGS_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSTRINGS_STRING{ static int f_gold ( String str ) { int n = str . length ( ) ; return n * ( n + 1 ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""gZFGZsHCimLf""); param0.add(""505357""); param0.add(""011011101""); param0.add(""ovfwP Osauz""); param0.add(""92132238746026""); param0.add(""01100""); param0.add(""RaOWYQRfiWKSyC""); param0.add(""861330202""); param0.add(""001100010""); param0.add(""uvpKlGUBLOMba""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) ; return int ( n * ( n + 1 ) / 2 ) ; "," using namespace std; int f_gold ( string str ) { int n = str . length ( ); return n * ( n + 1 ) / 2; } int main() { int n_success = 0; vector param0 {""gZFGZsHCimLf"",""505357"",""011011101"",""ovfwP Osauz"",""92132238746026"",""01100"",""RaOWYQRfiWKSyC"",""861330202"",""001100010"",""uvpKlGUBLOMba""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('gZFGZsHCimLf',), ('505357',), ('011011101',), ('ovfwP Osauz',), ('92132238746026',), ('01100',), ('RaOWYQRfiWKSyC',), ('861330202',), ('001100010',), ('uvpKlGUBLOMba',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_ELEMENT_BEFORE_WHICH_ALL_THE_ELEMENTS_ARE_SMALLER_THAN_IT_AND_AFTER_WHICH_ALL_ARE_GREATER_THAN_IT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_ELEMENT_BEFORE_WHICH_ALL_THE_ELEMENTS_ARE_SMALLER_THAN_IT_AND_AFTER_WHICH_ALL_ARE_GREATER_THAN_IT{ static int f_gold ( int [ ] arr , int n ) { int [ ] leftMax = new int [ n ] ; leftMax [ 0 ] = Integer . MIN_VALUE ; for ( int i = 1 ; i < n ; i ++ ) leftMax [ i ] = Math . max ( leftMax [ i - 1 ] , arr [ i - 1 ] ) ; int rightMin = Integer . MAX_VALUE ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( leftMax [ i ] < arr [ i ] && rightMin > arr [ i ] ) return i ; rightMin = Math . min ( rightMin , arr [ i ] ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,24,30,33,56,67,87,90}); param0.add(new int[]{72,-48,12,4,46,36,2,58,82,-88,-14,56,90,76,18,-6,-28,18,88,90,40,-68,-10,-82,-28,16,32,-90,12,-86,-16,78,-98,-52,-26,80,6,50,40,-12,52,38,-92,94,-32,14,-80,-88,48}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{51,87,46,76,2,89,56,34,49,61,44,73,14,60,89}); param0.add(new int[]{-90,-90,-80,-72,-68,-64,-62,-62,-60,-46,-44,-44,-44,-42,-42,-32,-22,-22,-18,-2,4,6,10,12,14,30,34,34,40,56,56,56,58,68,74,78,78,82,84,86,88,90,92}); param0.add(new int[]{0,0,0,1,1,0,1,1,1,0,0,1,1,1,0,0,1,1,1,0,1,0,1,0,0,0,0,0,1,0,0,1,1,1,0,0,0,1,1,0}); param0.add(new int[]{7,8,11,12,15,17,28,34,57,61,66,76,92}); param0.add(new int[]{-22,-96,-78,-60,34,-18,86,-42,-78,76,8,28,-80,80,6,-72,34,66,84,50,-4,18,72,-66,-68,-24,56,-12,-70,24,-82}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{79,81,55,6,78,93,81,33,29,1,27,49,21,58,22,65,44,95,6,51,75,42,14,55,79,82,90,8,15,15,53,98,76,43,33}); List param1 = new ArrayList<>(); param1.add(4); param1.add(28); param1.add(30); param1.add(11); param1.add(29); param1.add(26); param1.add(9); param1.add(19); param1.add(9); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : leftMax = [ None ] * n leftMax [ 0 ] = float ( '-inf' ) for i in range ( 1 , n ) : leftMax [ i ] = max ( leftMax [ i - 1 ] , arr [ i - 1 ] ) rightMin = float ( 'inf' ) for i in range ( n - 1 , - 1 , - 1 ) : if leftMax [ i ] < arr [ i ] and rightMin > arr [ i ] : return i rightMin = min ( rightMin , arr [ i ] ) return - 1 "," using namespace std; int f_gold ( int arr [ ], int n ) { int leftMax [ n ]; leftMax [ 0 ] = INT_MIN; for ( int i = 1; i < n; i ++ ) leftMax [ i ] = max ( leftMax [ i - 1 ], arr [ i - 1 ] ); int rightMin = INT_MAX; for ( int i = n - 1; i >= 0; i -- ) { if ( leftMax [ i ] < arr [ i ] && rightMin > arr [ i ] ) return i; rightMin = min ( rightMin, arr [ i ] ); } return - 1; } int main() { int n_success = 0; vector> param0 {{4,24,30,33,56,67,87,90},{72,-48,12,4,46,36,2,58,82,-88,-14,56,90,76,18,-6,-28,18,88,90,40,-68,-10,-82,-28,16,32,-90,12,-86,-16,78,-98,-52,-26,80,6,50,40,-12,52,38,-92,94,-32,14,-80,-88,48},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{51,87,46,76,2,89,56,34,49,61,44,73,14,60,89},{-90,-90,-80,-72,-68,-64,-62,-62,-60,-46,-44,-44,-44,-42,-42,-32,-22,-22,-18,-2,4,6,10,12,14,30,34,34,40,56,56,56,58,68,74,78,78,82,84,86,88,90,92},{0,0,0,1,1,0,1,1,1,0,0,1,1,1,0,0,1,1,1,0,1,0,1,0,0,0,0,0,1,0,0,1,1,1,0,0,0,1,1,0},{7,8,11,12,15,17,28,34,57,61,66,76,92},{-22,-96,-78,-60,34,-18,86,-42,-78,76,8,28,-80,80,6,-72,34,66,84,50,-4,18,72,-66,-68,-24,56,-12,-70,24,-82},{0,0,0,0,0,0,1,1,1,1,1},{79,81,55,6,78,93,81,33,29,1,27,49,21,58,22,65,44,95,6,51,75,42,14,55,79,82,90,8,15,15,53,98,76,43,33}}; vector param1 {4,28,30,11,29,26,9,19,9,30}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 24, 30, 33, 56, 67, 87, 90],4,), ([72, -48, 12, 4, 46, 36, 2, 58, 82, -88, -14, 56, 90, 76, 18, -6, -28, 18, 88, 90, 40, -68, -10, -82, -28, 16, 32, -90, 12, -86, -16, 78, -98, -52, -26, 80, 6, 50, 40, -12, 52, 38, -92, 94, -32, 14, -80, -88, 48],28,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],30,), ([51, 87, 46, 76, 2, 89, 56, 34, 49, 61, 44, 73, 14, 60, 89],11,), ([-90, -90, -80, -72, -68, -64, -62, -62, -60, -46, -44, -44, -44, -42, -42, -32, -22, -22, -18, -2, 4, 6, 10, 12, 14, 30, 34, 34, 40, 56, 56, 56, 58, 68, 74, 78, 78, 82, 84, 86, 88, 90, 92],29,), ([0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0],26,), ([7, 8, 11, 12, 15, 17, 28, 34, 57, 61, 66, 76, 92],9,), ([-22, -96, -78, -60, 34, -18, 86, -42, -78, 76, 8, 28, -80, 80, 6, -72, 34, 66, 84, 50, -4, 18, 72, -66, -68, -24, 56, -12, -70, 24, -82],19,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],9,), ([79, 81, 55, 6, 78, 93, 81, 33, 29, 1, 27, 49, 21, 58, 22, 65, 44, 95, 6, 51, 75, 42, 14, 55, 79, 82, 90, 8, 15, 15, 53, 98, 76, 43, 33],30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMIZE_THE_SUM_OF_DIGITS_OF_A_AND_B_SUCH_THAT_A_B_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMIZE_THE_SUM_OF_DIGITS_OF_A_AND_B_SUCH_THAT_A_B_N{ static int f_gold ( int n ) { int sum = 0 ; while ( n > 0 ) { sum += ( n % 10 ) ; n /= 10 ; } if ( sum == 1 ) return 10 ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(2); param0.add(39); param0.add(31); param0.add(45); param0.add(35); param0.add(94); param0.add(67); param0.add(50); param0.add(4); param0.add(63); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 ; while ( n > 0 ) : sum += ( n % 10 ) ; n //= 10 ; if ( sum == 1 ) : return 10 ; return sum ; "," using namespace std; int f_gold ( int n ) { int sum = 0; while ( n > 0 ) { sum += ( n % 10 ); n /= 10; } if ( sum == 1 ) return 10; return sum; } int main() { int n_success = 0; vector param0 {2,39,31,45,35,94,67,50,4,63}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (2,), (39,), (31,), (45,), (35,), (94,), (67,), (50,), (4,), (63,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EULERIAN_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EULERIAN_NUMBER_1{ public static int f_gold ( int n , int m ) { int [ ] [ ] dp = new int [ n + 1 ] [ m + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= m ; j ++ ) { if ( i > j ) { if ( j == 0 ) dp [ i ] [ j ] = 1 ; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ) ; } } } return dp [ n ] [ m ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(27); param0.add(77); param0.add(35); param0.add(26); param0.add(6); param0.add(66); param0.add(44); param0.add(26); param0.add(74); param0.add(65); List param1 = new ArrayList<>(); param1.add(7); param1.add(34); param1.add(22); param1.add(20); param1.add(10); param1.add(47); param1.add(29); param1.add(33); param1.add(86); param1.add(97); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , m ) : dp = [ [ 0 for x in range ( m + 1 ) ] for y in range ( n + 1 ) ] for i in range ( 1 , n + 1 ) : for j in range ( 0 , m + 1 ) : if ( i > j ) : if ( j == 0 ) : dp [ i ] [ j ] = 1 else : dp [ i ] [ j ] = ( ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ) ) return dp [ n ] [ m ] "," using namespace std; int f_gold ( int n, int m ) { int dp [ n + 1 ] [ m + 1 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 1; i <= n; i ++ ) { for ( int j = 0; j <= m; j ++ ) { if ( i > j ) { if ( j == 0 ) dp [ i ] [ j ] = 1; else dp [ i ] [ j ] = ( ( i - j ) * dp [ i - 1 ] [ j - 1 ] ) + ( ( j + 1 ) * dp [ i - 1 ] [ j ] ); } } } return dp [ n ] [ m ]; } int main() { int n_success = 0; vector param0 {27,77,35,26,6,66,44,26,74,65}; vector param1 {7,34,22,20,10,47,29,33,86,97}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (27,7,), (77,34,), (35,22,), (26,20,), (6,10,), (66,47,), (44,29,), (26,33,), (74,86,), (65,97,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SWAPS_REQUIRED_BRING_ELEMENTS_LESS_EQUAL_K_TOGETHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SWAPS_REQUIRED_BRING_ELEMENTS_LESS_EQUAL_K_TOGETHER{ static int f_gold ( int arr [ ] , int n , int k ) { int count = 0 ; for ( int i = 0 ; i < n ; ++ i ) if ( arr [ i ] <= k ) ++ count ; int bad = 0 ; for ( int i = 0 ; i < count ; ++ i ) if ( arr [ i ] > k ) ++ bad ; int ans = bad ; for ( int i = 0 , j = count ; j < n ; ++ i , ++ j ) { if ( arr [ i ] > k ) -- bad ; if ( arr [ j ] > k ) ++ bad ; ans = Math . min ( ans , bad ) ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,12,15,30,33,34,53,66,73,74,76,77,85,90}); param0.add(new int[]{-62,-20,-26,-24,92,66,-74,-4,18,-82,-36,92,-4,92,-80,56,-24,4,-48,-10,-14,-46,-16,-58,-58,-6,-68,-22,-82,-16,76,-30,-86,-38,-66,28,58,30,-44,-56}); param0.add(new int[]{0,0,0,0,0,1,1}); param0.add(new int[]{8,48,64,77,61,60,96,95,41,68,9,67,10,66,16,59,83,21,47,16,13,85,52,11,48,31,99,57,57,44,66,93,80,69,23,2,55,90}); param0.add(new int[]{-80,-58,-40,-34,14,36,48,56,58,60,84,90,92,92}); param0.add(new int[]{1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,1,0,1,0,1,1,0,1,0,0,0,1}); param0.add(new int[]{4,4,8,9,13,17,18,19,21,22,22,23,27,28,30,44,46,48,53,53,55,60,61,62,68,70,70,71,73,80,82,82,85,88,90,93,99}); param0.add(new int[]{-28,50,82,-32,32,-78,12,50,38,34,-10,6,86,-56,-2}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{37,88,83,91,11,39,98,70,93,74,24,90,66,3,6,28}); List param1 = new ArrayList<>(); param1.add(9); param1.add(24); param1.add(5); param1.add(36); param1.add(7); param1.add(26); param1.add(28); param1.add(13); param1.add(9); param1.add(12); List param2 = new ArrayList<>(); param2.add(8); param2.add(28); param2.add(6); param2.add(24); param2.add(8); param2.add(23); param2.add(36); param2.add(9); param2.add(8); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : count = 0 for i in range ( 0 , n ) : if ( arr [ i ] <= k ) : count = count + 1 bad = 0 for i in range ( 0 , count ) : if ( arr [ i ] > k ) : bad = bad + 1 ans = bad j = count for i in range ( 0 , n ) : if ( j == n ) : break if ( arr [ i ] > k ) : bad = bad - 1 if ( arr [ j ] > k ) : bad = bad + 1 ans = min ( ans , bad ) j = j + 1 return ans ",,," if __name__ == '__main__': param = [ ([7, 12, 15, 30, 33, 34, 53, 66, 73, 74, 76, 77, 85, 90],9,8,), ([-62, -20, -26, -24, 92, 66, -74, -4, 18, -82, -36, 92, -4, 92, -80, 56, -24, 4, -48, -10, -14, -46, -16, -58, -58, -6, -68, -22, -82, -16, 76, -30, -86, -38, -66, 28, 58, 30, -44, -56],24,28,), ([0, 0, 0, 0, 0, 1, 1],5,6,), ([8, 48, 64, 77, 61, 60, 96, 95, 41, 68, 9, 67, 10, 66, 16, 59, 83, 21, 47, 16, 13, 85, 52, 11, 48, 31, 99, 57, 57, 44, 66, 93, 80, 69, 23, 2, 55, 90],36,24,), ([-80, -58, -40, -34, 14, 36, 48, 56, 58, 60, 84, 90, 92, 92],7,8,), ([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1],26,23,), ([4, 4, 8, 9, 13, 17, 18, 19, 21, 22, 22, 23, 27, 28, 30, 44, 46, 48, 53, 53, 55, 60, 61, 62, 68, 70, 70, 71, 73, 80, 82, 82, 85, 88, 90, 93, 99],28,36,), ([-28, 50, 82, -32, 32, -78, 12, 50, 38, 34, -10, 6, 86, -56, -2],13,9,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1],9,8,), ([37, 88, 83, 91, 11, 39, 98, 70, 93, 74, 24, 90, 66, 3, 6, 28],12,12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS{ public static int f_gold ( int ar [ ] , int n ) { int res = 0 ; Arrays . sort ( ar ) ; for ( int i = 0 ; i < n ; i ++ ) { int count = 1 ; for ( ; i < n - 1 ; i ++ ) { if ( ar [ i ] == ar [ i + 1 ] ) count ++ ; else break ; } res = Math . max ( res , count ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,5,8,16,21,21,22,23,26,26,27,27,29,31,33,36,37,37,38,42,45,47,50,57,58,60,60,62,63,66,66,76,84,84,88,96,99}); param0.add(new int[]{-30,-60,34,4,86,80,-96,-94,52,46,8,82,-94,-96,78,82,-22,-36,78,50,-46,-36,80,24,-14,94,-46,-38,82,4,-24,2,4,-82,-82,-18,-62,12,8,92,70,-10}); param0.add(new int[]{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}); param0.add(new int[]{38,47,84,49,48,62,48,41,38,48,92,16,99}); param0.add(new int[]{-88,-64,-40,-38,-38,-16,16,20,28,40,56,58,60,68,74,92}); param0.add(new int[]{1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{14,24,82,87,95}); param0.add(new int[]{-34,62,40,-84,52,-76,2,-58,94,22,2,-18,-88,62,-14,46,50,-58,-80,68,-64,90,-58,12,76,-40,40,-46,8,-80,4,-90,14,-10,64,-68}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{43,41,90,5,6,17,68,68,86,89}); List param1 = new ArrayList<>(); param1.add(25); param1.add(35); param1.add(34); param1.add(6); param1.add(12); param1.add(29); param1.add(3); param1.add(34); param1.add(3); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( ar , n ) : res = 0 ar.sort ( ) for i in range ( 0 , n ) : count = 1 for i in range ( n - 1 ) : if ar [ i ] == ar [ i + 1 ] : count += 1 else : break res = max ( res , count ) return res "," using namespace std; int f_gold ( int ar [ ], int n ) { int res = 0; sort ( ar, ar + n ); for ( int i = 0; i < n; i ++ ) { int count = 1; for (; i < n - 1; i ++ ) { if ( ar [ i ] == ar [ i + 1 ] ) count ++; else break; } res = max ( res, count ); } return res; } int main() { int n_success = 0; vector> param0 {{1,2,5,8,16,21,21,22,23,26,26,27,27,29,31,33,36,37,37,38,42,45,47,50,57,58,60,60,62,63,66,66,76,84,84,88,96,99},{-30,-60,34,4,86,80,-96,-94,52,46,8,82,-94,-96,78,82,-22,-36,78,50,-46,-36,80,24,-14,94,-46,-38,82,4,-24,2,4,-82,-82,-18,-62,12,8,92,70,-10},{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},{38,47,84,49,48,62,48,41,38,48,92,16,99},{-88,-64,-40,-38,-38,-16,16,20,28,40,56,58,60,68,74,92},{1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1},{14,24,82,87,95},{-34,62,40,-84,52,-76,2,-58,94,22,2,-18,-88,62,-14,46,50,-58,-80,68,-64,90,-58,12,76,-40,40,-46,8,-80,4,-90,14,-10,64,-68},{0,1,1,1},{43,41,90,5,6,17,68,68,86,89}}; vector param1 {25,35,34,6,12,29,3,34,3,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 2, 5, 8, 16, 21, 21, 22, 23, 26, 26, 27, 27, 29, 31, 33, 36, 37, 37, 38, 42, 45, 47, 50, 57, 58, 60, 60, 62, 63, 66, 66, 76, 84, 84, 88, 96, 99],25,), ([-30, -60, 34, 4, 86, 80, -96, -94, 52, 46, 8, 82, -94, -96, 78, 82, -22, -36, 78, 50, -46, -36, 80, 24, -14, 94, -46, -38, 82, 4, -24, 2, 4, -82, -82, -18, -62, 12, 8, 92, 70, -10],35,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],34,), ([38, 47, 84, 49, 48, 62, 48, 41, 38, 48, 92, 16, 99],6,), ([-88, -64, -40, -38, -38, -16, 16, 20, 28, 40, 56, 58, 60, 68, 74, 92],12,), ([1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],29,), ([14, 24, 82, 87, 95],3,), ([-34, 62, 40, -84, 52, -76, 2, -58, 94, 22, 2, -18, -88, 62, -14, 46, 50, -58, -80, 68, -64, 90, -58, 12, 76, -40, 40, -46, 8, -80, 4, -90, 14, -10, 64, -68],34,), ([0, 1, 1, 1],3,), ([43, 41, 90, 5, 6, 17, 68, 68, 86, 89],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ELEMENTS_TO_BE_ADDED_SO_THAT_ALL_ELEMENTS_OF_A_RANGE_ARE_PRESENT_IN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > s = new HashSet < > ( ) ; int count = 0 , maxm = Integer . MIN_VALUE , minm = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { s . add ( arr [ i ] ) ; if ( arr [ i ] < minm ) minm = arr [ i ] ; if ( arr [ i ] > maxm ) maxm = arr [ i ] ; } for ( int i = minm ; i <= maxm ; i ++ ) if ( ! s . contains ( i ) ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,5,5,11,11,12,14,16,20,23,23,25,27,29,33,33,35,37,39,39,44,44,45,47,51,51,53,55,65,73,73,75,78,79,79,80,82,86,86,87,87,88,90,91,91,94}); param0.add(new int[]{-38,20,-94,-68,-96,36,48,32,44,-56,72,-28,-6,22,-54,-46,58,-60,-80,28,-34,60,-12,-26,-32,28,72,-50,66,-36,28,30,10,14,0,-78,94,-24,-42,-60,66,-12,92,54,-34,-58,56}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{73,69,12,82,65,55,93,93,88,52,33,94,62,75,61,81,48,43,29,8,28,60,60,58,54,44,25,36,46,88,54,36,83,46,34,44,71,90,68,75,42}); param0.add(new int[]{-98,-94,-88,-80,-74,-70,-70,-56,-50,-48,-40,-24,-22,-14,0,2,2,6,12,22,30,32,32,40,48,52,52,58,64,66,66,68,70,72,74,76,78,94,98,98}); param0.add(new int[]{1,0,1,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,1,1}); param0.add(new int[]{1,2,3,4,7,11,12,13,14,15,20,21,22,25,25,28,32,32,35,36,37,38,42,42,45,48,48,48,54,67,70,70,71,74,80,81,82,82,85,94}); param0.add(new int[]{-90,92,28,-32,76,94,48,80,52,-12,-6,22,40,26,-18,-84,90,16,-76,52,10,-56,6}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{4,21,34,35,71,10,88,44,82,13,79,92,35,73,28,91,33,9,12,76,40,91,4,22,90,53,98,7,30}); List param1 = new ArrayList<>(); param1.add(26); param1.add(31); param1.add(20); param1.add(31); param1.add(22); param1.add(18); param1.add(24); param1.add(11); param1.add(14); param1.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : s = dict ( ) count , maxm , minm = 0 , - 10 ** 9 , 10 ** 9 for i in range ( n ) : s [ arr [ i ] ] = 1 if ( arr [ i ] < minm ) : minm = arr [ i ] if ( arr [ i ] > maxm ) : maxm = arr [ i ] for i in range ( minm , maxm + 1 ) : if i not in s.keys ( ) : count += 1 return count ",,," if __name__ == '__main__': param = [ ([1, 4, 5, 5, 11, 11, 12, 14, 16, 20, 23, 23, 25, 27, 29, 33, 33, 35, 37, 39, 39, 44, 44, 45, 47, 51, 51, 53, 55, 65, 73, 73, 75, 78, 79, 79, 80, 82, 86, 86, 87, 87, 88, 90, 91, 91, 94],26,), ([-38, 20, -94, -68, -96, 36, 48, 32, 44, -56, 72, -28, -6, 22, -54, -46, 58, -60, -80, 28, -34, 60, -12, -26, -32, 28, 72, -50, 66, -36, 28, 30, 10, 14, 0, -78, 94, -24, -42, -60, 66, -12, 92, 54, -34, -58, 56],31,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],20,), ([73, 69, 12, 82, 65, 55, 93, 93, 88, 52, 33, 94, 62, 75, 61, 81, 48, 43, 29, 8, 28, 60, 60, 58, 54, 44, 25, 36, 46, 88, 54, 36, 83, 46, 34, 44, 71, 90, 68, 75, 42],31,), ([-98, -94, -88, -80, -74, -70, -70, -56, -50, -48, -40, -24, -22, -14, 0, 2, 2, 6, 12, 22, 30, 32, 32, 40, 48, 52, 52, 58, 64, 66, 66, 68, 70, 72, 74, 76, 78, 94, 98, 98],22,), ([1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1],18,), ([1, 2, 3, 4, 7, 11, 12, 13, 14, 15, 20, 21, 22, 25, 25, 28, 32, 32, 35, 36, 37, 38, 42, 42, 45, 48, 48, 48, 54, 67, 70, 70, 71, 74, 80, 81, 82, 82, 85, 94],24,), ([-90, 92, 28, -32, 76, 94, 48, 80, 52, -12, -6, 22, 40, 26, -18, -84, 90, 16, -76, 52, 10, -56, 6],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],14,), ([4, 21, 34, 35, 71, 10, 88, 44, 82, 13, 79, 92, 35, 73, 28, 91, 33, 9, 12, 76, 40, 91, 4, 22, 90, 53, 98, 7, 30],17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_PERIMETER_CYLINDER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_PERIMETER_CYLINDER{ static int f_gold ( int diameter , int height ) { return 2 * ( diameter + height ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(70); param0.add(97); param0.add(49); param0.add(56); param0.add(87); param0.add(64); param0.add(75); param0.add(90); param0.add(55); param0.add(73); List param1 = new ArrayList<>(); param1.add(78); param1.add(46); param1.add(26); param1.add(61); param1.add(79); param1.add(21); param1.add(93); param1.add(16); param1.add(16); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( diameter , height ) : return 2 * ( diameter + height ) "," using namespace std; int f_gold ( int diameter, int height ) { return 2 * ( diameter + height ); } int main() { int n_success = 0; vector param0 {70,97,49,56,87,64,75,90,55,73}; vector param1 {78,46,26,61,79,21,93,16,16,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (70,78,), (97,46,), (49,26,), (56,61,), (87,79,), (64,21,), (75,93,), (90,16,), (55,16,), (73,29,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REMOVE_MINIMUM_ELEMENTS_EITHER_SIDE_2MIN_MAX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMOVE_MINIMUM_ELEMENTS_EITHER_SIDE_2MIN_MAX{ static int f_gold ( int arr [ ] , int n ) { int longest_start = - 1 , longest_end = 0 ; for ( int start = 0 ; start < n ; start ++ ) { int min = Integer . MAX_VALUE , max = Integer . MIN_VALUE ; for ( int end = start ; end < n ; end ++ ) { int val = arr [ end ] ; if ( val < min ) { min = val ; } if ( val > max ) { max = val ; } if ( 2 * min <= max ) { break ; } if ( end - start > longest_end - longest_start || longest_start == - 1 ) { longest_start = start ; longest_end = end ; } } } if ( longest_start == - 1 ) { return n ; } return ( n - ( longest_end - longest_start + 1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{32,50,66,73,76,87}); param0.add(new int[]{68,74,16,40,6,-44,-36,94,6,-24,-4,-58,-16,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{91,22}); param0.add(new int[]{-84,-80,-78,-76,-58,-54,-52,-48,-42,-42,-40,-38,-34,-32,-28,-24,-6,2,2,4,10,14,16,18,26,26,36,40,50,52,62,64,72,74,84,90,94,96,98}); param0.add(new int[]{1,0,1,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1}); param0.add(new int[]{10,19,25,29,32,37,40,43,43,44,46,51,51,54,56,58,63,79,83,86,87,97,97}); param0.add(new int[]{-48,-28,10,30,78,-72,78,52,-52,-68,56,42,8,-42,16,-56,2,-90,-26,-28,-56,-2,80,-50,98,-64,-96,10,-10,44,98,-48,-88,42,30,24,38,-26,-52,-12,0,34,-82,-80,0,-84,-20}); param0.add(new int[]{0,0,1,1,1,1,1,1}); param0.add(new int[]{25,82}); List param1 = new ArrayList<>(); param1.add(5); param1.add(11); param1.add(11); param1.add(1); param1.add(35); param1.add(13); param1.add(11); param1.add(25); param1.add(6); param1.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n ) : longest_start = - 1 ; longest_end = 0 ; for start in range ( n ) : min = sys.maxsize ; max = - sys.maxsize ; for end in range ( start , n ) : val = arr [ end ] ; if ( val < min ) : min = val ; if ( val > max ) : max = val ; if ( 2 * min <= max ) : break ; if ( end - start > longest_end - longest_start or longest_start == - 1 ) : longest_start = start ; longest_end = end ; if ( longest_start == - 1 ) : return n ; return ( n - ( longest_end - longest_start + 1 ) ) ; "," using namespace std; int f_gold ( int arr [ ], int n ) { int longest_start = - 1, longest_end = 0; for ( int start = 0; start < n; start ++ ) { int min = INT_MAX, max = INT_MIN; for ( int end = start; end < n; end ++ ) { int val = arr [ end ]; if ( val < min ) min = val; if ( val > max ) max = val; if ( 2 * min <= max ) break; if ( end - start > longest_end - longest_start || longest_start == - 1 ) { longest_start = start; longest_end = end; } } } if ( longest_start == - 1 ) return n; return ( n - ( longest_end - longest_start + 1 ) ); } int main() { int n_success = 0; vector> param0 {{32,50,66,73,76,87},{68,74,16,40,6,-44,-36,94,6,-24,-4,-58,-16,24},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{91,22},{-84,-80,-78,-76,-58,-54,-52,-48,-42,-42,-40,-38,-34,-32,-28,-24,-6,2,2,4,10,14,16,18,26,26,36,40,50,52,62,64,72,74,84,90,94,96,98},{1,0,1,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,1,0,1},{10,19,25,29,32,37,40,43,43,44,46,51,51,54,56,58,63,79,83,86,87,97,97},{-48,-28,10,30,78,-72,78,52,-52,-68,56,42,8,-42,16,-56,2,-90,-26,-28,-56,-2,80,-50,98,-64,-96,10,-10,44,98,-48,-88,42,30,24,38,-26,-52,-12,0,34,-82,-80,0,-84,-20},{0,0,1,1,1,1,1,1},{25,82}}; vector param1 {5,11,11,1,35,13,11,25,6,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([32, 50, 66, 73, 76, 87],5,), ([68, 74, 16, 40, 6, -44, -36, 94, 6, -24, -4, -58, -16, 24],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,), ([91, 22],1,), ([-84, -80, -78, -76, -58, -54, -52, -48, -42, -42, -40, -38, -34, -32, -28, -24, -6, 2, 2, 4, 10, 14, 16, 18, 26, 26, 36, 40, 50, 52, 62, 64, 72, 74, 84, 90, 94, 96, 98],35,), ([1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1],13,), ([10, 19, 25, 29, 32, 37, 40, 43, 43, 44, 46, 51, 51, 54, 56, 58, 63, 79, 83, 86, 87, 97, 97],11,), ([-48, -28, 10, 30, 78, -72, 78, 52, -52, -68, 56, 42, 8, -42, 16, -56, 2, -90, -26, -28, -56, -2, 80, -50, 98, -64, -96, 10, -10, 44, 98, -48, -88, 42, 30, 24, 38, -26, -52, -12, 0, 34, -82, -80, 0, -84, -20],25,), ([0, 0, 1, 1, 1, 1, 1, 1],6,), ([25, 82],1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4{ static int f_gold ( int n ) { int DP [ ] = new int [ n + 1 ] ; DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1 ; DP [ 3 ] = 2 ; for ( int i = 4 ; i <= n ; i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ] ; return DP [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(44); param0.add(9); param0.add(19); param0.add(10); param0.add(78); param0.add(94); param0.add(70); param0.add(81); param0.add(81); param0.add(49); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : DP = [ 0 for i in range ( 0 , n + 1 ) ] DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1 DP [ 3 ] = 2 for i in range ( 4 , n + 1 ) : DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ] return DP [ n ] "," using namespace std; int f_gold ( int n ) { int DP [ n + 1 ]; DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1; DP [ 3 ] = 2; for ( int i = 4; i <= n; i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ]; return DP [ n ]; } int main() { int n_success = 0; vector param0 {44,9,19,10,78,94,70,81,81,49}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (44,), (9,), (19,), (10,), (78,), (94,), (70,), (81,), (81,), (49,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_BINOMIAL_COEFFICIENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_BINOMIAL_COEFFICIENTS{ static int f_gold ( int n ) { int C [ ] [ ] = new int [ n + 1 ] [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= Math . min ( i , n ) ; j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1 ; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ; } } int sum = 0 ; for ( int i = 0 ; i <= n ; i ++ ) sum += C [ n ] [ i ] ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(8); param0.add(39); param0.add(25); param0.add(44); param0.add(72); param0.add(6); param0.add(72); param0.add(62); param0.add(48); param0.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : C = [ [ 0 ] * ( n + 2 ) for i in range ( 0 , n + 2 ) ] for i in range ( 0 , n + 1 ) : for j in range ( 0 , min ( i , n ) + 1 ) : if ( j == 0 or j == i ) : C [ i ] [ j ] = 1 else : C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] sum = 0 for i in range ( 0 , n + 1 ) : sum += C [ n ] [ i ] return sum "," using namespace std; int f_gold ( int n ) { int C [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) { for ( int j = 0; j <= min ( i, n ); j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ]; } } int sum = 0; for ( int i = 0; i <= n; i ++ ) sum += C [ n ] [ i ]; return sum; } int main() { int n_success = 0; vector param0 {8,39,25,44,72,6,72,62,48,39}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (8,), (39,), (25,), (44,), (72,), (6,), (72,), (62,), (48,), (39,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIBONACCI_MODULO_P," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIBONACCI_MODULO_P{ static int f_gold ( int p ) { int first = 1 , second = 1 , number = 2 , next = 1 ; while ( next > 0 ) { next = ( first + second ) % p ; first = second ; second = next ; number ++ ; } return number ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(51); param0.add(40); param0.add(68); param0.add(7); param0.add(8); param0.add(32); param0.add(93); param0.add(75); param0.add(71); param0.add(15); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( p ) : first = 1 second = 1 number = 2 next = 1 while ( next ) : next = ( first + second ) % p first = second second = next number = number + 1 return number "," using namespace std; int f_gold ( int p ) { int first = 1, second = 1, number = 2, next = 1; while ( next ) { next = ( first + second ) % p; first = second; second = next; number ++; } return number; } int main() { int n_success = 0; vector param0 {51,40,68,7,8,32,93,75,71,15}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (51,), (40,), (68,), (7,), (8,), (32,), (93,), (75,), (71,), (15,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NTH_EVEN_LENGTH_PALINDROME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_EVEN_LENGTH_PALINDROME{ static String f_gold ( String n ) { String res = n ; for ( int j = n . length ( ) - 1 ; j >= 0 ; -- j ) res += n . charAt ( j ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""lSUhEvxcgfI""); param0.add(""77329283""); param0.add(""010111111""); param0.add(""Stazb""); param0.add(""0702""); param0.add(""01111111""); param0.add(""a""); param0.add(""359118754930""); param0.add(""11011010010""); param0.add(""rznb""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : res = n for j in range ( len ( n ) - 1 , - 1 , - 1 ) : res += n [ j ] return res "," using namespace std; string f_gold ( string n ) { string res = n; for ( int j = n . length ( ) - 1; j >= 0; -- j ) res += n [ j ]; return res; } int main() { int n_success = 0; vector param0 {""lSUhEvxcgfI"",""77329283"",""010111111"",""Stazb"",""0702"",""01111111"",""a"",""359118754930"",""11011010010"",""rznb""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('lSUhEvxcgfI',), ('77329283',), ('010111111',), ('Stazb',), ('0702',), ('01111111',), ('a',), ('359118754930',), ('11011010010',), ('rznb',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_TRAILING_ZEROES_FACTORIAL_NUMBER{ static int f_gold ( int n ) { int count = 0 ; for ( int i = 5 ; n / i >= 1 ; i *= 5 ) count += n / i ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(9); param0.add(43); param0.add(50); param0.add(32); param0.add(37); param0.add(51); param0.add(33); param0.add(49); param0.add(1); param0.add(75); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : count = 0 i = 5 while ( n / i >= 1 ) : count += int ( n / i ) i *= 5 return int ( count ) "," using namespace std; int f_gold ( int n ) { int count = 0; for ( int i = 5; n / i >= 1; i *= 5 ) count += n / i; return count; } int main() { int n_success = 0; vector param0 {9,43,50,32,37,51,33,49,1,75}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (9,), (43,), (50,), (32,), (37,), (51,), (33,), (49,), (1,), (75,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_OF_PAIRS_IN_AN_ARRAY_HAVING_SUM_EQUAL_TO_PRODUCT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_OF_PAIRS_IN_AN_ARRAY_HAVING_SUM_EQUAL_TO_PRODUCT{ static int f_gold ( int a [ ] , int n ) { int zero = 0 , two = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == 0 ) { zero ++ ; } if ( a [ i ] == 2 ) { two ++ ; } } int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2 ; return cnt ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,10,20,26,26,28,31,34,35,36,36,37,39,43,44,44,46,49,54,57,58,63,64,64,65,67,70,70,74,75,77,78,79,81,82,83,84,86,95}); param0.add(new int[]{0,-10,10,0,68,4,-6,-14,74,-80,56,-4,36,56,10,-16,90,84,-38,-40,40,-86,-36,-16,-48,-76,-72,-18,-14,-40,-82,56,-60}); param0.add(new int[]{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}); param0.add(new int[]{88,20,53,21,29,73,62,91,72,34,47,42,98,9,79,80,94,36,7,67,96,34,99,56,37,70,55,36,10,77,41,51,5,37,57,29,56,74,97,31,96,52,13,29,87,58,28,31}); param0.add(new int[]{20}); param0.add(new int[]{1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1}); param0.add(new int[]{2,4,9,16,22,23,25,33,33,36,39,48,49,52,53,60,67,68,76,77,79,84,84,86,89}); param0.add(new int[]{-62,42,-88,-44,90,30,52,54,56,-72,-76,90,18,42,62,-84,56,-80,72}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{22,15,28,29,32,16,33,83}); List param1 = new ArrayList<>(); param1.add(31); param1.add(19); param1.add(22); param1.add(38); param1.add(0); param1.add(21); param1.add(24); param1.add(13); param1.add(15); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : zero = 0 two = 0 for i in range ( n ) : if a [ i ] == 0 : zero += 1 if a [ i ] == 2 : two += 1 cnt = ( zero * ( zero - 1 ) ) // 2 + \ ( two * ( two - 1 ) ) // 2 return cnt "," using namespace std; int f_gold ( int a [ ], int n ) { int zero = 0, two = 0; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] == 0 ) { zero ++; } if ( a [ i ] == 2 ) { two ++; } } int cnt = ( zero * ( zero - 1 ) ) / 2 + ( two * ( two - 1 ) ) / 2; return cnt; } int main() { int n_success = 0; vector> param0 {{9,10,20,26,26,28,31,34,35,36,36,37,39,43,44,44,46,49,54,57,58,63,64,64,65,67,70,70,74,75,77,78,79,81,82,83,84,86,95},{0,-10,10,0,68,4,-6,-14,74,-80,56,-4,36,56,10,-16,90,84,-38,-40,40,-86,-36,-16,-48,-76,-72,-18,-14,-40,-82,56,-60},{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},{88,20,53,21,29,73,62,91,72,34,47,42,98,9,79,80,94,36,7,67,96,34,99,56,37,70,55,36,10,77,41,51,5,37,57,29,56,74,97,31,96,52,13,29,87,58,28,31},{20},{1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1},{2,4,9,16,22,23,25,33,33,36,39,48,49,52,53,60,67,68,76,77,79,84,84,86,89},{-62,42,-88,-44,90,30,52,54,56,-72,-76,90,18,42,62,-84,56,-80,72},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{22,15,28,29,32,16,33,83}}; vector param1 {31,19,22,38,0,21,24,13,15,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([9, 10, 20, 26, 26, 28, 31, 34, 35, 36, 36, 37, 39, 43, 44, 44, 46, 49, 54, 57, 58, 63, 64, 64, 65, 67, 70, 70, 74, 75, 77, 78, 79, 81, 82, 83, 84, 86, 95],31,), ([0, -10, 10, 0, 68, 4, -6, -14, 74, -80, 56, -4, 36, 56, 10, -16, 90, 84, -38, -40, 40, -86, -36, -16, -48, -76, -72, -18, -14, -40, -82, 56, -60],19,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([88, 20, 53, 21, 29, 73, 62, 91, 72, 34, 47, 42, 98, 9, 79, 80, 94, 36, 7, 67, 96, 34, 99, 56, 37, 70, 55, 36, 10, 77, 41, 51, 5, 37, 57, 29, 56, 74, 97, 31, 96, 52, 13, 29, 87, 58, 28, 31],38,), ([20],0,), ([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1],21,), ([2, 4, 9, 16, 22, 23, 25, 33, 33, 36, 39, 48, 49, 52, 53, 60, 67, 68, 76, 77, 79, 84, 84, 86, 89],24,), ([-62, 42, -88, -44, 90, 30, 52, 54, 56, -72, -76, 90, 18, 42, 62, -84, 56, -80, 72],13,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,), ([22, 15, 28, 29, 32, 16, 33, 83],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8{ static boolean f_gold ( String str ) { int i , j , k , l = str . length ( ) ; int arr [ ] = new int [ l ] ; for ( i = 0 ; i < l ; i ++ ) { for ( j = i ; j < l ; j ++ ) { for ( k = j ; k < l ; k ++ ) { if ( arr [ i ] % 8 == 0 ) return true ; else if ( ( arr [ i ] * 10 + arr [ j ] ) % 8 == 0 && i != j ) return true ; else if ( ( arr [ i ] * 100 + arr [ j ] * 10 + arr [ k ] ) % 8 == 0 && i != j && j != k && i != k ) return true ; } } } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""1787075866""); param0.add(""8""); param0.add(""1110101110111""); param0.add(""6673177113""); param0.add(""7""); param0.add(""000001""); param0.add(""dbxMF""); param0.add(""71733""); param0.add(""01101101100""); param0.add(""""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( st ) : l = len ( st ) arr = [ 0 ] * l for i in range ( 0 , l ) : for j in range ( i , l ) : for k in range ( j , l ) : if ( arr [ i ] % 8 == 0 ) : return True elif ( ( arr [ i ] * 10 + arr [ j ] ) % 8 == 0 and i != j ) : return True elif ( ( arr [ i ] * 100 + arr [ j ] * 10 + arr [ k ] ) % 8 == 0 and i != j and j != k and i != k ) : return True return False ",,," if __name__ == '__main__': param = [ ('1787075866',), ('8',), ('1110101110111',), ('6673177113',), ('7',), ('000001',), ('dbxMF',), ('71733',), ('01101101100',), ('',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TAIL_RECURSION_FIBONACCI," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TAIL_RECURSION_FIBONACCI{ static int f_gold ( int n , int a , int b ) { if ( n == 0 ) return a ; if ( n == 1 ) return b ; return f_gold ( n - 1 , b , a + b ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(4); param0.add(60); param0.add(92); param0.add(73); param0.add(58); param0.add(82); param0.add(53); param0.add(57); param0.add(47); param0.add(83); List param1 = new ArrayList<>(); param1.add(43); param1.add(48); param1.add(21); param1.add(79); param1.add(38); param1.add(26); param1.add(10); param1.add(37); param1.add(91); param1.add(3); List param2 = new ArrayList<>(); param2.add(24); param2.add(98); param2.add(69); param2.add(38); param2.add(30); param2.add(12); param2.add(17); param2.add(26); param2.add(99); param2.add(64); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , a = 0 , b = 1 ) : if n == 0 : return a if n == 1 : return b return f_gold ( n - 1 , b , a + b ) ; "," using namespace std; int f_gold ( int n, int a = 0, int b = 1 ) { if ( n == 0 ) return a; if ( n == 1 ) return b; return f_gold ( n - 1, b, a + b ); } int main() { int n_success = 0; vector param0 {4,60,92,73,58,82,53,57,47,83}; vector param1 {43,48,21,79,38,26,10,37,91,3}; vector param2 {24,98,69,38,30,12,17,26,99,64}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (4,43,24,), (60,48,98,), (92,21,69,), (73,79,38,), (58,38,30,), (82,26,12,), (53,10,17,), (57,37,26,), (47,91,99,), (83,3,64,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DETECT_IF_TWO_INTEGERS_HAVE_OPPOSITE_SIGNS{ static boolean f_gold ( int x , int y ) { return ( ( x ^ y ) < 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(59); param0.add(-20); param0.add(-100); param0.add(54); param0.add(-16); param0.add(-23); param0.add(93); param0.add(24); param0.add(-8); param0.add(29); List param1 = new ArrayList<>(); param1.add(-99); param1.add(-21); param1.add(79); param1.add(-49); param1.add(16); param1.add(-68); param1.add(37); param1.add(-61); param1.add(69); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y ) : return ( ( x ^ y ) < 0 ) ; "," using namespace std; bool f_gold ( int x, int y ) { return ( ( x ^ y ) < 0 ); } int main() { int n_success = 0; vector param0 {59,-20,-100,54,-16,-23,93,24,-8,29}; vector param1 {-99,-21,100,-49,16,-68,37,-61,69,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (59,-99,), (-20,-21,), (-100,79,), (54,-49,), (-16,16,), (-23,-68,), (93,37,), (24,-61,), (-8,69,), (29,10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DISTINCT_NON_NEGATIVE_PAIRS_X_Y_SATISFY_INEQUALITY_XX_YY_N_2_1{ static int f_gold ( int n ) { int x = 0 , yCount , res = 0 ; for ( yCount = 0 ; yCount * yCount < n ; yCount ++ ) ; while ( yCount != 0 ) { res += yCount ; x ++ ; while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount -- ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(72); param0.add(75); param0.add(92); param0.add(30); param0.add(45); param0.add(40); param0.add(81); param0.add(17); param0.add(81); param0.add(99); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : x = 0 res = 0 yCount = 0 while ( yCount * yCount < n ) : yCount = yCount + 1 while ( yCount != 0 ) : res = res + yCount x = x + 1 while ( yCount != 0 and ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) : yCount = yCount - 1 return res "," using namespace std; int f_gold ( int n ) { int x = 0, yCount, res = 0; for ( yCount = 0; yCount * yCount < n; yCount ++ ); while ( yCount != 0 ) { res += yCount; x ++; while ( yCount != 0 && ( x * x + ( yCount - 1 ) * ( yCount - 1 ) >= n ) ) yCount --; } return res; } int main() { int n_success = 0; vector param0 {72,75,92,30,45,40,81,17,81,99}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (72,), (75,), (92,), (30,), (45,), (40,), (81,), (17,), (81,), (99,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_HEIGHT_OF_TRIANGULAR_ARRANGEMENT_OF_ARRAY_VALUES{ static int f_gold ( int [ ] a , int n ) { int result = 1 ; for ( int i = 1 ; i <= n ; ++ i ) { int y = ( i * ( i + 1 ) ) / 2 ; if ( y < n ) result = i ; else break ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,10,11,14,14,17,20,20,22,22,22,23,25,30,33,39,39,41,43,45,46,46,46,50,51,53,57,59,60,64,64,66,72,72,75,77,85,85,87,88,90,91,93,94,94,95}); param0.add(new int[]{-44,-90,20,4,-56,-50,-80,74,-82,20,62,-26,-10,-14,-76,82,-88,92,30,44,-62,-86,-20,-96,-60,-88,-78,-40,-48,-92,62,58,94,68,68,44,80,4,48,-92,30,-76,-46,-20,4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{8,34,48,10,5,12,80,7,67,1,79,59,63,13,16,23,62,56,99,89,7,80}); param0.add(new int[]{-88,-46,-40,-40,38}); param0.add(new int[]{1,0,0,1,0,1,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,1,1,1}); param0.add(new int[]{8,15,35,39,49,81,86,91}); param0.add(new int[]{-24,56,-74,-76,-80,86,90,0,-26,18,72,78,-66,-28,22,22,72,78,-50,-12,20,12,-68,-2,-58,-44,28,-58,90,-28,32,-70,-48,-66,-94,-50,18,-12,80,12,82,56,-64,10,-22}); param0.add(new int[]{0,0}); param0.add(new int[]{62,93,69,40,26,2,29,83,66,68,67,73,12,65,89,57,38,99,42,27,38,24,43,4,4,54,72,47,52,46,53,24,3,41,64,33,88,3,1,7,17,31,20,33,69,21,9,24,59}); List param1 = new ArrayList<>(); param1.add(38); param1.add(36); param1.add(28); param1.add(12); param1.add(3); param1.add(44); param1.add(7); param1.add(36); param1.add(1); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : result = 1 for i in range ( 1 , n ) : y = ( i * ( i + 1 ) ) / 2 if ( y < n ) : result = i else : break return result "," using namespace std; int f_gold ( int a [ ], int n ) { int result = 1; for ( int i = 1; i <= n; ++ i ) { long long y = ( i * ( i + 1 ) ) / 2; if ( y < n ) result = i; else break; } return result; } int main() { int n_success = 0; vector> param0 {{8,10,11,14,14,17,20,20,22,22,22,23,25,30,33,39,39,41,43,45,46,46,46,50,51,53,57,59,60,64,64,66,72,72,75,77,85,85,87,88,90,91,93,94,94,95},{-44,-90,20,4,-56,-50,-80,74,-82,20,62,-26,-10,-14,-76,82,-88,92,30,44,-62,-86,-20,-96,-60,-88,-78,-40,-48,-92,62,58,94,68,68,44,80,4,48,-92,30,-76,-46,-20,4},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{8,34,48,10,5,12,80,7,67,1,79,59,63,13,16,23,62,56,99,89,7,80},{-88,-46,-40,-40,38},{1,0,0,1,0,1,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,1,1,1},{8,15,35,39,49,81,86,91},{-24,56,-74,-76,-80,86,90,0,-26,18,72,78,-66,-28,22,22,72,78,-50,-12,20,12,-68,-2,-58,-44,28,-58,90,-28,32,-70,-48,-66,-94,-50,18,-12,80,12,82,56,-64,10,-22},{0,0},{62,93,69,40,26,2,29,83,66,68,67,73,12,65,89,57,38,99,42,27,38,24,43,4,4,54,72,47,52,46,53,24,3,41,64,33,88,3,1,7,17,31,20,33,69,21,9,24,59}}; vector param1 {38,36,28,12,3,44,7,36,1,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 10, 11, 14, 14, 17, 20, 20, 22, 22, 22, 23, 25, 30, 33, 39, 39, 41, 43, 45, 46, 46, 46, 50, 51, 53, 57, 59, 60, 64, 64, 66, 72, 72, 75, 77, 85, 85, 87, 88, 90, 91, 93, 94, 94, 95],38,), ([-44, -90, 20, 4, -56, -50, -80, 74, -82, 20, 62, -26, -10, -14, -76, 82, -88, 92, 30, 44, -62, -86, -20, -96, -60, -88, -78, -40, -48, -92, 62, 58, 94, 68, 68, 44, 80, 4, 48, -92, 30, -76, -46, -20, 4],36,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,), ([8, 34, 48, 10, 5, 12, 80, 7, 67, 1, 79, 59, 63, 13, 16, 23, 62, 56, 99, 89, 7, 80],12,), ([-88, -46, -40, -40, 38],3,), ([1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1],44,), ([8, 15, 35, 39, 49, 81, 86, 91],7,), ([-24, 56, -74, -76, -80, 86, 90, 0, -26, 18, 72, 78, -66, -28, 22, 22, 72, 78, -50, -12, 20, 12, -68, -2, -58, -44, 28, -58, 90, -28, 32, -70, -48, -66, -94, -50, 18, -12, 80, 12, 82, 56, -64, 10, -22],36,), ([0, 0],1,), ([62, 93, 69, 40, 26, 2, 29, 83, 66, 68, 67, 73, 12, 65, 89, 57, 38, 99, 42, 27, 38, 24, 43, 4, 4, 54, 72, 47, 52, 46, 53, 24, 3, 41, 64, 33, 88, 3, 1, 7, 17, 31, 20, 33, 69, 21, 9, 24, 59],26,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_BINARY_STRINGS_K_TIMES_APPEARING_ADJACENT_TWO_SET_BITS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_BINARY_STRINGS_K_TIMES_APPEARING_ADJACENT_TWO_SET_BITS{ static int f_gold ( int n , int k ) { int dp [ ] [ ] [ ] = new int [ n + 1 ] [ k + 1 ] [ 2 ] ; dp [ 1 ] [ 0 ] [ 0 ] = 1 ; dp [ 1 ] [ 0 ] [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) { for ( int j = 0 ; j < i && j < k + 1 ; j ++ ) { dp [ i ] [ j ] [ 0 ] = dp [ i - 1 ] [ j ] [ 0 ] + dp [ i - 1 ] [ j ] [ 1 ] ; dp [ i ] [ j ] [ 1 ] = dp [ i - 1 ] [ j ] [ 0 ] ; if ( j - 1 >= 0 ) { dp [ i ] [ j ] [ 1 ] += dp [ i - 1 ] [ j - 1 ] [ 1 ] ; } } } return dp [ n ] [ k ] [ 0 ] + dp [ n ] [ k ] [ 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(29); param0.add(47); param0.add(77); param0.add(9); param0.add(29); param0.add(94); param0.add(51); param0.add(46); param0.add(18); param0.add(86); List param1 = new ArrayList<>(); param1.add(85); param1.add(29); param1.add(96); param1.add(91); param1.add(80); param1.add(85); param1.add(87); param1.add(62); param1.add(96); param1.add(86); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k ) : dp = [ [ [ 0 , 0 ] for __ in range ( k + 1 ) ] for _ in range ( n + 1 ) ] dp [ 1 ] [ 0 ] [ 0 ] = 1 dp [ 1 ] [ 0 ] [ 1 ] = 1 for i in range ( 2 , n + 1 ) : for j in range ( k + 1 ) : dp [ i ] [ j ] [ 0 ] = ( dp [ i - 1 ] [ j ] [ 0 ] + dp [ i - 1 ] [ j ] [ 1 ] ) dp [ i ] [ j ] [ 1 ] = dp [ i - 1 ] [ j ] [ 0 ] if j >= 1 : dp [ i ] [ j ] [ 1 ] += dp [ i - 1 ] [ j - 1 ] [ 1 ] return dp [ n ] [ k ] [ 0 ] + dp [ n ] [ k ] [ 1 ] ",,," if __name__ == '__main__': param = [ (29,85,), (47,29,), (77,96,), (9,91,), (29,80,), (94,85,), (51,87,), (46,62,), (18,96,), (86,86,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FORM_SMALLEST_NUMBER_USING_ONE_SWAP_OPERATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FORM_SMALLEST_NUMBER_USING_ONE_SWAP_OPERATION{ public static String f_gold ( String str ) { char [ ] num = str . toCharArray ( ) ; int n = str . length ( ) ; int [ ] rightMin = new int [ n ] ; rightMin [ n - 1 ] = - 1 ; int right = n - 1 ; for ( int i = n - 2 ; i >= 1 ; i -- ) { if ( num [ i ] > num [ right ] ) rightMin [ i ] = right ; else { rightMin [ i ] = - 1 ; right = i ; } } int small = - 1 ; for ( int i = 1 ; i < n ; i ++ ) if ( num [ i ] != '0' ) { if ( small == - 1 ) { if ( num [ i ] < num [ 0 ] ) small = i ; } else if ( num [ i ] < num [ small ] ) small = i ; } if ( small != - 1 ) { char temp ; temp = num [ 0 ] ; num [ 0 ] = num [ small ] ; num [ small ] = temp ; } else { for ( int i = 1 ; i < n ; i ++ ) { if ( rightMin [ i ] != - 1 ) { char temp ; temp = num [ i ] ; num [ i ] = num [ rightMin [ i ] ] ; num [ rightMin [ i ] ] = temp ; break ; } } } return ( new String ( num ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ncYltuhSxEfG""); param0.add(""26615541616459""); param0.add(""0101""); param0.add(""hK""); param0.add(""422162103899""); param0.add(""0010""); param0.add(""zfcSh""); param0.add(""92""); param0.add(""0""); param0.add(""v""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num ) : num = list ( num ) n = len ( num ) rightMin = [ 0 ] * n right = 0 rightMin [ n - 1 ] = - 1 ; right = n - 1 ; for i in range ( n - 2 , 0 , - 1 ) : if num [ i ] > num [ right ] : rightMin [ i ] = right else : rightMin [ i ] = - 1 right = i small = - 1 for i in range ( 1 , n ) : if num [ i ] != '0' : if small == - 1 : if num [ i ] < num [ 0 ] : small = i elif num [ i ] < num [ small ] : small = i if small != - 1 : num [ 0 ] , num [ small ] = num [ small ] , num [ 0 ] else : for i in range ( 1 , n ) : if rightMin [ i ] != - 1 : num [ i ] , num [ rightMin [ i ] ] = num [ rightMin [ i ] ] , num [ i ] break return ''.join ( num ) "," using namespace std; string f_gold ( string num ) { int n = num . size ( ); int rightMin [ n ], right; rightMin [ n - 1 ] = - 1; right = n - 1; for ( int i = n - 2; i >= 1; i -- ) { if ( num [ i ] >= num [ right ] ) rightMin [ i ] = right; else { if ( num [ i ] == num [ i + 1 ] ) { rightMin [ i ] = right; } else { rightMin [ i ] = - 1; right = i; } } } int small = - 1; for ( int i = 1; i < n; i ++ ) if ( num [ i ] != '0' ) { if ( small == - 1 ) { if ( num [ i ] < num [ 0 ] ) small = i; } else if ( num [ i ] <= num [ small ] ) small = i; } if ( small != - 1 ) swap ( num [ 0 ], num [ small ] ); else { for ( int i = 1; i < n; i ++ ) { if ( rightMin [ i ] != - 1 && num [ i ] != num [ rightMin [ i ] ] ) { swap ( num [ i ], num [ rightMin [ i ] ] ); break; } } } return num; } int main() { int n_success = 0; vector param0 {""ncYltuhSxEfG"",""26615541616459"",""0101"",""hK"",""422162103899"",""0010"",""zfcSh"",""92"",""0"",""v""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('ncYltuhSxEfG',), ('26615541616459',), ('0101',), ('hK',), ('422162103899',), ('0010',), ('zfcSh',), ('92',), ('0',), ('v',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_BINARY_STRINGS_WITHOUT_CONSECUTIVE_1S{ static int f_gold ( int n ) { int a [ ] = new int [ n ] ; int b [ ] = new int [ n ] ; a [ 0 ] = b [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ] ; b [ i ] = a [ i - 1 ] ; } return a [ n - 1 ] + b [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(86); param0.add(75); param0.add(14); param0.add(5); param0.add(41); param0.add(35); param0.add(30); param0.add(89); param0.add(84); param0.add(53); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : a = [ 0 for i in range ( n ) ] b = [ 0 for i in range ( n ) ] a [ 0 ] = b [ 0 ] = 1 for i in range ( 1 , n ) : a [ i ] = a [ i - 1 ] + b [ i - 1 ] b [ i ] = a [ i - 1 ] return a [ n - 1 ] + b [ n - 1 ] "," using namespace std; int f_gold ( int n ) { int a [ n ], b [ n ]; a [ 0 ] = b [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { a [ i ] = a [ i - 1 ] + b [ i - 1 ]; b [ i ] = a [ i - 1 ]; } return a [ n - 1 ] + b [ n - 1 ]; } int main() { int n_success = 0; vector param0 {86,75,14,5,41,35,30,89,84,53}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (86,), (75,), (14,), (5,), (41,), (35,), (30,), (89,), (84,), (53,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DIVISIBILITY_BY_12_FOR_A_LARGE_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIVISIBILITY_BY_12_FOR_A_LARGE_NUMBER{ static boolean f_gold ( String num ) { if ( num . length ( ) >= 3 ) { int d1 = ( int ) num . charAt ( num . length ( ) - 1 ) ; if ( d1 % 2 != 0 ) return false ; int d2 = ( int ) num . charAt ( num . length ( ) - 2 ) ; int sum = 0 ; for ( int i = 0 ; i < num . length ( ) ; i ++ ) sum += num . charAt ( i ) ; return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 ) ; } else { int number = Integer . parseInt ( num ) ; return ( number % 12 == 0 ) ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""12244824607284961224""); param0.add(""392603977949""); param0.add(""11101001111""); param0.add(""92387493287593874594898678979792""); param0.add(""2233244912""); param0.add(""10101""); param0.add(""12""); param0.add(""254535361""); param0.add(""1""); param0.add(""hMPxVMpOBt""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string num ) { if ( num . length ( ) >= 3 ) { int d1 = ( int ) num [ num . length ( ) - 1 ]; if ( d1 % 2 != 0 ) return ( 0 ); int d2 = ( int ) num [ num . length ( ) - 2 ]; int sum = 0; for ( int i = 0; i < num . length ( ); i ++ ) sum += num [ i ]; return ( sum % 3 == 0 && ( d2 * 10 + d1 ) % 4 == 0 ); } else { int number = stoi ( num ); return ( number % 12 == 0 ); } } int main() { int n_success = 0; vector param0 {""12244824607284961224"",""392603977949"",""11101001111"",""92387493287593874594898678979792"",""2233244912"",""10101"",""12"",""254535361"",""1"",""hMPxVMpOBt""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_GIVEN_CIRCLE_LIES_COMPLETELY_INSIDE_RING_FORMED_TWO_CONCENTRIC_CIRCLES{ public static boolean f_gold ( int r , int R , int r1 , int x1 , int y1 ) { int dis = ( int ) Math . sqrt ( x1 * x1 + y1 * y1 ) ; return ( dis - r1 >= R && dis + r1 <= r ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(8); param0.add(400); param0.add(1); param0.add(61); param0.add(60); param0.add(88); param0.add(60); param0.add(26); param0.add(33); param0.add(70); List param1 = new ArrayList<>(); param1.add(4); param1.add(1); param1.add(400); param1.add(40); param1.add(49); param1.add(10); param1.add(79); param1.add(88); param1.add(65); param1.add(57); List param2 = new ArrayList<>(); param2.add(2); param2.add(10); param2.add(10); param2.add(2); param2.add(68); param2.add(69); param2.add(92); param2.add(75); param2.add(57); param2.add(77); List param3 = new ArrayList<>(); param3.add(6); param3.add(74); param3.add(74); param3.add(50); param3.add(77); param3.add(71); param3.add(29); param3.add(84); param3.add(21); param3.add(52); List param4 = new ArrayList<>(); param4.add(0); param4.add(38); param4.add(38); param4.add(0); param4.add(71); param4.add(26); param4.add(38); param4.add(10); param4.add(61); param4.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( r , R , r1 , x1 , y1 ) : dis = int ( math.sqrt ( x1 * x1 + y1 * y1 ) ) return ( dis - r1 >= R and dis + r1 <= r ) "," using namespace std; bool f_gold ( int r, int R, int r1, int x1, int y1 ) { int dis = sqrt ( x1 * x1 + y1 * y1 ); return ( dis - r1 >= R && dis + r1 <= r ); } int main() { int n_success = 0; vector param0 {8,400,1,61,60,88,60,26,33,70}; vector param1 {4,1,400,40,49,10,79,88,65,57}; vector param2 {2,10,10,2,68,69,92,75,57,77}; vector param3 {6,74,74,50,77,71,29,84,21,52}; vector param4 {0,38,38,0,71,26,38,10,61,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (8,4,2,6,0,), (400,1,10,74,38,), (1,400,10,74,38,), (61,40,2,50,0,), (60,49,68,77,71,), (88,10,69,71,26,), (60,79,92,29,38,), (26,88,75,84,10,), (33,65,57,21,61,), (70,57,77,52,87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION{ static int f_gold ( String X , String Y ) { int m = X . length ( ) ; int n = Y . length ( ) ; int result = 0 ; int [ ] [ ] len = new int [ 2 ] [ n ] ; int currRow = 0 ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == 0 || j == 0 ) { len [ currRow ] [ j ] = 0 ; } else if ( X . charAt ( i - 1 ) == Y . charAt ( j - 1 ) ) { len [ currRow ] [ j ] = len [ ( 1 - currRow ) ] [ ( j - 1 ) ] + 1 ; result = Math . max ( result , len [ currRow ] [ j ] ) ; } else { len [ currRow ] [ j ] = 0 ; } } currRow = 1 - currRow ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""GeeksforGeeks""); param0.add(""333940""); param0.add(""1000""); param0.add(""Facebook""); param0.add(""2684247""); param0.add(""111""); param0.add(""abcdxyz""); param0.add(""625330958530""); param0.add(""01011000001111""); param0.add(""KXm""); List param1 = new ArrayList<>(); param1.add(""GeeksQuiz""); param1.add(""390""); param1.add(""0""); param1.add(""nice book""); param1.add(""1""); param1.add(""10""); param1.add(""xyzabcd""); param1.add(""412511""); param1.add(""1001010001""); param1.add(""gF""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string X, string Y ) { int m = X . length ( ); int n = Y . length ( ); int result = 0; int len [ 2 ] [ n ]; int currRow = 0; for ( int i = 0; i <= m; i ++ ) { for ( int j = 0; j <= n; j ++ ) { if ( i == 0 || j == 0 ) { len [ currRow ] [ j ] = 0; } else if ( X [ i - 1 ] == Y [ j - 1 ] ) { len [ currRow ] [ j ] = len [ 1 - currRow ] [ j - 1 ] + 1; result = max ( result, len [ currRow ] [ j ] ); } else { len [ currRow ] [ j ] = 0; } } currRow = 1 - currRow; } return result; } int main() { int n_success = 0; vector param0 {""GeeksforGeeks"",""333940"",""1000"",""Facebook"",""2684247"",""111"",""abcdxyz"",""625330958530"",""01011000001111"",""KXm""}; vector param1 {""GeeksQuiz"",""390"",""0"",""nice book"",""1"",""10"",""xyzabcd"",""412511"",""1001010001"",""gF""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1{ static int f_gold ( int a , int b ) { return ( a / 2 ) + ( b / 2 ) + ( ( a % 2 + b % 2 ) / 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(9); param0.add(68); param0.add(51); param0.add(31); param0.add(14); param0.add(73); param0.add(51); param0.add(75); param0.add(98); param0.add(83); List param1 = new ArrayList<>(); param1.add(81); param1.add(79); param1.add(2); param1.add(49); param1.add(10); param1.add(9); param1.add(13); param1.add(67); param1.add(51); param1.add(74); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : return ( a // 2 ) + ( b // 2 ) + ( ( a % 2 + b % 2 ) // 2 ) "," using namespace std; int f_gold ( int a, int b ) { return ( a / 2 ) + ( b / 2 ) + ( ( a % 2 + b % 2 ) / 2 ); } int main() { int n_success = 0; vector param0 {9,68,51,31,14,73,51,75,98,83}; vector param1 {81,79,2,49,10,9,13,67,51,74}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (9,81,), (68,79,), (51,2,), (31,49,), (14,10,), (73,9,), (51,13,), (75,67,), (98,51,), (83,74,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_AREA_SQUARE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_AREA_SQUARE{ static int f_gold ( int side ) { int area = side * side ; return area ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(50); param0.add(64); param0.add(92); param0.add(23); param0.add(38); param0.add(55); param0.add(67); param0.add(56); param0.add(60); param0.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( side ) : area = side * side return area "," using namespace std; int f_gold ( int side ) { int area = side * side; return area; } int main() { int n_success = 0; vector param0 {50,64,92,23,38,55,67,56,60,90}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (50,), (64,), (92,), (23,), (38,), (55,), (67,), (56,), (60,), (90,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE{ static int f_gold ( int arr [ ] , int N , int K ) { Arrays . sort ( arr ) ; int dp [ ] = new int [ N ] ; dp [ 0 ] = 0 ; for ( int i = 1 ; i < N ; i ++ ) { dp [ i ] = dp [ i - 1 ] ; if ( arr [ i ] - arr [ i - 1 ] < K ) { if ( i >= 2 ) dp [ i ] = Math . max ( dp [ i ] , dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ) ; else dp [ i ] = Math . max ( dp [ i ] , arr [ i ] + arr [ i - 1 ] ) ; } } return dp [ N - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{48,53,67,78,78,93,95}); param0.add(new int[]{-2,52,18,70,32,88,-70,-32,72,30}); param0.add(new int[]{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}); param0.add(new int[]{98,84,13,61,58,90,45,89,45,80,3,5,57,86,40,80,60,51,60,73,67,10,52,56,60,36,34,60,75,63,23,86,51,68,86,13,71,86,99,6,42,2,39,82,16,5,23,47,12}); param0.add(new int[]{-84,-56,68,78}); param0.add(new int[]{0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,1,0}); param0.add(new int[]{1,2,3,9,12,12,16,17,18,19,20,21,21,26,29,42,44,45,48,48,48,54,54,55,60,63,63,64,64,67,67,68,69,74,78,78,79,83,95,95,95,96,97,99}); param0.add(new int[]{40,-48,-14,64,-58,60,-42,-56,54,28,-16,-92,42}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,25,96}); List param1 = new ArrayList<>(); param1.add(6); param1.add(8); param1.add(37); param1.add(31); param1.add(3); param1.add(14); param1.add(27); param1.add(9); param1.add(21); param1.add(1); List param2 = new ArrayList<>(); param2.add(4); param2.add(8); param2.add(31); param2.add(37); param2.add(3); param2.add(9); param2.add(42); param2.add(8); param2.add(19); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , N , K ) : arr.sort ( ) dp = [ 0 ] * N dp [ 0 ] = 0 for i in range ( 1 , N ) : dp [ i ] = dp [ i - 1 ] if ( arr [ i ] - arr [ i - 1 ] < K ) : if ( i >= 2 ) : dp [ i ] = max ( dp [ i ] , dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ) ; else : dp [ i ] = max ( dp [ i ] , arr [ i ] + arr [ i - 1 ] ) ; return dp [ N - 1 ] "," using namespace std; int f_gold ( int arr [ ], int N, int K ) { sort ( arr, arr + N ); int dp [ N ]; dp [ 0 ] = 0; for ( int i = 1; i < N; i ++ ) { dp [ i ] = dp [ i - 1 ]; if ( arr [ i ] - arr [ i - 1 ] < K ) { if ( i >= 2 ) dp [ i ] = max ( dp [ i ], dp [ i - 2 ] + arr [ i ] + arr [ i - 1 ] ); else dp [ i ] = max ( dp [ i ], arr [ i ] + arr [ i - 1 ] ); } } return dp [ N - 1 ]; } int main() { int n_success = 0; vector> param0 {{48,53,67,78,78,93,95},{-2,52,18,70,32,88,-70,-32,72,30},{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},{98,84,13,61,58,90,45,89,45,80,3,5,57,86,40,80,60,51,60,73,67,10,52,56,60,36,34,60,75,63,23,86,51,68,86,13,71,86,99,6,42,2,39,82,16,5,23,47,12},{-84,-56,68,78},{0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,1,0},{1,2,3,9,12,12,16,17,18,19,20,21,21,26,29,42,44,45,48,48,48,54,54,55,60,63,63,64,64,67,67,68,69,74,78,78,79,83,95,95,95,96,97,99},{40,-48,-14,64,-58,60,-42,-56,54,28,-16,-92,42},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{64,25,96}}; vector param1 {6,8,37,31,3,14,27,9,21,1}; vector param2 {4,8,31,37,3,9,42,8,19,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([48, 53, 67, 78, 78, 93, 95],6,4,), ([-2, 52, 18, 70, 32, 88, -70, -32, 72, 30],8,8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],37,31,), ([98, 84, 13, 61, 58, 90, 45, 89, 45, 80, 3, 5, 57, 86, 40, 80, 60, 51, 60, 73, 67, 10, 52, 56, 60, 36, 34, 60, 75, 63, 23, 86, 51, 68, 86, 13, 71, 86, 99, 6, 42, 2, 39, 82, 16, 5, 23, 47, 12],31,37,), ([-84, -56, 68, 78],3,3,), ([0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0],14,9,), ([1, 2, 3, 9, 12, 12, 16, 17, 18, 19, 20, 21, 21, 26, 29, 42, 44, 45, 48, 48, 48, 54, 54, 55, 60, 63, 63, 64, 64, 67, 67, 68, 69, 74, 78, 78, 79, 83, 95, 95, 95, 96, 97, 99],27,42,), ([40, -48, -14, 64, -58, 60, -42, -56, 54, 28, -16, -92, 42],9,8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],21,19,), ([64, 25, 96],1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class AREA_OF_THE_CIRCLE_THAT_HAS_A_SQUARE_AND_A_CIRCLE_INSCRIBED_IN_IT{ static float f_gold ( int a ) { float area = ( float ) ( Math . PI * a * a ) / 4 ; return area ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(77); param0.add(18); param0.add(83); param0.add(39); param0.add(68); param0.add(28); param0.add(71); param0.add(14); param0.add(21); param0.add(73); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( a ) : area = ( math.pi * a * a ) / 4 return area "," using namespace std; float f_gold ( int a ) { float area = ( M_PI * a * a ) / 4.0; return area; } int main() { int n_success = 0; vector param0 {77,18,83,39,68,28,71,14,21,73}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (77,), (18,), (83,), (39,), (68,), (28,), (71,), (14,), (21,), (73,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MULTIPLY_AN_INTEGER_WITH_3_5," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_AN_INTEGER_WITH_3_5{ static int f_gold ( int x ) { return ( x << 1 ) + x + ( x >> 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(58); param0.add(16); param0.add(82); param0.add(33); param0.add(88); param0.add(51); param0.add(81); param0.add(38); param0.add(79); param0.add(89); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : return ( x << 1 ) + x + ( x >> 1 ) "," using namespace std; int f_gold ( int x ) { return ( x << 1 ) + x + ( x >> 1 ); } int main() { int n_success = 0; vector param0 {58,16,82,33,88,51,81,38,79,89}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (58,), (16,), (82,), (33,), (88,), (51,), (81,), (38,), (79,), (89,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_SUBSEQUENCE_LEAST_K_DISTANT_ELEMENTS{ static int f_gold ( int arr [ ] , int N , int k ) { int MS [ ] = new int [ N ] ; MS [ N - 1 ] = arr [ N - 1 ] ; for ( int i = N - 2 ; i >= 0 ; i -- ) { if ( i + k + 1 >= N ) MS [ i ] = Math . max ( arr [ i ] , MS [ i + 1 ] ) ; else MS [ i ] = Math . max ( arr [ i ] + MS [ i + k + 1 ] , MS [ i + 1 ] ) ; } return MS [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,5,20,21,23,26,27,31,33,38,39,41,48,48,50,51,56,57,64,68,69,70,71,74,76,86,97}); param0.add(new int[]{32,34,-40,90,-82,-70,30,26,-76,-46,-84,76,-76}); param0.add(new int[]{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}); param0.add(new int[]{96,15,30,25,83}); param0.add(new int[]{-90,-82,-80,-76,-62,-58,-50,-48,-46,-38,-38,-38,-38,-38,-34,-32,-24,-22,-16,-16,-4,-2,10,10,20,26,26,32,38,38,44,44,46,48,58,62,64,66,76,78,78,82,92,96,96,98}); param0.add(new int[]{1,1,1,1,1,0,0,0,0,1,1,1,0,1,0,0,1,0,0}); param0.add(new int[]{1,2,9,17,24,31,31,33,56,57,61,71,73,74,76,77,79,83,86,95,99}); param0.add(new int[]{-12,52,-44,80,-66,34,42,-46,8,12,-22,-56,74,-98,-44,2,-24,-14,-54,-56,-26,-18,-72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{65,1,34,38,15,6,55,21,32,90,39,25,43,48,64,66,88,70,82,75,25,56,23,27,41,33,33,55,60,90,41,58,42,53,38,90,7,15}); List param1 = new ArrayList<>(); param1.add(23); param1.add(9); param1.add(22); param1.add(2); param1.add(27); param1.add(9); param1.add(12); param1.add(13); param1.add(13); param1.add(37); List param2 = new ArrayList<>(); param2.add(15); param2.add(10); param2.add(34); param2.add(3); param2.add(30); param2.add(9); param2.add(10); param2.add(19); param2.add(13); param2.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , N , k ) : MS = [ 0 for i in range ( N ) ] MS [ N - 1 ] = arr [ N - 1 ] for i in range ( N - 2 , - 1 , - 1 ) : if ( i + k + 1 >= N ) : MS [ i ] = max ( arr [ i ] , MS [ i + 1 ] ) else : MS [ i ] = max ( arr [ i ] + MS [ i + k + 1 ] , MS [ i + 1 ] ) return MS [ 0 ] "," using namespace std; int f_gold ( int arr [ ], int N, int k ) { int MS [ N ]; MS [ N - 1 ] = arr [ N - 1 ]; for ( int i = N - 2; i >= 0; i -- ) { if ( i + k + 1 >= N ) MS [ i ] = max ( arr [ i ], MS [ i + 1 ] ); else MS [ i ] = max ( arr [ i ] + MS [ i + k + 1 ], MS [ i + 1 ] ); } return MS [ 0 ]; } int main() { int n_success = 0; vector> param0 {{3,5,20,21,23,26,27,31,33,38,39,41,48,48,50,51,56,57,64,68,69,70,71,74,76,86,97},{32,34,-40,90,-82,-70,30,26,-76,-46,-84,76,-76},{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},{96,15,30,25,83},{-90,-82,-80,-76,-62,-58,-50,-48,-46,-38,-38,-38,-38,-38,-34,-32,-24,-22,-16,-16,-4,-2,10,10,20,26,26,32,38,38,44,44,46,48,58,62,64,66,76,78,78,82,92,96,96,98},{1,1,1,1,1,0,0,0,0,1,1,1,0,1,0,0,1,0,0},{1,2,9,17,24,31,31,33,56,57,61,71,73,74,76,77,79,83,86,95,99},{-12,52,-44,80,-66,34,42,-46,8,12,-22,-56,74,-98,-44,2,-24,-14,-54,-56,-26,-18,-72},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{65,1,34,38,15,6,55,21,32,90,39,25,43,48,64,66,88,70,82,75,25,56,23,27,41,33,33,55,60,90,41,58,42,53,38,90,7,15}}; vector param1 {23,9,22,2,27,9,12,13,13,37}; vector param2 {15,10,34,3,30,9,10,19,13,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 5, 20, 21, 23, 26, 27, 31, 33, 38, 39, 41, 48, 48, 50, 51, 56, 57, 64, 68, 69, 70, 71, 74, 76, 86, 97],23,15,), ([32, 34, -40, 90, -82, -70, 30, 26, -76, -46, -84, 76, -76],9,10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,34,), ([96, 15, 30, 25, 83],2,3,), ([-90, -82, -80, -76, -62, -58, -50, -48, -46, -38, -38, -38, -38, -38, -34, -32, -24, -22, -16, -16, -4, -2, 10, 10, 20, 26, 26, 32, 38, 38, 44, 44, 46, 48, 58, 62, 64, 66, 76, 78, 78, 82, 92, 96, 96, 98],27,30,), ([1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0],9,9,), ([1, 2, 9, 17, 24, 31, 31, 33, 56, 57, 61, 71, 73, 74, 76, 77, 79, 83, 86, 95, 99],12,10,), ([-12, 52, -44, 80, -66, 34, 42, -46, 8, 12, -22, -56, 74, -98, -44, 2, -24, -14, -54, -56, -26, -18, -72],13,19,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,13,), ([65, 1, 34, 38, 15, 6, 55, 21, 32, 90, 39, 25, 43, 48, 64, 66, 88, 70, 82, 75, 25, 56, 23, 27, 41, 33, 33, 55, 60, 90, 41, 58, 42, 53, 38, 90, 7, 15],37,33,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_28_MINIMUM_INSERTIONS_TO_FORM_A_PALINDROME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_28_MINIMUM_INSERTIONS_TO_FORM_A_PALINDROME{ static int f_gold ( char str [ ] , int l , int h ) { if ( l > h ) return Integer . MAX_VALUE ; if ( l == h ) return 0 ; if ( l == h - 1 ) return ( str [ l ] == str [ h ] ) ? 0 : 1 ; return ( str [ l ] == str [ h ] ) ? f_gold ( str , l + 1 , h - 1 ) : ( Integer . min ( f_gold ( str , l , h - 1 ) , f_gold ( str , l + 1 , h ) ) + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'F','F','J','K','K','L','P','S','T','V','W','Y','b','d','j','l','t','u','x','y'}); param0.add(new char[]{'0','1','8','8','8','4','4','3','9','6','5','2','8','2','0','2','6','0','7','7','3','2','4','5','9','7','2','4','1','8','7','9','8','0','8','5','4','2','3'}); param0.add(new char[]{'1'}); param0.add(new char[]{'g','y','r','M','v','z',' ','k','S','P','x','p','E','z','T','K','k','B','s','P','p','e','G','t','r','M','p',' ','H','a'}); param0.add(new char[]{'0','1','1','1','1','1','1','2','2','2','2','3','3','3','3','3','4','4','4','5','5','5','5','5','6','6','6','6','6','6','6','7','8','8','8','9','9'}); param0.add(new char[]{'1','1','0','1','0','1','0','1','0','1','1','1','1','1','1','0'}); param0.add(new char[]{' ',' ',' ','B','C','C','D','I','K','O','P','R','T','V','W','a','b','d','j','y'}); param0.add(new char[]{'5','0','8','6','9','3','0','3','2','0','6','2','3','7','8','9','2','0','1','9','4','1','3','1','9','2','3','4','1','2','3','8','1'}); param0.add(new char[]{'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'}); param0.add(new char[]{'X','B','E','v','K','t','k','K','Q','s','V','N','l','k','T','N','J','z','f','p','J','g','S','P','M','b','H','L','v','E','A','n','D','U','c','s','M','Q','P','g','g',' '}); List param1 = new ArrayList<>(); param1.add(11); param1.add(19); param1.add(0); param1.add(24); param1.add(33); param1.add(13); param1.add(16); param1.add(31); param1.add(37); param1.add(26); List param2 = new ArrayList<>(); param2.add(11); param2.add(22); param2.add(0); param2.add(27); param2.add(34); param2.add(8); param2.add(14); param2.add(25); param2.add(35); param2.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( str , l , h ) : if ( l > h ) : return sys.maxsize if ( l == h ) : return 0 if ( l == h - 1 ) : return 0 if ( str [ l ] == str [ h ] ) else 1 if ( str [ l ] == str [ h ] ) : return f_gold ( str , l + 1 , h - 1 ) else : return ( min ( f_gold ( str , l , h - 1 ) , f_gold ( str , l + 1 , h ) ) + 1 ) "," using namespace std; int f_gold ( char str [ ], int l, int h ) { if ( l > h ) return INT_MAX; if ( l == h ) return 0; if ( l == h - 1 ) return ( str [ l ] == str [ h ] ) ? 0 : 1; return ( str [ l ] == str [ h ] ) ? f_gold ( str, l + 1, h - 1 ) : ( min ( f_gold ( str, l, h - 1 ), f_gold ( str, l + 1, h ) ) + 1 ); } int main() { int n_success = 0; vector> param0 {{'F','F','J','K','K','L','P','S','T','V','W','Y','b','d','j','l','t','u','x','y'},{'0','1','8','8','8','4','4','3','9','6','5','2','8','2','0','2','6','0','7','7','3','2','4','5','9','7','2','4','1','8','7','9','8','0','8','5','4','2','3'},{'1'},{'g','y','r','M','v','z',' ','k','S','P','x','p','E','z','T','K','k','B','s','P','p','e','G','t','r','M','p',' ','H','a'},{'0','1','1','1','1','1','1','2','2','2','2','3','3','3','3','3','4','4','4','5','5','5','5','5','6','6','6','6','6','6','6','7','8','8','8','9','9'},{'1','1','0','1','0','1','0','1','0','1','1','1','1','1','1','0'},{' ',' ',' ','B','C','C','D','I','K','O','P','R','T','V','W','a','b','d','j','y'},{'5','0','8','6','9','3','0','3','2','0','6','2','3','7','8','9','2','0','1','9','4','1','3','1','9','2','3','4','1','2','3','8','1'},{'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'},{'X','B','E','v','K','t','k','K','Q','s','V','N','l','k','T','N','J','z','f','p','J','g','S','P','M','b','H','L','v','E','A','n','D','U','c','s','M','Q','P','g','g',' '}}; vector param1 {11,19,0,24,33,13,16,31,37,26}; vector param2 {11,22,0,27,34,8,14,25,35,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (['F', 'F', 'J', 'K', 'K', 'L', 'P', 'S', 'T', 'V', 'W', 'Y', 'b', 'd', 'j', 'l', 't', 'u', 'x', 'y'],11,11,), (['0', '1', '8', '8', '8', '4', '4', '3', '9', '6', '5', '2', '8', '2', '0', '2', '6', '0', '7', '7', '3', '2', '4', '5', '9', '7', '2', '4', '1', '8', '7', '9', '8', '0', '8', '5', '4', '2', '3'],19,22,), (['1'],0,0,), (['g', 'y', 'r', 'M', 'v', 'z', ' ', 'k', 'S', 'P', 'x', 'p', 'E', 'z', 'T', 'K', 'k', 'B', 's', 'P', 'p', 'e', 'G', 't', 'r', 'M', 'p', ' ', 'H', 'a'],24,27,), (['0', '1', '1', '1', '1', '1', '1', '2', '2', '2', '2', '3', '3', '3', '3', '3', '4', '4', '4', '5', '5', '5', '5', '5', '6', '6', '6', '6', '6', '6', '6', '7', '8', '8', '8', '9', '9'],33,34,), (['1', '1', '0', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '1', '0'],13,8,), ([' ', ' ', ' ', 'B', 'C', 'C', 'D', 'I', 'K', 'O', 'P', 'R', 'T', 'V', 'W', 'a', 'b', 'd', 'j', 'y'],16,14,), (['5', '0', '8', '6', '9', '3', '0', '3', '2', '0', '6', '2', '3', '7', '8', '9', '2', '0', '1', '9', '4', '1', '3', '1', '9', '2', '3', '4', '1', '2', '3', '8', '1'],31,25,), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],37,35,), (['X', 'B', 'E', 'v', 'K', 't', 'k', 'K', 'Q', 's', 'V', 'N', 'l', 'k', 'T', 'N', 'J', 'z', 'f', 'p', 'J', 'g', 'S', 'P', 'M', 'b', 'H', 'L', 'v', 'E', 'A', 'n', 'D', 'U', 'c', 's', 'M', 'Q', 'P', 'g', 'g', ' '],26,27,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SEARCH_ALMOST_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_ALMOST_SORTED_ARRAY{ static int f_gold ( int arr [ ] , int l , int r , int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2 ; if ( arr [ mid ] == x ) return mid ; if ( mid > l && arr [ mid - 1 ] == x ) return ( mid - 1 ) ; if ( mid < r && arr [ mid + 1 ] == x ) return ( mid + 1 ) ; if ( arr [ mid ] > x ) return f_gold ( arr , l , mid - 2 , x ) ; return f_gold ( arr , mid + 2 , r , x ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,7,15,42,47,54,56,59,59,64,68,70,71,75,91,93}); param0.add(new int[]{6,7,15,42,47,56,54,59,59,64,68,71,70, 75,91,93}); param0.add(new int[]{-92,-96,-68,-40,70}); param0.add(new int[]{-92,-86,-68,-40,70}); param0.add(new int[]{-3,-1,0,30,10,45,70,60}); param0.add(new int[]{-3,-1,0,10,5,45,60,50}); param0.add(new int[]{-3,-1,0,10,30,45,60,70}); param0.add(new int[]{0,0,1}); param0.add(new int[]{1,1,1}); param0.add(new int[]{30,2,30,45}); List param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); List param2 = new ArrayList<>(); param2.add(15); param2.add(15); param2.add(4); param2.add(4); param2.add(7); param2.add(7); param2.add(7); param2.add(2); param2.add(2); param2.add(3); List param3 = new ArrayList<>(); param3.add(71); param3.add(71); param3.add(-96); param3.add(20); param3.add(0); param3.add(12); param3.add(18); param3.add(20); param3.add(17); param3.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( arr , l , r , x ) : if ( r >= l ) : mid = int ( l + ( r - l ) / 2 ) if ( arr [ mid ] == x ) : return mid if ( mid > l and arr [ mid - 1 ] == x ) : return ( mid - 1 ) if ( mid < r and arr [ mid + 1 ] == x ) : return ( mid + 1 ) if ( arr [ mid ] > x ) : return f_gold ( arr , l , mid - 2 , x ) return f_gold ( arr , mid + 2 , r , x ) return - 1 "," using namespace std; int f_gold ( int arr [ ], int l, int r, int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2; if ( arr [ mid ] == x ) return mid; if ( mid > l && arr [ mid - 1 ] == x ) return ( mid - 1 ); if ( mid < r && arr [ mid + 1 ] == x ) return ( mid + 1 ); if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 2, x ); return f_gold ( arr, mid + 2, r, x ); } return - 1; } int main() { int n_success = 0; vector> param0 {{6,7,15,42,47,54,56,59,59,64,68,70,71,75,91,93},{6,7,15,42,47,56,54,59,59,64,68,71,70, 75,91,93},{-92,-96,-68,-40,70},{-92,-86,-68,-40,70},{-3,-1,0,30,10,45,70,60},{-3,-1,0,10,5,45,60,50},{-3,-1,0,10,30,45,60,70},{0,0,1},{1,1,1},{30,2,30,45}}; vector param1 {0,0,0,0,0,0,0,0,0,0}; vector param2 {15,15,4,4,7,7,7,2,2,3}; vector param3 {71,71,-96,20,0,12,18,20,17,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([6,7,15,42,47,54,56,59,59,64,68,70,71,75,91,93], 0, 15, 71), ([6,7,15,42,47,56,54,59,59,64,68,71,70, 75,91,93], 0, 15, 71), ([-92,-96,-68,-40,70], 0, 4, , -96), ([-92,-86,-68,-40,70], 0, 4, 20), ([-3,-1,0,30,10,45,70,60], 0, 7, 0), ([-3,-1,0,10,5,45,60,50], 0, 7, 12), ([-3,-1,0,10,30,45,60,70], 0, 7, 18), ([0,0,1], 0, 2, 20), ([1,1,1], 0, 2, 17), ([30,2,30,45], 0, 3, 28) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", SUM_SERIES_555555_N_TERMS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SERIES_555555_N_TERMS{ static int f_gold ( int n ) { return ( int ) ( 0.6172 * ( Math . pow ( 10 , n ) - 1 ) - 0.55 * n ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(18); param0.add(81); param0.add(77); param0.add(84); param0.add(87); param0.add(14); param0.add(15); param0.add(3); param0.add(21); param0.add(60); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( int ) ( 0.6172 * ( pow ( 10 , n ) - 1 ) - 0.55 * n ) "," using namespace std; int f_gold ( int n ) { return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n; } int main() { int n_success = 0; vector param0 {18,81,77,84,87,14,15,3,21,60}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (18,), (81,), (77,), (84,), (87,), (14,), (15,), (3,), (21,), (60,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_SUBSETS_SET_FORMED_FIRST_N_NATURAL_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SUBSETS_SET_FORMED_FIRST_N_NATURAL_NUMBERS{ static long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(76); param0.add(26); param0.add(45); param0.add(35); param0.add(34); param0.add(22); param0.add(3); param0.add(25); param0.add(22); param0.add(78); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ) "," using namespace std; unsigned long long f_gold ( int n ) { return ( n * ( n + 1 ) / 2 ) * ( 1 << ( n - 1 ) ); } int main() { int n_success = 0; vector param0 {76,26,45,35,34,22,3,25,22,78}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (76,), (26,), (45,), (35,), (34,), (22,), (3,), (25,), (22,), (78,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_1{ static int f_gold ( int num , int divisor ) { if ( divisor == 0 ) { System . out . println ( ""Error: divisor "" + ""can't be zero \n"" ) ; return - 1 ; } if ( divisor < 0 ) divisor = - divisor ; if ( num < 0 ) num = - num ; int i = 1 ; int product = 0 ; while ( product <= num ) { product = divisor * i ; i ++ ; } return num - ( product - divisor ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(34); param0.add(63); param0.add(15); param0.add(56); param0.add(63); param0.add(28); param0.add(54); param0.add(2); param0.add(94); param0.add(82); List param1 = new ArrayList<>(); param1.add(55); param1.add(22); param1.add(26); param1.add(58); param1.add(94); param1.add(45); param1.add(97); param1.add(58); param1.add(91); param1.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num , divisor ) : if ( divisor == 0 ) : return False if ( divisor < 0 ) : divisor = - divisor if ( num < 0 ) : num = - num i = 1 product = 0 while ( product <= num ) : product = divisor * i i += 1 return num - ( product - divisor ) "," using namespace std; int f_gold ( int num, int divisor ) { if ( divisor == 0 ) { cout << ""Error: divisor can't be zero \n""; return - 1; } if ( divisor < 0 ) divisor = - divisor; if ( num < 0 ) num = - num; int i = 1; int product = 0; while ( product <= num ) { product = divisor * i; i ++; } return num - ( product - divisor ); } int main() { int n_success = 0; vector param0 {34,63,15,56,63,28,54,2,94,82}; vector param1 {55,22,26,58,94,45,97,58,91,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (34,55,), (63,22,), (15,26,), (56,58,), (63,94,), (28,45,), (54,97,), (2,58,), (94,91,), (82,40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COMPOSITE_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPOSITE_NUMBER{ static boolean f_gold ( int n ) { if ( n <= 1 ) System . out . println ( ""False"" ) ; if ( n <= 3 ) System . out . println ( ""False"" ) ; if ( n % 2 == 0 || n % 3 == 0 ) return true ; for ( int i = 5 ; i * i <= n ; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(62); param0.add(13); param0.add(29); param0.add(72); param0.add(30); param0.add(20); param0.add(10); param0.add(47); param0.add(91); param0.add(52); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n <= 1 ) : return False if ( n <= 3 ) : return False if ( n % 2 == 0 or n % 3 == 0 ) : return True i = 5 while ( i * i <= n ) : if ( n % i == 0 or n % ( i + 2 ) == 0 ) : return True i = i + 6 return False "," using namespace std; bool f_gold ( int n ) { if ( n <= 1 ) return false; if ( n <= 3 ) return false; if ( n % 2 == 0 || n % 3 == 0 ) return true; for ( int i = 5; i * i <= n; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true; return false; } int main() { int n_success = 0; vector param0 {62,13,29,72,30,20,10,47,91,52}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (62,), (13,), (29,), (72,), (30,), (20,), (10,), (47,), (91,), (52,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_PAGE_REPLACEMENT_ALGORITHMS_SET_2_FIFO," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_PAGE_REPLACEMENT_ALGORITHMS_SET_2_FIFO{ static int f_gold ( int pages [ ] , int n , int capacity ) { HashSet < Integer > s = new HashSet < > ( capacity ) ; Queue < Integer > indexes = new LinkedList < > ( ) ; int page_faults = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s . size ( ) < capacity ) { if ( ! s . contains ( pages [ i ] ) ) { s . add ( pages [ i ] ) ; page_faults ++ ; indexes . add ( pages [ i ] ) ; } } else { if ( ! s . contains ( pages [ i ] ) ) { int val = indexes . peek ( ) ; indexes . poll ( ) ; s . remove ( val ) ; s . add ( pages [ i ] ) ; indexes . add ( pages [ i ] ) ; page_faults ++ ; } } } return page_faults ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,4,6,7,8,11,13,18,26,35,36,37,45,46,46,47,48,49,51,52,53,56,61,74,75,77,80,83,85,86,87,90,93,95,97,98,99,99}); param0.add(new int[]{78,-48,50,-20,-6,58,-8,66,72,68,4,80,58,-26,-82,-56,92,76,20,82,-46,86,38,60,-62,-48,76,8,-66,-4,-98,-96,-52,92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{98,78,94,42,62,83,7,62,60,94,16,28,50,15,18,71,86,47,62,89}); param0.add(new int[]{-82,-70,-68,-56,-50,-44,4,18,28,30,30,42,66,78,80}); param0.add(new int[]{1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,0}); param0.add(new int[]{4,5,13,15,18,28,32,40,46,46,55,57,61,63,65,68,77,79,79,96}); param0.add(new int[]{-2,82,2,-74,-6,-24,54,-74,-98,8,-94,-60,-42,-38,36,-38,-58,-70,-28,-34,70,-6,-2,-76,-40,-4,0,-4,76,48,-34,-26,-48,-58,-88,-44,20,-22,78}); param0.add(new int[]{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}); param0.add(new int[]{4,90,28,71,69,45,92,63,72,76,47,85,36,59,88,46,28,19,50,31,63,13}); List param1 = new ArrayList<>(); param1.add(36); param1.add(33); param1.add(19); param1.add(15); param1.add(9); param1.add(25); param1.add(17); param1.add(31); param1.add(26); param1.add(15); List param2 = new ArrayList<>(); param2.add(37); param2.add(23); param2.add(13); param2.add(11); param2.add(11); param2.add(25); param2.add(18); param2.add(24); param2.add(24); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","from queue import Queue def f_gold ( pages , n , capacity ) : s = set ( ) indexes = Queue ( ) page_faults = 0 for i in range ( n ) : if ( len ( s ) < capacity ) : if ( pages [ i ] not in s ) : s.add ( pages [ i ] ) page_faults += 1 indexes.put ( pages [ i ] ) else : if ( pages [ i ] not in s ) : val = indexes.queue [ 0 ] indexes.get ( ) s.remove ( val ) s.add ( pages [ i ] ) indexes.put ( pages [ i ] ) page_faults += 1 return page_faults "," using namespace std; int f_gold ( int pages [ ], int n, int capacity ) { unordered_set < int > s; queue < int > indexes; int page_faults = 0; for ( int i = 0; i < n; i ++ ) { if ( s . size ( ) < capacity ) { if ( s . find ( pages [ i ] ) == s . end ( ) ) { s . insert ( pages [ i ] ); page_faults ++; indexes . push ( pages [ i ] ); } } else { if ( s . find ( pages [ i ] ) == s . end ( ) ) { int val = indexes . front ( ); indexes . pop ( ); s . erase ( val ); s . insert ( pages [ i ] ); indexes . push ( pages [ i ] ); page_faults ++; } } } return page_faults; } int main() { int n_success = 0; vector> param0 {{4,4,6,7,8,11,13,18,26,35,36,37,45,46,46,47,48,49,51,52,53,56,61,74,75,77,80,83,85,86,87,90,93,95,97,98,99,99},{78,-48,50,-20,-6,58,-8,66,72,68,4,80,58,-26,-82,-56,92,76,20,82,-46,86,38,60,-62,-48,76,8,-66,-4,-98,-96,-52,92},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{98,78,94,42,62,83,7,62,60,94,16,28,50,15,18,71,86,47,62,89},{-82,-70,-68,-56,-50,-44,4,18,28,30,30,42,66,78,80},{1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,0},{4,5,13,15,18,28,32,40,46,46,55,57,61,63,65,68,77,79,79,96},{-2,82,2,-74,-6,-24,54,-74,-98,8,-94,-60,-42,-38,36,-38,-58,-70,-28,-34,70,-6,-2,-76,-40,-4,0,-4,76,48,-34,-26,-48,-58,-88,-44,20,-22,78},{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},{4,90,28,71,69,45,92,63,72,76,47,85,36,59,88,46,28,19,50,31,63,13}}; vector param1 {36,33,19,15,9,25,17,31,26,15}; vector param2 {37,23,13,11,11,25,18,24,24,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 4, 6, 7, 8, 11, 13, 18, 26, 35, 36, 37, 45, 46, 46, 47, 48, 49, 51, 52, 53, 56, 61, 74, 75, 77, 80, 83, 85, 86, 87, 90, 93, 95, 97, 98, 99, 99],36,37,), ([78, -48, 50, -20, -6, 58, -8, 66, 72, 68, 4, 80, 58, -26, -82, -56, 92, 76, 20, 82, -46, 86, 38, 60, -62, -48, 76, 8, -66, -4, -98, -96, -52, 92],33,23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,13,), ([98, 78, 94, 42, 62, 83, 7, 62, 60, 94, 16, 28, 50, 15, 18, 71, 86, 47, 62, 89],15,11,), ([-82, -70, -68, -56, -50, -44, 4, 18, 28, 30, 30, 42, 66, 78, 80],9,11,), ([1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0],25,25,), ([4, 5, 13, 15, 18, 28, 32, 40, 46, 46, 55, 57, 61, 63, 65, 68, 77, 79, 79, 96],17,18,), ([-2, 82, 2, -74, -6, -24, 54, -74, -98, 8, -94, -60, -42, -38, 36, -38, -58, -70, -28, -34, 70, -6, -2, -76, -40, -4, 0, -4, 76, 48, -34, -26, -48, -58, -88, -44, 20, -22, 78],31,24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,24,), ([4, 90, 28, 71, 69, 45, 92, 63, 72, 76, 47, 85, 36, 59, 88, 46, 28, 19, 50, 31, 63, 13],15,12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_TRIPLET_SUM_ARRAY_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_TRIPLET_SUM_ARRAY_2{ static int f_gold ( int arr [ ] , int n ) { int maxA = - 100000000 , maxB = - 100000000 ; int maxC = - 100000000 ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] > maxA ) { maxC = maxB ; maxB = maxA ; maxA = arr [ i ] ; } else if ( arr [ i ] > maxB ) { maxC = maxB ; maxB = arr [ i ] ; } else if ( arr [ i ] > maxC ) maxC = arr [ i ] ; } return ( maxA + maxB + maxC ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,7,12,21,22,25,27,28,28,31,32,32,41,45,47,51,53,60,61,61,63,71,74,82,83,85,88,92,96,96}); param0.add(new int[]{-52,26,74,-62,-76}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{63,71,15,28,31,84,8,17,24,42,66,95,30}); param0.add(new int[]{-94,-92,-92,-90,-88,-88,-86,-82,-80,-78,-66,-54,-52,-52,-46,-46,-42,-36,-32,-24,-24,-14,-14,-14,-12,-10,0,6,8,20,24,24,28,38,38,52,54,56,64,74,74,76,82,94,94}); param0.add(new int[]{0,0,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,1,0,0,0,1,0}); param0.add(new int[]{15,19,80}); param0.add(new int[]{4,80,18,74,36,-30,-72,-28,-32,-16,-8,38,78,-48,98,-64,86,-60,-44,84,-98,40,14,30,44,90,-30,-42,24,-28,24,40,-96,98,90,-68,-54,-52,62,34,-98,68,-56,-94,-78,-12,28}); param0.add(new int[]{0,1,1,1,1,1}); param0.add(new int[]{2,18,96,7,99,83,3,88,23,77,6,28,55,49,69,55,48,76,43,11,43,44,17,74,27,64,76,77,53,26,73,12,19,62,18,34,13,31,97,96,85,27,30,97,89,25}); List param1 = new ArrayList<>(); param1.add(28); param1.add(2); param1.add(11); param1.add(6); param1.add(31); param1.add(30); param1.add(2); param1.add(41); param1.add(3); param1.add(41); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : maxA = - 100000000 maxB = - 100000000 maxC = - 100000000 for i in range ( 0 , n ) : if ( arr [ i ] > maxA ) : maxC = maxB maxB = maxA maxA = arr [ i ] elif ( arr [ i ] > maxB ) : maxC = maxB maxB = arr [ i ] elif ( arr [ i ] > maxC ) : maxC = arr [ i ] return ( maxA + maxB + maxC ) "," using namespace std; int f_gold ( int arr [ ], int n ) { int maxA = INT_MIN, maxB = INT_MIN, maxC = INT_MIN; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] > maxA ) { maxC = maxB; maxB = maxA; maxA = arr [ i ]; } else if ( arr [ i ] > maxB ) { maxC = maxB; maxB = arr [ i ]; } else if ( arr [ i ] > maxC ) maxC = arr [ i ]; } return ( maxA + maxB + maxC ); } int main() { int n_success = 0; vector> param0 {{4,7,12,21,22,25,27,28,28,31,32,32,41,45,47,51,53,60,61,61,63,71,74,82,83,85,88,92,96,96},{-52,26,74,-62,-76},{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{63,71,15,28,31,84,8,17,24,42,66,95,30},{-94,-92,-92,-90,-88,-88,-86,-82,-80,-78,-66,-54,-52,-52,-46,-46,-42,-36,-32,-24,-24,-14,-14,-14,-12,-10,0,6,8,20,24,24,28,38,38,52,54,56,64,74,74,76,82,94,94},{0,0,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,1,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,1,0,0,0,1,0},{15,19,80},{4,80,18,74,36,-30,-72,-28,-32,-16,-8,38,78,-48,98,-64,86,-60,-44,84,-98,40,14,30,44,90,-30,-42,24,-28,24,40,-96,98,90,-68,-54,-52,62,34,-98,68,-56,-94,-78,-12,28},{0,1,1,1,1,1},{2,18,96,7,99,83,3,88,23,77,6,28,55,49,69,55,48,76,43,11,43,44,17,74,27,64,76,77,53,26,73,12,19,62,18,34,13,31,97,96,85,27,30,97,89,25}}; vector param1 {28,2,11,6,31,30,2,41,3,41}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 7, 12, 21, 22, 25, 27, 28, 28, 31, 32, 32, 41, 45, 47, 51, 53, 60, 61, 61, 63, 71, 74, 82, 83, 85, 88, 92, 96, 96],28,), ([-52, 26, 74, -62, -76],2,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,), ([63, 71, 15, 28, 31, 84, 8, 17, 24, 42, 66, 95, 30],6,), ([-94, -92, -92, -90, -88, -88, -86, -82, -80, -78, -66, -54, -52, -52, -46, -46, -42, -36, -32, -24, -24, -14, -14, -14, -12, -10, 0, 6, 8, 20, 24, 24, 28, 38, 38, 52, 54, 56, 64, 74, 74, 76, 82, 94, 94],31,), ([0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0],30,), ([15, 19, 80],2,), ([4, 80, 18, 74, 36, -30, -72, -28, -32, -16, -8, 38, 78, -48, 98, -64, 86, -60, -44, 84, -98, 40, 14, 30, 44, 90, -30, -42, 24, -28, 24, 40, -96, 98, 90, -68, -54, -52, 62, 34, -98, 68, -56, -94, -78, -12, 28],41,), ([0, 1, 1, 1, 1, 1],3,), ([2, 18, 96, 7, 99, 83, 3, 88, 23, 77, 6, 28, 55, 49, 69, 55, 48, 76, 43, 11, 43, 44, 17, 74, 27, 64, 76, 77, 53, 26, 73, 12, 19, 62, 18, 34, 13, 31, 97, 96, 85, 27, 30, 97, 89, 25],41,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CALCULATE_AREA_OCTAGON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CALCULATE_AREA_OCTAGON{ static double f_gold ( double side ) { return ( float ) ( 2 * ( 1 + Math . sqrt ( 2 ) ) * side * side ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(5859.798616323926); param0.add(-6381.210375893524); param0.add(2442.246292006922); param0.add(-9624.81536339737); param0.add(8679.436805247444); param0.add(-2682.3245401089525); param0.add(7216.9161613024435); param0.add(-5881.789859815442); param0.add(2497.776395789202); param0.add(-9598.912195459263); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( side ) : return ( 2 * ( 1 + ( math.sqrt ( 2 ) ) ) * side * side ) "," using namespace std; double f_gold ( double side ) { return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side ); } int main() { int n_success = 0; vector param0 {5859.798616323926,-6381.210375893524,2442.246292006922,-9624.81536339737,8679.436805247444,-2682.3245401089525,7216.9161613024435,-5881.789859815442,2497.776395789202,-9598.912195459263}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (5859.798616323926,), (-6381.210375893524,), (2442.246292006922,), (-9624.81536339737,), (8679.436805247444,), (-2682.3245401089525,), (7216.9161613024435,), (-5881.789859815442,), (2497.776395789202,), (-9598.912195459263,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CALCULATE_VOLUME_OCTAHEDRON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CALCULATE_VOLUME_OCTAHEDRON{ static double f_gold ( double side ) { return ( ( side * side * side ) * ( Math . sqrt ( 2 ) / 3 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(3355.322051344013); param0.add(-891.0551553192736); param0.add(8242.699647177868); param0.add(-9259.146104439229); param0.add(7712.806145993083); param0.add(-4998.858862079315); param0.add(9771.127582524628); param0.add(-5415.8106399098115); param0.add(670.0774772280249); param0.add(-7068.634369272122); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( side ) : return ( ( side * side * side ) * ( math.sqrt ( 2 ) / 3 ) ) "," using namespace std; double f_gold ( double side ) { return ( ( side * side * side ) * ( sqrt ( 2 ) / 3 ) ); } int main() { int n_success = 0; vector param0 {3355.322051344013,-891.0551553192736,8242.699647177868,-9259.146104439229,7712.806145993083,-4998.858862079315,9771.127582524628,-5415.8106399098115,670.0774772280249,-7068.634369272122}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (3355.322051344013,), (-891.0551553192736,), (8242.699647177868,), (-9259.146104439229,), (7712.806145993083,), (-4998.858862079315,), (9771.127582524628,), (-5415.8106399098115,), (670.0774772280249,), (-7068.634369272122,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY{ static int f_gold ( int arr [ ] , int low , int high , int key ) { if ( high < low ) return - 1 ; int mid = ( low + high ) / 2 ; if ( key == arr [ mid ] ) return mid ; if ( key > arr [ mid ] ) return f_gold ( arr , ( mid + 1 ) , high , key ) ; return f_gold ( arr , low , ( mid - 1 ) , key ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,10,73,91,98}); param0.add(new int[]{30,24,24,-8,64,50,46,-76,26,8,-92,-78,40,-86,96,14,60,38,6,-72,-6,-20,26,-26,0,2}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{30,79,3,76,18}); param0.add(new int[]{-96,-90,-88,-84,-78,-78,-70,-68,-66,-66,-64,-64,-58,-56,-52,-42,-40,-38,-36,-30,-30,-28,-14,-8,0,14,16,22,24,26,36,40,40,48,48,50,52,54,54,58,64,74,82,88,94}); param0.add(new int[]{1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1}); param0.add(new int[]{2,8,8,14,15,16,17,17,18,18,24,25,25,26,36,37,39,39,40,44,46,47,51,54,56,57,57,61,61,67,68,69,72,76,77,81,82,82,82,85,85,87,94,94,98,99}); param0.add(new int[]{-4,84,20,-84,-6,-78,20,56,40,0,98,80,-94,36,-6,-98,50,66,-12,-58,-34,68,-80,-30,-82,-76,-38,-60,92,94,48,-84,20,-66,-32,-92,16,-96,-68,94,-46,30,32,-34,96,-92,-96,-86,-22}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{71,70,13,18,70,62,88,27,17,44,89,28,74,41,20,91,95,79,40,43,38,20,5}); List param1 = new ArrayList<>(); param1.add(2); param1.add(20); param1.add(30); param1.add(3); param1.add(35); param1.add(25); param1.add(33); param1.add(34); param1.add(19); param1.add(21); List param2 = new ArrayList<>(); param2.add(4); param2.add(13); param2.add(27); param2.add(2); param2.add(30); param2.add(26); param2.add(40); param2.add(27); param2.add(13); param2.add(22); List param3 = new ArrayList<>(); param3.add(4); param3.add(21); param3.add(29); param3.add(2); param3.add(40); param3.add(30); param3.add(26); param3.add(34); param3.add(19); param3.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , low , high , key ) : if ( high < low ) : return - 1 mid = ( low + high ) / 2 if ( key == arr [ int ( mid ) ] ) : return mid if ( key > arr [ int ( mid ) ] ) : return f_gold ( arr , ( mid + 1 ) , high , key ) return ( f_gold ( arr , low , ( mid - 1 ) , key ) ) "," using namespace std; int f_gold ( int arr [ ], int low, int high, int key ) { if ( high < low ) return - 1; int mid = ( low + high ) / 2; if ( key == arr [ mid ] ) return mid; if ( key > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high, key ); return f_gold ( arr, low, ( mid - 1 ), key ); } int main() { int n_success = 0; vector> param0 {{2,10,73,91,98},{30,24,24,-8,64,50,46,-76,26,8,-92,-78,40,-86,96,14,60,38,6,-72,-6,-20,26,-26,0,2},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{30,79,3,76,18},{-96,-90,-88,-84,-78,-78,-70,-68,-66,-66,-64,-64,-58,-56,-52,-42,-40,-38,-36,-30,-30,-28,-14,-8,0,14,16,22,24,26,36,40,40,48,48,50,52,54,54,58,64,74,82,88,94},{1,1,0,0,0,1,1,1,0,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1},{2,8,8,14,15,16,17,17,18,18,24,25,25,26,36,37,39,39,40,44,46,47,51,54,56,57,57,61,61,67,68,69,72,76,77,81,82,82,82,85,85,87,94,94,98,99},{-4,84,20,-84,-6,-78,20,56,40,0,98,80,-94,36,-6,-98,50,66,-12,-58,-34,68,-80,-30,-82,-76,-38,-60,92,94,48,-84,20,-66,-32,-92,16,-96,-68,94,-46,30,32,-34,96,-92,-96,-86,-22},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{71,70,13,18,70,62,88,27,17,44,89,28,74,41,20,91,95,79,40,43,38,20,5}}; vector param1 {2,20,30,3,35,25,33,34,19,21}; vector param2 {4,13,27,2,30,26,40,27,13,22}; vector param3 {4,21,29,2,40,30,26,34,19,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 10, 73, 91, 98],2,4,4,), ([30, 24, 24, -8, 64, 50, 46, -76, 26, 8, -92, -78, 40, -86, 96, 14, 60, 38, 6, -72, -6, -20, 26, -26, 0, 2],20,13,21,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],30,27,29,), ([30, 79, 3, 76, 18],3,2,2,), ([-96, -90, -88, -84, -78, -78, -70, -68, -66, -66, -64, -64, -58, -56, -52, -42, -40, -38, -36, -30, -30, -28, -14, -8, 0, 14, 16, 22, 24, 26, 36, 40, 40, 48, 48, 50, 52, 54, 54, 58, 64, 74, 82, 88, 94],35,30,40,), ([1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1],25,26,30,), ([2, 8, 8, 14, 15, 16, 17, 17, 18, 18, 24, 25, 25, 26, 36, 37, 39, 39, 40, 44, 46, 47, 51, 54, 56, 57, 57, 61, 61, 67, 68, 69, 72, 76, 77, 81, 82, 82, 82, 85, 85, 87, 94, 94, 98, 99],33,40,26,), ([-4, 84, 20, -84, -6, -78, 20, 56, 40, 0, 98, 80, -94, 36, -6, -98, 50, 66, -12, -58, -34, 68, -80, -30, -82, -76, -38, -60, 92, 94, 48, -84, 20, -66, -32, -92, 16, -96, -68, 94, -46, 30, 32, -34, 96, -92, -96, -86, -22],34,27,34,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,13,19,), ([71, 70, 13, 18, 70, 62, 88, 27, 17, 44, 89, 28, 74, 41, 20, 91, 95, 79, 40, 43, 38, 20, 5],21,22,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_NUMBER_SEGMENTS_LENGTHS_B_C," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_NUMBER_SEGMENTS_LENGTHS_B_C{ static int f_gold ( int n , int a , int b , int c ) { int dp [ ] = new int [ n + 10 ] ; Arrays . fill ( dp , - 1 ) ; dp [ 0 ] = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( dp [ i ] != - 1 ) { if ( i + a <= n ) dp [ i + a ] = Math . max ( dp [ i ] + 1 , dp [ i + a ] ) ; if ( i + b <= n ) dp [ i + b ] = Math . max ( dp [ i ] + 1 , dp [ i + b ] ) ; if ( i + c <= n ) dp [ i + c ] = Math . max ( dp [ i ] + 1 , dp [ i + c ] ) ; } } return dp [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(23); param0.add(62); param0.add(32); param0.add(82); param0.add(94); param0.add(44); param0.add(4); param0.add(53); param0.add(9); param0.add(23); List param1 = new ArrayList<>(); param1.add(16); param1.add(76); param1.add(46); param1.add(48); param1.add(99); param1.add(21); param1.add(57); param1.add(23); param1.add(55); param1.add(15); List param2 = new ArrayList<>(); param2.add(23); param2.add(81); param2.add(1); param2.add(72); param2.add(62); param2.add(46); param2.add(2); param2.add(80); param2.add(26); param2.add(73); List param3 = new ArrayList<>(); param3.add(18); param3.add(97); param3.add(78); param3.add(58); param3.add(38); param3.add(60); param3.add(77); param3.add(5); param3.add(85); param3.add(42); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , a , b , c ) : dp = [ - 1 ] * ( n + 10 ) dp [ 0 ] = 0 for i in range ( 0 , n ) : if ( dp [ i ] != - 1 ) : if ( i + a <= n ) : dp [ i + a ] = max ( dp [ i ] + 1 , dp [ i + a ] ) if ( i + b <= n ) : dp [ i + b ] = max ( dp [ i ] + 1 , dp [ i + b ] ) if ( i + c <= n ) : dp [ i + c ] = max ( dp [ i ] + 1 , dp [ i + c ] ) return dp [ n ] "," using namespace std; int f_gold ( int n, int a, int b, int c ) { int dp [ n + 1 ]; memset ( dp, - 1, sizeof ( dp ) ); dp [ 0 ] = 0; for ( int i = 0; i < n; i ++ ) { if ( dp [ i ] != - 1 ) { if ( i + a <= n ) dp [ i + a ] = max ( dp [ i ] + 1, dp [ i + a ] ); if ( i + b <= n ) dp [ i + b ] = max ( dp [ i ] + 1, dp [ i + b ] ); if ( i + c <= n ) dp [ i + c ] = max ( dp [ i ] + 1, dp [ i + c ] ); } } return dp [ n ]; } int main() { int n_success = 0; vector param0 {23,62,32,82,94,44,4,53,9,23}; vector param1 {16,76,46,48,99,21,57,23,55,15}; vector param2 {23,81,1,72,62,46,2,80,26,73}; vector param3 {18,97,78,58,38,60,77,5,85,42}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (23,16,23,18,), (62,76,81,97,), (32,46,1,78,), (82,48,72,58,), (94,99,62,38,), (44,21,46,60,), (4,57,2,77,), (53,23,80,5,), (9,55,26,85,), (23,15,73,42,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1{ static int f_gold ( int dist ) { int [ ] count = new int [ dist + 1 ] ; count [ 0 ] = 1 ; count [ 1 ] = 1 ; count [ 2 ] = 2 ; for ( int i = 3 ; i <= dist ; i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ] ; return count [ dist ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(82); param0.add(87); param0.add(80); param0.add(92); param0.add(58); param0.add(98); param0.add(53); param0.add(11); param0.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( dist ) : count = [ 0 ] * ( dist + 1 ) count [ 0 ] = 1 count [ 1 ] = 1 count [ 2 ] = 2 for i in range ( 3 , dist + 1 ) : count [ i ] = ( count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ] ) return count [ dist ] ; "," using namespace std; int f_gold ( int dist ) { int count [ dist + 1 ]; count [ 0 ] = 1, count [ 1 ] = 1, count [ 2 ] = 2; for ( int i = 3; i <= dist; i ++ ) count [ i ] = count [ i - 1 ] + count [ i - 2 ] + count [ i - 3 ]; return count [ dist ]; } int main() { int n_success = 0; vector param0 {37,82,87,80,92,58,98,53,11,58}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,), (82,), (87,), (80,), (92,), (58,), (98,), (53,), (11,), (58,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS_1{ public static int f_gold ( int a , int b , int c ) { if ( a > b ) { if ( b > c ) return b ; else if ( a > c ) return c ; else return a ; } else { if ( a > c ) return a ; else if ( b > c ) return c ; else return b ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(43); param0.add(76); param0.add(57); param0.add(10); param0.add(59); param0.add(92); param0.add(49); param0.add(16); param0.add(33); param0.add(66); List param1 = new ArrayList<>(); param1.add(24); param1.add(54); param1.add(5); param1.add(13); param1.add(47); param1.add(14); param1.add(62); param1.add(95); param1.add(41); param1.add(63); List param2 = new ArrayList<>(); param2.add(7); param2.add(66); param2.add(40); param2.add(4); param2.add(56); param2.add(50); param2.add(65); param2.add(12); param2.add(90); param2.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , c ) : if a > b : if ( b > c ) : return b elif ( a > c ) : return c else : return a else : if ( a > c ) : return a elif ( b > c ) : return c else : return b "," using namespace std; int f_gold ( int a, int b, int c ) { if ( a > b ) { if ( b > c ) return b; else if ( a > c ) return c; else return a; } else { if ( a > c ) return a; else if ( b > c ) return c; else return b; } } int main() { int n_success = 0; vector param0 {43,76,57,10,59,92,49,16,33,66}; vector param1 {24,54,5,13,47,14,62,95,41,63}; vector param2 {7,66,40,4,56,50,65,12,90,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (43,24,7,), (76,54,66,), (57,5,40,), (10,13,4,), (59,47,56,), (92,14,50,), (49,62,65,), (16,95,12,), (33,41,90,), (66,63,46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS{ static int f_gold ( String str ) { int N = str . length ( ) ; int [ ] [ ] dp = new int [ N + 1 ] [ N + 1 ] ; for ( int i = 0 ; i <= N ; i ++ ) for ( int j = 0 ; j <= N ; j ++ ) dp [ i ] [ j ] = 0 ; for ( int len = 1 ; len <= N ; len ++ ) { for ( int i = 0 , j = len - 1 ; j < N ; i ++ , j ++ ) { if ( len == 1 ) dp [ i ] [ j ] = 1 ; else { dp [ i ] [ j ] = 1 + dp [ i + 1 ] [ j ] ; if ( str . charAt ( i ) == str . charAt ( i + 1 ) ) dp [ i ] [ j ] = Math . min ( 1 + dp [ i + 2 ] [ j ] , dp [ i ] [ j ] ) ; for ( int K = i + 2 ; K <= j ; K ++ ) if ( str . charAt ( i ) == str . charAt ( K ) ) dp [ i ] [ j ] = Math . min ( dp [ i + 1 ] [ K - 1 ] + dp [ K + 1 ] [ j ] , dp [ i ] [ j ] ) ; } } } return dp [ 0 ] [ N - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""YCtLQtHLwr""); param0.add(""47713514383248""); param0.add(""0100101001111""); param0.add(""XfdIYVn""); param0.add(""45499225407""); param0.add(""000100111001""); param0.add(""ZoUQhQwoap""); param0.add(""18579027952""); param0.add(""00000001111""); param0.add(""JD""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(str): N = len(str) dp = [[0 for x in range(N + 1)] for y in range(N + 1)] for l in range(1, N + 1): i = 0 j = l - 1 while j < N: if (l == 1): dp[i][j] = 1 else: dp[i][j] = 1 + dp[i + 1][j] if (str[i] == str[i + 1]): dp[i][j] = min(1 + dp[i + 2][j], dp[i][j]) for K in range(i + 2, j + 1): if (str[i] == str[K]): dp[i][j] = min(dp[i + 1][K - 1] + dp[K + 1][j], dp[i][j]) i += 1 j += 1 return dp[0][N - 1] "," using namespace std; int f_gold ( string str ) { int N = str . length ( ); int dp [ N + 1 ] [ N + 1 ]; for ( int i = 0; i <= N; i ++ ) for ( int j = 0; j <= N; j ++ ) dp [ i ] [ j ] = 0; for ( int len = 1; len <= N; len ++ ) { for ( int i = 0, j = len - 1; j < N; i ++, j ++ ) { if ( len == 1 ) dp [ i ] [ j ] = 1; else { dp [ i ] [ j ] = 1 + dp [ i + 1 ] [ j ]; if ( str [ i ] == str [ i + 1 ] ) dp [ i ] [ j ] = min ( 1 + dp [ i + 2 ] [ j ], dp [ i ] [ j ] ); for ( int K = i + 2; K <= j; K ++ ) if ( str [ i ] == str [ K ] ) dp [ i ] [ j ] = min ( dp [ i + 1 ] [ K - 1 ] + dp [ K + 1 ] [ j ], dp [ i ] [ j ] ); } } } return dp [ 0 ] [ N - 1 ]; } int main() { int n_success = 0; vector param0 {""YCtLQtHLwr"",""47713514383248"",""0100101001111"",""XfdIYVn"",""45499225407"",""000100111001"",""ZoUQhQwoap"",""18579027952"",""00000001111"",""JD""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('YCtLQtHLwr',), ('47713514383248',), ('0100101001111',), ('XfdIYVn',), ('45499225407',), ('000100111001',), ('ZoUQhQwoap',), ('18579027952',), ('00000001111',), ('JD',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM{ static int f_gold ( int high [ ] , int low [ ] , int n ) { if ( n <= 0 ) return 0 ; return Math . max ( high [ n - 1 ] + f_gold ( high , low , ( n - 2 ) ) , low [ n - 1 ] + f_gold ( high , low , ( n - 1 ) ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,3,9,10,13,14,15,15,17,22,23,28,30,31,37,42,45,62,62,68,68,68,78,79,82,84,87,90,99}); param0.add(new int[]{-78,-12,26,80,50,4,-80,86,12,-2,18,-50,-90,56,-50,88,-62,96,-44,-82,56}); param0.add(new int[]{1}); param0.add(new int[]{21,28,13,48,26,49,16,70,81,35,74,12,97,61,10,84,94,78,40,30,30,84,41,4,95,79,38,29,9}); param0.add(new int[]{-80,-36,-32,-20,-14,-12,10,12,72}); param0.add(new int[]{1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1}); param0.add(new int[]{1,7,9,10,13,14,15,20,23,24,24,24,26,27,29,31,32,33,34,35,46,48,49,51,51,53,53,56,56,60,62,64,64,70,73,73,73,74,77,78,79,79,79,80,86,89,89,92,98}); param0.add(new int[]{56,48,40,-56,44,-86,-28,-32,-34,4,-94,-14,28,-74}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{85,13,35,57,8,48,65,54,88,7,66,30,47,51}); List param1 = new ArrayList<>(); param1.add(new int[]{5,10,11,14,16,22,24,30,34,35,37,37,39,41,42,42,43,55,57,63,71,76,83,83,85,90,91,97,99}); param1.add(new int[]{-44,-14,14,0,30,78,40,-12,-44,-16,60,-12,-50,-66,70,-98,-56,48,-82,94,14}); param1.add(new int[]{1}); param1.add(new int[]{49,88,25,93,24,56,47,44,33,27,86,57,21,25,64,44,37,99,36,54,17,29,37,17,26,43,61,27,21}); param1.add(new int[]{-76,-54,-50,-28,0,58,70,78,90}); param1.add(new int[]{0,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,0,1}); param1.add(new int[]{1,3,3,4,8,8,10,10,10,12,12,15,15,22,23,28,28,30,31,33,34,35,36,36,36,42,44,44,51,54,57,58,59,59,63,65,66,68,69,71,73,76,77,78,79,79,86,87,93}); param1.add(new int[]{82,-40,-16,-64,12,-6,60,48,-58,-4,42,-28,24,-58}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}); param1.add(new int[]{1,42,42,89,3,21,49,98,4,59,26,85,53,34}); List param2 = new ArrayList<>(); param2.add(18); param2.add(16); param2.add(0); param2.add(25); param2.add(4); param2.add(24); param2.add(31); param2.add(8); param2.add(16); param2.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( high , low , n ) : if ( n <= 0 ) : return 0 return max ( high [ n - 1 ] + f_gold ( high , low , ( n - 2 ) ) , low [ n - 1 ] + f_gold ( high , low , ( n - 1 ) ) ) ; "," using namespace std; int f_gold ( int high [ ], int low [ ], int n ) { if ( n <= 0 ) return 0; return max ( high [ n - 1 ] + f_gold ( high, low, ( n - 2 ) ), low [ n - 1 ] + f_gold ( high, low, ( n - 1 ) ) ); } int main() { int n_success = 0; vector> param0 {{1,3,9,10,13,14,15,15,17,22,23,28,30,31,37,42,45,62,62,68,68,68,78,79,82,84,87,90,99},{-78,-12,26,80,50,4,-80,86,12,-2,18,-50,-90,56,-50,88,-62,96,-44,-82,56},{1},{21,28,13,48,26,49,16,70,81,35,74,12,97,61,10,84,94,78,40,30,30,84,41,4,95,79,38,29,9},{-80,-36,-32,-20,-14,-12,10,12,72},{1,1,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1},{1,7,9,10,13,14,15,20,23,24,24,24,26,27,29,31,32,33,34,35,46,48,49,51,51,53,53,56,56,60,62,64,64,70,73,73,73,74,77,78,79,79,79,80,86,89,89,92,98},{56,48,40,-56,44,-86,-28,-32,-34,4,-94,-14,28,-74},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{85,13,35,57,8,48,65,54,88,7,66,30,47,51}}; vector> param1 {{5,10,11,14,16,22,24,30,34,35,37,37,39,41,42,42,43,55,57,63,71,76,83,83,85,90,91,97,99},{-44,-14,14,0,30,78,40,-12,-44,-16,60,-12,-50,-66,70,-98,-56,48,-82,94,14},{1},{49,88,25,93,24,56,47,44,33,27,86,57,21,25,64,44,37,99,36,54,17,29,37,17,26,43,61,27,21},{-76,-54,-50,-28,0,58,70,78,90},{0,0,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,0,1,1,0,0,0,1},{1,3,3,4,8,8,10,10,10,12,12,15,15,22,23,28,28,30,31,33,34,35,36,36,36,42,44,44,51,54,57,58,59,59,63,65,66,68,69,71,73,76,77,78,79,79,86,87,93},{82,-40,-16,-64,12,-6,60,48,-58,-4,42,-28,24,-58},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},{1,42,42,89,3,21,49,98,4,59,26,85,53,34}}; vector param2 {18,16,0,25,4,24,31,8,16,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 3, 9, 10, 13, 14, 15, 15, 17, 22, 23, 28, 30, 31, 37, 42, 45, 62, 62, 68, 68, 68, 78, 79, 82, 84, 87, 90, 99],[5, 10, 11, 14, 16, 22, 24, 30, 34, 35, 37, 37, 39, 41, 42, 42, 43, 55, 57, 63, 71, 76, 83, 83, 85, 90, 91, 97, 99],18,), ([-78, -12, 26, 80, 50, 4, -80, 86, 12, -2, 18, -50, -90, 56, -50, 88, -62, 96, -44, -82, 56],[-44, -14, 14, 0, 30, 78, 40, -12, -44, -16, 60, -12, -50, -66, 70, -98, -56, 48, -82, 94, 14],16,), ([1],[1],0,), ([21, 28, 13, 48, 26, 49, 16, 70, 81, 35, 74, 12, 97, 61, 10, 84, 94, 78, 40, 30, 30, 84, 41, 4, 95, 79, 38, 29, 9],[49, 88, 25, 93, 24, 56, 47, 44, 33, 27, 86, 57, 21, 25, 64, 44, 37, 99, 36, 54, 17, 29, 37, 17, 26, 43, 61, 27, 21],25,), ([-80, -36, -32, -20, -14, -12, 10, 12, 72],[-76, -54, -50, -28, 0, 58, 70, 78, 90],4,), ([1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1],[0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1],24,), ([1, 7, 9, 10, 13, 14, 15, 20, 23, 24, 24, 24, 26, 27, 29, 31, 32, 33, 34, 35, 46, 48, 49, 51, 51, 53, 53, 56, 56, 60, 62, 64, 64, 70, 73, 73, 73, 74, 77, 78, 79, 79, 79, 80, 86, 89, 89, 92, 98],[1, 3, 3, 4, 8, 8, 10, 10, 10, 12, 12, 15, 15, 22, 23, 28, 28, 30, 31, 33, 34, 35, 36, 36, 36, 42, 44, 44, 51, 54, 57, 58, 59, 59, 63, 65, 66, 68, 69, 71, 73, 76, 77, 78, 79, 79, 86, 87, 93],31,), ([56, 48, 40, -56, 44, -86, -28, -32, -34, 4, -94, -14, 28, -74],[82, -40, -16, -64, 12, -6, 60, 48, -58, -4, 42, -28, 24, -58],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],16,), ([85, 13, 35, 57, 8, 48, 65, 54, 88, 7, 66, 30, 47, 51],[1, 42, 42, 89, 3, 21, 49, 98, 4, 59, 26, 85, 53, 34],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER_1{ static int f_gold ( int N , int K ) { int ans = 0 ; int y = N / K ; int x = N % K ; ans = ( K * ( K - 1 ) / 2 ) * y + ( x * ( x + 1 ) ) / 2 ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(40); param0.add(46); param0.add(97); param0.add(63); param0.add(92); param0.add(60); param0.add(67); param0.add(61); param0.add(74); param0.add(67); List param1 = new ArrayList<>(); param1.add(90); param1.add(64); param1.add(20); param1.add(1); param1.add(52); param1.add(35); param1.add(40); param1.add(62); param1.add(61); param1.add(41); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N , K ) : ans = 0 ; y = N / K ; x = N % K ; ans = ( ( K * ( K - 1 ) / 2 ) * y + ( x * ( x + 1 ) ) / 2 ) ; return int ( ans ) ; "," using namespace std; int f_gold ( int N, int K ) { int ans = 0; int y = N / K; int x = N % K; ans = ( K * ( K - 1 ) / 2 ) * y + ( x * ( x + 1 ) ) / 2; return ans; } int main() { int n_success = 0; vector param0 {40,46,97,63,92,60,67,61,74,67}; vector param1 {90,64,20,1,52,35,40,62,61,41}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (40,90,), (46,64,), (97,20,), (63,1,), (92,52,), (60,35,), (67,40,), (61,62,), (74,61,), (67,41,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_PERIMETER_N_BLOCKS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_PERIMETER_N_BLOCKS{ public static long f_gold ( int n ) { int l = ( int ) Math . sqrt ( n ) ; int sq = l * l ; if ( sq == n ) return l * 4 ; else { long row = n / l ; long perimeter = 2 * ( l + row ) ; if ( n % l != 0 ) perimeter += 2 ; return perimeter ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(45); param0.add(80); param0.add(54); param0.add(48); param0.add(83); param0.add(68); param0.add(32); param0.add(20); param0.add(68); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : l = math.sqrt ( n ) sq = l * l if ( sq == n ) : return l * 4 else : row = n / l perimeter = 2 * ( l + row ) if ( n % l != 0 ) : perimeter += 2 return perimeter "," using namespace std; int f_gold ( int n ) { int l = sqrt ( n ); int sq = l * l; if ( sq == n ) return l * 4; else { long long int row = n / l; long long int perimeter = 2 * ( l + row ); if ( n % l != 0 ) perimeter += 2; return perimeter; } } int main() { int n_success = 0; vector param0 {45,80,54,48,83,68,32,20,68,66}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (45,), (80,), (54,), (48,), (83,), (68,), (32,), (20,), (68,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TURN_OFF_THE_RIGHTMOST_SET_BIT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TURN_OFF_THE_RIGHTMOST_SET_BIT{ static int f_gold ( int n ) { return n & ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(9); param0.add(54); param0.add(60); param0.add(32); param0.add(41); param0.add(64); param0.add(4); param0.add(51); param0.add(57); param0.add(92); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return n & ( n - 1 ) "," using namespace std; int f_gold ( unsigned int n ) { return n & ( n - 1 ); } int main() { int n_success = 0; vector param0 {9,54,60,32,41,64,4,51,57,92}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (9,), (54,), (60,), (32,), (41,), (64,), (4,), (51,), (57,), (92,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING{ static int f_gold ( String s ) { int p = - 1 , i , j ; for ( i = 0 ; i < s . length ( ) ; i ++ ) { for ( j = i + 1 ; j < s . length ( ) ; j ++ ) { if ( s . charAt ( i ) == s . charAt ( j ) ) { p = i ; break ; } } if ( p != - 1 ) break ; } return p ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ORXMflacQFBv""); param0.add(""39977638567848""); param0.add(""011110011011""); param0.add(""fYjfNy""); param0.add(""222280492""); param0.add(""11""); param0.add(""UjntBg""); param0.add(""6866190138212""); param0.add(""0000""); param0.add(""FWz PWEQgVlRZ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : p = - 1 for i in range ( len ( s ) ) : for j in range ( i + 1 , len ( s ) ) : if ( s [ i ] == s [ j ] ) : p = i break if ( p != - 1 ) : break return p ",,," if __name__ == '__main__': param = [ ('ORXMflacQFBv',), ('39977638567848',), ('011110011011',), ('fYjfNy',), ('222280492',), ('11',), ('UjntBg',), ('6866190138212',), ('0000',), ('FWz PWEQgVlRZ',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_REPETITIVE_ELEMENT_1_N_1_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPETITIVE_ELEMENT_1_N_1_1{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > s = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( s . contains ( arr [ i ] ) ) return arr [ i ] ; s . add ( arr [ i ] ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,10,14,17,30,37,39,42,49,56,68,74,85,85,92}); param0.add(new int[]{62,-18,78,-32,38,90}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{56,1,96,81,49,18,39,87,97}); param0.add(new int[]{-98,-94,-80,-76,-60,-56,-56,-54,-48,-28,-14,-10,26,30,40,58,64,74,78,82,86,92,96,98}); param0.add(new int[]{1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,1,1,1,0}); param0.add(new int[]{5,7,19,20,22,29,33,35,35,36,37,40,44,49,50,53,60,60,61,62,68,68,69,72,72,81,81,83,85,85,90,91,92,97,98}); param0.add(new int[]{14}); param0.add(new int[]{0,0,0,0,0,0,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}); param0.add(new int[]{29,29,14,91,42,70,79,75,9,86,48,47,37,48,69,81,49,37,33,23,42,45,10,33,47,39,96,45,94,48,44,4,6,73,91}); List param1 = new ArrayList<>(); param1.add(10); param1.add(4); param1.add(7); param1.add(5); param1.add(16); param1.add(11); param1.add(26); param1.add(0); param1.add(18); param1.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { if ( s . find ( arr [ i ] ) != s . end ( ) ) return arr [ i ]; s . insert ( arr [ i ] ); } return - 1; } int main() { int n_success = 0; vector> param0 {{9,10,14,17,30,37,39,42,49,56,68,74,85,85,92},{62,-18,78,-32,38,90},{0,0,0,0,1,1,1,1,1,1},{56,1,96,81,49,18,39,87,97},{-98,-94,-80,-76,-60,-56,-56,-54,-48,-28,-14,-10,26,30,40,58,64,74,78,82,86,92,96,98},{1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,1,1,1,0},{5,7,19,20,22,29,33,35,35,36,37,40,44,49,50,53,60,60,61,62,68,68,69,72,72,81,81,83,85,85,90,91,92,97,98},{14},{0,0,0,0,0,0,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},{29,29,14,91,42,70,79,75,9,86,48,47,37,48,69,81,49,37,33,23,42,45,10,33,47,39,96,45,94,48,44,4,6,73,91}}; vector param1 {10,4,7,5,16,11,26,0,18,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int ans = Integer . MIN_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { int curr_xor = 0 ; for ( int j = i ; j < n ; j ++ ) { curr_xor = curr_xor ^ arr [ j ] ; ans = Math . max ( ans , curr_xor ) ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,7,7,11,12,18,20,23,27,30,44,47,53,53,55,57,57,58,61,62,67,74,76,80,86,86}); param0.add(new int[]{-34,-4,68,-82,54,20,6,-18,-70,98,-40,80,-28,78,28,56,26,2,2,-56,-66,44,0,-72,12,54,-40,18,28,-48,-56,72,84,60,76,26,-8,62}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{33,98}); param0.add(new int[]{-92,-80,-76,-76,-74,-58,-44,-38,-34,-32,-30,-24,-20,-18,-4,-2,2,8,44,52,52,56,70,72,80,80,98}); param0.add(new int[]{0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0}); param0.add(new int[]{1,2,3,6,9,15,15,18,19,25,31,31,33,37,39,47,49,51,51,52,52,54,58,59,59,61,62,62,65,66,66,66,66,67,71,76,77,78,79,80,83,86,87,92,97,97,98,99}); param0.add(new int[]{34,-90,64,88,-46,-4,-96,76,-32,10,-8,-24,32,-4,86,-20,-86,-88,-72,64,12,66,-96,-84,16,-58,-48,80,-80,70,-94,-84,56,8,-14,86,72,-16,-18,74,40,34,20,80}); param0.add(new int[]{1,1}); param0.add(new int[]{57,76,2,30,24,12,49,12,5,75,55,17,62,87,21,91,88,10,20,49,46,79,51,33,94,59,48,97,70,49}); List param1 = new ArrayList<>(); param1.add(13); param1.add(21); param1.add(12); param1.add(1); param1.add(15); param1.add(33); param1.add(38); param1.add(35); param1.add(1); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : ans = - 2147483648 for i in range ( n ) : curr_xor = 0 for j in range ( i , n ) : curr_xor = curr_xor ^ arr [ j ] ans = max ( ans , curr_xor ) return ans "," using namespace std; int f_gold ( int arr [ ], int n ) { int ans = INT_MIN; for ( int i = 0; i < n; i ++ ) { int curr_xor = 0; for ( int j = i; j < n; j ++ ) { curr_xor = curr_xor ^ arr [ j ]; ans = max ( ans, curr_xor ); } } return ans; } int main() { int n_success = 0; vector> param0 {{1,7,7,11,12,18,20,23,27,30,44,47,53,53,55,57,57,58,61,62,67,74,76,80,86,86},{-34,-4,68,-82,54,20,6,-18,-70,98,-40,80,-28,78,28,56,26,2,2,-56,-66,44,0,-72,12,54,-40,18,28,-48,-56,72,84,60,76,26,-8,62},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{33,98},{-92,-80,-76,-76,-74,-58,-44,-38,-34,-32,-30,-24,-20,-18,-4,-2,2,8,44,52,52,56,70,72,80,80,98},{0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0},{1,2,3,6,9,15,15,18,19,25,31,31,33,37,39,47,49,51,51,52,52,54,58,59,59,61,62,62,65,66,66,66,66,67,71,76,77,78,79,80,83,86,87,92,97,97,98,99},{34,-90,64,88,-46,-4,-96,76,-32,10,-8,-24,32,-4,86,-20,-86,-88,-72,64,12,66,-96,-84,16,-58,-48,80,-80,70,-94,-84,56,8,-14,86,72,-16,-18,74,40,34,20,80},{1,1},{57,76,2,30,24,12,49,12,5,75,55,17,62,87,21,91,88,10,20,49,46,79,51,33,94,59,48,97,70,49}}; vector param1 {13,21,12,1,15,33,38,35,1,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 7, 7, 11, 12, 18, 20, 23, 27, 30, 44, 47, 53, 53, 55, 57, 57, 58, 61, 62, 67, 74, 76, 80, 86, 86],13,), ([-34, -4, 68, -82, 54, 20, 6, -18, -70, 98, -40, 80, -28, 78, 28, 56, 26, 2, 2, -56, -66, 44, 0, -72, 12, 54, -40, 18, 28, -48, -56, 72, 84, 60, 76, 26, -8, 62],21,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,), ([33, 98],1,), ([-92, -80, -76, -76, -74, -58, -44, -38, -34, -32, -30, -24, -20, -18, -4, -2, 2, 8, 44, 52, 52, 56, 70, 72, 80, 80, 98],15,), ([0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0],33,), ([1, 2, 3, 6, 9, 15, 15, 18, 19, 25, 31, 31, 33, 37, 39, 47, 49, 51, 51, 52, 52, 54, 58, 59, 59, 61, 62, 62, 65, 66, 66, 66, 66, 67, 71, 76, 77, 78, 79, 80, 83, 86, 87, 92, 97, 97, 98, 99],38,), ([34, -90, 64, 88, -46, -4, -96, 76, -32, 10, -8, -24, 32, -4, 86, -20, -86, -88, -72, 64, 12, 66, -96, -84, 16, -58, -48, 80, -80, 70, -94, -84, 56, 8, -14, 86, 72, -16, -18, 74, 40, 34, 20, 80],35,), ([1, 1],1,), ([57, 76, 2, 30, 24, 12, 49, 12, 5, 75, 55, 17, 62, 87, 21, 91, 88, 10, 20, 49, 46, 79, 51, 33, 94, 59, 48, 97, 70, 49],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES{ static String f_gold ( String str ) { String result = """" ; boolean v = true ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( str . charAt ( i ) == ' ' ) { v = true ; } else if ( str . charAt ( i ) != ' ' && v == true ) { result += ( str . charAt ( i ) ) ; v = false ; } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""t a""); param0.add(""77 78 2 600 7""); param0.add(""011 10 10""); param0.add(""kV Co O iR""); param0.add(""2""); param0.add(""0 11""); param0.add(""Y sT wgheC""); param0.add(""58 824 6""); param0.add(""00 100 001 0111""); param0.add(""Q""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : result = """" v = True for i in range ( len ( str ) ) : if ( str [ i ] == ' ' ) : v = True elif ( str [ i ] != ' ' and v == True ) : result += ( str [ i ] ) v = False return result "," using namespace std; string f_gold ( string str ) { string result = """"; bool v = true; for ( int i = 0; i < str . length ( ); i ++ ) { if ( str [ i ] == ' ' ) v = true; else if ( str [ i ] != ' ' && v == true ) { result . push_back ( str [ i ] ); v = false; } } return result; } int main() { int n_success = 0; vector param0 {""t a"",""77 78 2 600 7"",""011 10 10"",""kVCo kV Co O iR"",""2"",""0 11"",""Y sT wgheC"",""58 824 6"",""00 100 001 0111"",""Q""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('t a',), ('77 78 2 600 7',), ('011 10 10',), ('kV Co O iR',), ('2',), ('0 11',), ('Y sT wgheC',), ('58 824 6',), ('00 100 001 0111',), ('Q',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int SubsetSum_1 = 0 , SubsetSum_2 = 0 ; for ( int i = 0 ; i <= n - 1 ; i ++ ) { boolean isSingleOccurance = true ; for ( int j = i + 1 ; j <= n - 1 ; j ++ ) { if ( arr [ i ] == arr [ j ] ) { isSingleOccurance = false ; arr [ i ] = arr [ j ] = 0 ; break ; } } if ( isSingleOccurance ) { if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ] ; else SubsetSum_2 += arr [ i ] ; } } return Math . abs ( SubsetSum_1 - SubsetSum_2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,14,15,21,42,42,42,46,46,48,48,48,52,52,53,60,62,69,69,79,82,86,96}); param0.add(new int[]{-54,4,-22,94,58,-28,-12,84,64,4,-34,16,-10,-32,50,-78,68,-52,-64,66,64,-28,-38,-18,-84,-66,-36,64,-12,44,48,8,42}); param0.add(new int[]{0,0,0,1}); param0.add(new int[]{63,49,18,36,21,30,45,87}); param0.add(new int[]{-96,-78,-78,-72,-62,-56,-52,-44,-38,-38,-28,-22,-20,-12,-6,-6,-2,2,2,4,36,44,46,50,50,54,66,92}); param0.add(new int[]{0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,1,0}); param0.add(new int[]{1,2,8,12,13,13,14,17,18,27,28,31,34,37,38,42,43,45,49,52,53,56,56,58,62,66,71,74,87,93,96,99}); param0.add(new int[]{30,-28,-30,86,-8,-80,76,-2,28,30,82,84,-32,82,-88,-24,42,16,-32,-8,78,-8,-46,-6,-86,-86,-24,-12,-32,-72,84,-82,76,-84,80,-50,90,-50,-14,-82,78,48,-10,86,34,-20,-76,58}); param0.add(new int[]{0,1}); param0.add(new int[]{83,86,57,18,98,52,1,37,11,49,10,67,2,60,30,42,8,97,25,55,5,75,9,67}); List param1 = new ArrayList<>(); param1.add(15); param1.add(28); param1.add(2); param1.add(6); param1.add(18); param1.add(34); param1.add(25); param1.add(28); param1.add(1); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : SubsetSum_1 = 0 SubsetSum_2 = 0 for i in range ( 0 , n ) : isSingleOccurance = True for j in range ( i + 1 , n ) : if ( arr [ i ] == arr [ j ] ) : isSingleOccurance = False arr [ i ] = arr [ j ] = 0 break if ( isSingleOccurance == True ) : if ( arr [ i ] > 0 ) : SubsetSum_1 += arr [ i ] else : SubsetSum_2 += arr [ i ] return abs ( SubsetSum_1 - SubsetSum_2 ) "," using namespace std; int f_gold ( int arr [ ], int n ) { int SubsetSum_1 = 0, SubsetSum_2 = 0; for ( int i = 0; i <= n - 1; i ++ ) { bool isSingleOccurance = true; for ( int j = i + 1; j <= n - 1; j ++ ) { if ( arr [ i ] == arr [ j ] ) { isSingleOccurance = false; arr [ i ] = arr [ j ] = 0; break; } } if ( isSingleOccurance ) { if ( arr [ i ] > 0 ) SubsetSum_1 += arr [ i ]; else SubsetSum_2 += arr [ i ]; } } return abs ( SubsetSum_1 - SubsetSum_2 ); } int main() { int n_success = 0; vector> param0 {{5,14,15,21,42,42,42,46,46,48,48,48,52,52,53,60,62,69,69,79,82,86,96},{-54,4,-22,94,58,-28,-12,84,64,4,-34,16,-10,-32,50,-78,68,-52,-64,66,64,-28,-38,-18,-84,-66,-36,64,-12,44,48,8,42},{0,0,0,1},{63,49,18,36,21,30,45,87},{-96,-78,-78,-72,-62,-56,-52,-44,-38,-38,-28,-22,-20,-12,-6,-6,-2,2,2,4,36,44,46,50,50,54,66,92},{0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,1,1,0},{1,2,8,12,13,13,14,17,18,27,28,31,34,37,38,42,43,45,49,52,53,56,56,58,62,66,71,74,87,93,96,99},{30,-28,-30,86,-8,-80,76,-2,28,30,82,84,-32,82,-88,-24,42,16,-32,-8,78,-8,-46,-6,-86,-86,-24,-12,-32,-72,84,-82,76,-84,80,-50,90,-50,-14,-82,78,48,-10,86,34,-20,-76,58},{0,1},{83,86,57,18,98,52,1,37,11,49,10,67,2,60,30,42,8,97,25,55,5,75,9,67}}; vector param1 {15,28,2,6,18,34,25,28,1,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 14, 15, 21, 42, 42, 42, 46, 46, 48, 48, 48, 52, 52, 53, 60, 62, 69, 69, 79, 82, 86, 96],15,), ([-54, 4, -22, 94, 58, -28, -12, 84, 64, 4, -34, 16, -10, -32, 50, -78, 68, -52, -64, 66, 64, -28, -38, -18, -84, -66, -36, 64, -12, 44, 48, 8, 42],28,), ([0, 0, 0, 1],2,), ([63, 49, 18, 36, 21, 30, 45, 87],6,), ([-96, -78, -78, -72, -62, -56, -52, -44, -38, -38, -28, -22, -20, -12, -6, -6, -2, 2, 2, 4, 36, 44, 46, 50, 50, 54, 66, 92],18,), ([0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0],34,), ([1, 2, 8, 12, 13, 13, 14, 17, 18, 27, 28, 31, 34, 37, 38, 42, 43, 45, 49, 52, 53, 56, 56, 58, 62, 66, 71, 74, 87, 93, 96, 99],25,), ([30, -28, -30, 86, -8, -80, 76, -2, 28, 30, 82, 84, -32, 82, -88, -24, 42, 16, -32, -8, 78, -8, -46, -6, -86, -86, -24, -12, -32, -72, 84, -82, 76, -84, 80, -50, 90, -50, -14, -82, 78, 48, -10, 86, 34, -20, -76, 58],28,), ([0, 1],1,), ([83, 86, 57, 18, 98, 52, 1, 37, 11, 49, 10, 67, 2, 60, 30, 42, 8, 97, 25, 55, 5, 75, 9, 67],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_1{ static int f_gold ( int n ) { int dp [ ] = new int [ n + 1 ] ; dp [ 0 ] = 0 ; dp [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) dp [ i ] = Math . max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ] , i ) ; return dp [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(50); param0.add(83); param0.add(18); param0.add(24); param0.add(31); param0.add(38); param0.add(94); param0.add(24); param0.add(13); param0.add(53); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : dp = [ 0 ] * ( n + 1 ) dp [ 0 ] = 0 dp [ 1 ] = 1 for i in range ( 2 , n + 1 ) : dp [ i ] = max ( dp [ int ( i / 2 ) ] + dp [ int ( i / 3 ) ] + dp [ int ( i / 4 ) ] , i ) ; return dp [ n ] "," using namespace std; int f_gold ( int n ) { int dp [ n + 1 ]; dp [ 0 ] = 0, dp [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) dp [ i ] = max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ], i ); return dp [ n ]; } int main() { int n_success = 0; vector param0 {50,83,18,24,31,38,94,24,13,53}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (50,), (83,), (18,), (24,), (31,), (38,), (94,), (24,), (13,), (53,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN{ static int f_gold ( int coin [ ] , int n , int k ) { Arrays . sort ( coin ) ; int coins_needed = ( int ) Math . ceil ( 1.0 * n / ( k + 1 ) ) ; int ans = 0 ; for ( int i = 0 ; i <= coins_needed - 1 ; i ++ ) ans += coin [ i ] ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95}); param0.add(new int[]{-6,-52,20,-98,-10,48,36,66,-88,94,68,16}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71}); param0.add(new int[]{-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84}); param0.add(new int[]{1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0}); param0.add(new int[]{5,12,38,39,52,54,62,81,87,93}); param0.add(new int[]{86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{86,62,98,97,61,31,23,56,63,72,44,74,58,97}); List param1 = new ArrayList<>(); param1.add(33); param1.add(6); param1.add(16); param1.add(13); param1.add(25); param1.add(32); param1.add(6); param1.add(25); param1.add(37); param1.add(12); List param2 = new ArrayList<>(); param2.add(27); param2.add(10); param2.add(16); param2.add(17); param2.add(34); param2.add(32); param2.add(8); param2.add(20); param2.add(29); param2.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( coin , n , k ) : coin.sort ( ) coins_needed = math.ceil ( 1.0 * n // ( k + 1 ) ) ; ans = 0 for i in range ( coins_needed - 1 + 1 ) : ans += coin [ i ] return ans "," using namespace std; int f_gold ( int coin [ ], int n, int k ) { sort ( coin, coin + n ); int coins_needed = ceil ( 1.0 * n / ( k + 1 ) ); int ans = 0; for ( int i = 0; i <= coins_needed - 1; i ++ ) ans += coin [ i ]; return ans; } int main() { int n_success = 0; vector> param0 {{2,4,5,9,10,10,11,14,15,19,21,22,29,36,36,38,39,39,39,41,41,42,45,45,48,55,56,57,64,66,66,66,66,69,74,76,80,81,82,82,85,87,95,95},{-6,-52,20,-98,-10,48,36,66,-88,94,68,16},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{91,62,29,49,6,11,10,43,78,35,32,5,1,48,15,24,4,71},{-98,-92,-88,-84,-82,-78,-74,-74,-68,-62,-62,-56,-56,-50,-46,-44,-26,-18,-14,-8,-8,-6,8,16,20,20,22,26,36,42,44,44,52,60,66,68,68,70,76,84},{1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0},{5,12,38,39,52,54,62,81,87,93},{86,-18,-32,70,40,-76,-8,8,-84,-10,92,94,-18,-12,-26,-40,-74,60,16,-70,44,-32,40,-24,0,4},{0,0,0,0,0,0,0,0,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},{86,62,98,97,61,31,23,56,63,72,44,74,58,97}}; vector param1 {33,6,16,13,25,32,6,25,37,12}; vector param2 {27,10,16,17,34,32,8,20,29,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 4, 5, 9, 10, 10, 11, 14, 15, 19, 21, 22, 29, 36, 36, 38, 39, 39, 39, 41, 41, 42, 45, 45, 48, 55, 56, 57, 64, 66, 66, 66, 66, 69, 74, 76, 80, 81, 82, 82, 85, 87, 95, 95],33,27,), ([-6, -52, 20, -98, -10, 48, 36, 66, -88, 94, 68, 16],6,10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,16,), ([91, 62, 29, 49, 6, 11, 10, 43, 78, 35, 32, 5, 1, 48, 15, 24, 4, 71],13,17,), ([-98, -92, -88, -84, -82, -78, -74, -74, -68, -62, -62, -56, -56, -50, -46, -44, -26, -18, -14, -8, -8, -6, 8, 16, 20, 20, 22, 26, 36, 42, 44, 44, 52, 60, 66, 68, 68, 70, 76, 84],25,34,), ([1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0],32,32,), ([5, 12, 38, 39, 52, 54, 62, 81, 87, 93],6,8,), ([86, -18, -32, 70, 40, -76, -8, 8, -84, -10, 92, 94, -18, -12, -26, -40, -74, 60, 16, -70, 44, -32, 40, -24, 0, 4],25,20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],37,29,), ([86, 62, 98, 97, 61, 31, 23, 56, 63, 72, 44, 74, 58, 97],12,13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PADOVAN_SEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PADOVAN_SEQUENCE{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(92); param0.add(29); param0.add(52); param0.add(55); param0.add(13); param0.add(83); param0.add(83); param0.add(10); param0.add(67); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : pPrevPrev , pPrev , pCurr , pNext = 1 , 1 , 1 , 1 for i in range ( 3 , n + 1 ) : pNext = pPrevPrev + pPrev pPrevPrev = pPrev pPrev = pCurr pCurr = pNext return pNext ; "," 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; } int main() { int n_success = 0; vector param0 {1,92,29,52,55,13,83,83,10,67}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (92,), (29,), (52,), (55,), (13,), (83,), (83,), (10,), (67,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CEILING_IN_A_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CEILING_IN_A_SORTED_ARRAY{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,4,6,8,9,9,10,11,16,19,20,21,21,21,24,24,25,28,30,30,30,32,34,35,39,41,42,49,52,57,59,61,62,66,68,71,73,76,79,83,84,85,86,87,87}); param0.add(new int[]{92,50,-84,60,32,-54,84,-82,-42,-72,-64,-28,-48,66,92,-42,42,-66,52,-30,48,42,36,-4,64,62,-16,0,20,26,78,78,12,-6,-30,-14,76,72,70,-34,98,32}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{26,68,73,76,14,19,56,80,17,7,15,64,99,98,21,21,72,12,14,10,44,82,25,42,46,86,79,43,91}); param0.add(new int[]{-90,-86,-84,-50,-30,-24,-12,-2,8,22,30,44,58,58,60,60,62,90}); param0.add(new int[]{0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,1}); param0.add(new int[]{2,2,29,31,34,39,48,50,56,61,66,66,69,73,88}); param0.add(new int[]{-98,48,-58,8,70,62,92,84,-58,-46,-26,-92,18,-88,40,-12,60,14,54,-64,88,52,-44,88,-46,-8,36,-22,28,-20,-50,58,-82,-44,-44,54,-86,40,10,0,-24,-84,-10,62,58,0,-88}); param0.add(new int[]{0,0,0,0,1,1}); param0.add(new int[]{56,30,33,5,67,35,22,54,36,55,94,89,40,65,29,76,17,14,14,49,40,44,35,69,63,2,81,78,19,67,12,14,68,30,82,85,12,2,94,33,85,75,97,31,69,31,85,26}); List param1 = new ArrayList<>(); param1.add(23); param1.add(36); param1.add(11); param1.add(23); param1.add(9); param1.add(12); param1.add(9); param1.add(40); param1.add(5); param1.add(46); List param2 = new ArrayList<>(); param2.add(37); param2.add(35); param2.add(9); param2.add(27); param2.add(16); param2.add(15); param2.add(12); param2.add(29); param2.add(5); param2.add(47); List param3 = new ArrayList<>(); param3.add(44); param3.add(34); param3.add(13); param3.add(26); param3.add(10); param3.add(18); param3.add(10); param3.add(24); param3.add(5); param3.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , low , high , x ) : if x <= arr [ low ] : return low i = low for i in range ( high ) : if arr [ i ] == x : return i if arr [ i ] < x and arr [ i + 1 ] >= x : return i + 1 return - 1 "," 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; } int main() { int n_success = 0; vector> param0 {{2,3,4,6,8,9,9,10,11,16,19,20,21,21,21,24,24,25,28,30,30,30,32,34,35,39,41,42,49,52,57,59,61,62,66,68,71,73,76,79,83,84,85,86,87,87},{92,50,-84,60,32,-54,84,-82,-42,-72,-64,-28,-48,66,92,-42,42,-66,52,-30,48,42,36,-4,64,62,-16,0,20,26,78,78,12,-6,-30,-14,76,72,70,-34,98,32},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{26,68,73,76,14,19,56,80,17,7,15,64,99,98,21,21,72,12,14,10,44,82,25,42,46,86,79,43,91},{-90,-86,-84,-50,-30,-24,-12,-2,8,22,30,44,58,58,60,60,62,90},{0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,1},{2,2,29,31,34,39,48,50,56,61,66,66,69,73,88},{-98,48,-58,8,70,62,92,84,-58,-46,-26,-92,18,-88,40,-12,60,14,54,-64,88,52,-44,88,-46,-8,36,-22,28,-20,-50,58,-82,-44,-44,54,-86,40,10,0,-24,-84,-10,62,58,0,-88},{0,0,0,0,1,1},{56,30,33,5,67,35,22,54,36,55,94,89,40,65,29,76,17,14,14,49,40,44,35,69,63,2,81,78,19,67,12,14,68,30,82,85,12,2,94,33,85,75,97,31,69,31,85,26}}; vector param1 {23,36,11,23,9,12,9,40,5,46}; vector param2 {37,35,9,27,16,15,12,29,5,47}; vector param3 {44,34,13,26,10,18,10,24,5,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 4, 6, 8, 9, 9, 10, 11, 16, 19, 20, 21, 21, 21, 24, 24, 25, 28, 30, 30, 30, 32, 34, 35, 39, 41, 42, 49, 52, 57, 59, 61, 62, 66, 68, 71, 73, 76, 79, 83, 84, 85, 86, 87, 87],23,37,44,), ([92, 50, -84, 60, 32, -54, 84, -82, -42, -72, -64, -28, -48, 66, 92, -42, 42, -66, 52, -30, 48, 42, 36, -4, 64, 62, -16, 0, 20, 26, 78, 78, 12, -6, -30, -14, 76, 72, 70, -34, 98, 32],36,35,34,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],11,9,13,), ([26, 68, 73, 76, 14, 19, 56, 80, 17, 7, 15, 64, 99, 98, 21, 21, 72, 12, 14, 10, 44, 82, 25, 42, 46, 86, 79, 43, 91],23,27,26,), ([-90, -86, -84, -50, -30, -24, -12, -2, 8, 22, 30, 44, 58, 58, 60, 60, 62, 90],9,16,10,), ([0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1],12,15,18,), ([2, 2, 29, 31, 34, 39, 48, 50, 56, 61, 66, 66, 69, 73, 88],9,12,10,), ([-98, 48, -58, 8, 70, 62, 92, 84, -58, -46, -26, -92, 18, -88, 40, -12, 60, 14, 54, -64, 88, 52, -44, 88, -46, -8, 36, -22, 28, -20, -50, 58, -82, -44, -44, 54, -86, 40, 10, 0, -24, -84, -10, 62, 58, 0, -88],40,29,24,), ([0, 0, 0, 0, 1, 1],5,5,5,), ([56, 30, 33, 5, 67, 35, 22, 54, 36, 55, 94, 89, 40, 65, 29, 76, 17, 14, 14, 49, 40, 44, 35, 69, 63, 2, 81, 78, 19, 67, 12, 14, 68, 30, 82, 85, 12, 2, 94, 33, 85, 75, 97, 31, 69, 31, 85, 26],46,47,47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED_1{ static int f_gold ( int ar [ ] , int n ) { if ( n <= 4 ) return Arrays . stream ( ar ) . min ( ) . getAsInt ( ) ; int [ ] sum = new int [ 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 ] + Arrays . stream ( Arrays . copyOfRange ( sum , i - 4 , i ) ) . min ( ) . getAsInt ( ) ; return Arrays . stream ( Arrays . copyOfRange ( sum , n - 4 , n ) ) . min ( ) . getAsInt ( ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,4,9,26,31,31,33,35,40,45,48,52,57,60,69,75,82,89,90,92,95,97}); param0.add(new int[]{60,-68,30,-62,-8,48,-20,30,16,-60,-20}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{15,70,50,28,67,11,27,42,1,61,37,8,66,54,50,91,86,57,4}); param0.add(new int[]{-98,-92,-84,-80,-70,-58,-58,-48,-42,-14,-8,24,30,32,42,62,68,70,72,88}); param0.add(new int[]{1,1,1,1,0,1,0,1,1,1,0,1,1,1,0}); param0.add(new int[]{4,5,5,10,12,13,16,19,19,21,22,25,26,29,30,33,34,44,46,52,55,55,56,78,86,88,88,90,92}); param0.add(new int[]{40,-50,-96,78,82,-16,26,8,38,38,54,-24,88,96,-42,-84,-28,-32,-64,74,74,-10,-8,66,14,-78,56,-22,-90,66,-68}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{29,38,20,25,16,97,16,90,30,99}); List param1 = new ArrayList<>(); param1.add(19); param1.add(5); param1.add(43); param1.add(15); param1.add(16); param1.add(7); param1.add(16); param1.add(26); param1.add(7); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( ar , n ) : if ( n <= 4 ) : return min ( ar ) sum = [ 0 for i in range ( n ) ] sum [ 0 ] = ar [ 0 ] sum [ 1 ] = ar [ 1 ] sum [ 2 ] = ar [ 2 ] sum [ 3 ] = ar [ 3 ] for i in range ( 4 , n ) : sum [ i ] = ar [ i ] + min ( sum [ i - 4 : i ] ) return min ( sum [ n - 4 : n ] ) "," 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 ); } int main() { int n_success = 0; vector> param0 {{4,4,9,26,31,31,33,35,40,45,48,52,57,60,69,75,82,89,90,92,95,97},{60,-68,30,-62,-8,48,-20,30,16,-60,-20},{0,0,0,0,0,0,0,0,0,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},{15,70,50,28,67,11,27,42,1,61,37,8,66,54,50,91,86,57,4},{-98,-92,-84,-80,-70,-58,-58,-48,-42,-14,-8,24,30,32,42,62,68,70,72,88},{1,1,1,1,0,1,0,1,1,1,0,1,1,1,0},{4,5,5,10,12,13,16,19,19,21,22,25,26,29,30,33,34,44,46,52,55,55,56,78,86,88,88,90,92},{40,-50,-96,78,82,-16,26,8,38,38,54,-24,88,96,-42,-84,-28,-32,-64,74,74,-10,-8,66,14,-78,56,-22,-90,66,-68},{0,0,0,0,0,1,1,1,1,1,1,1},{29,38,20,25,16,97,16,90,30,99}}; vector param1 {19,5,43,15,16,7,16,26,7,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 4, 9, 26, 31, 31, 33, 35, 40, 45, 48, 52, 57, 60, 69, 75, 82, 89, 90, 92, 95, 97],19,), ([60, -68, 30, -62, -8, 48, -20, 30, 16, -60, -20],5,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],43,), ([15, 70, 50, 28, 67, 11, 27, 42, 1, 61, 37, 8, 66, 54, 50, 91, 86, 57, 4],15,), ([-98, -92, -84, -80, -70, -58, -58, -48, -42, -14, -8, 24, 30, 32, 42, 62, 68, 70, 72, 88],16,), ([1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],7,), ([4, 5, 5, 10, 12, 13, 16, 19, 19, 21, 22, 25, 26, 29, 30, 33, 34, 44, 46, 52, 55, 55, 56, 78, 86, 88, 88, 90, 92],16,), ([40, -50, -96, 78, 82, -16, 26, 8, 38, 38, 54, -24, 88, 96, -42, -84, -28, -32, -64, 74, 74, -10, -8, 66, 14, -78, 56, -22, -90, 66, -68],26,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],7,), ([29, 38, 20, 25, 16, 97, 16, 90, 30, 99],9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98}); param0.add(new int[]{50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{88,14,29,87,86,58}); param0.add(new int[]{-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94}); param0.add(new int[]{1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0}); param0.add(new int[]{70,70,74}); param0.add(new int[]{-20,-12,-50,76,24,64,-22,-4,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50}); List param1 = new ArrayList<>(); param1.add(new int[]{1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88}); param1.add(new int[]{34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76}); param1.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{91,95,64,4,63,35}); param1.add(new int[]{-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98}); param1.add(new int[]{1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0}); param1.add(new int[]{15,55,84}); param1.add(new int[]{18,98,-88,86,72,-44,82,94,58}); param1.add(new int[]{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}); param1.add(new int[]{4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88}); List param2 = new ArrayList<>(); param2.add(9); param2.add(11); param2.add(14); param2.add(3); param2.add(34); param2.add(39); param2.add(1); param2.add(5); param2.add(27); param2.add(10); List param3 = new ArrayList<>(); param3.add(15); param3.add(12); param3.add(9); param3.add(5); param3.add(32); param3.add(26); param3.add(1); param3.add(4); param3.add(26); param3.add(10); List param4 = new ArrayList<>(); param4.add(11); param4.add(8); param4.add(12); param4.add(5); param4.add(23); param4.add(34); param4.add(1); param4.add(7); param4.add(37); param4.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , m , n , x ) : count = 0 for i in range ( m ) : for j in range ( n ) : if arr1 [ i ] + arr2 [ j ] == x : count = count + 1 return count "," 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; } int main() { int n_success = 0; vector> param0 {{11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98},{50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{88,14,29,87,86,58},{-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94},{1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0},{70,70,74},{-20,-12,-50,76,24,64,-22,-4,-68},{0,0,0,0,0,0,0,0,0,0,0,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},{68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50}}; vector> param1 {{1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88},{34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{91,95,64,4,63,35},{-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98},{1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0},{15,55,84},{18,98,-88,86,72,-44,82,94,58},{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},{4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88}}; vector param2 {9,11,14,3,34,39,1,5,27,10}; vector param3 {15,12,9,5,32,26,1,4,26,10}; vector param4 {11,8,12,5,23,34,1,7,37,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([11, 13, 16, 23, 26, 28, 31, 34, 37, 39, 44, 48, 56, 59, 79, 91, 96, 98],[1, 1, 9, 14, 17, 23, 26, 31, 33, 36, 53, 60, 71, 75, 76, 84, 87, 88],9,15,11,), ([50, 14, -98, 14, 90, 36, 66, 44, 10, -98, -24, -36, -32, -50],[34, -6, -66, 0, -6, 82, 60, -98, -8, 60, -2, 4, 22, 76],11,12,8,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,9,12,), ([88, 14, 29, 87, 86, 58],[91, 95, 64, 4, 63, 35],3,5,5,), ([-98, -92, -88, -86, -82, -76, -72, -66, -56, -48, -34, -28, -28, -26, -20, -18, -18, -16, -16, -12, -4, 0, 6, 12, 16, 20, 22, 30, 34, 34, 36, 56, 58, 62, 64, 80, 82, 94],[-94, -90, -88, -84, -82, -78, -76, -72, -70, -58, -58, -46, -42, -40, -40, -32, -22, -20, -18, -12, -8, -6, 6, 6, 18, 20, 34, 46, 60, 62, 66, 72, 72, 76, 76, 78, 92, 98],34,32,23,), ([1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0],[1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0],39,26,34,), ([70, 70, 74],[15, 55, 84],1,1,1,), ([-20, -12, -50, 76, 24, 64, -22, -4, -68],[18, 98, -88, 86, 72, -44, 82, 94, 58],5,4,7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],27,26,37,), ([68, 75, 51, 45, 73, 95, 48, 53, 70, 41, 65, 47, 46, 43, 79, 29, 50],[4, 6, 76, 65, 16, 13, 85, 43, 31, 14, 81, 90, 24, 87, 40, 25, 88],10,10,9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT{ static boolean 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 ( Math . abs ( digit2 - digit1 ) > 1 ) return false ; num = num / 10 ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(77); param0.add(35); param0.add(79); param0.add(45); param0.add(22); param0.add(68); param0.add(17); param0.add(5); param0.add(85); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num ) : if ( num // 10 == 0 ) : return True while ( num != 0 ) : if ( num // 10 == 0 ) : return True digit1 = num % 10 digit2 = ( num // 10 ) % 10 if ( abs ( digit2 - digit1 ) > 1 ) : return False num = num // 10 return True "," 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; } int main() { int n_success = 0; vector param0 {67,77,35,79,45,22,68,17,5,85}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (77,), (35,), (79,), (45,), (22,), (68,), (17,), (5,), (85,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EFFICIENTLY_FIND_FIRST_REPEATED_CHARACTER_STRING_WITHOUT_USING_ADDITIONAL_DATA_STRUCTURE_ONE_TRAVERSAL," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EFFICIENTLY_FIND_FIRST_REPEATED_CHARACTER_STRING_WITHOUT_USING_ADDITIONAL_DATA_STRUCTURE_ONE_TRAVERSAL{ static int f_gold ( String str ) { int checker = 0 ; for ( int i = 0 ; i < str . length ( ) ; ++ i ) { int val = ( str . charAt ( i ) - 'a' ) ; if ( ( checker & ( 1 << val ) ) > 0 ) return i ; checker |= ( 1 << val ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""XFGfXTDgpIuerN""); param0.add(""5621946166""); param0.add(""11010110""); param0.add(""xL""); param0.add(""2575""); param0.add(""0100010""); param0.add(""SZmmQ""); param0.add(""9735892999350""); param0.add(""1001101101101""); param0.add(""oEXDbOU""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector param0 {""XFGfXTDgpIuerN"",""5621946166"",""11010110"",""xL"",""2575"",""0100010"",""SZmmQ"",""9735892999350"",""1001101101101"",""oEXDbOU""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, LONGEST_REPEATED_SUBSEQUENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_REPEATED_SUBSEQUENCE_1{ static String f_gold ( String str ) { int n = str . length ( ) ; int [ ] [ ] dp = new int [ 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 . charAt ( i - 1 ) == str . charAt ( j - 1 ) && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] ; else dp [ i ] [ j ] = Math . 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 . charAt ( i - 1 ) ; i -- ; j -- ; } else if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) i -- ; else j -- ; } String reverse = """" ; for ( int k = res . length ( ) - 1 ; k >= 0 ; k -- ) { reverse = reverse + res . charAt ( k ) ; } return reverse ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""qnQxjoRx""); param0.add(""27473733400077""); param0.add(""000010111111""); param0.add(""TNVwgrWSLu""); param0.add(""9537""); param0.add(""1100""); param0.add(""lYcoiQfzN""); param0.add(""52""); param0.add(""00100001100""); param0.add(""Rkxe""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) dp = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ] for i in range ( 1 , n + 1 ) : for j in range ( 1 , n + 1 ) : if ( str [ i - 1 ] == str [ j - 1 ] and i != j ) : dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] else : dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) res = '' i = n j = n while ( i > 0 and j > 0 ) : if ( dp [ i ] [ j ] == dp [ i - 1 ] [ j - 1 ] + 1 ) : res += str [ i - 1 ] i -= 1 j -= 1 elif ( dp [ i ] [ j ] == dp [ i - 1 ] [ j ] ) : i -= 1 else : j -= 1 res = ''.join ( reversed ( res ) ) return res "," 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; } int main() { int n_success = 0; vector param0 {""qnQxjoRx"",""27473733400077"",""000010111111"",""TNVwgrWSLu"",""9537"",""1100"",""lYcoiQfzN"",""52"",""00100001100"",""Rkxe""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('qnQxjoRx',), ('27473733400077',), ('000010111111',), ('TNVwgrWSLu',), ('9537',), ('1100',), ('lYcoiQfzN',), ('52',), ('00100001100',), ('Rkxe',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES{ static int f_gold ( int n ) { int ans = 0 ; for ( int length = 1 ; length <= Math . sqrt ( n ) ; ++ length ) for ( int height = length ; height * length <= n ; ++ height ) ans ++ ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(34); param0.add(49); param0.add(41); param0.add(17); param0.add(67); param0.add(38); param0.add(59); param0.add(64); param0.add(61); param0.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : ans = 0 for length in range ( 1 , int ( math.sqrt ( n ) ) + 1 ) : height = length while ( height * length <= n ) : ans += 1 height += 1 return ans "," 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; } int main() { int n_success = 0; vector param0 {34,49,41,17,67,38,59,64,61,58}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (34,), (49,), (41,), (17,), (67,), (38,), (59,), (64,), (61,), (58,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POSITION_ELEMENT_STABLE_SORT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POSITION_ELEMENT_STABLE_SORT{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99}); param0.add(new int[]{-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,-90,94,-50,22,-82,8,92,-84,-34,-36,-66}); param0.add(new int[]{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}); param0.add(new int[]{66,8,30,84,36,96,45,63,23,23,14,34,86,51,18,97,21,39,96,70,28,96,78,68,88,66,13,24,74,94}); param0.add(new int[]{-94,-90,-86,-86,-72,-72,-58,-50,-32,-22,-18,-10,-4,-2,-2,0,0,6,14,22,22,36,36,40,44,58,60,70,70,76,82,82,84,88,96}); param0.add(new int[]{1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1}); param0.add(new int[]{3,5,6,7,8,10,17,20,20,26,27,27,27,32,32,38,40,44,45,45,45,45,47,50,57,57,57,58,62,63,63,67,68,73,75,76,77,79,79,80,85,88,89,89,89,94,96,98}); param0.add(new int[]{98,-92,18,-18,44,-88,-90,-66,-38,78,-22,-46,-20,64,-10,54}); param0.add(new int[]{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}); param0.add(new int[]{14,17}); List param1 = new ArrayList<>(); param1.add(37); param1.add(31); param1.add(30); param1.add(26); param1.add(17); param1.add(30); param1.add(42); param1.add(14); param1.add(19); param1.add(1); List param2 = new ArrayList<>(); param2.add(32); param2.add(27); param2.add(34); param2.add(21); param2.add(31); param2.add(36); param2.add(35); param2.add(12); param2.add(31); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , idx ) : result = 0 for i in range ( n ) : if ( arr [ i ] < arr [ idx ] ) : result += 1 if ( arr [ i ] == arr [ idx ] and i < idx ) : result += 1 return result ; "," 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; } int main() { int n_success = 0; vector> param0 {{4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99},{-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,-90,94,-50,22,-82,8,92,-84,-34,-36,-66},{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},{66,8,30,84,36,96,45,63,23,23,14,34,86,51,18,97,21,39,96,70,28,96,78,68,88,66,13,24,74,94},{-94,-90,-86,-86,-72,-72,-58,-50,-32,-22,-18,-10,-4,-2,-2,0,0,6,14,22,22,36,36,40,44,58,60,70,70,76,82,82,84,88,96},{1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1},{3,5,6,7,8,10,17,20,20,26,27,27,27,32,32,38,40,44,45,45,45,45,47,50,57,57,57,58,62,63,63,67,68,73,75,76,77,79,79,80,85,88,89,89,89,94,96,98},{98,-92,18,-18,44,-88,-90,-66,-38,78,-22,-46,-20,64,-10,54},{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},{14,17}}; vector param1 {37,31,30,26,17,30,42,14,19,1}; vector param2 {32,27,34,21,31,36,35,12,31,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 8, 9, 12, 15, 16, 18, 28, 28, 31, 33, 36, 36, 37, 40, 41, 44, 44, 46, 50, 50, 50, 52, 52, 54, 55, 60, 61, 65, 68, 71, 75, 75, 78, 81, 84, 87, 89, 90, 92, 94, 97, 97, 98, 98, 99],37,32,), ([-16, 86, 94, -86, -38, 64, 96, -64, 94, 10, -10, -62, -50, -46, -62, -32, -4, 72, 14, 36, 74, -66, 46, 82, -44, -22, -26, 16, -8, 0, -90, 94, -50, 22, -82, 8, 92, -84, -34, -36, -66],31,27,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],30,34,), ([66, 8, 30, 84, 36, 96, 45, 63, 23, 23, 14, 34, 86, 51, 18, 97, 21, 39, 96, 70, 28, 96, 78, 68, 88, 66, 13, 24, 74, 94],26,21,), ([-94, -90, -86, -86, -72, -72, -58, -50, -32, -22, -18, -10, -4, -2, -2, 0, 0, 6, 14, 22, 22, 36, 36, 40, 44, 58, 60, 70, 70, 76, 82, 82, 84, 88, 96],17,31,), ([1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1],30,36,), ([3, 5, 6, 7, 8, 10, 17, 20, 20, 26, 27, 27, 27, 32, 32, 38, 40, 44, 45, 45, 45, 45, 47, 50, 57, 57, 57, 58, 62, 63, 63, 67, 68, 73, 75, 76, 77, 79, 79, 80, 85, 88, 89, 89, 89, 94, 96, 98],42,35,), ([98, -92, 18, -18, 44, -88, -90, -66, -38, 78, -22, -46, -20, 64, -10, 54],14,12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,31,), ([14, 17],1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_INTEGERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSTRINGS_DIVISIBLE_4_STRING_INTEGERS{ static int f_gold ( String s ) { int n = s . length ( ) ; int count = 0 ; for ( int i = 0 ; i < n ; ++ i ) if ( s . charAt ( i ) == '4' || s . charAt ( i ) == '8' || s . charAt ( i ) == '0' ) count ++ ; for ( int i = 0 ; i < n - 1 ; ++ i ) { int h = ( s . charAt ( i ) - '0' ) * 10 + ( s . charAt ( i + 1 ) - '0' ) ; if ( h % 4 == 0 ) count = count + i + 1 ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""Qaq""); param0.add(""9400761825850""); param0.add(""0011001111""); param0.add(""lasWqrLRq""); param0.add(""5662""); param0.add(""110""); param0.add("" tOYKf""); param0.add(""6536991235305""); param0.add(""11111""); param0.add(""uZftT iDHcYiCt""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : n = len ( s ) count = 0 ; for i in range ( 0 , n , 1 ) : if ( s [ i ] == '4' or s [ i ] == '8' or s [ i ] == '0' ) : count += 1 for i in range ( 0 , n - 1 , 1 ) : h = ( ord ( s [ i ] ) - ord ( '0' ) ) * 10 + ( ord ( s [ i + 1 ] ) - ord ( '0' ) ) if ( h % 4 == 0 ) : count = count + i + 1 return count "," 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; } int main() { int n_success = 0; vector param0 {""Qaq"",""9400761825850"",""0011001111"",""lasWqrLRq"",""5662"",""110"","" tOYKf"",""6536991235305"",""11111"",""uZftT iDHcYiCt""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front()) == f_gold(¶m0[i].front())) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('Qaq',), ('9400761825850',), ('0011001111',), ('lasWqrLRq',), ('5662',), ('110',), (' tOYKf',), ('6536991235305',), ('11111',), ('uZftT iDHcYiCt',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SQUARE_ROOT_OF_A_PERFECT_SQUARE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_ROOT_OF_A_PERFECT_SQUARE{ static float f_gold ( float n ) { float x = n ; float y = 1 ; double e = 0.000001 ; while ( x - y > e ) { x = ( x + y ) / 2 ; y = n / x ; } return x ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1763.655093333857F); param0.add(-3544.737136289062F); param0.add(7893.209433000695F); param0.add(-3008.0331952533734F); param0.add(6155.190186637041F); param0.add(-5799.751467314729F); param0.add(8234.151546380555F); param0.add(-1829.5367705266551F); param0.add(5778.227173218819F); param0.add(-7785.473710863676F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : x = n y = 1 e = 0.000001 while ( x - y > e ) : x = ( x + y ) / 2 y = n / x return x ",,," if __name__ == '__main__': param = [ (1763.655093333857,), (-3544.737136289062,), (7893.209433000695,), (-3008.0331952533734,), (6155.190186637041,), (-5799.751467314729,), (8234.151546380555,), (-1829.5367705266551,), (5778.227173218819,), (-7785.473710863676,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EFFICIENT_WAY_TO_MULTIPLY_WITH_7," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EFFICIENT_WAY_TO_MULTIPLY_WITH_7{ static int f_gold ( int n ) { return ( ( n << 3 ) - n ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(41); param0.add(42); param0.add(62); param0.add(4); param0.add(31); param0.add(75); param0.add(5); param0.add(75); param0.add(85); param0.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( ( n << 3 ) - n ) "," using namespace std; long f_gold ( long n ) { return ( ( n << 3 ) - n ); } int main() { int n_success = 0; vector param0 {41,42,62,4,31,75,5,75,85,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (41,), (42,), (62,), (4,), (31,), (75,), (5,), (75,), (85,), (19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_BINOMIAL_COEFFICIENT_TERM_VALUE{ static int f_gold ( int n ) { int [ ] [ ] C = new int [ n + 1 ] [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= Math . 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 = Math . max ( maxvalue , C [ n ] [ i ] ) ; return maxvalue ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(23); param0.add(41); param0.add(69); param0.add(56); param0.add(71); param0.add(38); param0.add(26); param0.add(52); param0.add(93); param0.add(44); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : C = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] ; for i in range ( n + 1 ) : for j in range ( min ( i , n ) + 1 ) : if ( j == 0 or j == i ) : C [ i ] [ j ] = 1 ; else : C [ i ] [ j ] = ( C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ) ; maxvalue = 0 ; for i in range ( n + 1 ) : maxvalue = max ( maxvalue , C [ n ] [ i ] ) ; return maxvalue ; "," 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; } int main() { int n_success = 0; vector param0 {23,41,69,56,71,38,26,52,93,44}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (23,), (41,), (69,), (56,), (71,), (38,), (26,), (52,), (93,), (44,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM{ static float f_gold ( float l , float b , float h ) { float volume = ( l * b * h ) / 2 ; return volume ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(8448.900678262902F); param0.add(-1849.728957491451F); param0.add(412.667844022232F); param0.add(-5954.835911765373F); param0.add(8437.913444665008F); param0.add(-7183.181663518317F); param0.add(2340.7905920227954F); param0.add(-7281.157547371143F); param0.add(471.3930826982504F); param0.add(-7550.426360065503F); List param1 = new ArrayList<>(); param1.add(8135.461799983198F); param1.add(-4240.89241631363F); param1.add(9798.083992381831F); param1.add(-661.8872499003203F); param1.add(8182.675681595904F); param1.add(-6846.746446198541F); param1.add(5479.00956987109F); param1.add(-615.8705455524116F); param1.add(1357.3753126091392F); param1.add(-2693.2262997056355F); List param2 = new ArrayList<>(); param2.add(6577.239053611328F); param2.add(-9953.518310747193F); param2.add(1449.9204200270522F); param2.add(-8049.6051526695055F); param2.add(9863.296545513396F); param2.add(-971.2199894221352F); param2.add(7073.449591910562F); param2.add(-3343.0245192607968F); param2.add(1907.815700915636F); param2.add(-9110.64755244532F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i),param2.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i),param2.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( l , b , h ) : return ( ( l * b * h ) / 2 ) "," using namespace std; float f_gold ( float l, float b, float h ) { float volume = ( l * b * h ) / 2; return volume; } int main() { int n_success = 0; vector param0 {8448.900678262902F,-1849.728957491451F,412.667844022232F,-5954.835911765373F,8437.913444665008F,-7183.181663518317F,2340.7905920227954F,-7281.157547371143F,471.3930826982504F,-7550.426360065503F}; vector param1 {8135.461799983198F,-4240.89241631363F,9798.083992381831F,-661.8872499003203F,8182.675681595904F,-6846.746446198541F,5479.00956987109F,-615.8705455524116F,1357.3753126091392F,-2693.2262997056355F}; vector param2 {6577.239053611328F,-9953.518310747193F,1449.9204200270522F,-8049.6051526695055F,9863.296545513396F,-971.2199894221352F,7073.449591910562F,-3343.0245192607968F,1907.815700915636F,-9110.64755244532F}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i],param2[i])) )/ (abs(f_filled(param0[i],param1[i],param2[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (8448.900678262902,8135.461799983198,6577.239053611328,), (-1849.728957491451,-4240.89241631363,-9953.518310747193,), (412.667844022232,9798.083992381831,1449.9204200270522,), (-5954.835911765373,-661.8872499003203,-8049.6051526695055,), (8437.913444665008,8182.675681595904,9863.296545513396,), (-7183.181663518317,-6846.746446198541,-971.2199894221352,), (2340.7905920227954,5479.00956987109,7073.449591910562,), (-7281.157547371143,-615.8705455524116,-3343.0245192607968,), (471.3930826982504,1357.3753126091392,1907.815700915636,), (-7550.426360065503,-2693.2262997056355,-9110.64755244532,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE{ static 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 ] + Math . min ( excl , incl ) ; int excl_new = incl ; incl = incl_new ; excl = excl_new ; } return Math . min ( incl , excl ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,17,25,27,29,30,34,49,72,75,90,93,93,94}); param0.add(new int[]{-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53}); param0.add(new int[]{-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94}); param0.add(new int[]{1,1,0,0,1,0,0,1,1,1}); param0.add(new int[]{9,15,19,29,30,39,40,61}); param0.add(new int[]{92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10}); param0.add(new int[]{0,0,0,1,1,1,1}); param0.add(new int[]{32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94}); List param1 = new ArrayList<>(); param1.add(8); param1.add(36); param1.add(21); param1.add(29); param1.add(36); param1.add(5); param1.add(4); param1.add(21); param1.add(5); param1.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(arr, n): if (n <= 0): return 0 incl = arr[0] excl = 0 for i in range(1, n): incl_new = arr[i] + min(excl, incl) excl_new = incl incl = incl_new excl = excl_new return min(incl, excl) "," 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 ); } int main() { int n_success = 0; vector> param0 {{5,17,25,27,29,30,34,49,72,75,90,93,93,94},{-70,-32,62,0,-10,92,-94,-86,52,6,-26,-92,-10,70,-82,28,86,58,86,-58,84,-80,-18,-92,-34,6,34,36,70,-50,-6,-54,84,22,30,-96,-84,72,2,26,-20,4,48,-98,62,-28,-68},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{34,40,92,35,29,26,12,66,7,28,86,4,35,79,1,48,41,47,15,75,45,6,3,94,39,50,20,8,58,51,83,44,53,76,19,84,68,54,36,53},{-98,-98,-92,-92,-88,-82,-74,-70,-68,-68,-64,-60,-52,-52,-42,-42,-38,-36,-36,-34,-26,-24,-22,-12,-2,-2,4,6,44,44,48,54,62,62,64,74,78,82,86,86,90,90,94},{1,1,0,0,1,0,0,1,1,1},{9,15,19,29,30,39,40,61},{92,0,46,70,-60,-50,58,-56,8,-90,84,16,40,-62,50,78,26,-42,-40,98,-52,62,16,-62,-76,-70,-60,32,4,-68,52,-64,70,12,-10},{0,0,0,1,1,1,1},{32,96,63,93,53,1,22,19,50,74,6,94,81,85,4,86,88,75,94}}; vector param1 {8,36,21,29,36,5,4,21,5,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 17, 25, 27, 29, 30, 34, 49, 72, 75, 90, 93, 93, 94], 8,), ([-70, -32, 62, 0, -10, 92, -94, -86, 52, 6, -26, -92, -10, 70, -82, 28, 86, 58, 86, -58, 84, -80, -18, - 92, -34, 6, 34, 36, 70, -50, -6, -54, 84, 22, 30, -96, -84, 72, 2, 26, -20, 4, 48, -98, 62, -28, -68], 36,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21,), ([34, 40, 92, 35, 29, 26, 12, 66, 7, 28, 86, 4, 35, 79, 1, 48, 41, 47, 15, 75, 45, 6, 3, 94, 39, 50, 20, 8, 58, 51, 83, 44, 53, 76, 19, 84, 68, 54, 36, 53], 29,), ([-98, -98, -92, -92, -88, -82, -74, -70, -68, -68, -64, -60, -52, -52, -42, -42, -38, -36, -36, - 34, -26, -24, -22, -12, -2, -2, 4, 6, 44, 44, 48, 54, 62, 62, 64, 74, 78, 82, 86, 86, 90, 90, 94], 36,), ([1, 1, 0, 0, 1, 0, 0, 1, 1, 1], 5,), ([9, 15, 19, 29, 30, 39, 40, 61], 4,), ([92, 0, 46, 70, -60, -50, 58, -56, 8, -90, 84, 16, 40, -62, 50, 78, 26, -42, - 40, 98, -52, 62, 16, -62, -76, -70, -60, 32, 4, -68, 52, -64, 70, 12, -10], 21,), ([0, 0, 0, 1, 1, 1, 1], 5,), ([32, 96, 63, 93, 53, 1, 22, 19, 50, 74, 6, 94, 81, 85, 4, 86, 88, 75, 94], 18,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON{ static double f_gold ( double side ) { return ( 2 * ( Math . sqrt ( 3 ) ) * ( side * side ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1449.255716877097); param0.add(-8772.104874265995); param0.add(2948.419328234334); param0.add(-1184.220109553511); param0.add(7422.825800698956); param0.add(-5808.280006171851); param0.add(829.8963781665169); param0.add(-7368.438572511732); param0.add(5572.033890611617); param0.add(-3998.9441642787706); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( side ) : return ( 2 * ( math.sqrt ( 3 ) ) * ( side * side ) ) "," using namespace std; double f_gold ( double side ) { return ( 2 * ( sqrt ( 3 ) ) * ( side * side ) ); } int main() { int n_success = 0; vector param0 {1449.255716877097,-8772.104874265995,2948.419328234334,-1184.220109553511,7422.825800698956,-5808.280006171851,829.8963781665169,-7368.438572511732,5572.033890611617,-3998.9441642787706}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1449.255716877097,), (-8772.104874265995,), (2948.419328234334,), (-1184.220109553511,), (7422.825800698956,), (-5808.280006171851,), (829.8963781665169,), (-7368.438572511732,), (5572.033890611617,), (-3998.9441642787706,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_OCCURRENCES_CHARACTER_APPEAR_TOGETHER{ static boolean f_gold ( String s , char c ) { boolean oneSeen = false ; int i = 0 , n = s . length ( ) ; while ( i < n ) { if ( s . charAt ( i ) == c ) { if ( oneSeen == true ) return false ; while ( i < n && s . charAt ( i ) == c ) i ++ ; oneSeen = true ; } else i ++ ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""gILrzLimS""); param0.add(""307471222""); param0.add(""110""); param0.add(""GcAB""); param0.add(""113""); param0.add(""011110010""); param0.add(""wcwob""); param0.add(""74571582216153""); param0.add(""100000011""); param0.add(""ryPErkzY""); List param1 = new ArrayList<>(); param1.add('m'); param1.add('2'); param1.add('0'); param1.add('v'); param1.add('3'); param1.add('0'); param1.add('w'); param1.add('1'); param1.add('0'); param1.add('q'); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s , c ) : oneSeen = False i = 0 n = len ( s ) while ( i < n ) : if ( s [ i ] == c ) : if ( oneSeen == True ) : return False while ( i < n and s [ i ] == c ) : i = i + 1 oneSeen = True else : i = i + 1 return True "," 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; } int main() { int n_success = 0; vector param0 {""gILrzLimS"",""307471222"",""110"",""GcAB"",""113"",""011110010"",""wcwob"",""74571582216153"",""100000011"",""ryPErkzY""}; vector param1 {'m','2','0','v','3','0','w','1','0','q'}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('gILrzLimS','m',), ('307471222','2',), ('110','0',), ('GcAB','v',), ('113','3',), ('011110010','0',), ('wcwob','w',), ('74571582216153','1',), ('100000011','0',), ('ryPErkzY','q',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO{ static long f_gold ( long a [ ] , int n ) { Arrays . sort ( a ) ; int i , j ; Vector < Long > s = new Vector < > ( ) ; for ( i = 0 , j = n - 1 ; i < j ; i ++ , j -- ) s . add ( ( a [ i ] + a [ j ] ) ) ; long mini = Collections . min ( s ) ; long maxi = Collections . max ( s ) ; return Math . abs ( maxi - mini ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new long[]{11L,12L,14L,15L,20L,21L,28L,28L,30L,33L,39L,39L,42L,43L,44L,45L,48L,53L,53L,58L,59L,67L,68L,70L,70L,72L,74L,76L,76L,81L,87L,91L}); param0.add(new long[]{28L,-42L,-14L,0L,-56L,42L,14L,52L,58L,58L,92L,-62L,-14L,-12L,-84L,-30L,-94L,-70L,18L,-44L,88L,-60L}); param0.add(new long[]{0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L}); param0.add(new long[]{90L,8L,24L,31L,70L,61L,78L,67L,49L,28L,31L,4L,64L,66L,21L,61L,6L,49L,10L,46L,34L,31L,48L,28L,78L,70L,44L,9L,38L,2L,4L,36L,76L,37L,32L,97L,46L,85L,76L}); param0.add(new long[]{-98L,-78L,-68L,-58L,-26L,-10L,32L,42L,90L,96L}); param0.add(new long[]{1L,0L,0L,1L,0L,1L,1L,0L,0L,1L,0L,1L,1L,1L,1L,0L,1L,1L,0L,1L,1L,0L,0L,0L,1L,0L,1L,0L,1L,0L,0L,0L,1L,1L,0L,1L}); param0.add(new long[]{8L,17L,23L,25L,29L,32L,35L,35L,52L,56L,57L,59L,70L,71L,77L,88L,96L}); param0.add(new long[]{62L,-10L,82L,18L,46L}); param0.add(new long[]{0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,1L,1L,1L,1L,1L,1L,1L,1L,1L,1L}); param0.add(new long[]{42L,71L,12L,33L,3L,58L,60L,60L,5L,52L,46L,53L,43L,50L,98L,53L,16L,82L,39L,93L,70L,13L,93L,69L,7L,92L,76L,11L,61L,48L,27L,28L,20L,76L,44L,24L,52L,56L,21L,82L,49L,5L,61L,76L,67L}); List param1 = new ArrayList<>(); param1.add(31); param1.add(11); param1.add(19); param1.add(37); param1.add(8); param1.add(35); param1.add(16); param1.add(3); param1.add(20); param1.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : a.sort ( ) ; s = [ ] ; i = 0 ; j = n - 1 ; while ( i < j ) : s.append ( ( a [ i ] + a [ j ] ) ) ; i += 1 ; j -= 1 ; mini = min ( s ) ; maxi = max ( s ) ; return abs ( maxi - mini ) ; ",,," if __name__ == '__main__': param = [ ([11, 12, 14, 15, 20, 21, 28, 28, 30, 33, 39, 39, 42, 43, 44, 45, 48, 53, 53, 58, 59, 67, 68, 70, 70, 72, 74, 76, 76, 81, 87, 91],31,), ([28, -42, -14, 0, -56, 42, 14, 52, 58, 58, 92, -62, -14, -12, -84, -30, -94, -70, 18, -44, 88, -60],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([90, 8, 24, 31, 70, 61, 78, 67, 49, 28, 31, 4, 64, 66, 21, 61, 6, 49, 10, 46, 34, 31, 48, 28, 78, 70, 44, 9, 38, 2, 4, 36, 76, 37, 32, 97, 46, 85, 76],37,), ([-98, -78, -68, -58, -26, -10, 32, 42, 90, 96],8,), ([1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1],35,), ([8, 17, 23, 25, 29, 32, 35, 35, 52, 56, 57, 59, 70, 71, 77, 88, 96],16,), ([62, -10, 82, 18, 46],3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],20,), ([42, 71, 12, 33, 3, 58, 60, 60, 5, 52, 46, 53, 43, 50, 98, 53, 16, 82, 39, 93, 70, 13, 93, 69, 7, 92, 76, 11, 61, 48, 27, 28, 20, 76, 44, 24, 52, 56, 21, 82, 49, 5, 61, 76, 67],40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_CHECK_IF_A_MATRIX_IS_SYMMETRIC," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_CHECK_IF_A_MATRIX_IS_SYMMETRIC{ static boolean f_gold ( int mat [ ] [ ] , int N ) { for ( int i = 0 ; i < N ; i ++ ) for ( int j = 0 ; j < N ; j ++ ) if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{29}}); param0.add(new int[][]{new int[]{ 1, 3, 5 }, new int[]{ 3, 2, 4 }, new int[]{ 5, 4, 1 }}); param0.add(new int[][]{new int[]{ 1, 2, 5 }, new int[]{ 3, 2, 4 }, new int[]{ 5, 4, 1 }}); param0.add(new int[][]{new int[]{32,53,61,4,94,83,17,81,12,79,93,11,91,14,15},new int[]{13,34,5,70,47,93,43,97,24,44,49,93,33,2,34},new int[]{94,82,63,86,67,80,10,15,76,76,39,51,15,91,20},new int[]{71,90,63,91,53,14,13,78,84,44,96,39,66,80,82},new int[]{60,33,64,97,47,93,89,32,10,64,77,3,60,87,26},new int[]{69,81,93,32,34,95,76,38,85,22,30,53,84,86,2},new int[]{71,38,57,33,49,92,28,63,54,6,62,95,36,74,19},new int[]{6,34,8,6,41,89,15,22,4,73,86,56,18,24,99},new int[]{67,18,89,84,39,89,61,77,78,94,44,28,30,51,33},new int[]{82,64,52,28,73,14,69,99,54,49,7,44,60,1,51},new int[]{99,38,66,68,74,99,59,98,62,39,63,32,21,85,23},new int[]{15,1,29,94,19,33,88,70,10,46,47,55,18,71,10},new int[]{92,59,34,42,98,91,42,67,7,15,35,53,1,14,90},new int[]{22,84,62,36,99,16,63,6,22,7,95,17,80,50,59},new int[]{42,40,14,73,80,53,8,91,78,59,66,88,72,71,63}}); param0.add(new int[][]{new int[]{93,91,59,11,73,34,33,29,78,95,52,61,39,63,91,82,75,35,18,71,19,42,64},new int[]{92,7,2,46,32,22,94,78,67,73,52,15,70,89,48,40,60,4,21,67,60,67,39},new int[]{94,67,26,74,69,58,14,10,9,3,75,67,48,38,39,41,43,78,67,6,46,78,16},new int[]{25,44,27,86,54,56,75,43,59,83,83,80,94,72,94,56,8,51,29,14,12,13,12},new int[]{78,10,44,59,8,24,37,43,89,8,64,77,67,73,40,74,46,83,92,18,82,72,8},new int[]{59,36,96,21,3,88,16,83,55,22,22,77,12,60,92,72,9,84,79,68,24,48,45},new int[]{6,64,87,15,30,84,27,27,98,97,58,10,73,72,78,1,74,4,59,82,94,41,90},new int[]{43,14,29,73,37,22,88,99,36,95,58,15,61,7,99,91,42,98,25,64,44,6,4},new int[]{66,14,4,35,77,93,34,26,56,90,68,78,75,3,87,8,44,90,78,5,58,86,78},new int[]{12,67,94,20,3,33,77,18,75,26,7,90,3,1,17,12,73,81,82,23,91,2,27},new int[]{55,15,44,69,95,49,63,35,19,53,92,2,52,20,59,3,8,40,30,12,49,17,66},new int[]{23,39,27,57,19,44,66,32,33,43,23,14,80,57,98,57,58,62,40,44,47,84,46},new int[]{53,29,49,53,9,73,25,47,81,50,71,16,37,18,39,78,56,82,8,57,89,20,57},new int[]{1,88,13,75,52,97,30,81,57,5,22,51,79,74,1,46,79,42,42,93,64,21,79},new int[]{99,69,19,14,15,51,83,91,16,83,53,55,23,36,18,45,88,71,89,45,7,69,88},new int[]{84,85,20,74,87,46,33,15,34,79,5,9,91,64,60,28,9,50,36,9,31,45,55},new int[]{78,15,41,66,63,96,27,64,60,56,71,14,60,93,40,20,51,5,82,72,50,71,88},new int[]{60,86,20,27,20,6,8,79,22,35,42,77,92,20,93,69,3,27,69,60,20,23,96},new int[]{12,55,49,96,80,27,65,51,76,77,72,44,29,39,16,5,43,57,97,20,36,96,48},new int[]{50,2,12,39,53,63,12,34,34,12,17,6,30,86,37,87,80,26,48,40,31,46,66},new int[]{67,88,91,37,17,94,68,59,82,40,27,95,12,31,28,26,13,82,17,41,32,22,99},new int[]{80,50,3,22,59,95,16,66,40,56,86,56,78,14,62,69,27,47,80,68,87,74,95},new int[]{17,27,51,59,59,79,24,54,99,13,14,70,70,52,96,85,21,30,54,86,19,59,47}}); param0.add(new int[][]{new int[]{1,88,52,21,60,48,74,12,87,76,80,55,3,66,6,22,67,73,21,37,33,1,65,71,37,40,63,52,76,32,27,42,52},new int[]{29,46,66,46,83,25,99,65,57,28,18,63,18,24,51,29,19,31,95,86,29,20,66,68,46,19,7,42,16,52,33,39,43},new int[]{84,46,4,15,43,30,39,43,14,70,86,18,46,79,21,76,91,61,75,95,65,25,89,81,71,32,48,89,82,35,90,76,78},new int[]{8,22,76,32,46,13,33,1,92,67,80,50,32,10,1,71,47,7,62,52,68,4,57,89,5,71,55,67,57,99,75,76,39},new int[]{80,43,71,85,10,82,29,26,30,65,38,15,89,19,28,97,15,78,61,38,99,32,78,77,41,85,76,15,88,84,63,1,43},new int[]{14,2,8,11,20,44,59,17,12,84,74,21,67,4,88,54,27,95,74,68,76,79,90,34,1,59,52,45,18,73,50,34,54},new int[]{54,52,30,4,53,24,50,45,61,90,7,45,85,78,34,10,11,45,49,40,51,71,99,28,62,15,38,49,1,50,14,13,22},new int[]{57,85,41,37,82,73,95,5,31,65,86,57,15,90,29,54,41,91,34,85,76,35,55,98,33,42,87,8,83,99,91,30,84},new int[]{92,74,42,25,14,65,30,13,89,12,24,70,73,38,87,52,70,35,28,5,42,84,80,20,22,51,87,76,47,97,39,28,68},new int[]{47,72,21,48,50,49,76,62,35,80,72,5,76,90,37,73,41,92,40,58,72,2,50,86,94,80,48,24,91,33,70,94,42},new int[]{26,78,95,16,21,2,59,8,7,90,21,18,82,1,91,8,92,2,22,20,78,35,60,31,41,67,72,90,24,15,38,79,99},new int[]{38,81,95,66,5,2,2,90,38,37,10,91,72,74,99,24,24,95,4,40,14,26,12,27,6,27,14,22,49,20,3,73,80},new int[]{73,49,96,98,25,27,91,2,22,66,48,53,1,54,39,10,12,37,46,17,3,85,76,59,27,15,45,41,67,5,34,63,98},new int[]{85,13,89,14,82,61,3,3,45,96,18,32,96,44,93,37,99,27,40,24,56,36,99,6,71,78,17,61,27,44,70,3,39},new int[]{35,66,83,87,17,9,9,35,9,12,67,85,57,92,97,98,43,22,60,30,31,80,99,65,73,65,87,37,82,4,10,27,2},new int[]{55,68,40,97,8,15,61,7,94,24,20,55,5,7,2,74,77,21,3,53,14,53,80,63,54,72,24,78,50,6,88,93,26},new int[]{34,44,69,98,98,77,67,5,86,85,91,88,39,53,8,68,36,70,95,69,6,2,1,62,29,87,18,3,80,31,22,8,22},new int[]{77,29,80,10,46,34,56,59,33,78,96,23,15,25,26,12,64,19,49,19,96,74,91,23,56,63,52,64,18,99,50,13,66},new int[]{36,22,84,7,12,79,93,8,23,13,97,5,83,7,68,9,19,89,65,68,82,71,83,52,87,28,93,6,44,27,46,4,87},new int[]{30,45,58,62,54,24,96,75,30,90,80,57,53,70,89,84,10,1,44,59,11,76,20,76,60,44,16,79,62,90,56,75,3},new int[]{2,44,83,96,87,44,24,13,1,39,5,13,8,51,49,49,48,40,30,44,92,93,53,36,84,69,71,30,38,7,75,75,84},new int[]{33,79,68,51,10,38,40,3,24,2,23,51,59,42,19,8,26,82,44,48,73,36,9,97,11,41,62,88,24,32,33,81,90},new int[]{45,33,2,66,78,21,87,22,65,32,29,69,36,25,22,69,52,67,24,97,92,47,85,80,11,6,51,83,61,82,44,10,76},new int[]{33,64,15,76,50,5,1,38,98,12,30,11,73,44,46,71,81,52,63,26,27,97,39,5,73,87,94,36,1,52,8,1,74},new int[]{7,38,59,60,67,7,8,34,40,42,96,32,69,91,13,55,12,74,1,85,7,10,81,37,48,65,42,13,23,57,92,19,32},new int[]{10,82,8,16,35,58,81,48,48,23,26,55,23,50,23,54,56,45,71,12,22,17,77,48,78,71,50,83,59,39,71,60,91},new int[]{17,34,75,9,39,67,23,40,4,57,16,59,85,25,5,1,96,20,11,97,32,83,39,45,57,82,36,42,88,96,9,24,79},new int[]{47,46,86,98,59,10,2,42,7,1,9,42,26,79,57,22,87,3,11,56,86,62,40,78,16,98,5,53,72,66,11,45,62},new int[]{87,65,74,6,67,83,29,79,87,49,8,89,88,52,12,1,4,94,98,60,43,97,44,30,40,13,30,19,20,38,63,68,23},new int[]{89,11,31,76,41,98,57,30,80,96,82,8,95,36,77,82,62,35,27,6,64,74,37,47,44,71,80,66,43,57,47,89,90},new int[]{90,18,20,92,67,57,1,74,95,84,56,8,48,58,64,71,57,51,99,40,84,3,63,11,58,76,46,12,8,45,86,84,15},new int[]{49,31,46,94,40,31,20,2,6,78,26,97,87,89,37,92,99,71,59,66,64,17,91,48,66,12,80,32,18,62,16,5,24},new int[]{49,75,64,46,42,88,78,1,90,26,68,90,4,96,16,80,40,84,81,49,84,96,42,11,62,93,55,27,85,29,32,41,12}}); param0.add(new int[][]{new int[]{97,17,59,40,18,53,65,84,85,42,38,32,22,61,89,32,31,99,58,77,80,56,83,41,15,46,97,59,65,51,13,24,87,93,16,49,32,16,43,88,53,21,33,59,60},new int[]{27,29,33,50,32,46,28,51,26,48,58,47,63,47,70,19,79,81,98,65,19,67,81,46,78,75,80,54,94,91,82,87,49,27,56,44,75,77,44,23,90,42,64,34,99},new int[]{43,84,88,96,26,2,13,3,12,27,14,74,38,76,40,75,50,66,95,62,10,6,55,42,61,22,47,19,74,47,91,92,10,45,60,17,79,43,12,84,64,80,47,84,50},new int[]{27,22,91,13,59,69,81,98,22,94,67,71,15,71,3,29,6,49,91,65,54,34,58,8,89,15,38,11,73,27,77,76,11,58,35,44,57,87,21,28,7,77,95,35,81},new int[]{88,86,74,80,6,12,1,16,98,63,58,91,5,83,11,37,63,75,8,53,16,95,11,65,47,81,49,25,55,26,34,2,16,31,22,86,32,70,2,71,11,10,16,51,1},new int[]{35,39,74,59,99,77,78,76,44,3,38,75,98,25,87,72,64,27,50,4,62,88,60,63,13,31,64,14,84,86,76,67,96,5,96,76,92,91,87,68,69,45,9,9,93},new int[]{57,81,83,66,96,54,15,2,78,96,49,90,12,90,36,76,97,90,87,13,37,40,92,34,54,83,89,99,85,70,16,24,51,16,94,28,74,17,84,48,24,80,20,55,26},new int[]{29,22,20,96,29,87,57,98,76,83,17,86,10,82,69,1,90,89,77,39,46,12,20,6,18,2,73,33,54,1,75,22,68,21,29,20,69,51,27,97,18,22,41,37,18},new int[]{21,6,28,2,79,11,11,26,91,43,87,56,8,63,46,59,84,98,26,65,63,88,53,41,93,11,8,30,79,82,25,64,60,11,48,51,73,32,12,42,23,88,83,74,82},new int[]{15,94,47,98,42,39,13,42,23,45,22,60,27,52,69,11,40,6,67,32,74,40,20,18,98,82,2,13,56,46,62,77,47,59,90,64,12,12,12,23,18,24,47,91,70},new int[]{40,45,67,62,58,95,96,92,54,9,34,60,27,27,60,25,83,78,40,83,76,95,36,25,58,61,52,6,14,7,93,90,34,36,51,75,76,81,87,31,82,53,61,26,87},new int[]{50,8,23,75,95,19,22,41,81,49,57,91,31,17,17,98,99,11,84,60,4,58,3,72,36,43,83,20,5,90,86,55,26,50,74,88,52,96,61,89,15,53,34,16,47},new int[]{64,74,70,61,41,85,45,2,49,19,38,87,17,6,54,48,44,59,34,15,91,22,35,83,2,44,20,45,62,61,97,81,56,56,2,12,82,23,19,54,69,21,60,20,80},new int[]{6,59,90,96,99,23,54,18,42,85,48,13,28,14,94,37,99,47,53,41,40,22,35,77,9,80,77,18,53,73,8,19,80,75,43,92,32,19,7,24,23,7,40,79,23},new int[]{79,72,73,91,22,22,20,21,14,85,22,33,78,13,86,90,85,15,75,12,6,32,24,17,98,88,25,60,63,86,23,86,84,45,76,81,53,27,65,45,56,1,37,78,43},new int[]{90,67,47,22,16,72,11,25,17,50,89,84,15,7,22,32,89,15,10,5,81,6,3,31,43,72,33,23,43,12,10,33,13,48,6,24,27,92,63,99,24,55,10,20,22},new int[]{45,52,19,18,80,74,48,70,47,13,8,88,84,89,5,68,90,35,15,35,75,33,40,68,60,21,67,96,35,1,18,6,19,31,48,60,56,49,8,70,87,68,12,15,51},new int[]{68,10,30,46,76,42,39,8,59,61,70,81,87,50,7,97,53,7,96,93,30,77,54,38,82,30,85,30,18,62,98,29,49,45,51,20,31,47,83,13,77,45,70,57,87},new int[]{28,1,55,6,63,56,56,97,48,21,77,81,95,80,48,64,45,45,17,72,42,89,64,95,92,52,40,64,8,51,66,73,50,20,68,99,60,54,64,43,32,9,30,49,1},new int[]{49,96,37,62,18,86,55,83,16,85,49,64,57,39,68,15,12,80,64,93,89,77,20,34,19,75,93,92,19,82,49,29,20,28,8,40,46,56,99,69,41,89,84,71,28},new int[]{25,56,58,92,77,94,72,67,80,80,87,10,6,83,38,90,18,91,20,6,81,30,16,25,51,16,70,37,64,71,60,96,55,52,56,17,27,3,92,98,29,4,27,84,76},new int[]{99,74,14,56,22,24,90,11,84,72,29,73,38,70,92,90,9,45,26,89,52,6,21,60,59,21,91,11,20,17,98,51,64,55,86,16,85,77,98,54,54,56,7,96,13},new int[]{96,83,88,44,40,69,28,81,40,94,62,59,50,11,15,60,10,20,30,35,99,96,59,51,58,12,46,7,64,18,28,11,98,35,76,76,15,54,40,19,40,53,10,72,22},new int[]{21,20,69,1,27,36,33,90,63,14,86,32,11,93,93,74,65,49,84,94,34,61,56,95,39,50,30,14,35,25,53,56,29,40,65,53,99,64,21,81,14,10,74,1,12},new int[]{79,15,42,97,70,30,28,31,17,97,85,50,51,87,67,49,92,28,81,14,80,89,3,69,70,95,68,67,60,68,99,44,74,55,69,78,34,2,79,34,4,12,13,73,4},new int[]{31,44,56,6,71,62,82,94,22,78,12,48,46,72,25,42,75,55,25,80,81,54,92,68,98,26,6,52,85,64,58,57,72,68,75,34,2,83,39,67,73,95,76,12,73},new int[]{39,32,69,72,32,22,88,51,91,41,50,17,45,59,44,32,48,30,28,83,18,20,74,11,60,34,39,38,17,49,87,71,6,56,24,60,72,4,81,66,22,51,51,16,85},new int[]{40,8,71,64,71,4,25,59,70,82,79,85,16,55,24,11,71,42,3,41,22,26,4,16,63,17,19,79,7,66,55,45,87,72,1,17,39,8,57,85,50,55,26,95,53},new int[]{33,30,94,36,21,41,37,21,29,8,52,39,69,14,85,38,15,30,71,27,72,35,41,53,61,95,45,30,91,1,33,78,7,62,22,51,69,85,55,31,54,27,44,79,87},new int[]{60,53,17,94,36,66,2,97,20,10,69,58,81,47,63,39,62,82,60,73,74,32,63,39,18,24,2,16,79,51,84,54,56,62,71,82,89,77,60,75,72,91,20,64,98},new int[]{68,79,77,49,86,26,52,61,9,5,30,4,31,14,25,28,15,67,95,77,9,66,23,48,33,28,63,8,36,2,24,22,79,24,69,91,97,53,85,81,58,35,55,26,46},new int[]{25,85,11,24,78,24,73,2,6,25,81,3,5,32,48,55,93,36,36,25,56,28,35,13,79,60,27,75,6,56,27,42,94,97,38,55,19,86,13,68,6,29,94,89,61},new int[]{15,12,21,82,25,38,69,76,49,29,62,42,22,95,48,28,23,53,16,60,40,97,39,68,6,47,11,10,31,71,14,59,6,58,18,33,30,84,92,1,57,81,59,26,53},new int[]{18,24,18,39,79,36,90,32,84,70,91,72,39,86,37,38,71,73,34,98,28,63,73,30,41,95,8,8,78,9,98,25,9,64,3,96,27,74,66,82,59,40,24,23,41},new int[]{53,49,66,61,64,34,27,64,60,35,53,72,71,58,13,76,77,53,17,57,60,15,78,19,35,18,17,84,25,37,23,23,75,46,84,7,87,62,23,91,85,21,58,96,50},new int[]{28,66,93,9,35,61,68,86,23,6,84,69,12,59,65,39,41,3,42,43,85,66,96,29,47,92,97,26,15,45,90,73,61,85,20,49,27,65,9,58,51,38,84,19,44},new int[]{11,78,89,76,45,7,3,80,62,1,15,44,11,1,3,22,43,6,22,50,28,78,96,29,5,35,11,1,7,3,86,31,3,17,18,79,99,80,94,99,17,79,42,27,65},new int[]{30,30,69,65,4,11,58,13,10,88,84,18,87,42,99,44,62,91,79,24,30,65,41,67,24,32,63,4,98,1,21,8,46,12,1,22,78,89,28,72,64,40,89,55,87},new int[]{60,41,80,59,68,36,33,94,45,75,50,47,77,44,68,88,33,97,76,21,97,46,97,73,31,62,94,16,12,54,9,35,53,43,70,89,56,64,28,87,29,86,58,24,20},new int[]{27,97,19,90,38,60,3,23,59,91,91,74,24,56,52,41,66,98,22,66,28,88,38,86,67,58,37,2,57,87,77,79,97,45,53,77,84,7,77,39,68,63,46,91,96},new int[]{2,15,5,3,16,49,90,6,35,38,84,86,64,85,32,1,48,23,18,17,31,93,54,77,60,66,73,96,86,18,18,83,63,31,29,88,97,83,80,51,32,21,30,7,38},new int[]{12,59,92,14,71,17,23,77,20,5,6,13,3,53,31,3,8,71,50,71,75,88,59,21,20,93,74,49,80,74,38,33,69,59,12,8,70,87,48,67,38,93,34,4,7},new int[]{85,74,96,89,77,85,83,59,8,61,50,84,8,16,48,62,56,28,74,21,44,79,70,41,35,56,85,17,26,63,74,34,71,32,4,10,79,56,35,33,25,47,11,34,36},new int[]{17,12,80,97,26,74,13,82,85,87,87,36,69,45,79,88,12,83,97,89,38,77,88,67,76,66,20,40,34,22,15,97,66,35,98,91,31,77,53,94,90,88,57,65,38},new int[]{38,86,10,46,27,42,2,58,19,62,11,14,57,33,44,18,29,30,3,32,15,49,87,60,98,46,80,50,6,80,20,49,28,26,56,48,6,53,59,80,33,12,78,39,2}}); param0.add(new int[][]{new int[]{19,98,9,31,79,4,63,46,32,81,5,39,97,92,13,68,28,13,92,57,99,24,9,7,22,3,72,4,42,2,53,46,6,57,86,3,17,74,88,60,39,28,45,94},new int[]{92,4,82,39,3,65,97,16,46,94,40,55,97,36,60,95,36,36,47,48,10,22,28,36,32,13,34,63,65,80,91,22,31,48,93,22,71,55,40,4,78,43,81,65},new int[]{2,82,3,56,85,77,49,27,60,67,69,37,48,66,94,70,27,77,5,52,58,25,91,62,16,48,71,52,67,15,81,67,61,66,69,24,95,44,71,25,20,89,66,66},new int[]{10,50,70,11,93,30,85,27,42,36,45,97,27,56,37,70,39,8,76,47,67,54,9,43,12,40,3,97,77,12,37,7,70,41,4,87,4,67,38,27,11,93,93,37},new int[]{58,8,32,78,84,88,93,60,65,10,19,39,45,48,18,71,88,86,16,6,71,82,99,49,88,80,19,83,65,22,31,14,30,95,51,32,43,17,92,98,62,17,61,6},new int[]{93,9,31,30,59,73,10,64,33,3,93,53,41,78,15,10,80,97,92,39,24,79,13,83,11,13,40,59,96,54,61,90,59,80,17,13,13,15,11,1,35,82,44,58},new int[]{1,86,52,66,94,53,82,65,3,74,48,15,67,77,62,88,30,43,32,99,35,55,15,34,98,82,99,23,32,50,50,83,93,40,44,12,68,22,43,79,85,42,99,19},new int[]{72,79,4,25,51,60,37,26,73,44,55,50,31,70,25,60,6,19,5,69,59,54,5,49,20,54,77,73,78,13,97,48,87,94,63,82,82,43,78,12,39,91,57,93},new int[]{71,79,83,9,84,62,22,36,96,3,82,16,3,76,88,58,75,23,33,68,61,14,38,73,98,53,61,33,83,67,56,61,38,27,40,6,96,48,18,32,84,36,79,23},new int[]{14,85,46,3,7,17,68,58,50,99,70,96,99,46,59,22,72,91,28,2,59,54,66,63,27,7,12,8,9,86,18,92,38,34,70,95,15,61,68,5,87,77,61,27},new int[]{45,58,95,19,30,63,94,5,62,75,74,41,65,79,85,86,96,26,77,69,78,54,55,68,8,9,95,3,27,9,93,98,29,74,77,65,40,78,96,80,56,26,33,95},new int[]{72,25,97,94,1,1,27,68,37,24,44,88,6,39,65,93,88,77,92,15,64,31,86,76,17,26,77,53,41,45,81,26,51,92,38,50,42,42,32,85,9,80,5,38},new int[]{9,70,79,82,69,41,74,80,27,40,53,23,92,75,4,68,80,28,29,58,17,70,18,13,64,60,61,35,89,55,35,42,11,76,54,38,32,78,25,97,98,59,70,57},new int[]{41,4,7,99,19,31,20,21,25,12,98,17,96,1,79,65,63,25,71,34,44,70,1,79,77,21,77,40,17,17,76,34,39,75,14,79,87,4,33,25,41,86,32,1},new int[]{63,88,53,7,43,37,70,15,34,63,65,72,35,76,46,24,1,77,79,34,37,13,16,36,70,98,76,54,44,38,47,49,36,64,63,24,68,89,11,46,3,7,54,11},new int[]{65,41,55,59,26,54,14,47,16,12,93,59,32,10,93,83,55,73,89,19,39,9,17,91,8,87,55,77,41,8,13,77,55,81,20,69,25,16,43,82,59,73,35,10},new int[]{99,19,13,89,69,81,34,43,87,67,10,32,97,71,13,38,11,15,87,83,8,49,88,66,30,44,54,97,83,31,24,86,39,93,34,61,4,50,53,81,28,38,4,16},new int[]{42,43,64,31,79,9,68,83,34,88,11,35,28,92,11,38,98,15,61,8,65,24,50,10,17,78,1,11,41,3,17,64,75,88,33,32,25,91,47,43,81,81,57,40},new int[]{68,82,75,41,40,76,37,74,15,58,58,11,98,99,8,31,15,93,79,64,31,7,94,89,79,77,74,19,49,15,3,18,22,96,95,74,45,21,34,93,74,28,54,10},new int[]{32,78,32,52,30,56,72,19,22,88,28,41,43,69,73,72,59,56,82,40,77,70,16,18,42,81,2,82,64,11,55,2,2,57,18,86,16,27,17,54,17,6,97,13},new int[]{6,90,83,19,61,90,86,11,86,96,7,86,6,15,38,41,56,18,35,98,45,29,69,88,32,94,5,44,98,50,82,21,22,61,39,85,99,5,33,71,24,39,72,15},new int[]{70,5,87,48,20,76,21,86,89,12,66,30,7,58,18,60,18,92,48,34,72,83,6,45,60,71,84,24,93,92,69,17,62,33,62,6,3,74,54,11,87,46,4,7},new int[]{26,97,35,28,41,50,99,39,80,10,71,7,25,69,90,30,11,71,39,26,57,55,22,12,64,86,66,60,62,52,62,76,65,15,40,7,55,37,86,97,33,29,19,69},new int[]{14,9,5,35,85,28,45,2,6,31,32,75,59,14,74,59,1,55,31,59,8,66,99,95,12,31,99,96,81,57,8,19,53,11,57,69,59,28,2,11,64,18,47,53},new int[]{5,19,5,40,83,76,92,48,99,23,55,34,87,97,58,77,98,93,30,61,82,56,99,5,4,69,39,79,73,50,72,74,22,88,24,73,22,34,48,76,81,4,57,63},new int[]{30,65,97,91,78,4,35,33,51,12,68,98,78,2,91,95,33,91,45,56,28,98,30,34,1,52,13,82,40,65,9,70,72,72,88,49,25,26,26,40,34,8,2,82},new int[]{16,92,72,63,18,39,42,83,32,62,32,85,93,69,84,22,27,1,13,97,6,13,78,72,67,37,76,8,93,20,62,23,68,25,32,58,25,69,10,64,31,4,57,71},new int[]{34,21,83,7,98,58,33,42,53,85,55,50,38,81,46,81,15,8,49,53,37,83,93,38,97,28,61,97,7,99,72,7,59,21,25,67,32,48,55,75,85,96,66,23},new int[]{45,10,78,55,60,9,83,3,32,54,87,83,76,23,14,36,48,67,10,86,68,79,52,99,49,44,5,92,91,15,94,8,55,20,77,6,1,46,42,82,70,49,90,34},new int[]{57,17,89,63,61,59,92,79,4,91,33,20,21,41,74,44,32,64,37,61,26,22,40,59,50,77,96,73,39,16,98,74,88,10,45,90,34,63,68,93,86,89,11,84},new int[]{88,95,25,69,31,57,87,53,81,66,56,66,91,22,81,53,57,33,5,13,17,43,84,84,92,12,84,71,56,69,29,25,11,41,11,96,38,82,62,79,81,24,44,19},new int[]{37,5,4,1,94,17,43,50,30,64,82,36,1,69,82,29,81,85,66,36,62,20,83,54,82,13,47,75,97,28,55,43,44,21,94,53,47,96,87,25,96,41,31,13},new int[]{6,1,8,56,62,87,69,93,22,64,69,17,18,45,54,39,65,95,88,54,16,69,32,26,35,53,43,41,24,44,79,23,75,94,45,94,55,70,69,64,14,30,4,6},new int[]{39,18,51,56,89,57,59,61,17,97,38,76,81,89,37,17,91,31,14,53,36,86,5,40,70,69,88,22,14,25,84,65,49,35,52,92,29,58,72,82,31,21,6,9},new int[]{30,18,30,84,60,55,10,13,41,2,5,33,65,37,61,58,12,41,28,82,36,94,42,54,54,38,85,71,69,58,99,79,9,48,18,12,27,78,77,94,36,49,9,34},new int[]{76,50,89,50,22,5,15,18,77,15,89,98,66,21,87,81,61,4,48,1,7,61,53,95,35,21,60,76,5,3,59,76,10,46,50,62,59,94,17,56,44,19,18,26},new int[]{28,49,32,20,85,46,58,16,76,1,46,32,14,14,83,65,25,42,13,53,68,60,84,68,41,6,26,91,22,29,40,66,36,87,19,16,88,34,63,25,75,69,84,14},new int[]{21,90,44,52,79,85,80,75,48,78,85,62,80,2,42,66,28,5,8,73,81,83,42,26,95,98,93,74,58,11,97,95,22,54,93,41,85,40,12,16,43,26,94,87},new int[]{97,88,6,98,19,23,25,93,16,2,93,58,97,18,44,54,9,2,55,5,20,4,5,17,5,50,72,96,25,25,89,42,31,92,47,79,51,55,60,27,39,78,13,96},new int[]{35,48,14,36,53,39,5,72,10,2,95,39,25,34,79,56,81,22,33,70,58,82,30,63,67,95,12,10,62,63,36,56,6,31,33,74,63,38,26,16,24,24,73,25},new int[]{23,54,67,32,74,47,35,86,14,25,59,54,79,94,95,78,8,8,95,3,97,12,32,96,21,74,41,42,57,90,77,62,73,97,95,56,12,56,58,23,89,93,33,18},new int[]{41,12,62,58,4,13,31,22,39,58,30,34,95,6,90,49,45,77,93,50,26,39,86,52,4,35,5,28,21,73,10,55,33,40,5,73,81,33,81,70,91,91,78,5},new int[]{81,4,71,37,78,13,29,98,98,39,48,89,35,62,20,95,59,44,54,89,58,93,52,50,46,98,10,19,11,40,40,36,87,55,44,89,44,45,85,63,91,2,6,99},new int[]{73,20,55,97,47,93,27,1,13,67,65,84,58,90,76,70,50,9,55,36,20,10,10,31,84,89,45,31,9,88,4,45,24,78,72,91,53,94,78,40,58,82,77,29}}); param0.add(new int[][]{new int[]{91,36,24,57},new int[]{88,3,45,19},new int[]{49,9,86,22},new int[]{55,16,72,81}}); param0.add(new int[][]{new int[]{27,35,35,78,52,41,22,22,75,96,91,20,46,34,83,62,10,13,92,8,86,54,92,16,17,40,49,62,19,49,38,82,62,37,93,15,85},new int[]{61,56,7,36,86,37,70,40,78,17,1,44,66,42,45,46,55,21,5,84,41,86,40,87,65,13,88,89,92,68,23,4,40,61,58,98,84},new int[]{17,30,92,24,95,96,38,59,63,93,64,71,52,54,15,56,70,54,81,97,61,44,1,63,59,3,13,11,61,12,82,80,33,41,4,88,47},new int[]{46,54,71,9,83,93,70,36,58,86,86,38,43,67,25,78,5,18,28,30,70,95,18,25,34,72,92,71,63,98,25,65,59,66,98,96,63},new int[]{12,44,54,26,54,86,31,97,22,48,8,80,28,78,68,24,83,25,47,17,66,91,8,62,37,5,46,4,59,70,29,8,48,74,99,61,53},new int[]{74,64,16,76,25,79,64,78,60,70,67,27,17,89,35,69,62,94,82,84,27,44,81,63,98,56,8,57,76,61,99,3,47,14,45,79,39},new int[]{67,24,62,2,69,68,2,62,11,17,12,83,77,83,84,21,56,31,31,69,40,2,11,52,24,48,62,95,2,90,17,60,55,49,75,55,42},new int[]{77,90,94,20,72,64,84,75,28,75,73,36,27,6,28,13,87,47,11,85,39,24,75,45,90,48,42,84,59,29,68,82,46,58,12,32,95},new int[]{8,89,11,26,41,60,19,48,17,63,10,34,93,51,45,28,18,96,36,5,82,80,3,6,97,60,80,44,66,66,69,92,52,1,5,68,93},new int[]{66,79,5,59,95,26,14,41,75,83,74,52,42,81,82,60,89,15,47,33,95,37,47,36,70,46,52,72,75,26,29,2,24,18,33,85,86},new int[]{33,32,33,40,62,14,45,26,27,10,71,81,43,68,97,16,24,21,93,50,79,62,92,52,18,8,9,59,44,70,98,67,18,83,73,13,40},new int[]{69,47,24,37,44,46,44,75,60,74,3,17,51,5,35,82,91,90,57,31,77,60,80,50,22,80,72,32,18,33,64,45,38,30,64,42,13},new int[]{77,68,42,6,79,27,96,53,7,31,88,66,72,71,65,8,53,68,30,83,61,37,84,45,53,13,32,62,2,77,8,96,48,14,85,33,36},new int[]{85,59,70,69,48,30,28,41,76,58,41,11,6,20,91,29,73,48,71,85,82,15,2,97,75,53,55,70,13,44,58,17,41,25,69,14,29},new int[]{52,30,12,91,95,93,91,69,9,26,27,15,79,98,14,2,46,70,80,73,80,44,86,19,72,44,45,85,67,79,66,22,17,58,80,47,14},new int[]{41,69,55,21,80,31,32,80,9,37,9,21,56,8,24,80,95,20,5,50,2,67,58,96,89,99,30,15,93,2,70,93,22,70,93,62,81},new int[]{96,82,25,18,46,75,69,63,54,27,44,62,70,75,29,96,4,69,60,82,72,23,38,62,12,85,22,96,58,92,61,18,67,94,77,65,35},new int[]{39,26,17,50,32,22,39,89,32,88,59,8,44,30,77,23,64,77,30,70,94,98,17,88,73,54,19,31,25,97,38,55,50,37,35,96,60},new int[]{86,67,75,88,98,30,15,75,84,88,74,39,99,42,95,27,5,76,98,75,29,62,91,56,43,80,79,13,97,5,94,50,49,90,73,69,99},new int[]{55,59,1,67,9,26,66,92,20,90,14,2,21,59,19,46,15,32,36,78,35,9,98,95,25,41,44,74,98,49,55,15,66,62,26,42,35},new int[]{45,32,62,64,52,96,43,92,55,44,91,79,59,54,88,85,1,85,87,22,50,31,50,29,39,1,65,50,18,49,75,37,70,76,35,72,43},new int[]{65,43,66,35,34,42,80,8,6,40,68,23,63,14,89,58,36,34,76,21,45,58,15,45,17,50,88,55,92,31,31,85,97,10,66,53,11},new int[]{56,79,89,34,87,43,92,68,3,14,29,85,17,70,45,53,50,48,69,65,74,5,28,96,71,42,60,2,22,92,97,95,98,10,28,88,78},new int[]{36,61,2,51,34,35,43,11,32,38,47,81,85,95,5,64,86,53,29,1,30,26,86,10,13,25,15,1,75,44,35,13,19,48,12,73,84},new int[]{82,64,25,6,5,38,12,55,66,67,26,51,31,6,30,96,82,39,9,99,73,63,70,99,4,30,45,26,74,70,31,26,71,8,61,85,38},new int[]{48,62,97,16,3,62,56,67,99,87,12,88,55,13,15,7,24,13,19,67,5,50,74,64,48,49,84,80,63,7,98,34,79,5,57,74,42},new int[]{72,85,45,71,40,9,64,93,60,20,17,39,63,22,71,45,28,6,81,66,61,8,7,80,66,22,43,49,71,26,98,54,39,12,41,99,2},new int[]{52,93,84,53,55,19,26,37,13,87,25,58,47,23,3,51,78,79,35,78,17,6,58,84,48,10,14,27,68,83,52,51,45,66,57,27,47},new int[]{88,42,63,58,68,66,46,22,85,54,78,84,98,84,33,73,42,38,77,13,55,69,97,58,49,50,46,1,91,39,6,52,68,73,63,90,2},new int[]{61,24,64,5,65,50,55,35,71,4,50,85,73,90,58,1,20,75,32,13,28,10,2,5,71,97,71,66,14,85,18,14,13,83,21,30,35},new int[]{96,51,55,58,82,71,12,74,38,3,46,73,57,71,26,46,48,18,63,44,57,59,82,62,46,18,85,15,6,60,59,82,23,32,35,55,35},new int[]{2,24,90,62,90,44,4,22,51,16,56,30,66,37,18,19,94,9,31,82,69,74,86,49,40,80,23,94,60,10,75,92,30,25,27,72,74},new int[]{98,93,17,27,23,91,74,80,70,1,89,49,17,33,32,14,4,96,62,17,89,14,6,11,28,9,72,30,60,44,38,80,64,84,74,62,53},new int[]{99,7,63,10,21,94,70,34,12,75,55,68,87,33,33,14,2,3,52,18,35,68,8,71,37,44,26,11,57,81,69,77,20,99,82,14,77},new int[]{86,13,54,5,89,15,79,15,86,36,85,17,13,59,94,16,60,16,50,99,49,2,8,91,69,92,58,52,5,23,42,74,26,71,82,83,2},new int[]{89,44,88,67,64,70,91,85,18,33,46,80,57,85,66,51,45,2,39,3,80,28,28,97,31,44,20,11,11,39,6,64,63,60,63,31,38},new int[]{99,18,9,42,28,67,23,10,5,2,25,60,87,67,53,17,41,33,92,5,87,73,70,6,73,81,13,3,73,14,67,36,84,46,82,1,20}}); List param1 = new ArrayList<>(); param1.add(0); param1.add(3); param1.add(3); param1.add(13); param1.add(12); param1.add(22); param1.add(34); param1.add(37); param1.add(3); param1.add(36); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , N ) : for i in range ( N ) : for j in range ( N ) : if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) : return False return True ",,," if __name__ == '__main__': param = [ ([[29]],0,), ([[ 1, 3, 5 ], [ 3, 2, 4 ], [ 5, 4, 1 ]], 3,), ([[ 1, 2, 5 ], [ 3, 2, 4 ], [ 5, 4, 1 ]], 3,), ([[37, 56, 39, 95, 78, 69, 89, 45, 66, 99, 20, 10, 6, 33, 78, 26, 86, 61, 78, 36, 62, 23, 80, 89, 83], [42, 75, 30, 64, 25, 95, 17, 90, 6, 11, 1, 77, 16, 75, 86, 96, 67, 27, 80, 27, 99, 2, 82, 48, 25], [36, 83, 89, 85, 38, 40, 12, 29, 71, 29, 96, 75, 37, 79, 90, 66, 62, 29, 68, 98, 99, 74, 98, 88, 94], [69, 5, 52, 10, 35, 63, 75, 55, 17, 45, 65, 56, 70, 52, 61, 94, 61, 35, 13, 51, 1, 23, 77, 34, 80], [64, 11, 91, 93, 65, 22, 41, 25, 7, 85, 26, 82, 97, 51, 24, 10, 13, 95, 18, 11, 58, 32, 21, 41, 60], [90, 46, 56, 8, 17, 36, 86, 73, 5, 56, 59, 14, 45, 75, 51, 58, 95, 71, 39, 85, 57, 29, 75, 13, 44], [40, 43, 89, 50, 56, 62, 55, 30, 28, 68, 41, 84, 12, 77, 90, 38, 53, 23, 42, 84, 67, 11, 94, 10, 77], [74, 31, 44, 37, 25, 93, 21, 15, 11, 98, 75, 45, 8, 98, 26, 21, 52, 50, 24, 96, 82, 26, 41, 51, 16], [41, 52, 57, 84, 51, 59, 79, 68, 40, 16, 76, 35, 26, 73, 80, 59, 79, 84, 3, 5, 40, 55, 77, 48, 93], [71, 53, 72, 27, 73, 96, 36, 36, 39, 75, 57, 36, 7, 21, 15, 46, 88, 47, 59, 61, 41, 54, 23, 73, 12], [8, 22, 50, 34, 84, 96, 13, 20, 8, 70, 99, 97, 25, 14, 97, 59, 51, 53, 16, 67, 38, 74, 45, 97, 16], [95, 25, 78, 52, 46, 8, 73, 56, 13, 78, 63, 15, 53, 55, 5, 39, 13, 67, 97, 19, 31, 96, 53, 66, 80], [5, 30, 49, 58, 18, 36, 38, 50, 49, 28, 56, 33, 2, 2, 32, 12, 39, 51, 6, 15, 96, 47, 45, 45, 15], [10, 79, 97, 99, 12, 35, 4, 10, 84, 43, 31, 31, 31, 20, 73, 77, 37, 59, 24, 89, 59, 94, 88, 73, 29], [74, 78, 86, 45, 12, 8, 60, 67, 26, 20, 81, 31, 77, 42, 50, 32, 6, 32, 32, 43, 32, 1, 11, 12, 21], [21, 10, 9, 12, 32, 85, 18, 50, 39, 69, 5, 71, 56, 78, 22, 97, 99, 93, 79, 31, 92, 18, 8, 33, 15], [7, 35, 36, 40, 77, 41, 11, 87, 51, 23, 46, 4, 42, 34, 46, 7, 37, 20, 99, 29, 97, 36, 71, 56, 96], [5, 57, 15, 64, 45, 54, 2, 56, 40, 1, 16, 6, 72, 80, 47, 76, 6, 48, 2, 75, 61, 11, 10, 98, 75], [98, 75, 99, 62, 8, 10, 96, 52, 95, 4, 3, 45, 30, 75, 47, 34, 67, 57, 21, 41, 75, 75, 88, 53, 99], [40, 77, 89, 69, 74, 98, 68, 89, 99, 22, 23, 24, 74, 67, 11, 60, 34, 16, 26, 43, 19, 28, 48, 52, 85], [81, 50, 42, 81, 54, 72, 87, 27, 47, 26, 83, 34, 15, 4, 1, 92, 40, 74, 92, 61, 36, 18, 3, 43, 46], [80, 28, 65, 52, 79, 12, 96, 25, 80, 36, 21, 10, 76, 78, 63, 51, 27, 18, 53, 55, 98, 75, 79, 5, 37], [52, 98, 60, 25, 33, 97, 15, 1, 38, 45, 7, 12, 68, 26, 10, 72, 50, 25, 96, 64, 54, 43, 27, 16, 92], [61, 86, 67, 38, 64, 43, 82, 14, 64, 95, 63, 92, 69, 49, 72, 52, 82, 23, 32, 48, 12, 58, 24, 3, 86], [2, 88, 8, 1, 46, 4, 72, 89, 32, 16, 31, 5, 43, 13, 8, 11, 67, 33, 4, 22, 58, 60, 98, 99, 81]],21,), ([[32, 53, 61, 4, 94, 83, 17, 81, 12, 79, 93, 11, 91, 14, 15], [13, 34, 5, 70, 47, 93, 43, 97, 24, 44, 49, 93, 33, 2, 34], [94, 82, 63, 86, 67, 80, 10, 15, 76, 76, 39, 51, 15, 91, 20], [71, 90, 63, 91, 53, 14, 13, 78, 84, 44, 96, 39, 66, 80, 82], [60, 33, 64, 97, 47, 93, 89, 32, 10, 64, 77, 3, 60, 87, 26], [69, 81, 93, 32, 34, 95, 76, 38, 85, 22, 30, 53, 84, 86, 2], [71, 38, 57, 33, 49, 92, 28, 63, 54, 6, 62, 95, 36, 74, 19], [6, 34, 8, 6, 41, 89, 15, 22, 4, 73, 86, 56, 18, 24, 99], [67, 18, 89, 84, 39, 89, 61, 77, 78, 94, 44, 28, 30, 51, 33], [82, 64, 52, 28, 73, 14, 69, 99, 54, 49, 7, 44, 60, 1, 51], [99, 38, 66, 68, 74, 99, 59, 98, 62, 39, 63, 32, 21, 85, 23], [15, 1, 29, 94, 19, 33, 88, 70, 10, 46, 47, 55, 18, 71, 10], [92, 59, 34, 42, 98, 91, 42, 67, 7, 15, 35, 53, 1, 14, 90], [22, 84, 62, 36, 99, 16, 63, 6, 22, 7, 95, 17, 80, 50, 59], [42, 40, 14, 73, 80, 53, 8, 91, 78, 59, 66, 88, 72, 71, 63]],13,), ([[93, 91, 59, 11, 73, 34, 33, 29, 78, 95, 52, 61, 39, 63, 91, 82, 75, 35, 18, 71, 19, 42, 64], [92, 7, 2, 46, 32, 22, 94, 78, 67, 73, 52, 15, 70, 89, 48, 40, 60, 4, 21, 67, 60, 67, 39], [94, 67, 26, 74, 69, 58, 14, 10, 9, 3, 75, 67, 48, 38, 39, 41, 43, 78, 67, 6, 46, 78, 16], [25, 44, 27, 86, 54, 56, 75, 43, 59, 83, 83, 80, 94, 72, 94, 56, 8, 51, 29, 14, 12, 13, 12], [78, 10, 44, 59, 8, 24, 37, 43, 89, 8, 64, 77, 67, 73, 40, 74, 46, 83, 92, 18, 82, 72, 8], [59, 36, 96, 21, 3, 88, 16, 83, 55, 22, 22, 77, 12, 60, 92, 72, 9, 84, 79, 68, 24, 48, 45], [6, 64, 87, 15, 30, 84, 27, 27, 98, 97, 58, 10, 73, 72, 78, 1, 74, 4, 59, 82, 94, 41, 90], [43, 14, 29, 73, 37, 22, 88, 99, 36, 95, 58, 15, 61, 7, 99, 91, 42, 98, 25, 64, 44, 6, 4], [66, 14, 4, 35, 77, 93, 34, 26, 56, 90, 68, 78, 75, 3, 87, 8, 44, 90, 78, 5, 58, 86, 78], [12, 67, 94, 20, 3, 33, 77, 18, 75, 26, 7, 90, 3, 1, 17, 12, 73, 81, 82, 23, 91, 2, 27], [55, 15, 44, 69, 95, 49, 63, 35, 19, 53, 92, 2, 52, 20, 59, 3, 8, 40, 30, 12, 49, 17, 66], [23, 39, 27, 57, 19, 44, 66, 32, 33, 43, 23, 14, 80, 57, 98, 57, 58, 62, 40, 44, 47, 84, 46], [53, 29, 49, 53, 9, 73, 25, 47, 81, 50, 71, 16, 37, 18, 39, 78, 56, 82, 8, 57, 89, 20, 57], [1, 88, 13, 75, 52, 97, 30, 81, 57, 5, 22, 51, 79, 74, 1, 46, 79, 42, 42, 93, 64, 21, 79], [99, 69, 19, 14, 15, 51, 83, 91, 16, 83, 53, 55, 23, 36, 18, 45, 88, 71, 89, 45, 7, 69, 88], [84, 85, 20, 74, 87, 46, 33, 15, 34, 79, 5, 9, 91, 64, 60, 28, 9, 50, 36, 9, 31, 45, 55], [78, 15, 41, 66, 63, 96, 27, 64, 60, 56, 71, 14, 60, 93, 40, 20, 51, 5, 82, 72, 50, 71, 88], [60, 86, 20, 27, 20, 6, 8, 79, 22, 35, 42, 77, 92, 20, 93, 69, 3, 27, 69, 60, 20, 23, 96], [12, 55, 49, 96, 80, 27, 65, 51, 76, 77, 72, 44, 29, 39, 16, 5, 43, 57, 97, 20, 36, 96, 48], [50, 2, 12, 39, 53, 63, 12, 34, 34, 12, 17, 6, 30, 86, 37, 87, 80, 26, 48, 40, 31, 46, 66], [67, 88, 91, 37, 17, 94, 68, 59, 82, 40, 27, 95, 12, 31, 28, 26, 13, 82, 17, 41, 32, 22, 99], [80, 50, 3, 22, 59, 95, 16, 66, 40, 56, 86, 56, 78, 14, 62, 69, 27, 47, 80, 68, 87, 74, 95], [17, 27, 51, 59, 59, 79, 24, 54, 99, 13, 14, 70, 70, 52, 96, 85, 21, 30, 54, 86, 19, 59, 47]],12,), ([[1, 88, 52, 21, 60, 48, 74, 12, 87, 76, 80, 55, 3, 66, 6, 22, 67, 73, 21, 37, 33, 1, 65, 71, 37, 40, 63, 52, 76, 32, 27, 42, 52], [29, 46, 66, 46, 83, 25, 99, 65, 57, 28, 18, 63, 18, 24, 51, 29, 19, 31, 95, 86, 29, 20, 66, 68, 46, 19, 7, 42, 16, 52, 33, 39, 43], [84, 46, 4, 15, 43, 30, 39, 43, 14, 70, 86, 18, 46, 79, 21, 76, 91, 61, 75, 95, 65, 25, 89, 81, 71, 32, 48, 89, 82, 35, 90, 76, 78], [8, 22, 76, 32, 46, 13, 33, 1, 92, 67, 80, 50, 32, 10, 1, 71, 47, 7, 62, 52, 68, 4, 57, 89, 5, 71, 55, 67, 57, 99, 75, 76, 39], [80, 43, 71, 85, 10, 82, 29, 26, 30, 65, 38, 15, 89, 19, 28, 97, 15, 78, 61, 38, 99, 32, 78, 77, 41, 85, 76, 15, 88, 84, 63, 1, 43], [14, 2, 8, 11, 20, 44, 59, 17, 12, 84, 74, 21, 67, 4, 88, 54, 27, 95, 74, 68, 76, 79, 90, 34, 1, 59, 52, 45, 18, 73, 50, 34, 54], [54, 52, 30, 4, 53, 24, 50, 45, 61, 90, 7, 45, 85, 78, 34, 10, 11, 45, 49, 40, 51, 71, 99, 28, 62, 15, 38, 49, 1, 50, 14, 13, 22], [57, 85, 41, 37, 82, 73, 95, 5, 31, 65, 86, 57, 15, 90, 29, 54, 41, 91, 34, 85, 76, 35, 55, 98, 33, 42, 87, 8, 83, 99, 91, 30, 84], [92, 74, 42, 25, 14, 65, 30, 13, 89, 12, 24, 70, 73, 38, 87, 52, 70, 35, 28, 5, 42, 84, 80, 20, 22, 51, 87, 76, 47, 97, 39, 28, 68], [47, 72, 21, 48, 50, 49, 76, 62, 35, 80, 72, 5, 76, 90, 37, 73, 41, 92, 40, 58, 72, 2, 50, 86, 94, 80, 48, 24, 91, 33, 70, 94, 42], [26, 78, 95, 16, 21, 2, 59, 8, 7, 90, 21, 18, 82, 1, 91, 8, 92, 2, 22, 20, 78, 35, 60, 31, 41, 67, 72, 90, 24, 15, 38, 79, 99], [38, 81, 95, 66, 5, 2, 2, 90, 38, 37, 10, 91, 72, 74, 99, 24, 24, 95, 4, 40, 14, 26, 12, 27, 6, 27, 14, 22, 49, 20, 3, 73, 80], [73, 49, 96, 98, 25, 27, 91, 2, 22, 66, 48, 53, 1, 54, 39, 10, 12, 37, 46, 17, 3, 85, 76, 59, 27, 15, 45, 41, 67, 5, 34, 63, 98], [85, 13, 89, 14, 82, 61, 3, 3, 45, 96, 18, 32, 96, 44, 93, 37, 99, 27, 40, 24, 56, 36, 99, 6, 71, 78, 17, 61, 27, 44, 70, 3, 39], [35, 66, 83, 87, 17, 9, 9, 35, 9, 12, 67, 85, 57, 92, 97, 98, 43, 22, 60, 30, 31, 80, 99, 65, 73, 65, 87, 37, 82, 4, 10, 27, 2], [55, 68, 40, 97, 8, 15, 61, 7, 94, 24, 20, 55, 5, 7, 2, 74, 77, 21, 3, 53, 14, 53, 80, 63, 54, 72, 24, 78, 50, 6, 88, 93, 26], [34, 44, 69, 98, 98, 77, 67, 5, 86, 85, 91, 88, 39, 53, 8, 68, 36, 70, 95, 69, 6, 2, 1, 62, 29, 87, 18, 3, 80, 31, 22, 8, 22], [77, 29, 80, 10, 46, 34, 56, 59, 33, 78, 96, 23, 15, 25, 26, 12, 64, 19, 49, 19, 96, 74, 91, 23, 56, 63, 52, 64, 18, 99, 50, 13, 66], [36, 22, 84, 7, 12, 79, 93, 8, 23, 13, 97, 5, 83, 7, 68, 9, 19, 89, 65, 68, 82, 71, 83, 52, 87, 28, 93, 6, 44, 27, 46, 4, 87], [30, 45, 58, 62, 54, 24, 96, 75, 30, 90, 80, 57, 53, 70, 89, 84, 10, 1, 44, 59, 11, 76, 20, 76, 60, 44, 16, 79, 62, 90, 56, 75, 3], [2, 44, 83, 96, 87, 44, 24, 13, 1, 39, 5, 13, 8, 51, 49, 49, 48, 40, 30, 44, 92, 93, 53, 36, 84, 69, 71, 30, 38, 7, 75, 75, 84], [33, 79, 68, 51, 10, 38, 40, 3, 24, 2, 23, 51, 59, 42, 19, 8, 26, 82, 44, 48, 73, 36, 9, 97, 11, 41, 62, 88, 24, 32, 33, 81, 90], [45, 33, 2, 66, 78, 21, 87, 22, 65, 32, 29, 69, 36, 25, 22, 69, 52, 67, 24, 97, 92, 47, 85, 80, 11, 6, 51, 83, 61, 82, 44, 10, 76], [33, 64, 15, 76, 50, 5, 1, 38, 98, 12, 30, 11, 73, 44, 46, 71, 81, 52, 63, 26, 27, 97, 39, 5, 73, 87, 94, 36, 1, 52, 8, 1, 74], [7, 38, 59, 60, 67, 7, 8, 34, 40, 42, 96, 32, 69, 91, 13, 55, 12, 74, 1, 85, 7, 10, 81, 37, 48, 65, 42, 13, 23, 57, 92, 19, 32], [10, 82, 8, 16, 35, 58, 81, 48, 48, 23, 26, 55, 23, 50, 23, 54, 56, 45, 71, 12, 22, 17, 77, 48, 78, 71, 50, 83, 59, 39, 71, 60, 91], [17, 34, 75, 9, 39, 67, 23, 40, 4, 57, 16, 59, 85, 25, 5, 1, 96, 20, 11, 97, 32, 83, 39, 45, 57, 82, 36, 42, 88, 96, 9, 24, 79], [47, 46, 86, 98, 59, 10, 2, 42, 7, 1, 9, 42, 26, 79, 57, 22, 87, 3, 11, 56, 86, 62, 40, 78, 16, 98, 5, 53, 72, 66, 11, 45, 62], [87, 65, 74, 6, 67, 83, 29, 79, 87, 49, 8, 89, 88, 52, 12, 1, 4, 94, 98, 60, 43, 97, 44, 30, 40, 13, 30, 19, 20, 38, 63, 68, 23], [89, 11, 31, 76, 41, 98, 57, 30, 80, 96, 82, 8, 95, 36, 77, 82, 62, 35, 27, 6, 64, 74, 37, 47, 44, 71, 80, 66, 43, 57, 47, 89, 90], [90, 18, 20, 92, 67, 57, 1, 74, 95, 84, 56, 8, 48, 58, 64, 71, 57, 51, 99, 40, 84, 3, 63, 11, 58, 76, 46, 12, 8, 45, 86, 84, 15], [49, 31, 46, 94, 40, 31, 20, 2, 6, 78, 26, 97, 87, 89, 37, 92, 99, 71, 59, 66, 64, 17, 91, 48, 66, 12, 80, 32, 18, 62, 16, 5, 24], [49, 75, 64, 46, 42, 88, 78, 1, 90, 26, 68, 90, 4, 96, 16, 80, 40, 84, 81, 49, 84, 96, 42, 11, 62, 93, 55, 27, 85, 29, 32, 41, 12]],22,), ([[97, 17, 59, 40, 18, 53, 65, 84, 85, 42, 38, 32, 22, 61, 89, 32, 31, 99, 58, 77, 80, 56, 83, 41, 15, 46, 97, 59, 65, 51, 13, 24, 87, 93, 16, 49, 32, 16, 43, 88, 53, 21, 33, 59, 60], [27, 29, 33, 50, 32, 46, 28, 51, 26, 48, 58, 47, 63, 47, 70, 19, 79, 81, 98, 65, 19, 67, 81, 46, 78, 75, 80, 54, 94, 91, 82, 87, 49, 27, 56, 44, 75, 77, 44, 23, 90, 42, 64, 34, 99], [43, 84, 88, 96, 26, 2, 13, 3, 12, 27, 14, 74, 38, 76, 40, 75, 50, 66, 95, 62, 10, 6, 55, 42, 61, 22, 47, 19, 74, 47, 91, 92, 10, 45, 60, 17, 79, 43, 12, 84, 64, 80, 47, 84, 50], [27, 22, 91, 13, 59, 69, 81, 98, 22, 94, 67, 71, 15, 71, 3, 29, 6, 49, 91, 65, 54, 34, 58, 8, 89, 15, 38, 11, 73, 27, 77, 76, 11, 58, 35, 44, 57, 87, 21, 28, 7, 77, 95, 35, 81], [88, 86, 74, 80, 6, 12, 1, 16, 98, 63, 58, 91, 5, 83, 11, 37, 63, 75, 8, 53, 16, 95, 11, 65, 47, 81, 49, 25, 55, 26, 34, 2, 16, 31, 22, 86, 32, 70, 2, 71, 11, 10, 16, 51, 1], [35, 39, 74, 59, 99, 77, 78, 76, 44, 3, 38, 75, 98, 25, 87, 72, 64, 27, 50, 4, 62, 88, 60, 63, 13, 31, 64, 14, 84, 86, 76, 67, 96, 5, 96, 76, 92, 91, 87, 68, 69, 45, 9, 9, 93], [57, 81, 83, 66, 96, 54, 15, 2, 78, 96, 49, 90, 12, 90, 36, 76, 97, 90, 87, 13, 37, 40, 92, 34, 54, 83, 89, 99, 85, 70, 16, 24, 51, 16, 94, 28, 74, 17, 84, 48, 24, 80, 20, 55, 26], [29, 22, 20, 96, 29, 87, 57, 98, 76, 83, 17, 86, 10, 82, 69, 1, 90, 89, 77, 39, 46, 12, 20, 6, 18, 2, 73, 33, 54, 1, 75, 22, 68, 21, 29, 20, 69, 51, 27, 97, 18, 22, 41, 37, 18], [21, 6, 28, 2, 79, 11, 11, 26, 91, 43, 87, 56, 8, 63, 46, 59, 84, 98, 26, 65, 63, 88, 53, 41, 93, 11, 8, 30, 79, 82, 25, 64, 60, 11, 48, 51, 73, 32, 12, 42, 23, 88, 83, 74, 82], [15, 94, 47, 98, 42, 39, 13, 42, 23, 45, 22, 60, 27, 52, 69, 11, 40, 6, 67, 32, 74, 40, 20, 18, 98, 82, 2, 13, 56, 46, 62, 77, 47, 59, 90, 64, 12, 12, 12, 23, 18, 24, 47, 91, 70], [40, 45, 67, 62, 58, 95, 96, 92, 54, 9, 34, 60, 27, 27, 60, 25, 83, 78, 40, 83, 76, 95, 36, 25, 58, 61, 52, 6, 14, 7, 93, 90, 34, 36, 51, 75, 76, 81, 87, 31, 82, 53, 61, 26, 87], [50, 8, 23, 75, 95, 19, 22, 41, 81, 49, 57, 91, 31, 17, 17, 98, 99, 11, 84, 60, 4, 58, 3, 72, 36, 43, 83, 20, 5, 90, 86, 55, 26, 50, 74, 88, 52, 96, 61, 89, 15, 53, 34, 16, 47], [64, 74, 70, 61, 41, 85, 45, 2, 49, 19, 38, 87, 17, 6, 54, 48, 44, 59, 34, 15, 91, 22, 35, 83, 2, 44, 20, 45, 62, 61, 97, 81, 56, 56, 2, 12, 82, 23, 19, 54, 69, 21, 60, 20, 80], [6, 59, 90, 96, 99, 23, 54, 18, 42, 85, 48, 13, 28, 14, 94, 37, 99, 47, 53, 41, 40, 22, 35, 77, 9, 80, 77, 18, 53, 73, 8, 19, 80, 75, 43, 92, 32, 19, 7, 24, 23, 7, 40, 79, 23], [79, 72, 73, 91, 22, 22, 20, 21, 14, 85, 22, 33, 78, 13, 86, 90, 85, 15, 75, 12, 6, 32, 24, 17, 98, 88, 25, 60, 63, 86, 23, 86, 84, 45, 76, 81, 53, 27, 65, 45, 56, 1, 37, 78, 43], [90, 67, 47, 22, 16, 72, 11, 25, 17, 50, 89, 84, 15, 7, 22, 32, 89, 15, 10, 5, 81, 6, 3, 31, 43, 72, 33, 23, 43, 12, 10, 33, 13, 48, 6, 24, 27, 92, 63, 99, 24, 55, 10, 20, 22], [45, 52, 19, 18, 80, 74, 48, 70, 47, 13, 8, 88, 84, 89, 5, 68, 90, 35, 15, 35, 75, 33, 40, 68, 60, 21, 67, 96, 35, 1, 18, 6, 19, 31, 48, 60, 56, 49, 8, 70, 87, 68, 12, 15, 51], [68, 10, 30, 46, 76, 42, 39, 8, 59, 61, 70, 81, 87, 50, 7, 97, 53, 7, 96, 93, 30, 77, 54, 38, 82, 30, 85, 30, 18, 62, 98, 29, 49, 45, 51, 20, 31, 47, 83, 13, 77, 45, 70, 57, 87], [28, 1, 55, 6, 63, 56, 56, 97, 48, 21, 77, 81, 95, 80, 48, 64, 45, 45, 17, 72, 42, 89, 64, 95, 92, 52, 40, 64, 8, 51, 66, 73, 50, 20, 68, 99, 60, 54, 64, 43, 32, 9, 30, 49, 1], [49, 96, 37, 62, 18, 86, 55, 83, 16, 85, 49, 64, 57, 39, 68, 15, 12, 80, 64, 93, 89, 77, 20, 34, 19, 75, 93, 92, 19, 82, 49, 29, 20, 28, 8, 40, 46, 56, 99, 69, 41, 89, 84, 71, 28], [25, 56, 58, 92, 77, 94, 72, 67, 80, 80, 87, 10, 6, 83, 38, 90, 18, 91, 20, 6, 81, 30, 16, 25, 51, 16, 70, 37, 64, 71, 60, 96, 55, 52, 56, 17, 27, 3, 92, 98, 29, 4, 27, 84, 76], [99, 74, 14, 56, 22, 24, 90, 11, 84, 72, 29, 73, 38, 70, 92, 90, 9, 45, 26, 89, 52, 6, 21, 60, 59, 21, 91, 11, 20, 17, 98, 51, 64, 55, 86, 16, 85, 77, 98, 54, 54, 56, 7, 96, 13], [96, 83, 88, 44, 40, 69, 28, 81, 40, 94, 62, 59, 50, 11, 15, 60, 10, 20, 30, 35, 99, 96, 59, 51, 58, 12, 46, 7, 64, 18, 28, 11, 98, 35, 76, 76, 15, 54, 40, 19, 40, 53, 10, 72, 22], [21, 20, 69, 1, 27, 36, 33, 90, 63, 14, 86, 32, 11, 93, 93, 74, 65, 49, 84, 94, 34, 61, 56, 95, 39, 50, 30, 14, 35, 25, 53, 56, 29, 40, 65, 53, 99, 64, 21, 81, 14, 10, 74, 1, 12], [79, 15, 42, 97, 70, 30, 28, 31, 17, 97, 85, 50, 51, 87, 67, 49, 92, 28, 81, 14, 80, 89, 3, 69, 70, 95, 68, 67, 60, 68, 99, 44, 74, 55, 69, 78, 34, 2, 79, 34, 4, 12, 13, 73, 4], [31, 44, 56, 6, 71, 62, 82, 94, 22, 78, 12, 48, 46, 72, 25, 42, 75, 55, 25, 80, 81, 54, 92, 68, 98, 26, 6, 52, 85, 64, 58, 57, 72, 68, 75, 34, 2, 83, 39, 67, 73, 95, 76, 12, 73], [39, 32, 69, 72, 32, 22, 88, 51, 91, 41, 50, 17, 45, 59, 44, 32, 48, 30, 28, 83, 18, 20, 74, 11, 60, 34, 39, 38, 17, 49, 87, 71, 6, 56, 24, 60, 72, 4, 81, 66, 22, 51, 51, 16, 85], [40, 8, 71, 64, 71, 4, 25, 59, 70, 82, 79, 85, 16, 55, 24, 11, 71, 42, 3, 41, 22, 26, 4, 16, 63, 17, 19, 79, 7, 66, 55, 45, 87, 72, 1, 17, 39, 8, 57, 85, 50, 55, 26, 95, 53], [33, 30, 94, 36, 21, 41, 37, 21, 29, 8, 52, 39, 69, 14, 85, 38, 15, 30, 71, 27, 72, 35, 41, 53, 61, 95, 45, 30, 91, 1, 33, 78, 7, 62, 22, 51, 69, 85, 55, 31, 54, 27, 44, 79, 87], [60, 53, 17, 94, 36, 66, 2, 97, 20, 10, 69, 58, 81, 47, 63, 39, 62, 82, 60, 73, 74, 32, 63, 39, 18, 24, 2, 16, 79, 51, 84, 54, 56, 62, 71, 82, 89, 77, 60, 75, 72, 91, 20, 64, 98], [68, 79, 77, 49, 86, 26, 52, 61, 9, 5, 30, 4, 31, 14, 25, 28, 15, 67, 95, 77, 9, 66, 23, 48, 33, 28, 63, 8, 36, 2, 24, 22, 79, 24, 69, 91, 97, 53, 85, 81, 58, 35, 55, 26, 46], [25, 85, 11, 24, 78, 24, 73, 2, 6, 25, 81, 3, 5, 32, 48, 55, 93, 36, 36, 25, 56, 28, 35, 13, 79, 60, 27, 75, 6, 56, 27, 42, 94, 97, 38, 55, 19, 86, 13, 68, 6, 29, 94, 89, 61], [15, 12, 21, 82, 25, 38, 69, 76, 49, 29, 62, 42, 22, 95, 48, 28, 23, 53, 16, 60, 40, 97, 39, 68, 6, 47, 11, 10, 31, 71, 14, 59, 6, 58, 18, 33, 30, 84, 92, 1, 57, 81, 59, 26, 53], [18, 24, 18, 39, 79, 36, 90, 32, 84, 70, 91, 72, 39, 86, 37, 38, 71, 73, 34, 98, 28, 63, 73, 30, 41, 95, 8, 8, 78, 9, 98, 25, 9, 64, 3, 96, 27, 74, 66, 82, 59, 40, 24, 23, 41], [53, 49, 66, 61, 64, 34, 27, 64, 60, 35, 53, 72, 71, 58, 13, 76, 77, 53, 17, 57, 60, 15, 78, 19, 35, 18, 17, 84, 25, 37, 23, 23, 75, 46, 84, 7, 87, 62, 23, 91, 85, 21, 58, 96, 50], [28, 66, 93, 9, 35, 61, 68, 86, 23, 6, 84, 69, 12, 59, 65, 39, 41, 3, 42, 43, 85, 66, 96, 29, 47, 92, 97, 26, 15, 45, 90, 73, 61, 85, 20, 49, 27, 65, 9, 58, 51, 38, 84, 19, 44], [11, 78, 89, 76, 45, 7, 3, 80, 62, 1, 15, 44, 11, 1, 3, 22, 43, 6, 22, 50, 28, 78, 96, 29, 5, 35, 11, 1, 7, 3, 86, 31, 3, 17, 18, 79, 99, 80, 94, 99, 17, 79, 42, 27, 65], [30, 30, 69, 65, 4, 11, 58, 13, 10, 88, 84, 18, 87, 42, 99, 44, 62, 91, 79, 24, 30, 65, 41, 67, 24, 32, 63, 4, 98, 1, 21, 8, 46, 12, 1, 22, 78, 89, 28, 72, 64, 40, 89, 55, 87], [60, 41, 80, 59, 68, 36, 33, 94, 45, 75, 50, 47, 77, 44, 68, 88, 33, 97, 76, 21, 97, 46, 97, 73, 31, 62, 94, 16, 12, 54, 9, 35, 53, 43, 70, 89, 56, 64, 28, 87, 29, 86, 58, 24, 20], [27, 97, 19, 90, 38, 60, 3, 23, 59, 91, 91, 74, 24, 56, 52, 41, 66, 98, 22, 66, 28, 88, 38, 86, 67, 58, 37, 2, 57, 87, 77, 79, 97, 45, 53, 77, 84, 7, 77, 39, 68, 63, 46, 91, 96], [2, 15, 5, 3, 16, 49, 90, 6, 35, 38, 84, 86, 64, 85, 32, 1, 48, 23, 18, 17, 31, 93, 54, 77, 60, 66, 73, 96, 86, 18, 18, 83, 63, 31, 29, 88, 97, 83, 80, 51, 32, 21, 30, 7, 38], [12, 59, 92, 14, 71, 17, 23, 77, 20, 5, 6, 13, 3, 53, 31, 3, 8, 71, 50, 71, 75, 88, 59, 21, 20, 93, 74, 49, 80, 74, 38, 33, 69, 59, 12, 8, 70, 87, 48, 67, 38, 93, 34, 4, 7], [85, 74, 96, 89, 77, 85, 83, 59, 8, 61, 50, 84, 8, 16, 48, 62, 56, 28, 74, 21, 44, 79, 70, 41, 35, 56, 85, 17, 26, 63, 74, 34, 71, 32, 4, 10, 79, 56, 35, 33, 25, 47, 11, 34, 36], [17, 12, 80, 97, 26, 74, 13, 82, 85, 87, 87, 36, 69, 45, 79, 88, 12, 83, 97, 89, 38, 77, 88, 67, 76, 66, 20, 40, 34, 22, 15, 97, 66, 35, 98, 91, 31, 77, 53, 94, 90, 88, 57, 65, 38], [38, 86, 10, 46, 27, 42, 2, 58, 19, 62, 11, 14, 57, 33, 44, 18, 29, 30, 3, 32, 15, 49, 87, 60, 98, 46, 80, 50, 6, 80, 20, 49, 28, 26, 56, 48, 6, 53, 59, 80, 33, 12, 78, 39, 2]],34,), ([[19, 98, 9, 31, 79, 4, 63, 46, 32, 81, 5, 39, 97, 92, 13, 68, 28, 13, 92, 57, 99, 24, 9, 7, 22, 3, 72, 4, 42, 2, 53, 46, 6, 57, 86, 3, 17, 74, 88, 60, 39, 28, 45, 94], [92, 4, 82, 39, 3, 65, 97, 16, 46, 94, 40, 55, 97, 36, 60, 95, 36, 36, 47, 48, 10, 22, 28, 36, 32, 13, 34, 63, 65, 80, 91, 22, 31, 48, 93, 22, 71, 55, 40, 4, 78, 43, 81, 65], [2, 82, 3, 56, 85, 77, 49, 27, 60, 67, 69, 37, 48, 66, 94, 70, 27, 77, 5, 52, 58, 25, 91, 62, 16, 48, 71, 52, 67, 15, 81, 67, 61, 66, 69, 24, 95, 44, 71, 25, 20, 89, 66, 66], [10, 50, 70, 11, 93, 30, 85, 27, 42, 36, 45, 97, 27, 56, 37, 70, 39, 8, 76, 47, 67, 54, 9, 43, 12, 40, 3, 97, 77, 12, 37, 7, 70, 41, 4, 87, 4, 67, 38, 27, 11, 93, 93, 37], [58, 8, 32, 78, 84, 88, 93, 60, 65, 10, 19, 39, 45, 48, 18, 71, 88, 86, 16, 6, 71, 82, 99, 49, 88, 80, 19, 83, 65, 22, 31, 14, 30, 95, 51, 32, 43, 17, 92, 98, 62, 17, 61, 6], [93, 9, 31, 30, 59, 73, 10, 64, 33, 3, 93, 53, 41, 78, 15, 10, 80, 97, 92, 39, 24, 79, 13, 83, 11, 13, 40, 59, 96, 54, 61, 90, 59, 80, 17, 13, 13, 15, 11, 1, 35, 82, 44, 58], [1, 86, 52, 66, 94, 53, 82, 65, 3, 74, 48, 15, 67, 77, 62, 88, 30, 43, 32, 99, 35, 55, 15, 34, 98, 82, 99, 23, 32, 50, 50, 83, 93, 40, 44, 12, 68, 22, 43, 79, 85, 42, 99, 19], [72, 79, 4, 25, 51, 60, 37, 26, 73, 44, 55, 50, 31, 70, 25, 60, 6, 19, 5, 69, 59, 54, 5, 49, 20, 54, 77, 73, 78, 13, 97, 48, 87, 94, 63, 82, 82, 43, 78, 12, 39, 91, 57, 93], [71, 79, 83, 9, 84, 62, 22, 36, 96, 3, 82, 16, 3, 76, 88, 58, 75, 23, 33, 68, 61, 14, 38, 73, 98, 53, 61, 33, 83, 67, 56, 61, 38, 27, 40, 6, 96, 48, 18, 32, 84, 36, 79, 23], [14, 85, 46, 3, 7, 17, 68, 58, 50, 99, 70, 96, 99, 46, 59, 22, 72, 91, 28, 2, 59, 54, 66, 63, 27, 7, 12, 8, 9, 86, 18, 92, 38, 34, 70, 95, 15, 61, 68, 5, 87, 77, 61, 27], [45, 58, 95, 19, 30, 63, 94, 5, 62, 75, 74, 41, 65, 79, 85, 86, 96, 26, 77, 69, 78, 54, 55, 68, 8, 9, 95, 3, 27, 9, 93, 98, 29, 74, 77, 65, 40, 78, 96, 80, 56, 26, 33, 95], [72, 25, 97, 94, 1, 1, 27, 68, 37, 24, 44, 88, 6, 39, 65, 93, 88, 77, 92, 15, 64, 31, 86, 76, 17, 26, 77, 53, 41, 45, 81, 26, 51, 92, 38, 50, 42, 42, 32, 85, 9, 80, 5, 38], [9, 70, 79, 82, 69, 41, 74, 80, 27, 40, 53, 23, 92, 75, 4, 68, 80, 28, 29, 58, 17, 70, 18, 13, 64, 60, 61, 35, 89, 55, 35, 42, 11, 76, 54, 38, 32, 78, 25, 97, 98, 59, 70, 57], [41, 4, 7, 99, 19, 31, 20, 21, 25, 12, 98, 17, 96, 1, 79, 65, 63, 25, 71, 34, 44, 70, 1, 79, 77, 21, 77, 40, 17, 17, 76, 34, 39, 75, 14, 79, 87, 4, 33, 25, 41, 86, 32, 1], [63, 88, 53, 7, 43, 37, 70, 15, 34, 63, 65, 72, 35, 76, 46, 24, 1, 77, 79, 34, 37, 13, 16, 36, 70, 98, 76, 54, 44, 38, 47, 49, 36, 64, 63, 24, 68, 89, 11, 46, 3, 7, 54, 11], [65, 41, 55, 59, 26, 54, 14, 47, 16, 12, 93, 59, 32, 10, 93, 83, 55, 73, 89, 19, 39, 9, 17, 91, 8, 87, 55, 77, 41, 8, 13, 77, 55, 81, 20, 69, 25, 16, 43, 82, 59, 73, 35, 10], [99, 19, 13, 89, 69, 81, 34, 43, 87, 67, 10, 32, 97, 71, 13, 38, 11, 15, 87, 83, 8, 49, 88, 66, 30, 44, 54, 97, 83, 31, 24, 86, 39, 93, 34, 61, 4, 50, 53, 81, 28, 38, 4, 16], [42, 43, 64, 31, 79, 9, 68, 83, 34, 88, 11, 35, 28, 92, 11, 38, 98, 15, 61, 8, 65, 24, 50, 10, 17, 78, 1, 11, 41, 3, 17, 64, 75, 88, 33, 32, 25, 91, 47, 43, 81, 81, 57, 40], [68, 82, 75, 41, 40, 76, 37, 74, 15, 58, 58, 11, 98, 99, 8, 31, 15, 93, 79, 64, 31, 7, 94, 89, 79, 77, 74, 19, 49, 15, 3, 18, 22, 96, 95, 74, 45, 21, 34, 93, 74, 28, 54, 10], [32, 78, 32, 52, 30, 56, 72, 19, 22, 88, 28, 41, 43, 69, 73, 72, 59, 56, 82, 40, 77, 70, 16, 18, 42, 81, 2, 82, 64, 11, 55, 2, 2, 57, 18, 86, 16, 27, 17, 54, 17, 6, 97, 13], [6, 90, 83, 19, 61, 90, 86, 11, 86, 96, 7, 86, 6, 15, 38, 41, 56, 18, 35, 98, 45, 29, 69, 88, 32, 94, 5, 44, 98, 50, 82, 21, 22, 61, 39, 85, 99, 5, 33, 71, 24, 39, 72, 15], [70, 5, 87, 48, 20, 76, 21, 86, 89, 12, 66, 30, 7, 58, 18, 60, 18, 92, 48, 34, 72, 83, 6, 45, 60, 71, 84, 24, 93, 92, 69, 17, 62, 33, 62, 6, 3, 74, 54, 11, 87, 46, 4, 7], [26, 97, 35, 28, 41, 50, 99, 39, 80, 10, 71, 7, 25, 69, 90, 30, 11, 71, 39, 26, 57, 55, 22, 12, 64, 86, 66, 60, 62, 52, 62, 76, 65, 15, 40, 7, 55, 37, 86, 97, 33, 29, 19, 69], [14, 9, 5, 35, 85, 28, 45, 2, 6, 31, 32, 75, 59, 14, 74, 59, 1, 55, 31, 59, 8, 66, 99, 95, 12, 31, 99, 96, 81, 57, 8, 19, 53, 11, 57, 69, 59, 28, 2, 11, 64, 18, 47, 53], [5, 19, 5, 40, 83, 76, 92, 48, 99, 23, 55, 34, 87, 97, 58, 77, 98, 93, 30, 61, 82, 56, 99, 5, 4, 69, 39, 79, 73, 50, 72, 74, 22, 88, 24, 73, 22, 34, 48, 76, 81, 4, 57, 63], [30, 65, 97, 91, 78, 4, 35, 33, 51, 12, 68, 98, 78, 2, 91, 95, 33, 91, 45, 56, 28, 98, 30, 34, 1, 52, 13, 82, 40, 65, 9, 70, 72, 72, 88, 49, 25, 26, 26, 40, 34, 8, 2, 82], [16, 92, 72, 63, 18, 39, 42, 83, 32, 62, 32, 85, 93, 69, 84, 22, 27, 1, 13, 97, 6, 13, 78, 72, 67, 37, 76, 8, 93, 20, 62, 23, 68, 25, 32, 58, 25, 69, 10, 64, 31, 4, 57, 71], [34, 21, 83, 7, 98, 58, 33, 42, 53, 85, 55, 50, 38, 81, 46, 81, 15, 8, 49, 53, 37, 83, 93, 38, 97, 28, 61, 97, 7, 99, 72, 7, 59, 21, 25, 67, 32, 48, 55, 75, 85, 96, 66, 23], [45, 10, 78, 55, 60, 9, 83, 3, 32, 54, 87, 83, 76, 23, 14, 36, 48, 67, 10, 86, 68, 79, 52, 99, 49, 44, 5, 92, 91, 15, 94, 8, 55, 20, 77, 6, 1, 46, 42, 82, 70, 49, 90, 34], [57, 17, 89, 63, 61, 59, 92, 79, 4, 91, 33, 20, 21, 41, 74, 44, 32, 64, 37, 61, 26, 22, 40, 59, 50, 77, 96, 73, 39, 16, 98, 74, 88, 10, 45, 90, 34, 63, 68, 93, 86, 89, 11, 84], [88, 95, 25, 69, 31, 57, 87, 53, 81, 66, 56, 66, 91, 22, 81, 53, 57, 33, 5, 13, 17, 43, 84, 84, 92, 12, 84, 71, 56, 69, 29, 25, 11, 41, 11, 96, 38, 82, 62, 79, 81, 24, 44, 19], [37, 5, 4, 1, 94, 17, 43, 50, 30, 64, 82, 36, 1, 69, 82, 29, 81, 85, 66, 36, 62, 20, 83, 54, 82, 13, 47, 75, 97, 28, 55, 43, 44, 21, 94, 53, 47, 96, 87, 25, 96, 41, 31, 13], [6, 1, 8, 56, 62, 87, 69, 93, 22, 64, 69, 17, 18, 45, 54, 39, 65, 95, 88, 54, 16, 69, 32, 26, 35, 53, 43, 41, 24, 44, 79, 23, 75, 94, 45, 94, 55, 70, 69, 64, 14, 30, 4, 6], [39, 18, 51, 56, 89, 57, 59, 61, 17, 97, 38, 76, 81, 89, 37, 17, 91, 31, 14, 53, 36, 86, 5, 40, 70, 69, 88, 22, 14, 25, 84, 65, 49, 35, 52, 92, 29, 58, 72, 82, 31, 21, 6, 9], [30, 18, 30, 84, 60, 55, 10, 13, 41, 2, 5, 33, 65, 37, 61, 58, 12, 41, 28, 82, 36, 94, 42, 54, 54, 38, 85, 71, 69, 58, 99, 79, 9, 48, 18, 12, 27, 78, 77, 94, 36, 49, 9, 34], [76, 50, 89, 50, 22, 5, 15, 18, 77, 15, 89, 98, 66, 21, 87, 81, 61, 4, 48, 1, 7, 61, 53, 95, 35, 21, 60, 76, 5, 3, 59, 76, 10, 46, 50, 62, 59, 94, 17, 56, 44, 19, 18, 26], [28, 49, 32, 20, 85, 46, 58, 16, 76, 1, 46, 32, 14, 14, 83, 65, 25, 42, 13, 53, 68, 60, 84, 68, 41, 6, 26, 91, 22, 29, 40, 66, 36, 87, 19, 16, 88, 34, 63, 25, 75, 69, 84, 14], [21, 90, 44, 52, 79, 85, 80, 75, 48, 78, 85, 62, 80, 2, 42, 66, 28, 5, 8, 73, 81, 83, 42, 26, 95, 98, 93, 74, 58, 11, 97, 95, 22, 54, 93, 41, 85, 40, 12, 16, 43, 26, 94, 87], [97, 88, 6, 98, 19, 23, 25, 93, 16, 2, 93, 58, 97, 18, 44, 54, 9, 2, 55, 5, 20, 4, 5, 17, 5, 50, 72, 96, 25, 25, 89, 42, 31, 92, 47, 79, 51, 55, 60, 27, 39, 78, 13, 96], [35, 48, 14, 36, 53, 39, 5, 72, 10, 2, 95, 39, 25, 34, 79, 56, 81, 22, 33, 70, 58, 82, 30, 63, 67, 95, 12, 10, 62, 63, 36, 56, 6, 31, 33, 74, 63, 38, 26, 16, 24, 24, 73, 25], [23, 54, 67, 32, 74, 47, 35, 86, 14, 25, 59, 54, 79, 94, 95, 78, 8, 8, 95, 3, 97, 12, 32, 96, 21, 74, 41, 42, 57, 90, 77, 62, 73, 97, 95, 56, 12, 56, 58, 23, 89, 93, 33, 18], [41, 12, 62, 58, 4, 13, 31, 22, 39, 58, 30, 34, 95, 6, 90, 49, 45, 77, 93, 50, 26, 39, 86, 52, 4, 35, 5, 28, 21, 73, 10, 55, 33, 40, 5, 73, 81, 33, 81, 70, 91, 91, 78, 5], [81, 4, 71, 37, 78, 13, 29, 98, 98, 39, 48, 89, 35, 62, 20, 95, 59, 44, 54, 89, 58, 93, 52, 50, 46, 98, 10, 19, 11, 40, 40, 36, 87, 55, 44, 89, 44, 45, 85, 63, 91, 2, 6, 99], [73, 20, 55, 97, 47, 93, 27, 1, 13, 67, 65, 84, 58, 90, 76, 70, 50, 9, 55, 36, 20, 10, 10, 31, 84, 89, 45, 31, 9, 88, 4, 45, 24, 78, 72, 91, 53, 94, 78, 40, 58, 82, 77, 29]],37,), ([[91, 36, 24, 57], [88, 3, 45, 19], [49, 9, 86, 22], [55, 16, 72, 81]],3,), ([[27, 35, 35, 78, 52, 41, 22, 22, 75, 96, 91, 20, 46, 34, 83, 62, 10, 13, 92, 8, 86, 54, 92, 16, 17, 40, 49, 62, 19, 49, 38, 82, 62, 37, 93, 15, 85], [61, 56, 7, 36, 86, 37, 70, 40, 78, 17, 1, 44, 66, 42, 45, 46, 55, 21, 5, 84, 41, 86, 40, 87, 65, 13, 88, 89, 92, 68, 23, 4, 40, 61, 58, 98, 84], [17, 30, 92, 24, 95, 96, 38, 59, 63, 93, 64, 71, 52, 54, 15, 56, 70, 54, 81, 97, 61, 44, 1, 63, 59, 3, 13, 11, 61, 12, 82, 80, 33, 41, 4, 88, 47], [46, 54, 71, 9, 83, 93, 70, 36, 58, 86, 86, 38, 43, 67, 25, 78, 5, 18, 28, 30, 70, 95, 18, 25, 34, 72, 92, 71, 63, 98, 25, 65, 59, 66, 98, 96, 63], [12, 44, 54, 26, 54, 86, 31, 97, 22, 48, 8, 80, 28, 78, 68, 24, 83, 25, 47, 17, 66, 91, 8, 62, 37, 5, 46, 4, 59, 70, 29, 8, 48, 74, 99, 61, 53], [74, 64, 16, 76, 25, 79, 64, 78, 60, 70, 67, 27, 17, 89, 35, 69, 62, 94, 82, 84, 27, 44, 81, 63, 98, 56, 8, 57, 76, 61, 99, 3, 47, 14, 45, 79, 39], [67, 24, 62, 2, 69, 68, 2, 62, 11, 17, 12, 83, 77, 83, 84, 21, 56, 31, 31, 69, 40, 2, 11, 52, 24, 48, 62, 95, 2, 90, 17, 60, 55, 49, 75, 55, 42], [77, 90, 94, 20, 72, 64, 84, 75, 28, 75, 73, 36, 27, 6, 28, 13, 87, 47, 11, 85, 39, 24, 75, 45, 90, 48, 42, 84, 59, 29, 68, 82, 46, 58, 12, 32, 95], [8, 89, 11, 26, 41, 60, 19, 48, 17, 63, 10, 34, 93, 51, 45, 28, 18, 96, 36, 5, 82, 80, 3, 6, 97, 60, 80, 44, 66, 66, 69, 92, 52, 1, 5, 68, 93], [66, 79, 5, 59, 95, 26, 14, 41, 75, 83, 74, 52, 42, 81, 82, 60, 89, 15, 47, 33, 95, 37, 47, 36, 70, 46, 52, 72, 75, 26, 29, 2, 24, 18, 33, 85, 86], [33, 32, 33, 40, 62, 14, 45, 26, 27, 10, 71, 81, 43, 68, 97, 16, 24, 21, 93, 50, 79, 62, 92, 52, 18, 8, 9, 59, 44, 70, 98, 67, 18, 83, 73, 13, 40], [69, 47, 24, 37, 44, 46, 44, 75, 60, 74, 3, 17, 51, 5, 35, 82, 91, 90, 57, 31, 77, 60, 80, 50, 22, 80, 72, 32, 18, 33, 64, 45, 38, 30, 64, 42, 13], [77, 68, 42, 6, 79, 27, 96, 53, 7, 31, 88, 66, 72, 71, 65, 8, 53, 68, 30, 83, 61, 37, 84, 45, 53, 13, 32, 62, 2, 77, 8, 96, 48, 14, 85, 33, 36], [85, 59, 70, 69, 48, 30, 28, 41, 76, 58, 41, 11, 6, 20, 91, 29, 73, 48, 71, 85, 82, 15, 2, 97, 75, 53, 55, 70, 13, 44, 58, 17, 41, 25, 69, 14, 29], [52, 30, 12, 91, 95, 93, 91, 69, 9, 26, 27, 15, 79, 98, 14, 2, 46, 70, 80, 73, 80, 44, 86, 19, 72, 44, 45, 85, 67, 79, 66, 22, 17, 58, 80, 47, 14], [41, 69, 55, 21, 80, 31, 32, 80, 9, 37, 9, 21, 56, 8, 24, 80, 95, 20, 5, 50, 2, 67, 58, 96, 89, 99, 30, 15, 93, 2, 70, 93, 22, 70, 93, 62, 81], [96, 82, 25, 18, 46, 75, 69, 63, 54, 27, 44, 62, 70, 75, 29, 96, 4, 69, 60, 82, 72, 23, 38, 62, 12, 85, 22, 96, 58, 92, 61, 18, 67, 94, 77, 65, 35], [39, 26, 17, 50, 32, 22, 39, 89, 32, 88, 59, 8, 44, 30, 77, 23, 64, 77, 30, 70, 94, 98, 17, 88, 73, 54, 19, 31, 25, 97, 38, 55, 50, 37, 35, 96, 60], [86, 67, 75, 88, 98, 30, 15, 75, 84, 88, 74, 39, 99, 42, 95, 27, 5, 76, 98, 75, 29, 62, 91, 56, 43, 80, 79, 13, 97, 5, 94, 50, 49, 90, 73, 69, 99], [55, 59, 1, 67, 9, 26, 66, 92, 20, 90, 14, 2, 21, 59, 19, 46, 15, 32, 36, 78, 35, 9, 98, 95, 25, 41, 44, 74, 98, 49, 55, 15, 66, 62, 26, 42, 35], [45, 32, 62, 64, 52, 96, 43, 92, 55, 44, 91, 79, 59, 54, 88, 85, 1, 85, 87, 22, 50, 31, 50, 29, 39, 1, 65, 50, 18, 49, 75, 37, 70, 76, 35, 72, 43], [65, 43, 66, 35, 34, 42, 80, 8, 6, 40, 68, 23, 63, 14, 89, 58, 36, 34, 76, 21, 45, 58, 15, 45, 17, 50, 88, 55, 92, 31, 31, 85, 97, 10, 66, 53, 11], [56, 79, 89, 34, 87, 43, 92, 68, 3, 14, 29, 85, 17, 70, 45, 53, 50, 48, 69, 65, 74, 5, 28, 96, 71, 42, 60, 2, 22, 92, 97, 95, 98, 10, 28, 88, 78], [36, 61, 2, 51, 34, 35, 43, 11, 32, 38, 47, 81, 85, 95, 5, 64, 86, 53, 29, 1, 30, 26, 86, 10, 13, 25, 15, 1, 75, 44, 35, 13, 19, 48, 12, 73, 84], [82, 64, 25, 6, 5, 38, 12, 55, 66, 67, 26, 51, 31, 6, 30, 96, 82, 39, 9, 99, 73, 63, 70, 99, 4, 30, 45, 26, 74, 70, 31, 26, 71, 8, 61, 85, 38], [48, 62, 97, 16, 3, 62, 56, 67, 99, 87, 12, 88, 55, 13, 15, 7, 24, 13, 19, 67, 5, 50, 74, 64, 48, 49, 84, 80, 63, 7, 98, 34, 79, 5, 57, 74, 42], [72, 85, 45, 71, 40, 9, 64, 93, 60, 20, 17, 39, 63, 22, 71, 45, 28, 6, 81, 66, 61, 8, 7, 80, 66, 22, 43, 49, 71, 26, 98, 54, 39, 12, 41, 99, 2], [52, 93, 84, 53, 55, 19, 26, 37, 13, 87, 25, 58, 47, 23, 3, 51, 78, 79, 35, 78, 17, 6, 58, 84, 48, 10, 14, 27, 68, 83, 52, 51, 45, 66, 57, 27, 47], [88, 42, 63, 58, 68, 66, 46, 22, 85, 54, 78, 84, 98, 84, 33, 73, 42, 38, 77, 13, 55, 69, 97, 58, 49, 50, 46, 1, 91, 39, 6, 52, 68, 73, 63, 90, 2], [61, 24, 64, 5, 65, 50, 55, 35, 71, 4, 50, 85, 73, 90, 58, 1, 20, 75, 32, 13, 28, 10, 2, 5, 71, 97, 71, 66, 14, 85, 18, 14, 13, 83, 21, 30, 35], [96, 51, 55, 58, 82, 71, 12, 74, 38, 3, 46, 73, 57, 71, 26, 46, 48, 18, 63, 44, 57, 59, 82, 62, 46, 18, 85, 15, 6, 60, 59, 82, 23, 32, 35, 55, 35], [2, 24, 90, 62, 90, 44, 4, 22, 51, 16, 56, 30, 66, 37, 18, 19, 94, 9, 31, 82, 69, 74, 86, 49, 40, 80, 23, 94, 60, 10, 75, 92, 30, 25, 27, 72, 74], [98, 93, 17, 27, 23, 91, 74, 80, 70, 1, 89, 49, 17, 33, 32, 14, 4, 96, 62, 17, 89, 14, 6, 11, 28, 9, 72, 30, 60, 44, 38, 80, 64, 84, 74, 62, 53], [99, 7, 63, 10, 21, 94, 70, 34, 12, 75, 55, 68, 87, 33, 33, 14, 2, 3, 52, 18, 35, 68, 8, 71, 37, 44, 26, 11, 57, 81, 69, 77, 20, 99, 82, 14, 77], [86, 13, 54, 5, 89, 15, 79, 15, 86, 36, 85, 17, 13, 59, 94, 16, 60, 16, 50, 99, 49, 2, 8, 91, 69, 92, 58, 52, 5, 23, 42, 74, 26, 71, 82, 83, 2], [89, 44, 88, 67, 64, 70, 91, 85, 18, 33, 46, 80, 57, 85, 66, 51, 45, 2, 39, 3, 80, 28, 28, 97, 31, 44, 20, 11, 11, 39, 6, 64, 63, 60, 63, 31, 38], [99, 18, 9, 42, 28, 67, 23, 10, 5, 2, 25, 60, 87, 67, 53, 17, 41, 33, 92, 5, 87, 73, 70, 6, 73, 81, 13, 3, 73, 14, 67, 36, 84, 46, 82, 1, 20]],36,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MINIMUM_NUMBER_DIVIDED_MAKE_NUMBER_PERFECT_SQUARE{ static int f_gold ( int n ) { int count = 0 , ans = 1 ; while ( n % 2 == 0 ) { count ++ ; n /= 2 ; } if ( count % 2 == 1 ) ans *= 2 ; for ( int i = 3 ; i <= Math . sqrt ( n ) ; i += 2 ) { count = 0 ; while ( n % i == 0 ) { count ++ ; n /= i ; } if ( count % 2 == 1 ) ans *= i ; } if ( n > 2 ) ans *= n ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(95); param0.add(48); param0.add(3); param0.add(10); param0.add(82); param0.add(1); param0.add(77); param0.add(99); param0.add(23); param0.add(61); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : count = 0 ans = 1 while n % 2 == 0 : count += 1 n //= 2 if count % 2 is not 0 : ans *= 2 for i in range ( 3 , ( int ) ( math.sqrt ( n ) ) + 1 , 2 ) : count = 0 while n % i == 0 : count += 1 n //= i if count % 2 is not 0 : ans *= i if n > 2 : ans *= n return ans "," 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; } int main() { int n_success = 0; vector param0 {95,48,3,10,82,1,77,99,23,61}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (95,), (48,), (3,), (10,), (82,), (1,), (77,), (99,), (23,), (61,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_NON_REPEATING_DISTINCT_ELEMENTS_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_NON_REPEATING_DISTINCT_ELEMENTS_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int sum = 0 ; HashSet < Integer > s = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! s . contains ( arr [ i ] ) ) { sum += arr [ i ] ; s . add ( arr [ i ] ) ; } } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94}); param0.add(new int[]{80,94,16,-74,32,-64,-84,-66,-10}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6}); param0.add(new int[]{-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96}); param0.add(new int[]{1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1}); param0.add(new int[]{3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97}); param0.add(new int[]{-50,-18,-66,76,-54,96,98,26,42,64,-60}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{70,21,44,82,62,41,86}); List param1 = new ArrayList<>(); param1.add(24); param1.add(6); param1.add(27); param1.add(15); param1.add(27); param1.add(25); param1.add(19); param1.add(9); param1.add(15); param1.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : s = set ( ) sum = 0 for i in range ( n ) : if arr [ i ] not in s : s.add ( arr [ i ] ) for i in s : sum = sum + i return sum "," 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; } int main() { int n_success = 0; vector> param0 {{5,6,8,10,21,22,27,32,35,36,43,44,46,48,49,55,60,61,69,69,71,72,73,78,88,94},{80,94,16,-74,32,-64,-84,-66,-10},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{99,4,96,39,39,24,15,47,25,74,7,98,88,91,62,12,31,14,48,26,37,25,11,32,34,64,72,5,80,86,6},{-86,-84,-84,-78,-78,-76,-74,-68,-66,-64,-60,-60,-56,-50,-42,-42,-38,-34,-32,-22,-16,-14,-10,-6,-6,4,4,26,36,36,54,62,64,68,70,76,76,76,84,92,92,94,96},{1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1},{3,3,5,8,32,33,35,35,42,48,67,71,71,74,77,80,94,96,96,97},{-50,-18,-66,76,-54,96,98,26,42,64,-60},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{70,21,44,82,62,41,86}}; vector param1 {24,6,27,15,27,25,19,9,15,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 6, 8, 10, 21, 22, 27, 32, 35, 36, 43, 44, 46, 48, 49, 55, 60, 61, 69, 69, 71, 72, 73, 78, 88, 94],24,), ([80, 94, 16, -74, 32, -64, -84, -66, -10],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, 1, 1, 1, 1, 1, 1, 1],27,), ([99, 4, 96, 39, 39, 24, 15, 47, 25, 74, 7, 98, 88, 91, 62, 12, 31, 14, 48, 26, 37, 25, 11, 32, 34, 64, 72, 5, 80, 86, 6],15,), ([-86, -84, -84, -78, -78, -76, -74, -68, -66, -64, -60, -60, -56, -50, -42, -42, -38, -34, -32, -22, -16, -14, -10, -6, -6, 4, 4, 26, 36, 36, 54, 62, 64, 68, 70, 76, 76, 76, 84, 92, 92, 94, 96],27,), ([1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1],25,), ([3, 3, 5, 8, 32, 33, 35, 35, 42, 48, 67, 71, 71, 74, 77, 80, 94, 96, 96, 97],19,), ([-50, -18, -66, 76, -54, 96, 98, 26, 42, 64, -60],9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,), ([70, 21, 44, 82, 62, 41, 86],3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", C_PROGRAM_FACTORIAL_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class C_PROGRAM_FACTORIAL_NUMBER{ static int f_gold ( int n ) { if ( n == 0 ) return 1 ; return n * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(84); param0.add(41); param0.add(5); param0.add(38); param0.add(79); param0.add(80); param0.add(64); param0.add(62); param0.add(24); param0.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ; "," using namespace std; unsigned int f_gold ( unsigned int n ) { if ( n == 0 ) return 1; return n * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {84,41,5,38,79,80,64,62,24,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (84,), (41,), (5,), (38,), (79,), (80,), (64,), (62,), (24,), (12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FORM_MINIMUM_NUMBER_FROM_GIVEN_SEQUENCE_1{ static String f_gold ( String seq ) { int n = seq . length ( ) ; if ( n >= 9 ) return ""-1"" ; char result [ ] = new char [ n + 1 ] ; int count = 1 ; for ( int i = 0 ; i <= n ; i ++ ) { if ( i == n || seq . charAt ( i ) == 'I' ) { for ( int j = i - 1 ; j >= - 1 ; j -- ) { result [ j + 1 ] = ( char ) ( ( int ) '0' + count ++ ) ; if ( j >= 0 && seq . charAt ( j ) == 'I' ) break ; } } } return new String ( result ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""D""); param0.add(""I""); param0.add(""DD""); param0.add(""II""); param0.add(""DIDI""); param0.add(""IIDDD""); param0.add(""DDIDDIID""); param0.add(""176297""); param0.add(""1""); param0.add(""XHkhZq""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( seq ) : n = len ( seq ) if ( n >= 9 ) : return ""-1"" result = [ None ] * ( n + 1 ) count = 1 for i in range ( n + 1 ) : if ( i == n or seq [ i ] == 'I' ) : for j in range ( i - 1 , - 2 , - 1 ) : result [ j + 1 ] = int ( '0' + str ( count ) ) count += 1 if ( j >= 0 and seq [ j ] == 'I' ) : break return result "," 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; } int main() { int n_success = 0; vector param0 {""D"",""I"",""DD"",""II"",""DIDI"",""IIDDD"",""DDIDDIID"",""176297"",""1"",""XHkhZq""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('D',), ('I',), ('DD',), ('II',), ('DIDI',), ('IIDDD',), ('DDIDDIID',), ('176297',), ('1',), ('XHkhZq',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS{ public static 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 ( true ) { 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 ++ ] ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,10,11,24,27,33,34,36,36,40,42,43,52,58,67,69,77,86,86,88}); param0.add(new int[]{40,54,14,58,-64,-60,-98,-64,-52,30,0,-42,74,46,-14,76,84,74,-24,30,96,88,-98,82,44,-86,-92,-52,28,62}); param0.add(new int[]{0,0}); param0.add(new int[]{64,40,45,93,30,79,24,95,1,84,74,5,9,6,22,33,10,53,33,9,31,21,22,77,21,93,86,68,92,57,27,82,87,11,51,2,27,2,24,57,20,2,32,43}); param0.add(new int[]{-94,-50,-24,-12,-6,-6,8,26,28,44}); param0.add(new int[]{1,1,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,1}); param0.add(new int[]{3,3,4,5,9,18,21,22,25,27,28,33,35,39,39,43,57,58,59,63,65,65,72,77,78,78,80,80,88,92,99}); param0.add(new int[]{40,28,-84,-38,82,2,38,10,-10,20,-54,48,56,38,-98,68,-8,-30,-96,-16,28,94,-52,28,34,68,-46,44,-28,-52,-48,-14,-30,24,56,8,-30,-46,18,-68,86,-12}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{22,31,75,48,30,39,82,93,26,87,77,87,67,88,19,51,54,48,6,37,38,27}); List param1 = new ArrayList<>(); param1.add(new int[]{4,13,34,40,41,47,47,52,55,62,66,66,69,70,73,74,75,76,85,98}); param1.add(new int[]{24,34,-52,50,-8,-48,-28,68,-12,-26,0,6,-76,-94,-12,8,38,-88,30,98,-78,-54,-48,42,26,-76,4,46,26,60}); param1.add(new int[]{1,1}); param1.add(new int[]{48,85,55,12,24,26,88,76,15,34,23,61,2,99,11,37,65,74,92,96,68,50,67,98,89,17,62,18,51,61,41,41,90,64,89,51,48,95,9,86,28,54,64,35}); param1.add(new int[]{-96,-94,-86,-70,-52,-18,-6,20,52,52}); param1.add(new int[]{1,0,0,0,0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1}); param1.add(new int[]{3,17,18,23,24,24,26,28,34,48,53,54,56,61,64,67,69,74,77,79,79,81,81,82,84,84,85,86,88,92,96}); param1.add(new int[]{26,24,-50,18,78,-90,62,88,-36,-96,78,6,-94,-2,-28,-38,66,72,-36,14,-48,-64,-24,82,92,-16,-26,-12,6,34,30,-46,48,-22,34,-64,4,-32,84,-20,32,-22}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{18,20,53,87,85,63,6,81,89,82,43,76,59,60,79,96,29,65,5,56,96,95}); List param2 = new ArrayList<>(); param2.add(new int[]{6,8,10,12,14,29,41,52,53,54,55,66,69,73,77,77,78,80,90,99}); param2.add(new int[]{-8,-24,54,28,92,94,0,62,28,80,82,2,88,-4,-28,80,44,34,-98,36,28,76,-48,40,98,4,22,-36,-20,-70}); param2.add(new int[]{0,0}); param2.add(new int[]{99,77,11,20,33,91,5,68,75,67,37,70,59,26,2,62,6,97,95,38,46,89,29,61,27,93,26,74,98,85,91,92,40,97,58,44,20,57,65,62,65,26,74,58}); param2.add(new int[]{-70,-40,-22,4,12,12,38,54,72,74}); param2.add(new int[]{0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,1,1,0,0,1,0}); param2.add(new int[]{1,3,5,8,15,16,27,27,27,28,29,30,32,35,36,37,44,47,57,65,69,70,70,76,76,83,85,87,88,90,92}); param2.add(new int[]{66,26,-90,-40,-52,-98,84,88,40,-92,30,28,32,92,18,-34,-42,64,-34,70,-72,28,44,34,76,-78,46,-48,20,54,-2,66,6,56,52,-98,-48,-70,-60,94,90,10}); param2.add(new int[]{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}); param2.add(new int[]{10,76,49,36,41,18,60,44,81,34,56,7,13,83,82,16,7,38,33,55,91,54}); List param3 = new ArrayList<>(); param3.add(10); param3.add(26); param3.add(1); param3.add(42); param3.add(5); param3.add(39); param3.add(24); param3.add(32); param3.add(16); param3.add(19); List param4 = new ArrayList<>(); param4.add(12); param4.add(28); param4.add(1); param4.add(27); param4.add(5); param4.add(34); param4.add(16); param4.add(37); param4.add(23); param4.add(16); List param5 = new ArrayList<>(); param5.add(18); param5.add(15); param5.add(1); param5.add(31); param5.add(5); param5.add(26); param5.add(29); param5.add(41); param5.add(22); param5.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( stack1 , stack2 , stack3 , n1 , n2 , n3 ) : sum1 , sum2 , sum3 = 0 , 0 , 0 for i in range ( n1 ) : sum1 += stack1 [ i ] for i in range ( n2 ) : sum2 += stack2 [ i ] for i in range ( n3 ) : sum3 += stack3 [ i ] top1 , top2 , top3 = 0 , 0 , 0 ans = 0 while ( 1 ) : if ( top1 == n1 or top2 == n2 or top3 == n3 ) : return 0 if ( sum1 == sum2 and sum2 == sum3 ) : return sum1 if ( sum1 >= sum2 and sum1 >= sum3 ) : sum1 -= stack1 [ top1 ] top1 = top1 + 1 elif ( sum2 >= sum3 and sum2 >= sum3 ) : sum2 -= stack2 [ top2 ] top2 = top2 + 1 elif ( sum3 >= sum2 and sum3 >= sum1 ) : sum3 -= stack3 [ top3 ] top3 = top3 + 1 "," 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 ++ ]; } } int main() { int n_success = 0; vector> param0 {{4,10,11,24,27,33,34,36,36,40,42,43,52,58,67,69,77,86,86,88},{40,54,14,58,-64,-60,-98,-64,-52,30,0,-42,74,46,-14,76,84,74,-24,30,96,88,-98,82,44,-86,-92,-52,28,62},{0,0},{64,40,45,93,30,79,24,95,1,84,74,5,9,6,22,33,10,53,33,9,31,21,22,77,21,93,86,68,92,57,27,82,87,11,51,2,27,2,24,57,20,2,32,43},{-94,-50,-24,-12,-6,-6,8,26,28,44},{1,1,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,1},{3,3,4,5,9,18,21,22,25,27,28,33,35,39,39,43,57,58,59,63,65,65,72,77,78,78,80,80,88,92,99},{40,28,-84,-38,82,2,38,10,-10,20,-54,48,56,38,-98,68,-8,-30,-96,-16,28,94,-52,28,34,68,-46,44,-28,-52,-48,-14,-30,24,56,8,-30,-46,18,-68,86,-12},{0,0,0,0,0,0,0,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},{22,31,75,48,30,39,82,93,26,87,77,87,67,88,19,51,54,48,6,37,38,27}}; vector> param1 {{4,13,34,40,41,47,47,52,55,62,66,66,69,70,73,74,75,76,85,98},{24,34,-52,50,-8,-48,-28,68,-12,-26,0,6,-76,-94,-12,8,38,-88,30,98,-78,-54,-48,42,26,-76,4,46,26,60},{1,1},{48,85,55,12,24,26,88,76,15,34,23,61,2,99,11,37,65,74,92,96,68,50,67,98,89,17,62,18,51,61,41,41,90,64,89,51,48,95,9,86,28,54,64,35},{-96,-94,-86,-70,-52,-18,-6,20,52,52},{1,0,0,0,0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1},{3,17,18,23,24,24,26,28,34,48,53,54,56,61,64,67,69,74,77,79,79,81,81,82,84,84,85,86,88,92,96},{26,24,-50,18,78,-90,62,88,-36,-96,78,6,-94,-2,-28,-38,66,72,-36,14,-48,-64,-24,82,92,-16,-26,-12,6,34,30,-46,48,-22,34,-64,4,-32,84,-20,32,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{18,20,53,87,85,63,6,81,89,82,43,76,59,60,79,96,29,65,5,56,96,95}}; vector> param2 {{6,8,10,12,14,29,41,52,53,54,55,66,69,73,77,77,78,80,90,99},{-8,-24,54,28,92,94,0,62,28,80,82,2,88,-4,-28,80,44,34,-98,36,28,76,-48,40,98,4,22,-36,-20,-70},{0,0},{99,77,11,20,33,91,5,68,75,67,37,70,59,26,2,62,6,97,95,38,46,89,29,61,27,93,26,74,98,85,91,92,40,97,58,44,20,57,65,62,65,26,74,58},{-70,-40,-22,4,12,12,38,54,72,74},{0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,1,1,0,0,1,0},{1,3,5,8,15,16,27,27,27,28,29,30,32,35,36,37,44,47,57,65,69,70,70,76,76,83,85,87,88,90,92},{66,26,-90,-40,-52,-98,84,88,40,-92,30,28,32,92,18,-34,-42,64,-34,70,-72,28,44,34,76,-78,46,-48,20,54,-2,66,6,56,52,-98,-48,-70,-60,94,90,10},{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},{10,76,49,36,41,18,60,44,81,34,56,7,13,83,82,16,7,38,33,55,91,54}}; vector param3 {10,26,1,42,5,39,24,32,16,19}; vector param4 {12,28,1,27,5,34,16,37,23,16}; vector param5 {18,15,1,31,5,26,29,41,22,17}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 10, 11, 24, 27, 33, 34, 36, 36, 40, 42, 43, 52, 58, 67, 69, 77, 86, 86, 88],[4, 13, 34, 40, 41, 47, 47, 52, 55, 62, 66, 66, 69, 70, 73, 74, 75, 76, 85, 98],[6, 8, 10, 12, 14, 29, 41, 52, 53, 54, 55, 66, 69, 73, 77, 77, 78, 80, 90, 99],10,12,18,), ([40, 54, 14, 58, -64, -60, -98, -64, -52, 30, 0, -42, 74, 46, -14, 76, 84, 74, -24, 30, 96, 88, -98, 82, 44, -86, -92, -52, 28, 62],[24, 34, -52, 50, -8, -48, -28, 68, -12, -26, 0, 6, -76, -94, -12, 8, 38, -88, 30, 98, -78, -54, -48, 42, 26, -76, 4, 46, 26, 60],[-8, -24, 54, 28, 92, 94, 0, 62, 28, 80, 82, 2, 88, -4, -28, 80, 44, 34, -98, 36, 28, 76, -48, 40, 98, 4, 22, -36, -20, -70],26,28,15,), ([0, 0],[1, 1],[0, 0],1,1,1,), ([64, 40, 45, 93, 30, 79, 24, 95, 1, 84, 74, 5, 9, 6, 22, 33, 10, 53, 33, 9, 31, 21, 22, 77, 21, 93, 86, 68, 92, 57, 27, 82, 87, 11, 51, 2, 27, 2, 24, 57, 20, 2, 32, 43],[48, 85, 55, 12, 24, 26, 88, 76, 15, 34, 23, 61, 2, 99, 11, 37, 65, 74, 92, 96, 68, 50, 67, 98, 89, 17, 62, 18, 51, 61, 41, 41, 90, 64, 89, 51, 48, 95, 9, 86, 28, 54, 64, 35],[99, 77, 11, 20, 33, 91, 5, 68, 75, 67, 37, 70, 59, 26, 2, 62, 6, 97, 95, 38, 46, 89, 29, 61, 27, 93, 26, 74, 98, 85, 91, 92, 40, 97, 58, 44, 20, 57, 65, 62, 65, 26, 74, 58],42,27,31,), ([-94, -50, -24, -12, -6, -6, 8, 26, 28, 44],[-96, -94, -86, -70, -52, -18, -6, 20, 52, 52],[-70, -40, -22, 4, 12, 12, 38, 54, 72, 74],5,5,5,), ([1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1],[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1],[0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0],39,34,26,), ([3, 3, 4, 5, 9, 18, 21, 22, 25, 27, 28, 33, 35, 39, 39, 43, 57, 58, 59, 63, 65, 65, 72, 77, 78, 78, 80, 80, 88, 92, 99],[3, 17, 18, 23, 24, 24, 26, 28, 34, 48, 53, 54, 56, 61, 64, 67, 69, 74, 77, 79, 79, 81, 81, 82, 84, 84, 85, 86, 88, 92, 96],[1, 3, 5, 8, 15, 16, 27, 27, 27, 28, 29, 30, 32, 35, 36, 37, 44, 47, 57, 65, 69, 70, 70, 76, 76, 83, 85, 87, 88, 90, 92],24,16,29,), ([40, 28, -84, -38, 82, 2, 38, 10, -10, 20, -54, 48, 56, 38, -98, 68, -8, -30, -96, -16, 28, 94, -52, 28, 34, 68, -46, 44, -28, -52, -48, -14, -30, 24, 56, 8, -30, -46, 18, -68, 86, -12],[26, 24, -50, 18, 78, -90, 62, 88, -36, -96, 78, 6, -94, -2, -28, -38, 66, 72, -36, 14, -48, -64, -24, 82, 92, -16, -26, -12, 6, 34, 30, -46, 48, -22, 34, -64, 4, -32, 84, -20, 32, -22],[66, 26, -90, -40, -52, -98, 84, 88, 40, -92, 30, 28, 32, 92, 18, -34, -42, 64, -34, 70, -72, 28, 44, 34, 76, -78, 46, -48, 20, 54, -2, 66, 6, 56, 52, -98, -48, -70, -60, 94, 90, 10],32,37,41,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,23,22,), ([22, 31, 75, 48, 30, 39, 82, 93, 26, 87, 77, 87, 67, 88, 19, 51, 54, 48, 6, 37, 38, 27],[18, 20, 53, 87, 85, 63, 6, 81, 89, 82, 43, 76, 59, 60, 79, 96, 29, 65, 5, 56, 96, 95],[10, 76, 49, 36, 41, 18, 60, 44, 81, 34, 56, 7, 13, 83, 82, 16, 7, 38, 33, 55, 91, 54],19,16,17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_MODULO_K_FIRST_N_NATURAL_NUMBER{ static int f_gold ( int N , int K ) { int ans = 0 ; for ( int i = 1 ; i <= N ; i ++ ) ans += ( i % K ) ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(11); param0.add(36); param0.add(71); param0.add(74); param0.add(66); param0.add(38); param0.add(2); param0.add(73); param0.add(79); param0.add(30); List param1 = new ArrayList<>(); param1.add(5); param1.add(69); param1.add(28); param1.add(1); param1.add(84); param1.add(14); param1.add(11); param1.add(87); param1.add(11); param1.add(55); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N , K ) : ans = 0 ; for i in range ( 1 , N + 1 ) : ans += ( i % K ) ; return ans ; "," 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; } int main() { int n_success = 0; vector param0 {11,36,71,74,66,38,2,73,79,30}; vector param1 {5,69,28,1,84,14,11,87,11,55}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (11,5,), (36,69,), (71,28,), (74,1,), (66,84,), (38,14,), (2,11,), (73,87,), (79,11,), (30,55,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_NUMBER_CHARACTERS_TWO_CHARACTER_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_NUMBER_CHARACTERS_TWO_CHARACTER_STRING{ static 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 . charAt ( i ) == str . charAt ( j ) ) res = Math . max ( res , Math . abs ( j - i - 1 ) ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""cI""); param0.add(""76478""); param0.add(""1""); param0.add(""tr""); param0.add(""10""); param0.add(""01""); param0.add(""Rmhzp""); param0.add(""5784080133917""); param0.add(""1100""); param0.add(""OK""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) res = - 1 for i in range ( 0 , n - 1 ) : for j in range ( i + 1 , n ) : if ( str [ i ] == str [ j ] ) : res = max ( res , abs ( j - i - 1 ) ) return res "," 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; } int main() { int n_success = 0; vector param0 {""cI"",""76478"",""1"",""tr"",""10"",""01"",""Rmhzp"",""5784080133917"",""1100"",""OK""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('cI',), ('76478',), ('1',), ('tr',), ('10',), ('01',), ('Rmhzp',), ('5784080133917',), ('1100',), ('OK',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_ARRAY_MAJORITY_ELEMENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_ARRAY_MAJORITY_ELEMENT{ static boolean f_gold ( int a [ ] , int n ) { HashMap < Integer , Integer > mp = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) if ( mp . containsKey ( a [ i ] ) ) mp . put ( a [ i ] , mp . get ( a [ i ] ) + 1 ) ; else mp . put ( a [ i ] , 1 ) ; for ( Map . Entry < Integer , Integer > x : mp . entrySet ( ) ) if ( x . getValue ( ) >= n / 2 ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,14,20,26,32,33,34,35,35,49,51,55,57,64,64,68,70,72,74,77,78,78,78,80,91,91,94}); param0.add(new int[]{-14,-98,-36,68,-20,18,16,-50,66,98,12,-2,-68}); param0.add(new int[]{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}); param0.add(new int[]{29,96,94,67,87,65,27,21,60,49,73,85,9,17,72,3,73,69,95,3,30,88,54,94,40}); param0.add(new int[]{-86,-80,-76,-76,-74,-62,-62,-56,-48,-36,-28,-22,-18,-18,-18,-16,-14,-12,-6,-2,10,14,18,24,32,32,40,40,40,42,46,48,50,56,56,56,68,76,84,94,96,96}); param0.add(new int[]{0,1,1,1,0}); param0.add(new int[]{5,8,9,12,14,16,19,29,32,32,37,38,38,39,40,41,43,45,47,51,53,58,58,63,64,65,69,83,84,86,92,93,96,98}); param0.add(new int[]{-68,-50,-20,22,90,86,4,60,-88,82,-4,-54,36,-44,86}); param0.add(new int[]{0,0,0,0,1,1,1,1}); param0.add(new int[]{85,64,25,64,46,35,31,45,93,81,49,33,96,48,37}); List param1 = new ArrayList<>(); param1.add(15); param1.add(11); param1.add(22); param1.add(15); param1.add(23); param1.add(3); param1.add(17); param1.add(13); param1.add(6); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector> param0 {{6,14,20,26,32,33,34,35,35,49,51,55,57,64,64,68,70,72,74,77,78,78,78,80,91,91,94},{-14,-98,-36,68,-20,18,16,-50,66,98,12,-2,-68},{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},{29,96,94,67,87,65,27,21,60,49,73,85,9,17,72,3,73,69,95,3,30,88,54,94,40},{-86,-80,-76,-76,-74,-62,-62,-56,-48,-36,-28,-22,-18,-18,-18,-16,-14,-12,-6,-2,10,14,18,24,32,32,40,40,40,42,46,48,50,56,56,56,68,76,84,94,96,96},{0,1,1,1,0},{5,8,9,12,14,16,19,29,32,32,37,38,38,39,40,41,43,45,47,51,53,58,58,63,64,65,69,83,84,86,92,93,96,98},{-68,-50,-20,22,90,86,4,60,-88,82,-4,-54,36,-44,86},{0,0,0,0,1,1,1,1},{85,64,25,64,46,35,31,45,93,81,49,33,96,48,37}}; vector param1 {15,11,22,15,23,3,17,13,6,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW{ static int f_gold ( int a , int b ) { return ( a + b ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(6); param0.add(75); param0.add(51); param0.add(19); param0.add(82); param0.add(72); param0.add(48); param0.add(12); param0.add(41); List param1 = new ArrayList<>(); param1.add(44); param1.add(61); param1.add(20); param1.add(17); param1.add(25); param1.add(98); param1.add(21); param1.add(41); param1.add(17); param1.add(80); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","from math import floor def f_gold ( a , b ) : return floor ( ( a + b ) / 2 ) "," using namespace std; int f_gold ( int a, int b ) { return ( a + b ) / 2; } int main() { int n_success = 0; vector param0 {1,6,75,51,19,82,72,48,12,41}; vector param1 {44,61,20,17,25,98,21,41,17,80}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,44,), (6,61,), (75,20,), (51,17,), (19,25,), (82,98,), (72,21,), (48,41,), (12,17,), (41,80,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COST_BALANCE_PARANTHESES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COST_BALANCE_PARANTHESES{ static int f_gold ( String s ) { if ( s . length ( ) == 0 ) System . out . println ( 0 ) ; int ans = 0 ; int o = 0 , c = 0 ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == '(' ) o ++ ; if ( s . charAt ( i ) == ')' ) c ++ ; } if ( o != c ) return - 1 ; int [ ] a = new int [ s . length ( ) ] ; if ( s . charAt ( 0 ) == '(' ) a [ 0 ] = 1 ; else a [ 0 ] = - 1 ; if ( a [ 0 ] < 0 ) ans += Math . abs ( a [ 0 ] ) ; for ( int i = 1 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == '(' ) a [ i ] = a [ i - 1 ] + 1 ; else a [ i ] = a [ i - 1 ] - 1 ; if ( a [ i ] < 0 ) ans += Math . abs ( a [ i ] ) ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""()""); param0.add(""))((""); param0.add(""())""); param0.add(""(()""); param0.add(""(()()())""); param0.add(""))())(()(())""); param0.add(""))(())((""); param0.add(""49""); param0.add(""00001111""); param0.add(""KDahByG ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : if ( len ( s ) == 0 ) : print ( 0 ) ans = 0 o = 0 c = 0 for i in range ( len ( s ) ) : if ( s [ i ] == '(' ) : o += 1 if ( s [ i ] == ')' ) : c += 1 if ( o != c ) : return - 1 a = [ 0 for i in range ( len ( s ) ) ] if ( s [ 0 ] == '(' ) : a [ 0 ] = 1 else : a [ 0 ] = - 1 if ( a [ 0 ] < 0 ) : ans += abs ( a [ 0 ] ) for i in range ( 1 , len ( s ) ) : if ( s [ i ] == '(' ) : a [ i ] = a [ i - 1 ] + 1 else : a [ i ] = a [ i - 1 ] - 1 if ( a [ i ] < 0 ) : ans += abs ( a [ i ] ) return ans "," 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; } int main() { int n_success = 0; vector param0 {""()"",""))(("",""())"",""(()"",""(()()())"",""))())(()(())"",""))(())(("",""49"",""00001111"",""KDahByG ""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('()',), ('))((',), ('())',), ('(()',), ('(()()())',), ('))())(()(())',), ('))(())((',), ('49',), ('00001111',), ('KDahByG ',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FIND_SMALLEST_DIFFERENCE_ANGLES_TWO_PARTS_GIVEN_CIRCLE{ public static 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 = Math . min ( ans , 2 * Math . abs ( 180 - sum ) ) ; sum -= arr [ l ] ; l ++ ; } ans = Math . min ( ans , 2 * Math . abs ( 180 - sum ) ) ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,4,5,5,13,14,14,16,19,20,30,31,32,33,35,38,38,42,44,44,48,48,52,58,60,64,65,66,68,69,70,70,71,72,73,79,81,83,83,84,86,87,88,88,91,92,95,95,98}); param0.add(new int[]{-56,88,-50,70,20,58,42,-56,-52,-78,98,20,-26,4,20,-66,-46,-58,74,74,-72,2,16,-78,-4,10,58,60,-46,-2,32,-96,24,-6,90,-64,-24,-38,26,66,-42,-86,48,92,28,6,-54,-6}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{52,67,62}); param0.add(new int[]{-56,-22,32,42,66}); param0.add(new int[]{1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0}); param0.add(new int[]{38,46,58,72}); param0.add(new int[]{16,62,90,40,30,-56,-92,-56,60,42,-64,92,-30,-70,42,-48,-54,54,48,94,-44,-46,10,48,22,-24,-62,34,60,24,-60,50,40,34}); param0.add(new int[]{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}); param0.add(new int[]{86,43,74,84,86,14,45,7,92,36,79,13,67,18,96,77,13,22,28,36,57,56,99,57,8,48,5,79,65,64,96,6,36,91,53,55,11,12,80,99,50,40,4,9,52,41}); List param1 = new ArrayList<>(); param1.add(27); param1.add(29); param1.add(25); param1.add(1); param1.add(4); param1.add(10); param1.add(2); param1.add(20); param1.add(37); param1.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : l = 0 _sum = 0 ans = 360 for i in range ( n ) : _sum += arr [ i ] while _sum >= 180 : ans = min ( ans , 2 * abs ( 180 - _sum ) ) _sum -= arr [ l ] l += 1 ans = min ( ans , 2 * abs ( 180 - _sum ) ) return ans "," 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; } int main() { int n_success = 0; vector> param0 {{4,4,5,5,13,14,14,16,19,20,30,31,32,33,35,38,38,42,44,44,48,48,52,58,60,64,65,66,68,69,70,70,71,72,73,79,81,83,83,84,86,87,88,88,91,92,95,95,98},{-56,88,-50,70,20,58,42,-56,-52,-78,98,20,-26,4,20,-66,-46,-58,74,74,-72,2,16,-78,-4,10,58,60,-46,-2,32,-96,24,-6,90,-64,-24,-38,26,66,-42,-86,48,92,28,6,-54,-6},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{52,67,62},{-56,-22,32,42,66},{1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,0},{38,46,58,72},{16,62,90,40,30,-56,-92,-56,60,42,-64,92,-30,-70,42,-48,-54,54,48,94,-44,-46,10,48,22,-24,-62,34,60,24,-60,50,40,34},{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},{86,43,74,84,86,14,45,7,92,36,79,13,67,18,96,77,13,22,28,36,57,56,99,57,8,48,5,79,65,64,96,6,36,91,53,55,11,12,80,99,50,40,4,9,52,41}}; vector param1 {27,29,25,1,4,10,2,20,37,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 4, 5, 5, 13, 14, 14, 16, 19, 20, 30, 31, 32, 33, 35, 38, 38, 42, 44, 44, 48, 48, 52, 58, 60, 64, 65, 66, 68, 69, 70, 70, 71, 72, 73, 79, 81, 83, 83, 84, 86, 87, 88, 88, 91, 92, 95, 95, 98],27,), ([-56, 88, -50, 70, 20, 58, 42, -56, -52, -78, 98, 20, -26, 4, 20, -66, -46, -58, 74, 74, -72, 2, 16, -78, -4, 10, 58, 60, -46, -2, 32, -96, 24, -6, 90, -64, -24, -38, 26, 66, -42, -86, 48, 92, 28, 6, -54, -6],29,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],25,), ([52, 67, 62],1,), ([-56, -22, 32, 42, 66],4,), ([1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0],10,), ([38, 46, 58, 72],2,), ([16, 62, 90, 40, 30, -56, -92, -56, 60, 42, -64, 92, -30, -70, 42, -48, -54, 54, 48, 94, -44, -46, 10, 48, 22, -24, -62, 34, 60, 24, -60, 50, 40, 34],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],37,), ([86, 43, 74, 84, 86, 14, 45, 7, 92, 36, 79, 13, 67, 18, 96, 77, 13, 22, 28, 36, 57, 56, 99, 57, 8, 48, 5, 79, 65, 64, 96, 6, 36, 91, 53, 55, 11, 12, 80, 99, 50, 40, 4, 9, 52, 41],40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_ONE_LINE_C_FUNCTION_TO_FIND_WHETHER_A_NO_IS_POWER_OF_TWO_1{ static boolean f_gold ( int x ) { return x != 0 && ( ( x & ( x - 1 ) ) == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(2); param0.add(8); param0.add(1024); param0.add(24); param0.add(7); param0.add(46); param0.add(61); param0.add(73); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : return ( x and ( not ( x & ( x - 1 ) ) ) ) ",,," if __name__ == '__main__': param = [ (1,), (2,), (8,), (1024,), (24,), (7,), (46,), (61,), (73,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HARDY_RAMANUJAN_THEOREM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HARDY_RAMANUJAN_THEOREM{ static 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 <= Math . sqrt ( n ) ; i = i + 2 ) { if ( n % i == 0 ) { count ++ ; while ( n % i == 0 ) n = n / i ; } } if ( n > 2 ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(99); param0.add(33); param0.add(50); param0.add(17); param0.add(18); param0.add(69); param0.add(23); param0.add(18); param0.add(94); param0.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : count = 0 if ( n % 2 == 0 ) : count = count + 1 while ( n % 2 == 0 ) : n = int ( n / 2 ) i = 3 while ( i <= int ( math.sqrt ( n ) ) ) : if ( n % i == 0 ) : count = count + 1 while ( n % i == 0 ) : n = int ( n / i ) i = i + 2 if ( n > 2 ) : count = count + 1 return count "," 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; } int main() { int n_success = 0; vector param0 {99,33,50,17,18,69,23,18,94,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (99,), (33,), (50,), (17,), (18,), (69,), (23,), (18,), (94,), (16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", GCD_ELEMENTS_GIVEN_RANGE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GCD_ELEMENTS_GIVEN_RANGE{ static int f_gold ( int n , int m ) { return ( n == m ) ? n : 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(22); param0.add(17); param0.add(74); param0.add(93); param0.add(56); param0.add(5); param0.add(5); param0.add(9); param0.add(98); List param1 = new ArrayList<>(); param1.add(57); param1.add(22); param1.add(17); param1.add(74); param1.add(22); param1.add(54); param1.add(33); param1.add(68); param1.add(75); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , m ) : return n if ( n == m ) else 1 "," using namespace std; int f_gold ( int n, int m ) { return ( n == m ) ? n : 1; } int main() { int n_success = 0; vector param0 {57,22,17,74,93,56,5,5,9,98}; vector param1 {57,22,17,74,22,54,33,68,75,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,57,), (22,22,), (17,17,), (74,74,), (93,22,), (56,54,), (5,33,), (5,68,), (9,75,), (98,21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MINIMUM_SUM_FACTORS_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MINIMUM_SUM_FACTORS_NUMBER{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(83); param0.add(88); param0.add(60); param0.add(6); param0.add(26); param0.add(98); param0.add(38); param0.add(90); param0.add(76); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num ) : sum = 0 i = 2 while ( i * i <= num ) : while ( num % i == 0 ) : sum += i num /= i i += 1 sum += num return sum "," 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; } int main() { int n_success = 0; vector param0 {83,88,60,6,26,98,38,90,76,66}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (83,), (88,), (60,), (6,), (26,), (98,), (38,), (90,), (76,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROBABILITY_THREE_RANDOMLY_CHOSEN_NUMBERS_AP{ static double f_gold ( int n ) { return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(46); param0.add(5); param0.add(44); param0.add(15); param0.add(72); param0.add(2); param0.add(86); param0.add(17); param0.add(30); param0.add(42); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 ) "," using namespace std; double f_gold ( int n ) { return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 ); } int main() { int n_success = 0; vector param0 {46,5,44,15,72,2,86,17,30,42}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (46,), (5,), (44,), (15,), (72,), (2,), (86,), (17,), (30,), (42,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", GOLD_MINE_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GOLD_MINE_PROBLEM{ static int f_gold ( int gold [ ] [ ] , int m , int n ) { int goldTable [ ] [ ] = new int [ m ] [ n ] ; for ( int [ ] rows : goldTable ) Arrays . fill ( rows , 0 ) ; for ( int col = n - 1 ; col >= 0 ; col -- ) { for ( int row = 0 ; row < m ; row ++ ) { int right = ( col == n - 1 ) ? 0 : goldTable [ row ] [ col + 1 ] ; int right_up = ( row == 0 || col == n - 1 ) ? 0 : goldTable [ row - 1 ] [ col + 1 ] ; int right_down = ( row == m - 1 || col == n - 1 ) ? 0 : goldTable [ row + 1 ] [ col + 1 ] ; goldTable [ row ] [ col ] = gold [ row ] [ col ] + Math . max ( right , Math . max ( right_up , right_down ) ) ; ; } } int res = goldTable [ 0 ] [ 0 ] ; for ( int i = 1 ; i < m ; i ++ ) res = Math . max ( res , goldTable [ i ] [ 0 ] ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{19,20,23,25,28,35,35,40,45,46,48,54,57,59,74,76,78,82,84,86,87,90,91,96},new int[]{9,13,17,20,26,27,42,46,48,62,67,69,72,73,76,77,82,83,86,93,95,95,98,98},new int[]{2,12,18,25,29,30,31,33,39,45,48,49,56,57,60,61,64,72,73,78,79,94,98,98},new int[]{2,3,10,15,20,22,23,23,27,29,36,40,42,46,48,53,53,60,60,70,73,78,98,98},new int[]{6,10,11,12,15,20,28,28,33,40,43,48,51,57,60,60,61,62,66,68,72,75,92,97},new int[]{2,11,12,14,15,19,21,26,30,35,36,36,46,51,56,63,69,74,82,88,89,89,89,94},new int[]{1,4,5,10,11,13,15,18,23,28,44,53,53,66,67,69,70,71,71,77,79,87,88,99},new int[]{2,2,5,7,7,8,9,17,26,30,35,39,41,43,49,63,64,65,70,70,80,89,96,99},new int[]{4,7,11,12,14,16,20,21,27,41,42,42,43,48,49,52,62,66,75,76,81,86,97,99},new int[]{1,12,13,15,17,19,26,34,47,47,47,48,51,52,53,60,61,63,64,74,77,82,87,93},new int[]{1,2,4,8,14,19,22,24,31,31,37,54,60,63,66,68,76,80,80,84,88,92,93,99},new int[]{1,2,3,6,7,9,11,19,25,27,35,36,45,52,57,57,86,88,89,89,93,94,97,99},new int[]{7,8,9,10,11,30,33,34,37,48,50,50,56,60,66,70,72,73,76,79,86,88,95,95},new int[]{1,4,5,5,6,11,26,27,32,36,43,47,47,47,50,56,56,66,76,78,78,94,97,99},new int[]{6,15,18,27,36,38,40,44,47,48,64,64,68,70,76,79,83,85,86,90,93,93,95,97},new int[]{1,4,4,10,11,12,16,19,20,22,22,23,35,49,51,58,66,66,68,76,77,81,86,94},new int[]{2,9,12,12,13,20,20,35,44,48,51,55,62,66,71,71,73,74,78,83,89,90,93,99},new int[]{9,15,20,24,25,31,32,35,36,49,50,51,52,55,58,63,79,79,85,89,90,96,98,99},new int[]{6,10,12,15,16,17,17,21,24,44,48,53,58,60,61,64,67,74,81,84,86,87,88,92},new int[]{7,10,14,20,21,27,30,30,31,34,36,37,39,45,55,55,63,64,66,82,88,88,94,95},new int[]{6,11,13,21,22,23,23,24,28,35,36,40,41,53,55,57,63,66,73,74,77,78,87,96},new int[]{4,17,19,23,25,38,42,45,50,57,61,62,62,62,62,64,75,78,79,79,82,85,86,93},new int[]{14,15,21,27,38,39,40,42,43,43,50,51,54,58,58,59,60,62,63,70,75,85,91,92},new int[]{6,7,11,12,20,30,40,41,41,44,47,51,52,53,59,75,76,77,84,87,91,93,95,97}}); param0.add(new int[][]{new int[]{38,12,92,-6,8},new int[]{80,66,-56,-54,-74},new int[]{36,6,52,-78,-92},new int[]{80,76,88,10,-30},new int[]{32,64,18,58,-2}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,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}}); param0.add(new int[][]{new int[]{45,96,71},new int[]{87,80,90},new int[]{96,72,49}}); param0.add(new int[][]{new int[]{-98,-98,-92,-82,-80,-72,-70,-48,-38,-32,-32,-28,-16,-2,0,0,20,20,24,30,36,40,46,58,62,62,66,74,74,76,80,82},new int[]{-96,-94,-94,-88,-80,-64,-54,-48,-46,-44,-38,-36,-34,-32,-30,-30,-24,-16,2,8,26,36,36,40,48,52,78,80,80,80,88,94},new int[]{-98,-98,-92,-88,-88,-88,-62,-60,-46,-34,-24,-16,-14,8,10,16,18,20,30,44,48,48,50,54,54,70,70,76,78,82,84,94},new int[]{-94,-80,-76,-74,-66,-58,-48,-38,-26,-16,-12,-10,-8,-2,0,8,10,10,12,22,28,32,40,42,44,50,60,72,84,86,90,94},new int[]{-88,-72,-62,-46,-44,-44,-34,-30,-28,-28,-18,-18,-10,-6,-4,-2,2,8,8,22,32,34,38,46,54,54,54,76,76,80,84,86},new int[]{-94,-94,-82,-80,-78,-70,-58,-46,-36,-28,-10,-10,0,2,2,4,8,14,24,32,34,34,38,42,42,42,58,84,86,88,94,96},new int[]{-98,-96,-96,-88,-80,-68,-62,-54,-52,-28,-28,-26,-22,-12,-8,-4,2,8,16,16,28,30,32,38,54,58,66,70,74,76,96,98},new int[]{-86,-84,-80,-62,-62,-58,-52,-50,-42,-38,-36,-36,-28,-18,-4,10,14,38,40,46,46,48,54,72,72,74,84,86,86,88,90,96},new int[]{-78,-74,-66,-62,-48,-26,-18,-12,6,8,18,22,24,34,36,38,42,46,64,66,66,68,70,72,76,76,78,80,84,86,88,90},new int[]{-98,-98,-92,-84,-74,-70,-68,-50,-50,-48,-48,-36,-30,-6,-4,-4,-4,10,24,28,30,32,50,58,60,62,76,78,84,90,90,98},new int[]{-98,-96,-82,-78,-74,-62,-62,-60,-58,-56,-50,-42,-36,-32,-20,-4,0,2,6,14,16,26,26,42,46,70,70,72,78,82,86,90},new int[]{-86,-80,-80,-76,-70,-66,-58,-54,-50,-44,-42,-36,-32,-24,-22,-16,-8,-6,2,4,16,18,36,40,46,52,58,60,62,74,76,98},new int[]{-86,-78,-66,-64,-58,-52,-38,-32,-30,-28,-18,-18,-16,-10,-8,2,2,4,6,6,14,22,36,36,42,52,54,76,78,84,88,98},new int[]{-98,-94,-94,-74,-72,-52,-50,-38,-30,-26,-16,-14,-4,2,2,4,4,16,22,24,28,32,34,34,36,50,56,66,68,80,82,94},new int[]{-98,-90,-86,-78,-74,-72,-70,-58,-56,-52,-50,-44,-30,-24,-24,-2,0,6,20,32,40,40,46,48,50,58,64,74,84,90,90,90},new int[]{-98,-92,-86,-84,-82,-82,-78,-66,-64,-50,-40,-24,-24,-22,-22,-14,-12,-8,0,8,12,14,20,26,42,42,58,64,82,86,92,96},new int[]{-98,-90,-86,-76,-68,-64,-64,-64,-54,-54,-52,-44,-34,-34,-12,6,10,12,26,38,40,40,60,68,68,68,74,78,80,88,98,98},new int[]{-92,-92,-68,-60,-54,-52,-48,-46,-40,-36,-32,-30,-28,-24,-24,-18,-4,-2,2,28,32,38,42,46,60,62,72,78,80,82,82,90},new int[]{-98,-86,-80,-80,-76,-64,-62,-60,-50,-34,-22,-18,-14,-12,-12,-10,2,6,10,18,22,28,32,32,36,38,48,66,72,82,90,96},new int[]{-92,-90,-86,-84,-82,-78,-72,-72,-68,-68,-60,-46,-38,-30,-28,2,8,10,18,22,24,28,40,40,52,54,64,74,80,82,86,96},new int[]{-96,-86,-82,-82,-70,-70,-62,-62,-58,-58,-56,-56,-52,-52,-46,-42,-38,-34,-26,-24,-6,-6,-2,8,22,26,38,52,70,74,82,90},new int[]{-92,-70,-64,-62,-56,-54,-48,-42,-36,-22,-22,-20,-14,-14,-2,2,2,12,22,26,60,64,68,70,70,74,74,80,84,88,88,90},new int[]{-98,-98,-84,-84,-84,-80,-64,-60,-54,-54,-44,-34,-30,-18,-16,-14,2,8,10,28,30,32,50,58,62,62,64,72,78,78,82,88},new int[]{-96,-94,-86,-86,-60,-56,-52,-50,-34,-26,-14,-10,-6,-4,2,18,20,30,38,40,42,46,48,52,54,66,68,74,74,84,92,98},new int[]{-98,-96,-96,-94,-66,-50,-44,-44,-38,-30,-30,-22,-20,-18,-16,-14,-14,-4,-4,-2,2,22,30,42,52,54,60,70,80,84,92,96},new int[]{-96,-84,-80,-78,-76,-74,-68,-64,-60,-58,-54,-46,-26,-14,-14,-10,-2,4,10,10,12,26,28,28,38,40,42,42,50,82,88,88},new int[]{-90,-78,-78,-76,-76,-76,-64,-64,-62,-44,-40,-32,-28,-24,-10,4,24,28,30,44,58,60,62,72,74,76,76,78,80,82,82,90},new int[]{-88,-86,-72,-66,-60,-60,-58,-58,-54,-38,-32,-30,-16,-14,-10,-10,-6,0,8,12,16,20,22,26,30,34,36,44,52,64,66,88},new int[]{-98,-94,-92,-92,-88,-68,-64,-64,-62,-44,-44,-36,-32,-32,-24,-18,-16,-6,-6,6,8,14,20,26,28,36,38,40,56,56,66,84},new int[]{-98,-94,-92,-90,-58,-56,-44,-42,-40,-40,-36,-32,-32,-12,-10,-2,-2,-2,0,8,16,18,26,26,42,46,52,54,84,86,88,94},new int[]{-80,-78,-78,-70,-58,-56,-56,-36,-34,-32,-6,4,6,10,20,32,40,42,54,58,58,64,66,66,66,66,80,82,82,82,88,90},new int[]{-92,-90,-78,-74,-70,-50,-48,-46,-46,-40,-40,-36,-24,-22,-20,-10,-10,-8,-8,-4,6,14,20,32,38,46,46,48,60,68,68,74}}); param0.add(new int[][]{new int[]{1,0,0,1,0,1,0,1,1,1,0,0,1,1,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0},new int[]{1,1,0,1,1,0,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,0,0,1,0,1,0,0},new int[]{0,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1},new int[]{0,0,1,1,1,1,1,0,0,1,0,1,0,0,0,0,0,0,1,0,0,1,0,1,1,1,0,0,1},new int[]{1,0,0,0,0,1,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,1,0,0,0,0,1,1,1},new int[]{0,1,1,1,1,0,1,1,0,0,1,1,0,1,1,0,1,1,0,0,0,1,1,1,0,1,1,0,0},new int[]{0,0,1,0,1,1,1,1,0,0,1,1,1,1,0,1,1,0,0,1,0,0,0,1,1,0,0,0,0},new int[]{1,0,1,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,0},new int[]{0,1,0,0,0,0,0,1,1,1,1,1,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,1,1},new int[]{1,0,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,1,1,0,1,1,1,1,1,1,0,0},new int[]{0,1,0,1,1,0,1,0,0,0,1,1,0,0,0,0,1,1,0,1,0,1,1,1,0,1,0,0,0},new int[]{0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,0,0,1,0,1,1,0,1,0,0,0,0,1,1},new int[]{0,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,0,1,1},new int[]{1,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,1,0,0},new int[]{0,1,0,0,0,0,1,0,1,0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,1,0,1,1,0},new int[]{0,1,1,0,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,1,0,1,0,0,1,1,0,0,1},new int[]{1,1,0,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,1,1},new int[]{0,1,0,1,0,1,1,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,1,1,0,0,0,1,0},new int[]{0,1,0,0,0,0,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,0,1,0,0,1,1},new int[]{0,1,0,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,1},new int[]{1,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1},new int[]{0,0,0,1,0,1,1,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,0,1,1,0,1},new int[]{0,1,0,1,0,1,1,1,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,1,1,0,0},new int[]{0,0,0,0,0,1,1,1,1,1,0,1,1,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0},new int[]{0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1,1,1,0,0,1,0,1,0,0},new int[]{1,1,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,1,1,0,0,1,1,0},new int[]{0,1,0,0,1,0,0,1,0,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,0},new int[]{0,1,0,1,0,1,0,1,1,0,1,1,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,1},new int[]{0,1,1,1,0,1,0,0,0,0,1,1,1,1,1,1,0,1,0,1,1,1,0,1,0,0,1,1,1}}); param0.add(new int[][]{new int[]{13,26,41,59,89,95,99},new int[]{5,21,27,30,41,84,92},new int[]{6,46,75,76,95,96,97},new int[]{13,21,33,62,74,85,88},new int[]{2,3,15,25,56,73,97},new int[]{38,65,71,76,82,86,86},new int[]{2,28,32,51,73,77,90}}); param0.add(new int[][]{new int[]{10,-88,60,-18,-24,-72,-10,8,-12,16,-22,-94,12,-8,66,10,6,6,52,-6,-18,98,44,48,-38,-32,-84,-56,-52,-60,-6,-74,-54,76,-74,-36,-44,94,-52,74,14},new int[]{0,-12,-26,-24,-72,28,-72,-44,32,-28,-98,-64,-48,72,-74,-10,10,-44,30,-12,-26,-38,-14,72,-42,68,26,78,-6,-58,-70,74,24,-68,-22,48,14,86,-14,58,-52},new int[]{48,-18,34,-38,8,96,-22,14,-48,74,58,-70,-30,-40,-12,-90,8,-98,-56,60,46,38,-82,32,-24,-68,-92,72,2,-96,-96,72,38,38,12,-18,-36,-94,-68,-32,54},new int[]{-28,4,-84,-68,-56,-60,-12,82,2,14,-2,62,42,36,56,-12,-30,-72,-70,10,96,-84,-44,64,2,70,-78,-62,-48,-94,48,28,-78,64,-4,80,-34,4,68,-18,-48},new int[]{-38,0,34,28,80,-36,-4,52,-86,84,44,16,34,8,-38,-80,-62,-78,62,50,98,-88,-40,-66,-16,-20,-34,-84,48,-28,-4,-10,34,-10,52,-58,-92,-46,14,-86,66},new int[]{-8,-56,-18,64,-64,-82,14,-60,-4,-32,-52,-70,62,56,-58,-26,-32,84,88,28,-34,-56,12,56,54,92,-90,8,84,18,12,40,-80,-24,66,-22,-14,76,-46,-18,10},new int[]{-22,-34,-92,-58,-6,-26,26,30,-92,82,12,-60,-60,-10,24,78,-78,50,-6,10,-32,-10,-6,72,-90,-54,-32,-88,-86,30,70,-4,84,-40,-52,32,-46,-92,-18,-92,-16},new int[]{-78,0,56,-10,14,64,84,-6,-32,-54,42,-22,26,-94,32,54,-32,20,-76,6,-68,-72,-54,32,14,-36,-2,-74,44,76,28,-34,20,84,56,-60,-6,30,-4,36,54},new int[]{90,-48,-22,20,26,48,-64,88,20,46,-86,-92,2,24,-4,4,-36,-12,28,-38,-84,48,-46,-30,68,-8,-30,-10,-2,64,-4,-30,48,2,96,26,-76,-26,14,-94,86},new int[]{-92,-66,-14,94,-92,-2,30,-8,88,34,-52,60,52,-10,-18,28,2,94,-12,62,-48,30,22,-26,70,-84,-4,82,-42,32,62,30,-54,80,-34,32,-94,-8,-40,-28,32},new int[]{-28,26,2,86,-74,8,-38,84,-6,18,-38,48,-60,36,-58,12,-76,62,-4,-14,-18,-74,-56,-16,48,74,-46,12,-42,-18,62,18,98,-80,-92,22,-80,-74,10,-72,-88},new int[]{12,54,48,60,32,-74,54,50,32,-38,96,20,72,-32,76,-30,96,58,-2,40,12,72,94,82,70,74,-90,-82,-2,6,2,-18,-34,-58,-66,12,72,68,-76,-42,-4},new int[]{-60,-30,70,42,-52,4,32,20,-40,-34,26,-74,36,-10,-16,0,16,-66,4,-46,-54,-50,-76,52,-4,-96,60,-62,82,8,56,70,32,-44,-68,-8,-10,-42,44,84,28},new int[]{-8,94,98,78,38,8,22,-6,96,-8,48,26,-22,12,-46,92,80,12,62,4,80,-20,16,-28,70,-88,44,68,22,8,6,84,98,4,-68,-44,-4,94,40,38,32},new int[]{54,80,-38,14,-36,-96,28,-86,-36,-42,34,22,16,8,22,36,-24,-32,78,36,12,-10,-50,8,56,-74,-92,-64,-74,86,28,38,48,20,82,60,-10,32,-60,58,-52},new int[]{6,18,-12,-80,-42,-12,-34,-38,16,42,98,6,40,-28,90,76,94,-36,74,0,-52,-52,24,0,78,44,2,-94,72,96,8,64,-40,-42,-2,-80,52,-86,58,-72,-10},new int[]{-2,-38,56,24,44,50,58,-56,96,-96,56,-72,-86,68,58,-32,48,24,-68,-66,64,0,-82,-14,30,4,-8,-8,22,-38,-4,-78,-50,90,-72,-2,-66,50,-60,26,-10},new int[]{42,-54,82,-20,-94,32,6,-58,62,86,66,-10,0,78,-14,66,-74,38,-42,-2,-42,-66,-52,-38,38,32,-16,78,80,40,-98,-98,-62,-36,18,8,12,-20,94,-92,52},new int[]{48,-80,76,-36,90,6,-30,-22,10,-6,42,-86,-52,84,-86,-12,-92,-72,78,28,-98,38,80,76,18,64,66,-8,-6,-66,-92,86,-26,-98,-88,62,82,-8,-34,-64,44},new int[]{-26,-28,92,-82,-36,-24,-58,32,44,-70,2,-72,54,-64,58,92,-36,-14,-22,-70,-30,-10,-84,-22,82,88,-18,24,-18,-22,4,72,28,-46,48,-14,92,24,-82,92,40},new int[]{-32,-60,-32,72,98,-96,34,-86,-92,-4,-52,-52,18,-56,-36,-34,-22,-28,72,54,-20,-42,64,0,26,34,-20,-6,-80,-48,22,12,-58,2,58,-2,-34,92,-34,32,40},new int[]{70,60,-76,-54,-76,56,-78,44,42,-78,-40,12,50,46,48,-12,62,-46,-4,-62,24,-10,54,76,22,4,26,96,-82,-88,-72,48,-18,16,-22,48,0,-32,82,76,96},new int[]{38,-80,-92,14,2,-92,62,98,-34,-30,-32,-32,72,-12,-12,30,-24,-76,-58,-24,-80,48,-22,54,-80,64,-90,-26,56,-46,18,-70,96,86,68,-72,52,28,-98,-42,90},new int[]{-20,-66,94,20,14,-82,94,60,92,46,-86,18,-44,42,96,40,90,-96,-10,44,-54,-50,10,-48,78,66,-62,42,-88,-58,80,36,-20,70,82,-12,-90,14,-94,8,90},new int[]{40,54,2,12,-98,-96,48,-10,-64,-16,22,98,-98,76,-28,76,66,56,-10,-34,44,14,86,94,50,-18,-76,-46,30,94,42,-70,-72,-48,48,-88,94,50,84,-64,24},new int[]{-14,-96,94,-42,94,52,58,62,46,14,-28,-68,42,-80,70,-44,-94,-66,54,-60,-58,30,40,-30,78,-76,-40,24,98,6,-42,72,20,64,-84,-30,84,-34,-16,-86,70},new int[]{-20,-66,90,0,58,-12,-14,-98,-68,-12,82,0,60,94,-10,96,62,-66,-22,84,-20,-56,-60,98,-18,96,10,48,2,52,-64,-70,8,-88,-20,-50,56,-10,72,-30,-68},new int[]{-32,66,70,82,-30,24,58,0,-80,-96,18,-44,82,76,-10,34,-34,38,-30,-88,-68,2,16,4,-22,36,58,-56,48,70,46,24,-86,-94,2,6,-70,-68,-82,-20,30},new int[]{44,90,0,98,94,-34,-8,66,80,-98,32,-26,96,-98,14,22,74,-62,-4,-52,44,-62,-6,26,86,-18,88,-20,4,72,-10,4,34,4,-36,-76,8,80,-84,-50,14},new int[]{40,-16,96,22,-26,18,-18,78,-72,-84,-10,-42,18,4,26,0,70,-84,84,-68,54,-16,-34,32,-28,86,-8,40,90,-92,-78,16,-78,84,-8,-28,-12,-44,10,-10,-42},new int[]{98,72,68,-4,68,68,66,34,52,-58,12,2,-62,64,-40,42,60,-88,-72,-20,-46,46,94,32,-72,-92,-56,-98,-64,66,-70,-42,-44,-88,-92,10,50,-26,-40,-70,84},new int[]{-58,84,-40,-16,-72,10,-26,76,-72,-14,50,16,6,6,-8,-82,96,-80,-70,46,66,-46,96,68,-50,54,4,-32,32,62,-80,36,88,88,74,-22,-80,8,98,62,-42},new int[]{50,-68,82,-28,72,-78,82,-84,80,-2,-94,-46,-16,16,-64,-12,-38,-84,98,-68,-74,14,88,-66,-50,58,98,70,-34,-4,86,28,60,-34,-52,-22,12,40,98,42,66},new int[]{90,-58,-18,-70,-12,-86,2,26,70,-76,80,-38,68,-30,-62,-2,0,88,-62,-44,84,32,98,28,-42,80,28,80,-70,2,80,74,92,72,56,-14,28,-52,-28,-50,0},new int[]{-52,-46,30,6,-10,76,60,-34,-38,-58,12,58,-50,82,-40,-16,14,94,84,-22,-36,22,14,84,-38,62,70,-34,-30,-18,46,-82,-18,96,-14,-58,16,96,-76,-60,50},new int[]{68,74,10,-20,14,-62,-70,-86,-36,90,44,-12,74,-4,-34,-16,84,-66,-20,86,52,88,6,64,60,4,-10,-90,-48,82,-26,14,36,-44,38,34,-86,-80,90,8,-70},new int[]{-60,56,-54,10,-82,66,14,-16,-46,-88,96,-58,4,44,74,32,22,44,94,48,-96,-74,-2,-90,32,62,36,56,-10,10,84,-64,54,-32,-42,36,-32,14,-86,-98,10},new int[]{98,-62,76,-38,36,20,72,-18,2,-18,-66,16,-66,28,-8,-44,98,-12,12,-94,38,38,-6,-40,66,-34,16,-96,-60,24,-50,96,-58,-26,74,-48,72,-26,-38,28,82},new int[]{-60,-62,24,-74,72,22,56,78,-56,-10,86,-60,54,-92,18,36,-26,66,-18,54,50,-70,-10,20,-4,-6,-34,80,-76,-10,76,-72,-6,-44,-64,88,78,78,-8,-26,2},new int[]{-28,-98,-50,18,8,-16,16,58,4,28,14,76,96,56,56,-86,14,-56,74,-28,-34,30,74,30,72,18,42,-64,-94,54,-14,-42,80,40,-94,-36,-32,-70,18,-26,86},new int[]{28,6,-82,6,-2,-26,6,-66,-20,-36,6,6,70,4,-96,42,-66,-44,-42,26,12,-52,90,54,-82,-30,38,-64,-80,-70,36,-16,-44,-80,-44,-76,94,-18,90,-14,62}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{44,4,10,70,98,8,30,72,6,11,85,86,72,96,67,39,45,63,4,28,55,81,74,7,4,44,53,90,89,35,89,32,96,28,44,61,74,13,9,83,96,41},new int[]{37,10,41,26,61,21,58,58,72,3,73,43,21,47,6,30,57,35,16,37,18,23,23,32,15,19,29,67,65,16,65,93,8,44,46,21,24,30,62,52,66,88},new int[]{48,53,60,92,35,91,92,46,56,39,30,31,66,24,96,54,1,90,31,47,52,45,70,82,83,27,22,99,67,23,53,82,34,52,88,7,36,7,20,55,92,44},new int[]{15,75,94,97,21,37,45,50,71,64,60,49,51,86,79,90,53,93,93,13,95,51,28,66,16,10,7,2,85,27,80,37,76,33,86,30,6,62,5,45,42,47},new int[]{75,93,35,92,77,7,89,76,43,9,90,10,6,80,34,24,18,30,58,84,68,71,93,58,41,52,28,75,86,86,80,84,82,64,50,89,99,59,44,83,94,89},new int[]{95,1,40,3,34,69,24,99,58,29,36,11,78,80,91,71,68,69,35,93,34,61,45,33,48,30,41,95,56,99,5,27,95,14,99,69,48,94,11,27,92,54},new int[]{70,19,36,19,31,78,14,51,61,28,8,10,31,2,25,61,46,55,77,21,41,5,21,32,23,99,71,46,76,66,37,2,21,65,36,48,71,52,90,89,68,24},new int[]{43,40,64,15,67,6,20,61,69,51,86,95,92,70,1,32,21,80,63,30,86,4,47,21,33,66,2,75,8,78,19,51,44,66,12,58,14,20,39,66,94,78},new int[]{8,25,73,3,51,70,51,36,34,46,16,28,20,75,18,35,35,71,31,80,24,1,96,30,17,64,69,55,24,48,82,85,67,70,15,94,13,33,12,25,49,65},new int[]{33,90,55,35,6,30,47,12,2,60,80,80,6,68,39,35,98,13,44,94,20,13,15,50,7,52,12,8,24,18,83,69,30,76,32,89,55,20,58,85,80,50},new int[]{49,80,37,60,53,38,14,60,2,17,88,15,25,87,3,2,88,8,64,5,44,47,13,79,2,2,74,77,58,40,1,80,74,2,83,42,26,89,62,66,20,77},new int[]{37,13,42,49,21,7,26,39,14,58,12,97,52,45,77,25,66,58,30,48,59,46,90,37,94,3,78,66,70,46,95,26,49,88,8,90,13,87,47,89,65,82},new int[]{81,55,21,50,64,12,37,28,27,83,52,29,83,43,56,14,60,25,61,48,56,6,16,47,56,71,70,40,17,85,65,8,24,31,6,4,87,31,24,78,85,37},new int[]{51,46,97,80,73,46,45,93,4,43,96,96,48,1,62,85,3,70,61,81,37,45,72,35,78,12,98,56,84,77,99,96,87,42,98,97,27,30,66,45,84,41},new int[]{42,41,8,68,6,28,57,24,59,93,39,20,19,59,78,8,92,61,11,3,27,94,77,66,48,31,18,70,60,36,27,39,72,87,56,48,8,6,35,38,37,40},new int[]{50,45,75,68,22,7,84,74,30,34,15,44,30,44,49,65,79,93,63,54,72,89,58,29,47,50,77,44,52,57,45,34,31,26,29,54,44,93,38,37,53,82},new int[]{11,86,90,17,22,44,73,54,25,58,21,27,22,91,26,66,74,66,3,27,51,19,90,60,7,51,93,54,29,19,23,2,35,29,48,87,76,66,14,99,98,51},new int[]{34,39,88,97,99,84,14,8,36,56,69,57,94,68,91,62,40,96,10,73,65,35,94,91,80,67,37,95,6,5,23,69,22,81,22,58,83,13,25,6,38,28},new int[]{60,88,74,42,42,39,2,10,57,59,94,79,92,39,59,31,63,44,17,99,3,55,2,87,95,90,47,60,72,17,17,35,39,63,70,74,76,25,55,72,13,30},new int[]{26,27,43,37,21,26,8,65,66,33,15,82,43,40,15,68,74,1,98,49,51,9,47,21,79,67,21,11,28,73,7,96,33,44,61,30,75,95,90,43,64,89},new int[]{91,13,86,21,29,24,34,68,24,3,60,92,92,80,82,52,95,13,12,59,36,78,6,9,1,3,61,93,86,80,31,16,59,11,6,23,77,7,10,1,32,30},new int[]{6,21,11,79,3,77,25,52,32,39,92,63,3,32,18,15,66,53,96,93,74,79,31,36,80,27,12,46,72,27,98,83,44,21,36,15,47,41,18,96,91,60},new int[]{59,98,10,37,12,91,48,77,14,59,12,22,91,25,36,83,31,4,31,5,38,25,44,67,49,27,7,28,19,82,35,13,55,70,49,48,73,78,36,98,97,82},new int[]{10,87,31,78,38,14,99,81,87,49,60,53,57,82,90,77,82,35,60,82,85,13,67,21,70,45,88,13,25,9,85,60,63,50,50,39,44,32,51,73,74,87},new int[]{40,34,76,93,84,22,2,73,95,42,26,92,88,20,50,14,74,41,34,75,10,47,89,41,15,32,74,48,82,8,22,70,25,34,19,63,79,76,82,15,98,53},new int[]{27,19,98,30,57,58,79,13,31,61,75,33,54,9,25,2,24,64,66,67,73,59,30,44,89,35,71,55,90,66,44,10,92,36,8,23,83,75,17,39,96,75},new int[]{52,31,79,97,85,46,67,50,41,3,57,48,53,58,55,42,24,33,86,27,84,28,1,46,40,73,78,41,33,99,73,57,18,69,32,47,91,3,82,80,9,43},new int[]{17,60,74,21,61,90,72,18,45,86,72,78,14,98,43,65,4,22,34,18,45,38,83,38,50,40,30,60,64,25,69,6,57,10,52,59,69,17,80,65,94,97},new int[]{47,37,33,49,55,83,4,9,79,24,17,48,58,49,44,19,16,44,99,6,45,78,61,85,88,12,20,30,12,37,2,84,47,97,42,74,34,1,34,28,19,18},new int[]{26,28,6,93,27,1,49,32,83,36,36,16,34,96,27,50,7,43,86,42,20,37,70,87,33,8,93,55,80,4,66,73,13,11,79,99,4,42,17,74,12,34},new int[]{64,93,72,63,99,8,97,99,29,45,61,42,95,14,47,56,86,2,81,92,36,13,20,7,96,62,79,84,33,36,91,35,42,2,83,4,37,98,92,39,89,14},new int[]{86,77,25,50,14,29,32,86,57,7,72,95,48,51,61,20,77,2,9,11,21,64,52,41,64,6,45,64,55,2,90,45,30,23,47,53,9,71,83,36,62,67},new int[]{47,65,75,96,24,18,98,80,13,63,88,51,47,72,12,54,88,77,13,77,19,56,81,25,77,62,44,43,61,5,35,21,35,38,21,52,41,86,90,16,26,87},new int[]{20,80,16,44,45,38,52,99,63,14,90,84,89,82,50,4,72,94,28,26,3,54,58,83,31,34,20,16,96,33,34,9,55,89,42,16,18,87,13,85,69,64},new int[]{44,71,35,81,66,4,4,29,53,73,52,99,69,54,69,38,48,8,94,31,13,3,16,8,3,54,31,58,96,17,36,15,27,16,22,56,54,27,11,40,34,5},new int[]{58,93,26,73,54,22,32,35,83,44,18,78,17,58,28,47,51,75,40,69,50,13,84,18,59,50,42,74,56,82,77,43,12,99,82,77,10,2,25,59,50,36},new int[]{83,23,64,92,61,47,43,4,67,92,18,18,54,58,50,2,86,69,47,99,7,50,48,45,35,20,39,63,29,9,84,21,69,28,91,13,68,91,51,90,22,46},new int[]{45,28,67,44,26,98,95,8,43,23,52,77,46,34,72,56,74,59,77,94,7,50,30,18,73,97,42,34,46,52,5,96,40,10,63,51,93,16,14,65,63,65},new int[]{77,24,8,94,47,10,20,15,39,49,71,92,76,2,71,85,45,87,41,32,38,70,79,12,30,44,22,95,89,21,51,88,35,33,66,9,65,64,26,72,19,35},new int[]{44,43,19,41,45,85,10,54,79,21,81,17,16,29,60,68,85,90,89,68,92,61,98,92,21,49,10,19,7,29,51,31,57,60,7,86,21,88,7,54,15,1},new int[]{98,10,52,61,26,89,45,10,22,36,45,71,26,57,41,10,98,19,58,24,12,50,76,67,3,94,43,71,42,14,80,24,74,33,68,51,47,55,99,65,39,22},new int[]{43,92,79,13,74,41,76,42,6,47,97,39,98,48,54,81,97,90,74,95,60,47,98,50,25,33,97,27,70,51,32,41,54,18,87,1,91,81,59,64,30,88}}); List param1 = new ArrayList<>(); param1.add(23); param1.add(2); param1.add(33); param1.add(1); param1.add(29); param1.add(23); param1.add(4); param1.add(32); param1.add(18); param1.add(30); List param2 = new ArrayList<>(); param2.add(21); param2.add(3); param2.add(35); param2.add(1); param2.add(31); param2.add(17); param2.add(4); param2.add(36); param2.add(23); param2.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( gold , m , n ) : goldTable = [ [ 0 for i in range ( n ) ] for j in range ( m ) ] for col in range ( n - 1 , - 1 , - 1 ) : for row in range ( m ) : if ( col == n - 1 ) : right = 0 else : right = goldTable [ row ] [ col + 1 ] if ( row == 0 or col == n - 1 ) : right_up = 0 else : right_up = goldTable [ row - 1 ] [ col + 1 ] if ( row == m - 1 or col == n - 1 ) : right_down = 0 else : right_down = goldTable [ row + 1 ] [ col + 1 ] goldTable [ row ] [ col ] = gold [ row ] [ col ] + max ( right , right_up , right_down ) res = goldTable [ 0 ] [ 0 ] for i in range ( 1 , m ) : res = max ( res , goldTable [ i ] [ 0 ] ) return res ",,," if __name__ == '__main__': param = [ ([[19, 20, 23, 25, 28, 35, 35, 40, 45, 46, 48, 54, 57, 59, 74, 76, 78, 82, 84, 86, 87, 90, 91, 96], [9, 13, 17, 20, 26, 27, 42, 46, 48, 62, 67, 69, 72, 73, 76, 77, 82, 83, 86, 93, 95, 95, 98, 98], [2, 12, 18, 25, 29, 30, 31, 33, 39, 45, 48, 49, 56, 57, 60, 61, 64, 72, 73, 78, 79, 94, 98, 98], [2, 3, 10, 15, 20, 22, 23, 23, 27, 29, 36, 40, 42, 46, 48, 53, 53, 60, 60, 70, 73, 78, 98, 98], [6, 10, 11, 12, 15, 20, 28, 28, 33, 40, 43, 48, 51, 57, 60, 60, 61, 62, 66, 68, 72, 75, 92, 97], [2, 11, 12, 14, 15, 19, 21, 26, 30, 35, 36, 36, 46, 51, 56, 63, 69, 74, 82, 88, 89, 89, 89, 94], [1, 4, 5, 10, 11, 13, 15, 18, 23, 28, 44, 53, 53, 66, 67, 69, 70, 71, 71, 77, 79, 87, 88, 99], [2, 2, 5, 7, 7, 8, 9, 17, 26, 30, 35, 39, 41, 43, 49, 63, 64, 65, 70, 70, 80, 89, 96, 99], [4, 7, 11, 12, 14, 16, 20, 21, 27, 41, 42, 42, 43, 48, 49, 52, 62, 66, 75, 76, 81, 86, 97, 99], [1, 12, 13, 15, 17, 19, 26, 34, 47, 47, 47, 48, 51, 52, 53, 60, 61, 63, 64, 74, 77, 82, 87, 93], [1, 2, 4, 8, 14, 19, 22, 24, 31, 31, 37, 54, 60, 63, 66, 68, 76, 80, 80, 84, 88, 92, 93, 99], [1, 2, 3, 6, 7, 9, 11, 19, 25, 27, 35, 36, 45, 52, 57, 57, 86, 88, 89, 89, 93, 94, 97, 99], [7, 8, 9, 10, 11, 30, 33, 34, 37, 48, 50, 50, 56, 60, 66, 70, 72, 73, 76, 79, 86, 88, 95, 95], [1, 4, 5, 5, 6, 11, 26, 27, 32, 36, 43, 47, 47, 47, 50, 56, 56, 66, 76, 78, 78, 94, 97, 99], [6, 15, 18, 27, 36, 38, 40, 44, 47, 48, 64, 64, 68, 70, 76, 79, 83, 85, 86, 90, 93, 93, 95, 97], [1, 4, 4, 10, 11, 12, 16, 19, 20, 22, 22, 23, 35, 49, 51, 58, 66, 66, 68, 76, 77, 81, 86, 94], [2, 9, 12, 12, 13, 20, 20, 35, 44, 48, 51, 55, 62, 66, 71, 71, 73, 74, 78, 83, 89, 90, 93, 99], [9, 15, 20, 24, 25, 31, 32, 35, 36, 49, 50, 51, 52, 55, 58, 63, 79, 79, 85, 89, 90, 96, 98, 99], [6, 10, 12, 15, 16, 17, 17, 21, 24, 44, 48, 53, 58, 60, 61, 64, 67, 74, 81, 84, 86, 87, 88, 92], [7, 10, 14, 20, 21, 27, 30, 30, 31, 34, 36, 37, 39, 45, 55, 55, 63, 64, 66, 82, 88, 88, 94, 95], [6, 11, 13, 21, 22, 23, 23, 24, 28, 35, 36, 40, 41, 53, 55, 57, 63, 66, 73, 74, 77, 78, 87, 96], [4, 17, 19, 23, 25, 38, 42, 45, 50, 57, 61, 62, 62, 62, 62, 64, 75, 78, 79, 79, 82, 85, 86, 93], [14, 15, 21, 27, 38, 39, 40, 42, 43, 43, 50, 51, 54, 58, 58, 59, 60, 62, 63, 70, 75, 85, 91, 92], [6, 7, 11, 12, 20, 30, 40, 41, 41, 44, 47, 51, 52, 53, 59, 75, 76, 77, 84, 87, 91, 93, 95, 97]],23,21,), ([[38, 12, 92, -6, 8], [80, 66, -56, -54, -74], [36, 6, 52, -78, -92], [80, 76, 88, 10, -30], [32, 64, 18, 58, -2]],2,3,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],33,35,), ([[45, 96, 71], [87, 80, 90], [96, 72, 49]],1,1,), ([[-98, -98, -92, -82, -80, -72, -70, -48, -38, -32, -32, -28, -16, -2, 0, 0, 20, 20, 24, 30, 36, 40, 46, 58, 62, 62, 66, 74, 74, 76, 80, 82], [-96, -94, -94, -88, -80, -64, -54, -48, -46, -44, -38, -36, -34, -32, -30, -30, -24, -16, 2, 8, 26, 36, 36, 40, 48, 52, 78, 80, 80, 80, 88, 94], [-98, -98, -92, -88, -88, -88, -62, -60, -46, -34, -24, -16, -14, 8, 10, 16, 18, 20, 30, 44, 48, 48, 50, 54, 54, 70, 70, 76, 78, 82, 84, 94], [-94, -80, -76, -74, -66, -58, -48, -38, -26, -16, -12, -10, -8, -2, 0, 8, 10, 10, 12, 22, 28, 32, 40, 42, 44, 50, 60, 72, 84, 86, 90, 94], [-88, -72, -62, -46, -44, -44, -34, -30, -28, -28, -18, -18, -10, -6, -4, -2, 2, 8, 8, 22, 32, 34, 38, 46, 54, 54, 54, 76, 76, 80, 84, 86], [-94, -94, -82, -80, -78, -70, -58, -46, -36, -28, -10, -10, 0, 2, 2, 4, 8, 14, 24, 32, 34, 34, 38, 42, 42, 42, 58, 84, 86, 88, 94, 96], [-98, -96, -96, -88, -80, -68, -62, -54, -52, -28, -28, -26, -22, -12, -8, -4, 2, 8, 16, 16, 28, 30, 32, 38, 54, 58, 66, 70, 74, 76, 96, 98], [-86, -84, -80, -62, -62, -58, -52, -50, -42, -38, -36, -36, -28, -18, -4, 10, 14, 38, 40, 46, 46, 48, 54, 72, 72, 74, 84, 86, 86, 88, 90, 96], [-78, -74, -66, -62, -48, -26, -18, -12, 6, 8, 18, 22, 24, 34, 36, 38, 42, 46, 64, 66, 66, 68, 70, 72, 76, 76, 78, 80, 84, 86, 88, 90], [-98, -98, -92, -84, -74, -70, -68, -50, -50, -48, -48, -36, -30, -6, -4, -4, -4, 10, 24, 28, 30, 32, 50, 58, 60, 62, 76, 78, 84, 90, 90, 98], [-98, -96, -82, -78, -74, -62, -62, -60, -58, -56, -50, -42, -36, -32, -20, -4, 0, 2, 6, 14, 16, 26, 26, 42, 46, 70, 70, 72, 78, 82, 86, 90], [-86, -80, -80, -76, -70, -66, -58, -54, -50, -44, -42, -36, -32, -24, -22, -16, -8, -6, 2, 4, 16, 18, 36, 40, 46, 52, 58, 60, 62, 74, 76, 98], [-86, -78, -66, -64, -58, -52, -38, -32, -30, -28, -18, -18, -16, -10, -8, 2, 2, 4, 6, 6, 14, 22, 36, 36, 42, 52, 54, 76, 78, 84, 88, 98], [-98, -94, -94, -74, -72, -52, -50, -38, -30, -26, -16, -14, -4, 2, 2, 4, 4, 16, 22, 24, 28, 32, 34, 34, 36, 50, 56, 66, 68, 80, 82, 94], [-98, -90, -86, -78, -74, -72, -70, -58, -56, -52, -50, -44, -30, -24, -24, -2, 0, 6, 20, 32, 40, 40, 46, 48, 50, 58, 64, 74, 84, 90, 90, 90], [-98, -92, -86, -84, -82, -82, -78, -66, -64, -50, -40, -24, -24, -22, -22, -14, -12, -8, 0, 8, 12, 14, 20, 26, 42, 42, 58, 64, 82, 86, 92, 96], [-98, -90, -86, -76, -68, -64, -64, -64, -54, -54, -52, -44, -34, -34, -12, 6, 10, 12, 26, 38, 40, 40, 60, 68, 68, 68, 74, 78, 80, 88, 98, 98], [-92, -92, -68, -60, -54, -52, -48, -46, -40, -36, -32, -30, -28, -24, -24, -18, -4, -2, 2, 28, 32, 38, 42, 46, 60, 62, 72, 78, 80, 82, 82, 90], [-98, -86, -80, -80, -76, -64, -62, -60, -50, -34, -22, -18, -14, -12, -12, -10, 2, 6, 10, 18, 22, 28, 32, 32, 36, 38, 48, 66, 72, 82, 90, 96], [-92, -90, -86, -84, -82, -78, -72, -72, -68, -68, -60, -46, -38, -30, -28, 2, 8, 10, 18, 22, 24, 28, 40, 40, 52, 54, 64, 74, 80, 82, 86, 96], [-96, -86, -82, -82, -70, -70, -62, -62, -58, -58, -56, -56, -52, -52, -46, -42, -38, -34, -26, -24, -6, -6, -2, 8, 22, 26, 38, 52, 70, 74, 82, 90], [-92, -70, -64, -62, -56, -54, -48, -42, -36, -22, -22, -20, -14, -14, -2, 2, 2, 12, 22, 26, 60, 64, 68, 70, 70, 74, 74, 80, 84, 88, 88, 90], [-98, -98, -84, -84, -84, -80, -64, -60, -54, -54, -44, -34, -30, -18, -16, -14, 2, 8, 10, 28, 30, 32, 50, 58, 62, 62, 64, 72, 78, 78, 82, 88], [-96, -94, -86, -86, -60, -56, -52, -50, -34, -26, -14, -10, -6, -4, 2, 18, 20, 30, 38, 40, 42, 46, 48, 52, 54, 66, 68, 74, 74, 84, 92, 98], [-98, -96, -96, -94, -66, -50, -44, -44, -38, -30, -30, -22, -20, -18, -16, -14, -14, -4, -4, -2, 2, 22, 30, 42, 52, 54, 60, 70, 80, 84, 92, 96], [-96, -84, -80, -78, -76, -74, -68, -64, -60, -58, -54, -46, -26, -14, -14, -10, -2, 4, 10, 10, 12, 26, 28, 28, 38, 40, 42, 42, 50, 82, 88, 88], [-90, -78, -78, -76, -76, -76, -64, -64, -62, -44, -40, -32, -28, -24, -10, 4, 24, 28, 30, 44, 58, 60, 62, 72, 74, 76, 76, 78, 80, 82, 82, 90], [-88, -86, -72, -66, -60, -60, -58, -58, -54, -38, -32, -30, -16, -14, -10, -10, -6, 0, 8, 12, 16, 20, 22, 26, 30, 34, 36, 44, 52, 64, 66, 88], [-98, -94, -92, -92, -88, -68, -64, -64, -62, -44, -44, -36, -32, -32, -24, -18, -16, -6, -6, 6, 8, 14, 20, 26, 28, 36, 38, 40, 56, 56, 66, 84], [-98, -94, -92, -90, -58, -56, -44, -42, -40, -40, -36, -32, -32, -12, -10, -2, -2, -2, 0, 8, 16, 18, 26, 26, 42, 46, 52, 54, 84, 86, 88, 94], [-80, -78, -78, -70, -58, -56, -56, -36, -34, -32, -6, 4, 6, 10, 20, 32, 40, 42, 54, 58, 58, 64, 66, 66, 66, 66, 80, 82, 82, 82, 88, 90], [-92, -90, -78, -74, -70, -50, -48, -46, -46, -40, -40, -36, -24, -22, -20, -10, -10, -8, -8, -4, 6, 14, 20, 32, 38, 46, 46, 48, 60, 68, 68, 74]],29,31,), ([[1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1]],23,17,), ([[13, 26, 41, 59, 89, 95, 99], [5, 21, 27, 30, 41, 84, 92], [6, 46, 75, 76, 95, 96, 97], [13, 21, 33, 62, 74, 85, 88], [2, 3, 15, 25, 56, 73, 97], [38, 65, 71, 76, 82, 86, 86], [2, 28, 32, 51, 73, 77, 90]],4,4,), ([[10, -88, 60, -18, -24, -72, -10, 8, -12, 16, -22, -94, 12, -8, 66, 10, 6, 6, 52, -6, -18, 98, 44, 48, -38, -32, -84, -56, -52, -60, -6, -74, -54, 76, -74, -36, -44, 94, -52, 74, 14], [0, -12, -26, -24, -72, 28, -72, -44, 32, -28, -98, -64, -48, 72, -74, -10, 10, -44, 30, -12, -26, -38, -14, 72, -42, 68, 26, 78, -6, -58, -70, 74, 24, -68, -22, 48, 14, 86, -14, 58, -52], [48, -18, 34, -38, 8, 96, -22, 14, -48, 74, 58, -70, -30, -40, -12, -90, 8, -98, -56, 60, 46, 38, -82, 32, -24, -68, -92, 72, 2, -96, -96, 72, 38, 38, 12, -18, -36, -94, -68, -32, 54], [-28, 4, -84, -68, -56, -60, -12, 82, 2, 14, -2, 62, 42, 36, 56, -12, -30, -72, -70, 10, 96, -84, -44, 64, 2, 70, -78, -62, -48, -94, 48, 28, -78, 64, -4, 80, -34, 4, 68, -18, -48], [-38, 0, 34, 28, 80, -36, -4, 52, -86, 84, 44, 16, 34, 8, -38, -80, -62, -78, 62, 50, 98, -88, -40, -66, -16, -20, -34, -84, 48, -28, -4, -10, 34, -10, 52, -58, -92, -46, 14, -86, 66], [-8, -56, -18, 64, -64, -82, 14, -60, -4, -32, -52, -70, 62, 56, -58, -26, -32, 84, 88, 28, -34, -56, 12, 56, 54, 92, -90, 8, 84, 18, 12, 40, -80, -24, 66, -22, -14, 76, -46, -18, 10], [-22, -34, -92, -58, -6, -26, 26, 30, -92, 82, 12, -60, -60, -10, 24, 78, -78, 50, -6, 10, -32, -10, -6, 72, -90, -54, -32, -88, -86, 30, 70, -4, 84, -40, -52, 32, -46, -92, -18, -92, -16], [-78, 0, 56, -10, 14, 64, 84, -6, -32, -54, 42, -22, 26, -94, 32, 54, -32, 20, -76, 6, -68, -72, -54, 32, 14, -36, -2, -74, 44, 76, 28, -34, 20, 84, 56, -60, -6, 30, -4, 36, 54], [90, -48, -22, 20, 26, 48, -64, 88, 20, 46, -86, -92, 2, 24, -4, 4, -36, -12, 28, -38, -84, 48, -46, -30, 68, -8, -30, -10, -2, 64, -4, -30, 48, 2, 96, 26, -76, -26, 14, -94, 86], [-92, -66, -14, 94, -92, -2, 30, -8, 88, 34, -52, 60, 52, -10, -18, 28, 2, 94, -12, 62, -48, 30, 22, -26, 70, -84, -4, 82, -42, 32, 62, 30, -54, 80, -34, 32, -94, -8, -40, -28, 32], [-28, 26, 2, 86, -74, 8, -38, 84, -6, 18, -38, 48, -60, 36, -58, 12, -76, 62, -4, -14, -18, -74, -56, -16, 48, 74, -46, 12, -42, -18, 62, 18, 98, -80, -92, 22, -80, -74, 10, -72, -88], [12, 54, 48, 60, 32, -74, 54, 50, 32, -38, 96, 20, 72, -32, 76, -30, 96, 58, -2, 40, 12, 72, 94, 82, 70, 74, -90, -82, -2, 6, 2, -18, -34, -58, -66, 12, 72, 68, -76, -42, -4], [-60, -30, 70, 42, -52, 4, 32, 20, -40, -34, 26, -74, 36, -10, -16, 0, 16, -66, 4, -46, -54, -50, -76, 52, -4, -96, 60, -62, 82, 8, 56, 70, 32, -44, -68, -8, -10, -42, 44, 84, 28], [-8, 94, 98, 78, 38, 8, 22, -6, 96, -8, 48, 26, -22, 12, -46, 92, 80, 12, 62, 4, 80, -20, 16, -28, 70, -88, 44, 68, 22, 8, 6, 84, 98, 4, -68, -44, -4, 94, 40, 38, 32], [54, 80, -38, 14, -36, -96, 28, -86, -36, -42, 34, 22, 16, 8, 22, 36, -24, -32, 78, 36, 12, -10, -50, 8, 56, -74, -92, -64, -74, 86, 28, 38, 48, 20, 82, 60, -10, 32, -60, 58, -52], [6, 18, -12, -80, -42, -12, -34, -38, 16, 42, 98, 6, 40, -28, 90, 76, 94, -36, 74, 0, -52, -52, 24, 0, 78, 44, 2, -94, 72, 96, 8, 64, -40, -42, -2, -80, 52, -86, 58, -72, -10], [-2, -38, 56, 24, 44, 50, 58, -56, 96, -96, 56, -72, -86, 68, 58, -32, 48, 24, -68, -66, 64, 0, -82, -14, 30, 4, -8, -8, 22, -38, -4, -78, -50, 90, -72, -2, -66, 50, -60, 26, -10], [42, -54, 82, -20, -94, 32, 6, -58, 62, 86, 66, -10, 0, 78, -14, 66, -74, 38, -42, -2, -42, -66, -52, -38, 38, 32, -16, 78, 80, 40, -98, -98, -62, -36, 18, 8, 12, -20, 94, -92, 52], [48, -80, 76, -36, 90, 6, -30, -22, 10, -6, 42, -86, -52, 84, -86, -12, -92, -72, 78, 28, -98, 38, 80, 76, 18, 64, 66, -8, -6, -66, -92, 86, -26, -98, -88, 62, 82, -8, -34, -64, 44], [-26, -28, 92, -82, -36, -24, -58, 32, 44, -70, 2, -72, 54, -64, 58, 92, -36, -14, -22, -70, -30, -10, -84, -22, 82, 88, -18, 24, -18, -22, 4, 72, 28, -46, 48, -14, 92, 24, -82, 92, 40], [-32, -60, -32, 72, 98, -96, 34, -86, -92, -4, -52, -52, 18, -56, -36, -34, -22, -28, 72, 54, -20, -42, 64, 0, 26, 34, -20, -6, -80, -48, 22, 12, -58, 2, 58, -2, -34, 92, -34, 32, 40], [70, 60, -76, -54, -76, 56, -78, 44, 42, -78, -40, 12, 50, 46, 48, -12, 62, -46, -4, -62, 24, -10, 54, 76, 22, 4, 26, 96, -82, -88, -72, 48, -18, 16, -22, 48, 0, -32, 82, 76, 96], [38, -80, -92, 14, 2, -92, 62, 98, -34, -30, -32, -32, 72, -12, -12, 30, -24, -76, -58, -24, -80, 48, -22, 54, -80, 64, -90, -26, 56, -46, 18, -70, 96, 86, 68, -72, 52, 28, -98, -42, 90], [-20, -66, 94, 20, 14, -82, 94, 60, 92, 46, -86, 18, -44, 42, 96, 40, 90, -96, -10, 44, -54, -50, 10, -48, 78, 66, -62, 42, -88, -58, 80, 36, -20, 70, 82, -12, -90, 14, -94, 8, 90], [40, 54, 2, 12, -98, -96, 48, -10, -64, -16, 22, 98, -98, 76, -28, 76, 66, 56, -10, -34, 44, 14, 86, 94, 50, -18, -76, -46, 30, 94, 42, -70, -72, -48, 48, -88, 94, 50, 84, -64, 24], [-14, -96, 94, -42, 94, 52, 58, 62, 46, 14, -28, -68, 42, -80, 70, -44, -94, -66, 54, -60, -58, 30, 40, -30, 78, -76, -40, 24, 98, 6, -42, 72, 20, 64, -84, -30, 84, -34, -16, -86, 70], [-20, -66, 90, 0, 58, -12, -14, -98, -68, -12, 82, 0, 60, 94, -10, 96, 62, -66, -22, 84, -20, -56, -60, 98, -18, 96, 10, 48, 2, 52, -64, -70, 8, -88, -20, -50, 56, -10, 72, -30, -68], [-32, 66, 70, 82, -30, 24, 58, 0, -80, -96, 18, -44, 82, 76, -10, 34, -34, 38, -30, -88, -68, 2, 16, 4, -22, 36, 58, -56, 48, 70, 46, 24, -86, -94, 2, 6, -70, -68, -82, -20, 30], [44, 90, 0, 98, 94, -34, -8, 66, 80, -98, 32, -26, 96, -98, 14, 22, 74, -62, -4, -52, 44, -62, -6, 26, 86, -18, 88, -20, 4, 72, -10, 4, 34, 4, -36, -76, 8, 80, -84, -50, 14], [40, -16, 96, 22, -26, 18, -18, 78, -72, -84, -10, -42, 18, 4, 26, 0, 70, -84, 84, -68, 54, -16, -34, 32, -28, 86, -8, 40, 90, -92, -78, 16, -78, 84, -8, -28, -12, -44, 10, -10, -42], [98, 72, 68, -4, 68, 68, 66, 34, 52, -58, 12, 2, -62, 64, -40, 42, 60, -88, -72, -20, -46, 46, 94, 32, -72, -92, -56, -98, -64, 66, -70, -42, -44, -88, -92, 10, 50, -26, -40, -70, 84], [-58, 84, -40, -16, -72, 10, -26, 76, -72, -14, 50, 16, 6, 6, -8, -82, 96, -80, -70, 46, 66, -46, 96, 68, -50, 54, 4, -32, 32, 62, -80, 36, 88, 88, 74, -22, -80, 8, 98, 62, -42], [50, -68, 82, -28, 72, -78, 82, -84, 80, -2, -94, -46, -16, 16, -64, -12, -38, -84, 98, -68, -74, 14, 88, -66, -50, 58, 98, 70, -34, -4, 86, 28, 60, -34, -52, -22, 12, 40, 98, 42, 66], [90, -58, -18, -70, -12, -86, 2, 26, 70, -76, 80, -38, 68, -30, -62, -2, 0, 88, -62, -44, 84, 32, 98, 28, -42, 80, 28, 80, -70, 2, 80, 74, 92, 72, 56, -14, 28, -52, -28, -50, 0], [-52, -46, 30, 6, -10, 76, 60, -34, -38, -58, 12, 58, -50, 82, -40, -16, 14, 94, 84, -22, -36, 22, 14, 84, -38, 62, 70, -34, -30, -18, 46, -82, -18, 96, -14, -58, 16, 96, -76, -60, 50], [68, 74, 10, -20, 14, -62, -70, -86, -36, 90, 44, -12, 74, -4, -34, -16, 84, -66, -20, 86, 52, 88, 6, 64, 60, 4, -10, -90, -48, 82, -26, 14, 36, -44, 38, 34, -86, -80, 90, 8, -70], [-60, 56, -54, 10, -82, 66, 14, -16, -46, -88, 96, -58, 4, 44, 74, 32, 22, 44, 94, 48, -96, -74, -2, -90, 32, 62, 36, 56, -10, 10, 84, -64, 54, -32, -42, 36, -32, 14, -86, -98, 10], [98, -62, 76, -38, 36, 20, 72, -18, 2, -18, -66, 16, -66, 28, -8, -44, 98, -12, 12, -94, 38, 38, -6, -40, 66, -34, 16, -96, -60, 24, -50, 96, -58, -26, 74, -48, 72, -26, -38, 28, 82], [-60, -62, 24, -74, 72, 22, 56, 78, -56, -10, 86, -60, 54, -92, 18, 36, -26, 66, -18, 54, 50, -70, -10, 20, -4, -6, -34, 80, -76, -10, 76, -72, -6, -44, -64, 88, 78, 78, -8, -26, 2], [-28, -98, -50, 18, 8, -16, 16, 58, 4, 28, 14, 76, 96, 56, 56, -86, 14, -56, 74, -28, -34, 30, 74, 30, 72, 18, 42, -64, -94, 54, -14, -42, 80, 40, -94, -36, -32, -70, 18, -26, 86], [28, 6, -82, 6, -2, -26, 6, -66, -20, -36, 6, 6, 70, 4, -96, 42, -66, -44, -42, 26, 12, -52, 90, 54, -82, -30, 38, -64, -80, -70, 36, -16, -44, -80, -44, -76, 94, -18, 90, -14, 62]],32,36,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],18,23,), ([[44, 4, 10, 70, 98, 8, 30, 72, 6, 11, 85, 86, 72, 96, 67, 39, 45, 63, 4, 28, 55, 81, 74, 7, 4, 44, 53, 90, 89, 35, 89, 32, 96, 28, 44, 61, 74, 13, 9, 83, 96, 41], [37, 10, 41, 26, 61, 21, 58, 58, 72, 3, 73, 43, 21, 47, 6, 30, 57, 35, 16, 37, 18, 23, 23, 32, 15, 19, 29, 67, 65, 16, 65, 93, 8, 44, 46, 21, 24, 30, 62, 52, 66, 88], [48, 53, 60, 92, 35, 91, 92, 46, 56, 39, 30, 31, 66, 24, 96, 54, 1, 90, 31, 47, 52, 45, 70, 82, 83, 27, 22, 99, 67, 23, 53, 82, 34, 52, 88, 7, 36, 7, 20, 55, 92, 44], [15, 75, 94, 97, 21, 37, 45, 50, 71, 64, 60, 49, 51, 86, 79, 90, 53, 93, 93, 13, 95, 51, 28, 66, 16, 10, 7, 2, 85, 27, 80, 37, 76, 33, 86, 30, 6, 62, 5, 45, 42, 47], [75, 93, 35, 92, 77, 7, 89, 76, 43, 9, 90, 10, 6, 80, 34, 24, 18, 30, 58, 84, 68, 71, 93, 58, 41, 52, 28, 75, 86, 86, 80, 84, 82, 64, 50, 89, 99, 59, 44, 83, 94, 89], [95, 1, 40, 3, 34, 69, 24, 99, 58, 29, 36, 11, 78, 80, 91, 71, 68, 69, 35, 93, 34, 61, 45, 33, 48, 30, 41, 95, 56, 99, 5, 27, 95, 14, 99, 69, 48, 94, 11, 27, 92, 54], [70, 19, 36, 19, 31, 78, 14, 51, 61, 28, 8, 10, 31, 2, 25, 61, 46, 55, 77, 21, 41, 5, 21, 32, 23, 99, 71, 46, 76, 66, 37, 2, 21, 65, 36, 48, 71, 52, 90, 89, 68, 24], [43, 40, 64, 15, 67, 6, 20, 61, 69, 51, 86, 95, 92, 70, 1, 32, 21, 80, 63, 30, 86, 4, 47, 21, 33, 66, 2, 75, 8, 78, 19, 51, 44, 66, 12, 58, 14, 20, 39, 66, 94, 78], [8, 25, 73, 3, 51, 70, 51, 36, 34, 46, 16, 28, 20, 75, 18, 35, 35, 71, 31, 80, 24, 1, 96, 30, 17, 64, 69, 55, 24, 48, 82, 85, 67, 70, 15, 94, 13, 33, 12, 25, 49, 65], [33, 90, 55, 35, 6, 30, 47, 12, 2, 60, 80, 80, 6, 68, 39, 35, 98, 13, 44, 94, 20, 13, 15, 50, 7, 52, 12, 8, 24, 18, 83, 69, 30, 76, 32, 89, 55, 20, 58, 85, 80, 50], [49, 80, 37, 60, 53, 38, 14, 60, 2, 17, 88, 15, 25, 87, 3, 2, 88, 8, 64, 5, 44, 47, 13, 79, 2, 2, 74, 77, 58, 40, 1, 80, 74, 2, 83, 42, 26, 89, 62, 66, 20, 77], [37, 13, 42, 49, 21, 7, 26, 39, 14, 58, 12, 97, 52, 45, 77, 25, 66, 58, 30, 48, 59, 46, 90, 37, 94, 3, 78, 66, 70, 46, 95, 26, 49, 88, 8, 90, 13, 87, 47, 89, 65, 82], [81, 55, 21, 50, 64, 12, 37, 28, 27, 83, 52, 29, 83, 43, 56, 14, 60, 25, 61, 48, 56, 6, 16, 47, 56, 71, 70, 40, 17, 85, 65, 8, 24, 31, 6, 4, 87, 31, 24, 78, 85, 37], [51, 46, 97, 80, 73, 46, 45, 93, 4, 43, 96, 96, 48, 1, 62, 85, 3, 70, 61, 81, 37, 45, 72, 35, 78, 12, 98, 56, 84, 77, 99, 96, 87, 42, 98, 97, 27, 30, 66, 45, 84, 41], [42, 41, 8, 68, 6, 28, 57, 24, 59, 93, 39, 20, 19, 59, 78, 8, 92, 61, 11, 3, 27, 94, 77, 66, 48, 31, 18, 70, 60, 36, 27, 39, 72, 87, 56, 48, 8, 6, 35, 38, 37, 40], [50, 45, 75, 68, 22, 7, 84, 74, 30, 34, 15, 44, 30, 44, 49, 65, 79, 93, 63, 54, 72, 89, 58, 29, 47, 50, 77, 44, 52, 57, 45, 34, 31, 26, 29, 54, 44, 93, 38, 37, 53, 82], [11, 86, 90, 17, 22, 44, 73, 54, 25, 58, 21, 27, 22, 91, 26, 66, 74, 66, 3, 27, 51, 19, 90, 60, 7, 51, 93, 54, 29, 19, 23, 2, 35, 29, 48, 87, 76, 66, 14, 99, 98, 51], [34, 39, 88, 97, 99, 84, 14, 8, 36, 56, 69, 57, 94, 68, 91, 62, 40, 96, 10, 73, 65, 35, 94, 91, 80, 67, 37, 95, 6, 5, 23, 69, 22, 81, 22, 58, 83, 13, 25, 6, 38, 28], [60, 88, 74, 42, 42, 39, 2, 10, 57, 59, 94, 79, 92, 39, 59, 31, 63, 44, 17, 99, 3, 55, 2, 87, 95, 90, 47, 60, 72, 17, 17, 35, 39, 63, 70, 74, 76, 25, 55, 72, 13, 30], [26, 27, 43, 37, 21, 26, 8, 65, 66, 33, 15, 82, 43, 40, 15, 68, 74, 1, 98, 49, 51, 9, 47, 21, 79, 67, 21, 11, 28, 73, 7, 96, 33, 44, 61, 30, 75, 95, 90, 43, 64, 89], [91, 13, 86, 21, 29, 24, 34, 68, 24, 3, 60, 92, 92, 80, 82, 52, 95, 13, 12, 59, 36, 78, 6, 9, 1, 3, 61, 93, 86, 80, 31, 16, 59, 11, 6, 23, 77, 7, 10, 1, 32, 30], [6, 21, 11, 79, 3, 77, 25, 52, 32, 39, 92, 63, 3, 32, 18, 15, 66, 53, 96, 93, 74, 79, 31, 36, 80, 27, 12, 46, 72, 27, 98, 83, 44, 21, 36, 15, 47, 41, 18, 96, 91, 60], [59, 98, 10, 37, 12, 91, 48, 77, 14, 59, 12, 22, 91, 25, 36, 83, 31, 4, 31, 5, 38, 25, 44, 67, 49, 27, 7, 28, 19, 82, 35, 13, 55, 70, 49, 48, 73, 78, 36, 98, 97, 82], [10, 87, 31, 78, 38, 14, 99, 81, 87, 49, 60, 53, 57, 82, 90, 77, 82, 35, 60, 82, 85, 13, 67, 21, 70, 45, 88, 13, 25, 9, 85, 60, 63, 50, 50, 39, 44, 32, 51, 73, 74, 87], [40, 34, 76, 93, 84, 22, 2, 73, 95, 42, 26, 92, 88, 20, 50, 14, 74, 41, 34, 75, 10, 47, 89, 41, 15, 32, 74, 48, 82, 8, 22, 70, 25, 34, 19, 63, 79, 76, 82, 15, 98, 53], [27, 19, 98, 30, 57, 58, 79, 13, 31, 61, 75, 33, 54, 9, 25, 2, 24, 64, 66, 67, 73, 59, 30, 44, 89, 35, 71, 55, 90, 66, 44, 10, 92, 36, 8, 23, 83, 75, 17, 39, 96, 75], [52, 31, 79, 97, 85, 46, 67, 50, 41, 3, 57, 48, 53, 58, 55, 42, 24, 33, 86, 27, 84, 28, 1, 46, 40, 73, 78, 41, 33, 99, 73, 57, 18, 69, 32, 47, 91, 3, 82, 80, 9, 43], [17, 60, 74, 21, 61, 90, 72, 18, 45, 86, 72, 78, 14, 98, 43, 65, 4, 22, 34, 18, 45, 38, 83, 38, 50, 40, 30, 60, 64, 25, 69, 6, 57, 10, 52, 59, 69, 17, 80, 65, 94, 97], [47, 37, 33, 49, 55, 83, 4, 9, 79, 24, 17, 48, 58, 49, 44, 19, 16, 44, 99, 6, 45, 78, 61, 85, 88, 12, 20, 30, 12, 37, 2, 84, 47, 97, 42, 74, 34, 1, 34, 28, 19, 18], [26, 28, 6, 93, 27, 1, 49, 32, 83, 36, 36, 16, 34, 96, 27, 50, 7, 43, 86, 42, 20, 37, 70, 87, 33, 8, 93, 55, 80, 4, 66, 73, 13, 11, 79, 99, 4, 42, 17, 74, 12, 34], [64, 93, 72, 63, 99, 8, 97, 99, 29, 45, 61, 42, 95, 14, 47, 56, 86, 2, 81, 92, 36, 13, 20, 7, 96, 62, 79, 84, 33, 36, 91, 35, 42, 2, 83, 4, 37, 98, 92, 39, 89, 14], [86, 77, 25, 50, 14, 29, 32, 86, 57, 7, 72, 95, 48, 51, 61, 20, 77, 2, 9, 11, 21, 64, 52, 41, 64, 6, 45, 64, 55, 2, 90, 45, 30, 23, 47, 53, 9, 71, 83, 36, 62, 67], [47, 65, 75, 96, 24, 18, 98, 80, 13, 63, 88, 51, 47, 72, 12, 54, 88, 77, 13, 77, 19, 56, 81, 25, 77, 62, 44, 43, 61, 5, 35, 21, 35, 38, 21, 52, 41, 86, 90, 16, 26, 87], [20, 80, 16, 44, 45, 38, 52, 99, 63, 14, 90, 84, 89, 82, 50, 4, 72, 94, 28, 26, 3, 54, 58, 83, 31, 34, 20, 16, 96, 33, 34, 9, 55, 89, 42, 16, 18, 87, 13, 85, 69, 64], [44, 71, 35, 81, 66, 4, 4, 29, 53, 73, 52, 99, 69, 54, 69, 38, 48, 8, 94, 31, 13, 3, 16, 8, 3, 54, 31, 58, 96, 17, 36, 15, 27, 16, 22, 56, 54, 27, 11, 40, 34, 5], [58, 93, 26, 73, 54, 22, 32, 35, 83, 44, 18, 78, 17, 58, 28, 47, 51, 75, 40, 69, 50, 13, 84, 18, 59, 50, 42, 74, 56, 82, 77, 43, 12, 99, 82, 77, 10, 2, 25, 59, 50, 36], [83, 23, 64, 92, 61, 47, 43, 4, 67, 92, 18, 18, 54, 58, 50, 2, 86, 69, 47, 99, 7, 50, 48, 45, 35, 20, 39, 63, 29, 9, 84, 21, 69, 28, 91, 13, 68, 91, 51, 90, 22, 46], [45, 28, 67, 44, 26, 98, 95, 8, 43, 23, 52, 77, 46, 34, 72, 56, 74, 59, 77, 94, 7, 50, 30, 18, 73, 97, 42, 34, 46, 52, 5, 96, 40, 10, 63, 51, 93, 16, 14, 65, 63, 65], [77, 24, 8, 94, 47, 10, 20, 15, 39, 49, 71, 92, 76, 2, 71, 85, 45, 87, 41, 32, 38, 70, 79, 12, 30, 44, 22, 95, 89, 21, 51, 88, 35, 33, 66, 9, 65, 64, 26, 72, 19, 35], [44, 43, 19, 41, 45, 85, 10, 54, 79, 21, 81, 17, 16, 29, 60, 68, 85, 90, 89, 68, 92, 61, 98, 92, 21, 49, 10, 19, 7, 29, 51, 31, 57, 60, 7, 86, 21, 88, 7, 54, 15, 1], [98, 10, 52, 61, 26, 89, 45, 10, 22, 36, 45, 71, 26, 57, 41, 10, 98, 19, 58, 24, 12, 50, 76, 67, 3, 94, 43, 71, 42, 14, 80, 24, 74, 33, 68, 51, 47, 55, 99, 65, 39, 22], [43, 92, 79, 13, 74, 41, 76, 42, 6, 47, 97, 39, 98, 48, 54, 81, 97, 90, 74, 95, 60, 47, 98, 50, 25, 33, 97, 27, 70, 51, 32, 41, 54, 18, 87, 1, 91, 81, 59, 64, 30, 88]],30,29,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_OF_ALL_PROPER_DIVISORS_OF_A_NATURAL_NUMBER{ static int f_gold ( int num ) { int result = 0 ; for ( int i = 2 ; i <= Math . sqrt ( num ) ; i ++ ) { if ( num % i == 0 ) { if ( i == ( num / i ) ) result += i ; else result += ( i + num / i ) ; } } return ( result + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(2); param0.add(57); param0.add(28); param0.add(43); param0.add(38); param0.add(29); param0.add(45); param0.add(47); param0.add(44); param0.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( num ) : result = 0 i = 2 while i <= ( math.sqrt ( num ) ) : if ( num % i == 0 ) : if ( i == ( num / i ) ) : result = result + i ; else : result = result + ( i + num / i ) ; i = i + 1 return ( result + 1 ) ; "," 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 ); } int main() { int n_success = 0; vector param0 {2,57,28,43,38,29,45,47,44,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (2,), (57,), (28,), (43,), (38,), (29,), (45,), (47,), (44,), (3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNTS_PATHS_POINT_REACH_ORIGIN_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNTS_PATHS_POINT_REACH_ORIGIN_1{ static int f_gold ( int n , int m ) { int dp [ ] [ ] = new int [ 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 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(55); param0.add(74); param0.add(76); param0.add(6); param0.add(2); param0.add(36); param0.add(40); param0.add(14); param0.add(42); param0.add(62); List param1 = new ArrayList<>(); param1.add(30); param1.add(15); param1.add(57); param1.add(90); param1.add(64); param1.add(1); param1.add(71); param1.add(56); param1.add(4); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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 ]; } int main() { int n_success = 0; vector param0 {55,74,76,6,2,36,40,14,42,62}; vector param1 {30,15,57,90,64,1,71,56,4,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, NEWMAN_CONWAY_SEQUENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NEWMAN_CONWAY_SEQUENCE_1{ static int f_gold ( int n ) { int f [ ] = new int [ n + 1 ] ; f [ 0 ] = 0 ; f [ 1 ] = 1 ; f [ 2 ] = 1 ; int i ; for ( i = 3 ; i <= n ; i ++ ) f [ i ] = f [ f [ i - 1 ] ] + f [ i - f [ i - 1 ] ] ; return f [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(39); param0.add(93); param0.add(3); param0.add(28); param0.add(23); param0.add(95); param0.add(41); param0.add(31); param0.add(46); param0.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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 ]; } int main() { int n_success = 0; vector param0 {39,93,3,28,23,95,41,31,46,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_WAYS_DIVIDE_CIRCLE_USING_N_NON_INTERSECTING_CHORDS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_WAYS_DIVIDE_CIRCLE_USING_N_NON_INTERSECTING_CHORDS{ static int f_gold ( int A ) { int n = 2 * A ; int [ ] dpArray = new int [ n + 1 ] ; 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 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(32); param0.add(52); param0.add(52); param0.add(32); param0.add(73); param0.add(31); param0.add(29); param0.add(75); param0.add(39); param0.add(49); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A ) : n = 2 * A dpArray = [ 0 ] * ( n + 1 ) dpArray [ 0 ] = 1 dpArray [ 2 ] = 1 for i in range ( 4 , n + 1 , 2 ) : for j in range ( 0 , i - 1 , 2 ) : dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] ) return int ( dpArray [ n ] ) "," 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 ]; } int main() { int n_success = 0; vector param0 {32,52,52,32,73,31,29,75,39,49}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (32,), (52,), (52,), (32,), (73,), (31,), (29,), (75,), (39,), (49,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_UNIQUE_SUB_ARRAY_SUM_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_UNIQUE_SUB_ARRAY_SUM_GIVEN_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int res = 0 ; HashMap < Integer , Integer > m = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int sum = 0 ; for ( int j = i ; j < n ; j ++ ) { sum += arr [ j ] ; if ( m . containsKey ( sum ) ) { m . put ( sum , m . get ( sum ) + 1 ) ; } else { m . put ( sum , 1 ) ; } } } for ( Map . Entry < Integer , Integer > x : m . entrySet ( ) ) if ( x . getValue ( ) == 1 ) res += x . getKey ( ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,24,34,35,36,40,49,51,53,74,78}); param0.add(new int[]{-34,60,32}); param0.add(new int[]{0}); param0.add(new int[]{80,64,10,82,14,75,51,91,1,25,98,22,36,27,21,31,93,6,52,91,80,8,62,95,10,71,40,80,35,86,85,26,74,72,64,88,4,71,4,16}); param0.add(new int[]{-94,-46,-36,-24,-22,0,10,14,34,34,90,92,98}); param0.add(new int[]{1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1}); param0.add(new int[]{19,20,20,24,25,33,43,47,57,61,61,64,65,71,72,73,75,82,90,93,95}); param0.add(new int[]{-6,56,58,-36,70,-92,30,58,-40,98,80,-96,-4,-88,34,76,40,-32,-94,-26,8,72,-56,-96,-88,-24,36,14,-88,-32,90,4,-88,28,18}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{91,51,15,78,55,3,10,24,42,84,66,78,10,41,21,53,69,57,20,22,50,72,8,80,12,91,29,95,38,74,95,26,10,57,51,25,49,74,15,42,99,21,27}); List param1 = new ArrayList<>(); param1.add(9); param1.add(2); param1.add(0); param1.add(31); param1.add(9); param1.add(21); param1.add(15); param1.add(24); param1.add(11); param1.add(36); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : res = 0 m = dict ( ) for i in range ( n ) : Sum = 0 for j in range ( i , n ) : Sum += arr [ j ] m [ Sum ] = m.get ( Sum , 0 ) + 1 for x in m : if m [ x ] == 1 : res += x return res "," 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; } int main() { int n_success = 0; vector> param0 {{7,24,34,35,36,40,49,51,53,74,78},{-34,60,32},{0},{80,64,10,82,14,75,51,91,1,25,98,22,36,27,21,31,93,6,52,91,80,8,62,95,10,71,40,80,35,86,85,26,74,72,64,88,4,71,4,16},{-94,-46,-36,-24,-22,0,10,14,34,34,90,92,98},{1,0,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1},{19,20,20,24,25,33,43,47,57,61,61,64,65,71,72,73,75,82,90,93,95},{-6,56,58,-36,70,-92,30,58,-40,98,80,-96,-4,-88,34,76,40,-32,-94,-26,8,72,-56,-96,-88,-24,36,14,-88,-32,90,4,-88,28,18},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{91,51,15,78,55,3,10,24,42,84,66,78,10,41,21,53,69,57,20,22,50,72,8,80,12,91,29,95,38,74,95,26,10,57,51,25,49,74,15,42,99,21,27}}; vector param1 {9,2,0,31,9,21,15,24,11,36}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 24, 34, 35, 36, 40, 49, 51, 53, 74, 78],9,), ([-34, 60, 32],2,), ([0],0,), ([80, 64, 10, 82, 14, 75, 51, 91, 1, 25, 98, 22, 36, 27, 21, 31, 93, 6, 52, 91, 80, 8, 62, 95, 10, 71, 40, 80, 35, 86, 85, 26, 74, 72, 64, 88, 4, 71, 4, 16],31,), ([-94, -46, -36, -24, -22, 0, 10, 14, 34, 34, 90, 92, 98],9,), ([1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1],21,), ([19, 20, 20, 24, 25, 33, 43, 47, 57, 61, 61, 64, 65, 71, 72, 73, 75, 82, 90, 93, 95],15,), ([-6, 56, 58, -36, 70, -92, 30, 58, -40, 98, 80, -96, -4, -88, 34, 76, 40, -32, -94, -26, 8, 72, -56, -96, -88, -24, 36, 14, -88, -32, 90, 4, -88, 28, 18],24,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,), ([91, 51, 15, 78, 55, 3, 10, 24, 42, 84, 66, 78, 10, 41, 21, 53, 69, 57, 20, 22, 50, 72, 8, 80, 12, 91, 29, 95, 38, 74, 95, 26, 10, 57, 51, 25, 49, 74, 15, 42, 99, 21, 27],36,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES{ static int f_gold ( int n ) { int DP [ ] = new int [ 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 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(24); param0.add(13); param0.add(56); param0.add(26); param0.add(67); param0.add(82); param0.add(60); param0.add(64); param0.add(65); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : DP = [ 0 ] * ( n + 1 ) DP [ 0 ] = 0 DP [ 1 ] = 1 for i in range ( 2 , n + 1 ) : if ( int ( i % 2 ) == 0 ) : DP [ i ] = DP [ int ( i / 2 ) ] else : DP [ i ] = ( DP [ int ( ( i - 1 ) / 2 ) ] + DP [ int ( ( i + 1 ) / 2 ) ] ) return DP [ n ] "," 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 ]; } int main() { int n_success = 0; vector param0 {37,24,13,56,26,67,82,60,64,65}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,), (24,), (13,), (56,), (26,), (67,), (82,), (60,), (64,), (65,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING{ static int f_gold ( int n ) { int res [ ] = new int [ n + 1 ] ; res [ 0 ] = 0 ; res [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) res [ i ] = Math . max ( i , ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) ) ; return res [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(3); param0.add(19); param0.add(39); param0.add(89); param0.add(96); param0.add(68); param0.add(48); param0.add(5); param0.add(3); param0.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : res = list ( ) res.append ( 0 ) res.append ( 1 ) i = 2 while i < n + 1 : res.append ( max ( i , ( res [ int ( i / 2 ) ] + res [ int ( i / 3 ) ] + res [ int ( i / 4 ) ] + res [ int ( i / 5 ) ] ) ) ) i = i + 1 return res [ n ] "," 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 ]; } int main() { int n_success = 0; vector param0 {3,19,39,89,96,68,48,5,3,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (3,), (19,), (39,), (89,), (96,), (68,), (48,), (5,), (3,), (4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NEXT_POWER_OF_2_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NEXT_POWER_OF_2_1{ static int f_gold ( int n ) { int p = 1 ; if ( n > 0 && ( n & ( n - 1 ) ) == 0 ) return n ; while ( p < n ) p <<= 1 ; return p ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(8); param0.add(79); param0.add(31); param0.add(63); param0.add(18); param0.add(2); param0.add(6); param0.add(85); param0.add(29); param0.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : p = 1 if ( n and not ( n & ( n - 1 ) ) ) : return n while ( p < n ) : p <<= 1 return p ; "," 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; } int main() { int n_success = 0; vector param0 {8,79,31,63,18,2,6,85,29,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (8,), (79,), (31,), (63,), (18,), (2,), (6,), (85,), (29,), (8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_PAIRS_DIFFERENCE_EQUAL_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_DIFFERENCE_EQUAL_K{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,14,17,19,22,23,23,27,30,31,34,37,37,39,39,42,57,61,68,73,77,79,91,96,97}); param0.add(new int[]{-78,-42,28,-88,18,-52}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{8,46,57,28,80,2,75,57,83,45,32,49,77,30,94,33,23,29,35,81,85}); param0.add(new int[]{-90,-72,-72,-62,-62,-54,-54,-52,-48,-38,-22,-22,-22,-12,-12,-8,-8,-8,-6,-6,-2,6,12,26,26,28,28,38,40,48,52,52,58,60,68,70,72,76,76,76,92}); param0.add(new int[]{0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,0,1,0,0,1,0,0,1,0,1}); param0.add(new int[]{3,13,19,23,27,32,49,52,54,57,58,58,63,67,68,68,69,70,75,80,86,90,91,95}); param0.add(new int[]{-56,40,-66,42,8,-40,-8,-42}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{99,12,90,10,86,86,81,19,1,1,98,82,34,39,34,1,54,47,39,82,21,50,82,41,98,47,88,46,72,28,28,29,60,87,92,53,93,29,74,75,11,32,48,47,85,16,20}); List param1 = new ArrayList<>(); param1.add(19); param1.add(3); param1.add(16); param1.add(15); param1.add(22); param1.add(45); param1.add(19); param1.add(7); param1.add(16); param1.add(24); List param2 = new ArrayList<>(); param2.add(19); param2.add(4); param2.add(14); param2.add(11); param2.add(25); param2.add(39); param2.add(21); param2.add(6); param2.add(28); param2.add(45); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : count = 0 for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : if arr [ i ] - arr [ j ] == k or arr [ j ] - arr [ i ] == k : count += 1 return count "," 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; } int main() { int n_success = 0; vector> param0 {{9,14,17,19,22,23,23,27,30,31,34,37,37,39,39,42,57,61,68,73,77,79,91,96,97},{-78,-42,28,-88,18,-52},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{8,46,57,28,80,2,75,57,83,45,32,49,77,30,94,33,23,29,35,81,85},{-90,-72,-72,-62,-62,-54,-54,-52,-48,-38,-22,-22,-22,-12,-12,-8,-8,-8,-6,-6,-2,6,12,26,26,28,28,38,40,48,52,52,58,60,68,70,72,76,76,76,92},{0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,1,0,1,0,1,0,0,1,0,0,1,0,1},{3,13,19,23,27,32,49,52,54,57,58,58,63,67,68,68,69,70,75,80,86,90,91,95},{-56,40,-66,42,8,-40,-8,-42},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{99,12,90,10,86,86,81,19,1,1,98,82,34,39,34,1,54,47,39,82,21,50,82,41,98,47,88,46,72,28,28,29,60,87,92,53,93,29,74,75,11,32,48,47,85,16,20}}; vector param1 {19,3,16,15,22,45,19,7,16,24}; vector param2 {19,4,14,11,25,39,21,6,28,45}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([9, 14, 17, 19, 22, 23, 23, 27, 30, 31, 34, 37, 37, 39, 39, 42, 57, 61, 68, 73, 77, 79, 91, 96, 97],19,19,), ([-78, -42, 28, -88, 18, -52],3,4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],16,14,), ([8, 46, 57, 28, 80, 2, 75, 57, 83, 45, 32, 49, 77, 30, 94, 33, 23, 29, 35, 81, 85],15,11,), ([-90, -72, -72, -62, -62, -54, -54, -52, -48, -38, -22, -22, -22, -12, -12, -8, -8, -8, -6, -6, -2, 6, 12, 26, 26, 28, 28, 38, 40, 48, 52, 52, 58, 60, 68, 70, 72, 76, 76, 76, 92],22,25,), ([0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1],45,39,), ([3, 13, 19, 23, 27, 32, 49, 52, 54, 57, 58, 58, 63, 67, 68, 68, 69, 70, 75, 80, 86, 90, 91, 95],19,21,), ([-56, 40, -66, 42, 8, -40, -8, -42],7,6,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,28,), ([99, 12, 90, 10, 86, 86, 81, 19, 1, 1, 98, 82, 34, 39, 34, 1, 54, 47, 39, 82, 21, 50, 82, 41, 98, 47, 88, 46, 72, 28, 28, 29, 60, 87, 92, 53, 93, 29, 74, 75, 11, 32, 48, 47, 85, 16, 20],24,45,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION{ static int f_gold ( int n ) { int table [ ] = new int [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) table [ i ] = n - i ; for ( int i = n ; i >= 1 ; i -- ) { if ( ! ( i % 2 > 0 ) ) table [ i / 2 ] = Math . min ( table [ i ] + 1 , table [ i / 2 ] ) ; if ( ! ( i % 3 > 0 ) ) table [ i / 3 ] = Math . min ( table [ i ] + 1 , table [ i / 3 ] ) ; } return table [ 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(59); param0.add(7); param0.add(90); param0.add(78); param0.add(49); param0.add(15); param0.add(45); param0.add(56); param0.add(7); param0.add(70); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : table = [ 0 ] * ( n + 1 ) for i in range ( n + 1 ) : table [ i ] = n - i for i in range ( n , 0 , - 1 ) : if ( not ( i % 2 ) ) : table [ i // 2 ] = min ( table [ i ] + 1 , table [ i // 2 ] ) if ( not ( i % 3 ) ) : table [ i // 3 ] = min ( table [ i ] + 1 , table [ i // 3 ] ) return table [ 1 ] "," 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 ]; } int main() { int n_success = 0; vector param0 {59,7,90,78,49,15,45,56,7,70}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (59,), (7,), (90,), (78,), (49,), (15,), (45,), (56,), (7,), (70,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_1{ static int f_gold ( int n ) { int res = 1 , i ; for ( i = 2 ; i <= n ; i ++ ) res *= i ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(28); param0.add(23); param0.add(79); param0.add(52); param0.add(42); param0.add(79); param0.add(77); param0.add(99); param0.add(70); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ; "," using namespace std; unsigned int f_gold ( unsigned int n ) { int res = 1, i; for ( i = 2; i <= n; i ++ ) res *= i; return res; } int main() { int n_success = 0; vector param0 {57,28,23,79,52,42,79,77,99,70}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,), (28,), (23,), (79,), (52,), (42,), (79,), (77,), (99,), (70,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_DIFFERENCE_BETWEEN_FREQUENCY_OF_TWO_ELEMENTS_SUCH_THAT_ELEMENT_HAVING_GREATER_FREQUENCY_IS_ALSO_GREATER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_DIFFERENCE_BETWEEN_FREQUENCY_OF_TWO_ELEMENTS_SUCH_THAT_ELEMENT_HAVING_GREATER_FREQUENCY_IS_ALSO_GREATER{ static int f_gold ( int arr [ ] , int n ) { Map < Integer , Integer > freq = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) freq . put ( arr [ i ] , freq . get ( arr [ i ] ) == null ? 1 : freq . get ( arr [ i ] ) + 1 ) ; int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( freq . get ( arr [ i ] ) > freq . get ( arr [ j ] ) && arr [ i ] > arr [ j ] ) ans = Math . max ( ans , freq . get ( arr [ i ] ) - freq . get ( arr [ j ] ) ) ; else if ( freq . get ( arr [ i ] ) < freq . get ( arr [ j ] ) && arr [ i ] < arr [ j ] ) ans = Math . max ( ans , freq . get ( arr [ j ] ) - freq . get ( arr [ i ] ) ) ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,6,16,22,33,37,46,49,50,51,65,82,94}); param0.add(new int[]{-4,-16,92,-28,-44,50,54,24,-28,-32,20,-94,-78,-20,26,90,-90,10,36,-52,60,-96,-64,-34,10,-12,86,78,32,-46,92,-66,18,-78,-28,14,-26,26,4,16,-96,86,-50}); param0.add(new int[]{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}); param0.add(new int[]{98,54,41,62,95,18,74,57,37,90,35,45,10,14,90,88,58,8,85,58,97,59,13,94,40,3,89,62,45,90,8,31,93,5,40,78,43,75,79,74,17,38,62}); param0.add(new int[]{-88,-78,-76,-66,-56,-54,-54,-52,-34,-24,2,58,76,78}); param0.add(new int[]{1,1,1,1,1,0,0,1,0,0,1,0,1,1,0}); param0.add(new int[]{8,43,44,86}); param0.add(new int[]{54,92,-46,6,-38}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{54,47,56,2,23,40,15,18,31,48,53,77,83,29,62,86}); List param1 = new ArrayList<>(); param1.add(9); param1.add(25); param1.add(35); param1.add(40); param1.add(8); param1.add(12); param1.add(2); param1.add(4); param1.add(12); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector> param0 {{6,6,16,22,33,37,46,49,50,51,65,82,94},{-4,-16,92,-28,-44,50,54,24,-28,-32,20,-94,-78,-20,26,90,-90,10,36,-52,60,-96,-64,-34,10,-12,86,78,32,-46,92,-66,18,-78,-28,14,-26,26,4,16,-96,86,-50},{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},{98,54,41,62,95,18,74,57,37,90,35,45,10,14,90,88,58,8,85,58,97,59,13,94,40,3,89,62,45,90,8,31,93,5,40,78,43,75,79,74,17,38,62},{-88,-78,-76,-66,-56,-54,-54,-52,-34,-24,2,58,76,78},{1,1,1,1,1,0,0,1,0,0,1,0,1,1,0},{8,43,44,86},{54,92,-46,6,-38},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{54,47,56,2,23,40,15,18,31,48,53,77,83,29,62,86}}; vector param1 {9,25,35,40,8,12,2,4,12,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, PYTHAGOREAN_QUADRUPLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PYTHAGOREAN_QUADRUPLE{ static Boolean 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(3); param0.add(0); param0.add(-1); param0.add(82); param0.add(14); param0.add(6); param0.add(13); param0.add(96); param0.add(70); List param1 = new ArrayList<>(); param1.add(1); param1.add(2); param1.add(0); param1.add(-1); param1.add(79); param1.add(57); param1.add(96); param1.add(7); param1.add(65); param1.add(33); List param2 = new ArrayList<>(); param2.add(1); param2.add(5); param2.add(0); param2.add(-1); param2.add(6); param2.add(35); param2.add(45); param2.add(3); param2.add(72); param2.add(6); List param3 = new ArrayList<>(); param3.add(3); param3.add(38); param3.add(0); param3.add(1); param3.add(59); param3.add(29); param3.add(75); param3.add(63); param3.add(93); param3.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)).equals(f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( a , b , c , d ) : sum = a * a + b * b + c * c ; if ( d * d == sum ) : return True else : return False "," 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; } int main() { int n_success = 0; vector param0 {1,3,0,-1,82,14,6,13,96,70}; vector param1 {1,2,0,-1,79,57,96,7,65,33}; vector param2 {1,5,0,-1,6,35,45,3,72,6}; vector param3 {3,38,0,1,59,29,75,63,93,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ (1,1,1,3,), (3,2,5,38,), (0,0,0,0,), (-1,-1,-1,1,), (82,79,6,59,), (14,57,35,29,), (6,96,45,75,), (13,7,3,63,), (96,65,72,93,), (70,33,6,2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", PROGRAM_CHECK_PLUS_PERFECT_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CHECK_PLUS_PERFECT_NUMBER{ static boolean 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 += Math . pow ( x % 10 , n ) ; x /= 10 ; } return ( sum == temp ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(371); param0.add(9474); param0.add(85); param0.add(35); param0.add(54); param0.add(17); param0.add(97); param0.add(63); param0.add(12); param0.add(43); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","import math def f_gold ( x ) : temp = x n = 0 while ( x != 0 ) : x = x // 10 n = n + 1 x = temp sm = 0 while ( x != 0 ) : sm = sm + ( int ) ( math.pow ( x % 10 , n ) ) x = x // 10 return ( sm == temp ) "," 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 ); } int main() { int n_success = 0; vector param0 {371,9474,85,35,54,17,97,63,12,43}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ (371,), (9474,), (85,), (35,), (54,), (17,), (97,), (63,), (12,), (43,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_SUBARRAY_SUM_ARRAY_CREATED_REPEATED_CONCATENATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUBARRAY_SUM_ARRAY_CREATED_REPEATED_CONCATENATION{ static int f_gold ( int a [ ] , int n , int k ) { int max_so_far = 0 ; int 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,6,12,20,23,28,33,37,47,51,53,56,63,65,65,68,69,76,76,78,83}); param0.add(new int[]{68,10,52,-44,34,-4,-34,2,50,-60,50,94,-98,-98,-44,-36,-4,-62,-2,-92,-70,-48,-78,-10,94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{71,59,21,82,73,29,30,25,21,10,85,22,60,43,49,20,34,39,69,6,44,27,50,33,57,29,65,18,68,56,50,28}); param0.add(new int[]{-84,-74,-74,-56,-54,-48,-48,-46,-42,-34,-32,-30,-18,-16,-16,6,12,20,24,26,30,32,34,42,42,42,44,46,46,50,50,62,72,78,90}); param0.add(new int[]{0,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0}); param0.add(new int[]{3,7,11,11,26,60,68,71,77,91,95}); param0.add(new int[]{28,48,-86,-52,6,4,30,18,-32,60,-2,16,-88,-36}); param0.add(new int[]{1}); param0.add(new int[]{76}); List param1 = new ArrayList<>(); param1.add(18); param1.add(22); param1.add(34); param1.add(23); param1.add(17); param1.add(16); param1.add(8); param1.add(8); param1.add(0); param1.add(0); List param2 = new ArrayList<>(); param2.add(20); param2.add(22); param2.add(29); param2.add(30); param2.add(23); param2.add(25); param2.add(10); param2.add(11); param2.add(0); param2.add(0); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n , k ) : max_so_far = - 2147483648 max_ending_here = 0 for i in range ( n * k ) : max_ending_here = max_ending_here + a [ i % n ] if ( max_so_far < max_ending_here ) : max_so_far = max_ending_here if ( max_ending_here < 0 ) : max_ending_here = 0 return max_so_far "," 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; } int main() { int n_success = 0; vector> param0 {{5,6,12,20,23,28,33,37,47,51,53,56,63,65,65,68,69,76,76,78,83},{68,10,52,-44,34,-4,-34,2,50,-60,50,94,-98,-98,-44,-36,-4,-62,-2,-92,-70,-48,-78,-10,94},{0,0,0,0,0,0,0,0,0,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},{71,59,21,82,73,29,30,25,21,10,85,22,60,43,49,20,34,39,69,6,44,27,50,33,57,29,65,18,68,56,50,28},{-84,-74,-74,-56,-54,-48,-48,-46,-42,-34,-32,-30,-18,-16,-16,6,12,20,24,26,30,32,34,42,42,42,44,46,46,50,50,62,72,78,90},{0,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0},{3,7,11,11,26,60,68,71,77,91,95},{28,48,-86,-52,6,4,30,18,-32,60,-2,16,-88,-36},{1},{76}}; vector param1 {18,22,34,23,17,16,8,8,0,0}; vector param2 {20,22,29,30,23,25,10,11,0,0}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 6, 12, 20, 23, 28, 33, 37, 47, 51, 53, 56, 63, 65, 65, 68, 69, 76, 76, 78, 83],18,20,), ([68, 10, 52, -44, 34, -4, -34, 2, 50, -60, 50, 94, -98, -98, -44, -36, -4, -62, -2, -92, -70, -48, -78, -10, 94],22,22,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],34,29,), ([71, 59, 21, 82, 73, 29, 30, 25, 21, 10, 85, 22, 60, 43, 49, 20, 34, 39, 69, 6, 44, 27, 50, 33, 57, 29, 65, 18, 68, 56, 50, 28],23,30,), ([-84, -74, -74, -56, -54, -48, -48, -46, -42, -34, -32, -30, -18, -16, -16, 6, 12, 20, 24, 26, 30, 32, 34, 42, 42, 42, 44, 46, 46, 50, 50, 62, 72, 78, 90],17,23,), ([0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0],16,25,), ([3, 7, 11, 11, 26, 60, 68, 71, 77, 91, 95],8,10,), ([28, 48, -86, -52, 6, 4, 30, 18, -32, 60, -2, 16, -88, -36],8,11,), ([1],0,0,), ([76],0,0,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1{ static boolean 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 false ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96}); param0.add(new int[]{12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-76}); param0.add(new int[]{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}); param0.add(new int[]{94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56}); param0.add(new int[]{-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98}); param0.add(new int[]{1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1}); param0.add(new int[]{6,8,11,13,14,26,26,41,48,70,82,83,84,88,96}); param0.add(new int[]{-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}); List param1 = new ArrayList<>(); param1.add(new int[]{10,13,17,63}); param1.add(new int[]{12, -18, 44}); param1.add(new int[]{0,0,0}); param1.add(new int[]{80,58,32,2}); param1.add(new int[]{-99,-90,-90,-86}); param1.add(new int[]{0,0,1,1}); param1.add(new int[]{1,9,12,16}); param1.add(new int[]{-76,-54,4,78}); param1.add(new int[]{0,1,0,1}); param1.add(new int[]{93,5,9,13}); List param2 = new ArrayList<>(); param2.add(29); param2.add(46); param2.add(34); param2.add(17); param2.add(23); param2.add(10); param2.add(10); param2.add(27); param2.add(10); param2.add(19); List param3 = new ArrayList<>(); param3.add(4); param3.add(3); param3.add(3); param3.add(4); param3.add(4); param3.add(4); param3.add(4); param3.add(4); param3.add(4); param3.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , m , n ) : i = 0 j = 0 for i in range ( n ) : for j in range ( m ) : if ( arr2 [ i ] == arr1 [ j ] ) : break if ( j == m ) : return 0 return 1 "," 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; } int main() { int n_success = 0; vector> param0 {{7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96},{12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-76},{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},{94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56},{-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98},{1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1},{6,8,11,13,14,26,26,41,48,70,82,83,84,88,96},{-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30},{0,0,0,0,0,1,1,1,1,1,1,1},{54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}}; vector> param1 { {10,13,17,63}, {12, -18, 44}, {0,0,0}, {80,58,32,2}, {-99,-90,-90,-86}, {0,0,1,1}, {1,9,12,16}, {-76,-54,4,78}, {0,1,0,1}, {93,5,9,13}}; vector param2 {29,46,34,17,23,10,10,27,10,19}; vector param3 {4,3,3,4,4,4,4,4,4,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 10, 10, 10, 13, 17, 23, 24, 25, 28, 30, 33, 37, 49, 49, 50, 57, 60, 60, 63, 63, 64, 65, 65, 72, 81, 84, 85, 85, 94, 96], [10,13,17,63],29,4,), ([12, 30, -94, -92, -62, -18, -56, 44, -50, -92, 6, 2, 56, -90, 0, 0, 18, 86, -58, 58, -54, 62, -94, 94, 0, 8, 82, -68, -88, -18, 8, -80, -42, 18, 62, -8, 56, -76, -42, 56, 44, -2, -20, 62, -14, 74, -86, -76], [12, -18, 44],46,3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0,0,0],34,3,), ([94, 26, 32, 20, 46, 55, 9, 51, 57, 80, 45, 38, 68, 12, 90, 10, 80, 65, 12, 52, 51, 86, 64, 57, 93, 19, 30, 92, 85, 82, 24, 26, 36, 56], [80,58,32,2],17,4,), ([-98, -90, -86, -86, -84, -84, -82, -80, -78, -72, -70, -68, -66, -64, -52, -52, -50, -38, -28, -26, -24, -14, -8, 16, 26, 26, 28, 34, 36, 40, 42, 44, 44, 46, 50, 60, 68, 78, 80, 86, 90, 92, 98], [-99,-90,-90,-86],23,4,), ([1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1], [0,0,1,1],10,4,), ([6, 8, 11, 13, 14, 26, 26, 41, 48, 70, 82, 83, 84, 88, 96], [1,9,12,16],10,4,), ([-88, 80, 62, 76, 48, 92, 18, -94, -62, 98, -46, -50, 70, 32, 68, -54, 26, 16, 94, 0, -84, 2, -16, 88, 26, -38, 18, 64, 90, 80, 76, 2, 14, -90, 50, 4, 76, 30], [-76,-54,4,78],27,4,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0,1,0,1],10,4,), ([54, 44, 97, 92, 13, 54, 27, 8, 43, 70, 77, 84, 55, 64, 5, 59, 27, 19, 65, 68, 66, 26, 33, 38, 7], [93,5,9,13],19,4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_SUBARRAYS_SUM_EXACTLY_EQUAL_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBARRAYS_SUM_EXACTLY_EQUAL_K{ static int f_gold ( int arr [ ] , int n , int sum ) { HashMap < Integer , Integer > prevSum = new HashMap < > ( ) ; int res = 0 ; int currsum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { currsum += arr [ i ] ; if ( currsum == sum ) res ++ ; if ( prevSum . containsKey ( currsum - sum ) ) res += prevSum . get ( currsum - sum ) ; Integer count = prevSum . get ( currsum ) ; if ( count == null ) prevSum . put ( currsum , 1 ) ; else prevSum . put ( currsum , count + 1 ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,18,27,52,70,91}); param0.add(new int[]{60,-88,-48,90,-28,20,18,34,-58,76,-78,-18,68,-48,8,34,60,-34,-10,32,78,-84,-22,54,-18,-82,-70,-58,-20,-76,88,-30,-6,68}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{67,39,22,32,59,44,86,26,46,60,99,12,32,46,16,22,45,85,21,92,77,50,65,23,93,26,23,20,32,83,60,22,11,45,99,31,72}); param0.add(new int[]{-86,-84,-82,-82,-28,-12,4,24,62,72}); param0.add(new int[]{1,0,0,1,0,1,1,1,0,1,1,1,0,0,1,1,1,1}); param0.add(new int[]{8,20,25,27,28,28,30,31,32,36,39,41,51,53,53,54,56,58,59,77,78,85,88,92,99}); param0.add(new int[]{60,40,-96,-76,-34,-18,38,-62,50,56,64,-94,-50,50,-80,42,-66,-42,68,70,78,-18,-24,-48,-92,64,14,24,-94,-98,18,44,-58}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{73,52,37,80,4,26,3,76,32,79,31,32,8,87,42,50,51}); List param1 = new ArrayList<>(); param1.add(5); param1.add(32); param1.add(11); param1.add(25); param1.add(7); param1.add(16); param1.add(13); param1.add(22); param1.add(11); param1.add(8); List param2 = new ArrayList<>(); param2.add(4); param2.add(30); param2.add(11); param2.add(25); param2.add(5); param2.add(13); param2.add(18); param2.add(17); param2.add(8); param2.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector> param0 {{9,18,27,52,70,91},{60,-88,-48,90,-28,20,18,34,-58,76,-78,-18,68,-48,8,34,60,-34,-10,32,78,-84,-22,54,-18,-82,-70,-58,-20,-76,88,-30,-6,68},{0,0,0,0,0,0,0,0,1,1,1,1},{67,39,22,32,59,44,86,26,46,60,99,12,32,46,16,22,45,85,21,92,77,50,65,23,93,26,23,20,32,83,60,22,11,45,99,31,72},{-86,-84,-82,-82,-28,-12,4,24,62,72},{1,0,0,1,0,1,1,1,0,1,1,1,0,0,1,1,1,1},{8,20,25,27,28,28,30,31,32,36,39,41,51,53,53,54,56,58,59,77,78,85,88,92,99},{60,40,-96,-76,-34,-18,38,-62,50,56,64,-94,-50,50,-80,42,-66,-42,68,70,78,-18,-24,-48,-92,64,14,24,-94,-98,18,44,-58},{0,0,0,0,1,1,1,1,1,1,1,1},{73,52,37,80,4,26,3,76,32,79,31,32,8,87,42,50,51}}; vector param1 {5,32,11,25,7,16,13,22,11,8}; vector param2 {4,30,11,25,5,13,18,17,8,14}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_PAIR_MAXIMUM_GCD_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_PAIR_MAXIMUM_GCD_ARRAY{ public static int f_gold ( int arr [ ] , int n ) { int high = 0 ; for ( int i = 0 ; i < n ; i ++ ) high = Math . max ( high , arr [ i ] ) ; int divisors [ ] = new int [ high + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 1 ; j <= Math . 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 ; return 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,3,8,10,12,13,14,16,16,19,20,21,25,29,33,35,35,35,35,36,38,41,42,45,45,45,46,48,51,52,53,55,56,57,58,62,69,73,73,76,76,80,89,91,92,93,93,96}); param0.add(new int[]{12,52,-66,50,50,-78,-14,26,56,74,8,-58,58,-66,-58,-12,80}); param0.add(new int[]{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}); param0.add(new int[]{23,98,12,45,83,85,30,92,26,12,38,20,86,52,71,20,56,78,10,34,86,55,99,84,26,2,1,89,60,26,16,37,98,11,73,42,36,60,28}); param0.add(new int[]{-98,-84,-80,-72,-66,-64,-52,-36,-28,-18,-12,-12,-4,8,12,40,42,56,68,70,90,94}); param0.add(new int[]{1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,0,1}); param0.add(new int[]{3,5,6,7,8,9,11,13,18,20,24,25,26,27,36,41,41,45,48,48,49,65,69,70,85,90,99,99}); param0.add(new int[]{80,-26,-38,-40,22,-28,0,-36,70,-32,38,58,76,-42,38,92,68,-70,36,-62,24,-84,42,4,0,8,-36,98,-84,82,-70,-12,6,-82,-20,-68,48,-12,42,18,58,-14,94,84}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{36,60,45,76,43,71,10,18,52,52,53,73,48,95,13,50,97,30,73,13,18,34,51}); List param1 = new ArrayList<>(); param1.add(45); param1.add(11); param1.add(26); param1.add(28); param1.add(17); param1.add(14); param1.add(20); param1.add(39); param1.add(26); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector> param0 {{3,3,8,10,12,13,14,16,16,19,20,21,25,29,33,35,35,35,35,36,38,41,42,45,45,45,46,48,51,52,53,55,56,57,58,62,69,73,73,76,76,80,89,91,92,93,93,96},{12,52,-66,50,50,-78,-14,26,56,74,8,-58,58,-66,-58,-12,80},{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},{23,98,12,45,83,85,30,92,26,12,38,20,86,52,71,20,56,78,10,34,86,55,99,84,26,2,1,89,60,26,16,37,98,11,73,42,36,60,28},{-98,-84,-80,-72,-66,-64,-52,-36,-28,-18,-12,-12,-4,8,12,40,42,56,68,70,90,94},{1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,0,1},{3,5,6,7,8,9,11,13,18,20,24,25,26,27,36,41,41,45,48,48,49,65,69,70,85,90,99,99},{80,-26,-38,-40,22,-28,0,-36,70,-32,38,58,76,-42,38,92,68,-70,36,-62,24,-84,42,4,0,8,-36,98,-84,82,-70,-12,6,-82,-20,-68,48,-12,42,18,58,-14,94,84},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{36,60,45,76,43,71,10,18,52,52,53,73,48,95,13,50,97,30,73,13,18,34,51}}; vector param1 {45,11,26,28,17,14,20,39,26,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY{ static int f_gold ( Integer arr [ ] , int n ) { Arrays . sort ( arr , Collections . reverseOrder ( ) ) ; int [ ] dimension = { 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 ] ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new Integer[]{1,5,6,8,9,11,12,14,16,17,24,25,36,40,44,47,49,51,51,52,67,68,72,74,81,82,83,84,92,95,95,96,99}); param0.add(new Integer[]{-54,-82,-92,-32}); param0.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new Integer[]{16,62,17,15,26,45,2,17,65,94,96,30,68,44,96,60,99}); param0.add(new Integer[]{-88,-82,-78,-52,-50,-42,-34,-28,16,46,54,56,66,66,74,82,82,94,98}); param0.add(new Integer[]{0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,0}); param0.add(new Integer[]{1,6,8,8,8,10,13,14,14,23,24,25,27,28,29,30,33,38,43,44,49,52,56,58,62,63,64,65,65,68,75,85,85,87,93,96,97}); param0.add(new Integer[]{-90,-56,16,32,78,-20,76,-90,-68,-70,54,50,60,-64,78,-6,-92,6,16,70}); param0.add(new Integer[]{0,0,0,0,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}); param0.add(new Integer[]{55,51,90,10,14,5,57,22,75,29,7,18,31,43,84,35,71,94,4,51,94,30,94,53,82}); List param1 = new ArrayList<>(); param1.add(27); param1.add(2); param1.add(15); param1.add(8); param1.add(15); param1.add(18); param1.add(20); param1.add(19); param1.add(30); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( reverse = True ) dimension = [ 0 , 0 ] i = 0 j = 0 while ( i < n - 1 and j < 2 ) : if ( arr [ i ] == arr [ i + 1 ] ) : dimension [ j ] = arr [ i ] j += 1 i += 1 i += 1 return ( dimension [ 0 ] * dimension [ 1 ] ) "," 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 ] ); } int main() { int n_success = 0; vector> param0 {{1,5,6,8,9,11,12,14,16,17,24,25,36,40,44,47,49,51,51,52,67,68,72,74,81,82,83,84,92,95,95,96,99},{-54,-82,-92,-32},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{16,62,17,15,26,45,2,17,65,94,96,30,68,44,96,60,99},{-88,-82,-78,-52,-50,-42,-34,-28,16,46,54,56,66,66,74,82,82,94,98},{0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,0},{1,6,8,8,8,10,13,14,14,23,24,25,27,28,29,30,33,38,43,44,49,52,56,58,62,63,64,65,65,68,75,85,85,87,93,96,97},{-90,-56,16,32,78,-20,76,-90,-68,-70,54,50,60,-64,78,-6,-92,6,16,70},{0,0,0,0,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},{55,51,90,10,14,5,57,22,75,29,7,18,31,43,84,35,71,94,4,51,94,30,94,53,82}}; vector param1 {27,2,15,8,15,18,20,19,30,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 5, 6, 8, 9, 11, 12, 14, 16, 17, 24, 25, 36, 40, 44, 47, 49, 51, 51, 52, 67, 68, 72, 74, 81, 82, 83, 84, 92, 95, 95, 96, 99],27,), ([-54, -82, -92, -32],2,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],15,), ([16, 62, 17, 15, 26, 45, 2, 17, 65, 94, 96, 30, 68, 44, 96, 60, 99],8,), ([-88, -82, -78, -52, -50, -42, -34, -28, 16, 46, 54, 56, 66, 66, 74, 82, 82, 94, 98],15,), ([0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0],18,), ([1, 6, 8, 8, 8, 10, 13, 14, 14, 23, 24, 25, 27, 28, 29, 30, 33, 38, 43, 44, 49, 52, 56, 58, 62, 63, 64, 65, 65, 68, 75, 85, 85, 87, 93, 96, 97],20,), ([-90, -56, 16, 32, 78, -20, 76, -90, -68, -70, 54, 50, 60, -64, 78, -6, -92, 6, 16, 70],19,), ([0, 0, 0, 0, 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],30,), ([55, 51, 90, 10, 14, 5, 57, 22, 75, 29, 7, 18, 31, 43, 84, 35, 71, 94, 4, 51, 94, 30, 94, 53, 82],22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1{ static 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 / Math . abs ( neg - pos ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{49,98}); param0.add(new int[]{82,66,-68,24,-10}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71}); param0.add(new int[]{-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94}); param0.add(new int[]{0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1}); param0.add(new int[]{16,56,56}); param0.add(new int[]{74,-90,-92,30,-18,66,-66,22}); param0.add(new int[]{0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{21,64,82,78,30,34,35}); List param1 = new ArrayList<>(); param1.add(1); param1.add(2); param1.add(8); param1.add(25); param1.add(12); param1.add(36); param1.add(1); param1.add(5); param1.add(7); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : neg = 0 pos = 0 sum = 0 for i in range ( 0 , n ) : sum += arr [ i ] if ( arr [ i ] < 0 ) : neg += 1 else : pos += 1 return ( sum / abs ( neg - pos ) ) "," 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 ) ); } int main() { int n_success = 0; vector> param0 {{49,98},{82,66,-68,24,-10},{0,0,0,0,0,0,0,1,1,1,1,1,1,1},{56,3,18,5,20,56,47,29,60,98,60,40,42,2,54,56,91,8,93,14,31,27,61,49,23,12,71},{-94,-94,-92,-86,-50,-48,-6,8,28,40,44,58,62,72,94},{0,0,1,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,1},{16,56,56},{74,-90,-92,30,-18,66,-66,22},{0,0,0,1,1,1,1,1,1,1,1,1,1,1},{21,64,82,78,30,34,35}}; vector param1 {1,2,8,25,12,36,1,5,7,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([49, 98],1,), ([82, 66, -68, 24, -10],2,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],8,), ([56, 3, 18, 5, 20, 56, 47, 29, 60, 98, 60, 40, 42, 2, 54, 56, 91, 8, 93, 14, 31, 27, 61, 49, 23, 12, 71],25,), ([-94, -94, -92, -86, -50, -48, -6, 8, 28, 40, 44, 58, 62, 72, 94],12,), ([0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1],36,), ([16, 56, 56],1,), ([74, -90, -92, 30, -18, 66, -66, 22],5,), ([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],7,), ([21, 64, 82, 78, 30, 34, 35],5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN{ public static 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 ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(13); param0.add(51); param0.add(69); param0.add(76); param0.add(10); param0.add(97); param0.add(40); param0.add(69); param0.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {37,13,51,69,76,10,97,40,69,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,), (13,), (51,), (69,), (76,), (10,), (97,), (40,), (69,), (4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_COST_SORT_MATRIX_NUMBERS_0_N2_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_SORT_MATRIX_NUMBERS_0_N2_1{ public static int f_gold ( int mat [ ] [ ] , int n ) { int i_des , j_des , q ; int tot_energy = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { q = mat [ i ] [ j ] / n ; i_des = q ; j_des = mat [ i ] [ j ] - ( n * q ) ; tot_energy += Math . abs ( i_des - i ) + Math . abs ( j_des - j ) ; } } return tot_energy ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{-40}}); param0.add(new int[][]{new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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},new int[]{-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}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{12,22,56,63,69},new int[]{8,8,12,57,95},new int[]{40,55,59,65,72},new int[]{2,22,40,72,83},new int[]{2,4,12,31,38}}); param0.add(new int[][]{new int[]{-92,-36,84,62,-94,-74,20,20,92},new int[]{52,-40,-98,-32,58,80,-60,46,80},new int[]{8,8,0,-48,-86,48,-38,-96,92},new int[]{18,-68,-74,92,-70,-36,-32,-16,-16},new int[]{-70,-26,32,-58,82,22,-12,96,-44},new int[]{-68,-54,-94,-84,-68,-70,-30,-76,-52},new int[]{-68,64,68,80,30,12,-82,20,-58},new int[]{-38,-88,24,28,-98,56,-62,-46,98},new int[]{28,-82,-32,74,-94,38,-12,-46,-6}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); List param1 = new ArrayList<>(); param1.add(15); param1.add(0); param1.add(25); param1.add(29); param1.add(16); param1.add(35); param1.add(4); param1.add(4); param1.add(35); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ",,," if __name__ == '__main__': param = [ ([[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,), ([[-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, 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,), ([[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,), ([[-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,), ([[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,), ([[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,), ([[-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,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,), ([[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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_OF_ALL_SUBSTRINGS_OF_A_STRING_REPRESENTING_A_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_OF_ALL_SUBSTRINGS_OF_A_STRING_REPRESENTING_A_NUMBER{ public static int f_gold ( String num ) { int n = num . length ( ) ; int sumofdigit [ ] = new int [ n ] ; sumofdigit [ 0 ] = num . charAt ( 0 ) - '0' ; int res = sumofdigit [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { int numi = num . charAt ( i ) - '0' ; sumofdigit [ i ] = ( i + 1 ) * numi + 10 * sumofdigit [ i - 1 ] ; res += sumofdigit [ i ] ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""rA""); param0.add(""552541909988""); param0.add(""000110001""); param0.add(""s wXTz""); param0.add(""4""); param0.add(""0001""); param0.add(""EdZPQyLD F""); param0.add(""926277661""); param0.add(""1010110""); param0.add(""RfLyITyEE""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, LOWER_CASE_UPPER_CASE_INTERESTING_FACT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LOWER_CASE_UPPER_CASE_INTERESTING_FACT{ static String f_gold ( char [ ] in ) { for ( int i = 0 ; i < in . length ; i ++ ) { if ( 'a' <= in [ i ] & in [ i ] <= 'z' ) { in [ i ] = ( char ) ( in [ i ] - 'a' + 'A' ) ; } } return String . valueOf ( in ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'B','N','O','p','t'}); param0.add(new char[]{'2','8','2','7','3','3','1','2','1','4','1','0','8','1','0','1','1','8','2','9','2','0','6','3','0','4','2','3','3','4','6','7','1','3','6','6','0','5','5','3'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'i','N','F','z','A','Y','v','o','p','t',' ','R','X','D','L','p','J','N','R','m','L','m','s','R','O','G','T','L','m','F','e','B','O','w','e','a','N','T','Z','j','r','n','n'}); param0.add(new char[]{'0','0','1','1','2','2','2','3','3','4','4','4','5','5','6','6','7','8','8','8','8','9','9','9'}); param0.add(new char[]{'1','1','0','0','1','1'}); param0.add(new char[]{' ','A','G','G','H','I','M','M','Q','R','S','U','W','X','Y','a','a','b','b','c','d','e','e','f','h','h','h','i','j','s','s','t','v','w','w','w','y'}); param0.add(new char[]{'5','0','4','9','6','8','2','5','8','7','5','2','4','7','9','7','8','6','9','2','0','1','0','7'}); param0.add(new char[]{'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'}); param0.add(new char[]{'X','g','S','C','q','E','L','v'}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, NUMBER_TRIANGLES_N_MOVES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_TRIANGLES_N_MOVES{ public static int f_gold ( int n ) { int [ ] answer = new int [ n + 1 ] ; answer [ 0 ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) answer [ i ] = answer [ i - 1 ] * 3 + 2 ; return answer [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(33); param0.add(72); param0.add(81); param0.add(93); param0.add(8); param0.add(76); param0.add(97); param0.add(91); param0.add(61); param0.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] ; "," 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 ]; } int main() { int n_success = 0; vector param0 {33,72,81,93,8,76,97,91,61,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (33,), (72,), (81,), (93,), (8,), (76,), (97,), (91,), (61,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_K_TIMES_1{ static int f_gold ( int price [ ] , int n , int k ) { int profit [ ] [ ] = new int [ 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 = Integer . MIN_VALUE ; for ( int j = 1 ; j < n ; j ++ ) { prevDiff = Math . max ( prevDiff , profit [ i - 1 ] [ j - 1 ] - price [ j - 1 ] ) ; profit [ i ] [ j ] = Math . max ( profit [ i ] [ j - 1 ] , price [ j ] + prevDiff ) ; } } return profit [ k ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,6,16,16,19,37,47,49,74,77,86,96}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1}); param0.add(new int[]{22,12,58,70}); param0.add(new int[]{-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}); param0.add(new int[]{1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,0}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(6); param1.add(31); param1.add(7); param1.add(3); param1.add(30); param1.add(14); param1.add(15); param1.add(24); param1.add(10); param1.add(14); List param2 = new ArrayList<>(); param2.add(6); param2.add(32); param2.add(8); param2.add(2); param2.add(36); param2.add(13); param2.add(22); param2.add(35); param2.add(8); param2.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," 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 ]; } int main() { int n_success = 0; vector> param0 {{3,6,16,16,19,37,47,49,74,77,86,96},{-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},{0,0,0,0,0,0,0,1,1,1},{22,12,58,70},{-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},{1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,0},{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},{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},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,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}}; vector param1 {6,31,7,3,30,14,15,24,10,14}; vector param2 {6,32,8,2,36,13,22,35,8,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 6, 16, 16, 19, 37, 47, 49, 74, 77, 86, 96],6,6,), ([-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,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1],7,8,), ([22, 12, 58, 70],3,2,), ([-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,), ([1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0],14,13,), ([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,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],10,8,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUBARRAYS_TOTAL_DISTINCT_ELEMENTS_ORIGINAL_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUBARRAYS_TOTAL_DISTINCT_ELEMENTS_ORIGINAL_ARRAY{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > vis = new HashMap < Integer , Integer > ( ) { @ Override public Integer get ( Object key ) { if ( ! containsKey ( key ) ) return 0 ; return super . get ( key ) ; } }; for ( int i = 0 ; i < n ; ++ i ) vis . put ( 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 . put ( arr [ right ] , vis . get ( arr [ right ] ) + 1 ) ; if ( vis . get ( arr [ right ] ) == 1 ) ++ window ; ++ right ; } if ( window == k ) ans += ( n - right + 1 ) ; vis . put ( arr [ left ] , vis . get ( arr [ left ] ) - 1 ) ; if ( vis . get ( arr [ left ] ) == 0 ) -- window ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{13,39,49,52,53,69,72,79,83,96}); param0.add(new int[]{-98,-98,22,-10,-28,0,56,72,36,88,96,22,90,74,-60,-64,0,2,-42,0,94,-82,-74}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{35,23,41,58,66,92,3,33,78,70,80,86,21,21,74,19}); param0.add(new int[]{-98,-80,-52,-10,4,76}); param0.add(new int[]{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}); param0.add(new int[]{2,7,10,17,26,36,37,85,87,88}); param0.add(new int[]{64,-2,-94,-84,-48,86}); param0.add(new int[]{0,0,0,0,0,0,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}); param0.add(new int[]{91,49,94,81,64,5,13,70,82,9,80,82}); List param1 = new ArrayList<>(); param1.add(5); param1.add(20); param1.add(26); param1.add(12); param1.add(3); param1.add(36); param1.add(8); param1.add(5); param1.add(20); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{13,39,49,52,53,69,72,79,83,96},{-98,-98,22,-10,-28,0,56,72,36,88,96,22,90,74,-60,-64,0,2,-42,0,94,-82,-74},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{35,23,41,58,66,92,3,33,78,70,80,86,21,21,74,19},{-98,-80,-52,-10,4,76},{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},{2,7,10,17,26,36,37,85,87,88},{64,-2,-94,-84,-48,86},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{91,49,94,81,64,5,13,70,82,9,80,82}}; vector param1 {5,20,26,12,3,36,8,5,20,9}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([13, 39, 49, 52, 53, 69, 72, 79, 83, 96], 5,), ([-98, -98, 22, -10, -28, 0, 56, 72, 36, 88, 96, 22, 90, 74, -60, -64, 0, 2, -42, 0, 94, -82, -74], 20,), ([0, 0, 0, 0, 0, 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,), ([35, 23, 41, 58, 66, 92, 3, 33, 78, 70, 80, 86, 21, 21, 74, 19], 12,), ([-98, -80, -52, -10, 4, 76], 3,), ([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,), ([2, 7, 10, 17, 26, 36, 37, 85, 87, 88], 8,), ([64, -2, -94, -84, -48, 86], 5,), ([0, 0, 0, 0, 0, 0, 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, 49, 94, 81, 64, 5, 13, 70, 82, 9, 80, 82], 9,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_REPETITIVE_ELEMENT_1_N_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPETITIVE_ELEMENT_1_N_1{ static int f_gold ( int [ ] arr , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += arr [ i ] ; return sum - ( ( ( n - 1 ) * n ) / 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,8,27,34,39,42,43,54,72}); param0.add(new int[]{-38,-66,-38,-48,-96,74,-32,-62,-34,-32,-88,-12,-8,-4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{52,-56,-12,78,6,32,0,36,34,-54,-74,-32}); param0.add(new int[]{0,0,0,0,0,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}); param0.add(new int[]{10,42,50,5,74,81,30,76,6,34,86,4,77,71,96,22,34,50,35,16,60,11,21,38}); List param1 = new ArrayList<>(); param1.add(5); param1.add(9); param1.add(8); param1.add(31); param1.add(28); param1.add(25); param1.add(27); param1.add(11); param1.add(15); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : return sum ( arr ) - ( ( ( n - 1 ) * n ) // 2 ) "," using namespace std; int f_gold ( int arr [ ], int n ) { return accumulate ( arr, arr + n, 0 ) - ( ( n - 1 ) * n / 2 ); } int main() { int n_success = 0; vector> param0 {{4,8,27,34,39,42,43,54,72},{-38,-66,-38,-48,-96,74,-32,-62,-34,-32,-88,-12,-8,-4},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},{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},{-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},{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},{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},{52,-56,-12,78,6,32,0,36,34,-54,-74,-32},{0,0,0,0,0,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},{10,42,50,5,74,81,30,76,6,34,86,4,77,71,96,22,34,50,35,16,60,11,21,38}}; vector param1 {5,9,8,31,28,25,27,11,15,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 8, 27, 34, 39, 42, 43, 54, 72],5,), ([-38, -66, -38, -48, -96, 74, -32, -62, -34, -32, -88, -12, -8, -4],9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],8,), ([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,), ([-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,), ([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,), ([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,), ([52, -56, -12, 78, 6, 32, 0, 36, 34, -54, -74, -32],11,), ([0, 0, 0, 0, 0, 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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS{ static 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 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(38); param0.add(39); param0.add(24); param0.add(90); param0.add(44); param0.add(49); param0.add(58); param0.add(97); param0.add(99); param0.add(19); List param1 = new ArrayList<>(); param1.add(34); param1.add(29); param1.add(99); param1.add(23); param1.add(2); param1.add(70); param1.add(84); param1.add(34); param1.add(72); param1.add(67); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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 ); } int main() { int n_success = 0; vector param0 {38,39,24,90,44,49,58,97,99,19}; vector param1 {34,29,99,23,2,70,84,34,72,67}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (38, 34,), (39, 29,), (24, 99,), (90, 23,), (44, 2,), (49, 70,), (58, 84,), (97, 34,), (99, 72,), (19, 67,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_AREA_RECTANGLE_PICKING_FOUR_SIDES_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { Set < Integer > s = new HashSet < > ( ) ; int first = 0 , second = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! s . contains ( arr [ i ] ) ) { s . add ( arr [ i ] ) ; continue ; } if ( arr [ i ] > first ) { second = first ; first = arr [ i ] ; } else if ( arr [ i ] > second ) second = arr [ i ] ; } return ( first * second ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{-64,-72,6,-62,54,14,28,60,-96,14,-32,-2,80,8,-56,68,86,64,86,-12,82}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{99,7,14,50,94,24,79,13,19,29,22,2,77,36,38,18,51,15,99,52,17,77,22,54}); param0.add(new int[]{-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}); param0.add(new int[]{1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,1}); param0.add(new int[]{98}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{6,30,47,97,20,16,68,34,1,77,48,8,22,68}); List param1 = new ArrayList<>(); param1.add(37); param1.add(12); param1.add(27); param1.add(15); param1.add(25); param1.add(12); param1.add(0); param1.add(21); param1.add(21); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) "," 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 ); } int main() { int n_success = 0; vector> param0 {{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},{-64,-72,6,-62,54,14,28,60,-96,14,-32,-2,80,8,-56,68,86,64,86,-12,82},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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},{-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},{1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,1},{98},{-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},{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},{6,30,47,97,20,16,68,34,1,77,48,8,22,68}}; vector param1 {37,12,27,15,25,12,0,21,21,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],27,), ([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,), ([-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,), ([1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1],12,), ([98],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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],21,), ([6, 30, 47, 97, 20, 16, 68, 34, 1, 77, 48, 8, 22, 68],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION{ static int f_gold ( int N , int insert , int remove , int copy ) { if ( N == 0 ) return 0 ; if ( N == 1 ) return insert ; int dp [ ] = new int [ N + 1 ] ; for ( int i = 1 ; i <= N ; i ++ ) { if ( i % 2 == 0 ) dp [ i ] = Math . min ( dp [ i - 1 ] + insert , dp [ i / 2 ] + copy ) ; else dp [ i ] = Math . min ( dp [ i - 1 ] + insert , dp [ ( i + 1 ) / 2 ] + copy + remove ) ; } return dp [ N ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(59); param0.add(66); param0.add(98); param0.add(63); param0.add(99); param0.add(45); param0.add(60); param0.add(11); param0.add(96); param0.add(54); List param1 = new ArrayList<>(); param1.add(75); param1.add(68); param1.add(55); param1.add(4); param1.add(37); param1.add(28); param1.add(53); param1.add(96); param1.add(95); param1.add(6); List param2 = new ArrayList<>(); param2.add(12); param2.add(32); param2.add(69); param2.add(41); param2.add(98); param2.add(59); param2.add(40); param2.add(50); param2.add(48); param2.add(50); List param3 = new ArrayList<>(); param3.add(45); param3.add(41); param3.add(5); param3.add(12); param3.add(55); param3.add(7); param3.add(52); param3.add(50); param3.add(84); param3.add(82); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," 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 ]; } int main() { int n_success = 0; vector param0 {59,66,98,63,99,45,60,11,96,54}; vector param1 {75,68,55,4,37,28,53,96,95,6}; vector param2 {12,32,69,41,98,59,40,50,48,50}; vector param3 {45,41,5,12,55,7,52,50,84,82}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (59,75,12,45,), (66,68,32,41,), (98,55,69,5,), (63,4,41,12,), (99,37,98,55,), (45,28,59,7,), (60,53,40,52,), (11,96,50,50,), (96,95,48,84,), (54,6,50,82,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POSSIBLE_FORM_TRIANGLE_ARRAY_VALUES{ static boolean f_gold ( int [ ] arr , int N ) { if ( N < 3 ) return false ; Arrays . sort ( arr ) ; for ( int i = 0 ; i < N - 2 ; i ++ ) if ( arr [ i ] + arr [ i + 1 ] > arr [ i + 2 ] ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{50,-58,-44,90,18,-26,-74,-46,96,32,72,46,-90,86,-10,82,-72,86,-64,-96,-12,-14,-36,16,38,56,54,10,74,-86,-64,-56,30,-50,46,4,88,-94,-4,-78,22,-78}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{80,24,41,90,24,95}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,1,1,0,0}); param0.add(new int[]{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}); param0.add(new int[]{-60,-90,-30,-42,80,-66,94,60,-68,-74,-50,42,-38,-34,-84,-58,30,98,-52,6,-60,-60}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{24,80,16,31,5,31,66,1,13,77,88,40,34,15,90,46,8,26,39,52,22,33,3,30,49,51,69,50,39,59}); List param1 = new ArrayList<>(); param1.add(25); param1.add(23); param1.add(10); param1.add(4); param1.add(21); param1.add(25); param1.add(19); param1.add(11); param1.add(18); param1.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{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},{50,-58,-44,90,18,-26,-74,-46,96,32,72,46,-90,86,-10,82,-72,86,-64,-96,-12,-14,-36,16,38,56,54,10,74,-86,-64,-56,30,-50,46,4,88,-94,-4,-78,22,-78},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{80,24,41,90,24,95},{-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},{0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,1,1,0,0},{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},{-60,-90,-30,-42,80,-66,94,60,-68,-74,-50,42,-38,-34,-84,-58,30,98,-52,6,-60,-60},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{24,80,16,31,5,31,66,1,13,77,88,40,34,15,90,46,8,26,39,52,22,33,3,30,49,51,69,50,39,59}}; vector param1 {25,23,10,4,21,25,19,11,18,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([50, -58, -44, 90, 18, -26, -74, -46, 96, 32, 72, 46, -90, 86, -10, 82, -72, 86, -64, -96, -12, -14, -36, 16, 38, 56, 54, 10, 74, -86, -64, -56, 30, -50, 46, 4, 88, -94, -4, -78, 22, -78],23,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],10,), ([80, 24, 41, 90, 24, 95],4,), ([-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,), ([0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0],25,), ([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,), ([-60, -90, -30, -42, 80, -66, 94, 60, -68, -74, -50, 42, -38, -34, -84, -58, 30, 98, -52, 6, -60, -60],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],18,), ([24, 80, 16, 31, 5, 31, 66, 1, 13, 77, 88, 40, 34, 15, 90, 46, 8, 26, 39, 52, 22, 33, 3, 30, 49, 51, 69, 50, 39, 59],23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", GOOGLE_CASE_GIVEN_SENTENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GOOGLE_CASE_GIVEN_SENTENCE{ static String f_gold ( String s ) { int n = s . length ( ) ; String s1 = """" ; s1 = s1 + Character . toLowerCase ( s . charAt ( 0 ) ) ; for ( int i = 1 ; i < n ; i ++ ) { if ( s . charAt ( i ) == ' ' && i < n ) { s1 = s1 + "" "" + Character . toLowerCase ( s . charAt ( i + 1 ) ) ; i ++ ; } else s1 = s1 + Character . toUpperCase ( s . charAt ( i ) ) ; } return s1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""TEYndweqZA""); param0.add(""01865""); param0.add(""11001100""); param0.add(""CzwznJmQet""); param0.add(""318305446""); param0.add(""0000001111110""); param0.add(""yzT""); param0.add(""38630230""); param0.add(""01101""); param0.add(""zoizI""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {""TEYndweqZA"",""01865"",""11001100"",""CzwznJmQet"",""318305446"",""0000001111110"",""yzT"",""38630230"",""01101"",""zoizI""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('TEYndweqZA',), ('01865',), ('11001100',), ('CzwznJmQet',), ('318305446',), ('0000001111110',), ('yzT',), ('38630230',), ('01101',), ('zoizI',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", PROGRAM_BINARY_DECIMAL_CONVERSION_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_BINARY_DECIMAL_CONVERSION_1{ static 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 . charAt ( i ) == '1' ) dec_value += base ; base = base * 2 ; } return dec_value ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""uEmIAgF""); param0.add(""753310137""); param0.add(""010011010""); param0.add(""kNi""); param0.add(""04562016903312""); param0.add(""000111101""); param0.add(""bk""); param0.add(""9""); param0.add(""1""); param0.add(""XxT nXLlk""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," 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; } int main() { int n_success = 0; vector param0 {""uEmIAgF"",""753310137"",""010011010"",""kNi"",""04562016903312"",""000111101"",""bk"",""9"",""1"",""XxT nXLlk""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('uEmIAgF',), ('753310137',), ('010011010',), ('kNi',), ('04562016903312',), ('000111101',), ('bk',), ('9',), ('1',), ('XxT nXLlk',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_COST_MAKE_ARRAY_SIZE_1_REMOVING_LARGER_PAIRS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_COST_MAKE_ARRAY_SIZE_1_REMOVING_LARGER_PAIRS{ static int f_gold ( int [ ] a , int n ) { int min = a [ 0 ] ; for ( int i = 1 ; i < a . length ; i ++ ) { if ( a [ i ] < min ) min = a [ i ] ; } return ( n - 1 ) * min ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{-6,10}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{65,32,66,82,86,98,15,33,57,3,73,45,90,82,33,99,44,76,50,89,5,7,64}); List param1 = new ArrayList<>(); param1.add(25); param1.add(1); param1.add(15); param1.add(23); param1.add(26); param1.add(39); param1.add(28); param1.add(19); param1.add(5); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : return ( ( n - 1 ) * min ( a ) ) "," using namespace std; int f_gold ( int a [ ], int n ) { return ( n - 1 ) * ( * min_element ( a, a + n ) ); } int main() { int n_success = 0; vector> param0 {{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},{-6,10},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{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},{-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},{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},{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},{-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},{0,0,0,0,1,1,1,1,1,1},{65,32,66,82,86,98,15,33,57,3,73,45,90,82,33,99,44,76,50,89,5,7,64}}; vector param1 {25,1,15,23,26,39,28,19,5,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-6, 10],1,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,), ([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,), ([-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,), ([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,), ([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,), ([-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,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1],5,), ([65, 32, 66, 82, 86, 98, 15, 33, 57, 3, 73, 45, 90, 82, 33, 99, 44, 76, 50, 89, 5, 7, 64],22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MULTIPLY_LARGE_INTEGERS_UNDER_LARGE_MODULO," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_LARGE_INTEGERS_UNDER_LARGE_MODULO{ static long f_gold ( long a , long b , long mod ) { long res = 0 ; a %= mod ; while ( b > 0 ) { if ( ( b & 1 ) > 0 ) { res = ( res + a ) % mod ; } a = ( 2 * a ) % mod ; b >>= 1 ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(60L); param0.add(46L); param0.add(4L); param0.add(67L); param0.add(93L); param0.add(89L); param0.add(8L); param0.add(53L); param0.add(96L); param0.add(38L); List param1 = new ArrayList<>(); param1.add(24L); param1.add(43L); param1.add(50L); param1.add(1L); param1.add(35L); param1.add(97L); param1.add(78L); param1.add(73L); param1.add(92L); param1.add(64L); List param2 = new ArrayList<>(); param2.add(58L); param2.add(29L); param2.add(71L); param2.add(66L); param2.add(73L); param2.add(8L); param2.add(55L); param2.add(22L); param2.add(83L); param2.add(83L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," 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; } int main() { int n_success = 0; vector param0 {60,46,4,67,93,89,8,53,96,38}; vector param1 {24,43,50,1,35,97,78,73,92,64}; vector param2 {58,29,71,66,73,8,55,22,83,83}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (60,24,58,), (46,43,29,), (4,50,71,), (67,1,66,), (93,35,73,), (89,97,8,), (8,78,55,), (53,73,22,), (96,92,83,), (38,64,83,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_DAYS_TANK_WILL_BECOME_EMPTY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_DAYS_TANK_WILL_BECOME_EMPTY{ static int f_gold ( int C , int l ) { if ( l >= C ) return C ; double eq_root = ( Math . sqrt ( 1 + 8 * ( C - l ) ) - 1 ) / 2 ; return ( int ) ( Math . ceil ( eq_root ) + l ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(91); param0.add(99); param0.add(11); param0.add(23); param0.add(12); param0.add(1); param0.add(18); param0.add(14); param0.add(13); param0.add(36); List param1 = new ArrayList<>(); param1.add(29); param1.add(55); param1.add(56); param1.add(56); param1.add(97); param1.add(64); param1.add(5); param1.add(37); param1.add(55); param1.add(99); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {91,99,11,23,12,1,18,14,13,36}; vector param1 {29,55,56,56,97,64,5,37,55,99}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (91,29,), (99,55,), (11,56,), (23,56,), (12,97,), (1,64,), (18,5,), (14,37,), (13,55,), (36,99,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FOR_DEADLOCK_FREE_CONDITION_IN_OPERATING_SYSTEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FOR_DEADLOCK_FREE_CONDITION_IN_OPERATING_SYSTEM{ static int f_gold ( int process , int need ) { int minResources = 0 ; minResources = process * ( need - 1 ) + 1 ; return minResources ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(38); param0.add(82); param0.add(2); param0.add(38); param0.add(31); param0.add(80); param0.add(11); param0.add(2); param0.add(26); param0.add(37); List param1 = new ArrayList<>(); param1.add(37); param1.add(3); param1.add(26); param1.add(72); param1.add(85); param1.add(73); param1.add(9); param1.add(31); param1.add(59); param1.add(67); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( process , need ) : minResources = 0 minResources = process * ( need - 1 ) + 1 return minResources "," using namespace std; int f_gold ( int process, int need ) { int minResources = 0; minResources = process * ( need - 1 ) + 1; return minResources; } int main() { int n_success = 0; vector param0 {38,82,2,38,31,80,11,2,26,37}; vector param1 {37,3,26,72,85,73,9,31,59,67}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (38,37,), (82,3,), (2,26,), (38,72,), (31,85,), (80,73,), (11,9,), (2,31,), (26,59,), (37,67,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_SUBARRAY_COUNT_1S_ONE_COUNT_0S," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_SUBARRAY_COUNT_1S_ONE_COUNT_0S{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ; 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 . containsKey ( sum ) ) um . put ( sum , i ) ; if ( um . containsKey ( sum - 1 ) ) { if ( maxLen < ( i - um . get ( sum - 1 ) ) ) maxLen = i - um . get ( sum - 1 ) ; } } return maxLen ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,10,31,35}); param0.add(new int[]{4,88,-72,28,-54,32,-34}); param0.add(new int[]{0,0,0,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-82,-58,-50,-30,-14,-4,-2,-2,0,22,36,58,70,80,80,82,84,90}); param0.add(new int[]{1,0,1,0,0,1,1,1,0,0,1}); param0.add(new int[]{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}); param0.add(new int[]{-4,-60,-78,-50,64,18,0,76,12,86,-22}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{4,39,50,37,71,66,55,34,1,41,34,99,69,31}); List param1 = new ArrayList<>(); param1.add(2); param1.add(6); param1.add(4); param1.add(26); param1.add(14); param1.add(7); param1.add(29); param1.add(7); param1.add(17); param1.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{6,10,31,35},{4,88,-72,28,-54,32,-34},{0,0,0,1,1,1,1,1,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},{-82,-58,-50,-30,-14,-4,-2,-2,0,22,36,58,70,80,80,82,84,90},{1,0,1,0,0,1,1,1,0,0,1},{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},{-4,-60,-78,-50,64,18,0,76,12,86,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{4,39,50,37,71,66,55,34,1,41,34,99,69,31}}; vector param1 {2,6,4,26,14,7,29,7,17,11}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 10, 31, 35],2,), ([4, 88, -72, 28, -54, 32, -34],6,), ([0, 0, 0, 1, 1, 1, 1, 1, 1],4,), ([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,), ([-82, -58, -50, -30, -14, -4, -2, -2, 0, 22, 36, 58, 70, 80, 80, 82, 84, 90],14,), ([1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1],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,), ([-4, -60, -78, -50, 64, 18, 0, 76, 12, 86, -22],7,), ([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,), ([4, 39, 50, 37, 71, 66, 55, 34, 1, 41, 34, 99, 69, 31],11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NEXT_POWER_OF_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NEXT_POWER_OF_2{ static int f_gold ( int n ) { int count = 0 ; if ( n > 0 && ( n & ( n - 1 ) ) == 0 ) return n ; while ( n != 0 ) { n >>= 1 ; count += 1 ; } return 1 << count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(74); param0.add(70); param0.add(85); param0.add(78); param0.add(71); param0.add(32); param0.add(97); param0.add(90); param0.add(64); param0.add(48); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," 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; } int main() { int n_success = 0; vector param0 {74,70,85,78,71,32,97,90,64,48}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (74,), (70,), (85,), (78,), (71,), (32,), (97,), (90,), (64,), (48,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING{ static int f_gold ( String str ) { int res = str . charAt ( 0 ) - '0' ; for ( int i = 1 ; i < str . length ( ) ; i ++ ) { if ( str . charAt ( i ) == '0' || str . charAt ( i ) == '1' || res < 2 ) res += ( str . charAt ( i ) - '0' ) ; else res *= ( str . charAt ( i ) - '0' ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""pR""); param0.add(""9518""); param0.add(""1""); param0.add(""nNMCIXUCpRMmvO""); param0.add(""3170487""); param0.add(""0100101010""); param0.add(""Z rONcUqWb""); param0.add(""00419297""); param0.add(""00""); param0.add(""r""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {""pR"",""9518"",""1"",""nNMCIXUCpRMmvO"",""3170487"",""0100101010"",""Z rONcUqWb"",""00419297"",""00"",""r""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('pR',), ('9518',), ('1',), ('nNMCIXUCpRMmvO',), ('3170487',), ('0100101010',), ('Z rONcUqWb',), ('00419297',), ('00',), ('r',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CHECK_ISBN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CHECK_ISBN{ static boolean 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 . charAt ( i ) - '0' ; if ( 0 > digit || 9 < digit ) return false ; sum += ( digit * ( 10 - i ) ) ; } char last = isbn . charAt ( 9 ) ; if ( last != 'X' && ( last < '0' || last > '9' ) ) return false ; sum += ( ( last == 'X' ) ? 10 : ( last - '0' ) ) ; return ( sum % 11 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""007462542X""); param0.add(""0112112425""); param0.add(""0545010225""); param0.add(""0552527408""); param0.add(""424519151311""); param0.add(""101011""); param0.add(""9780552527408""); param0.add(""2290344397""); param0.add(""1473226406""); param0.add(""DDdguSGiRr""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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 ); } int main() { int n_success = 0; vector param0 {""007462542X"",""0112112425"",""0545010225"",""0552527408"",""424519151311"",""101011"",""9780552527408"",""2290344397"",""1473226406"",""DDdguSGiRr""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { int result = 0 ; HashSet < Integer > Hash = new HashSet < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { Hash . add ( 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 . contains ( product ) ) { result ++ ; } } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,10,17,17,18,20,27,28,29,29,31,32,41,43,45,46,63,66,69,69,70,75,87,95}); param0.add(new int[]{-60}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{52,83,36,57,93,11,32,91,52}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{14,36,-54,-54}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{5,69,37,80,21,98,70,70,74,95,6,67,44,55,52,89,84,99,65,52}); List param1 = new ArrayList<>(); param1.add(17); param1.add(0); param1.add(9); param1.add(8); param1.add(22); param1.add(42); param1.add(35); param1.add(3); param1.add(12); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{7,10,17,17,18,20,27,28,29,29,31,32,41,43,45,46,63,66,69,69,70,75,87,95},{-60},{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{52,83,36,57,93,11,32,91,52},{-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},{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},{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},{14,36,-54,-54},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},{5,69,37,80,21,98,70,70,74,95,6,67,44,55,52,89,84,99,65,52}}; vector param1 {17,0,9,8,22,42,35,3,12,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-60],0,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],9,), ([52, 83, 36, 57, 93, 11, 32, 91, 52],8,), ([-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,), ([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,), ([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,), ([14, 36, -54, -54],3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],12,), ([5, 69, 37, 80, 21, 98, 70, 70, 74, 95, 6, 67, 44, 55, 52, 89, 84, 99, 65, 52],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { int invcount = 0 ; for ( int i = 0 ; 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,75,89}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,1,1,1,1,1}); param0.add(new int[]{18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68}); param0.add(new int[]{-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}); param0.add(new int[]{0,1,1,0,0,0,0,0,1,0,0}); param0.add(new int[]{4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93}); param0.add(new int[]{80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58}); List param1 = new ArrayList<>(); param1.add(1); param1.add(26); param1.add(7); param1.add(17); param1.add(34); param1.add(9); param1.add(19); param1.add(10); param1.add(7); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{4,75,89},{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},{0,0,0,1,1,1,1,1},{18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68},{-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},{0,1,1,0,0,0,0,0,1,0,0},{4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93},{80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58}}; vector param1 {1,26,7,17,34,9,19,10,7,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 75, 89],1,), ([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,), ([0, 0, 0, 1, 1, 1, 1, 1],7,), ([18, 7, 43, 57, 94, 37, 38, 41, 59, 64, 97, 29, 51, 37, 64, 91, 42, 83, 13, 22, 68],17,), ([-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, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0],9,), ([4, 8, 15, 19, 24, 31, 33, 36, 38, 45, 45, 52, 54, 65, 73, 75, 83, 84, 90, 92, 93],19,), ([80, -30, -44, 76, -96, 2, 22, -30, 36, -6, 88, -60, -90, -52, 78, 90, -52],10,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],7,), ([74, 71, 28, 45, 14, 31, 17, 10, 82, 27, 45, 73, 93, 87, 57, 58],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_INDEX_0_REPLACED_1_GET_LONGEST_CONTINUOUS_SEQUENCE_1S_BINARY_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_0_REPLACED_1_GET_LONGEST_CONTINUOUS_SEQUENCE_1S_BINARY_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int max_count = 0 ; int max_index = 0 ; int prev_zero = - 1 ; int prev_prev_zero = - 1 ; for ( int curr = 0 ; curr < n ; ++ curr ) { 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{70,83,9,51,11,81,27,26,37,46}); param0.add(new int[]{50,88}); param0.add(new int[]{0,1,0,1,1,1,0,0,0,1,1,0,1}); param0.add(new int[]{96}); param0.add(new int[]{18,78,14,60,-12,-86,32,74,74,96,58,28,-42,28,-18,-58,-82,-58,22,6,2,-6,-4,-98}); param0.add(new int[]{0,0,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}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(36); param1.add(20); param1.add(39); param1.add(7); param1.add(1); param1.add(6); param1.add(0); param1.add(21); param1.add(19); param1.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ",,," if __name__ == '__main__': param = [ ([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,), ([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,), ([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,), ([70, 83, 9, 51, 11, 81, 27, 26, 37, 46],7,), ([50, 88],1,), ([0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1],6,), ([96],0,), ([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,), ([0, 0, 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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE{ public static int f_gold ( int arr [ ] , int n ) { int [ ] lioes = new int [ 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,1,1,1}); param0.add(new int[]{15,19,87,44,15,48,21,85,90,30,88,95,48,92,29,52,46,46,7,23,96,97,43}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{6,7,19,36,44,63,68,72,83}); param0.add(new int[]{-64,12,56,50,94,6,0,70,-70,46,-84,-64,4,76,28,94,-8,24,76,64,-62,-34}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{71,57,20,8,90,69,15,62,45,14,65,20,48,9}); List param1 = new ArrayList<>(); param1.add(32); param1.add(25); param1.add(4); param1.add(19); param1.add(33); param1.add(13); param1.add(8); param1.add(15); param1.add(21); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{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},{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},{0,0,0,0,1,1,1},{15,19,87,44,15,48,21,85,90,30,88,95,48,92,29,52,46,46,7,23,96,97,43},{-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},{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},{6,7,19,36,44,63,68,72,83},{-64,12,56,50,94,6,0,70,-70,46,-84,-64,4,76,28,94,-8,24,76,64,-62,-34},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{71,57,20,8,90,69,15,62,45,14,65,20,48,9}}; vector param1 {32,25,4,19,33,13,8,15,21,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 0, 0, 0, 1, 1, 1],4,), ([15, 19, 87, 44, 15, 48, 21, 85, 90, 30, 88, 95, 48, 92, 29, 52, 46, 46, 7, 23, 96, 97, 43],19,), ([-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,), ([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,), ([6, 7, 19, 36, 44, 63, 68, 72, 83],8,), ([-64, 12, 56, 50, 94, 6, 0, 70, -70, 46, -84, -64, 4, 76, 28, 94, -8, 24, 76, 64, -62, -34],15,), ([0, 0, 0, 0, 0, 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,), ([71, 57, 20, 8, 90, 69, 15, 62, 45, 14, 65, 20, 48, 9],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BIN_PACKING_PROBLEM_MINIMIZE_NUMBER_OF_USED_BINS{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,12,14,16,19,24,29,31,33,34,41,43,47,53,53,59,64,70,70,71,72,73,74,80,81,89,90}); param0.add(new int[]{-88,-26,70,-92,96,84,-24,-18,84,62,-72,42,72,2,30,86}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{51,7,6,24,19,83,9,36,40,93,24,48,63,69,53,54,42,45,90,14,29,6,7,37,53,18,87,38,59,1,68,44,47,35,87,91,60,90,52,8,80,41,3,96}); param0.add(new int[]{-98,-90,-78,-48,-36,-20,2,8,16,40,54,54,60,92}); param0.add(new int[]{1,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0}); param0.add(new int[]{8,14,16,35,40,45,54,57,58,59,87,88,93,95,97}); param0.add(new int[]{-46,-6,60,-88,10,94,-12,-64,-68,-76,-60,-10,28,18,86,88,80,-56,94,-6,-42,72,-10,54,-82,-52,-70,-28,-74,82,-12,42,44,56,52,-28,22,62,-20}); param0.add(new int[]{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}); param0.add(new int[]{48,57,21,82,99}); List param1 = new ArrayList<>(); param1.add(21); param1.add(11); param1.add(27); param1.add(26); param1.add(11); param1.add(32); param1.add(11); param1.add(19); param1.add(26); param1.add(4); List param2 = new ArrayList<>(); param2.add(16); param2.add(14); param2.add(23); param2.add(41); param2.add(7); param2.add(28); param2.add(12); param2.add(38); param2.add(23); param2.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector> param0 {{6,12,14,16,19,24,29,31,33,34,41,43,47,53,53,59,64,70,70,71,72,73,74,80,81,89,90},{-88,-26,70,-92,96,84,-24,-18,84,62,-72,42,72,2,30,86},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{51,7,6,24,19,83,9,36,40,93,24,48,63,69,53,54,42,45,90,14,29,6,7,37,53,18,87,38,59,1,68,44,47,35,87,91,60,90,52,8,80,41,3,96},{-98,-90,-78,-48,-36,-20,2,8,16,40,54,54,60,92},{1,1,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0},{8,14,16,35,40,45,54,57,58,59,87,88,93,95,97},{-46,-6,60,-88,10,94,-12,-64,-68,-76,-60,-10,28,18,86,88,80,-56,94,-6,-42,72,-10,54,-82,-52,-70,-28,-74,82,-12,42,44,56,52,-28,22,62,-20},{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},{48,57,21,82,99}}; vector param1 {21,11,27,26,11,32,11,19,26,4}; vector param2 {16,14,23,41,7,28,12,38,23,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, PROGRAM_BINARY_DECIMAL_CONVERSION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_BINARY_DECIMAL_CONVERSION{ static int f_gold ( int n ) { int num = n ; int dec_value = 0 ; int base = 1 ; int temp = num ; while ( temp > 0 ) { int last_digit = temp % 10 ; temp = temp / 10 ; dec_value += last_digit * base ; base = base * 2 ; } return dec_value ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(70); param0.add(95); param0.add(41); param0.add(97); param0.add(8); param0.add(16); param0.add(41); param0.add(57); param0.add(81); param0.add(78); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," 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; } int main() { int n_success = 0; vector param0 {70,95,41,97,8,16,41,57,81,78}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (70,), (95,), (41,), (97,), (8,), (16,), (41,), (57,), (81,), (78,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NATURAL_NUMBERS_WHOSE_PERMUTATION_GREATER_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NATURAL_NUMBERS_WHOSE_PERMUTATION_GREATER_NUMBER{ static int f_gold ( int n ) { int result = 0 ; for ( int i = 1 ; i <= 9 ; i ++ ) { Stack < Integer > s = new Stack < > ( ) ; if ( i <= n ) { s . push ( i ) ; result ++ ; } while ( ! s . empty ( ) ) { int tp = s . peek ( ) ; s . pop ( ) ; for ( int j = tp % 10 ; j <= 9 ; j ++ ) { int x = tp * 10 + j ; if ( x <= n ) { s . push ( x ) ; result ++ ; } } } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(69); param0.add(72); param0.add(88); param0.add(7); param0.add(66); param0.add(34); param0.add(23); param0.add(37); param0.add(33); param0.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {69,72,88,7,66,34,23,37,33,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (69,), (72,), (88,), (7,), (66,), (34,), (23,), (37,), (33,), (21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_ROTATIONS_UNLOCK_CIRCULAR_LOCK{ static int f_gold ( int input , int unlock_code ) { int rotation = 0 ; int input_digit , code_digit ; while ( input > 0 || unlock_code > 0 ) { input_digit = input % 10 ; code_digit = unlock_code % 10 ; rotation += Math . min ( Math . abs ( input_digit - code_digit ) , 10 - Math . abs ( input_digit - code_digit ) ) ; input /= 10 ; unlock_code /= 10 ; } return rotation ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(71); param0.add(90); param0.add(28); param0.add(41); param0.add(32); param0.add(39); param0.add(33); param0.add(89); param0.add(50); param0.add(92); List param1 = new ArrayList<>(); param1.add(46); param1.add(65); param1.add(84); param1.add(23); param1.add(58); param1.add(82); param1.add(58); param1.add(32); param1.add(51); param1.add(77); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," 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; } int main() { int n_success = 0; vector param0 {71,90,28,41,32,39,33,89,50,92}; vector param1 {46,65,84,23,58,82,58,32,51,77}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (71,46,), (90,65,), (28,84,), (41,23,), (32,58,), (39,82,), (33,58,), (89,32,), (50,51,), (92,77,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_MISSING_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_MISSING_NUMBER_1{ static int f_gold ( int a [ ] , int n ) { int total = 1 ; for ( int i = 2 ; i <= ( n + 1 ) ; i ++ ) { total += i ; total -= a [ i - 2 ] ; } return total ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{13,27,46,59,62,82,92}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{73,76,25,59,40,85,90,38,13,97,93,99,45,7}); List param1 = new ArrayList<>(); param1.add(6); param1.add(38); param1.add(15); param1.add(22); param1.add(18); param1.add(25); param1.add(24); param1.add(12); param1.add(29); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : i , total = 0 , 1 for i in range ( 2 , n + 2 ) : total += i total -= a [ i - 2 ] return total "," 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; } int main() { int n_success = 0; vector> param0 {{13,27,46,59,62,82,92},{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},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{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},{-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},{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},{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},{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},{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},{73,76,25,59,40,85,90,38,13,97,93,99,45,7}}; vector param1 {6,38,15,22,18,25,24,12,29,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([13, 27, 46, 59, 62, 82, 92],6,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,), ([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,), ([-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,), ([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,), ([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,), ([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,), ([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,), ([73, 76, 25, 59, 40, 85, 90, 38, 13, 97, 93, 99, 45, 7],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LOWER_INSERTION_POINT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LOWER_INSERTION_POINT{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{-76,80,-6,-2,50,72,84,-56,70,8,48,6,-24,-50,-72}); param0.add(new int[]{0,0,0,0,0,1,1,1,1}); param0.add(new int[]{74,65,84,71}); param0.add(new int[]{-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}); param0.add(new int[]{1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,0,0,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,1,1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(17); param1.add(14); param1.add(8); param1.add(2); param1.add(19); param1.add(12); param1.add(31); param1.add(22); param1.add(3); param1.add(19); List param2 = new ArrayList<>(); param2.add(29); param2.add(9); param2.add(4); param2.add(3); param2.add(19); param2.add(17); param2.add(24); param2.add(16); param2.add(5); param2.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{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},{-76,80,-6,-2,50,72,84,-56,70,8,48,6,-24,-50,-72},{0,0,0,0,0,1,1,1,1},{74,65,84,71},{-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},{1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,0,0,1,1,1,1},{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},{-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},{0,0,0,1,1,1,1},{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}}; vector param1 {17,14,8,2,19,12,31,22,3,19}; vector param2 {29,9,4,3,19,17,24,16,5,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-76, 80, -6, -2, 50, 72, 84, -56, 70, 8, 48, 6, -24, -50, -72],14,9,), ([0, 0, 0, 0, 0, 1, 1, 1, 1],8,4,), ([74, 65, 84, 71],2,3,), ([-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,), ([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,), ([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,), ([-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,), ([0, 0, 0, 1, 1, 1, 1],3,5,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX_1{ static int f_gold ( int M [ ] [ ] , int n , int m ) { int count = 0 ; int i = 0 ; int j = m - 1 ; while ( j >= 0 && i < n ) { if ( M [ i ] [ j ] < 0 ) { count += j + 1 ; i += 1 ; } else j -= 1 ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{17,56},new int[]{68,34}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{96,91,61,55},new int[]{60,18,48,25},new int[]{94,72,84,54},new int[]{10,62,23,79}}); param0.add(new int[][]{new int[]{68,61,12,7,49,65,57,32,57,95,64,17,77,59},new int[]{38,7,47,21,69,36,79,82,23,27,76,37,43,52},new int[]{37,95,8,88,57,73,4,52,75,99,7,55,78,23},new int[]{45,1,5,89,89,71,96,27,86,75,49,30,91,78},new int[]{90,64,33,88,19,95,21,5,74,90,65,86,8,53},new int[]{96,14,83,29,23,39,48,68,97,68,97,60,19,66},new int[]{92,85,40,36,18,94,53,75,6,72,63,98,1,87},new int[]{31,50,24,38,46,2,24,76,34,76,45,59,90,90},new int[]{65,98,95,65,4,82,85,58,1,68,69,73,3,10},new int[]{39,44,93,64,97,19,21,52,70,73,19,85,83,96},new int[]{49,48,54,77,37,82,64,93,13,76,14,4,14,57},new int[]{67,85,12,23,33,66,19,41,19,2,30,95,84,7},new int[]{35,38,97,53,61,25,80,94,77,49,86,6,12,71},new int[]{39,32,7,19,13,24,26,48,79,47,13,2,48,7}}); param0.add(new int[][]{new int[]{52,24,47,92,56,78,13,64,21,58},new int[]{97,6,75,14,88,68,7,23,39,50},new int[]{17,67,52,78,74,63,61,47,65,66},new int[]{45,47,94,50,82,16,11,94,83,61},new int[]{91,81,3,52,62,85,27,82,83,58},new int[]{90,5,40,91,76,16,88,65,94,47},new int[]{63,83,38,72,5,18,89,42,39,14},new int[]{23,18,89,8,80,67,23,35,69,14},new int[]{83,83,45,73,40,8,26,90,27,38},new int[]{36,11,82,87,50,1,24,90,52,78}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{45,38,43,11,2,77,3,59,58,22,6,65,13,43,52,15},new int[]{69,16,25,44,58,94,54,33,96,27,86,41,25,86,66,95},new int[]{59,30,24,88,58,3,79,72,44,79,74,38,88,50,67,63},new int[]{77,66,59,16,29,18,24,81,6,78,40,14,23,20,86,90},new int[]{54,62,50,48,35,34,91,85,64,72,50,41,27,83,70,30},new int[]{78,37,23,81,90,53,11,37,80,30,45,86,9,7,6,14},new int[]{75,66,60,75,3,95,96,17,49,70,85,94,90,17,48,13},new int[]{8,50,36,13,18,84,71,19,77,3,97,76,35,1,9,5},new int[]{7,7,26,74,17,90,16,84,96,49,25,45,33,65,73,19},new int[]{85,24,39,8,23,16,31,84,43,16,92,73,2,72,69,58},new int[]{7,72,1,48,82,42,84,66,11,35,70,72,80,47,71,46},new int[]{92,19,1,42,4,55,31,93,38,92,22,87,40,35,10,58},new int[]{28,30,44,35,39,15,99,79,2,52,67,96,41,34,68,88},new int[]{41,84,68,59,71,64,79,76,52,26,16,25,89,11,39,97},new int[]{76,74,93,51,9,19,66,31,38,44,41,77,61,85,72,60},new int[]{18,97,93,70,18,8,55,92,63,45,19,53,78,37,76,32}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); List param1 = new ArrayList<>(); param1.add(27); param1.add(1); param1.add(35); param1.add(3); param1.add(13); param1.add(8); param1.add(18); param1.add(11); param1.add(16); param1.add(27); List param2 = new ArrayList<>(); param2.add(27); param2.add(1); param2.add(28); param2.add(2); param2.add(13); param2.add(8); param2.add(15); param2.add(11); param2.add(15); param2.add(25); for(int i =0; i < param0.size(); ++i ){ for(int j =0; j < param0.get(i).length; ++j ){ Arrays.sort(param0.get(i)[j]); for(int k =0; k < param0.get(i)[j].length; ++k){ param0.get(i)[j][k]-=50; } } } for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ",,," if __name__ == '__main__': param = [ ([[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,), ([[17, 56], [68, 34]],1,1,), ([[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,), ([[96, 91, 61, 55], [60, 18, 48, 25], [94, 72, 84, 54], [10, 62, 23, 79]],3,2,), ([[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,), ([[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,), ([[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,), ([[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,), ([[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,), ([[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,) ] for i, p_set in enumerate(param): param[i] = list(param[i]) param[i][0] = [[e - 50 for e in sorted(l)] for l in p_set[0]] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUBARRAYS_EQUAL_NUMBER_1S_0S{ static int f_gold ( int arr [ ] , int n ) { Map < Integer , Integer > um = new HashMap < > ( ) ; int curr_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { curr_sum += ( arr [ i ] == 0 ) ? - 1 : arr [ i ] ; um . put ( curr_sum , um . get ( curr_sum ) == null ? 1 : um . get ( curr_sum ) + 1 ) ; } int count = 0 ; for ( Map . Entry < Integer , Integer > itr : um . entrySet ( ) ) { if ( itr . getValue ( ) > 1 ) count += ( ( itr . getValue ( ) * ( itr . getValue ( ) - 1 ) ) / 2 ) ; } if ( um . containsKey ( 0 ) ) count += um . get ( 0 ) ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-98,-62,-60,16,78,82}); param0.add(new int[]{1,0,1}); param0.add(new int[]{2,31,34,64}); param0.add(new int[]{-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}); param0.add(new int[]{1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(24); param1.add(24); param1.add(11); param1.add(40); param1.add(5); param1.add(2); param1.add(2); param1.add(25); param1.add(1); param1.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) "," 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; } int main() { int n_success = 0; vector> param0 {{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},{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},{0,0,0,0,0,0,0,0,1,1,1,1,1,1},{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},{-98,-62,-60,16,78,82},{1,0,1},{2,31,34,64},{-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},{1,1,1},{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}}; vector param1 {24,24,11,40,5,2,2,25,1,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],11,), ([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,), ([-98, -62, -60, 16, 78, 82],5,), ([1, 0, 1],2,), ([2, 31, 34, 64],2,), ([-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,), ([1, 1, 1],1,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(5); param0.add(19); param0.add(7); param0.add(94); param0.add(58); param0.add(65); param0.add(69); param0.add(96); param0.add(80); param0.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {5,19,7,94,58,65,69,96,80,14}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (5,), (19,), (7,), (94,), (58,), (65,), (69,), (96,), (80,), (14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POSITIVE_ELEMENTS_EVEN_NEGATIVE_ODD_POSITIONS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class POSITIVE_ELEMENTS_EVEN_NEGATIVE_ODD_POSITIONS{ static void f_gold ( int a [ ] , int size ) { int positive = 0 , negative = 1 , temp ; while ( true ) { while ( positive < size && a [ positive ] >= 0 ) positive += 2 ; while ( negative < size && a [ negative ] <= 0 ) negative += 2 ; if ( positive < size && negative < size ) { temp = a [ positive ] ; a [ positive ] = a [ negative ] ; a [ negative ] = temp ; } else break ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93}); param0.add(new int[]{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97}); param0.add(new int[]{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}); param0.add(new int[]{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94}); param0.add(new int[]{-98,-94,-7,-3,1,11,11,83,88}); param0.add(new int[]{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}); param0.add(new int[]{8,35,37,38,39,46,49,54}); param0.add(new int[]{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1}); param0.add(new int[]{62,36,39,53,90,78,56,1,56,4,30}); List param1 = new ArrayList<>(); param1.add(15); param1.add(15); param1.add(40); param1.add(10); param1.add(7); param1.add(35); param1.add(6); param1.add(21); param1.add(5); param1.add(8); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93}); filled_function_param0.add(new int[]{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94}); filled_function_param0.add(new int[]{-98,-94,-7,-3,1,11,11,83,88}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{8,35,37,38,39,46,49,54}); filled_function_param0.add(new int[]{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,1,1}); filled_function_param0.add(new int[]{62,36,39,53,90,78,56,1,56,4,30}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(15); filled_function_param1.add(15); filled_function_param1.add(40); filled_function_param1.add(10); filled_function_param1.add(7); filled_function_param1.add(35); filled_function_param1.add(6); filled_function_param1.add(21); filled_function_param1.add(5); filled_function_param1.add(8); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } } int main() { int n_success = 0; vector> param0 {{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93},{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97},{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},{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94},{-98,-94,-7,-3,1,11,11,83,88},{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},{8,35,37,38,39,46,49,54},{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54},{0,0,0,0,0,0,0,0,1,1},{62,36,39,53,90,78,56,1,56,4,30}}; vector param1 {15,15,40,10,7,35,6,21,5,8}; vector> filled_function_param0 {{8,11,18,23,24,28,28,34,35,42,44,53,57,65,71,72,76,78,82,82,85,86,92,93},{0,-95,-51,-2,-70,-28,3,-37,75,-74,85,-63,-93,27,68,-8,67,90,3,-47,32,8,12,53,-93,56,97},{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},{28,85,78,33,10,83,30,22,3,82,75,48,2,76,54,6,40,93,94},{-98,-94,-7,-3,1,11,11,83,88},{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},{8,35,37,38,39,46,49,54},{-60,-66,-4,-21,27,-83,61,75,10,-48,18,-91,-67,88,13,49,86,-15,97,-90,-94,15,21,41,-35,-80,-43,-54},{0,0,0,0,0,0,0,0,1,1},{62,36,39,53,90,78,56,1,56,4,30}}; vector filled_function_param1 {15,15,40,10,7,35,6,21,5,8}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([0, -95, -51, -2, -70, -28, 3, -37, 75, -74, 85, -63, -93, 27, 68, -8, 67, 90, 3, -47, 32, 8, 12, 53, -93, 56, 97],15,), ([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,), ([28, 85, 78, 33, 10, 83, 30, 22, 3, 82, 75, 48, 2, 76, 54, 6, 40, 93, 94],10,), ([-98, -94, -7, -3, 1, 11, 11, 83, 88],7,), ([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,), ([8, 35, 37, 38, 39, 46, 49, 54],6,), ([-60, -66, -4, -21, 27, -83, 61, 75, 10, -48, 18, -91, -67, 88, 13, 49, 86, -15, 97, -90, -94, 15, 21, 41, -35, -80, -43, -54],21,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1],5,), ([62, 36, 39, 53, 90, 78, 56, 1, 56, 4, 30],8,) ] filled_function_param = [ ([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,), ([0, -95, -51, -2, -70, -28, 3, -37, 75, -74, 85, -63, -93, 27, 68, -8, 67, 90, 3, -47, 32, 8, 12, 53, -93, 56, 97],15,), ([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,), ([28, 85, 78, 33, 10, 83, 30, 22, 3, 82, 75, 48, 2, 76, 54, 6, 40, 93, 94],10,), ([-98, -94, -7, -3, 1, 11, 11, 83, 88],7,), ([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,), ([8, 35, 37, 38, 39, 46, 49, 54],6,), ([-60, -66, -4, -21, 27, -83, 61, 75, 10, -48, 18, -91, -67, 88, 13, 49, 86, -15, 97, -90, -94, 15, 21, 41, -35, -80, -43, -54],21,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1],5,), ([62, 36, 39, 53, 90, 78, 56, 1, 56, 4, 30],8,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING{ static int f_gold ( String s ) { int n = s . length ( ) ; int [ ] auxArr = new int [ n ] ; if ( s . charAt ( 0 ) == '1' ) auxArr [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { if ( s . charAt ( 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 . charAt ( i ) == '1' ) count += auxArr [ i ] ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""OGiOkJF""); param0.add(""517376""); param0.add(""11""); param0.add(""Ze""); param0.add(""8763644247018""); param0.add(""00111010001""); param0.add(""HGwkBKUOVu""); param0.add(""652""); param0.add(""101000011110""); param0.add(""kvdpG ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {""OGiOkJF"",""517376"",""11"",""Ze"",""8763644247018"",""00111010001"",""HGwkBKUOVu"",""652"",""101000011110"",""kvdpG ""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('OGiOkJF',), ('517376',), ('11',), ('Ze',), ('8763644247018',), ('00111010001',), ('HGwkBKUOVu',), ('652',), ('101000011110',), ('kvdpG ',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EVEN_FIBONACCI_NUMBERS_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EVEN_FIBONACCI_NUMBERS_SUM{ static int f_gold ( int limit ) { if ( limit < 2 ) return 0 ; long ef1 = 0 , ef2 = 2 ; long sum = ef1 + ef2 ; while ( ef2 <= limit ) { long ef3 = 4 * ef2 + ef1 ; if ( ef3 > limit ) break ; ef1 = ef2 ; ef2 = ef3 ; sum += ef2 ; } return ( int ) sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(89); param0.add(12); param0.add(94); param0.add(96); param0.add(25); param0.add(49); param0.add(8); param0.add(33); param0.add(59); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {67,89,12,94,96,25,49,8,33,59}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (89,), (12,), (94,), (96,), (25,), (49,), (8,), (33,), (59,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED{ static boolean f_gold ( int arr [ ] , int n ) { int max = Integer . MIN_VALUE ; int min = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) { max = Math . max ( max , arr [ i ] ) ; min = Math . min ( min , arr [ i ] ) ; } int m = max - min + 1 ; if ( m > n ) return false ; boolean visited [ ] = new boolean [ n ] ; 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,19,25,65,72,75,83,90,92}); param0.add(new int[]{46,2,28,-44,74,-36,-8,30,-96,60,52,-58,16,-38,78,38,-28,16,26,-42,48,40,6,72}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{18,19,21,23,30,33,38,40,45,56,63,68,93,96}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,1,1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(8); param1.add(14); param1.add(2); param1.add(23); param1.add(26); param1.add(43); param1.add(8); param1.add(34); param1.add(8); param1.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{2,4,19,25,65,72,75,83,90,92},{46,2,28,-44,74,-36,-8,30,-96,60,52,-58,16,-38,78,38,-28,16,26,-42,48,40,6,72},{0,1,1,1},{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},{-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},{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},{18,19,21,23,30,33,38,40,45,56,63,68,93,96},{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},{0,0,0,0,0,1,1,1,1},{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}}; vector param1 {8,14,2,23,26,43,8,34,8,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 4, 19, 25, 65, 72, 75, 83, 90, 92],8,), ([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,), ([0, 1, 1, 1],2,), ([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,), ([-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,), ([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,), ([18, 19, 21, 23, 30, 33, 38, 40, 45, 56, 63, 68, 93, 96],8,), ([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,), ([0, 0, 0, 0, 0, 1, 1, 1, 1],8,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING{ static int f_gold ( int arr [ ] , int n , int x ) { for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == x ) return i ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,15,15,15,16,17,23,23,33,33,40,43,55,56,63,66,69,76,79,88,99}); param0.add(new int[]{78,-64,-20,12,96,54,16,50,-20,96,-22,-84,54,-66,-16,-78,-78,90,-46,-70,-72,12,96,-86,42,-80,8,-2,70,4,70}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{73,60,4,59,75,39,39,30,66,11,90,80,46,59,52,14,63,70,75,73,65,88,45,64,66,91,67,25,60,74,33,23,94,76,60,78,72}); param0.add(new int[]{-92,-88,-68,-64,-62,-56,-50,-48,-48,-38,-18,-16,-14,-8,-8,2,4,10,10,10,36,38,46,50,52,62,72,74,80,84,86,90,92,94,96}); param0.add(new int[]{1,0,0,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,1,1,0,1,0,0}); param0.add(new int[]{7,8,8,10,13,18,18,19,20,25,32,33,34,38,44,44,46,46,46,47,48,50,53,56,56,57,57,57,57,59,60,61,63,63,64,70,71,74,74,81,82,83,84,90,92,93}); param0.add(new int[]{-82,74,-94,68,-10,-8,-46,-4,50,-60,-70,-74,-18,50,62,-76,-50,-58,-36,-16,-36,78,12,56,-14,-48,40,22,0,16,72,-78,46,8,-50,-78,28,20,-56}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{88,89,66,28,75,81,29,26,21,39,58,94,48,85}); List param1 = new ArrayList<>(); param1.add(20); param1.add(17); param1.add(12); param1.add(20); param1.add(33); param1.add(33); param1.add(41); param1.add(26); param1.add(16); param1.add(9); List param2 = new ArrayList<>(); param2.add(15); param2.add(29); param2.add(17); param2.add(28); param2.add(20); param2.add(26); param2.add(44); param2.add(31); param2.add(18); param2.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," 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; } int main() { int n_success = 0; vector> param0 {{3,15,15,15,16,17,23,23,33,33,40,43,55,56,63,66,69,76,79,88,99},{78,-64,-20,12,96,54,16,50,-20,96,-22,-84,54,-66,-16,-78,-78,90,-46,-70,-72,12,96,-86,42,-80,8,-2,70,4,70},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{73,60,4,59,75,39,39,30,66,11,90,80,46,59,52,14,63,70,75,73,65,88,45,64,66,91,67,25,60,74,33,23,94,76,60,78,72},{-92,-88,-68,-64,-62,-56,-50,-48,-48,-38,-18,-16,-14,-8,-8,2,4,10,10,10,36,38,46,50,52,62,72,74,80,84,86,90,92,94,96},{1,0,0,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,1,1,0,1,0,0},{7,8,8,10,13,18,18,19,20,25,32,33,34,38,44,44,46,46,46,47,48,50,53,56,56,57,57,57,57,59,60,61,63,63,64,70,71,74,74,81,82,83,84,90,92,93},{-82,74,-94,68,-10,-8,-46,-4,50,-60,-70,-74,-18,50,62,-76,-50,-58,-36,-16,-36,78,12,56,-14,-48,40,22,0,16,72,-78,46,8,-50,-78,28,20,-56},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{88,89,66,28,75,81,29,26,21,39,58,94,48,85}}; vector param1 {20,17,12,20,33,33,41,26,16,9}; vector param2 {15,29,17,28,20,26,44,31,18,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_2{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{-84,52,-34,96,16,92,-64,-74}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{60,92,42,83,55,76,29,62}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,1,1,1,0,0,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{17,50,65,4,19,10,45,70,76,81,28,97,55,70,38,2,40,67,36,33,6,85,25}); List param1 = new ArrayList<>(); param1.add(new int[]{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}); param1.add(new int[]{-22,26,-12,-54,66,86,38,76}); param1.add(new int[]{0,0,0,0,0,0,0,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}); param1.add(new int[]{71,2,74,42,80,71,26,76}); param1.add(new int[]{-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}); param1.add(new int[]{1,1,1,0,1,1,0,0,0,0}); param1.add(new int[]{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}); param1.add(new int[]{-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}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{78,92,65,23,7,94,18,4,2,53,31,58,98,18,46,16,17,92,80,92,43,70,50}); List param2 = new ArrayList<>(); param2.add(28); param2.add(6); param2.add(37); param2.add(4); param2.add(17); param2.add(5); param2.add(28); param2.add(16); param2.add(25); param2.add(16); List param3 = new ArrayList<>(); param3.add(29); param3.add(5); param3.add(26); param3.add(7); param3.add(27); param3.add(8); param3.add(34); param3.add(30); param3.add(33); param3.add(22); List param4 = new ArrayList<>(); param4.add(23); param4.add(7); param4.add(42); param4.add(7); param4.add(17); param4.add(9); param4.add(31); param4.add(24); param4.add(33); param4.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector> param0 {{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},{-84,52,-34,96,16,92,-64,-74},{0,0,0,0,0,0,0,0,0,0,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},{60,92,42,83,55,76,29,62},{-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},{0,0,1,1,1,0,0,1,1,1},{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},{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},{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},{17,50,65,4,19,10,45,70,76,81,28,97,55,70,38,2,40,67,36,33,6,85,25}}; vector> param1 {{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},{-22,26,-12,-54,66,86,38,76},{0,0,0,0,0,0,0,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},{71,2,74,42,80,71,26,76},{-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},{1,1,1,0,1,1,0,0,0,0},{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},{-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},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{78,92,65,23,7,94,18,4,2,53,31,58,98,18,46,16,17,92,80,92,43,70,50}}; vector param2 {28,6,37,4,17,5,28,16,25,16}; vector param3 {29,5,26,7,27,8,34,30,33,22}; vector param4 {23,7,42,7,17,9,31,24,33,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i],param4[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-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, 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,), ([60, 92, 42, 83, 55, 76, 29, 62],[71, 2, 74, 42, 80, 71, 26, 76],4,7,7,), ([-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, 1, 1, 1, 0, 0, 1, 1, 1],[1, 1, 1, 0, 1, 1, 0, 0, 0, 0],5,8,9,), ([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,), ([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,), ([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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LINE_PASSES_ORIGIN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LINE_PASSES_ORIGIN{ static boolean f_gold ( int x1 , int y1 , int x2 , int y2 ) { return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(10); param0.add(0); param0.add(1); param0.add(82); param0.add(78); param0.add(13); param0.add(18); param0.add(42); param0.add(29); List param1 = new ArrayList<>(); param1.add(28); param1.add(0); param1.add(1); param1.add(1); param1.add(86); param1.add(86); param1.add(46); param1.add(29); param1.add(35); param1.add(17); List param2 = new ArrayList<>(); param2.add(2); param2.add(20); param2.add(0); param2.add(10); param2.add(19); param2.add(11); param2.add(33); param2.add(95); param2.add(25); param2.add(45); List param3 = new ArrayList<>(); param3.add(56); param3.add(0); param3.add(17); param3.add(10); param3.add(4); param3.add(6); param3.add(33); param3.add(12); param3.add(36); param3.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x1 , y1 , x2 , y2 ) : return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ) "," using namespace std; bool f_gold ( int x1, int y1, int x2, int y2 ) { return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ); } int main() { int n_success = 0; vector param0 {1,10,0,1,82,78,13,18,42,29}; vector param1 {28,0,1,1,86,86,46,29,35,17}; vector param2 {2,20,0,10,19,11,33,95,25,45}; vector param3 {56,0,17,10,4,6,33,12,36,35}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i]) == f_gold(param0[i],param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,28,2,56,), (10,0,20,0,), (0,1,0,17,), (1,1,10,10,), (82,86,19,4,), (78,86,11,6,), (13,46,33,33,), (18,29,95,12,), (42,35,25,36,), (29,17,45,35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER{ static int f_gold ( int n , int k ) { if ( k <= 0 ) return n ; return ( n & ~ ( 1 << ( k - 1 ) ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(49); param0.add(59); param0.add(76); param0.add(27); param0.add(61); param0.add(67); param0.add(63); param0.add(85); param0.add(90); param0.add(24); List param1 = new ArrayList<>(); param1.add(15); param1.add(69); param1.add(20); param1.add(76); param1.add(60); param1.add(27); param1.add(71); param1.add(25); param1.add(64); param1.add(55); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k ) : if ( k <= 0 ) : return n return ( n & ~ ( 1 << ( k - 1 ) ) ) "," using namespace std; int f_gold ( int n, int k ) { if ( k <= 0 ) return n; return ( n & ~ ( 1 << ( k - 1 ) ) ); } int main() { int n_success = 0; vector param0 {49,59,76,27,61,67,63,85,90,24}; vector param1 {15,69,20,76,60,27,71,25,64,55}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (49,15,), (59,69,), (76,20,), (27,76,), (61,60,), (67,27,), (63,71,), (85,25,), (90,64,), (24,55,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", STRING_K_DISTINCT_CHARACTERS_NO_CHARACTERS_ADJACENT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class STRING_K_DISTINCT_CHARACTERS_NO_CHARACTERS_ADJACENT{ static 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 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(60); param0.add(56); param0.add(16); param0.add(42); param0.add(55); param0.add(64); param0.add(68); param0.add(88); param0.add(64); param0.add(42); List param1 = new ArrayList<>(); param1.add(71); param1.add(17); param1.add(16); param1.add(60); param1.add(56); param1.add(59); param1.add(24); param1.add(2); param1.add(94); param1.add(79); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," 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; } int main() { int n_success = 0; vector param0 {60,56,16,42,55,64,68,88,64,42}; vector param1 {71,17,16,60,56,59,24,2,94,79}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (60,71,), (56,17,), (16,16,), (42,60,), (55,56,), (64,59,), (68,24,), (88,2,), (64,94,), (42,79,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES{ static int f_gold ( int n , int k ) { int p = 1 ; if ( k % 2 != 0 ) p = - 1 ; return ( int ) ( Math . pow ( n - 1 , k ) + p * ( n - 1 ) ) / n ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(27); param0.add(70); param0.add(77); param0.add(83); param0.add(16); param0.add(90); param0.add(39); param0.add(48); param0.add(56); param0.add(10); List param1 = new ArrayList<>(); param1.add(59); param1.add(87); param1.add(40); param1.add(26); param1.add(2); param1.add(66); param1.add(72); param1.add(26); param1.add(77); param1.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k ) : p = 1 if ( k % 2 ) : p = - 1 return ( pow ( n - 1 , k ) + p * ( n - 1 ) ) / n "," using namespace std; int f_gold ( int n, int k ) { int p = 1; if ( k % 2 ) p = - 1; return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / n; } int main() { int n_success = 0; vector param0 {27,70,77,83,16,90,39,48,56,10}; vector param1 {59,87,40,26,2,66,72,26,77,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (27,59,), (70,87,), (77,40,), (83,26,), (16,2,), (90,66,), (39,72,), (48,26,), (56,77,), (10,47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BINARY_SEARCH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BINARY_SEARCH{ static int f_gold ( int arr [ ] , int l , int r , int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2 ; if ( arr [ mid ] == x ) return mid ; if ( arr [ mid ] > x ) return f_gold ( arr , l , mid - 1 , x ) ; return f_gold ( arr , mid + 1 , r , x ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,4,4,8,9,13,13,15,18,27,30,32,42,48,50,52,56,66,69,69,77,84,84,93}); param0.add(new int[]{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}); param0.add(new int[]{0,1}); param0.add(new int[]{28,84,40,81}); param0.add(new int[]{-66,-62,-60,-56,-56,-2,40,44,50,74,82,94}); param0.add(new int[]{1,0,0,0,0,1,0,1,0,1,1}); param0.add(new int[]{15,26,31,36,36,61,68,72,75,79,82,98}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{81,47}); List param1 = new ArrayList<>(); param1.add(19); param1.add(40); param1.add(1); param1.add(2); param1.add(8); param1.add(7); param1.add(6); param1.add(38); param1.add(12); param1.add(1); List param2 = new ArrayList<>(); param2.add(12); param2.add(35); param2.add(1); param2.add(2); param2.add(6); param2.add(7); param2.add(7); param2.add(33); param2.add(10); param2.add(1); List param3 = new ArrayList<>(); param3.add(22); param3.add(44); param3.add(1); param3.add(2); param3.add(8); param3.add(10); param3.add(8); param3.add(39); param3.add(6); param3.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int l, int r, int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2; if ( arr [ mid ] == x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; } int main() { int n_success = 0; vector> param0 {{3,4,4,8,9,13,13,15,18,27,30,32,42,48,50,52,56,66,69,69,77,84,84,93},{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},{0,1},{28,84,40,81},{-66,-62,-60,-56,-56,-2,40,44,50,74,82,94},{1,0,0,0,0,1,0,1,0,1,1},{15,26,31,36,36,61,68,72,75,79,82,98},{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},{0,0,0,0,0,0,0,1,1,1,1,1,1},{81,47}}; vector param1 {19,40,1,2,8,7,6,38,12,1}; vector param2 {12,35,1,2,6,7,7,33,10,1}; vector param3 {22,44,1,2,8,10,8,39,6,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 1],1,1,1,), ([28, 84, 40, 81],2,2,2,), ([-66, -62, -60, -56, -56, -2, 40, 44, 50, 74, 82, 94],8,6,8,), ([1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1],7,7,10,), ([15, 26, 31, 36, 36, 61, 68, 72, 75, 79, 82, 98],6,7,8,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],12,10,6,), ([81, 47],1,1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DICE_THROW_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DICE_THROW_PROBLEM{ public static long f_gold ( int m , int n , int x ) { long [ ] [ ] table = new long [ n + 1 ] [ x + 1 ] ; for ( int j = 1 ; j <= m && j <= x ; j ++ ) table [ 1 ] [ j ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= x ; j ++ ) { for ( int k = 1 ; k < j && k <= m ; k ++ ) table [ i ] [ j ] += table [ i - 1 ] [ j - k ] ; } } return table [ n ] [ x ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(94); param0.add(7); param0.add(20); param0.add(90); param0.add(50); param0.add(32); param0.add(46); param0.add(82); param0.add(43); param0.add(6); List param1 = new ArrayList<>(); param1.add(4); param1.add(12); param1.add(44); param1.add(94); param1.add(58); param1.add(90); param1.add(25); param1.add(50); param1.add(82); param1.add(83); List param2 = new ArrayList<>(); param2.add(69); param2.add(33); param2.add(24); param2.add(88); param2.add(27); param2.add(29); param2.add(6); param2.add(87); param2.add(70); param2.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; int f_gold ( int m, int n, int x ) { int table [ n + 1 ] [ x + 1 ]; memset ( table, 0, sizeof ( table ) ); for ( int j = 1; j <= m && j <= x; j ++ ) table [ 1 ] [ j ] = 1; for ( int i = 2; i <= n; i ++ ) for ( int j = 1; j <= x; j ++ ) for ( int k = 1; k <= m && k < j; k ++ ) table [ i ] [ j ] += table [ i - 1 ] [ j - k ]; return table [ n ] [ x ]; } int main() { int n_success = 0; vector param0 {94,7,20,90,50,32,46,82,43,6}; vector param1 {4,12,44,94,58,90,25,50,82,83}; vector param2 {69,33,24,88,27,29,6,87,70,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (94,4,69,), (7,12,33,), (20,44,24,), (90,94,88,), (50,58,27,), (32,90,29,), (46,25,6,), (82,50,87,), (43,82,70,), (6,83,19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_OF_WAYS_TO_FILL_A_N_X_4_GRID_USING_1_X_4_TILES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_OF_WAYS_TO_FILL_A_N_X_4_GRID_USING_1_X_4_TILES{ static int f_gold ( int n ) { int [ ] dp = new int [ n + 1 ] ; dp [ 0 ] = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { if ( i >= 1 && i <= 3 ) dp [ i ] = 1 ; else if ( i == 4 ) dp [ i ] = 2 ; else { dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ] ; } } return dp [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(61); param0.add(22); param0.add(65); param0.add(57); param0.add(36); param0.add(25); param0.add(16); param0.add(26); param0.add(92); param0.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; int f_gold ( int n ) { int dp [ n + 1 ]; dp [ 0 ] = 0; for ( int i = 1; i <= n; i ++ ) { if ( i >= 1 && i <= 3 ) dp [ i ] = 1; else if ( i == 4 ) dp [ i ] = 2; else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ]; } return dp [ n ]; } int main() { int n_success = 0; vector param0 {61,22,65,57,36,25,16,26,92,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (61,), (22,), (65,), (57,), (36,), (25,), (16,), (26,), (92,), (5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY{ static int f_gold ( int arr [ ] , int n , int k ) { int dist_count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int j ; for ( j = 0 ; j < n ; j ++ ) if ( i != j && arr [ j ] == arr [ i ] ) break ; if ( j == n ) dist_count ++ ; if ( dist_count == k ) return arr [ i ] ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,8,18,20,33,53,56,60,71,76,80,81,87,88,89,92,95}); param0.add(new int[]{-78,6,32,52,-12,-32,22,-40,-82,24,30,10,-40}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-96,-90,-76,-44,-16,-8,0,0,2,2,8,14,16,18,18,20,20,28,34,44,68,74,84,90}); param0.add(new int[]{0,1,1,0,0,0,0,0,1,0,0,1,0}); param0.add(new int[]{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}); param0.add(new int[]{-76,-24,-12,66,-40,26,72,46,-56,58,-68,2,-82}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(16); param1.add(8); param1.add(7); param1.add(40); param1.add(23); param1.add(10); param1.add(26); param1.add(6); param1.add(27); param1.add(28); List param2 = new ArrayList<>(); param2.add(16); param2.add(6); param2.add(5); param2.add(39); param2.add(12); param2.add(8); param2.add(24); param2.add(10); param2.add(17); param2.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { int dist_count = 0; for ( int i = 0; i < n; i ++ ) { int j; for ( j = 0; j < n; j ++ ) if ( i != j && arr [ j ] == arr [ i ] ) break; if ( j == n ) dist_count ++; if ( dist_count == k ) return arr [ i ]; } return - 1; } int main() { int n_success = 0; vector> param0 {{2,3,8,18,20,33,53,56,60,71,76,80,81,87,88,89,92,95},{-78,6,32,52,-12,-32,22,-40,-82,24,30,10,-40},{0,0,0,0,0,1,1,1,1,1,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},{-96,-90,-76,-44,-16,-8,0,0,2,2,8,14,16,18,18,20,20,28,34,44,68,74,84,90},{0,1,1,0,0,0,0,0,1,0,0,1,0},{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},{-76,-24,-12,66,-40,26,72,46,-56,58,-68,2,-82},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{29,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}}; vector param1 {16,8,7,40,23,10,26,6,27,28}; vector param2 {16,6,5,39,12,8,24,10,17,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 8, 18, 20, 33, 53, 56, 60, 71, 76, 80, 81, 87, 88, 89, 92, 95],16,16,), ([-78, 6, 32, 52, -12, -32, 22, -40, -82, 24, 30, 10, -40],8,6,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],7,5,), ([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,), ([-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,), ([0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0],10,8,), ([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,), ([-76, -24, -12, 66, -40, 26, 72, 46, -56, 58, -68, 2, -82],6,10,), ([0, 0, 0, 0, 0, 0, 0, 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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUBARRAYS_WITH_SAME_EVEN_AND_ODD_ELEMENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUBARRAYS_WITH_SAME_EVEN_AND_ODD_ELEMENTS{ static int f_gold ( int [ ] arr , int n ) { int difference = 0 ; int ans = 0 ; int [ ] hash_positive = new int [ n + 1 ] ; int [ ] hash_negative = new int [ n + 1 ] ; hash_positive [ 0 ] = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( arr [ i ] & 1 ) == 1 ) { difference ++ ; } else { difference -- ; } if ( difference < 0 ) { ans += hash_negative [ - difference ] ; hash_negative [ - difference ] ++ ; } else { ans += hash_positive [ difference ] ; hash_positive [ difference ] ++ ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{20,-98,-44,-82,28,20,-76,-16,42,0,-88,74,56,6,-68,-30,28,88,58,-78,46,2}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{6,16,21,26,34,35,44,46,46,86}); param0.add(new int[]{86,12,80,46,-12,6}); param0.add(new int[]{0,0,0,0,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}); param0.add(new int[]{71,94,91,19,85,5,87,96,66,17,95,5,32,17,93,48,46,24}); List param1 = new ArrayList<>(); param1.add(26); param1.add(15); param1.add(24); param1.add(23); param1.add(48); param1.add(27); param1.add(7); param1.add(4); param1.add(15); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int n ) { int difference = 0; int ans = 0; int hash_positive [ n + 1 ], hash_negative [ n + 1 ]; fill_n ( hash_positive, n + 1, 0 ); fill_n ( hash_negative, n + 1, 0 ); hash_positive [ 0 ] = 1; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] & 1 == 1 ) difference ++; else difference --; if ( difference < 0 ) { ans += hash_negative [ - difference ]; hash_negative [ - difference ] ++; } else { ans += hash_positive [ difference ]; hash_positive [ difference ] ++; } } return ans; } int main() { int n_success = 0; vector> param0 {{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},{20,-98,-44,-82,28,20,-76,-16,42,0,-88,74,56,6,-68,-30,28,88,58,-78,46,2},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{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},{-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},{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},{6,16,21,26,34,35,44,46,46,86},{86,12,80,46,-12,6},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{71,94,91,19,85,5,87,96,66,17,95,5,32,17,93,48,46,24}}; vector param1 {26,15,24,23,48,27,7,4,15,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([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,), ([-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,), ([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,), ([6, 16, 21, 26, 34, 35, 44, 46, 46, 86],7,), ([86, 12, 80, 46, -12, 6],4,), ([0, 0, 0, 0, 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,), ([71, 94, 91, 19, 85, 5, 87, 96, 66, 17, 95, 5, 32, 17, 93, 48, 46, 24],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_MINIMUM_DISTANCE_BETWEEN_TWO_NUMBERS_1{ static int f_gold ( int arr [ ] , int n , int x , int y ) { int i = 0 ; int min_dist = Integer . MAX_VALUE ; int prev = 0 ; for ( i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == x || arr [ i ] == y ) { prev = i ; break ; } } for ( ; i < n ; i ++ ) { if ( arr [ i ] == x || arr [ i ] == y ) { if ( arr [ prev ] != arr [ i ] && ( i - prev ) < min_dist ) { min_dist = i - prev ; prev = i ; } else prev = i ; } } return min_dist ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,1,0,1,1,0,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{32,65,10,72,17,58,79,28,67,36,18,35}); List param1 = new ArrayList<>(); param1.add(22); param1.add(25); param1.add(1); param1.add(26); param1.add(24); param1.add(10); param1.add(27); param1.add(30); param1.add(38); param1.add(7); List param2 = new ArrayList<>(); param2.add(7); param2.add(58); param2.add(1); param2.add(54); param2.add(0); param2.add(0); param2.add(1); param2.add(25); param2.add(0); param2.add(10); List param3 = new ArrayList<>(); param3.add(40); param3.add(70); param3.add(1); param3.add(82); param3.add(4); param3.add(1); param3.add(42); param3.add(45); param3.add(0); param3.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int n, int x, int y ) { int i = 0; int min_dist = INT_MAX; int prev; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] == x || arr [ i ] == y ) { prev = i; break; } } for (; i < n; i ++ ) { if ( arr [ i ] == x || arr [ i ] == y ) { if ( arr [ prev ] != arr [ i ] && ( i - prev ) < min_dist ) { min_dist = i - prev; prev = i; } else prev = i; } } return min_dist; } int main() { int n_success = 0; vector> param0 {{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},{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},{0,0,1},{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},{-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},{0,0,1,0,1,1,0,1,1,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},{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},{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},{32,65,10,72,17,58,79,28,67,36,18,35}}; vector param1 {22,25,1,26,24,10,27,30,38,7}; vector param2 {7,58,1,54,0,0,1,25,0,10}; vector param3 {40,70,1,82,4,1,42,45,0,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 0, 1],1,1,1,), ([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,), ([-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,), ([0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1],10,0,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,), ([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,), ([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,), ([32, 65, 10, 72, 17, 58, 79, 28, 67, 36, 18, 35],7,10,7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_OF_THREE_INTEGERS_WITHOUT_COMPARISON_OPERATORS_1{ static int f_gold ( int x , int y , int z ) { if ( ( y / x ) != 1 ) return ( ( y / z ) != 1 ) ? y : z ; return ( ( x / z ) != 1 ) ? x : z ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(48); param0.add(11); param0.add(50); param0.add(21); param0.add(94); param0.add(22); param0.add(3); param0.add(67); param0.add(59); param0.add(50); List param1 = new ArrayList<>(); param1.add(63); param1.add(55); param1.add(89); param1.add(71); param1.add(39); param1.add(44); param1.add(41); param1.add(62); param1.add(2); param1.add(11); List param2 = new ArrayList<>(); param2.add(56); param2.add(84); param2.add(96); param2.add(74); param2.add(42); param2.add(86); param2.add(68); param2.add(94); param2.add(83); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int x, int y, int z ) { if ( ! ( y / x ) ) return ( ! ( y / z ) ) ? y : z; return ( ! ( x / z ) ) ? x : z; } int main() { int n_success = 0; vector param0 {48,11,50,21,94,22,3,67,59,50}; vector param1 {63,55,89,71,39,44,41,62,2,11}; vector param2 {56,84,96,74,42,86,68,94,83,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (48,63,56,), (11,55,84,), (50,89,96,), (21,71,74,), (94,39,42,), (22,44,86,), (3,41,68,), (67,62,94,), (59,2,83,), (50,11,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_EVEN_LENGTH_SUBSTRING_SUM_FIRST_SECOND_HALF_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_EVEN_LENGTH_SUBSTRING_SUM_FIRST_SECOND_HALF_1{ static int f_gold ( String str ) { int n = str . length ( ) ; int maxlen = 0 ; int sum [ ] [ ] = new int [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) sum [ i ] [ i ] = str . charAt ( i ) - '0' ; for ( int len = 2 ; len <= n ; len ++ ) { for ( int i = 0 ; i < n - len + 1 ; i ++ ) { int j = i + len - 1 ; int k = len / 2 ; sum [ i ] [ j ] = sum [ i ] [ j - k ] + sum [ j - k + 1 ] [ j ] ; if ( len % 2 == 0 && sum [ i ] [ j - k ] == sum [ ( j - k + 1 ) ] [ j ] && len > maxlen ) maxlen = len ; } } return maxlen ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""jNkTf""); param0.add(""7""); param0.add(""100001101001""); param0.add(""fRXyQrTUjEk""); param0.add(""908404""); param0.add(""0101010010""); param0.add(""svq""); param0.add(""19""); param0.add(""11100010001""); param0.add(""O HgwJyOVfnV""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, CHECK_GIVEN_MATRIX_SPARSE_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_GIVEN_MATRIX_SPARSE_NOT{ static boolean f_gold ( int array [ ] [ ] , int m , int n ) { int counter = 0 ; for ( int i = 0 ; i < m ; ++ i ) for ( int j = 0 ; j < n ; ++ j ) if ( array [ i ] [ j ] == 0 ) ++ counter ; return ( counter > ( ( m * n ) / 2 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{67,41,95,96,46,82,5,44,41,3,55,19,1,18,59,62,56,37,60,49,5,79,68},new int[]{85,12,82,41,38,52,33,75,11,46,3,21,13,93,20,42,52,95,74,69,93,1,81},new int[]{95,24,13,91,41,41,85,4,98,89,97,25,13,33,18,51,54,58,24,7,33,7,65},new int[]{60,17,53,18,95,76,49,84,61,35,53,48,45,88,73,51,51,8,61,97,76,15,38},new int[]{30,58,80,23,72,21,10,98,40,36,54,67,79,97,94,59,86,77,93,36,77,84,5},new int[]{89,42,17,26,96,26,88,89,86,21,97,39,96,57,83,24,6,85,68,12,15,92,16},new int[]{45,85,17,37,50,90,60,57,3,31,32,44,66,61,32,47,2,49,38,99,21,43,95},new int[]{46,50,98,39,76,81,51,16,48,63,37,54,73,30,3,41,74,61,13,4,66,92,49},new int[]{25,60,8,35,12,70,77,66,35,88,40,57,38,97,31,44,6,13,3,68,28,58,72},new int[]{68,78,45,66,58,8,25,90,77,1,55,60,98,54,71,60,18,86,29,48,78,75,4},new int[]{56,95,41,62,43,81,32,55,95,35,61,11,34,70,27,99,59,90,27,33,71,16,35},new int[]{68,16,57,90,76,38,11,75,31,81,12,62,9,3,58,51,88,25,80,72,44,14,15},new int[]{99,24,44,97,54,95,80,78,12,1,86,77,27,55,54,40,65,87,6,16,14,36,87},new int[]{53,8,42,68,29,57,22,34,4,87,69,56,6,81,15,83,81,31,61,7,18,2,81},new int[]{26,43,12,57,23,79,80,26,70,36,33,28,27,72,97,52,13,90,45,1,44,81,38},new int[]{43,82,40,76,62,67,88,72,93,2,18,87,14,1,15,88,32,39,68,31,44,54,16},new int[]{99,50,21,42,96,76,40,78,48,32,66,65,10,62,39,16,41,78,59,50,50,5,83},new int[]{92,92,66,22,29,40,40,16,41,61,64,13,63,76,63,10,91,12,20,88,79,54,47},new int[]{61,68,76,59,98,25,18,44,3,95,61,77,12,39,79,83,92,13,75,39,6,5,65},new int[]{49,12,1,19,6,19,8,86,44,61,23,88,6,52,85,67,13,74,64,46,54,96,86},new int[]{2,39,65,66,43,54,6,96,27,88,90,65,26,65,23,89,26,78,76,94,37,83,3},new int[]{46,32,63,18,68,16,40,27,77,56,92,52,14,6,15,3,22,48,40,51,13,95,21},new int[]{28,13,95,35,18,71,3,37,46,77,61,89,52,94,46,90,59,3,19,49,79,14,49}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{39,82,13,38,88,30,51,34,53,58,54,87,30,72,77,48,55,34,87},new int[]{70,86,28,68,52,48,78,42,68,21,27,35,41,53,76,18,39,24,61},new int[]{16,38,21,46,59,52,95,97,88,90,43,83,11,25,40,18,37,47,3},new int[]{53,9,6,43,54,79,86,88,68,7,79,21,70,88,77,63,90,45,64},new int[]{99,16,85,5,92,38,81,26,48,18,1,43,8,59,28,47,51,31,90},new int[]{4,87,14,14,97,51,81,65,25,1,22,32,46,85,90,21,85,42,44},new int[]{8,96,27,63,63,65,73,66,9,54,89,93,26,72,58,71,25,67,22},new int[]{76,76,64,6,24,23,29,82,7,76,93,28,54,79,47,45,53,93,24},new int[]{13,30,78,6,4,21,75,30,78,42,11,19,36,4,40,35,64,19,56},new int[]{61,15,99,3,59,34,15,16,3,74,70,81,11,56,24,79,31,95,30},new int[]{86,49,28,58,35,14,20,83,59,88,68,16,29,74,54,64,39,89,34},new int[]{79,40,23,60,79,43,88,1,21,5,51,30,20,72,63,28,56,80,2},new int[]{46,70,71,17,9,12,98,70,89,72,99,25,10,9,58,67,91,97,55},new int[]{84,89,11,89,91,37,34,88,35,68,92,53,90,40,12,56,16,51,32},new int[]{18,89,27,59,9,86,56,35,70,5,30,5,53,42,75,63,28,14,20},new int[]{21,83,86,48,24,16,5,97,65,79,51,42,2,36,2,70,64,31,19},new int[]{94,81,22,39,33,76,10,41,94,25,33,15,78,17,42,53,46,69,50},new int[]{45,90,30,89,62,86,37,35,8,38,64,17,6,20,92,83,84,28,41},new int[]{51,97,5,17,16,93,15,74,74,98,24,25,66,71,95,44,47,39,41}}); param0.add(new int[][]{new int[]{45,34,40,86,92,30,11,67,66,18,30,47,69,10,98,55,85,39,46,78},new int[]{49,6,79,57,39,75,91,82,91,18,86,11,46,94,96,93,31,73,98,60},new int[]{40,27,52,15,85,14,9,6,47,67,46,13,29,75,53,71,80,56,88,30},new int[]{36,24,45,38,71,83,10,64,26,16,31,30,33,89,69,93,59,14,19,91},new int[]{23,84,17,24,58,16,79,4,84,37,91,9,15,34,52,9,24,1,81,30},new int[]{34,83,45,69,25,64,16,98,87,41,68,1,17,10,81,9,87,16,48,1},new int[]{26,8,59,97,5,70,41,34,95,34,92,34,76,27,83,84,90,83,39,81},new int[]{58,55,22,85,45,11,27,6,71,61,97,72,78,81,93,9,21,60,96,37},new int[]{2,25,36,41,31,74,4,1,70,34,45,6,19,23,5,72,48,3,66,90},new int[]{37,17,39,34,86,86,49,64,89,98,23,48,76,47,34,81,77,11,67,20},new int[]{6,4,27,99,14,45,92,84,63,36,50,24,98,16,81,89,94,33,13,4},new int[]{51,11,25,40,65,38,4,73,67,76,81,43,87,55,28,26,49,51,97,41},new int[]{10,68,99,15,59,15,1,35,8,40,58,29,36,63,51,54,41,83,92,8},new int[]{26,35,58,32,90,53,11,57,43,67,9,95,98,74,29,24,8,40,83,34},new int[]{46,96,63,39,20,39,69,98,23,30,29,13,24,95,72,27,18,31,78,68},new int[]{15,75,63,63,95,80,19,52,10,53,88,55,94,73,85,47,85,6,80,99},new int[]{67,79,6,51,9,27,54,1,69,13,39,14,64,7,85,72,90,66,87,55},new int[]{55,88,18,52,43,74,81,63,6,8,62,71,28,93,4,49,75,79,66,7},new int[]{34,21,47,36,76,83,10,31,91,83,12,14,43,91,51,23,45,27,66,63},new int[]{96,65,87,13,87,14,33,15,79,29,14,84,77,95,47,48,44,17,78,82}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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}}); param0.add(new int[][]{new int[]{93,31,15,23,44,84,3,83,86,47,93},new int[]{79,70,36,92,40,24,18,39,41,97,9},new int[]{11,36,96,6,22,15,34,56,34,68,34},new int[]{52,69,93,9,63,72,7,78,84,87,16},new int[]{53,5,78,45,85,29,33,32,34,93,78},new int[]{41,43,9,62,60,66,82,69,35,97,64},new int[]{34,33,87,61,11,92,47,56,60,85,3},new int[]{32,44,45,55,46,6,67,16,12,34,11},new int[]{24,47,38,60,54,10,71,86,75,86,4},new int[]{80,33,53,67,42,69,3,87,73,15,96},new int[]{22,38,56,60,17,44,73,96,75,3,27}}); param0.add(new int[][]{new int[]{65}}); List param1 = new ArrayList<>(); param1.add(25); param1.add(22); param1.add(27); param1.add(11); param1.add(14); param1.add(22); param1.add(24); param1.add(20); param1.add(10); param1.add(0); List param2 = new ArrayList<>(); param2.add(16); param2.add(12); param2.add(20); param2.add(9); param2.add(14); param2.add(20); param2.add(19); param2.add(22); param2.add(8); param2.add(0); for(int i =0; i < param0.size(); i+=2 ){ for(int j =0; j < param0.get(i).length; ++j ){ for(int k =0; k < param0.get(i)[j].length; ++k){ param0.get(i)[j][k]= param0.get(i)[j][k] %2 == 0 || param0.get(i)[j][k] % 3 == 0 ? 0 : param0.get(i)[j][k]; } } } for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) ) ",,," if __name__ == '__main__': param = [ ([[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,), ([[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,), ([[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,), ([[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,), ([[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,), ([[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,), ([[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,), ([[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,), ([[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,), ([[65]],0,0,) ] for i, p_set in enumerate(param): param[i] = list(param[i]) if i % 2 == 0: param[i][0] = [[0 if e % 2 == 0 or e % 3 == 0 else e for e in l] for l in p_set[0]] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_CHARACTERS_POSITION_ENGLISH_ALPHABETS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_CHARACTERS_POSITION_ENGLISH_ALPHABETS{ static int f_gold ( String str ) { int result = 0 ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( i == ( str . charAt ( i ) - 'a' ) || i == ( str . charAt ( i ) - 'A' ) ) { result ++ ; } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""lLkhFeZGcb""); param0.add(""ABcED""); param0.add(""geeksforgeeks""); param0.add(""Alphabetical""); param0.add(""abababab""); param0.add(""bcdefgxyz""); param0.add(""cBzaqx L""); param0.add("" bcd""); param0.add(""11""); param0.add(""MqqKY""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( string str ) { int result = 0; for ( int i = 0; i < str . size ( ); i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++; return result; } int main() { int n_success = 0; vector param0 {""lLkhFeZGcb"",""ABcED"",""geeksforgeeks"",""Alphabetical"",""abababab"",""bcdefgxyz"",""cBzaqx L"","" bcd"",""11"",""MqqKY""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('lLkhFeZGcb',), ('ABcED',), ('geeksforgeeks',), ('Alphabetical',), ('abababab',), ('bcdefgxyz',), ('cBzaqx L',), (' bcd',), ('11',), ('MqqKY',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", N_TH_TERM_SERIES_2_12_36_80_150," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_TERM_SERIES_2_12_36_80_150{ public static int f_gold ( int n ) { return ( n * n ) + ( n * n * n ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(90); param0.add(95); param0.add(22); param0.add(29); param0.add(62); param0.add(40); param0.add(52); param0.add(21); param0.add(33); param0.add(11); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( n * n ) + ( n * n * n ) "," using namespace std; int f_gold ( int n ) { return ( n * n ) + ( n * n * n ); } int main() { int n_success = 0; vector param0 {90,95,22,29,62,40,52,21,33,11}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (90,), (95,), (22,), (29,), (62,), (40,), (52,), (21,), (33,), (11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_STRINGS_ADJACENT_CHARACTERS_DIFFERENCE_ONE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_STRINGS_ADJACENT_CHARACTERS_DIFFERENCE_ONE{ static long f_gold ( int n ) { long [ ] [ ] dp = new long [ n + 1 ] [ 27 ] ; for ( int i = 0 ; i < n + 1 ; i ++ ) { for ( int j = 0 ; j < 27 ; j ++ ) { dp [ i ] [ j ] = 0 ; } } for ( int i = 0 ; i <= 25 ; i ++ ) { dp [ 1 ] [ i ] = 1 ; } for ( int i = 2 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= 25 ; j ++ ) { if ( j == 0 ) { dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ] ; } else { dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ) ; } } } long sum = 0 ; for ( int i = 0 ; i <= 25 ; i ++ ) { sum = ( sum + dp [ n ] [ i ] ) ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(7); param0.add(47); param0.add(72); param0.add(66); param0.add(71); param0.add(56); param0.add(61); param0.add(68); param0.add(78); param0.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int n ) { long int dp [ n + 1 ] [ 27 ]; memset ( dp, 0, sizeof ( dp ) ); for ( int i = 0; i <= 25; i ++ ) dp [ 1 ] [ i ] = 1; for ( int i = 2; i <= n; i ++ ) { for ( int j = 0; j <= 25; j ++ ) if ( j == 0 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ]; else dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ); } long int sum = 0; for ( int i = 0; i <= 25; i ++ ) sum = ( sum + dp [ n ] [ i ] ); return sum; } int main() { int n_success = 0; vector param0 {7,47,72,66,71,56,61,68,78,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (7,), (47,), (72,), (66,), (71,), (56,), (61,), (68,), (78,), (22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DIVISIBILITY_BY_7," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIVISIBILITY_BY_7{ static boolean f_gold ( int num ) { if ( num < 0 ) return f_gold ( - num ) ; if ( num == 0 || num == 7 ) return true ; if ( num < 10 ) return false ; return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(0); param0.add(-21); param0.add(7); param0.add(63); param0.add(84); param0.add(73); param0.add(81); param0.add(-10); param0.add(47); param0.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) ) "," using namespace std; int f_gold ( int num ) { if ( num < 0 ) return f_gold ( - num ); if ( num == 0 || num == 7 ) return 1; if ( num < 10 ) return 0; return f_gold ( num / 10 - 2 * ( num - num / 10 * 10 ) ); } int main() { int n_success = 0; vector param0 {0,-21,7,63,84,73,81,-10,47,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (0,), (-21,), (7,), (63,), (84,), (73,), (81,), (-10,), (47,), (23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_OF_SUB_STRINGS_THAT_DO_NOT_CONTAIN_ALL_THE_CHARACTERS_FROM_THE_SET_A_B_C_AT_THE_SAME_TIME," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OF_SUB_STRINGS_THAT_DO_NOT_CONTAIN_ALL_THE_CHARACTERS_FROM_THE_SET_A_B_C_AT_THE_SAME_TIME{ static int f_gold ( char str [ ] , int n ) { int ans = ( n * ( n + 1 ) ) / 2 ; int a_index = 0 ; int b_index = 0 ; int c_index = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( str [ i ] == 'a' ) { a_index = i + 1 ; ans -= Math . min ( b_index , c_index ) ; } else if ( str [ i ] == 'b' ) { b_index = i + 1 ; ans -= Math . min ( a_index , c_index ) ; } else { c_index = i + 1 ; ans -= Math . min ( a_index , b_index ) ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'E','F','G','I','K','M','O','Q','Q','S','T','U','X','Z','a','b','c','d','e','f','h','h','i','j','l','m','s','s','t','x','y','y'}); param0.add(new char[]{'1','3','5','6','6','4','6','1','8','0','3','8','3','5','9','6','8','5','7','2','3','7','1','7','6','1','8','9','3','6','7','0','8','5','8','3','2','6','7','4','5','1','3','3','7','5','6'}); param0.add(new char[]{'0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'c','Z','s','F','v',' ','Y','e','u','I','P','y','j','o','n'}); param0.add(new char[]{'0','0','2','2','3','3','4','5','6','6','6','7','8','9'}); param0.add(new char[]{'0','1','0','1','1','1','1','0','0','0','1','1','0','0','0','0','0','0','1','1','1','1','0','1','0','1','1','1','1','1','0','0'}); param0.add(new char[]{'E','G','G','J','L','O','O','S','T','U','V','V','Y','c','d','e','f','g','g','j','m','n','p','q','q','r','u','u','x'}); param0.add(new char[]{'8','1','9','6','4','3','8','2','8','5','5','3','0','1','7','3','1','5','4','8','2','3','3','2','2','4','9','6','3','1','4','1','4','0','4','9','4','8','4','7'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','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'}); param0.add(new char[]{'j','z','H','Q'}); List param1 = new ArrayList<>(); param1.add(23); param1.add(24); param1.add(15); param1.add(9); param1.add(8); param1.add(19); param1.add(21); param1.add(36); param1.add(33); param1.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( char str [ ], int n ) { int ans = ( n * ( n + 1 ) ) / 2; int a_index = 0; int b_index = 0; int c_index = 0; for ( int i = 0; i < n; i ++ ) { if ( str [ i ] == 'a' ) { a_index = i + 1; ans -= min ( b_index, c_index ); } else if ( str [ i ] == 'b' ) { b_index = i + 1; ans -= min ( a_index, c_index ); } else { c_index = i + 1; ans -= min ( a_index, b_index ); } } return ans; } int main() { int n_success = 0; vector> param0 {{'E','F','G','I','K','M','O','Q','Q','S','T','U','X','Z','a','b','c','d','e','f','h','h','i','j','l','m','s','s','t','x','y','y'},{'1','3','5','6','6','4','6','1','8','0','3','8','3','5','9','6','8','5','7','2','3','7','1','7','6','1','8','9','3','6','7','0','8','5','8','3','2','6','7','4','5','1','3','3','7','5','6'},{'0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1'},{'c','Z','s','F','v',' ','Y','e','u','I','P','y','j','o','n'},{'0','0','2','2','3','3','4','5','6','6','6','7','8','9'},{'0','1','0','1','1','1','1','0','0','0','1','1','0','0','0','0','0','0','1','1','1','1','0','1','0','1','1','1','1','1','0','0'},{'E','G','G','J','L','O','O','S','T','U','V','V','Y','c','d','e','f','g','g','j','m','n','p','q','q','r','u','u','x'},{'8','1','9','6','4','3','8','2','8','5','5','3','0','1','7','3','1','5','4','8','2','3','3','2','2','4','9','6','3','1','4','1','4','0','4','9','4','8','4','7'},{'0','0','0','0','0','0','0','0','0','0','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'},{'j','z','H','Q'}}; vector param1 {23,24,15,9,8,19,21,36,33,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MODULUS_TWO_FLOAT_DOUBLE_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MODULUS_TWO_FLOAT_DOUBLE_NUMBERS{ static double f_gold ( double a , double b ) { if ( a < 0 ) a = - a ; if ( b < 0 ) b = - b ; double mod = a ; while ( mod >= b ) mod = mod - b ; if ( a < 0 ) return - mod ; return mod ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(3243.229719038493); param0.add(-4362.665881044217); param0.add(7255.066257575837); param0.add(-6929.554320261099); param0.add(3569.942027998315); param0.add(-6513.849053096595); param0.add(7333.183189243961); param0.add(-2856.1752826258803); param0.add(9787.228111241662); param0.add(-1722.873699288031); List param1 = new ArrayList<>(); param1.add(5659.926861939672); param1.add(-9196.507113304497); param1.add(2623.200060506935); param1.add(-3009.0234530313287); param1.add(6920.809419868375); param1.add(-70.95992406437102); param1.add(580.3500610971768); param1.add(-9625.97442825802); param1.add(2419.6844962423256); param1.add(-8370.700544254058); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; double f_gold ( double a, double b ) { double mod; if ( a < 0 ) mod = - a; else mod = a; if ( b < 0 ) b = - b; while ( mod >= b ) mod = mod - b; if ( a < 0 ) return - mod; return mod; } int main() { int n_success = 0; vector param0 {3243.229719038493,-4362.665881044217,7255.066257575837,-6929.554320261099,3569.942027998315,-6513.849053096595,7333.183189243961,-2856.1752826258803,9787.228111241662,-1722.873699288031}; vector param1 {5659.926861939672,-9196.507113304497,2623.200060506935,-3009.0234530313287,6920.809419868375,-70.95992406437102,580.3500610971768,-9625.97442825802,2419.6844962423256,-8370.700544254058}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (3243.229719038493,5659.926861939672,), (-4362.665881044217,-9196.507113304497,), (7255.066257575837,2623.200060506935,), (-6929.554320261099,-3009.0234530313287,), (3569.942027998315,6920.809419868375,), (-6513.849053096595,-70.95992406437102,), (7333.183189243961,580.3500610971768,), (-2856.1752826258803,-9625.97442825802,), (9787.228111241662,2419.6844962423256,), (-1722.873699288031,-8370.700544254058,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THREE_ELEMENT_FROM_DIFFERENT_THREE_ARRAYS_SUCH_THAT_THAT_A_B_C_K{ static boolean f_gold ( int a1 [ ] , int a2 [ ] , int a3 [ ] , int n1 , int n2 , int n3 , int sum ) { for ( int i = 0 ; i < n1 ; i ++ ) for ( int j = 0 ; j < n2 ; j ++ ) for ( int k = 0 ; k < n3 ; k ++ ) if ( a1 [ i ] + a2 [ j ] + a3 [ k ] == sum ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{28,15,21,28,85,68,24}); param0.add(new int[]{-86,-82,-66,-44,-44,-38,-22,-6,-2,14,26,40,54,58,60,66,72,80,94,96,98}); param0.add(new int[]{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}); param0.add(new int[]{44,53,85,85,86,88,93}); param0.add(new int[]{70,-38,62,-34,74,-32,-58,-34,-54}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{41,64,39,96,54,54,57,4,82,43,44,56,1}); List param1 = new ArrayList<>(); param1.add(new int[]{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}); param1.add(new int[]{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}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param1.add(new int[]{57,46,47,49,16,81,60}); param1.add(new int[]{-96,-86,-74,-56,-52,-42,-32,-22,-16,-10,-4,-4,10,42,48,52,58,62,84,90,96}); param1.add(new int[]{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}); param1.add(new int[]{4,5,8,15,29,40,91}); param1.add(new int[]{48,-86,-18,14,88,92,-56,-8,-74}); param1.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{44,58,40,87,22,82,8,81,88,42,15,14,81}); List param2 = new ArrayList<>(); param2.add(new int[]{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}); param2.add(new int[]{-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}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param2.add(new int[]{76,49,6,44,71,24,57}); param2.add(new int[]{-92,-92,-90,-82,-62,-44,-42,-40,-38,-36,-22,-20,-8,12,22,26,30,44,54,64,86}); param2.add(new int[]{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}); param2.add(new int[]{30,53,71,75,76,82,84}); param2.add(new int[]{8,8,32,76,76,94,22,-60,-42}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param2.add(new int[]{64,20,24,42,37,46,6,47,12,93,8,5,11}); List param3 = new ArrayList<>(); param3.add(25); param3.add(26); param3.add(14); param3.add(6); param3.add(13); param3.add(25); param3.add(5); param3.add(6); param3.add(15); param3.add(7); List param4 = new ArrayList<>(); param4.add(18); param4.add(22); param4.add(14); param4.add(5); param4.add(20); param4.add(25); param4.add(3); param4.add(6); param4.add(14); param4.add(8); List param5 = new ArrayList<>(); param5.add(16); param5.add(20); param5.add(14); param5.add(5); param5.add(17); param5.add(23); param5.add(4); param5.add(6); param5.add(10); param5.add(6); List param6 = new ArrayList<>(); param6.add(222); param6.add(21); param6.add(2); param6.add(73); param6.add(6); param6.add(0); param6.add(3); param6.add(7); param6.add(13); param6.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i),param6.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i),param6.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; bool f_gold ( int a1 [ ], int a2 [ ], int a3 [ ], int n1, int n2, int n3, int sum ) { for ( int i = 0; i < n1; i ++ ) for ( int j = 0; j < n2; j ++ ) for ( int k = 0; k < n3; k ++ ) if ( a1 [ i ] + a2 [ j ] + a3 [ k ] == sum ) return true; return false; } int main() { int n_success = 0; vector> param0 {{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},{-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},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{28,15,21,28,85,68,24},{-86,-82,-66,-44,-44,-38,-22,-6,-2,14,26,40,54,58,60,66,72,80,94,96,98},{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},{44,53,85,85,86,88,93},{70,-38,62,-34,74,-32,-58,-34,-54},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{41,64,39,96,54,54,57,4,82,43,44,56,1}}; vector> param1 {{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},{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},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{57,46,47,49,16,81,60},{-96,-86,-74,-56,-52,-42,-32,-22,-16,-10,-4,-4,10,42,48,52,58,62,84,90,96},{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},{4,5,8,15,29,40,91},{48,-86,-18,14,88,92,-56,-8,-74},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{44,58,40,87,22,82,8,81,88,42,15,14,81}}; vector> param2 {{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},{-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},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{76,49,6,44,71,24,57},{-92,-92,-90,-82,-62,-44,-42,-40,-38,-36,-22,-20,-8,12,22,26,30,44,54,64,86},{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},{30,53,71,75,76,82,84},{8,8,32,76,76,94,22,-60,-42},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{64,20,24,42,37,46,6,47,12,93,8,5,11}}; vector param3 {25,26,14,6,13,25,5,6,15,7}; vector param4 {18,22,14,5,20,25,3,6,14,8}; vector param5 {16,20,14,5,17,23,4,6,10,6}; vector param6 {222,21,2,73,6,0,3,7,13,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i],param6[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),¶m2[i].front(),param3[i],param4[i],param5[i],param6[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-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,), ([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,), ([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,), ([-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,), ([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,), ([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,), ([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,), ([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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_UNIT_DIGIT_X_RAISED_POWER_Y_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_UNIT_DIGIT_X_RAISED_POWER_Y_1{ static int f_gold ( int x , int y ) { x = x % 10 ; if ( y != 0 ) y = y % 4 + 4 ; return ( ( ( int ) ( Math . pow ( x , y ) ) ) % 10 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(70); param0.add(26); param0.add(9); param0.add(82); param0.add(95); param0.add(43); param0.add(7); param0.add(19); param0.add(49); List param1 = new ArrayList<>(); param1.add(17); param1.add(52); param1.add(23); param1.add(96); param1.add(71); param1.add(36); param1.add(40); param1.add(27); param1.add(56); param1.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( x , y ) : x = x % 10 if y != 0 : y = y % 4 + 4 return ( ( ( int ) ( math.pow ( x , y ) ) ) % 10 ) "," using namespace std; int f_gold ( int x, int y ) { x = x % 10; if ( y != 0 ) y = y % 4 + 4; return ( ( ( int ) ( pow ( x, y ) ) ) % 10 ); } int main() { int n_success = 0; vector param0 {37,70,26,9,82,95,43,7,19,49}; vector param1 {17,52,23,96,71,36,40,27,56,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,17,), (70,52,), (26,23,), (9,96,), (82,71,), (95,36,), (43,40,), (7,27,), (19,56,), (49,28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_NUMBER_2X2_SQUARES_CAN_FIT_INSIDE_RIGHT_ISOSCELES_TRIANGLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_NUMBER_2X2_SQUARES_CAN_FIT_INSIDE_RIGHT_ISOSCELES_TRIANGLE{ public static int f_gold ( int base ) { base = ( base - 2 ) ; base = base / 2 ; return base * ( base + 1 ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(95); param0.add(49); param0.add(10); param0.add(73); param0.add(74); param0.add(40); param0.add(10); param0.add(94); param0.add(64); param0.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( base ) : base = ( base - 2 ) base = base / 2 return base * ( base + 1 ) / 2 "," using namespace std; int f_gold ( int base ) { base = ( base - 2 ); base = base / 2; return base * ( base + 1 ) / 2; } int main() { int n_success = 0; vector param0 {95,49,10,73,74,40,10,94,64,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (95,), (49,), (10,), (73,), (74,), (40,), (10,), (94,), (64,), (16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRIMALITY_TEST_SET_5USING_LUCAS_LEHMER_SERIES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRIMALITY_TEST_SET_5USING_LUCAS_LEHMER_SERIES{ static boolean f_gold ( int p ) { double checkNumber = Math . pow ( 2 , p ) - 1 ; double nextval = 4 % checkNumber ; for ( int i = 1 ; i < p - 1 ; i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber ; return ( nextval == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(11); param0.add(27); param0.add(31); param0.add(47); param0.add(3); param0.add(14); param0.add(41); param0.add(72); param0.add(39); param0.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; bool f_gold ( int p ) { long long checkNumber = pow ( 2, p ) - 1; long long nextval = 4 % checkNumber; for ( int i = 1; i < p - 1; i ++ ) nextval = ( nextval * nextval - 2 ) % checkNumber; return ( nextval == 0 ); } int main() { int n_success = 0; vector param0 {11,27,31,47,3,14,41,72,39,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (11,), (27,), (31,), (47,), (3,), (14,), (41,), (72,), (39,), (22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SUM_CHOOSING_MINIMUM_PAIRS_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_CHOOSING_MINIMUM_PAIRS_ARRAY{ static int f_gold ( int [ ] A , int n ) { int min_val = Arrays . stream ( A ) . min ( ) . getAsInt ( ) ; return ( min_val * ( n - 1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,9,10,13,13,15,16,16,17,18,18,23,24,24,25,25,25,32,32,36,38,39,40,40,40,41,43,48,51,56,59,60,70,72,74,76,79,83,83,85,88,90,92,94,95,95}); param0.add(new int[]{46,-10,56,46,-30,-68,50,8,72,-2,38,-12,20,-30,-38,-78,-18,-34,16,94,30,-86,36,88,-26,-56,-98,-92,96,-70,-78,-60,20,-54,36,-12,78,24,14,98,-14,-88,76,12}); param0.add(new int[]{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}); param0.add(new int[]{59,64,29,99,29,63,29,63,88,94,82,92,99,56,51,74,73,22,42,37,21,36,68,69,16,81,3,85,67,13,41,87,67,99,83,47,95,90,24,31,1,54,61,35,51,13}); param0.add(new int[]{-98,-92,-82,-78,-76,-72,-64,-60,-44,-28,-22,-22,-14,-12,2,2,4,6,10,14,16,24,28,28,32,34,36,46,46,48,52,60,62,66,68,72,74,84,96}); param0.add(new int[]{1,1,1,1,1,0,1}); param0.add(new int[]{5,20,34,37,51,55,89}); param0.add(new int[]{-70,78,-52,-82,-24,96,-32,8,-50,38,-76,-56,64,-28,-22,94,52,-32,66,-34,-30,14,42,98,96,-56,50,50,-24,-56,70,6,78,86,52,-40,92,46,46,-14,-74,40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{51,42,29,30,65,42,7,2,90,85,1,47,79,98,90,66,47,54,32,83}); List param1 = new ArrayList<>(); param1.add(26); param1.add(25); param1.add(32); param1.add(45); param1.add(31); param1.add(6); param1.add(3); param1.add(33); param1.add(26); param1.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int A [ ], int n ) { int min_val = * min_element ( A, A + n ); return ( min_val * ( n - 1 ) ); } int main() { int n_success = 0; vector> param0 {{4,9,10,13,13,15,16,16,17,18,18,23,24,24,25,25,25,32,32,36,38,39,40,40,40,41,43,48,51,56,59,60,70,72,74,76,79,83,83,85,88,90,92,94,95,95},{46,-10,56,46,-30,-68,50,8,72,-2,38,-12,20,-30,-38,-78,-18,-34,16,94,30,-86,36,88,-26,-56,-98,-92,96,-70,-78,-60,20,-54,36,-12,78,24,14,98,-14,-88,76,12},{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},{59,64,29,99,29,63,29,63,88,94,82,92,99,56,51,74,73,22,42,37,21,36,68,69,16,81,3,85,67,13,41,87,67,99,83,47,95,90,24,31,1,54,61,35,51,13},{-98,-92,-82,-78,-76,-72,-64,-60,-44,-28,-22,-22,-14,-12,2,2,4,6,10,14,16,24,28,28,32,34,36,46,46,48,52,60,62,66,68,72,74,84,96},{1,1,1,1,1,0,1},{5,20,34,37,51,55,89},{-70,78,-52,-82,-24,96,-32,8,-50,38,-76,-56,64,-28,-22,94,52,-32,66,-34,-30,14,42,98,96,-56,50,50,-24,-56,70,6,78,86,52,-40,92,46,46,-14,-74,40},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{51,42,29,30,65,42,7,2,90,85,1,47,79,98,90,66,47,54,32,83}}; vector param1 {26,25,32,45,31,6,3,33,26,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1{ static int f_gold ( int m , int n ) { int T [ ] [ ] = new int [ m + 1 ] [ n + 1 ] ; for ( int i = 0 ; i < m + 1 ; i ++ ) { for ( int j = 0 ; j < n + 1 ; j ++ ) { if ( i == 0 || j == 0 ) T [ i ] [ j ] = 0 ; else if ( i < j ) T [ i ] [ j ] = 0 ; else if ( j == 1 ) T [ i ] [ j ] = i ; else T [ i ] [ j ] = T [ i - 1 ] [ j ] + T [ i / 2 ] [ j - 1 ] ; } } return T [ m ] [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(10); param0.add(5); param0.add(2); param0.add(83); param0.add(91); param0.add(18); param0.add(83); param0.add(98); param0.add(43); param0.add(31); List param1 = new ArrayList<>(); param1.add(4); param1.add(2); param1.add(8); param1.add(7); param1.add(0); param1.add(53); param1.add(41); param1.add(53); param1.add(37); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","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 ] "," using namespace std; int f_gold ( int m, int n ) { int T [ m + 1 ] [ n + 1 ]; for ( int i = 0; i < m + 1; i ++ ) { for ( int j = 0; j < n + 1; j ++ ) { if ( i == 0 || j == 0 ) T [ i ] [ j ] = 0; else if ( i < j ) T [ i ] [ j ] = 0; else if ( j == 1 ) T [ i ] [ j ] = i; else T [ i ] [ j ] = T [ i - 1 ] [ j ] + T [ i / 2 ] [ j - 1 ]; } } return T [ m ] [ n ]; } int main() { int n_success = 0; vector param0 {10,5,2,83,91,18,83,98,43,31}; vector param1 {4,2,8,7,0,53,41,53,37,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ (10,4,), (5,2,), (2,8,), (83,7,), (91,0,), (18,53,), (83,41,), (98,53,), (43,37,), (31,20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MEDIAN_OF_TWO_SORTED_ARRAYS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MEDIAN_OF_TWO_SORTED_ARRAYS{ static int f_gold ( int ar1 [ ] , int ar2 [ ] , int n ) { int i = 0 ; int j = 0 ; int count ; int m1 = - 1 , m2 = - 1 ; for ( count = 0 ; count <= n ; count ++ ) { if ( i == n ) { m1 = m2 ; m2 = ar2 [ 0 ] ; break ; } else if ( j == n ) { m1 = m2 ; m2 = ar1 [ 0 ] ; break ; } if ( ar1 [ i ] < ar2 [ j ] ) { m1 = m2 ; m2 = ar1 [ i ] ; i ++ ; } else { m1 = m2 ; m2 = ar2 [ j ] ; j ++ ; } } return ( m1 + m2 ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,6,18,21,23,27,44,44,69,72,78,88,90,98}); param0.add(new int[]{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}); param0.add(new int[]{0,1,1}); param0.add(new int[]{53,17,94,21,16,75,67,51,44,71,65,82}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{61,69,66,3}); List param1 = new ArrayList<>(); param1.add(new int[]{6,12,16,18,26,34,48,48,49,56,61,79,81,89}); param1.add(new int[]{-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}); param1.add(new int[]{0,1,1}); param1.add(new int[]{98,50,8,11,80,41,59,24,94,41,75,78}); param1.add(new int[]{-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}); param1.add(new int[]{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}); param1.add(new int[]{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}); param1.add(new int[]{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}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param1.add(new int[]{39,84,97,15}); List param2 = new ArrayList<>(); param2.add(12); param2.add(16); param2.add(2); param2.add(10); param2.add(25); param2.add(40); param2.add(29); param2.add(17); param2.add(17); param2.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int ar1 [ ], int ar2 [ ], int n ) { int i = 0; int j = 0; int count; int m1 = - 1, m2 = - 1; for ( count = 0; count <= n; count ++ ) { if ( i == n ) { m1 = m2; m2 = ar2 [ 0 ]; break; } else if ( j == n ) { m1 = m2; m2 = ar1 [ 0 ]; break; } if ( ar1 [ i ] < ar2 [ j ] ) { m1 = m2; m2 = ar1 [ i ]; i ++; } else { m1 = m2; m2 = ar2 [ j ]; j ++; } } return ( m1 + m2 ) / 2; } int main() { int n_success = 0; vector> param0 {{2,6,18,21,23,27,44,44,69,72,78,88,90,98},{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},{0,1,1},{53,17,94,21,16,75,67,51,44,71,65,82},{-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},{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},{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},{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},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{61,69,66,3}}; vector> param1 {{6,12,16,18,26,34,48,48,49,56,61,79,81,89},{-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},{0,1,1},{98,50,8,11,80,41,59,24,94,41,75,78},{-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},{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},{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},{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},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{39,84,97,15}}; vector param2 {12,16,2,10,25,40,29,17,17,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 1, 1],[0, 1, 1],2,), ([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,), ([-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,), ([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,), ([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,), ([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,), ([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,), ([61, 69, 66, 3],[39, 84, 97, 15],3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", STEINS_ALGORITHM_FOR_FINDING_GCD_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class STEINS_ALGORITHM_FOR_FINDING_GCD_1{ static int f_gold ( int a , int b ) { if ( a == b ) return a ; if ( a == 0 ) return b ; if ( b == 0 ) return a ; if ( ( ~ a & 1 ) == 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 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(52); param0.add(36); param0.add(12); param0.add(69); param0.add(45); param0.add(7); param0.add(45); param0.add(62); param0.add(96); param0.add(89); List param1 = new ArrayList<>(); param1.add(29); param1.add(94); param1.add(6); param1.add(7); param1.add(11); param1.add(51); param1.add(55); param1.add(86); param1.add(63); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) "," using namespace std; int f_gold ( int a, int b ) { if ( a == b ) return a; if ( a == 0 ) return b; if ( b == 0 ) return a; if ( ~ a & 1 ) { if ( b & 1 ) return f_gold ( a >> 1, b ); else return f_gold ( a >> 1, b >> 1 ) << 1; } if ( ~ b & 1 ) return f_gold ( a, b >> 1 ); if ( a > b ) return f_gold ( ( a - b ) >> 1, b ); return f_gold ( ( b - a ) >> 1, a ); } int main() { int n_success = 0; vector param0 {52,36,12,69,45,7,45,62,96,89}; vector param1 {29,94,6,7,11,51,55,86,63,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (52,29,), (36,94,), (12,6,), (69,7,), (45,11,), (7,51,), (45,55,), (62,86,), (96,63,), (89,12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNTING_PAIRS_PERSON_CAN_FORM_PAIR_ONE_1{ static int f_gold ( int x ) { int dp [ ] = new int [ x + 1 ] ; dp [ 0 ] = dp [ 1 ] = 1 ; for ( int i = 2 ; i <= x ; i ++ ) dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ] ; return dp [ x ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(22); param0.add(92); param0.add(15); param0.add(81); param0.add(3); param0.add(30); param0.add(88); param0.add(4); param0.add(43); param0.add(92); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int x ) { int dp [ x + 1 ]; dp [ 0 ] = dp [ 1 ] = 1; for ( int i = 2; i <= x; i ++ ) dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ]; return dp [ x ]; } int main() { int n_success = 0; vector param0 {22,92,15,81,3,30,88,4,43,92}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM{ static boolean f_gold ( int arr [ ] , int n , int x ) { int i ; for ( i = 0 ; i < n - 1 ; i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break ; int l = ( i + 1 ) % n ; int r = i ; while ( l != r ) { if ( arr [ l ] + arr [ r ] == x ) return true ; if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n ; else r = ( n + r - 1 ) % n ; } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{20,68,40,19,74,69}); param0.add(new int[]{-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}); param0.add(new int[]{1,1,0}); param0.add(new int[]{12,22,38,76,80,86}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(17); param1.add(41); param1.add(26); param1.add(4); param1.add(28); param1.add(2); param1.add(4); param1.add(26); param1.add(17); param1.add(21); List param2 = new ArrayList<>(); param2.add(30); param2.add(10); param2.add(1); param2.add(88); param2.add(94); param2.add(60); param2.add(3); param2.add(37); param2.add(20); param2.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," using namespace std; bool f_gold ( int arr [ ], int n, int x ) { int i; for ( i = 0; i < n - 1; i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break; int l = ( i + 1 ) % n; int r = i; while ( l != r ) { if ( arr [ l ] + arr [ r ] == x ) return true; if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n; else r = ( n + r - 1 ) % n; } return false; } int main() { int n_success = 0; vector> param0 { {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}, {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}, {0,0,0,0,0,0,0,0,0,0,0,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}, {20,68,40,19,74,69}, {-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}, {1,1,0}, {12,22,38,76,80,86}, {-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}, {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}, {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}}; vector param1 {17,41,26,4,28,2,4,26,17,21}; vector param2 {30,10,1,88,-94,60,3,37,20,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,), ([20, 68, 40, 19, 74, 69],4,88,), ([-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,), ([1, 1, 0],2,60,), ([12, 22, 38, 76, 80, 86],4,3,), ([-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,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],17,20,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_8_MATRIX_CHAIN_MULTIPLICATION_1{ static int f_gold ( int p [ ] , int n ) { int m [ ] [ ] = new int [ n ] [ n ] ; int i , j , k , L , q ; for ( i = 1 ; i < n ; i ++ ) m [ i ] [ i ] = 0 ; for ( L = 2 ; L < n ; L ++ ) { for ( i = 1 ; i < n - L + 1 ; i ++ ) { j = i + L - 1 ; if ( j == n ) continue ; m [ i ] [ j ] = Integer . MAX_VALUE ; for ( k = i ; k <= j - 1 ; k ++ ) { q = m [ i ] [ k ] + m [ k + 1 ] [ j ] + p [ i - 1 ] * p [ k ] * p [ j ] ; if ( q < m [ i ] [ j ] ) m [ i ] [ j ] = q ; } } } return m [ 1 ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,11,17,26,33,37,51,62,70,71,73,74,74,81,82,83,90,95,98,98}); param0.add(new int[]{-50,74,-8,2,-24,28,-86,34,-36,92,-70,-98}); param0.add(new int[]{0,0,0,1,1,1,1}); param0.add(new int[]{4,73,3,88,79,40,25,58,39,53,32,20,95,60,60,98,23,95,42,26,95,14,43,97,30,83,29,37,74,72,37,31,32,83,57,40,56,95,8,79,67,62}); param0.add(new int[]{-92,-88,-88,-88,-86,-84,-80,-78,-76,-74,-72,-68,-68,-66,-62,-42,-34,-30,-28,-24,-20,-14,-12,-10,-8,-8,-8,6,10,26,26,36,38,42,46,48,48,54,54,58,60,66,70,76,78,80,82,98}); param0.add(new int[]{1,1,0,1,0,0,1}); param0.add(new int[]{8,25,38,39,41,57,71,89}); param0.add(new int[]{76,-28,20,62,-44,8,-46,52,26,76,22,38,-36,10,2,-86,42,-62,-68,-56,10}); param0.add(new int[]{0,0,0,0,1,1,1}); param0.add(new int[]{98,96,76,76,8,4,53,34,54,10,98,46,58,7,36,72,32,59,52,99,40,52,50,43,26,93,76,90,12,82,31,50,55,34,61,78}); List param1 = new ArrayList<>(); param1.add(20); param1.add(10); param1.add(3); param1.add(41); param1.add(47); param1.add(4); param1.add(6); param1.add(18); param1.add(5); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int p [ ], int n ) { int m [ n ] [ n ]; int i, j, k, L, q; for ( i = 1; i < n; i ++ ) m [ i ] [ i ] = 0; for ( L = 2; L < n; L ++ ) { for ( i = 1; i < n - L + 1; i ++ ) { j = i + L - 1; m [ i ] [ j ] = INT_MAX; for ( k = i; k <= j - 1; k ++ ) { q = m [ i ] [ k ] + m [ k + 1 ] [ j ] + p [ i - 1 ] * p [ k ] * p [ j ]; if ( q < m [ i ] [ j ] ) m [ i ] [ j ] = q; } } } return m [ 1 ] [ n - 1 ]; } int main() { int n_success = 0; vector> param0 {{1,4,11,17,26,33,37,51,62,70,71,73,74,74,81,82,83,90,95,98,98},{-50,74,-8,2,-24,28,-86,34,-36,92,-70,-98},{0,0,0,1,1,1,1},{4,73,3,88,79,40,25,58,39,53,32,20,95,60,60,98,23,95,42,26,95,14,43,97,30,83,29,37,74,72,37,31,32,83,57,40,56,95,8,79,67,62},{-92,-88,-88,-88,-86,-84,-80,-78,-76,-74,-72,-68,-68,-66,-62,-42,-34,-30,-28,-24,-20,-14,-12,-10,-8,-8,-8,6,10,26,26,36,38,42,46,48,48,54,54,58,60,66,70,76,78,80,82,98},{1,1,0,1,0,0,1},{8,25,38,39,41,57,71,89},{76,-28,20,62,-44,8,-46,52,26,76,22,38,-36,10,2,-86,42,-62,-68,-56,10},{0,0,0,0,1,1,1},{98,96,76,76,8,4,53,34,54,10,98,46,58,7,36,72,32,59,52,99,40,52,50,43,26,93,76,90,12,82,31,50,55,34,61,78}}; vector param1 {20,10,3,41,47,4,6,18,5,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_EQUAL_POINT_STRING_BRACKETS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_EQUAL_POINT_STRING_BRACKETS{ static int f_gold ( String str ) { int len = str . length ( ) ; int open [ ] = new int [ len + 1 ] ; int close [ ] = new int [ len + 1 ] ; int index = - 1 ; open [ 0 ] = 0 ; close [ len ] = 0 ; if ( str . charAt ( 0 ) == '(' ) open [ 1 ] = 1 ; if ( str . charAt ( len - 1 ) == ')' ) close [ len - 1 ] = 1 ; for ( int i = 1 ; i < len ; i ++ ) { if ( str . charAt ( i ) == '(' ) open [ i + 1 ] = open [ i ] + 1 ; else open [ i + 1 ] = open [ i ] ; } for ( int i = len - 2 ; i >= 0 ; i -- ) { if ( str . charAt ( i ) == ')' ) close [ i ] = close [ i + 1 ] + 1 ; else close [ i ] = close [ i + 1 ] ; } if ( open [ len ] == 0 ) return len ; if ( close [ 0 ] == 0 ) return 0 ; for ( int i = 0 ; i <= len ; i ++ ) if ( open [ i ] == close [ i ] ) index = i ; return index ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""(())))(""); param0.add(""))""); param0.add(""((""); param0.add(""))(()(()()(""); param0.add("")((()(()""); param0.add(""))(()""); param0.add(""()))""); param0.add(""()""); param0.add(""1100110""); param0.add(""dhfSnebD""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : l = len ( str ) open = [ None ] * ( l + 1 ) close = [ None ] * ( l + 1 ) index = - 1 open [ 0 ] = 0 close [ l ] = 0 if ( str [ 0 ] == '(' ) : open [ 1 ] = 1 if ( str [ l - 1 ] == ')' ) : close [ l - 1 ] = 1 for i in range ( 1 , l ) : if ( str [ i ] == '(' ) : open [ i + 1 ] = open [ i ] + 1 else : open [ i + 1 ] = open [ i ] for i in range ( l - 2 , - 1 , - 1 ) : if ( str [ i ] == ')' ) : close [ i ] = close [ i + 1 ] + 1 else : close [ i ] = close [ i + 1 ] if ( open [ l ] == 0 ) : return len if ( close [ 0 ] == 0 ) : return 0 for i in range ( l + 1 ) : if ( open [ i ] == close [ i ] ) : index = i return index "," using namespace std; int f_gold ( string str ) { int len = str . length ( ); int open [ len + 1 ], close [ len + 1 ]; int index = - 1; memset ( open, 0, sizeof ( open ) ); memset ( close, 0, sizeof ( close ) ); open [ 0 ] = 0; close [ len ] = 0; if ( str [ 0 ] == '(' ) open [ 1 ] = 1; if ( str [ len - 1 ] == ')' ) close [ len - 1 ] = 1; for ( int i = 1; i < len; i ++ ) { if ( str [ i ] == '(' ) open [ i + 1 ] = open [ i ] + 1; else open [ i + 1 ] = open [ i ]; } for ( int i = len - 2; i >= 0; i -- ) { if ( str [ i ] == ')' ) close [ i ] = close [ i + 1 ] + 1; else close [ i ] = close [ i + 1 ]; } if ( open [ len ] == 0 ) return len; if ( close [ 0 ] == 0 ) return 0; for ( int i = 0; i <= len; i ++ ) if ( open [ i ] == close [ i ] ) index = i; return index; } int main() { int n_success = 0; vector param0 {""(())))("",""))"",""(("",""))(()(()()("","")((()(()"",""))(()"",""()))"",""()"",""1100110"",""dhfSnebD""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (""(())))("",), (""))"",), (""(("",), (""))(()(()()("",), ("")((()(()"",), (""))(()"",), (""()))"",), (""()"",), ('1100110',), ('dhfSnebD',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CIRCLE_LATTICE_POINTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CIRCLE_LATTICE_POINTS{ static int f_gold ( int r ) { if ( r <= 0 ) return 0 ; int result = 4 ; for ( int x = 1 ; x < r ; x ++ ) { int ySquare = r * r - x * x ; int y = ( int ) Math . sqrt ( ySquare ) ; if ( y * y == ySquare ) result += 4 ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(34); param0.add(56); param0.add(90); param0.add(47); param0.add(36); param0.add(63); param0.add(21); param0.add(76); param0.add(18); param0.add(75); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int r ) { if ( r <= 0 ) return 0; int result = 4; for ( int x = 1; x < r; x ++ ) { int ySquare = r * r - x * x; int y = sqrt ( ySquare ); if ( y * y == ySquare ) result += 4; } return result; } int main() { int n_success = 0; vector param0 {34,56,90,47,36,63,21,76,18,75}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (34,), (56,), (90,), (47,), (36,), (63,), (21,), (76,), (18,), (75,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_1{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > hM = new HashMap < Integer , Integer > ( ) ; int sum = 0 ; int max_len = 0 ; int ending_index = - 1 ; int start_index = 0 ; for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = ( arr [ i ] == 0 ) ? - 1 : 1 ; } for ( int i = 0 ; i < n ; i ++ ) { sum += arr [ i ] ; if ( sum == 0 ) { max_len = i + 1 ; ending_index = i ; } if ( hM . containsKey ( sum + n ) ) { if ( max_len < i - hM . get ( sum + n ) ) { max_len = i - hM . get ( sum + n ) ; ending_index = i ; } } else hM . put ( sum + n , i ) ; } for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1 ; } int end = ending_index - max_len + 1 ; System . out . println ( end + "" to "" + ending_index ) ; return max_len ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,6,16,16,18,19,22,39,40,42,60,66,69,70,70,73,74,80,99}); param0.add(new int[]{-88,-66}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{85,98,67,27,98,13,96,32,26,44,32}); param0.add(new int[]{-96,-94,-90,-88,-86,-66,-64,-52,-46,-46,-42,-40,-38,-32,-28,-22,-16,-10,-8,-8,-4,2,10,26,26,28,28,40,40,42,50,60,66,68,72,74,86,92,94}); param0.add(new int[]{1,1,1,1,1,1,0,0,0}); param0.add(new int[]{25,64,86}); param0.add(new int[]{-4,78,-76,12,4,-38,-98,-26,-8,-98,56,0,-34,36,-90,-36,54,-68,12,-44,62,60,-34,-52,18}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{2,25,45,98,71,8,58,94,53}); List param1 = new ArrayList<>(); param1.add(9); param1.add(1); param1.add(19); param1.add(8); param1.add(34); param1.add(4); param1.add(1); param1.add(17); param1.add(9); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hM; int sum = 0; int max_len = 0; int ending_index = - 1; for ( int i = 0; i < n; i ++ ) arr [ i ] = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int i = 0; i < n; i ++ ) { sum += arr [ i ]; if ( sum == 0 ) { max_len = i + 1; ending_index = i; } if ( hM . find ( sum + n ) != hM . end ( ) ) { if ( max_len < i - hM [ sum + n ] ) { max_len = i - hM [ sum + n ]; ending_index = i; } } else hM [ sum + n ] = i; } for ( int i = 0; i < n; i ++ ) arr [ i ] = ( arr [ i ] == - 1 ) ? 0 : 1; printf ( ""%d to %d\n"", ending_index - max_len + 1, ending_index ); return max_len; } int main() { int n_success = 0; vector> param0 {{3,6,16,16,18,19,22,39,40,42,60,66,69,70,70,73,74,80,99},{-88,-66},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{85,98,67,27,98,13,96,32,26,44,32},{-96,-94,-90,-88,-86,-66,-64,-52,-46,-46,-42,-40,-38,-32,-28,-22,-16,-10,-8,-8,-4,2,10,26,26,28,28,40,40,42,50,60,66,68,72,74,86,92,94},{1,1,1,1,1,1,0,0,0},{25,64,86},{-4,78,-76,12,4,-38,-98,-26,-8,-98,56,0,-34,36,-90,-36,54,-68,12,-44,62,60,-34,-52,18},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{2,25,45,98,71,8,58,94,53}}; vector param1 {9,1,19,8,34,4,1,17,9,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 6, 16, 16, 18, 19, 22, 39, 40, 42, 60, 66, 69, 70, 70, 73, 74, 80, 99],9,), ([-88, -66],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],19,), ([85, 98, 67, 27, 98, 13, 96, 32, 26, 44, 32],8,), ([-96, -94, -90, -88, -86, -66, -64, -52, -46, -46, -42, -40, -38, -32, -28, -22, -16, -10, -8, -8, -4, 2, 10, 26, 26, 28, 28, 40, 40, 42, 50, 60, 66, 68, 72, 74, 86, 92, 94],34,), ([1, 1, 1, 1, 1, 1, 0, 0, 0],4,), ([25, 64, 86],1,), ([-4, 78, -76, 12, 4, -38, -98, -26, -8, -98, 56, 0, -34, 36, -90, -36, 54, -68, 12, -44, 62, 60, -34, -52, 18],17,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],9,), ([2, 25, 45, 98, 71, 8, 58, 94, 53],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_AVERAGE_SUM_PARTITION_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_AVERAGE_SUM_PARTITION_ARRAY{ static double f_gold ( int [ ] A , int K ) { int n = A . length ; double [ ] pre_sum = new double [ n + 1 ] ; pre_sum [ 0 ] = 0 ; for ( int i = 0 ; i < n ; i ++ ) pre_sum [ i + 1 ] = pre_sum [ i ] + A [ i ] ; double [ ] dp = new double [ n ] ; double sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) dp [ i ] = ( pre_sum [ n ] - pre_sum [ i ] ) / ( n - i ) ; for ( int k = 0 ; k < K - 1 ; k ++ ) for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) dp [ i ] = Math . max ( dp [ i ] , ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ) ; return dp [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{1,0,0,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0}); param0.add(new int[]{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}); param0.add(new int[]{28,-52,48,96,54,94,60,18}); param0.add(new int[]{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}); param0.add(new int[]{26,80,12,87,90,98,46,91,38,46,20,64,53,4,60,87,44,88,22,30}); List param1 = new ArrayList<>(); param1.add(24); param1.add(26); param1.add(15); param1.add(36); param1.add(36); param1.add(16); param1.add(34); param1.add(7); param1.add(31); param1.add(19); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] ) ; "," using namespace std; double f_gold ( vector < int > & A, int K ) { int n = A . size ( ); double pre_sum [ n + 1 ]; pre_sum [ 0 ] = 0; for ( int i = 0; i < n; i ++ ) pre_sum [ i + 1 ] = pre_sum [ i ] + A [ i ]; double dp [ n ] = { 0 }; double sum = 0; for ( int i = 0; i < n; i ++ ) dp [ i ] = ( pre_sum [ n ] - pre_sum [ i ] ) / ( n - i ); for ( int k = 0; k < K - 1; k ++ ) for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) dp [ i ] = max ( dp [ i ], ( pre_sum [ j ] - pre_sum [ i ] ) / ( j - i ) + dp [ j ] ); return dp [ 0 ]; } int main() { int n_success = 0; vector> param0 {{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},{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},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{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},{-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},{1,0,0,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0},{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},{28,-52,48,96,54,94,60,18},{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},{26,80,12,87,90,98,46,91,38,46,20,64,53,4,60,87,44,88,22,30}}; vector param1 {24,26,15,36,36,16,34,7,31,19}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 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,), ([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,), ([-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,), ([1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0],16,), ([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,), ([28, -52, 48, 96, 54, 94, 60, 18],7,), ([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,), ([26, 80, 12, 87, 90, 98, 46, 91, 38, 46, 20, 64, 53, 4, 60, 87, 44, 88, 22, 30],19,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FRIENDS_PAIRING_PROBLEM_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FRIENDS_PAIRING_PROBLEM_2{ static int f_gold ( int n ) { int a = 1 , b = 2 , c = 0 ; if ( n <= 2 ) { return n ; } for ( int i = 3 ; i <= n ; i ++ ) { c = b + ( i - 1 ) * a ; a = b ; b = c ; } return c ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(24); param0.add(1); param0.add(91); param0.add(90); param0.add(89); param0.add(29); param0.add(3); param0.add(60); param0.add(75); param0.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," using namespace std; int f_gold ( int n ) { int a = 1, b = 2, c = 0; if ( n <= 2 ) { return n; } for ( int i = 3; i <= n; i ++ ) { c = b + ( i - 1 ) * a; a = b; b = c; } return c; } int main() { int n_success = 0; vector param0 {24,1,91,90,89,29,3,60,75,14}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (24,), (1,), (91,), (90,), (89,), (29,), (3,), (60,), (75,), (14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K{ static int f_gold ( int a [ ] , int n , int k ) { int result = 0 ; for ( int i = 0 ; i < n ; ++ i ) { if ( a [ i ] != 1 && a [ i ] > k ) { result = result + Math . min ( a [ i ] % k , k - a [ i ] % k ) ; } else { result = result + k - a [ i ] ; } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,7,27,32,36,37,44,48,50,64,86}); param0.add(new int[]{-22,6,-20,60,-74,98,52,-22}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{77,11,51,11,84,79,43,12,14,50,15,6,85,32,74,49,7,2,58}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{9,22,27,27,37,53,53,56,63,73,76,81,82}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{42,69,93,82,8,23,73,1,77,39,49,4,95,85}); List param1 = new ArrayList<>(); param1.add(5); param1.add(5); param1.add(23); param1.add(9); param1.add(12); param1.add(36); param1.add(10); param1.add(18); param1.add(19); param1.add(12); List param2 = new ArrayList<>(); param2.add(10); param2.add(4); param2.add(29); param2.add(17); param2.add(22); param2.add(31); param2.add(11); param2.add(19); param2.add(22); param2.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int a [ ], int n, int k ) { int result = 0; for ( int i = 0; i < n; ++ i ) { if ( a [ i ] != 1 && a [ i ] > k ) { result = result + min ( a [ i ] % k, k - a [ i ] % k ); } else { result = result + k - a [ i ]; } } return result; } int main() { int n_success = 0; vector> param0 {{3,7,27,32,36,37,44,48,50,64,86},{-22,6,-20,60,-74,98,52,-22},{0,0,0,0,0,0,0,0,0,0,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},{77,11,51,11,84,79,43,12,14,50,15,6,85,32,74,49,7,2,58},{-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},{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},{9,22,27,27,37,53,53,56,63,73,76,81,82},{-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},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{42,69,93,82,8,23,73,1,77,39,49,4,95,85}}; vector param1 {5,5,23,9,12,36,10,18,19,12}; vector param2 {10,4,29,17,22,31,11,19,22,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 7, 27, 32, 36, 37, 44, 48, 50, 64, 86],5,10,), ([-22, 6, -20, 60, -74, 98, 52, -22],5,4,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,), ([77, 11, 51, 11, 84, 79, 43, 12, 14, 50, 15, 6, 85, 32, 74, 49, 7, 2, 58],9,17,), ([-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,), ([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,), ([9, 22, 27, 27, 37, 53, 53, 56, 63, 73, 76, 81, 82],10,11,), ([-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,), ([0, 0, 0, 0, 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,), ([42, 69, 93, 82, 8, 23, 73, 1, 77, 39, 49, 4, 95, 85],12,13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_PRODUCT_K_INTEGERS_ARRAY_POSITIVE_INTEGERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_PRODUCT_K_INTEGERS_ARRAY_POSITIVE_INTEGERS{ public static int f_gold ( int [ ] arr , int n , int k ) { PriorityQueue < Integer > pq = new PriorityQueue < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) pq . add ( arr [ i ] ) ; int count = 0 , ans = 1 ; while ( pq . isEmpty ( ) == false && count < k ) { ans = ans * pq . element ( ) ; pq . remove ( ) ; count ++ ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{57,66,91}); param0.add(new int[]{-44,86,28,-70,-12,96,-10,74,-50,-52,-6,64,-62,92,-24,90,-26,-4,-92,-24,-84,76,-92,62,-62,-86,-86,-14,50,30,62,2,-88,-78,-48}); param0.add(new int[]{0,0,1,1}); param0.add(new int[]{99,85,37,27,55,20,76,38,33,78,24,80,74,42,15,16,97,51,71,92,18,63,47,10,6,72,40,21,14,68,98,49,48,64,50,66,44,1,26,55,61,43,9,16,8,42,51,98,1}); param0.add(new int[]{-58,-12,16,18,24}); param0.add(new int[]{0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,1}); param0.add(new int[]{5,10,13,14,19,21,22,25,28,36,39,44,46,53,54,55,55,67,73,75,77,78,80,84,91,94,96}); param0.add(new int[]{18,-44,46,64,86,-36,8,-10,-50,-98,-6,-38,-34,14,-34,86,58,-30,76,6,38,98,78,56,-56,-66,-58,62,92,-94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,74,28,75,84,52,5,19,80,12,76,14,28,63,30,29,16,74,28,48,97,77,62,19,67,26,14,44,52,86,9,31,41,14,66,27,36,98,48,37,2,12,2}); List param1 = new ArrayList<>(); param1.add(2); param1.add(29); param1.add(3); param1.add(36); param1.add(2); param1.add(8); param1.add(23); param1.add(23); param1.add(13); param1.add(27); List param2 = new ArrayList<>(); param2.add(2); param2.add(21); param2.add(3); param2.add(47); param2.add(3); param2.add(15); param2.add(23); param2.add(20); param2.add(17); param2.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n, int k ) { priority_queue < int, vector < int >, greater < int > > pq; for ( int i = 0; i < n; i ++ ) pq . push ( arr [ i ] ); int count = 0, ans = 1; while ( pq . empty ( ) == false && count < k ) { ans = ans * pq . top ( ); pq . pop ( ); count ++; } return ans; } int main() { int n_success = 0; vector> param0 {{57,66,91},{-44,86,28,-70,-12,96,-10,74,-50,-52,-6,64,-62,92,-24,90,-26,-4,-92,-24,-84,76,-92,62,-62,-86,-86,-14,50,30,62,2,-88,-78,-48},{0,0,1,1},{99,85,37,27,55,20,76,38,33,78,24,80,74,42,15,16,97,51,71,92,18,63,47,10,6,72,40,21,14,68,98,49,48,64,50,66,44,1,26,55,61,43,9,16,8,42,51,98,1},{-58,-12,16,18,24},{0,0,1,0,0,1,0,1,0,0,0,0,0,1,1,1},{5,10,13,14,19,21,22,25,28,36,39,44,46,53,54,55,55,67,73,75,77,78,80,84,91,94,96},{18,-44,46,64,86,-36,8,-10,-50,-98,-6,-38,-34,14,-34,86,58,-30,76,6,38,98,78,56,-56,-66,-58,62,92,-94},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{69,74,28,75,84,52,5,19,80,12,76,14,28,63,30,29,16,74,28,48,97,77,62,19,67,26,14,44,52,86,9,31,41,14,66,27,36,98,48,37,2,12,2}}; vector param1 {2,29,3,36,2,8,23,23,13,27}; vector param2 {2,21,3,47,3,15,23,20,17,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_PALINDROME_SUB_STRINGS_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PALINDROME_SUB_STRINGS_STRING{ static int f_gold ( char str [ ] , int n ) { int dp [ ] [ ] = new int [ n ] [ n ] ; boolean P [ ] [ ] = new boolean [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) P [ i ] [ i ] = true ; for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( str [ i ] == str [ i + 1 ] ) { P [ i ] [ i + 1 ] = true ; dp [ i ] [ i + 1 ] = 1 ; } } for ( int gap = 2 ; gap < n ; gap ++ ) { for ( int i = 0 ; i < n - gap ; i ++ ) { int j = gap + i ; if ( str [ i ] == str [ j ] && P [ i + 1 ] [ j - 1 ] ) P [ i ] [ j ] = true ; if ( P [ i ] [ j ] == true ) dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] + 1 - dp [ i + 1 ] [ j - 1 ] ; else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ] ; } } return dp [ 0 ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'E','E','J','P','T','U','X','Y','Z','e','f','h','l','m','n','o','z'}); param0.add(new char[]{'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'}); param0.add(new char[]{'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'}); param0.add(new char[]{'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'}); param0.add(new char[]{'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'}); param0.add(new char[]{'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'}); param0.add(new char[]{'C','C','D','F','L','M','P','X','a','f','i','j','w'}); param0.add(new char[]{'7','9','0','2','8','0','7','5','9','4','5','4','8','1','9','5','3','2','4','1','2'}); param0.add(new char[]{'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'}); param0.add(new char[]{'m','X','N','M'}); List param1 = new ArrayList<>(); param1.add(11); param1.add(27); param1.add(23); param1.add(27); param1.add(35); param1.add(43); param1.add(9); param1.add(16); param1.add(32); param1.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; int f_gold ( char str [ ], int n ) { int dp [ n ] [ n ]; memset ( dp, 0, sizeof ( dp ) ); bool P [ n ] [ n ]; memset ( P, false, sizeof ( P ) ); for ( int i = 0; i < n; i ++ ) P [ i ] [ i ] = true; for ( int i = 0; i < n - 1; i ++ ) { if ( str [ i ] == str [ i + 1 ] ) { P [ i ] [ i + 1 ] = true; dp [ i ] [ i + 1 ] = 1; } } for ( int gap = 2; gap < n; gap ++ ) { for ( int i = 0; i < n - gap; i ++ ) { int j = gap + i; if ( str [ i ] == str [ j ] && P [ i + 1 ] [ j - 1 ] ) P [ i ] [ j ] = true; if ( P [ i ] [ j ] == true ) dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] + 1 - dp [ i + 1 ] [ j - 1 ]; else dp [ i ] [ j ] = dp [ i ] [ j - 1 ] + dp [ i + 1 ] [ j ] - dp [ i + 1 ] [ j - 1 ]; } } return dp [ 0 ] [ n - 1 ]; } int main() { int n_success = 0; vector> param0 {{'E','E','J','P','T','U','X','Y','Z','e','f','h','l','m','n','o','z'},{'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'},{'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'},{'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'},{'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'},{'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'},{'C','C','D','F','L','M','P','X','a','f','i','j','w'},{'7','9','0','2','8','0','7','5','9','4','5','4','8','1','9','5','3','2','4','1','2'},{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'},{'m','X','N','M'}}; vector param1 {11,27,23,27,35,43,9,16,32,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (['E', 'E', 'J', 'P', 'T', 'U', 'X', 'Y', 'Z', 'e', 'f', 'h', 'l', 'm', 'n', 'o', 'z'],11,), (['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,), (['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,), (['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,), (['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,), (['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,), (['C', 'C', 'D', 'F', 'L', 'M', 'P', 'X', 'a', 'f', 'i', 'j', 'w'],9,), (['7', '9', '0', '2', '8', '0', '7', '5', '9', '4', '5', '4', '8', '1', '9', '5', '3', '2', '4', '1', '2'],16,), (['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,), (['m', 'X', 'N', 'M'],3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MIDDLE_OF_THREE_USING_MINIMUM_COMPARISONS{ public static int f_gold ( int a , int b , int c ) { if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b ; else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a ; else return c ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(56); param0.add(56); param0.add(36); param0.add(71); param0.add(3); param0.add(84); param0.add(30); param0.add(82); param0.add(90); param0.add(38); List param1 = new ArrayList<>(); param1.add(5); param1.add(60); param1.add(56); param1.add(54); param1.add(70); param1.add(57); param1.add(80); param1.add(54); param1.add(70); param1.add(4); List param2 = new ArrayList<>(); param2.add(82); param2.add(17); param2.add(51); param2.add(6); param2.add(81); param2.add(47); param2.add(85); param2.add(32); param2.add(55); param2.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int a, int b, int c ) { if ( ( a < b && b < c ) || ( c < b && b < a ) ) return b; else if ( ( b < a && a < c ) || ( c < a && a < b ) ) return a; else return c; } int main() { int n_success = 0; vector param0 {56,56,36,71,3,84,30,82,90,38}; vector param1 {5,60,56,54,70,57,80,54,70,4}; vector param2 {82,17,51,6,81,47,85,32,55,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (56,5,82,), (56,60,17,), (36,56,51,), (71,54,6,), (3,70,81,), (84,57,47,), (30,80,85,), (82,54,32,), (90,70,55,), (38,4,5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SWAP_TWO_NIBBLES_BYTE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SWAP_TWO_NIBBLES_BYTE{ static int f_gold ( int x ) { return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(99); param0.add(66); param0.add(97); param0.add(95); param0.add(42); param0.add(95); param0.add(89); param0.add(3); param0.add(84); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 ) "," using namespace std; int f_gold ( int x ) { return ( ( x & 0x0F ) << 4 | ( x & 0xF0 ) >> 4 ); } int main() { int n_success = 0; vector param0 {57,99,66,97,95,42,95,89,3,84}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,), (99,), (66,), (97,), (95,), (42,), (95,), (89,), (3,), (84,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_1{ static int f_gold ( int n ) { int ans = 0 , temp = 0 , num ; for ( int i = 1 ; i <= n && temp < n ; i ++ ) { temp = i - 1 ; num = 1 ; while ( temp < n ) { if ( temp + i <= n ) ans += ( i * num ) ; else ans += ( ( n - temp ) * num ) ; temp += i ; num ++ ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(35); param0.add(93); param0.add(7); param0.add(81); param0.add(80); param0.add(47); param0.add(7); param0.add(41); param0.add(59); param0.add(34); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int n ) { int ans = 0, temp = 0, num; for ( int i = 1; i <= n && temp < n; i ++ ) { temp = i - 1; num = 1; while ( temp < n ) { if ( temp + i <= n ) ans += ( i * num ); else ans += ( ( n - temp ) * num ); temp += i; num ++; } } return ans; } int main() { int n_success = 0; vector param0 {35,93,7,81,80,47,7,41,59,34}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (35,), (93,), (7,), (81,), (80,), (47,), (7,), (41,), (59,), (34,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_FIBONACCI_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_FIBONACCI_NUMBERS{ static int f_gold ( int n ) { if ( n <= 0 ) return 0 ; int fibo [ ] = new int [ n + 1 ] ; fibo [ 0 ] = 0 ; fibo [ 1 ] = 1 ; int sum = fibo [ 0 ] + fibo [ 1 ] ; for ( int i = 2 ; i <= n ; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ] ; sum += fibo [ i ] ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(9); param0.add(50); param0.add(7); param0.add(21); param0.add(21); param0.add(91); param0.add(11); param0.add(25); param0.add(62); param0.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int n ) { if ( n <= 0 ) return 0; int fibo [ n + 1 ]; fibo [ 0 ] = 0, fibo [ 1 ] = 1; int sum = fibo [ 0 ] + fibo [ 1 ]; for ( int i = 2; i <= n; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ]; sum += fibo [ i ]; } return sum; } int main() { int n_success = 0; vector param0 {9,50,7,21,21,91,11,25,62,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (9,), (50,), (7,), (21,), (21,), (91,), (11,), (25,), (62,), (4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS{ static int f_gold ( int arr1 [ ] , int n , int arr2 [ ] , int m ) { int table [ ] = new int [ m ] ; for ( int j = 0 ; j < m ; j ++ ) table [ j ] = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int current = 0 ; for ( int j = 0 ; j < m ; j ++ ) { if ( arr1 [ i ] == arr2 [ j ] ) if ( current + 1 > table [ j ] ) table [ j ] = current + 1 ; if ( arr1 [ i ] > arr2 [ j ] ) if ( table [ j ] > current ) current = table [ j ] ; } } int result = 0 ; for ( int i = 0 ; i < m ; i ++ ) if ( table [ i ] > result ) result = table [ i ] ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,7,9,35,43,51,51,66,88}); param0.add(new int[]{-52,52,-92,-46,-94,30,-36,18,-98,22,-36,96,-88,-50,50}); param0.add(new int[]{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}); param0.add(new int[]{5,74,29}); param0.add(new int[]{-84,-74,-70,-62,-56,-56,-52,-2,6,24,28,44,44,52}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{70,-64,0,52,32,-98,38,-8,34,70,98,58,-48,-60,-28,-22,-72,82,-98,-36}); param0.add(new int[]{0,0,1,1,1,1,1,1}); param0.add(new int[]{46,87,98}); List param1 = new ArrayList<>(); param1.add(5); param1.add(7); param1.add(36); param1.add(1); param1.add(8); param1.add(17); param1.add(19); param1.add(16); param1.add(7); param1.add(2); List param2 = new ArrayList<>(); param2.add(new int[]{10,21,38,50,65,67,87,93,99}); param2.add(new int[]{-58,40,56,-62,-92,-94,40,18,-2,-76,-78,-14,44,84,4}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,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}); param2.add(new int[]{57,33,48}); param2.add(new int[]{-98,-96,-88,-66,-32,-26,-24,-20,-4,20,48,74,90,96}); param2.add(new int[]{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}); param2.add(new int[]{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}); param2.add(new int[]{-18,88,-40,-52,30,-10,-18,-56,84,-22,-64,80,-14,-64,40,92,48,-8,24,82}); param2.add(new int[]{0,1,1,1,1,1,1,1}); param2.add(new int[]{67,31,54}); List param3 = new ArrayList<>(); param3.add(8); param3.add(10); param3.add(22); param3.add(1); param3.add(12); param3.add(15); param3.add(14); param3.add(12); param3.add(7); param3.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr1 [ ], int n, int arr2 [ ], int m ) { int table [ m ]; for ( int j = 0; j < m; j ++ ) table [ j ] = 0; for ( int i = 0; i < n; i ++ ) { int current = 0; for ( int j = 0; j < m; j ++ ) { if ( arr1 [ i ] == arr2 [ j ] ) if ( current + 1 > table [ j ] ) table [ j ] = current + 1; if ( arr1 [ i ] > arr2 [ j ] ) if ( table [ j ] > current ) current = table [ j ]; } } int result = 0; for ( int i = 0; i < m; i ++ ) if ( table [ i ] > result ) result = table [ i ]; return result; } int main() { int n_success = 0; vector> param0 {{1,7,9,35,43,51,51,66,88},{-52,52,-92,-46,-94,30,-36,18,-98,22,-36,96,-88,-50,50},{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},{5,74,29},{-84,-74,-70,-62,-56,-56,-52,-2,6,24,28,44,44,52},{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},{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},{70,-64,0,52,32,-98,38,-8,34,70,98,58,-48,-60,-28,-22,-72,82,-98,-36},{0,0,1,1,1,1,1,1},{46,87,98}}; vector param1 {5,7,36,1,8,17,19,16,7,2}; vector> param2 {{10,21,38,50,65,67,87,93,99},{-58,40,56,-62,-92,-94,40,18,-2,-76,-78,-14,44,84,4},{0,0,0,0,0,0,0,0,0,0,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},{57,33,48},{-98,-96,-88,-66,-32,-26,-24,-20,-4,20,48,74,90,96},{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},{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},{-18,88,-40,-52,30,-10,-18,-56,84,-22,-64,80,-14,-64,40,92,48,-8,24,82},{0,1,1,1,1,1,1,1},{67,31,54}}; vector param3 {8,10,22,1,12,15,14,12,7,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],¶m2[i].front(),param3[i]) == f_gold(¶m0[i].front(),param1[i],¶m2[i].front(),param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 7, 9, 35, 43, 51, 51, 66, 88],5,[10, 21, 38, 50, 65, 67, 87, 93, 99],8,), ([-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,), ([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,), ([5, 74, 29],1,[57, 33, 48],1,), ([-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, 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,), ([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,), ([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,), ([0, 0, 1, 1, 1, 1, 1, 1],7,[0, 1, 1, 1, 1, 1, 1, 1],7,), ([46, 87, 98],2,[67, 31, 54],2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUBSETS_DISTINCT_EVEN_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUBSETS_DISTINCT_EVEN_NUMBERS{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > us = new HashSet < > ( ) ; int even_count = 0 ; for ( int i = 0 ; i < n ; i ++ ) if ( arr [ i ] % 2 == 0 ) us . add ( arr [ i ] ) ; even_count = us . size ( ) ; return ( int ) ( Math . pow ( 2 , even_count ) - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,8,14,22,24,24,26,32,33,46,50,51,51,52,53,71,76,93}); param0.add(new int[]{-62,30,12,30,22,6,-42,80,-62,34,32,-72,-6,-16,42,82,-78,-20,-96,44,-24,-50,-50,-94,72,-90,38,84,-86,-24,-62,86,94,6,90,12,-36,0,44,4,-78,-86,-12,-18,26,32,90,76}); param0.add(new int[]{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}); param0.add(new int[]{70,55,67,9,78,57,31,25}); param0.add(new int[]{-98,-90,-80,-80,-68,-68,-50,-44,-38,-34,-18,-16,-10,-8,14,14,16,24,26,28,30,40,44,46,52,54,58,66,74,74,74,76,80,86,94,96}); param0.add(new int[]{0,1,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,1}); param0.add(new int[]{7,10,11,13,14,16,20,26,30,31,33,33,35,39,42,50,51,52,55,57,58,59,62,63,63,65,67,67,68,69,69,71,73,73,74,76,82,86,87,87,87,88,94,99}); param0.add(new int[]{-6,8,-14,2,-36,-44,-50,-4,-4,-22,94,-94,-62,4,-84,-82,88,84,28,76,-84,-72,14,-28,96,18,-56,-96,2,-66,62,-78,88,34,0,-48,-76,-84,-2,-98,58,38,56}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{75,92,42,5,53,78,42,97,99,56,23,16,90,1,79,49,63,95,12,21,82,31,10,35,34,80,22,73,68,68,48,11,15,60,24,57,74,18,30,57,66,97,78,65,79}); List param1 = new ArrayList<>(); param1.add(16); param1.add(47); param1.add(32); param1.add(6); param1.add(30); param1.add(11); param1.add(39); param1.add(23); param1.add(17); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_set < int > us; int even_count = 0; for ( int i = 0; i < n; i ++ ) if ( arr [ i ] % 2 == 0 ) us . insert ( arr [ i ] ); unordered_set < int > :: iterator itr; for ( itr = us . begin ( ); itr != us . end ( ); itr ++ ) even_count ++; return ( pow ( 2, even_count ) - 1 ); } int main() { int n_success = 0; vector> param0 {{2,8,14,22,24,24,26,32,33,46,50,51,51,52,53,71,76,93},{-62,30,12,30,22,6,-42,80,-62,34,32,-72,-6,-16,42,82,-78,-20,-96,44,-24,-50,-50,-94,72,-90,38,84,-86,-24,-62,86,94,6,90,12,-36,0,44,4,-78,-86,-12,-18,26,32,90,76},{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},{70,55,67,9,78,57,31,25},{-98,-90,-80,-80,-68,-68,-50,-44,-38,-34,-18,-16,-10,-8,14,14,16,24,26,28,30,40,44,46,52,54,58,66,74,74,74,76,80,86,94,96},{0,1,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,1},{7,10,11,13,14,16,20,26,30,31,33,33,35,39,42,50,51,52,55,57,58,59,62,63,63,65,67,67,68,69,69,71,73,73,74,76,82,86,87,87,87,88,94,99},{-6,8,-14,2,-36,-44,-50,-4,-4,-22,94,-94,-62,4,-84,-82,88,84,28,76,-84,-72,14,-28,96,18,-56,-96,2,-66,62,-78,88,34,0,-48,-76,-84,-2,-98,58,38,56},{0,0,0,0,0,0,0,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},{75,92,42,5,53,78,42,97,99,56,23,16,90,1,79,49,63,95,12,21,82,31,10,35,34,80,22,73,68,68,48,11,15,60,24,57,74,18,30,57,66,97,78,65,79}}; vector param1 {16,47,32,6,30,11,39,23,17,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1{ static int f_gold ( int arr [ ] , int low , int high ) { if ( high < low ) return 0 ; if ( high == low ) return low ; int mid = low + ( high - low ) / 2 ; if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return ( mid + 1 ) ; if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return mid ; if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr , low , mid - 1 ) ; return f_gold ( arr , mid + 1 , high ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,16,38,39,48,74,79}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{1}); param0.add(new int[]{7,11,20,21,22,27,30,30,34,35,36,37,38,60,61,63,63,69,70,75,80,84,88,97}); param0.add(new int[]{-2,70,-40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(6); param1.add(32); param1.add(16); param1.add(24); param1.add(29); param1.add(0); param1.add(23); param1.add(2); param1.add(30); param1.add(24); List param2 = new ArrayList<>(); param2.add(6); param2.add(21); param2.add(29); param2.add(26); param2.add(43); param2.add(0); param2.add(22); param2.add(1); param2.add(17); param2.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) "," using namespace std; int f_gold ( int arr [ ], int low, int high ) { if ( high < low ) return 0; if ( high == low ) return low; int mid = low + ( high - low ) / 2; if ( mid < high && arr [ mid + 1 ] < arr [ mid ] ) return ( mid + 1 ); if ( mid > low && arr [ mid ] < arr [ mid - 1 ] ) return mid; if ( arr [ high ] > arr [ mid ] ) return f_gold ( arr, low, mid - 1 ); return f_gold ( arr, mid + 1, high ); } int main() { int n_success = 0; vector> param0 {{4,16,38,39,48,74,79},{-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},{0,0,0,0,0,0,0,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},{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},{-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},{1},{7,11,20,21,22,27,30,30,34,35,36,37,38,60,61,63,63,69,70,75,80,84,88,97},{-2,70,-40},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{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}}; vector param1 {6,32,16,24,29,0,23,2,30,24}; vector param2 {6,21,29,26,43,0,22,1,17,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 16, 38, 39, 48, 74, 79],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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,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,), ([-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,), ([1],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,), ([-2, 70, -40],2,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],30,17,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_IN_A_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_IN_A_SORTED_ARRAY{ static int f_gold ( int set [ ] , int n ) { if ( n <= 2 ) return n ; int L [ ] [ ] = new int [ n ] [ n ] ; int llap = 2 ; for ( int i = 0 ; i < n ; i ++ ) L [ i ] [ n - 1 ] = 2 ; for ( int j = n - 2 ; j >= 1 ; j -- ) { int i = j - 1 , k = j + 1 ; while ( i >= 0 && k <= n - 1 ) { if ( set [ i ] + set [ k ] < 2 * set [ j ] ) k ++ ; else if ( set [ i ] + set [ k ] > 2 * set [ j ] ) { L [ i ] [ j ] = 2 ; i -- ; } else { L [ i ] [ j ] = L [ j ] [ k ] + 1 ; llap = Math . max ( llap , L [ i ] [ j ] ) ; i -- ; k ++ ; } } while ( i >= 0 ) { L [ i ] [ j ] = 2 ; i -- ; } } return llap ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,1,1,1}); param0.add(new int[]{76,80}); param0.add(new int[]{-92,-90,-88,-76,-76,-60,-46,-40,-24,-8,-8,-6,2,12,36,38,58,76,80}); param0.add(new int[]{1,1,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1}); param0.add(new int[]{5,8,11,27,27,32,32,37,50,51,55,61,62,68,73,83}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(27); param1.add(21); param1.add(5); param1.add(1); param1.add(13); param1.add(15); param1.add(8); param1.add(29); param1.add(27); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int set [ ], int n ) { if ( n <= 2 ) return n; int L [ n ] [ n ]; int llap = 2; for ( int i = 0; i < n; i ++ ) L [ i ] [ n - 1 ] = 2; for ( int j = n - 2; j >= 1; j -- ) { int i = j - 1, k = j + 1; while ( i >= 0 && k <= n - 1 ) { if ( set [ i ] + set [ k ] < 2 * set [ j ] ) k ++; else if ( set [ i ] + set [ k ] > 2 * set [ j ] ) { L [ i ] [ j ] = 2, i --; } else { L [ i ] [ j ] = L [ j ] [ k ] + 1; llap = max ( llap, L [ i ] [ j ] ); i --; k ++; } } while ( i >= 0 ) { L [ i ] [ j ] = 2; i --; } } return llap; } int main() { int n_success = 0; vector> param0 {{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},{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},{0,0,0,0,1,1,1},{76,80},{-92,-90,-88,-76,-76,-60,-46,-40,-24,-8,-8,-6,2,12,36,38,58,76,80},{1,1,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1},{5,8,11,27,27,32,32,37,50,51,55,61,62,68,73,83},{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},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{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}}; vector param1 {27,21,5,1,13,15,8,29,27,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([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,), ([0, 0, 0, 0, 1, 1, 1],5,), ([76, 80],1,), ([-92, -90, -88, -76, -76, -60, -46, -40, -24, -8, -8, -6, 2, 12, 36, 38, 58, 76, 80],13,), ([1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1],15,), ([5, 8, 11, 27, 27, 32, 32, 37, 50, 51, 55, 61, 62, 68, 73, 83],8,), ([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,), ([0, 0, 0, 0, 0, 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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_UNIT_DIGIT_X_RAISED_POWER_Y," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_UNIT_DIGIT_X_RAISED_POWER_Y{ static int f_gold ( int x , int y ) { int res = 1 ; for ( int i = 0 ; i < y ; i ++ ) res = ( res * x ) % 10 ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(33); param0.add(95); param0.add(21); param0.add(3); param0.add(40); param0.add(64); param0.add(17); param0.add(58); param0.add(44); param0.add(27); List param1 = new ArrayList<>(); param1.add(55); param1.add(7); param1.add(63); param1.add(62); param1.add(53); param1.add(24); param1.add(23); param1.add(74); param1.add(13); param1.add(54); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y ) : res = 1 for i in range ( y ) : res = ( res * x ) % 10 return res "," using namespace std; int f_gold ( int x, int y ) { int res = 1; for ( int i = 0; i < y; i ++ ) res = ( res * x ) % 10; return res; } int main() { int n_success = 0; vector param0 {33,95,21,3,40,64,17,58,44,27}; vector param1 {55,7,63,62,53,24,23,74,13,54}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (33,55,), (95,7,), (21,63,), (3,62,), (40,53,), (64,24,), (17,23,), (58,74,), (44,13,), (27,54,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_ELEMENT_THAT_APPEARS_ONCE_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_ELEMENT_THAT_APPEARS_ONCE_2{ static int f_gold ( int a [ ] , int n ) { HashSet < Integer > s = new HashSet < Integer > ( ) ; for ( int i : a ) { s . add ( i ) ; } int arr_sum = 0 ; for ( int i : a ) { arr_sum += i ; } int set_sum = 0 ; for ( int i : s ) { set_sum += i ; } return ( 3 * set_sum - arr_sum ) / 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,3,3,12,16,28,31,44,48,57,59,60,68,69,70,70,72,73,76,78,78,79,84,86,93,96}); param0.add(new int[]{-2,-62,8,-96,-50,-70,-48,-20,76,-54,-62,8,30,-68,-64,-94,-10,-78,-68,-98,0,30,62,-40,-36,90,-46,38,28,-86,-20,12,56,-50,82,-18,-28,-62,88,-58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{85,33,83,92,40,53,18,39,17,71,15,85,44,12,56,77,54,87,11,74,11,9,73,72,64,98,18,13,74,64,59,44,95,56,6,96,47,36,35,51,30,39,91,74,68}); param0.add(new int[]{-94,-90,-82,-80,-74,-40,-40,-38,-36,-28,-26,-20,-16,-14,-14,-10,-8,-8,10,14,18,22,22,28,28,30,74,82}); param0.add(new int[]{1,1,1,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{2,6,6,12,13,13,15,16,24,25,29,36,42,44,47,47,47,48,51,51,55,55,55,58,58,60,61,62,62,64,66,70,70,75,76,77,78,78,79,80,80,82,83,83,84,85,90,99}); param0.add(new int[]{-94,50,-86,-94,92,-50,74,-54,54,-20,-28,-44,-94,-80,-12,-38,64,-22,38,70,-4,62,66,88,-94,72,88,32,-80,60,-70,-74,-66,82,82}); param0.add(new int[]{0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{62,29,76,58,16,7,83,45,17,67,88,78,6,36,33,99,39,59,77,64,32,20,10,92,3,20,7,14,11,28}); List param1 = new ArrayList<>(); param1.add(14); param1.add(26); param1.add(18); param1.add(35); param1.add(27); param1.add(35); param1.add(42); param1.add(34); param1.add(7); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int a [ ], int n ) { unordered_set < int > s ( a, a + n ); int arr_sum = accumulate ( a, a + n, 0 ); int set_sum = accumulate ( s . begin ( ), s . end ( ), 0 ); return ( 3 * set_sum - arr_sum ) / 2; } int main() { int n_success = 0; vector> param0 {{1,3,3,12,16,28,31,44,48,57,59,60,68,69,70,70,72,73,76,78,78,79,84,86,93,96},{-2,-62,8,-96,-50,-70,-48,-20,76,-54,-62,8,30,-68,-64,-94,-10,-78,-68,-98,0,30,62,-40,-36,90,-46,38,28,-86,-20,12,56,-50,82,-18,-28,-62,88,-58},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{85,33,83,92,40,53,18,39,17,71,15,85,44,12,56,77,54,87,11,74,11,9,73,72,64,98,18,13,74,64,59,44,95,56,6,96,47,36,35,51,30,39,91,74,68},{-94,-90,-82,-80,-74,-40,-40,-38,-36,-28,-26,-20,-16,-14,-14,-10,-8,-8,10,14,18,22,22,28,28,30,74,82},{1,1,1,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1},{2,6,6,12,13,13,15,16,24,25,29,36,42,44,47,47,47,48,51,51,55,55,55,58,58,60,61,62,62,64,66,70,70,75,76,77,78,78,79,80,80,82,83,83,84,85,90,99},{-94,50,-86,-94,92,-50,74,-54,54,-20,-28,-44,-94,-80,-12,-38,64,-22,38,70,-4,62,66,88,-94,72,88,32,-80,60,-70,-74,-66,82,82},{0,0,0,1,1,1,1,1,1,1,1,1,1,1},{62,29,76,58,16,7,83,45,17,67,88,78,6,36,33,99,39,59,77,64,32,20,10,92,3,20,7,14,11,28}}; vector param1 {14,26,18,35,27,35,42,34,7,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, NUMBER_RECTANGLES_NM_GRID," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_RECTANGLES_NM_GRID{ public static long f_gold ( int n , int m ) { return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(86); param0.add(33); param0.add(3); param0.add(91); param0.add(33); param0.add(13); param0.add(75); param0.add(58); param0.add(50); param0.add(4); List param1 = new ArrayList<>(); param1.add(70); param1.add(65); param1.add(5); param1.add(12); param1.add(27); param1.add(75); param1.add(36); param1.add(64); param1.add(51); param1.add(44); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , m ) : return ( m * n * ( n + 1 ) * ( m + 1 ) ) // 4 "," using namespace std; int f_gold ( int n, int m ) { return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4; } int main() { int n_success = 0; vector param0 {86,33,3,91,33,13,75,58,50,4}; vector param1 {70,65,5,12,27,75,36,64,51,44}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (86,70,), (33,65,), (3,5,), (91,12,), (33,27,), (13,75,), (75,36,), (58,64,), (50,51,), (4,44,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COIN_GAME_WINNER_EVERY_PLAYER_THREE_CHOICES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COIN_GAME_WINNER_EVERY_PLAYER_THREE_CHOICES{ static boolean f_gold ( int x , int y , int n ) { boolean [ ] dp = new boolean [ n + 1 ] ; Arrays . fill ( dp , false ) ; dp [ 0 ] = false ; dp [ 1 ] = true ; for ( int i = 2 ; i <= n ; i ++ ) { if ( i - 1 >= 0 && dp [ i - 1 ] == false ) dp [ i ] = true ; else if ( i - x >= 0 && dp [ i - x ] == false ) dp [ i ] = true ; else if ( i - y >= 0 && dp [ i - y ] == false ) dp [ i ] = true ; else dp [ i ] = false ; } return dp [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(6); param0.add(32); param0.add(99); param0.add(22); param0.add(26); param0.add(67); param0.add(69); param0.add(39); param0.add(7); param0.add(91); List param1 = new ArrayList<>(); param1.add(27); param1.add(88); param1.add(18); param1.add(1); param1.add(78); param1.add(51); param1.add(57); param1.add(8); param1.add(82); param1.add(56); List param2 = new ArrayList<>(); param2.add(51); param2.add(69); param2.add(48); param2.add(74); param2.add(95); param2.add(27); param2.add(91); param2.add(9); param2.add(41); param2.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; bool f_gold ( int x, int y, int n ) { int dp [ n + 1 ]; dp [ 0 ] = false; dp [ 1 ] = true; for ( int i = 2; i <= n; i ++ ) { if ( i - 1 >= 0 and ! dp [ i - 1 ] ) dp [ i ] = true; else if ( i - x >= 0 and ! dp [ i - x ] ) dp [ i ] = true; else if ( i - y >= 0 and ! dp [ i - y ] ) dp [ i ] = true; else dp [ i ] = false; } return dp [ n ]; } int main() { int n_success = 0; vector param0 {6,32,99,22,26,67,69,39,7,91}; vector param1 {27,88,18,1,78,51,57,8,82,56}; vector param2 {51,69,48,74,95,27,91,9,41,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (6,27,51,), (32,88,69,), (99,18,48,), (22,1,74,), (26,78,95,), (67,51,27,), (69,57,91,), (39,8,9,), (7,82,41,), (91,56,7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_VISIBLE_BOXES_PUTTING_ONE_INSIDE_ANOTHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_VISIBLE_BOXES_PUTTING_ONE_INSIDE_ANOTHER{ static int f_gold ( int [ ] arr , int n ) { Queue < Integer > q = new LinkedList < > ( ) ; Arrays . sort ( arr ) ; q . add ( arr [ 0 ] ) ; for ( int i = 1 ; i < n ; i ++ ) { int now = q . element ( ) ; if ( arr [ i ] >= 2 * now ) q . remove ( ) ; q . add ( arr [ i ] ) ; } return q . size ( ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,17,17,18,28,28,29,34,43,44,52,54,80,84,84,91,92,97}); param0.add(new int[]{-34,70,-90,-10,-26,64,4,28,24,-90,-78,72,74,80,82,-94}); param0.add(new int[]{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}); param0.add(new int[]{20,87,5,62,12,81,30,83,96,16,2,76,3,8,37,53,55,88}); param0.add(new int[]{-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}); param0.add(new int[]{0,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0}); param0.add(new int[]{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}); param0.add(new int[]{88,12,-22,-60,30,-30,-14,80,-58,-80,-10,86,-94,-14,4,-18,-18,54,-82,-8,-68,-6,-44,-44,50,88,-78,-42,12,52,44,14,6,48,18,-30,4}); param0.add(new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{82,62,43,39,5,90,75,50,16,83,52,69,71,3,89,10,51,69,32,96,5,43,83,12,31,81,22,59,52,47,86,49,56,90,31,59}); List param1 = new ArrayList<>(); param1.add(12); param1.add(10); param1.add(40); param1.add(9); param1.add(18); param1.add(9); param1.add(30); param1.add(21); param1.add(7); param1.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) "," using namespace std; int f_gold ( int arr [ ], int n ) { queue < int > q; sort ( arr, arr + n ); q . push ( arr [ 0 ] ); for ( int i = 1; i < n; i ++ ) { int now = q . front ( ); if ( arr [ i ] >= 2 * now ) q . pop ( ); q . push ( arr [ i ] ); } return q . size ( ); } int main() { int n_success = 0; vector> param0 {{2,3,17,17,18,28,28,29,34,43,44,52,54,80,84,84,91,92,97},{-34,70,-90,-10,-26,64,4,28,24,-90,-78,72,74,80,82,-94},{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},{20,87,5,62,12,81,30,83,96,16,2,76,3,8,37,53,55,88},{-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},{0,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0},{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},{88,12,-22,-60,30,-30,-14,80,-58,-80,-10,86,-94,-14,4,-18,-18,54,-82,-8,-68,-6,-44,-44,50,88,-78,-42,12,52,44,14,6,48,18,-30,4},{0,0,0,0,1,1,1,1,1,1,1,1,1},{82,62,43,39,5,90,75,50,16,83,52,69,71,3,89,10,51,69,32,96,5,43,83,12,31,81,22,59,52,47,86,49,56,90,31,59}}; vector param1 {12,10,40,9,18,9,30,21,7,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 17, 17, 18, 28, 28, 29, 34, 43, 44, 52, 54, 80, 84, 84, 91, 92, 97],12,), ([-34, 70, -90, -10, -26, 64, 4, 28, 24, -90, -78, 72, 74, 80, 82, -94],10,), ([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,), ([20, 87, 5, 62, 12, 81, 30, 83, 96, 16, 2, 76, 3, 8, 37, 53, 55, 88],9,), ([-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,), ([0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],9,), ([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,), ([88, 12, -22, -60, 30, -30, -14, 80, -58, -80, -10, 86, -94, -14, 4, -18, -18, 54, -82, -8, -68, -6, -44, -44, 50, 88, -78, -42, 12, 52, 44, 14, 6, 48, 18, -30, 4],21,), ([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],7,), ([82, 62, 43, 39, 5, 90, 75, 50, 16, 83, 52, 69, 71, 3, 89, 10, 51, 69, 32, 96, 5, 43, 83, 12, 31, 81, 22, 59, 52, 47, 86, 49, 56, 90, 31, 59],28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1{ public static int f_gold ( int k ) { return k * k * k ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(96); param0.add(14); param0.add(64); param0.add(24); param0.add(74); param0.add(85); param0.add(27); param0.add(78); param0.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( k ) : return k * k * k "," using namespace std; int f_gold ( int k ) { return k * k * k; } int main() { int n_success = 0; vector param0 {57,96,14,64,24,74,85,27,78,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,), (96,), (14,), (64,), (24,), (74,), (85,), (27,), (78,), (1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NON_REPEATING_ELEMENT_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NON_REPEATING_ELEMENT_1{ static int f_gold ( int arr [ ] , int n ) { Map < Integer , Integer > m = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( m . containsKey ( arr [ i ] ) ) { m . put ( arr [ i ] , m . get ( arr [ i ] ) + 1 ) ; } else { m . put ( arr [ i ] , 1 ) ; } } for ( int i = 0 ; i < n ; i ++ ) if ( m . get ( arr [ i ] ) == 1 ) return arr [ i ] ; return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{6,7,14,18,18,18,21,25,28,38,40,42,42,45,48,50,50,50,53,54,58,59,62,65,65,66,67,68,69,73,74,76,77,83,84,85,87}); param0.add(new int[]{24,-84,86,-50,60,-36,92,70,84,40,-8,74,-24,-38,98,40,-78,-36,38,-22,-98,82,-22,80,-80,-62,16,-46,18,64,16,2,24,-92,-46,42,38,8,72,8,14,-68,18,16,-82,8,58,-2}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{59,77,13,49,90}); param0.add(new int[]{-80,-76,-66,-60,-44,-42,-38,-36,-32,-30,-24,-18,-6,2,4,14,32,42,54,70,92,98}); param0.add(new int[]{0,0,0,0,1,0,1,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0}); param0.add(new int[]{6,22,24,27,29,30,35,42,57,59,59,63,71,73,76,98}); param0.add(new int[]{-82,-48,36}); param0.add(new int[]{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}); param0.add(new int[]{88,49,13,64,30,60,26,55,55,97,98,69,72,72,79,59,46,87,76,61,87,12,91,8,34,15,93,64,83,33,69,58,32,14,72,67,25,7,55,21,12,78,63}); List param1 = new ArrayList<>(); param1.add(33); param1.add(25); param1.add(16); param1.add(2); param1.add(12); param1.add(33); param1.add(13); param1.add(1); param1.add(35); param1.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( mp [ arr [ i ] ] == 1 ) return arr [ i ]; return - 1; } int main() { int n_success = 0; vector> param0 {{6,7,14,18,18,18,21,25,28,38,40,42,42,45,48,50,50,50,53,54,58,59,62,65,65,66,67,68,69,73,74,76,77,83,84,85,87},{24,-84,86,-50,60,-36,92,70,84,40,-8,74,-24,-38,98,40,-78,-36,38,-22,-98,82,-22,80,-80,-62,16,-46,18,64,16,2,24,-92,-46,42,38,8,72,8,14,-68,18,16,-82,8,58,-2},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{59,77,13,49,90},{-80,-76,-66,-60,-44,-42,-38,-36,-32,-30,-24,-18,-6,2,4,14,32,42,54,70,92,98},{0,0,0,0,1,0,1,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0},{6,22,24,27,29,30,35,42,57,59,59,63,71,73,76,98},{-82,-48,36},{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},{88,49,13,64,30,60,26,55,55,97,98,69,72,72,79,59,46,87,76,61,87,12,91,8,34,15,93,64,83,33,69,58,32,14,72,67,25,7,55,21,12,78,63}}; vector param1 {33,25,16,2,12,33,13,1,35,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, TILING_WITH_DOMINOES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TILING_WITH_DOMINOES{ static int f_gold ( int n ) { int [ ] A = new int [ n + 1 ] ; int [ ] B = new int [ n + 1 ] ; A [ 0 ] = 1 ; A [ 1 ] = 0 ; B [ 0 ] = 0 ; B [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) { A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ] ; B [ i ] = A [ i - 1 ] + B [ i - 2 ] ; } return A [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(29); param0.add(13); param0.add(25); param0.add(65); param0.add(27); param0.add(42); param0.add(19); param0.add(50); param0.add(59); param0.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; int f_gold ( int n ) { int A [ n + 1 ], B [ n + 1 ]; A [ 0 ] = 1, A [ 1 ] = 0, B [ 0 ] = 0, B [ 1 ] = 1; for ( int i = 2; i <= n; i ++ ) { A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ]; B [ i ] = A [ i - 1 ] + B [ i - 2 ]; } return A [ n ]; } int main() { int n_success = 0; vector param0 {29,13,25,65,27,42,19,50,59,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (29,), (13,), (25,), (65,), (27,), (42,), (19,), (50,), (59,), (13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BASIC_AND_EXTENDED_EUCLIDEAN_ALGORITHMS{ public static int f_gold ( int a , int b ) { if ( a == 0 ) return b ; return f_gold ( b % a , a ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(46); param0.add(26); param0.add(40); param0.add(58); param0.add(25); param0.add(2); param0.add(8); param0.add(21); param0.add(82); param0.add(17); List param1 = new ArrayList<>(); param1.add(89); param1.add(82); param1.add(12); param1.add(4); param1.add(44); param1.add(87); param1.add(65); param1.add(87); param1.add(10); param1.add(61); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : if a == 0 : return b return f_gold ( b % a , a ) "," using namespace std; int f_gold ( int a, int b ) { if ( a == 0 ) return b; return f_gold ( b % a, a ); } int main() { int n_success = 0; vector param0 {46,26,40,58,25,2,8,21,82,17}; vector param1 {89,82,12,4,44,87,65,87,10,61}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (46,89,), (26,82,), (40,12,), (58,4,), (25,44,), (2,87,), (8,65,), (21,87,), (82,10,), (17,61,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1{ static int f_gold ( int arr [ ] , int n , int k ) { if ( k > n ) return - 1 ; int sum = arr [ 0 ] ; for ( int i = 1 ; i < k ; i ++ ) sum += arr [ i ] ; int max_sum = sum , max_end = k - 1 ; for ( int i = k ; i < n ; i ++ ) { sum = sum + arr [ i ] - arr [ i - k ] ; if ( sum > max_sum ) { max_sum = sum ; max_end = i ; } } return max_end - k + 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,5,11,37,41,49,49,63,98}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{-98,-90,-60,-38,38,42}); param0.add(new int[]{1,0,0,1,1,1,1}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(8); param1.add(34); param1.add(11); param1.add(35); param1.add(3); param1.add(3); param1.add(22); param1.add(25); param1.add(25); param1.add(34); List param2 = new ArrayList<>(); param2.add(7); param2.add(43); param2.add(18); param2.add(33); param2.add(5); param2.add(4); param2.add(24); param2.add(27); param2.add(20); param2.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { if ( k > n ) return - 1; int sum = arr [ 0 ]; for ( int i = 1; i < k; i ++ ) sum += arr [ i ]; int max_sum = sum, max_end = k - 1; for ( int i = k; i < n; i ++ ) { int sum = sum + arr [ i ] - arr [ i - k ]; if ( sum > max_sum ) { max_sum = sum; max_end = i; } } return max_end - k + 1; } int main() { int n_success = 0; vector> param0 {{2,5,11,37,41,49,49,63,98},{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},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,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},{-98,-90,-60,-38,38,42},{1,0,0,1,1,1,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},{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},{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},{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}}; vector param1 {8,34,11,35,3,3,22,25,25,34}; vector param2 {7,43,18,33,5,4,24,27,20,23}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 5, 11, 37, 41, 49, 49, 63, 98],8,7,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,18,), ([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,), ([-98, -90, -60, -38, 38, 42],3,5,), ([1, 0, 0, 1, 1, 1, 1],3,4,), ([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,), ([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,), ([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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_BINARY_DIGIT_NUMBERS_SMALLER_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_BINARY_DIGIT_NUMBERS_SMALLER_N{ static int f_gold ( int N ) { Queue < Integer > q = new LinkedList < > ( ) ; q . add ( 1 ) ; int cnt = 0 ; int t ; while ( q . size ( ) > 0 ) { t = q . peek ( ) ; q . remove ( ) ; if ( t <= N ) { cnt ++ ; q . add ( t * 10 ) ; q . add ( t * 10 + 1 ) ; } } return cnt ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(3); param0.add(150932532); param0.add(71); param0.add(44); param0.add(36); param0.add(88); param0.add(69); param0.add(53); param0.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int N ) { queue < int > q; q . push ( 1 ); int cnt = 0; int t; while ( ! q . empty ( ) ) { t = q . front ( ); q . pop ( ); if ( t <= N ) { cnt ++; q . push ( t * 10 ); q . push ( t * 10 + 1 ); } } return cnt; } int main() { int n_success = 0; vector param0 {1,3,150932532,71,44,36,88,69,53,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, LENGTH_LONGEST_STRICT_BITONIC_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LENGTH_LONGEST_STRICT_BITONIC_SUBSEQUENCE{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > inc = new HashMap < Integer , Integer > ( ) ; HashMap < Integer , Integer > dcr = new HashMap < Integer , Integer > ( ) ; int len_inc [ ] = new int [ n ] ; int len_dcr [ ] = new int [ n ] ; int longLen = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int len = 0 ; if ( inc . containsKey ( arr [ i ] - 1 ) ) len = inc . get ( arr [ i ] - 1 ) ; len_inc [ i ] = len + 1 ; inc . put ( arr [ i ] , len_inc [ i ] ) ; } for ( int i = n - 1 ; i >= 0 ; i -- ) { int len = 0 ; if ( dcr . containsKey ( arr [ i ] - 1 ) ) len = dcr . get ( arr [ i ] - 1 ) ; len_dcr [ i ] = len + 1 ; dcr . put ( arr [ i ] , len_dcr [ i ] ) ; } for ( int i = 0 ; i < n ; i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1 ; return longLen ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{78}); param0.add(new int[]{-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}); param0.add(new int[]{0,1}); param0.add(new int[]{92,26,72,8,66,28,34,61,28}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,1,0,0,0,0,1,0}); param0.add(new int[]{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}); param0.add(new int[]{4,-76,60,48,-14,72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{66,80,79,72,1,67,20,67,32,40,22,64,58,67,10,21,37,49}); List param1 = new ArrayList<>(); param1.add(0); param1.add(18); param1.add(1); param1.add(5); param1.add(25); param1.add(17); param1.add(44); param1.add(3); param1.add(17); param1.add(15); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > inc, dcr; int len_inc [ n ], len_dcr [ n ]; int longLen = 0; for ( int i = 0; i < n; i ++ ) { int len = 0; if ( inc . find ( arr [ i ] - 1 ) != inc . end ( ) ) len = inc [ arr [ i ] - 1 ]; inc [ arr [ i ] ] = len_inc [ i ] = len + 1; } for ( int i = n - 1; i >= 0; i -- ) { int len = 0; if ( dcr . find ( arr [ i ] - 1 ) != dcr . end ( ) ) len = dcr [ arr [ i ] - 1 ]; dcr [ arr [ i ] ] = len_dcr [ i ] = len + 1; } for ( int i = 0; i < n; i ++ ) if ( longLen < ( len_inc [ i ] + len_dcr [ i ] - 1 ) ) longLen = len_inc [ i ] + len_dcr [ i ] - 1; return longLen; } int main() { int n_success = 0; vector> param0 {{78},{-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},{0,1},{92,26,72,8,66,28,34,61,28},{-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},{0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,1,0,0,0,0,1,0},{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},{4,-76,60,48,-14,72},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{66,80,79,72,1,67,20,67,32,40,22,64,58,67,10,21,37,49}}; vector param1 {0,18,1,5,25,17,44,3,17,15}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([78],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,), ([0, 1],1,), ([92, 26, 72, 8, 66, 28, 34, 61, 28],5,), ([-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,), ([0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0],17,), ([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, -76, 60, 48, -14, 72],3,), ([0, 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,), ([66, 80, 79, 72, 1, 67, 20, 67, 32, 40, 22, 64, 58, 67, 10, 21, 37, 49],15,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_TRIPLET_THAT_SUM_TO_A_GIVEN_VALUE{ static boolean f_gold ( int A [ ] , int arr_size , int sum ) { int l , r ; for ( int i = 0 ; i < arr_size - 2 ; i ++ ) { for ( int j = i + 1 ; j < arr_size - 1 ; j ++ ) { for ( int k = j + 1 ; k < arr_size ; k ++ ) { if ( A [ i ] + A [ j ] + A [ k ] == sum ) { System . out . print ( ""Triplet is "" + A [ i ] + "", "" + A [ j ] + "", "" + A [ k ] ) ; return true ; } } } } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{15,18,38,47,75,88}); param0.add(new int[]{28,-2,62,38,86,-86,56,58,96,6,-28,8,68,-16,-80,-4,98,-92,4,-4,58,-62,46,64}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{1,1,0,0,1,0,1,1}); param0.add(new int[]{7,22,24,30,42,44,49,49,65,70,70,74,74,75,90,95,96}); param0.add(new int[]{40,-76,-68,-86,-14,82,-20,54,-26,56,-24,-44,44,60,52,-20,80,-24,-90,-30,-2}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{33,92,6,99,83,97,49,97,85,52}); List param1 = new ArrayList<>(); param1.add(5); param1.add(22); param1.add(27); param1.add(22); param1.add(18); param1.add(4); param1.add(8); param1.add(11); param1.add(15); param1.add(6); List param2 = new ArrayList<>(); param2.add(4); param2.add(18); param2.add(23); param2.add(29); param2.add(19); param2.add(5); param2.add(13); param2.add(18); param2.add(17); param2.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; bool f_gold ( int A [ ], int arr_size, int sum ) { int l, r; for ( int i = 0; i < arr_size - 2; i ++ ) { for ( int j = i + 1; j < arr_size - 1; j ++ ) { for ( int k = j + 1; k < arr_size; k ++ ) { if ( A [ i ] + A [ j ] + A [ k ] == sum ) { cout << ""Triplet is "" << A [ i ] << "", "" << A [ j ] << "", "" << A [ k ]; return true; } } } } return false; } int main() { int n_success = 0; vector> param0 {{15,18,38,47,75,88},{28,-2,62,38,86,-86,56,58,96,6,-28,8,68,-16,-80,-4,98,-92,4,-4,58,-62,46,64},{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},{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},{-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},{1,1,0,0,1,0,1,1},{7,22,24,30,42,44,49,49,65,70,70,74,74,75,90,95,96},{40,-76,-68,-86,-14,82,-20,54,-26,56,-24,-44,44,60,52,-20,80,-24,-90,-30,-2},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{33,92,6,99,83,97,49,97,85,52}}; vector param1 {5,22,27,22,18,4,8,11,15,6}; vector param2 {4,18,23,29,19,5,13,18,17,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([15, 18, 38, 47, 75, 88],5,4,), ([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,), ([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,), ([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,), ([-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,), ([1, 1, 0, 0, 1, 0, 1, 1],4,5,), ([7, 22, 24, 30, 42, 44, 49, 49, 65, 70, 70, 74, 74, 75, 90, 95, 96],8,13,), ([40, -76, -68, -86, -14, 82, -20, 54, -26, 56, -24, -44, 44, 60, 52, -20, 80, -24, -90, -30, -2],11,18,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,17,), ([33, 92, 6, 99, 83, 97, 49, 97, 85, 52],6,7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRIME_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRIME_NUMBERS{ static boolean f_gold ( int n ) { if ( n <= 1 ) return false ; for ( int i = 2 ; i < n ; i ++ ) if ( n % i == 0 ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(2); param0.add(74); param0.add(46); param0.add(38); param0.add(51); param0.add(48); param0.add(6); param0.add(14); param0.add(31); param0.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n <= 1 ) : return False for i in range ( 2 , n ) : if ( n % i == 0 ) : return False return True "," using namespace std; bool f_gold ( int n ) { if ( n <= 1 ) return false; for ( int i = 2; i < n; i ++ ) if ( n % i == 0 ) return false; return true; } int main() { int n_success = 0; vector param0 {2,74,46,38,51,48,6,14,31,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (2,), (74,), (46,), (38,), (51,), (48,), (6,), (14,), (31,), (10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_SERIES_12_32_52_2N_12_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SERIES_12_32_52_2N_12_1{ static int f_gold ( int n ) { return ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(84); param0.add(74); param0.add(91); param0.add(34); param0.add(36); param0.add(28); param0.add(70); param0.add(7); param0.add(24); param0.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return int ( ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3 ) "," using namespace std; int f_gold ( int n ) { return ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3; } int main() { int n_success = 0; vector param0 {84,74,91,34,36,28,70,7,24,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (84,), (74,), (91,), (34,), (36,), (28,), (70,), (7,), (24,), (47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_PRODUCT_OF_A_TRIPLET_IN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { if ( n < 3 ) { return - 1 ; } Arrays . sort ( arr ) ; return Math . max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ] , arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{72,-32,-2,-76,-56,70,-52,12,-50,32,-98,48,-32,-90,-66,-98,56,-58,-88,50,-22,18,-60,68,70,28}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{38,69,18,72,99,49,17,76,86,53,6,94,66,5,2,62,99,5,31,81,63,91,95,74,76,18,77}); param0.add(new int[]{-92,-58,-8,20,24,24,42,98}); param0.add(new int[]{0,1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0}); param0.add(new int[]{46,64,81}); param0.add(new int[]{4,-26,20,34,-4,-40,76,94,-14,-80,42,60,92,-96,44,58,34,68,96,-8,-18,-92}); param0.add(new int[]{0,0,0,1,1,1,1,1}); param0.add(new int[]{61,17,28,18,52,58,41,75,98,79,1,97,73,17,79,4,46,70,6,83,23,94,1}); List param1 = new ArrayList<>(); param1.add(39); param1.add(18); param1.add(17); param1.add(21); param1.add(4); param1.add(38); param1.add(1); param1.add(17); param1.add(7); param1.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] ) "," using namespace std; int f_gold ( int arr [ ], int n ) { if ( n < 3 ) return - 1; sort ( arr, arr + n ); return max ( arr [ 0 ] * arr [ 1 ] * arr [ n - 1 ], arr [ n - 1 ] * arr [ n - 2 ] * arr [ n - 3 ] ); } int main() { int n_success = 0; vector> param0 {{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},{72,-32,-2,-76,-56,70,-52,12,-50,32,-98,48,-32,-90,-66,-98,56,-58,-88,50,-22,18,-60,68,70,28},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{38,69,18,72,99,49,17,76,86,53,6,94,66,5,2,62,99,5,31,81,63,91,95,74,76,18,77},{-92,-58,-8,20,24,24,42,98},{0,1,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0},{46,64,81},{4,-26,20,34,-4,-40,76,94,-14,-80,42,60,92,-96,44,58,34,68,96,-8,-18,-92},{0,0,0,1,1,1,1,1},{61,17,28,18,52,58,41,75,98,79,1,97,73,17,79,4,46,70,6,83,23,94,1}}; vector param1 {39,18,17,21,4,38,1,17,7,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([72, -32, -2, -76, -56, 70, -52, 12, -50, 32, -98, 48, -32, -90, -66, -98, 56, -58, -88, 50, -22, 18, -60, 68, 70, 28],18,), ([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,), ([38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94, 66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77],21,), ([-92, -58, -8, 20, 24, 24, 42, 98],4,), ([0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0],38,), ([46, 64, 81],1,), ([4, -26, 20, 34, -4, -40, 76, 94, -14, -80, 42, 60, 92, -96, 44, 58, 34, 68, 96, -8, -18, -92],17,), ([0, 0, 0, 1, 1, 1, 1, 1],7,), ([61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46, 70, 6, 83, 23, 94, 1],19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PANGRAM_CHECKING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PANGRAM_CHECKING{ public static boolean f_gold ( String str ) { boolean [ ] mark = new boolean [ 26 ] ; int index = 0 ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( 'A' <= str . charAt ( i ) && str . charAt ( i ) <= 'Z' ) index = str . charAt ( i ) - 'A' ; else if ( 'a' <= str . charAt ( i ) && str . charAt ( i ) <= 'z' ) index = str . charAt ( i ) - 'a' ; mark [ index ] = true ; } for ( int i = 0 ; i <= 25 ; i ++ ) if ( mark [ i ] == false ) return ( false ) ; return ( true ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""The quick brown fox jumps over the lazy dog ""); param0.add(""The quick brown fox jumps over the dog""); param0.add(""abcdefghijklmnopqrstuvwxyz""); param0.add(""AbcdefghijKlmnopqrstUVwxyz""); param0.add(""The quicK broWn fOX jumps over the laZYy dog ""); param0.add(""AbcdefghijKlmnopqrstVwxyz""); param0.add(""U""); param0.add(""397548458372""); param0.add(""11""); param0.add(""iwCiUFU r""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string & str ) { vector < bool > mark ( 26, false ); int index; for ( int i = 0; i < str . length ( ); i ++ ) { if ( 'A' <= str [ i ] && str [ i ] <= 'Z' ) index = str [ i ] - 'A'; else if ( 'a' <= str [ i ] && str [ i ] <= 'z' ) index = str [ i ] - 'a'; mark [ index ] = true; } for ( int i = 0; i <= 25; i ++ ) if ( mark [ i ] == false ) return ( false ); return ( true ); } int main() { int n_success = 0; vector param0 { ""The quick brown fox jumps over the lazy dog "", ""The quick brown fox jumps over the dog"", ""abcdefghijklmnopqrstuvwxyz"", ""AbcdefghijKlmnopqrstUVwxyz"", ""The quicK broWn fOX jumps over the laZYy dog "", ""AbcdefghijKlmnopqrstVwxyz"", ""U"", ""397548458372"", ""11"", ""iwCiUFU r""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HEIGHT_COMPLETE_BINARY_TREE_HEAP_N_NODES{ static int f_gold ( int N ) { return ( int ) Math . ceil ( Math . log ( N + 1 ) / Math . log ( 2 ) ) - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(65); param0.add(94); param0.add(52); param0.add(31); param0.add(9); param0.add(1); param0.add(41); param0.add(98); param0.add(45); param0.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold(N): return math.ceil(math.log2(N + 1)) - 1 "," using namespace std; int f_gold ( int N ) { return ceil ( log2 ( N + 1 ) ) - 1; } int main() { int n_success = 0; vector param0 {65,94,52,31,9,1,41,98,45,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (65,), (94,), (52,), (31,), (9,), (1,), (41,), (98,), (45,), (24,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_2{ static int f_gold ( int no ) { return no == 0 ? 0 : no % 10 + f_gold ( no / 10 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(73); param0.add(91); param0.add(27); param0.add(79); param0.add(31); param0.add(84); param0.add(68); param0.add(9); param0.add(85); param0.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( no ) : return 0 if no == 0 else int ( no % 10 ) + f_gold ( int ( no / 10 ) ) ",,," if __name__ == '__main__': param = [ (73,), (91,), (27,), (79,), (31,), (84,), (68,), (9,), (85,), (35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POSSIBLE_TO_MAKE_A_DIVISIBLE_BY_3_NUMBER_USING_ALL_DIGITS_IN_AN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POSSIBLE_TO_MAKE_A_DIVISIBLE_BY_3_NUMBER_USING_ALL_DIGITS_IN_AN_ARRAY{ public static boolean f_gold ( int arr [ ] , int n ) { int remainder = 0 ; for ( int i = 0 ; i < n ; i ++ ) remainder = ( remainder + arr [ i ] ) % 3 ; return ( remainder == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{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}); param0.add(new int[]{0,66,92,24,-8,88,-92,86,80,82,42,-20,-56,-2,-84,32}); param0.add(new int[]{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}); param0.add(new int[]{99,83,11,99,80,76,32,12,94,66,76}); param0.add(new int[]{-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}); param0.add(new int[]{0,1,0,0,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,1,1,0,1}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{17,47,89,75,57,69,70,57,83,79,57,49}); List param1 = new ArrayList<>(); param1.add(30); param1.add(14); param1.add(29); param1.add(5); param1.add(19); param1.add(14); param1.add(28); param1.add(25); param1.add(19); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : remainder = 0 for i in range ( 0 , n ) : remainder = ( remainder + arr [ i ] ) % 3 return ( remainder == 0 ) "," using namespace std; bool f_gold ( int arr [ ], int n ) { int remainder = 0; for ( int i = 0; i < n; i ++ ) remainder = ( remainder + arr [ i ] ) % 3; return ( remainder == 0 ); } int main() { int n_success = 0; vector> param0 {{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},{0,66,92,24,-8,88,-92,86,80,82,42,-20,-56,-2,-84,32},{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},{99,83,11,99,80,76,32,12,94,66,76},{-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},{0,1,0,0,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,1,1,0,1},{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,-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},{0,0,0,0,0,0,0,0,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},{17,47,89,75,57,69,70,57,83,79,57,49}}; vector param1 {30,14,29,5,19,14,28,25,19,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([0, 66, 92, 24, -8, 88, -92, 86, 80, 82, 42, -20, -56, -2, -84, 32],14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],29,), ([99, 83, 11, 99, 80, 76, 32, 12, 94, 66, 76],5,), ([-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,), ([0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1],14,), ([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,), ([-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,), ([0, 0, 0, 0, 0, 0, 0, 0, 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,), ([17, 47, 89, 75, 57, 69, 70, 57, 83, 79, 57, 49],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_NUMBER_TIMES_STRING_OCCURS_GIVEN_STRING_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_NUMBER_TIMES_STRING_OCCURS_GIVEN_STRING_1{ static int f_gold ( String a , String b ) { int m = a . length ( ) ; int n = b . length ( ) ; int lookup [ ] [ ] = new int [ m + 1 ] [ n + 1 ] ; for ( int i = 0 ; i <= n ; ++ i ) lookup [ 0 ] [ i ] = 0 ; for ( int i = 0 ; i <= m ; ++ i ) lookup [ i ] [ 0 ] = 1 ; for ( int i = 1 ; i <= m ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { if ( a . charAt ( i - 1 ) == b . charAt ( 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 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""fZOKCdZ Lav""); param0.add(""2""); param0.add(""1000001110""); param0.add(""IAOyBzgIWHo""); param0.add(""211806""); param0.add(""1""); param0.add(""CVaQTG""); param0.add(""6265187228""); param0.add(""10111101101000""); param0.add(""vEi""); List param1 = new ArrayList<>(); param1.add(""fKA""); param1.add(""187012""); param1.add(""0""); param1.add(""oA""); param1.add(""10""); param1.add(""001011100""); param1.add(""CT""); param1.add(""628""); param1.add(""01111""); param1.add(""bigsvkQG""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; int f_gold ( string a, string b ) { int m = a . length ( ); int n = b . length ( ); int lookup [ m + 1 ] [ n + 1 ] = { { 0 } }; for ( int i = 0; i <= n; ++ i ) lookup [ 0 ] [ i ] = 0; for ( int i = 0; i <= m; ++ i ) lookup [ i ] [ 0 ] = 1; for ( int i = 1; i <= m; i ++ ) { for ( int j = 1; j <= n; j ++ ) { if ( a [ i - 1 ] == b [ j - 1 ] ) lookup [ i ] [ j ] = lookup [ i - 1 ] [ j - 1 ] + lookup [ i - 1 ] [ j ]; else lookup [ i ] [ j ] = lookup [ i - 1 ] [ j ]; } } return lookup [ m ] [ n ]; } int main() { int n_success = 0; vector param0 {""fZOKCdZ Lav"",""2"",""1000001110"",""IAOyBzgIWHo"",""211806"",""1"",""CVaQTG"",""6265187228"",""10111101101000"",""vEi""}; vector param1 {""fKA"",""187012"",""0"",""oA"",""10"",""001011100"",""CT"",""628"",""01111"",""bigsvkQG""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('fZOKCdZ Lav','fKA',), ('2','187012',), ('1000001110','0',), ('IAOyBzgIWHo','oA',), ('211806','10',), ('1','001011100',), ('CVaQTG','CT',), ('6265187228','628',), ('10111101101000','01111',), ('vEi','bigsvkQG',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_DIVISIBILITY_LARGE_NUMBER_999," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_DIVISIBILITY_LARGE_NUMBER_999{ static boolean f_gold ( String num ) { int n = num . length ( ) ; if ( n == 0 && num . charAt ( 0 ) == '0' ) return true ; if ( n % 3 == 1 ) num = ""00"" + num ; if ( n % 3 == 2 ) num = ""0"" + num ; int gSum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int group = 0 ; group += ( num . charAt ( i ++ ) - '0' ) * 100 ; group += ( num . charAt ( i ++ ) - '0' ) * 10 ; group += num . charAt ( i ) - '0' ; gSum += group ; } if ( gSum > 1000 ) { num = Integer . toString ( gSum ) ; n = num . length ( ) ; gSum = f_gold ( num ) ? 1 : 0 ; } return ( gSum == 999 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""235764""); param0.add(""321308924""); param0.add(""101111""); param0.add(""1998""); param0.add(""339589""); param0.add(""0000101""); param0.add(""264735""); param0.add(""19570453184""); param0.add(""000""); param0.add(""SsHh""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string num ) { int n = num . length ( ); if ( n == 0 && num [ 0 ] == '0' ) return true; if ( n % 3 == 1 ) num = ""00"" + num; if ( n % 3 == 2 ) num = ""0"" + num; int gSum = 0; for ( int i = 0; i < n; i ++ ) { int group = 0; group += ( num [ i ++ ] - '0' ) * 100; group += ( num [ i ++ ] - '0' ) * 10; group += num [ i ] - '0'; gSum += group; } if ( gSum > 1000 ) { num = to_string ( gSum ); n = num . length ( ); gSum = f_gold ( num ); } return ( gSum == 999 ); } int main() { int n_success = 0; vector param0 {""235764"",""321308924"",""101111"",""1998"",""339589"",""0000101"",""264735"",""19570453184"",""000"",""SsHh""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_DISTINCT_OR_NON_REPEATING_ELEMENT_IN_AN_ARRAY_1{ static int f_gold ( int arr [ ] , int n , int k ) { Map < Integer , Integer > h = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( h . containsKey ( arr [ i ] ) ) h . put ( arr [ i ] , h . get ( arr [ i ] ) + 1 ) ; else h . put ( arr [ i ] , 1 ) ; } if ( h . size ( ) < k ) return - 1 ; int dist_count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( h . get ( arr [ i ] ) == 1 ) dist_count ++ ; if ( dist_count == k ) return arr [ i ] ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{17,25,27,27,73,91}); param0.add(new int[]{-86,-74,-88,28,-32,20,-34,32}); param0.add(new int[]{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}); param0.add(new int[]{5,11,36,27,6,24,58,44,14,68}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{-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}); param0.add(new int[]{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}); param0.add(new int[]{1,23,75,84,28,34,15,13,51,69,94,45,38,38}); List param1 = new ArrayList<>(); param1.add(5); param1.add(5); param1.add(33); param1.add(7); param1.add(27); param1.add(27); param1.add(44); param1.add(37); param1.add(22); param1.add(13); List param2 = new ArrayList<>(); param2.add(3); param2.add(6); param2.add(32); param2.add(5); param2.add(27); param2.add(20); param2.add(26); param2.add(46); param2.add(21); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > h; for ( int i = 0; i < n; i ++ ) h [ arr [ i ] ] ++; if ( h . size ( ) < k ) return - 1; int dist_count = 0; for ( int i = 0; i < n; i ++ ) { if ( h [ arr [ i ] ] == 1 ) dist_count ++; if ( dist_count == k ) return arr [ i ]; } return - 1; } int main() { int n_success = 0; vector> param0 {{17,25,27,27,73,91},{-86,-74,-88,28,-32,20,-34,32},{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},{5,11,36,27,6,24,58,44,14,68},{-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},{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},{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},{-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},{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,23,75,84,28,34,15,13,51,69,94,45,38,38}}; vector param1 {5,5,33,7,27,27,44,37,22,13}; vector param2 {3,6,32,5,27,20,26,46,21,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([17, 25, 27, 27, 73, 91],5,3,), ([-86, -74, -88, 28, -32, 20, -34, 32],5,6,), ([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,), ([5, 11, 36, 27, 6, 24, 58, 44, 14, 68],7,5,), ([-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,), ([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,), ([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,), ([-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,), ([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, 23, 75, 84, 28, 34, 15, 13, 51, 69, 94, 45, 38, 38],13,12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LARGE_NUMBER_DIVISIBLE_6_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_6_NOT{ static boolean f_gold ( String str ) { int n = str . length ( ) ; if ( ( str . charAt ( n - 1 ) - '0' ) % 2 != 0 ) return false ; int digitSum = 0 ; for ( int i = 0 ; i < n ; i ++ ) digitSum += ( str . charAt ( i ) - '0' ) ; return ( digitSum % 3 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""2112""); param0.add(""1124""); param0.add(""1110""); param0.add(""O""); param0.add(""65530186""); param0.add(""132""); param0.add(""UqOE""); param0.add(""587""); param0.add(""1010""); param0.add(""QETUfLQ""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string str ) { int n = str . length ( ); if ( ( str [ n - 1 ] - '0' ) % 2 != 0 ) return false; int digitSum = 0; for ( int i = 0; i < n; i ++ ) digitSum += ( str [ i ] - '0' ); return ( digitSum % 3 == 0 ); } int main() { int n_success = 0; vector param0 {""2112"",""1124"",""1110"",""O"",""65530186"",""132"",""UqOE"",""587"",""1010"",""QETUfLQ""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED{ static boolean f_gold ( int arr [ ] , int n ) { int temp [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { temp [ i ] = arr [ i ] ; } Arrays . sort ( temp ) ; int front ; for ( front = 0 ; front < n ; front ++ ) { if ( temp [ front ] != arr [ front ] ) { break ; } } int back ; for ( back = n - 1 ; back >= 0 ; back -- ) { if ( temp [ back ] != arr [ back ] ) { break ; } } if ( front >= back ) { return true ; } do { front ++ ; if ( arr [ front - 1 ] < arr [ front ] ) { return false ; } } while ( front != back ) ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,9,9,16,17,22,32,40,45,53,57,58,66,69,76,80,91,93,94}); param0.add(new int[]{52,-76,-18,86,56}); param0.add(new int[]{0,0,1}); param0.add(new int[]{66,44,98,44}); param0.add(new int[]{-96,-62,-56,-46,-44,-38,-38,-26,-22,-22,-16,-12,-6,12,22,34,36,44,44,68,70,74,94}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{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}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{62,54,36,35,36,91,45,87,74,49,15,15,73,77,63,70,74,65,11,18}); List param1 = new ArrayList<>(); param1.add(10); param1.add(3); param1.add(1); param1.add(2); param1.add(14); param1.add(27); param1.add(34); param1.add(28); param1.add(13); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; bool f_gold ( int arr [ ], int n ) { int temp [ n ]; for ( int i = 0; i < n; i ++ ) temp [ i ] = arr [ i ]; sort ( temp, temp + n ); int front; for ( front = 0; front < n; front ++ ) if ( temp [ front ] != arr [ front ] ) break; int back; for ( back = n - 1; back >= 0; back -- ) if ( temp [ back ] != arr [ back ] ) break; if ( front >= back ) return true; do { front ++; if ( arr [ front - 1 ] < arr [ front ] ) return false; } while ( front != back ); return true; } int main() { int n_success = 0; vector> param0 {{5,9,9,16,17,22,32,40,45,53,57,58,66,69,76,80,91,93,94},{52,-76,-18,86,56},{0,0,1},{66,44,98,44},{-96,-62,-56,-46,-44,-38,-38,-26,-22,-22,-16,-12,-6,12,22,34,36,44,44,68,70,74,94},{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},{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},{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},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{62,54,36,35,36,91,45,87,74,49,15,15,73,77,63,70,74,65,11,18}}; vector param1 {10,3,1,2,14,27,34,28,13,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 9, 9, 16, 17, 22, 32, 40, 45, 53, 57, 58, 66, 69, 76, 80, 91, 93, 94],10,), ([52, -76, -18, 86, 56],3,), ([0, 0, 1],1,), ([66, 44, 98, 44],2,), ([-96, -62, -56, -46, -44, -38, -38, -26, -22, -22, -16, -12, -6, 12, 22, 34, 36, 44, 44, 68, 70, 74, 94],14,), ([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,), ([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,), ([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,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([62, 54, 36, 35, 36, 91, 45, 87, 74, 49, 15, 15, 73, 77, 63, 70, 74, 65, 11, 18],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REMAINDER_7_LARGE_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMAINDER_7_LARGE_NUMBERS{ static int f_gold ( String num ) { int series [ ] = { 1 , 3 , 2 , - 1 , - 3 , - 2 }; int series_index = 0 ; int result = 0 ; for ( int i = num . length ( ) - 1 ; i >= 0 ; i -- ) { int digit = num . charAt ( i ) - '0' ; result += digit * series [ series_index ] ; series_index = ( series_index + 1 ) % 6 ; result %= 7 ; } if ( result < 0 ) result = ( result + 7 ) % 7 ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""K""); param0.add(""850076""); param0.add(""00111""); param0.add(""X""); param0.add(""1""); param0.add(""10010001100""); param0.add("" pgPeLz""); param0.add(""53212456821275""); param0.add(""101""); param0.add(""V""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ; "," using namespace std; int f_gold ( string num ) { int series [ ] = { 1, 3, 2, - 1, - 3, - 2 }; int series_index = 0; int result = 0; for ( int i = num . size ( ) - 1; i >= 0; i -- ) { int digit = num [ i ] - '0'; result += digit * series [ series_index ]; series_index = ( series_index + 1 ) % 6; result %= 7; } if ( result < 0 ) result = ( result + 7 ) % 7; return result; } int main() { int n_success = 0; vector param0 {""K"",""850076"",""00111"",""X"",""1"",""10010001100"","" pgPeLz"",""53212456821275"",""101"",""V""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('K',), ('850076',), ('00111',), ('X',), ('1',), ('10010001100',), (' pgPeLz',), ('53212456821275',), ('101',), ('V',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FRIENDS_PAIRING_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FRIENDS_PAIRING_PROBLEM{ static int f_gold ( int n ) { int dp [ ] = new int [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { if ( i <= 2 ) dp [ i ] = i ; else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ] ; } return dp [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(99); param0.add(62); param0.add(87); param0.add(87); param0.add(61); param0.add(88); param0.add(73); param0.add(62); param0.add(98); param0.add(57); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ] "," using namespace std; int f_gold ( int n ) { int dp [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) { if ( i <= 2 ) dp [ i ] = i; else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ]; } return dp [ n ]; } int main() { int n_success = 0; vector param0 {99,62,87,87,61,88,73,62,98,57}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (99,), (62,), (87,), (87,), (61,), (88,), (73,), (62,), (98,), (57,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_CHARACTERS_GIVEN_STRING_CAN_REARRANGED_FORM_PALINDROME_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_CHARACTERS_GIVEN_STRING_CAN_REARRANGED_FORM_PALINDROME_1{ static boolean f_gold ( String str ) { List < Character > list = new ArrayList < Character > ( ) ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( list . contains ( str . charAt ( i ) ) ) list . remove ( ( Character ) str . charAt ( i ) ) ; else list . add ( str . charAt ( i ) ) ; } if ( str . length ( ) % 2 == 0 && list . isEmpty ( ) || ( str . length ( ) % 2 == 1 && list . size ( ) == 1 ) ) return true ; else return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""abccba""); param0.add(""2674377254""); param0.add(""11""); param0.add(""abcdecba""); param0.add(""26382426486138""); param0.add(""111010111010""); param0.add(""hUInqJXNdbfP""); param0.add(""5191""); param0.add(""1110101101""); param0.add(""NupSrU xz""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( string str ) { vector < char > list; for ( int i = 0; i < str . length ( ); i ++ ) { auto pos = find ( list . begin ( ), list . end ( ), str [ i ] ); if ( pos != list . end ( ) ) { auto posi = find ( list . begin ( ), list . end ( ), str [ i ] ); list . erase ( posi ); } else list . push_back ( str [ i ] ); } if ( str . length ( ) % 2 == 0 && list . empty ( ) || ( str . length ( ) % 2 == 1 && list . size ( ) == 1 ) ) return true; else return false; } int main() { int n_success = 0; vector param0 {""abccba"",""2674377254"",""11"",""abcdecba"",""26382426486138"",""111010111010"",""hUInqJXNdbfP"",""5191"",""1110101101"",""NupSrU xz""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1{ static int f_gold ( int n ) { int count = 0 ; int x = n & ( n - 1 ) ; if ( n > 0 && x == 0 ) { while ( n > 1 ) { n >>= 1 ; count += 1 ; } return ( count % 2 == 0 ) ? 1 : 0 ; } return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(1); param0.add(4); param0.add(64); param0.add(-64); param0.add(128); param0.add(1024); param0.add(45); param0.add(33); param0.add(66); param0.add(74); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; bool f_gold ( unsigned int n ) { int count = 0; if ( n && ! ( n & ( n - 1 ) ) ) { while ( n > 1 ) { n >>= 1; count += 1; } return ( count % 2 == 0 ) ? 1 : 0; } return 0; } int main() { int n_success = 0; vector param0 {1,4,64,-64,128,1024,45,33,66,74}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (1,), (4,), (64,), (-64,), (128,), (1024,), (45,), (33,), (66,), (74,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_WAYS_TO_CONSTRUCT_BUILDINGS{ static int f_gold ( int N ) { if ( N == 1 ) return 4 ; int countB = 1 , countS = 1 , prev_countB , prev_countS ; for ( int i = 2 ; i <= N ; i ++ ) { prev_countB = countB ; prev_countS = countS ; countS = prev_countB + prev_countS ; countB = prev_countS ; } int result = countS + countB ; return ( result * result ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(17); param0.add(66); param0.add(53); param0.add(97); param0.add(34); param0.add(54); param0.add(9); param0.add(99); param0.add(59); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 ) "," using namespace std; int f_gold ( int N ) { if ( N == 1 ) return 4; int countB = 1, countS = 1, prev_countB, prev_countS; for ( int i = 2; i <= N; i ++ ) { prev_countB = countB; prev_countS = countS; countS = prev_countB + prev_countS; countB = prev_countS; } int result = countS + countB; return ( result * result ); } int main() { int n_success = 0; vector param0 {17,66,53,97,34,54,9,99,59,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (17,), (66,), (53,), (97,), (34,), (54,), (9,), (99,), (59,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_PAIRWISE_PRODUCTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_PAIRWISE_PRODUCTS_1{ static int f_gold ( int n ) { int multiTerms = n * ( n + 1 ) / 2 ; int sum = multiTerms ; for ( int i = 2 ; i <= n ; i ++ ) { multiTerms = multiTerms - ( i - 1 ) ; sum = sum + multiTerms * i ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(41); param0.add(50); param0.add(67); param0.add(18); param0.add(60); param0.add(6); param0.add(27); param0.add(46); param0.add(50); param0.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; long long int f_gold ( int n ) { long long int multiTerms = n * ( n + 1 ) / 2; long long int sum = multiTerms; for ( int i = 2; i <= n; i ++ ) { multiTerms = multiTerms - ( i - 1 ); sum = sum + multiTerms * i; } return sum; } int main() { int n_success = 0; vector param0 {41,50,67,18,60,6,27,46,50,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (41,), (50,), (67,), (18,), (60,), (6,), (27,), (46,), (50,), (20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REMOVE_MINIMUM_NUMBER_ELEMENTS_NO_COMMON_ELEMENT_EXIST_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMOVE_MINIMUM_NUMBER_ELEMENTS_NO_COMMON_ELEMENT_EXIST_ARRAY{ public static int f_gold ( int a [ ] , int b [ ] , int n , int m ) { HashMap < Integer , Integer > countA = new HashMap < Integer , Integer > ( ) ; HashMap < Integer , Integer > countB = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( countA . containsKey ( a [ i ] ) ) countA . put ( a [ i ] , countA . get ( a [ i ] ) + 1 ) ; else countA . put ( a [ i ] , 1 ) ; } for ( int i = 0 ; i < m ; i ++ ) { if ( countB . containsKey ( b [ i ] ) ) countB . put ( b [ i ] , countB . get ( b [ i ] ) + 1 ) ; else countB . put ( b [ i ] , 1 ) ; } int res = 0 ; Set < Integer > s = countA . keySet ( ) ; for ( int x : s ) if ( countB . containsKey ( x ) ) res += Math . min ( countB . get ( x ) , countA . get ( x ) ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,7,10,12,12,24,29,38,45,51,53,54,59,68,72,73,85,86,88,92,92,95}); param0.add(new int[]{-6,48,-70,14,-86,56,80,-64,64,-88,-14,78,14,-18,52,2,22,88}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{10,93,2,16,36,49,36,86,6,99,95,2}); param0.add(new int[]{-98,-96,-80,-64,-42,-30,-6,10,62,66,82}); param0.add(new int[]{1,1,0,1,1}); param0.add(new int[]{7,11,13,15,21,33,36,39,66,99}); param0.add(new int[]{-40}); param0.add(new int[]{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}); param0.add(new int[]{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}); List param1 = new ArrayList<>(); param1.add(new int[]{7,9,17,23,25,26,29,32,35,56,56,58,59,59,62,63,72,82,85,86,95,97}); param1.add(new int[]{-62,-58,60,-30,42,8,66,-48,-18,64,-76,-90,-48,-90,-24,64,-88,-98}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{99,28,7,21,62,89,82,41,43,77,8,14}); param1.add(new int[]{-62,-50,-42,24,44,46,52,54,60,72,72}); param1.add(new int[]{1,1,1,0,0}); param1.add(new int[]{23,36,42,44,62,65,70,78,82,89}); param1.add(new int[]{-98}); param1.add(new int[]{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}); param1.add(new int[]{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}); List param2 = new ArrayList<>(); param2.add(15); param2.add(15); param2.add(10); param2.add(6); param2.add(9); param2.add(4); param2.add(9); param2.add(0); param2.add(31); param2.add(18); List param3 = new ArrayList<>(); param3.add(13); param3.add(9); param3.add(10); param3.add(10); param3.add(6); param3.add(2); param3.add(9); param3.add(0); param3.add(26); param3.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","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 "," using namespace std; int f_gold ( int a [ ], int b [ ], int n, int m ) { unordered_map < int, int > countA, countB; for ( int i = 0; i < n; i ++ ) countA [ a [ i ] ] ++; for ( int i = 0; i < m; i ++ ) countB [ b [ i ] ] ++; int res = 0; for ( auto x : countA ) if ( countB . find ( x . first ) != countB . end ( ) ) res += min ( x . second, countB [ x . first ] ); return res; } int main() { int n_success = 0; vector> param0 {{4,7,10,12,12,24,29,38,45,51,53,54,59,68,72,73,85,86,88,92,92,95},{-6,48,-70,14,-86,56,80,-64,64,-88,-14,78,14,-18,52,2,22,88},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1},{10,93,2,16,36,49,36,86,6,99,95,2},{-98,-96,-80,-64,-42,-30,-6,10,62,66,82},{1,1,0,1,1},{7,11,13,15,21,33,36,39,66,99},{-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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{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}}; vector> param1 {{7,9,17,23,25,26,29,32,35,56,56,58,59,59,62,63,72,82,85,86,95,97},{-62,-58,60,-30,42,8,66,-48,-18,64,-76,-90,-48,-90,-24,64,-88,-98},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{99,28,7,21,62,89,82,41,43,77,8,14},{-62,-50,-42,24,44,46,52,54,60,72,72},{1,1,1,0,0},{23,36,42,44,62,65,70,78,82,89},{-98},{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},{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}}; vector param2 {15,15,10,6,9,4,9,0,31,18}; vector param3 {13,9,10,10,6,2,9,0,26,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([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,), ([-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,), ([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,), ([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,), ([-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, 0, 1, 1],[1, 1, 1, 0, 0],4,2,), ([7, 11, 13, 15, 21, 33, 36, 39, 66, 99],[23, 36, 42, 44, 62, 65, 70, 78, 82, 89],9,9,), ([-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, 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,), ([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,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2{ public static int f_gold ( int n ) { int nthElement = 19 + ( n - 1 ) * 9 ; int outliersCount = ( int ) Math . log10 ( nthElement ) - 1 ; nthElement += 9 * outliersCount ; return nthElement ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(68); param0.add(70); param0.add(69); param0.add(93); param0.add(99); param0.add(44); param0.add(91); param0.add(8); param0.add(83); param0.add(51); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : nthElement = 19 + ( n - 1 ) * 9 outliersCount = int ( math.log10 ( nthElement ) ) - 1 nthElement += 9 * outliersCount return nthElement "," using namespace std; int f_gold ( int n ) { int nthElement = 19 + ( n - 1 ) * 9; int outliersCount = ( int ) log10 ( nthElement ) - 1; nthElement += 9 * outliersCount; return nthElement; } int main() { int n_success = 0; vector param0 {68,70,69,93,99,44,91,8,83,51}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (68,), (70,), (69,), (93,), (99,), (44,), (91,), (8,), (83,), (51,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH{ static int f_gold ( int [ ] arr , int n , int k ) { if ( k > n ) return - 1 ; int [ ] csum = new int [ n ] ; csum [ 0 ] = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) csum [ i ] = csum [ i - 1 ] + arr [ i ] ; int max_sum = csum [ k - 1 ] , max_end = k - 1 ; for ( int i = k ; i < n ; i ++ ) { int curr_sum = csum [ i ] - csum [ i - k ] ; if ( curr_sum > max_sum ) { max_sum = curr_sum ; max_end = i ; } } return max_end - k + 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,4,6,19,21,23,32,34,47,51,56,57,57,65,68,68,69,70,71,73,74,74,77,77,79,82,82,86,87,87,88,89,90,91,92}); param0.add(new int[]{24,62,-32,-28,42,-46,-96,-70,-68,60,44,34,-30,96,-26,92,62,42,-46,-38,44,54,-94,52,66,68,-96,-58,84,-2,66,30,42}); param0.add(new int[]{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}); param0.add(new int[]{94,6,48,34,31}); param0.add(new int[]{-98,-88,-82,-80,-76,-70,-70,-60,-60,-52,-50,-46,-44,-44,-44,-20,-18,-12,-12,-12,-10,-8,-6,-4,4,4,18,28,32,34,42,42,44,46,48,54,60,70,70,72,78,78,78,78,84,86,90,96,98}); param0.add(new int[]{0,1,0,0,1,0,1,1,0,0,1,1,0,0,0,0,0}); param0.add(new int[]{1,5,13,17,26,26,32,35,38,38,39,45,52,58,60,61,62,63,82,83,85,89,89,91}); param0.add(new int[]{-68,-52,4,-90,90,88,38,-18,86,4,14,-32,-14,-44,-88,-50,-12,-26,-68,-20,-30,22,0,14,-40,58,-6,28,-44,8,28,96,-46,-12}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{17,33,36,34,32,10,37,48,47,32,21,18,75,8,18,52,21,73,25,25,80,32,10,24,1,89,7,42,86,85,73,12,20,20,1,74,77,4,24,74,8}); List param1 = new ArrayList<>(); param1.add(29); param1.add(23); param1.add(32); param1.add(4); param1.add(45); param1.add(15); param1.add(13); param1.add(32); param1.add(13); param1.add(20); List param2 = new ArrayList<>(); param2.add(20); param2.add(31); param2.add(31); param2.add(3); param2.add(30); param2.add(8); param2.add(22); param2.add(22); param2.add(11); param2.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : if k > n : return - 1 csum = [ 0 ] * n csum [ 0 ] = arr [ 0 ] for i in range ( 1 , n ) : csum [ i ] = csum [ i - 1 ] + arr [ i ] ; max_sum = csum [ k - 1 ] max_end = k - 1 for i in range ( k , n ) : curr_sum = csum [ i ] - csum [ i - k ] if curr_sum > max_sum : max_sum = curr_sum max_end = i return max_end - k + 1 "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { if ( k > n ) return - 1; int * csum = new int [ n ]; csum [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) csum [ i ] = csum [ i - 1 ] + arr [ i ]; int max_sum = csum [ k - 1 ], max_end = k - 1; for ( int i = k; i < n; i ++ ) { int curr_sum = csum [ i ] - csum [ i - k ]; if ( curr_sum > max_sum ) { max_sum = curr_sum; max_end = i; } } delete [ ] csum; return max_end - k + 1; } int main() { int n_success = 0; vector> param0 {{2,4,6,19,21,23,32,34,47,51,56,57,57,65,68,68,69,70,71,73,74,74,77,77,79,82,82,86,87,87,88,89,90,91,92},{24,62,-32,-28,42,-46,-96,-70,-68,60,44,34,-30,96,-26,92,62,42,-46,-38,44,54,-94,52,66,68,-96,-58,84,-2,66,30,42},{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},{94,6,48,34,31},{-98,-88,-82,-80,-76,-70,-70,-60,-60,-52,-50,-46,-44,-44,-44,-20,-18,-12,-12,-12,-10,-8,-6,-4,4,4,18,28,32,34,42,42,44,46,48,54,60,70,70,72,78,78,78,78,84,86,90,96,98},{0,1,0,0,1,0,1,1,0,0,1,1,0,0,0,0,0},{1,5,13,17,26,26,32,35,38,38,39,45,52,58,60,61,62,63,82,83,85,89,89,91},{-68,-52,4,-90,90,88,38,-18,86,4,14,-32,-14,-44,-88,-50,-12,-26,-68,-20,-30,22,0,14,-40,58,-6,28,-44,8,28,96,-46,-12},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{17,33,36,34,32,10,37,48,47,32,21,18,75,8,18,52,21,73,25,25,80,32,10,24,1,89,7,42,86,85,73,12,20,20,1,74,77,4,24,74,8}}; vector param1 {29,23,32,4,45,15,13,32,13,20}; vector param2 {20,31,31,3,30,8,22,22,11,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 4, 6, 19, 21, 23, 32, 34, 47, 51, 56, 57, 57, 65, 68, 68, 69, 70, 71, 73, 74, 74, 77, 77, 79, 82, 82, 86, 87, 87, 88, 89, 90, 91, 92],29,20,), ([24, 62, -32, -28, 42, -46, -96, -70, -68, 60, 44, 34, -30, 96, -26, 92, 62, 42, -46, -38, 44, 54, -94, 52, 66, 68, -96, -58, 84, -2, 66, 30, 42],23,31,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],32,31,), ([94, 6, 48, 34, 31],4,3,), ([-98, -88, -82, -80, -76, -70, -70, -60, -60, -52, -50, -46, -44, -44, -44, -20, -18, -12, -12, -12, -10, -8, -6, -4, 4, 4, 18, 28, 32, 34, 42, 42, 44, 46, 48, 54, 60, 70, 70, 72, 78, 78, 78, 78, 84, 86, 90, 96, 98],45,30,), ([0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0],15,8,), ([1, 5, 13, 17, 26, 26, 32, 35, 38, 38, 39, 45, 52, 58, 60, 61, 62, 63, 82, 83, 85, 89, 89, 91],13,22,), ([-68, -52, 4, -90, 90, 88, 38, -18, 86, 4, 14, -32, -14, -44, -88, -50, -12, -26, -68, -20, -30, 22, 0, 14, -40, 58, -6, 28, -44, 8, 28, 96, -46, -12],32,22,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,11,), ([17, 33, 36, 34, 32, 10, 37, 48, 47, 32, 21, 18, 75, 8, 18, 52, 21, 73, 25, 25, 80, 32, 10, 24, 1, 89, 7, 42, 86, 85, 73, 12, 20, 20, 1, 74, 77, 4, 24, 74, 8],20,28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_ORDERED_PAIRS_AI_AJ_0," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_ORDERED_PAIRS_AI_AJ_0{ static int f_gold ( int a [ ] , int n ) { int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) if ( ( a [ i ] & a [ j ] ) == 0 ) count += 2 ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{17,20,32,35,35,36,43,47,59,59,68,69,70,70,75,82,88,94,96,99}); param0.add(new int[]{-78,-40,58,-36,34,-12,-38,48,-66,16,50,-26,-22,46,-70,-68,-44,-52,-78,-50}); param0.add(new int[]{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}); param0.add(new int[]{49,57,17,37,56,61,10,3,33,33,70,35,50,85,48,65,83,21,96,19,66,43,69,17,60,87,82,3,83,44,63,19,55,58,77,76,50,96}); param0.add(new int[]{-94,-88,-86,-80,-80,-72,-64,-60,-58,-58,-58,-50,-44,-32,-8,-8,0,6,8,10,14,14,18,28,34,34,46,54,56,56,56,64,66,66,70,82,84,88,96}); param0.add(new int[]{1,1,1,0,1,0,1,1,0,0,1,0,1,0,1,1,0}); param0.add(new int[]{1,3,10,11,13,14,15,17,20,25,26,26,27,29,32,36,36,36,42,46,47,49,51,54,54,55,60,66,67,68,68,68,72,77,78,79,83,84,92,98}); param0.add(new int[]{-76,-72,16,38,-60,44,-2,-76,-76,-56,40,36,50,-50,-32,48,-96,80,84,60,84,38,-54,-42,48,30,66,-62,-52,-94,64,-16,54,98}); param0.add(new int[]{0,0,1,1,1,1}); param0.add(new int[]{63,82,22,84,11,62,18,43,57,25,4,27,62,46,55,16,1,9,10,73,36,80,95,87,47,64,27,25,70}); List param1 = new ArrayList<>(); param1.add(17); param1.add(11); param1.add(23); param1.add(37); param1.add(33); param1.add(13); param1.add(32); param1.add(28); param1.add(5); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : count = 0 for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : if ( a [ i ] & a [ j ] ) == 0 : count += 2 return count "," using namespace std; int f_gold ( int a [ ], int n ) { int count = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = i + 1; j < n; j ++ ) if ( ( a [ i ] & a [ j ] ) == 0 ) count += 2; } return count; } int main() { int n_success = 0; vector> param0 {{17,20,32,35,35,36,43,47,59,59,68,69,70,70,75,82,88,94,96,99},{-78,-40,58,-36,34,-12,-38,48,-66,16,50,-26,-22,46,-70,-68,-44,-52,-78,-50},{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},{49,57,17,37,56,61,10,3,33,33,70,35,50,85,48,65,83,21,96,19,66,43,69,17,60,87,82,3,83,44,63,19,55,58,77,76,50,96},{-94,-88,-86,-80,-80,-72,-64,-60,-58,-58,-58,-50,-44,-32,-8,-8,0,6,8,10,14,14,18,28,34,34,46,54,56,56,56,64,66,66,70,82,84,88,96},{1,1,1,0,1,0,1,1,0,0,1,0,1,0,1,1,0},{1,3,10,11,13,14,15,17,20,25,26,26,27,29,32,36,36,36,42,46,47,49,51,54,54,55,60,66,67,68,68,68,72,77,78,79,83,84,92,98},{-76,-72,16,38,-60,44,-2,-76,-76,-56,40,36,50,-50,-32,48,-96,80,84,60,84,38,-54,-42,48,30,66,-62,-52,-94,64,-16,54,98},{0,0,1,1,1,1},{63,82,22,84,11,62,18,43,57,25,4,27,62,46,55,16,1,9,10,73,36,80,95,87,47,64,27,25,70}}; vector param1 {17,11,23,37,33,13,32,28,5,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([17, 20, 32, 35, 35, 36, 43, 47, 59, 59, 68, 69, 70, 70, 75, 82, 88, 94, 96, 99],17,), ([-78, -40, 58, -36, 34, -12, -38, 48, -66, 16, 50, -26, -22, 46, -70, -68, -44, -52, -78, -50],11,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,), ([49, 57, 17, 37, 56, 61, 10, 3, 33, 33, 70, 35, 50, 85, 48, 65, 83, 21, 96, 19, 66, 43, 69, 17, 60, 87, 82, 3, 83, 44, 63, 19, 55, 58, 77, 76, 50, 96],37,), ([-94, -88, -86, -80, -80, -72, -64, -60, -58, -58, -58, -50, -44, -32, -8, -8, 0, 6, 8, 10, 14, 14, 18, 28, 34, 34, 46, 54, 56, 56, 56, 64, 66, 66, 70, 82, 84, 88, 96],33,), ([1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0],13,), ([1, 3, 10, 11, 13, 14, 15, 17, 20, 25, 26, 26, 27, 29, 32, 36, 36, 36, 42, 46, 47, 49, 51, 54, 54, 55, 60, 66, 67, 68, 68, 68, 72, 77, 78, 79, 83, 84, 92, 98],32,), ([-76, -72, 16, 38, -60, 44, -2, -76, -76, -56, 40, 36, 50, -50, -32, 48, -96, 80, 84, 60, 84, 38, -54, -42, 48, 30, 66, -62, -52, -94, 64, -16, 54, 98],28,), ([0, 0, 1, 1, 1, 1],5,), ([63, 82, 22, 84, 11, 62, 18, 43, 57, 25, 4, 27, 62, 46, 55, 16, 1, 9, 10, 73, 36, 80, 95, 87, 47, 64, 27, 25, 70],22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_WHETHER_LARGE_NUMBER_DIVISIBLE_7," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_LARGE_NUMBER_DIVISIBLE_7{ static boolean f_gold ( String num ) { int n = num . length ( ) ; if ( n == 0 && num . charAt ( 0 ) == '0' ) return true ; if ( n % 3 == 1 ) num = ""00"" + num ; if ( n % 3 == 2 ) num = ""0"" + num ; n = num . length ( ) ; int gSum = 0 , p = 1 ; for ( int i = n - 1 ; i >= 0 ; i -- ) { int group = 0 ; group += num . charAt ( i -- ) - '0' ; group += ( num . charAt ( i -- ) - '0' ) * 10 ; group += ( num . charAt ( i ) - '0' ) * 100 ; gSum = gSum + group * p ; p = p * - 1 ; } return ( gSum % 7 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""8955795758""); param0.add(""0515""); param0.add(""101""); param0.add(""14""); param0.add(""0""); param0.add(""9250318""); param0.add(""336""); param0.add(""68143991""); param0.add(""11010001""); param0.add(""zsS""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES{ static int f_gold ( String s , int K ) { int n = s . length ( ) ; int C = 0 , c1 = 0 , c2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s . charAt ( i ) == 'a' ) c1 ++ ; if ( s . charAt ( i ) == 'b' ) { c2 ++ ; C += c1 ; } } return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""abbc""); param0.add(""abahk""); param0.add(""hugbabab""); param0.add(""abadbc""); param0.add(""nkg9""); param0.add(""jh7dab""); param0.add(""abd""); param0.add(""aabb8yk""); param0.add(""1111""); param0.add(""PFXAhru""); List param1 = new ArrayList<>(); param1.add(96); param1.add(7); param1.add(59); param1.add(60); param1.add(8); param1.add(41); param1.add(87); param1.add(4); param1.add(18); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( s , K ) : n = len ( s ) c1 = 0 c2 = 0 C = 0 for i in range ( n ) : if s [ i ] == 'a' : c1 += 1 if s [ i ] == 'b' : c2 += 1 C += c1 return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2 "," using namespace std; int f_gold ( string s, int K ) { int n = s . length ( ); int C, c1 = 0, c2 = 0; for ( int i = 0; i < n; i ++ ) { if ( s [ i ] == 'a' ) c1 ++; if ( s [ i ] == 'b' ) { c2 ++; C += c1; } } return C * K + ( K * ( K - 1 ) / 2 ) * c1 * c2; } int main() { int n_success = 0; vector param0 {""KdJ"",""031"",""11000"",""zPbB"",""9"",""1010"",""c"",""06064629743411"",""1111"",""PFXAhru""}; vector param1 {96,70,59,60,80,41,87,4,18,83}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('abbc',96,), ('abahk',7,), ('hugbabab',5,), ('abadbc',60,), ('nkg9',8,), ('jh7dab',41,), ('abd',87,), ('aabb8yk',4,), ('1111',18,), ('PFXAhr',8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_SUM_BITONIC_SUBARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_BITONIC_SUBARRAY{ static int f_gold ( int arr [ ] , int n ) { int [ ] msis = new int [ n ] ; int [ ] msds = new int [ n ] ; int max_sum = Integer . MIN_VALUE ; msis [ 0 ] = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) if ( arr [ i ] > arr [ i - 1 ] ) msis [ i ] = msis [ i - 1 ] + arr [ i ] ; else msis [ i ] = arr [ i ] ; msds [ n - 1 ] = arr [ n - 1 ] ; for ( int i = n - 2 ; i >= 0 ; i -- ) if ( arr [ i ] > arr [ i + 1 ] ) msds [ i ] = msds [ i + 1 ] + arr [ i ] ; else msds [ i ] = arr [ i ] ; for ( int i = 0 ; i < n ; i ++ ) if ( max_sum < ( msis [ i ] + msds [ i ] - arr [ i ] ) ) max_sum = msis [ i ] + msds [ i ] - arr [ i ] ; return max_sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,12,16,23,26,27,39,39,40,44,57,58,77,78,81,82,84,86,91,94,94,95,97}); param0.add(new int[]{72,38,-60,98,-52,-38,-2,94,34,56,90,46,6,-2,30,-96,-76,-96,-76,32,68,64,-32,-4,72,-62,58,20,-84,0,-96,70,-22,-56,70,-74,-90,-86,-14,82,-90,40,-64,94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{69,31,85,84,28,28}); param0.add(new int[]{-80,-74,-24,-22,-22,4,20,28,30,32,36,58,58,68,92,94,98}); param0.add(new int[]{1,1,0,0,0,1,0,1,1,1,1}); param0.add(new int[]{2,2,2,4,6,7,8,10,15,17,19,20,21,27,28,29,32,32,40,44,46,47,49,50,50,52,55,56,58,59,64,69,73,74,74,77,80,80,84,89,91,95,96,96,97,98,98,99}); param0.add(new int[]{26,-86,8,64,-40,64,60,-16,54,-42,-86,14,-48,-20,-42,-4,-34,-52,-74,22,10}); param0.add(new int[]{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}); param0.add(new int[]{8,5,5,56,5,38}); List param1 = new ArrayList<>(); param1.add(13); param1.add(37); param1.add(33); param1.add(5); param1.add(16); param1.add(10); param1.add(46); param1.add(18); param1.add(27); param1.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : msis = [ None ] * n msds = [ None ] * n max_sum = 0 msis [ 0 ] = arr [ 0 ] for i in range ( 1 , n ) : if ( arr [ i ] > arr [ i - 1 ] ) : msis [ i ] = msis [ i - 1 ] + arr [ i ] else : msis [ i ] = arr [ i ] msds [ n - 1 ] = arr [ n - 1 ] for i in range ( n - 2 , - 1 , - 1 ) : if ( arr [ i ] > arr [ i + 1 ] ) : msds [ i ] = msds [ i + 1 ] + arr [ i ] else : msds [ i ] = arr [ i ] for i in range ( n ) : if ( max_sum < ( msis [ i ] + msds [ i ] - arr [ i ] ) ) : max_sum = ( msis [ i ] + msds [ i ] - arr [ i ] ) return max_sum "," using namespace std; int f_gold ( int arr [ ], int n ) { int msis [ n ], msds [ n ]; int max_sum = INT_MIN; msis [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) if ( arr [ i ] > arr [ i - 1 ] ) msis [ i ] = msis [ i - 1 ] + arr [ i ]; else msis [ i ] = arr [ i ]; msds [ n - 1 ] = arr [ n - 1 ]; for ( int i = n - 2; i >= 0; i -- ) if ( arr [ i ] > arr [ i + 1 ] ) msds [ i ] = msds [ i + 1 ] + arr [ i ]; else msds [ i ] = arr [ i ]; for ( int i = 0; i < n; i ++ ) if ( max_sum < ( msis [ i ] + msds [ i ] - arr [ i ] ) ) max_sum = msis [ i ] + msds [ i ] - arr [ i ]; return max_sum; } int main() { int n_success = 0; vector> param0 {{7,12,16,23,26,27,39,39,40,44,57,58,77,78,81,82,84,86,91,94,94,95,97},{72,38,-60,98,-52,-38,-2,94,34,56,90,46,6,-2,30,-96,-76,-96,-76,32,68,64,-32,-4,72,-62,58,20,-84,0,-96,70,-22,-56,70,-74,-90,-86,-14,82,-90,40,-64,94},{0,0,0,0,0,0,0,0,0,0,0,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},{69,31,85,84,28,28},{-80,-74,-24,-22,-22,4,20,28,30,32,36,58,58,68,92,94,98},{1,1,0,0,0,1,0,1,1,1,1},{2,2,2,4,6,7,8,10,15,17,19,20,21,27,28,29,32,32,40,44,46,47,49,50,50,52,55,56,58,59,64,69,73,74,74,77,80,80,84,89,91,95,96,96,97,98,98,99},{26,-86,8,64,-40,64,60,-16,54,-42,-86,14,-48,-20,-42,-4,-34,-52,-74,22,10},{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},{8,5,5,56,5,38}}; vector param1 {13,37,33,5,16,10,46,18,27,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 12, 16, 23, 26, 27, 39, 39, 40, 44, 57, 58, 77, 78, 81, 82, 84, 86, 91, 94, 94, 95, 97],13,), ([72, 38, -60, 98, -52, -38, -2, 94, 34, 56, 90, 46, 6, -2, 30, -96, -76, -96, -76, 32, 68, 64, -32, -4, 72, -62, 58, 20, -84, 0, -96, 70, -22, -56, 70, -74, -90, -86, -14, 82, -90, 40, -64, 94],37,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],33,), ([69, 31, 85, 84, 28, 28],5,), ([-80, -74, -24, -22, -22, 4, 20, 28, 30, 32, 36, 58, 58, 68, 92, 94, 98],16,), ([1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1],10,), ([2, 2, 2, 4, 6, 7, 8, 10, 15, 17, 19, 20, 21, 27, 28, 29, 32, 32, 40, 44, 46, 47, 49, 50, 50, 52, 55, 56, 58, 59, 64, 69, 73, 74, 74, 77, 80, 80, 84, 89, 91, 95, 96, 96, 97, 98, 98, 99],46,), ([26, -86, 8, 64, -40, 64, 60, -16, 54, -42, -86, 14, -48, -20, -42, -4, -34, -52, -74, 22, 10],18,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],27,), ([8, 5, 5, 56, 5, 38],3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_GAMES_PLAYED_WINNER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_GAMES_PLAYED_WINNER{ static int f_gold ( int N ) { int [ ] dp = new int [ N ] ; dp [ 0 ] = 1 ; dp [ 1 ] = 2 ; int i = 2 ; do { dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] ; } while ( dp [ i ++ ] <= N ) ; return ( i - 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(73); param0.add(28); param0.add(33); param0.add(23); param0.add(84); param0.add(31); param0.add(48); param0.add(46); param0.add(45); param0.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N ) : dp = [ 0 for i in range ( N ) ] dp [ 0 ] = 1 dp [ 1 ] = 2 i = 1 while dp [ i ] <= N : i = i + 1 dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] return ( i - 1 ) "," using namespace std; int f_gold ( int N ) { int dp [ N ]; dp [ 0 ] = 1; dp [ 1 ] = 2; int i = 2; do { dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ]; } while ( dp [ i ++ ] <= N ); return ( i - 2 ); } int main() { int n_success = 0; vector param0 {73,28,33,23,84,31,48,46,45,90}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (73,), (28,), (33,), (23,), (84,), (31,), (48,), (46,), (45,), (90,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EFFICIENT_SEARCH_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_IS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EFFICIENT_SEARCH_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_IS_1{ static int f_gold ( int arr [ ] , int n , int x ) { int i = 0 ; while ( i <= n - 1 ) { if ( arr [ i ] == x ) return i ; i += Math . abs ( arr [ i ] - x ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5, 4, 5, 6, 5, 4, 3, 2}); param0.add(new int[]{5, 4, 5, 6, 5, 4, 3, 2}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{50,51,52,51,50,49,48}); param0.add(new int[]{-86,-68,-32,-6,6,10,30,34,58,92}); param0.add(new int[]{1,1,1,0,0,1,0,0,0,1,1,1,0,1,0,0,1,1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0}); param0.add(new int[]{58}); param0.add(new int[]{-64,78,58,36,48,80,-80,74,-98,46,-48,24,80,72,90,-46,14,68,38,58,-54,80,44,-62,34,-28,92,84,90,44,-26,88,18,22,-32,54,58,92}); param0.add(new int[]{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}); param0.add(new int[]{5}); List param1 = new ArrayList<>(); param1.add(8); param1.add(8); param1.add(15); param1.add(7); param1.add(6); param1.add(27); param1.add(0); param1.add(24); param1.add(35); param1.add(0); List param2 = new ArrayList<>(); param2.add(6); param2.add(3); param2.add(1); param2.add(49); param2.add(6); param2.add(22); param2.add(0); param2.add(34); param2.add(1); param2.add(0); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(arr, n, x): i = 0 while (i <= n - 1): if (arr[i] == x): return i i += abs(arr[i] - x) return - 1 "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int i = 0; while ( i <= n - 1 ) { if ( arr [ i ] == x ) return i; i += abs ( arr [ i ] - x ); } return - 1; } int main() { int n_success = 0; vector> param0 { {5, 4, 5, 6, 5, 4, 3, 2}, {5, 4, 5, 6, 5, 4, 3, 2}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, {50,51,52,51,50,49,48}, {-86,-68,-32,-6,6,10,30,34,58,92}, {1,1,1,0,0,1,0,0,0,1,1,1,0,1,0,0,1,1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0}, {58}, {-64,78,58,36,48,80,-80,74,-98,46,-48,24,80,72,90,-46,14,68,38,58,-54,80,44,-62,34,-28,92,84,90,44,-26,88,18,22,-32,54,58,92}, {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}, {5}}; vector param1 {8,8,15,7,6,27,0,24,35,0}; vector param2 {6,3,1,49,6,22,0,34,1,0}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 4, 5, 6, 5, 4, 3, 2], 29, 6,), ([5, 4, 5, 6, 5, 4, 3, 2], 19, 3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 37, 1,), ([50, 51, 52, 51, 50, 49, 48], 17, 49,), ([-86, -68, -32, -6, 6, 10, 30, 34, 58, 92], 6, 6,), ([1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], 27, 22,), ([58], 0, 0,), ([-64, 78, 58, 36, 48, 80, -80, 74, -98, 46, -48, 24, 80, 72, 90, -46, 14, 68, 38, 58, - 54, 80, 44, -62, 34, -28, 92, 84, 90, 44, -26, 88, 18, 22, -32, 54, 58, 92], 24, 34,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 35, 1,), ([5], 0, 0,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", COUNT_SET_BITS_IN_AN_INTEGER_3," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SET_BITS_IN_AN_INTEGER_3{ public static int f_gold ( int n ) { if ( n == 0 ) return 0 ; else return 1 + f_gold ( n & ( n - 1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(6); param0.add(58); param0.add(90); param0.add(69); param0.add(15); param0.add(54); param0.add(60); param0.add(51); param0.add(46); param0.add(91); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 ) : return 0 else : return 1 + f_gold ( n & ( n - 1 ) ) "," using namespace std; int f_gold ( int n ) { if ( n == 0 ) return 0; else return 1 + f_gold ( n & ( n - 1 ) ); } int main() { int n_success = 0; vector param0 {6,58,90,69,15,54,60,51,46,91}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (6,), (58,), (90,), (69,), (15,), (54,), (60,), (51,), (46,), (91,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COMPUTE_N_UNDER_MODULO_P," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_N_UNDER_MODULO_P{ static int f_gold ( int n , int p ) { if ( n >= p ) return 0 ; int result = 1 ; for ( int i = 1 ; i <= n ; i ++ ) result = ( result * i ) % p ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(85); param0.add(14); param0.add(83); param0.add(30); param0.add(96); param0.add(55); param0.add(82); param0.add(12); param0.add(38); param0.add(46); List param1 = new ArrayList<>(); param1.add(18); param1.add(13); param1.add(21); param1.add(35); param1.add(51); param1.add(58); param1.add(71); param1.add(74); param1.add(3); param1.add(73); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , p ) : if n >= p : return 0 result = 1 for i in range ( 1 , n + 1 ) : result = ( result * i ) % p return result "," using namespace std; int f_gold ( int n, int p ) { if ( n >= p ) return 0; int result = 1; for ( int i = 1; i <= n; i ++ ) result = ( result * i ) % p; return result; } int main() { int n_success = 0; vector param0 {85,14,83,30,96,55,82,12,38,46}; vector param1 {18,13,21,35,51,58,71,74,3,73}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (85,18,), (14,13,), (83,21,), (30,35,), (96,51,), (55,58,), (82,71,), (12,74,), (38,3,), (46,73,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SUM_PRODUCT_TWO_ARRAYS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_PRODUCT_TWO_ARRAYS{ static int f_gold ( int a [ ] , int b [ ] , int n , int k ) { int diff = 0 , res = 0 ; int temp = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int pro = a [ i ] * b [ i ] ; res = res + pro ; if ( pro < 0 && b [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ] ; else if ( pro < 0 && a [ i ] < 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ] ; else if ( pro > 0 && a [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ] ; else if ( pro > 0 && a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ] ; int d = Math . abs ( pro - temp ) ; if ( d > diff ) diff = d ; } return res - diff ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,9,9,16,19,21,24,26,26,27,31,33,36,44,46,47,69,71,72,74,74,74,74,76,76,77,89,91,91}); param0.add(new int[]{-64,-58,26,-42,-18,-52,26,-70,0,-68,38,-98,-14,-92,-74,-90,86,-76,-8,-80,-80,54,-26,-56,48,86,-60}); param0.add(new int[]{0,0,0,0,1,1,1,1}); param0.add(new int[]{62,73,67,96,95,31,58,13,63,13,29,97,7,36,13,54,67,8,9,36,6,29,92,7,82,5,27,65,80,20,22,1,11,67,23,31,86,27,53,87,39,99,69}); param0.add(new int[]{-86,-82,-42,-30,-12,-4,14,16,20,20,22,26,30,40,46,48,48,50,60,60,66,70,74,76,90,96,96,98}); param0.add(new int[]{1,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,1,1,1,0,0,0,1,0,1,1,1,1,1,0,0,1}); param0.add(new int[]{4,7,14,14,30,38,44,49,51,53,54,56,58,62,67,76,86,86,88,91,95}); param0.add(new int[]{2,90,-92,58,56,94,12,-2,86,-70,46,-80,42,-6,72,-52,4,96,-42,50,-28,42,8,26,46,70,-2,-24,-36,50,26,70,74,-52,34,-88,-66,74,52,62,-24,-80,40,42,90}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{61,96,7,59,86,74,7,95,13,52,18,77,25,97,74,18}); List param1 = new ArrayList<>(); param1.add(new int[]{1,8,10,10,12,16,17,19,20,20,23,33,37,38,58,66,69,70,70,76,79,80,83,84,84,86,87,87,93}); param1.add(new int[]{90,-2,-8,12,-58,46,-54,-40,-10,-76,-62,66,42,-66,4,-6,50,8,-18,92,-42,30,-34,74,-86,-56,52}); param1.add(new int[]{0,0,0,0,0,1,1,1}); param1.add(new int[]{88,64,94,64,4,23,6,85,92,68,78,53,96,88,69,28,12,34,92,67,39,68,72,64,10,14,26,61,96,1,79,87,45,9,16,70,63,84,79,63,11,85,46}); param1.add(new int[]{-98,-78,-68,-68,-64,-40,-38,-38,-26,-12,-6,0,2,8,18,34,52,58,64,64,70,72,76,82,84,90,96,96}); param1.add(new int[]{1,0,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,0,1,1,0,0,0}); param1.add(new int[]{2,2,7,19,20,21,22,26,42,45,46,46,59,63,63,72,73,74,77,83,89}); param1.add(new int[]{98,62,-52,-92,-14,-92,62,86,20,36,-80,-12,-38,70,-28,-28,42,-10,94,-16,-72,-96,76,-14,-18,-12,38,14,46,16,-90,10,-34,-6,-34,-62,96,14,0,-10,32,-6,96,-72,-2}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{56,38,75,57,82,30,38,79,39,73,74,73,36,10,80,50}); List param2 = new ArrayList<>(); param2.add(20); param2.add(20); param2.add(7); param2.add(23); param2.add(14); param2.add(20); param2.add(11); param2.add(25); param2.add(46); param2.add(13); List param3 = new ArrayList<>(); param3.add(28); param3.add(16); param3.add(5); param3.add(23); param3.add(14); param3.add(16); param3.add(17); param3.add(25); param3.add(33); param3.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int a [ ], int b [ ], int n, int k ) { int diff = 0, res = 0; int temp; for ( int i = 0; i < n; i ++ ) { int pro = a [ i ] * b [ i ]; res = res + pro; if ( pro < 0 && b [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ]; else if ( pro < 0 && a [ i ] < 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ]; else if ( pro > 0 && a [ i ] < 0 ) temp = ( a [ i ] + 2 * k ) * b [ i ]; else if ( pro > 0 && a [ i ] > 0 ) temp = ( a [ i ] - 2 * k ) * b [ i ]; int d = abs ( pro - temp ); if ( d > diff ) diff = d; } return res - diff; } int main() { int n_success = 0; vector> param0 {{8,9,9,16,19,21,24,26,26,27,31,33,36,44,46,47,69,71,72,74,74,74,74,76,76,77,89,91,91},{-64,-58,26,-42,-18,-52,26,-70,0,-68,38,-98,-14,-92,-74,-90,86,-76,-8,-80,-80,54,-26,-56,48,86,-60},{0,0,0,0,1,1,1,1},{62,73,67,96,95,31,58,13,63,13,29,97,7,36,13,54,67,8,9,36,6,29,92,7,82,5,27,65,80,20,22,1,11,67,23,31,86,27,53,87,39,99,69},{-86,-82,-42,-30,-12,-4,14,16,20,20,22,26,30,40,46,48,48,50,60,60,66,70,74,76,90,96,96,98},{1,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,1,1,1,0,0,0,1,0,1,1,1,1,1,0,0,1},{4,7,14,14,30,38,44,49,51,53,54,56,58,62,67,76,86,86,88,91,95},{2,90,-92,58,56,94,12,-2,86,-70,46,-80,42,-6,72,-52,4,96,-42,50,-28,42,8,26,46,70,-2,-24,-36,50,26,70,74,-52,34,-88,-66,74,52,62,-24,-80,40,42,90},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{61,96,7,59,86,74,7,95,13,52,18,77,25,97,74,18}}; vector> param1 {{1,8,10,10,12,16,17,19,20,20,23,33,37,38,58,66,69,70,70,76,79,80,83,84,84,86,87,87,93},{90,-2,-8,12,-58,46,-54,-40,-10,-76,-62,66,42,-66,4,-6,50,8,-18,92,-42,30,-34,74,-86,-56,52},{0,0,0,0,0,1,1,1},{88,64,94,64,4,23,6,85,92,68,78,53,96,88,69,28,12,34,92,67,39,68,72,64,10,14,26,61,96,1,79,87,45,9,16,70,63,84,79,63,11,85,46},{-98,-78,-68,-68,-64,-40,-38,-38,-26,-12,-6,0,2,8,18,34,52,58,64,64,70,72,76,82,84,90,96,96},{1,0,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,0,1,1,0,0,0},{2,2,7,19,20,21,22,26,42,45,46,46,59,63,63,72,73,74,77,83,89},{98,62,-52,-92,-14,-92,62,86,20,36,-80,-12,-38,70,-28,-28,42,-10,94,-16,-72,-96,76,-14,-18,-12,38,14,46,16,-90,10,-34,-6,-34,-62,96,14,0,-10,32,-6,96,-72,-2},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{56,38,75,57,82,30,38,79,39,73,74,73,36,10,80,50}}; vector param2 {20,20,7,23,14,20,11,25,46,13}; vector param3 {28,16,5,23,14,16,17,25,33,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE{ static int f_gold ( int low , int high ) { int fact = 1 , x = 1 ; while ( fact < low ) { fact = fact * x ; x ++ ; } int res = 0 ; while ( fact <= high ) { res ++ ; fact = fact * x ; x ++ ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(57); param0.add(31); param0.add(62); param0.add(49); param0.add(82); param0.add(31); param0.add(5); param0.add(76); param0.add(55); List param1 = new ArrayList<>(); param1.add(79); param1.add(21); param1.add(37); param1.add(87); param1.add(98); param1.add(76); param1.add(45); param1.add(52); param1.add(43); param1.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( low , high ) : fact = 1 x = 1 while ( fact < low ) : fact = fact * x x += 1 res = 0 while ( fact <= high ) : res += 1 fact = fact * x x += 1 return res "," using namespace std; int f_gold ( int low, int high ) { int fact = 1, x = 1; while ( fact < low ) { fact = fact * x; x ++; } int res = 0; while ( fact <= high ) { res ++; fact = fact * x; x ++; } return res; } int main() { int n_success = 0; vector param0 {57,57,31,62,49,82,31,5,76,55}; vector param1 {79,21,37,87,98,76,45,52,43,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,79,), (57,21,), (31,37,), (62,87,), (49,98,), (82,76,), (31,45,), (5,52,), (76,43,), (55,6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_ELEMENT_THAT_APPEARS_ONCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_ELEMENT_THAT_APPEARS_ONCE{ static int f_gold ( int arr [ ] , int n ) { int ones = 0 , twos = 0 ; int common_bit_mask ; for ( int i = 0 ; i < n ; i ++ ) { twos = twos | ( ones & arr [ i ] ) ; ones = ones ^ arr [ i ] ; common_bit_mask = ~ ( ones & twos ) ; ones &= common_bit_mask ; twos &= common_bit_mask ; } return ones ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,26,26,48,59,62,66,70,72,75,76,81,97,98}); param0.add(new int[]{-42,-48,-64,-74,56,-34,20,16,34,-84,86,38,56,-86,30,-74,-96,96,12,10,-46,10,-36,38,34,-46,-20,14,12,62,-54,20,-82,24,96}); param0.add(new int[]{0,0,1,1}); param0.add(new int[]{68,91,61,6,32,47,76,69,44,71,29,79,74,33,44,33,45,75,43,82,83,81,95,16,86,33,69,61,73,21,54,17,98,62,14,72,80,31,56,82,14,48,76}); param0.add(new int[]{-98,-96,-92,-62,-52,-42,-42,-26,4,10,14,38,64,66,72,74,82}); param0.add(new int[]{0,1,1,1,0,0,0,1,0,1}); param0.add(new int[]{53,63,63}); param0.add(new int[]{-96,-38,-26,-46,68,-36,20,-18,-10,52,40,94,-8,-64,82,-22}); param0.add(new int[]{0,0,0,0,0,1,1}); param0.add(new int[]{99,46,48,81,27,97,26,50,77,32,45,99,46}); List param1 = new ArrayList<>(); param1.add(7); param1.add(27); param1.add(3); param1.add(38); param1.add(14); param1.add(5); param1.add(2); param1.add(15); param1.add(3); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : ones = 0 twos = 0 for i in range ( n ) : twos = twos | ( ones & arr [ i ] ) ones = ones ^ arr [ i ] common_bit_mask = ~ ( ones & twos ) ones &= common_bit_mask twos &= common_bit_mask return ones "," using namespace std; int f_gold ( int arr [ ], int n ) { int ones = 0, twos = 0; int common_bit_mask; for ( int i = 0; i < n; i ++ ) { twos = twos | ( ones & arr [ i ] ); ones = ones ^ arr [ i ]; common_bit_mask = ~ ( ones & twos ); ones &= common_bit_mask; twos &= common_bit_mask; } return ones; } int main() { int n_success = 0; vector> param0 {{7,26,26,48,59,62,66,70,72,75,76,81,97,98},{-42,-48,-64,-74,56,-34,20,16,34,-84,86,38,56,-86,30,-74,-96,96,12,10,-46,10,-36,38,34,-46,-20,14,12,62,-54,20,-82,24,96},{0,0,1,1},{68,91,61,6,32,47,76,69,44,71,29,79,74,33,44,33,45,75,43,82,83,81,95,16,86,33,69,61,73,21,54,17,98,62,14,72,80,31,56,82,14,48,76},{-98,-96,-92,-62,-52,-42,-42,-26,4,10,14,38,64,66,72,74,82},{0,1,1,1,0,0,0,1,0,1},{53,63,63},{-96,-38,-26,-46,68,-36,20,-18,-10,52,40,94,-8,-64,82,-22},{0,0,0,0,0,1,1},{99,46,48,81,27,97,26,50,77,32,45,99,46}}; vector param1 {7,27,3,38,14,5,2,15,3,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 26, 26, 48, 59, 62, 66, 70, 72, 75, 76, 81, 97, 98],7,), ([-42, -48, -64, -74, 56, -34, 20, 16, 34, -84, 86, 38, 56, -86, 30, -74, -96, 96, 12, 10, -46, 10, -36, 38, 34, -46, -20, 14, 12, 62, -54, 20, -82, 24, 96],27,), ([0, 0, 1, 1],3,), ([68, 91, 61, 6, 32, 47, 76, 69, 44, 71, 29, 79, 74, 33, 44, 33, 45, 75, 43, 82, 83, 81, 95, 16, 86, 33, 69, 61, 73, 21, 54, 17, 98, 62, 14, 72, 80, 31, 56, 82, 14, 48, 76],38,), ([-98, -96, -92, -62, -52, -42, -42, -26, 4, 10, 14, 38, 64, 66, 72, 74, 82],14,), ([0, 1, 1, 1, 0, 0, 0, 1, 0, 1],5,), ([53, 63, 63],2,), ([-96, -38, -26, -46, 68, -36, 20, -18, -10, 52, 40, 94, -8, -64, 82, -22],15,), ([0, 0, 0, 0, 0, 1, 1],3,), ([99, 46, 48, 81, 27, 97, 26, 50, 77, 32, 45, 99, 46],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PAINTING_FENCE_ALGORITHM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PAINTING_FENCE_ALGORITHM{ static long f_gold ( int n , int k ) { long total = k ; int mod = 1000000007 ; int same = 0 , diff = k ; for ( int i = 2 ; i <= n ; i ++ ) { same = diff ; diff = ( int ) total * ( k - 1 ) ; diff = diff % mod ; total = ( same + diff ) % mod ; } return total ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(6); param0.add(23); param0.add(89); param0.add(63); param0.add(23); param0.add(44); param0.add(81); param0.add(43); param0.add(9); param0.add(41); List param1 = new ArrayList<>(); param1.add(30); param1.add(87); param1.add(31); param1.add(36); param1.add(68); param1.add(66); param1.add(18); param1.add(73); param1.add(42); param1.add(98); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , k ) : total = k mod = 1000000007 same , diff = 0 , k for i in range ( 2 , n + 1 ) : same = diff diff = total * ( k - 1 ) diff = diff % mod total = ( same + diff ) % mod return total "," using namespace std; long f_gold ( int n, int k ) { long total = k; int mod = 1000000007; int same = 0, diff = k; for ( int i = 2; i <= n; i ++ ) { same = diff; diff = total * ( k - 1 ); diff = diff % mod; total = ( same + diff ) % mod; } return total; } int main() { int n_success = 0; vector param0 {6,23,89,63,23,44,81,43,9,41}; vector param1 {30,87,31,36,68,66,18,73,42,98}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (6,30,), (23,87,), (89,31,), (63,36,), (23,68,), (44,66,), (81,18,), (43,73,), (9,42,), (41,98,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_2{ static int f_gold ( int m , int n ) { int [ ] dp = new int [ n ] ; dp [ 0 ] = 1 ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 1 ; j < n ; j ++ ) { dp [ j ] += dp [ j - 1 ] ; } } return dp [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(73); param0.add(70); param0.add(53); param0.add(80); param0.add(9); param0.add(38); param0.add(41); param0.add(80); param0.add(42); param0.add(54); List param1 = new ArrayList<>(); param1.add(75); param1.add(5); param1.add(62); param1.add(70); param1.add(59); param1.add(48); param1.add(49); param1.add(72); param1.add(52); param1.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( p , q ) : dp = [ 1 for i in range ( q ) ] for i in range ( p - 1 ) : for j in range ( 1 , q ) : dp [ j ] += dp [ j - 1 ] return dp [ q - 1 ] "," using namespace std; int f_gold ( int m, int n ) { int dp [ n ] = { 1 }; dp [ 0 ] = 1; for ( int i = 0; i < m; i ++ ) { for ( int j = 1; j < n; j ++ ) { dp [ j ] += dp [ j - 1 ]; } } return dp [ n - 1 ]; } int main() { int n_success = 0; vector param0 {73,70,53,80,9,38,41,80,42,54}; vector param1 {75,5,62,70,59,48,49,72,52,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (73,75,), (70,5,), (53,62,), (80,70,), (9,59,), (38,48,), (41,49,), (80,72,), (42,52,), (54,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY_1{ static int f_gold ( int arr [ ] , int low , int high ) { if ( high >= low ) { int mid = ( low + high ) / 2 ; if ( mid == arr [ mid ] ) return mid ; if ( mid > arr [ mid ] ) return f_gold ( arr , ( mid + 1 ) , high ) ; else return f_gold ( arr , low , ( mid - 1 ) ) ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{13,20,20,27,32,35,37,51,63,64,71,75,77,80,82,82,86,90,90,92,95,97,98}); param0.add(new int[]{-10, -5, 0, 3, 7}); param0.add(new int[]{0, 2, 5, 8, 17}); param0.add(new int[]{-10, -5, 3, 4, 7, 9}); param0.add(new int[]{-10, -5, 2, 4, 7, 9}); param0.add(new int[]{1,1,0,1,1,0,1,0,0}); param0.add(new int[]{1,4,16,16,19,28,34,34,35,36,37,46,49,52,54,60,60,60,63,70,75,77,80,81,81,84,85,87,93,99}); param0.add(new int[]{30,30,-94,-10,2,58}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{72,38,91,63,30,67,39,29,96,42}); List param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(1); param1.add(2); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); List param2 = new ArrayList<>(); param2.add(16); param2.add(4); param2.add(4); param2.add(5); param2.add(5); param2.add(7); param2.add(5); param2.add(5); param2.add(12); param2.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int low, int high ) { if ( high >= low ) { int mid = ( low + high ) / 2; if ( mid == arr [ mid ] ) return mid; if ( mid > arr [ mid ] ) return f_gold ( arr, ( mid + 1 ), high ); else return f_gold ( arr, low, ( mid - 1 ) ); } return - 1; } int main() { int n_success = 0; vector> param0 {{13,20,20,27,32,35,37,51,63,64,71,75,77,80,82,82,86,90,90,92,95,97,98}, {-10, -5, 0, 3, 7}, {0, 2, 5, 8, 17}, {-10, -5, 3, 4, 7, 9}, {-10, -5, 2, 4, 7, 9}, {1,1,0,1,1,0,1,0,0}, {1,4,16,16,19,28,34,34,35,36,37,46,49,52,54,60,60,60,63,70,75,77,80,81,81,84,85,87,93,99}, {30,30,-94,-10,2,58}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, {72,38,91,63,30,67,39,29,96,42}}; vector param1 {0,0,0,1,2,0,0,0,0,0}; vector param2 {16,4,4,5,5,7,5,5,12,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN{ static int f_gold ( int n ) { int ans = 0 ; for ( int i = 1 ; i <= n ; i ++ ) for ( int j = 1 ; j <= n ; j ++ ) ans += ( i / j ) ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(60); param0.add(74); param0.add(8); param0.add(74); param0.add(34); param0.add(66); param0.add(96); param0.add(11); param0.add(45); param0.add(72); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( N ) : ans = 0 for i in range ( 1 , N + 1 ) : for j in range ( 1 , N + 1 ) : ans += i // j return ans "," using namespace std; int f_gold ( int n ) { int ans = 0; for ( int i = 1; i <= n; i ++ ) for ( int j = 1; j <= n; j ++ ) ans += ( i / j ); return ans; } int main() { int n_success = 0; vector param0 {60,74,8,74,34,66,96,11,45,72}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (60,), (74,), (8,), (74,), (34,), (66,), (96,), (11,), (45,), (72,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DOUBLE_FACTORIAL," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DOUBLE_FACTORIAL{ static long f_gold ( long n ) { if ( n == 0 || n == 1 ) return 1 ; return n * f_gold ( n - 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(52L); param0.add(93L); param0.add(15L); param0.add(72L); param0.add(61L); param0.add(21L); param0.add(83L); param0.add(87L); param0.add(75L); param0.add(75L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : if ( n == 0 or n == 1 ) : return 1 ; return n * f_gold ( n - 2 ) ; "," using namespace std; unsigned int f_gold ( unsigned int n ) { if ( n == 0 || n == 1 ) return 1; return n * f_gold ( n - 2 ); } int main() { int n_success = 0; vector param0 {52,93,15,72,61,21,83,87,75,75}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (52,), (93,), (15,), (72,), (61,), (21,), (83,), (87,), (75,), (75,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES{ static int f_gold ( int n , int m ) { int count [ ] = new int [ n + 1 ] ; count [ 0 ] = 0 ; int i ; for ( i = 1 ; i <= n ; i ++ ) { if ( i > m ) count [ i ] = count [ i - 1 ] + count [ i - m ] ; else if ( i < m ) count [ i ] = 1 ; else count [ i ] = 2 ; } return count [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(93); param0.add(17); param0.add(38); param0.add(33); param0.add(78); param0.add(40); param0.add(95); param0.add(12); param0.add(69); param0.add(78); List param1 = new ArrayList<>(); param1.add(54); param1.add(4); param1.add(39); param1.add(64); param1.add(35); param1.add(61); param1.add(6); param1.add(8); param1.add(60); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , m ) : count = [ ] for i in range ( n + 2 ) : count.append ( 0 ) count [ 0 ] = 0 for i in range ( 1 , n + 1 ) : if ( i > m ) : count [ i ] = count [ i - 1 ] + count [ i - m ] elif ( i < m ) : count [ i ] = 1 else : count [ i ] = 2 return count [ n ] "," using namespace std; int f_gold ( int n, int m ) { int count [ n + 1 ]; count [ 0 ] = 0; for ( int i = 1; i <= n; i ++ ) { if ( i > m ) count [ i ] = count [ i - 1 ] + count [ i - m ]; else if ( i < m ) count [ i ] = 1; else count [ i ] = 2; } return count [ n ]; } int main() { int n_success = 0; vector param0 {93,17,38,33,78,40,95,12,69,78}; vector param1 {54,4,39,64,35,61,6,8,60,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (93,54,), (17,4,), (38,39,), (33,64,), (78,35,), (40,61,), (95,6,), (12,8,), (69,60,), (78,21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_PRINT_IDENTITY_MATRIX_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_PRINT_IDENTITY_MATRIX_1{ static boolean f_gold ( int mat [ ] [ ] , int N ) { for ( int row = 0 ; row < N ; row ++ ) { for ( int col = 0 ; col < N ; col ++ ) { if ( row == col && mat [ row ] [ col ] != 1 ) return false ; else if ( row != col && mat [ row ] [ col ] != 0 ) return false ; } } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{}}); param0.add(new int[][]{new int[]{1}}); param0.add(new int[][]{new int[]{1,0,0,0},new int[]{0,1,0,0},new int[]{0,0,1,0},new int[]{0,0,0,1}}); param0.add(new int[][]{new int[]{1,0,0,0},new int[]{0,1,0,0},new int[]{0,0,1,0},new int[]{1,0,0,1}}); param0.add(new int[][]{new int[]{80,68,67,24,55,89,15,35,7,28,36,65,76,4,97,99,82,21,14,55,66,43,28,81,94,23,43,97,74},new int[]{94,39,98,29,57,15,49,96,28,97,8,4,39,58,71,76,88,85,9,89,93,64,44,64,41,47,26,70,75},new int[]{47,8,15,88,50,27,9,88,95,51,96,43,14,14,38,63,40,60,41,80,13,74,29,26,52,95,86,39,66},new int[]{40,65,70,92,28,99,1,80,18,13,45,88,67,16,75,91,37,2,80,33,64,4,59,6,11,11,25,39,7},new int[]{43,70,31,99,4,1,98,30,76,89,2,14,6,28,56,19,30,87,98,75,37,39,1,84,29,92,71,67,54},new int[]{18,97,8,12,59,68,25,40,24,82,22,43,73,59,17,92,67,90,14,95,8,41,3,7,69,59,15,63,88},new int[]{32,57,74,7,87,61,83,38,83,68,1,89,92,76,94,21,25,27,62,29,21,88,14,59,20,77,7,35,5},new int[]{22,72,82,3,58,73,55,65,23,83,65,96,63,16,92,63,60,76,91,58,7,65,3,61,13,12,6,88,83},new int[]{15,52,62,34,57,88,56,16,25,23,50,90,57,94,56,62,33,20,71,66,7,10,88,35,47,42,61,9,1},new int[]{85,33,29,35,54,26,37,63,35,16,22,97,68,22,14,70,84,89,93,85,54,15,15,77,15,80,81,60,64},new int[]{4,62,17,84,89,79,9,58,43,16,10,32,36,93,76,7,44,93,12,19,25,34,80,53,65,69,9,71,56},new int[]{65,37,85,44,43,68,55,69,55,52,47,38,41,37,32,24,35,59,46,41,48,51,87,64,75,71,94,17,60},new int[]{50,6,95,63,14,78,8,83,46,7,32,90,3,25,88,78,11,34,57,10,18,33,75,14,68,6,98,12,36},new int[]{11,73,12,20,89,5,78,56,3,36,98,63,11,88,4,9,87,20,62,87,23,3,54,51,99,10,30,34,33},new int[]{79,23,94,80,42,32,29,28,18,35,74,94,89,52,11,74,5,15,78,99,38,94,95,89,92,79,74,13,24},new int[]{74,87,21,34,25,60,49,92,29,88,22,65,27,24,89,32,90,42,67,24,71,47,79,12,73,42,2,80,13},new int[]{79,84,54,87,94,43,62,11,48,36,26,22,27,31,14,87,30,23,6,43,64,76,68,2,33,14,13,63,4},new int[]{77,96,66,22,59,32,40,81,24,58,39,63,53,3,68,37,29,11,50,38,74,64,70,5,75,46,47,15,75},new int[]{5,87,49,47,42,18,34,58,72,65,68,73,17,74,93,85,97,97,93,36,97,70,49,84,24,73,21,36,92},new int[]{97,58,52,86,90,71,1,92,71,85,32,71,27,68,71,96,57,62,81,98,25,89,13,84,59,91,83,92,43},new int[]{74,54,73,63,20,19,13,22,96,46,80,60,68,40,12,34,43,41,57,49,24,69,54,29,20,65,13,50,54},new int[]{93,26,9,10,61,46,49,40,3,93,22,24,99,19,77,92,10,27,28,5,8,4,56,9,52,76,89,28,82},new int[]{73,33,56,17,7,59,85,95,64,16,40,86,27,59,65,49,55,27,35,93,97,27,73,14,78,33,27,84,5},new int[]{37,93,55,95,95,70,37,78,49,62,65,26,85,16,70,36,39,59,33,24,62,53,80,30,91,28,44,92,12},new int[]{45,91,17,24,74,67,90,86,68,26,55,20,65,9,51,69,74,76,3,90,3,64,81,81,89,73,60,76,21},new int[]{4,53,19,1,88,95,30,83,85,76,74,29,59,52,92,46,74,93,67,96,46,88,45,87,56,28,49,57,96},new int[]{10,41,45,41,2,48,49,20,48,21,60,57,10,69,47,91,34,23,5,89,61,36,51,19,59,23,96,90,94},new int[]{16,12,62,79,4,78,25,56,40,44,66,42,75,95,91,17,78,79,41,79,17,7,99,81,47,36,67,74,68},new int[]{78,88,92,77,75,10,5,97,22,77,70,97,86,14,3,6,39,95,21,38,33,68,52,24,22,38,37,98,46}}); param0.add(new int[][]{new int[]{54,16,12,57,31,31,71,17,46},new int[]{74,81,65,60,4,64,19,31,18},new int[]{42,3,51,46,58,13,72,29,69},new int[]{6,81,28,72,32,8,11,14,16},new int[]{9,2,29,22,52,42,78,46,15},new int[]{70,89,42,58,72,9,21,23,34},new int[]{37,33,35,32,96,38,69,53,18},new int[]{35,19,88,73,2,67,92,61,29},new int[]{49,40,86,14,67,89,37,66,29}}); param0.add(new int[][]{new int[]{6,45,61,50,95,16,88,4,77,57,23,14,58,9,94,61,56,58,52,22,3,88,34,16,75,37,40,45,19,5,38,43,25,90,33,54,45,58,91,26,72,59,90,58},new int[]{57,23,46,56,38,75,35,81,92,15,69,75,73,74,2,25,82,15,3,66,55,50,78,42,27,20,59,82,84,99,77,60,29,87,2,93,4,73,58,75,24,91,34,60},new int[]{48,16,15,20,93,77,91,76,26,29,82,81,6,17,65,78,72,13,17,21,70,68,27,5,86,42,29,93,22,85,83,47,34,71,20,66,38,51,11,98,69,33,11,61},new int[]{52,98,3,21,45,88,95,71,96,74,5,34,29,25,22,4,45,34,27,34,25,6,20,64,95,6,38,70,47,12,16,31,36,69,52,3,42,99,39,51,4,83,43,89},new int[]{82,5,49,81,7,20,64,69,5,76,7,66,34,32,73,21,39,84,11,79,12,75,41,22,9,55,83,58,20,91,23,55,14,41,90,34,28,82,71,31,75,97,13,70},new int[]{14,38,99,57,37,89,94,35,32,3,8,80,7,36,13,14,62,18,9,65,10,62,18,23,79,18,19,27,85,5,24,89,4,18,79,55,50,53,93,98,47,79,11,44},new int[]{36,45,81,66,95,20,70,67,48,14,53,71,38,92,33,65,19,93,70,82,49,39,20,99,49,26,62,14,51,43,50,67,79,71,1,79,44,88,77,29,16,17,79,37},new int[]{47,63,92,95,43,92,58,38,70,7,33,6,22,24,57,14,16,99,86,58,7,60,18,86,66,12,99,35,62,84,16,64,7,64,37,26,89,95,46,22,82,41,63,81},new int[]{44,45,67,38,12,94,31,12,24,7,81,14,25,88,7,44,78,20,67,49,64,52,5,3,79,95,29,50,30,76,57,35,11,10,73,35,62,92,19,47,61,2,21,18},new int[]{26,32,78,90,56,43,74,23,88,4,86,76,75,51,45,76,49,47,27,34,53,44,52,31,79,34,51,75,38,20,58,29,11,42,82,67,83,48,32,6,89,88,36,2},new int[]{75,60,53,13,83,51,2,9,67,24,12,85,4,11,94,3,51,30,7,13,47,80,21,11,52,13,31,99,10,60,53,8,4,86,74,41,98,64,11,4,48,55,58,8},new int[]{2,30,97,44,20,75,85,39,34,37,66,61,85,96,26,13,78,59,37,25,20,50,21,90,39,22,51,9,49,2,83,89,98,11,32,91,57,83,80,23,48,62,14,20},new int[]{43,87,42,65,98,57,25,16,20,23,86,8,47,82,85,56,95,80,72,83,35,17,35,51,7,64,49,87,99,37,25,55,86,58,82,59,73,4,97,76,70,36,39,51},new int[]{38,79,75,87,98,4,60,71,43,12,30,59,89,91,67,85,59,74,94,10,36,88,59,15,90,20,62,67,7,65,48,85,72,42,24,33,85,37,70,8,91,33,60,36},new int[]{65,64,13,60,62,41,27,90,90,72,40,55,83,31,54,47,1,86,27,93,91,95,44,56,6,72,93,67,17,24,19,52,46,25,58,37,42,71,62,96,38,4,80,44},new int[]{25,70,58,20,57,12,57,29,95,36,54,63,48,92,43,87,72,58,39,85,42,53,1,7,1,56,52,4,47,50,12,4,57,9,54,72,6,50,67,1,20,88,70,59},new int[]{9,39,54,75,64,97,52,37,52,22,14,87,16,69,20,85,45,43,96,14,14,12,35,79,23,85,23,27,82,1,63,1,69,26,82,14,95,30,13,87,95,73,52,18},new int[]{6,50,3,2,89,32,77,57,75,12,49,25,53,14,23,77,32,40,48,25,66,28,42,86,68,80,88,40,85,24,41,64,77,8,8,72,51,86,72,58,36,95,74,34},new int[]{70,93,46,18,15,36,4,3,8,86,82,87,44,93,54,95,26,25,59,81,58,14,15,60,98,87,24,59,43,3,91,91,42,37,4,88,2,96,49,93,60,87,58,23},new int[]{60,63,45,25,49,83,69,50,69,72,72,60,68,66,46,20,32,31,47,72,54,64,18,96,24,99,73,31,97,28,81,36,35,87,64,97,56,11,15,58,5,99,20,91},new int[]{48,71,80,56,84,33,73,39,19,51,80,90,54,22,50,30,41,22,74,29,74,16,26,75,89,31,32,73,64,89,37,87,51,20,59,41,18,23,54,53,79,87,69,72},new int[]{37,2,19,48,66,62,73,81,90,78,3,66,10,49,32,44,67,24,28,63,79,25,89,59,63,55,22,92,22,9,37,36,48,88,47,92,83,44,38,60,87,67,85,10},new int[]{67,95,54,94,33,72,62,96,67,16,87,35,54,38,79,59,53,57,96,51,52,78,72,22,80,86,53,38,47,72,95,22,72,10,53,95,49,22,13,12,29,50,36,60},new int[]{91,79,47,95,10,98,88,93,69,89,80,90,55,17,76,40,46,42,41,56,62,40,19,87,95,46,37,61,33,96,85,83,60,37,73,55,70,56,27,42,50,32,86,97},new int[]{65,30,27,47,8,3,73,16,19,68,38,37,90,62,83,12,15,34,29,26,48,90,64,28,61,17,86,10,81,92,23,75,16,97,76,89,61,4,54,92,70,91,67,92},new int[]{68,8,75,73,41,37,79,63,2,96,29,18,80,66,63,88,95,13,31,83,51,56,39,69,79,9,1,84,86,66,74,27,10,35,40,96,41,42,18,95,54,74,11,71},new int[]{64,45,42,50,83,34,54,55,99,11,74,78,20,29,47,41,68,12,8,14,42,63,98,55,36,20,79,75,30,57,17,75,33,39,39,4,15,39,48,32,61,13,4,5},new int[]{34,40,40,57,3,45,81,4,34,43,63,51,55,65,91,29,59,9,23,90,79,80,82,24,91,31,45,76,32,91,81,59,69,92,98,54,48,48,9,54,51,52,46,72},new int[]{14,30,64,76,37,19,73,70,80,21,32,65,6,82,82,63,9,84,83,18,18,72,18,34,3,69,3,40,27,4,20,6,59,41,64,5,49,1,4,48,51,3,73,98},new int[]{78,67,32,90,78,32,16,15,20,39,75,80,20,67,4,6,6,45,48,97,13,39,50,4,62,92,78,12,88,89,27,69,17,59,27,79,36,66,14,81,32,68,46,77},new int[]{25,26,66,77,45,94,29,69,7,55,43,41,14,68,98,98,75,81,91,93,58,36,75,16,52,95,41,76,6,2,12,50,66,7,63,24,96,36,12,47,58,86,20,8},new int[]{43,30,21,45,62,76,21,12,5,98,24,39,66,8,10,47,52,62,69,33,43,63,94,47,89,35,2,97,68,27,91,67,79,76,63,44,62,26,71,41,65,11,63,68},new int[]{83,26,88,87,27,89,90,44,25,11,24,51,63,87,21,47,30,87,41,10,51,68,19,99,3,60,9,1,88,96,50,51,4,7,21,19,81,12,3,68,86,76,94,27},new int[]{70,20,21,16,66,54,91,72,58,19,87,21,83,86,36,55,90,93,21,99,40,83,70,10,74,29,47,2,90,40,54,7,42,58,81,86,96,50,78,91,13,8,19,75},new int[]{48,77,22,83,16,42,23,23,66,28,93,6,55,33,71,80,69,45,17,65,61,36,96,88,34,91,96,16,38,82,14,46,93,30,80,71,78,32,88,10,49,64,80,71},new int[]{43,22,43,14,39,21,40,9,28,58,67,37,48,21,15,23,65,37,95,9,78,72,24,15,61,34,60,71,89,67,54,12,65,93,7,33,32,66,15,77,35,49,7,37},new int[]{11,94,76,42,84,60,54,9,48,62,66,29,46,66,39,5,50,42,11,70,68,44,97,32,66,78,94,30,74,62,30,9,72,93,86,56,39,33,3,69,90,82,84,52},new int[]{58,42,85,13,96,49,7,2,15,63,99,30,99,61,4,70,61,2,41,89,65,73,26,81,80,99,19,60,97,47,82,52,99,46,20,64,72,76,77,87,83,71,61,27},new int[]{52,73,93,29,14,16,36,20,50,20,82,46,13,97,48,91,3,64,95,94,57,80,35,72,96,88,2,90,46,85,12,85,6,72,26,43,6,23,98,98,57,5,88,33},new int[]{16,41,49,59,67,92,11,44,53,79,8,47,38,89,16,59,8,57,45,87,27,63,52,23,70,22,27,95,39,42,53,70,77,14,37,66,40,42,83,19,15,51,42,31},new int[]{11,64,69,92,73,96,98,93,44,68,87,34,37,60,65,74,41,20,72,60,58,91,84,58,54,16,68,88,17,9,20,10,2,24,80,41,15,99,74,19,83,88,77,97},new int[]{1,23,97,64,27,1,39,25,98,41,57,7,11,26,60,53,1,88,78,45,83,1,7,43,35,34,68,40,20,64,82,66,61,46,54,50,30,55,51,83,9,47,89,94},new int[]{58,17,59,16,88,29,50,63,79,86,5,74,37,36,17,23,2,55,85,19,88,94,98,10,80,3,18,2,90,24,45,95,42,7,59,46,44,93,35,30,4,89,62,45},new int[]{30,12,55,36,47,2,26,57,75,42,38,56,75,95,26,95,37,73,28,31,29,46,25,96,15,77,85,19,76,71,83,23,1,93,59,94,64,45,37,9,92,92,66,5}}); param0.add(new int[][]{new int[]{65,34,26,9,37,67,53,2,72,64,94,58,2,94,35,57,91,79,54,72,39,11,27,46,26,53,1,43,93,8,32,94,4},new int[]{70,74,34,17,26,35,12,1,81,4,69,57,12,53,47,75,31,54,38,4,75,27,12,68,75,76,32,30,97,65,71,82,58},new int[]{55,76,56,98,18,2,69,56,84,19,8,83,11,32,19,33,18,70,85,12,21,53,84,42,79,57,48,74,4,32,56,93,25},new int[]{81,46,85,84,85,1,12,93,15,95,36,6,66,53,15,15,22,13,52,78,51,78,13,12,16,6,33,46,74,60,42,23,86},new int[]{24,32,97,90,96,79,70,38,1,40,31,81,50,18,5,83,71,28,59,22,85,88,9,42,42,80,1,53,69,19,28,6,7},new int[]{94,36,5,98,38,21,4,80,67,31,67,25,86,20,25,51,91,81,49,36,34,90,15,17,73,93,29,64,65,69,15,99,85},new int[]{51,3,38,69,97,30,29,16,18,38,53,56,27,45,82,52,93,83,38,48,58,63,75,35,57,3,64,35,91,2,3,11,17},new int[]{42,87,47,48,84,66,97,47,22,24,25,13,60,82,36,33,6,21,37,70,99,46,59,7,48,43,85,61,88,23,28,62,67},new int[]{39,1,60,53,83,73,88,11,94,21,35,42,70,76,11,21,37,94,77,44,16,18,11,48,23,31,88,99,47,51,5,84,39},new int[]{76,36,4,40,26,32,68,98,87,61,86,9,7,19,87,82,25,89,88,17,71,90,93,96,93,38,79,40,37,39,50,78,27},new int[]{93,50,25,86,64,79,31,5,2,79,17,28,43,55,75,86,80,44,40,79,22,86,76,39,29,94,55,21,58,16,11,25,3},new int[]{65,46,21,53,94,31,36,95,56,15,61,79,47,91,6,3,77,58,19,1,14,3,88,14,25,26,87,31,32,92,34,1,10},new int[]{32,23,80,11,71,66,61,14,5,4,20,46,14,22,46,33,79,10,23,40,27,14,53,96,36,18,88,72,21,89,54,41,15},new int[]{58,51,83,78,50,9,74,89,78,45,35,48,16,22,87,98,55,14,45,66,39,69,15,63,90,99,58,71,72,58,66,60,59},new int[]{75,60,51,45,94,80,68,18,55,52,91,83,75,66,82,59,25,32,60,99,55,18,44,8,47,70,23,50,47,70,7,82,75},new int[]{99,87,34,94,16,25,38,55,34,47,95,19,23,33,65,4,12,69,58,37,49,64,31,15,8,81,49,21,43,17,36,69,66},new int[]{36,37,27,32,39,87,14,14,20,91,54,77,73,98,84,49,31,88,35,60,64,92,11,25,83,61,81,9,17,75,41,26,9},new int[]{56,72,59,52,16,37,54,75,37,61,38,68,69,30,45,88,94,90,63,37,68,93,36,66,81,75,22,26,70,1,91,57,48},new int[]{12,1,43,29,13,3,73,28,90,13,17,93,52,42,98,43,50,25,73,54,77,70,68,53,34,14,36,19,74,2,3,62,91},new int[]{53,16,54,88,98,49,27,72,31,44,42,79,26,27,2,29,98,49,13,86,43,39,15,35,93,47,36,30,55,50,14,6,62},new int[]{78,34,23,81,13,49,39,23,3,56,41,98,47,22,13,60,99,73,1,12,63,72,96,76,28,40,41,59,78,36,67,94,80},new int[]{49,16,72,51,7,35,73,49,91,86,45,12,4,60,56,32,55,92,19,93,55,11,79,31,58,36,61,16,68,36,80,2,61},new int[]{5,36,19,30,33,96,99,83,98,89,30,33,31,36,31,65,94,40,31,13,42,60,66,2,74,95,41,77,59,60,23,29,50},new int[]{44,80,2,23,40,79,46,11,47,85,79,1,36,61,2,56,79,51,31,3,44,76,47,12,37,43,13,43,47,2,98,56,7},new int[]{16,78,74,73,14,67,14,10,48,6,18,81,76,3,95,20,59,93,2,69,49,45,12,25,31,17,37,17,9,21,88,21,10},new int[]{76,93,65,22,27,8,28,66,46,92,12,73,84,28,43,95,15,83,77,90,32,85,52,89,21,82,11,21,11,98,70,31,43},new int[]{44,70,41,47,92,72,99,44,62,51,70,76,10,37,50,27,39,42,81,59,82,41,33,57,57,4,14,34,95,59,33,16,2},new int[]{22,63,34,90,6,55,79,36,55,52,96,12,19,95,26,58,31,41,77,55,25,22,13,64,39,2,53,77,70,60,40,99,14},new int[]{81,48,68,96,21,87,19,85,97,55,12,43,26,17,74,82,37,66,79,27,39,8,33,69,69,51,64,64,65,55,69,40,64},new int[]{87,40,17,98,18,93,65,49,93,30,55,5,70,42,31,1,23,72,23,4,25,27,77,39,19,20,89,83,70,31,97,14,67},new int[]{13,48,77,97,13,89,48,57,27,18,84,78,58,84,73,45,97,6,12,27,63,83,59,51,75,15,28,89,14,24,34,91,77},new int[]{92,66,37,4,47,78,71,32,83,73,64,91,27,29,83,9,39,58,80,63,43,59,14,22,75,40,39,66,91,12,83,94,59},new int[]{76,33,76,72,72,20,38,51,14,15,85,73,91,6,11,38,69,33,33,80,82,48,38,10,66,80,57,74,23,85,93,17,63}}); param0.add(new int[][]{new int[]{20,59,92,38,68,74,80,12,75,17,90,28,32,68,51,92,9,87,92,42,1,58,4,54,95,81,87,47,29,71,32},new int[]{91,56,90,35,34,99,8,1,13,48,11,13,98,49,66,59,93,31,94,67,76,95,12,9,3,97,74,32,52,88,51},new int[]{78,15,37,60,60,51,19,57,62,95,22,82,60,17,70,11,38,99,11,81,53,98,69,80,85,22,66,18,6,85,35},new int[]{61,35,21,18,30,38,26,82,1,31,86,8,68,82,95,73,51,5,27,97,67,64,52,15,59,45,36,76,75,94,96},new int[]{84,55,25,87,88,21,76,60,54,69,74,12,36,77,84,1,34,16,19,69,34,75,97,87,13,52,38,9,75,94,14},new int[]{47,82,61,86,67,43,66,51,25,35,15,48,16,93,50,91,44,57,52,56,3,11,97,92,25,37,99,14,68,34,64},new int[]{31,12,98,9,45,80,4,61,55,46,38,31,40,42,27,53,49,59,20,19,62,16,9,52,95,75,87,70,96,90,74},new int[]{88,20,61,40,55,58,43,50,34,77,73,86,17,24,98,56,14,47,41,90,41,32,63,66,88,57,6,66,20,9,26},new int[]{16,54,1,53,79,34,12,30,7,23,9,46,40,45,3,44,83,99,63,56,38,76,82,11,18,59,88,74,42,21,44},new int[]{38,50,80,48,98,72,60,51,67,96,55,70,71,70,87,87,12,42,87,65,19,14,20,19,84,32,21,48,30,23,58},new int[]{7,23,15,17,86,87,76,92,19,13,15,21,65,52,12,37,74,19,13,33,73,60,39,50,37,32,62,58,10,20,31},new int[]{69,27,28,76,93,14,24,96,83,94,77,47,14,11,39,86,40,24,69,30,45,24,9,24,93,32,3,86,87,61,87},new int[]{47,83,78,32,86,32,92,82,10,76,45,83,6,77,91,63,78,24,86,61,90,51,44,88,11,81,90,33,17,23,97},new int[]{84,97,32,2,6,19,17,53,25,60,15,42,17,76,86,35,29,28,69,95,60,92,6,31,80,21,2,52,14,46,32},new int[]{1,71,62,39,44,88,75,39,9,53,48,76,63,27,69,71,22,89,15,25,1,75,39,75,31,86,52,29,38,64,76},new int[]{48,70,75,49,76,5,82,72,83,58,66,43,25,87,73,6,9,87,42,47,82,43,71,19,7,17,61,78,44,3,31},new int[]{78,89,29,56,19,7,68,28,81,68,91,88,41,98,8,3,12,11,85,78,1,21,19,69,32,72,62,9,26,20,14},new int[]{94,60,73,46,60,12,21,21,47,91,56,74,88,76,60,84,10,38,4,23,20,46,59,8,19,51,14,6,15,25,69},new int[]{4,48,57,98,25,86,76,78,66,21,16,71,18,65,95,33,10,7,50,21,81,52,30,92,15,40,7,20,90,1,9},new int[]{92,58,71,51,54,56,57,21,32,7,54,97,57,32,71,81,51,25,82,81,35,25,45,69,82,20,31,77,20,70,17},new int[]{55,96,60,73,88,63,2,90,14,37,9,94,55,44,55,96,84,54,20,90,6,54,34,7,16,58,58,88,72,44,68},new int[]{98,72,10,44,74,20,96,24,85,9,23,58,7,32,30,65,75,28,57,25,37,61,94,38,5,45,86,77,55,50,23},new int[]{9,43,13,86,41,42,4,64,59,31,90,68,99,93,10,88,89,83,84,95,52,25,99,95,75,1,27,99,92,61,95},new int[]{23,9,95,28,79,76,53,1,13,47,30,14,81,43,84,84,99,77,44,52,47,35,90,64,77,47,66,32,77,96,40},new int[]{53,27,68,47,54,21,53,24,38,1,85,65,33,50,32,60,37,6,54,15,78,35,98,88,73,32,84,10,31,79,55},new int[]{45,44,77,84,86,83,10,64,60,57,20,71,9,92,78,61,29,62,63,39,49,58,88,5,25,61,59,55,39,12,9},new int[]{12,35,58,74,10,97,46,66,22,77,6,87,64,20,55,65,68,10,15,51,24,96,93,36,5,20,59,3,22,76,18},new int[]{29,27,6,76,52,73,81,12,7,55,18,30,81,15,86,93,48,40,63,78,8,5,79,83,93,78,91,7,94,7,83},new int[]{10,29,80,26,28,72,4,94,69,37,89,26,40,78,22,1,99,4,73,79,51,89,83,79,30,41,17,71,10,32,99},new int[]{39,61,3,58,92,51,77,76,79,30,44,5,30,3,95,15,50,89,39,73,53,82,1,18,76,99,29,65,75,32,32},new int[]{38,40,23,94,62,91,94,42,32,52,10,23,51,7,77,52,86,13,65,12,25,26,84,32,19,36,94,91,48,50,11}}); param0.add(new int[][]{new int[]{93,83,42,36,3,96,99,4,83,84,92,19,69,39,25,37,46,22,48,91,51,83,1,5,31,15,80,59,40,93,95},new int[]{54,11,90,56,27,57,45,62,95,13,85,33,86,20,39,58,72,86,29,60,14,95,58,85,72,58,90,6,73,96,83},new int[]{33,22,85,19,97,11,52,56,85,45,6,97,69,99,37,43,16,45,91,6,44,85,1,20,38,8,8,43,76,88,25},new int[]{69,43,13,63,41,26,51,26,83,20,65,38,60,76,13,80,51,90,70,63,88,47,82,52,15,55,98,12,36,21,81},new int[]{2,91,37,21,77,38,47,83,46,50,21,80,13,54,53,31,44,94,85,47,20,54,23,60,86,86,56,35,86,88,18},new int[]{46,75,65,1,94,23,37,13,73,70,90,44,12,54,50,69,28,80,64,10,44,71,6,68,63,79,22,10,96,19,95},new int[]{13,71,30,9,50,85,17,41,16,58,27,14,25,59,51,15,48,61,50,15,39,7,79,49,43,21,28,32,60,5,8},new int[]{40,81,37,19,62,87,90,26,23,70,64,89,35,10,1,50,94,20,75,48,62,41,59,43,38,78,4,44,37,73,16},new int[]{97,37,78,7,32,92,29,80,85,68,52,98,15,27,54,46,37,33,40,20,72,68,50,49,50,22,52,96,94,54,29},new int[]{35,66,92,81,84,52,72,10,3,52,10,22,25,14,22,43,78,75,95,55,11,95,93,14,16,81,14,82,61,82,7},new int[]{92,56,47,97,57,39,82,67,14,63,49,24,27,33,12,98,16,70,55,13,12,29,59,8,15,78,60,94,36,50,79},new int[]{79,56,75,54,90,10,59,53,87,86,48,65,9,10,5,55,35,37,75,75,72,63,41,43,96,33,51,49,55,97,89},new int[]{51,24,59,88,43,51,67,10,84,22,15,62,77,24,75,34,97,71,3,46,38,59,82,53,52,69,2,57,21,89,88},new int[]{33,49,78,9,9,85,92,47,9,36,67,24,14,66,72,45,11,49,2,44,87,98,3,28,15,22,42,30,28,26,45},new int[]{30,97,41,94,2,35,30,83,75,35,77,12,40,15,9,39,64,47,63,92,54,33,23,4,3,42,32,55,16,46,20},new int[]{11,80,79,61,36,97,56,15,15,5,55,11,96,66,51,51,99,45,55,77,33,49,91,96,58,10,53,69,12,6,6},new int[]{23,73,85,83,94,51,28,20,39,36,50,60,74,68,38,30,65,71,78,69,78,87,26,49,20,44,10,72,97,1,17},new int[]{12,50,96,79,8,43,71,63,13,88,21,13,62,80,42,85,19,53,97,62,21,75,86,78,91,35,88,9,3,73,28},new int[]{28,62,83,54,34,11,79,29,20,74,75,68,46,22,4,59,89,29,24,56,8,49,12,87,89,95,90,21,48,39,29},new int[]{98,88,4,74,67,38,35,65,58,36,35,24,59,12,49,92,84,27,56,81,48,43,73,65,51,84,39,93,56,24,94},new int[]{94,92,81,45,74,80,98,72,40,20,41,34,23,59,59,28,83,13,23,74,12,89,90,82,2,12,49,50,51,2,52},new int[]{29,74,58,85,1,37,5,66,26,58,7,84,70,73,16,6,98,87,51,49,87,89,24,30,80,16,76,50,6,74,9},new int[]{14,96,38,81,29,8,19,75,17,83,63,5,57,46,3,52,46,47,94,96,18,22,77,14,9,60,94,50,7,37,30},new int[]{85,76,84,18,58,48,45,54,93,16,10,22,30,5,62,51,18,44,27,23,55,56,28,58,13,14,6,85,32,25,30},new int[]{70,19,93,74,98,7,55,67,38,49,77,85,37,65,80,83,67,15,99,71,51,81,25,77,65,37,62,80,8,78,48},new int[]{1,76,42,12,54,26,18,30,9,61,74,7,58,5,48,43,41,18,70,24,8,15,41,47,46,44,9,95,82,24,3},new int[]{17,28,29,45,1,80,41,27,18,50,1,43,84,92,19,18,23,2,68,7,18,27,32,9,65,85,21,33,89,74,72},new int[]{98,66,13,88,97,14,26,83,71,6,59,65,34,10,39,78,45,95,70,22,89,93,98,58,63,80,93,98,31,73,85},new int[]{56,76,20,78,84,26,43,32,39,14,64,37,99,54,44,6,98,26,9,29,78,19,41,51,33,37,33,93,55,93,42},new int[]{56,29,87,54,47,91,90,47,11,43,63,8,53,88,76,63,87,41,64,81,39,85,74,56,4,3,58,86,20,85,53},new int[]{64,65,80,69,83,7,3,64,27,52,18,45,3,51,86,16,59,73,4,48,47,20,20,34,74,40,16,37,30,86,93}}); List param1 = new ArrayList<>(); param1.add(0); param1.add(1); param1.add(4); param1.add(4); param1.add(17); param1.add(4); param1.add(35); param1.add(30); param1.add(25); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , N ) : for row in range ( N ) : for col in range ( N ) : if ( row == col and mat [ row ] [ col ] != 1 ) : return False ; elif ( row != col and mat [ row ] [ col ] != 0 ) : return False ; return True ; ",,," if __name__ == '__main__': param = [ ([[]],0,), ([[1]],1,), ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],4,), ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[1,0,0,1]],4,), ([[7, 28, 37, 88, 70, 41, 11, 67, 9, 9, 35, 80, 99, 45, 41, 88, 51, 25, 54, 40, 28, 72, 91, 71, 72, 14], [4, 90, 11, 18, 54, 57, 43, 53, 69, 55, 74, 57, 27, 84, 14, 77, 16, 56, 93, 60, 87, 35, 29, 17, 19, 98], [37, 91, 56, 85, 69, 17, 68, 81, 85, 58, 43, 96, 26, 16, 91, 46, 85, 4, 33, 25, 80, 80, 43, 53, 80, 3], [53, 92, 40, 1, 6, 75, 90, 33, 3, 87, 22, 46, 87, 44, 99, 26, 49, 45, 57, 1, 58, 8, 10, 50, 77, 6], [94, 17, 54, 45, 67, 91, 14, 7, 87, 87, 60, 99, 46, 32, 45, 59, 92, 98, 82, 13, 44, 72, 89, 76, 75, 54], [96, 46, 82, 21, 97, 70, 95, 9, 20, 52, 46, 80, 21, 25, 7, 57, 90, 20, 50, 68, 86, 84, 20, 49, 72, 11], [75, 19, 51, 52, 16, 72, 68, 30, 18, 96, 88, 21, 17, 42, 68, 7, 9, 13, 28, 20, 72, 14, 67, 89, 74, 44], [86, 59, 47, 73, 13, 32, 31, 77, 31, 55, 28, 10, 7, 11, 5, 69, 63, 43, 54, 97, 38, 33, 88, 44, 81, 92], [46, 87, 97, 25, 96, 30, 79, 8, 38, 54, 1, 79, 12, 23, 92, 25, 22, 34, 27, 38, 71, 29, 40, 12, 34, 85], [3, 82, 23, 40, 75, 92, 60, 24, 51, 81, 73, 56, 28, 96, 42, 31, 65, 61, 80, 54, 33, 71, 31, 63, 15, 98], [37, 79, 60, 59, 45, 43, 91, 9, 45, 31, 6, 50, 92, 95, 37, 85, 5, 78, 98, 76, 38, 38, 39, 97, 32, 88], [47, 54, 98, 76, 58, 19, 62, 32, 37, 63, 42, 71, 20, 17, 32, 30, 25, 62, 18, 52, 20, 70, 19, 34, 22, 50], [17, 44, 72, 87, 85, 39, 69, 87, 97, 69, 47, 32, 47, 37, 55, 40, 52, 93, 11, 5, 37, 59, 22, 28, 86, 74], [60, 87, 13, 48, 18, 7, 38, 65, 28, 30, 55, 33, 26, 80, 93, 8, 97, 92, 60, 35, 79, 46, 23, 34, 69, 25], [69, 89, 92, 94, 96, 26, 6, 76, 82, 12, 60, 16, 57, 33, 73, 21, 99, 71, 52, 79, 73, 3, 41, 43, 98, 43], [83, 94, 99, 92, 7, 12, 22, 48, 17, 28, 70, 46, 86, 60, 52, 43, 32, 41, 26, 35, 82, 68, 83, 41, 31, 20], [92, 61, 66, 51, 74, 84, 27, 34, 31, 6, 98, 85, 29, 45, 40, 36, 30, 95, 65, 44, 48, 53, 62, 55, 48, 39], [33, 17, 57, 20, 94, 60, 19, 81, 14, 43, 63, 49, 39, 92, 60, 11, 29, 38, 94, 84, 41, 85, 27, 88, 47, 60], [65, 63, 62, 96, 87, 87, 53, 39, 45, 32, 71, 77, 8, 33, 18, 17, 75, 57, 55, 21, 21, 49, 44, 84, 98, 49], [50, 42, 41, 95, 20, 33, 18, 69, 18, 90, 28, 97, 27, 47, 26, 87, 23, 24, 8, 51, 90, 40, 60, 18, 6, 41], [76, 98, 96, 10, 27, 98, 3, 66, 54, 51, 69, 76, 14, 36, 29, 30, 53, 8, 6, 45, 72, 50, 3, 71, 49, 46], [31, 34, 36, 75, 23, 27, 53, 32, 3, 42, 87, 28, 77, 21, 13, 89, 8, 18, 48, 43, 61, 33, 15, 26, 83, 95], [55, 79, 11, 90, 76, 74, 19, 88, 53, 43, 22, 28, 39, 84, 3, 63, 21, 98, 51, 91, 94, 37, 2, 92, 59, 84], [81, 36, 20, 40, 11, 85, 51, 43, 23, 59, 22, 90, 52, 49, 81, 96, 25, 70, 80, 99, 19, 83, 6, 88, 54, 24], [97, 97, 33, 56, 42, 86, 62, 50, 51, 1, 91, 60, 21, 58, 68, 85, 63, 62, 13, 68, 43, 12, 7, 40, 97, 54], [46, 13, 97, 14, 53, 75, 56, 17, 81, 91, 24, 52, 26, 97, 26, 27, 79, 43, 44, 87, 10, 94, 97, 56, 80, 25]],25,), ([[80, 68, 67, 24, 55, 89, 15, 35, 7, 28, 36, 65, 76, 4, 97, 99, 82, 21, 14, 55, 66, 43, 28, 81, 94, 23, 43, 97, 74], [94, 39, 98, 29, 57, 15, 49, 96, 28, 97, 8, 4, 39, 58, 71, 76, 88, 85, 9, 89, 93, 64, 44, 64, 41, 47, 26, 70, 75], [47, 8, 15, 88, 50, 27, 9, 88, 95, 51, 96, 43, 14, 14, 38, 63, 40, 60, 41, 80, 13, 74, 29, 26, 52, 95, 86, 39, 66], [40, 65, 70, 92, 28, 99, 1, 80, 18, 13, 45, 88, 67, 16, 75, 91, 37, 2, 80, 33, 64, 4, 59, 6, 11, 11, 25, 39, 7], [43, 70, 31, 99, 4, 1, 98, 30, 76, 89, 2, 14, 6, 28, 56, 19, 30, 87, 98, 75, 37, 39, 1, 84, 29, 92, 71, 67, 54], [18, 97, 8, 12, 59, 68, 25, 40, 24, 82, 22, 43, 73, 59, 17, 92, 67, 90, 14, 95, 8, 41, 3, 7, 69, 59, 15, 63, 88], [32, 57, 74, 7, 87, 61, 83, 38, 83, 68, 1, 89, 92, 76, 94, 21, 25, 27, 62, 29, 21, 88, 14, 59, 20, 77, 7, 35, 5], [22, 72, 82, 3, 58, 73, 55, 65, 23, 83, 65, 96, 63, 16, 92, 63, 60, 76, 91, 58, 7, 65, 3, 61, 13, 12, 6, 88, 83], [15, 52, 62, 34, 57, 88, 56, 16, 25, 23, 50, 90, 57, 94, 56, 62, 33, 20, 71, 66, 7, 10, 88, 35, 47, 42, 61, 9, 1], [85, 33, 29, 35, 54, 26, 37, 63, 35, 16, 22, 97, 68, 22, 14, 70, 84, 89, 93, 85, 54, 15, 15, 77, 15, 80, 81, 60, 64], [4, 62, 17, 84, 89, 79, 9, 58, 43, 16, 10, 32, 36, 93, 76, 7, 44, 93, 12, 19, 25, 34, 80, 53, 65, 69, 9, 71, 56], [65, 37, 85, 44, 43, 68, 55, 69, 55, 52, 47, 38, 41, 37, 32, 24, 35, 59, 46, 41, 48, 51, 87, 64, 75, 71, 94, 17, 60], [50, 6, 95, 63, 14, 78, 8, 83, 46, 7, 32, 90, 3, 25, 88, 78, 11, 34, 57, 10, 18, 33, 75, 14, 68, 6, 98, 12, 36], [11, 73, 12, 20, 89, 5, 78, 56, 3, 36, 98, 63, 11, 88, 4, 9, 87, 20, 62, 87, 23, 3, 54, 51, 99, 10, 30, 34, 33], [79, 23, 94, 80, 42, 32, 29, 28, 18, 35, 74, 94, 89, 52, 11, 74, 5, 15, 78, 99, 38, 94, 95, 89, 92, 79, 74, 13, 24], [74, 87, 21, 34, 25, 60, 49, 92, 29, 88, 22, 65, 27, 24, 89, 32, 90, 42, 67, 24, 71, 47, 79, 12, 73, 42, 2, 80, 13], [79, 84, 54, 87, 94, 43, 62, 11, 48, 36, 26, 22, 27, 31, 14, 87, 30, 23, 6, 43, 64, 76, 68, 2, 33, 14, 13, 63, 4], [77, 96, 66, 22, 59, 32, 40, 81, 24, 58, 39, 63, 53, 3, 68, 37, 29, 11, 50, 38, 74, 64, 70, 5, 75, 46, 47, 15, 75], [5, 87, 49, 47, 42, 18, 34, 58, 72, 65, 68, 73, 17, 74, 93, 85, 97, 97, 93, 36, 97, 70, 49, 84, 24, 73, 21, 36, 92], [97, 58, 52, 86, 90, 71, 1, 92, 71, 85, 32, 71, 27, 68, 71, 96, 57, 62, 81, 98, 25, 89, 13, 84, 59, 91, 83, 92, 43], [74, 54, 73, 63, 20, 19, 13, 22, 96, 46, 80, 60, 68, 40, 12, 34, 43, 41, 57, 49, 24, 69, 54, 29, 20, 65, 13, 50, 54], [93, 26, 9, 10, 61, 46, 49, 40, 3, 93, 22, 24, 99, 19, 77, 92, 10, 27, 28, 5, 8, 4, 56, 9, 52, 76, 89, 28, 82], [73, 33, 56, 17, 7, 59, 85, 95, 64, 16, 40, 86, 27, 59, 65, 49, 55, 27, 35, 93, 97, 27, 73, 14, 78, 33, 27, 84, 5], [37, 93, 55, 95, 95, 70, 37, 78, 49, 62, 65, 26, 85, 16, 70, 36, 39, 59, 33, 24, 62, 53, 80, 30, 91, 28, 44, 92, 12], [45, 91, 17, 24, 74, 67, 90, 86, 68, 26, 55, 20, 65, 9, 51, 69, 74, 76, 3, 90, 3, 64, 81, 81, 89, 73, 60, 76, 21], [4, 53, 19, 1, 88, 95, 30, 83, 85, 76, 74, 29, 59, 52, 92, 46, 74, 93, 67, 96, 46, 88, 45, 87, 56, 28, 49, 57, 96], [10, 41, 45, 41, 2, 48, 49, 20, 48, 21, 60, 57, 10, 69, 47, 91, 34, 23, 5, 89, 61, 36, 51, 19, 59, 23, 96, 90, 94], [16, 12, 62, 79, 4, 78, 25, 56, 40, 44, 66, 42, 75, 95, 91, 17, 78, 79, 41, 79, 17, 7, 99, 81, 47, 36, 67, 74, 68], [78, 88, 92, 77, 75, 10, 5, 97, 22, 77, 70, 97, 86, 14, 3, 6, 39, 95, 21, 38, 33, 68, 52, 24, 22, 38, 37, 98, 46]],17,), ([[54, 16, 12, 57, 31, 31, 71, 17, 46], [74, 81, 65, 60, 4, 64, 19, 31, 18], [42, 3, 51, 46, 58, 13, 72, 29, 69], [6, 81, 28, 72, 32, 8, 11, 14, 16], [9, 2, 29, 22, 52, 42, 78, 46, 15], [70, 89, 42, 58, 72, 9, 21, 23, 34], [37, 33, 35, 32, 96, 38, 69, 53, 18], [35, 19, 88, 73, 2, 67, 92, 61, 29], [49, 40, 86, 14, 67, 89, 37, 66, 29]],4,), ([[6, 45, 61, 50, 95, 16, 88, 4, 77, 57, 23, 14, 58, 9, 94, 61, 56, 58, 52, 22, 3, 88, 34, 16, 75, 37, 40, 45, 19, 5, 38, 43, 25, 90, 33, 54, 45, 58, 91, 26, 72, 59, 90, 58], [57, 23, 46, 56, 38, 75, 35, 81, 92, 15, 69, 75, 73, 74, 2, 25, 82, 15, 3, 66, 55, 50, 78, 42, 27, 20, 59, 82, 84, 99, 77, 60, 29, 87, 2, 93, 4, 73, 58, 75, 24, 91, 34, 60], [48, 16, 15, 20, 93, 77, 91, 76, 26, 29, 82, 81, 6, 17, 65, 78, 72, 13, 17, 21, 70, 68, 27, 5, 86, 42, 29, 93, 22, 85, 83, 47, 34, 71, 20, 66, 38, 51, 11, 98, 69, 33, 11, 61], [52, 98, 3, 21, 45, 88, 95, 71, 96, 74, 5, 34, 29, 25, 22, 4, 45, 34, 27, 34, 25, 6, 20, 64, 95, 6, 38, 70, 47, 12, 16, 31, 36, 69, 52, 3, 42, 99, 39, 51, 4, 83, 43, 89], [82, 5, 49, 81, 7, 20, 64, 69, 5, 76, 7, 66, 34, 32, 73, 21, 39, 84, 11, 79, 12, 75, 41, 22, 9, 55, 83, 58, 20, 91, 23, 55, 14, 41, 90, 34, 28, 82, 71, 31, 75, 97, 13, 70], [14, 38, 99, 57, 37, 89, 94, 35, 32, 3, 8, 80, 7, 36, 13, 14, 62, 18, 9, 65, 10, 62, 18, 23, 79, 18, 19, 27, 85, 5, 24, 89, 4, 18, 79, 55, 50, 53, 93, 98, 47, 79, 11, 44], [36, 45, 81, 66, 95, 20, 70, 67, 48, 14, 53, 71, 38, 92, 33, 65, 19, 93, 70, 82, 49, 39, 20, 99, 49, 26, 62, 14, 51, 43, 50, 67, 79, 71, 1, 79, 44, 88, 77, 29, 16, 17, 79, 37], [47, 63, 92, 95, 43, 92, 58, 38, 70, 7, 33, 6, 22, 24, 57, 14, 16, 99, 86, 58, 7, 60, 18, 86, 66, 12, 99, 35, 62, 84, 16, 64, 7, 64, 37, 26, 89, 95, 46, 22, 82, 41, 63, 81], [44, 45, 67, 38, 12, 94, 31, 12, 24, 7, 81, 14, 25, 88, 7, 44, 78, 20, 67, 49, 64, 52, 5, 3, 79, 95, 29, 50, 30, 76, 57, 35, 11, 10, 73, 35, 62, 92, 19, 47, 61, 2, 21, 18], [26, 32, 78, 90, 56, 43, 74, 23, 88, 4, 86, 76, 75, 51, 45, 76, 49, 47, 27, 34, 53, 44, 52, 31, 79, 34, 51, 75, 38, 20, 58, 29, 11, 42, 82, 67, 83, 48, 32, 6, 89, 88, 36, 2], [75, 60, 53, 13, 83, 51, 2, 9, 67, 24, 12, 85, 4, 11, 94, 3, 51, 30, 7, 13, 47, 80, 21, 11, 52, 13, 31, 99, 10, 60, 53, 8, 4, 86, 74, 41, 98, 64, 11, 4, 48, 55, 58, 8], [2, 30, 97, 44, 20, 75, 85, 39, 34, 37, 66, 61, 85, 96, 26, 13, 78, 59, 37, 25, 20, 50, 21, 90, 39, 22, 51, 9, 49, 2, 83, 89, 98, 11, 32, 91, 57, 83, 80, 23, 48, 62, 14, 20], [43, 87, 42, 65, 98, 57, 25, 16, 20, 23, 86, 8, 47, 82, 85, 56, 95, 80, 72, 83, 35, 17, 35, 51, 7, 64, 49, 87, 99, 37, 25, 55, 86, 58, 82, 59, 73, 4, 97, 76, 70, 36, 39, 51], [38, 79, 75, 87, 98, 4, 60, 71, 43, 12, 30, 59, 89, 91, 67, 85, 59, 74, 94, 10, 36, 88, 59, 15, 90, 20, 62, 67, 7, 65, 48, 85, 72, 42, 24, 33, 85, 37, 70, 8, 91, 33, 60, 36], [65, 64, 13, 60, 62, 41, 27, 90, 90, 72, 40, 55, 83, 31, 54, 47, 1, 86, 27, 93, 91, 95, 44, 56, 6, 72, 93, 67, 17, 24, 19, 52, 46, 25, 58, 37, 42, 71, 62, 96, 38, 4, 80, 44], [25, 70, 58, 20, 57, 12, 57, 29, 95, 36, 54, 63, 48, 92, 43, 87, 72, 58, 39, 85, 42, 53, 1, 7, 1, 56, 52, 4, 47, 50, 12, 4, 57, 9, 54, 72, 6, 50, 67, 1, 20, 88, 70, 59], [9, 39, 54, 75, 64, 97, 52, 37, 52, 22, 14, 87, 16, 69, 20, 85, 45, 43, 96, 14, 14, 12, 35, 79, 23, 85, 23, 27, 82, 1, 63, 1, 69, 26, 82, 14, 95, 30, 13, 87, 95, 73, 52, 18], [6, 50, 3, 2, 89, 32, 77, 57, 75, 12, 49, 25, 53, 14, 23, 77, 32, 40, 48, 25, 66, 28, 42, 86, 68, 80, 88, 40, 85, 24, 41, 64, 77, 8, 8, 72, 51, 86, 72, 58, 36, 95, 74, 34], [70, 93, 46, 18, 15, 36, 4, 3, 8, 86, 82, 87, 44, 93, 54, 95, 26, 25, 59, 81, 58, 14, 15, 60, 98, 87, 24, 59, 43, 3, 91, 91, 42, 37, 4, 88, 2, 96, 49, 93, 60, 87, 58, 23], [60, 63, 45, 25, 49, 83, 69, 50, 69, 72, 72, 60, 68, 66, 46, 20, 32, 31, 47, 72, 54, 64, 18, 96, 24, 99, 73, 31, 97, 28, 81, 36, 35, 87, 64, 97, 56, 11, 15, 58, 5, 99, 20, 91], [48, 71, 80, 56, 84, 33, 73, 39, 19, 51, 80, 90, 54, 22, 50, 30, 41, 22, 74, 29, 74, 16, 26, 75, 89, 31, 32, 73, 64, 89, 37, 87, 51, 20, 59, 41, 18, 23, 54, 53, 79, 87, 69, 72], [37, 2, 19, 48, 66, 62, 73, 81, 90, 78, 3, 66, 10, 49, 32, 44, 67, 24, 28, 63, 79, 25, 89, 59, 63, 55, 22, 92, 22, 9, 37, 36, 48, 88, 47, 92, 83, 44, 38, 60, 87, 67, 85, 10], [67, 95, 54, 94, 33, 72, 62, 96, 67, 16, 87, 35, 54, 38, 79, 59, 53, 57, 96, 51, 52, 78, 72, 22, 80, 86, 53, 38, 47, 72, 95, 22, 72, 10, 53, 95, 49, 22, 13, 12, 29, 50, 36, 60], [91, 79, 47, 95, 10, 98, 88, 93, 69, 89, 80, 90, 55, 17, 76, 40, 46, 42, 41, 56, 62, 40, 19, 87, 95, 46, 37, 61, 33, 96, 85, 83, 60, 37, 73, 55, 70, 56, 27, 42, 50, 32, 86, 97], [65, 30, 27, 47, 8, 3, 73, 16, 19, 68, 38, 37, 90, 62, 83, 12, 15, 34, 29, 26, 48, 90, 64, 28, 61, 17, 86, 10, 81, 92, 23, 75, 16, 97, 76, 89, 61, 4, 54, 92, 70, 91, 67, 92], [68, 8, 75, 73, 41, 37, 79, 63, 2, 96, 29, 18, 80, 66, 63, 88, 95, 13, 31, 83, 51, 56, 39, 69, 79, 9, 1, 84, 86, 66, 74, 27, 10, 35, 40, 96, 41, 42, 18, 95, 54, 74, 11, 71], [64, 45, 42, 50, 83, 34, 54, 55, 99, 11, 74, 78, 20, 29, 47, 41, 68, 12, 8, 14, 42, 63, 98, 55, 36, 20, 79, 75, 30, 57, 17, 75, 33, 39, 39, 4, 15, 39, 48, 32, 61, 13, 4, 5], [34, 40, 40, 57, 3, 45, 81, 4, 34, 43, 63, 51, 55, 65, 91, 29, 59, 9, 23, 90, 79, 80, 82, 24, 91, 31, 45, 76, 32, 91, 81, 59, 69, 92, 98, 54, 48, 48, 9, 54, 51, 52, 46, 72], [14, 30, 64, 76, 37, 19, 73, 70, 80, 21, 32, 65, 6, 82, 82, 63, 9, 84, 83, 18, 18, 72, 18, 34, 3, 69, 3, 40, 27, 4, 20, 6, 59, 41, 64, 5, 49, 1, 4, 48, 51, 3, 73, 98], [78, 67, 32, 90, 78, 32, 16, 15, 20, 39, 75, 80, 20, 67, 4, 6, 6, 45, 48, 97, 13, 39, 50, 4, 62, 92, 78, 12, 88, 89, 27, 69, 17, 59, 27, 79, 36, 66, 14, 81, 32, 68, 46, 77], [25, 26, 66, 77, 45, 94, 29, 69, 7, 55, 43, 41, 14, 68, 98, 98, 75, 81, 91, 93, 58, 36, 75, 16, 52, 95, 41, 76, 6, 2, 12, 50, 66, 7, 63, 24, 96, 36, 12, 47, 58, 86, 20, 8], [43, 30, 21, 45, 62, 76, 21, 12, 5, 98, 24, 39, 66, 8, 10, 47, 52, 62, 69, 33, 43, 63, 94, 47, 89, 35, 2, 97, 68, 27, 91, 67, 79, 76, 63, 44, 62, 26, 71, 41, 65, 11, 63, 68], [83, 26, 88, 87, 27, 89, 90, 44, 25, 11, 24, 51, 63, 87, 21, 47, 30, 87, 41, 10, 51, 68, 19, 99, 3, 60, 9, 1, 88, 96, 50, 51, 4, 7, 21, 19, 81, 12, 3, 68, 86, 76, 94, 27], [70, 20, 21, 16, 66, 54, 91, 72, 58, 19, 87, 21, 83, 86, 36, 55, 90, 93, 21, 99, 40, 83, 70, 10, 74, 29, 47, 2, 90, 40, 54, 7, 42, 58, 81, 86, 96, 50, 78, 91, 13, 8, 19, 75], [48, 77, 22, 83, 16, 42, 23, 23, 66, 28, 93, 6, 55, 33, 71, 80, 69, 45, 17, 65, 61, 36, 96, 88, 34, 91, 96, 16, 38, 82, 14, 46, 93, 30, 80, 71, 78, 32, 88, 10, 49, 64, 80, 71], [43, 22, 43, 14, 39, 21, 40, 9, 28, 58, 67, 37, 48, 21, 15, 23, 65, 37, 95, 9, 78, 72, 24, 15, 61, 34, 60, 71, 89, 67, 54, 12, 65, 93, 7, 33, 32, 66, 15, 77, 35, 49, 7, 37], [11, 94, 76, 42, 84, 60, 54, 9, 48, 62, 66, 29, 46, 66, 39, 5, 50, 42, 11, 70, 68, 44, 97, 32, 66, 78, 94, 30, 74, 62, 30, 9, 72, 93, 86, 56, 39, 33, 3, 69, 90, 82, 84, 52], [58, 42, 85, 13, 96, 49, 7, 2, 15, 63, 99, 30, 99, 61, 4, 70, 61, 2, 41, 89, 65, 73, 26, 81, 80, 99, 19, 60, 97, 47, 82, 52, 99, 46, 20, 64, 72, 76, 77, 87, 83, 71, 61, 27], [52, 73, 93, 29, 14, 16, 36, 20, 50, 20, 82, 46, 13, 97, 48, 91, 3, 64, 95, 94, 57, 80, 35, 72, 96, 88, 2, 90, 46, 85, 12, 85, 6, 72, 26, 43, 6, 23, 98, 98, 57, 5, 88, 33], [16, 41, 49, 59, 67, 92, 11, 44, 53, 79, 8, 47, 38, 89, 16, 59, 8, 57, 45, 87, 27, 63, 52, 23, 70, 22, 27, 95, 39, 42, 53, 70, 77, 14, 37, 66, 40, 42, 83, 19, 15, 51, 42, 31], [11, 64, 69, 92, 73, 96, 98, 93, 44, 68, 87, 34, 37, 60, 65, 74, 41, 20, 72, 60, 58, 91, 84, 58, 54, 16, 68, 88, 17, 9, 20, 10, 2, 24, 80, 41, 15, 99, 74, 19, 83, 88, 77, 97], [1, 23, 97, 64, 27, 1, 39, 25, 98, 41, 57, 7, 11, 26, 60, 53, 1, 88, 78, 45, 83, 1, 7, 43, 35, 34, 68, 40, 20, 64, 82, 66, 61, 46, 54, 50, 30, 55, 51, 83, 9, 47, 89, 94], [58, 17, 59, 16, 88, 29, 50, 63, 79, 86, 5, 74, 37, 36, 17, 23, 2, 55, 85, 19, 88, 94, 98, 10, 80, 3, 18, 2, 90, 24, 45, 95, 42, 7, 59, 46, 44, 93, 35, 30, 4, 89, 62, 45], [30, 12, 55, 36, 47, 2, 26, 57, 75, 42, 38, 56, 75, 95, 26, 95, 37, 73, 28, 31, 29, 46, 25, 96, 15, 77, 85, 19, 76, 71, 83, 23, 1, 93, 59, 94, 64, 45, 37, 9, 92, 92, 66, 5]],35,), ([[65, 34, 26, 9, 37, 67, 53, 2, 72, 64, 94, 58, 2, 94, 35, 57, 91, 79, 54, 72, 39, 11, 27, 46, 26, 53, 1, 43, 93, 8, 32, 94, 4], [70, 74, 34, 17, 26, 35, 12, 1, 81, 4, 69, 57, 12, 53, 47, 75, 31, 54, 38, 4, 75, 27, 12, 68, 75, 76, 32, 30, 97, 65, 71, 82, 58], [55, 76, 56, 98, 18, 2, 69, 56, 84, 19, 8, 83, 11, 32, 19, 33, 18, 70, 85, 12, 21, 53, 84, 42, 79, 57, 48, 74, 4, 32, 56, 93, 25], [81, 46, 85, 84, 85, 1, 12, 93, 15, 95, 36, 6, 66, 53, 15, 15, 22, 13, 52, 78, 51, 78, 13, 12, 16, 6, 33, 46, 74, 60, 42, 23, 86], [24, 32, 97, 90, 96, 79, 70, 38, 1, 40, 31, 81, 50, 18, 5, 83, 71, 28, 59, 22, 85, 88, 9, 42, 42, 80, 1, 53, 69, 19, 28, 6, 7], [94, 36, 5, 98, 38, 21, 4, 80, 67, 31, 67, 25, 86, 20, 25, 51, 91, 81, 49, 36, 34, 90, 15, 17, 73, 93, 29, 64, 65, 69, 15, 99, 85], [51, 3, 38, 69, 97, 30, 29, 16, 18, 38, 53, 56, 27, 45, 82, 52, 93, 83, 38, 48, 58, 63, 75, 35, 57, 3, 64, 35, 91, 2, 3, 11, 17], [42, 87, 47, 48, 84, 66, 97, 47, 22, 24, 25, 13, 60, 82, 36, 33, 6, 21, 37, 70, 99, 46, 59, 7, 48, 43, 85, 61, 88, 23, 28, 62, 67], [39, 1, 60, 53, 83, 73, 88, 11, 94, 21, 35, 42, 70, 76, 11, 21, 37, 94, 77, 44, 16, 18, 11, 48, 23, 31, 88, 99, 47, 51, 5, 84, 39], [76, 36, 4, 40, 26, 32, 68, 98, 87, 61, 86, 9, 7, 19, 87, 82, 25, 89, 88, 17, 71, 90, 93, 96, 93, 38, 79, 40, 37, 39, 50, 78, 27], [93, 50, 25, 86, 64, 79, 31, 5, 2, 79, 17, 28, 43, 55, 75, 86, 80, 44, 40, 79, 22, 86, 76, 39, 29, 94, 55, 21, 58, 16, 11, 25, 3], [65, 46, 21, 53, 94, 31, 36, 95, 56, 15, 61, 79, 47, 91, 6, 3, 77, 58, 19, 1, 14, 3, 88, 14, 25, 26, 87, 31, 32, 92, 34, 1, 10], [32, 23, 80, 11, 71, 66, 61, 14, 5, 4, 20, 46, 14, 22, 46, 33, 79, 10, 23, 40, 27, 14, 53, 96, 36, 18, 88, 72, 21, 89, 54, 41, 15], [58, 51, 83, 78, 50, 9, 74, 89, 78, 45, 35, 48, 16, 22, 87, 98, 55, 14, 45, 66, 39, 69, 15, 63, 90, 99, 58, 71, 72, 58, 66, 60, 59], [75, 60, 51, 45, 94, 80, 68, 18, 55, 52, 91, 83, 75, 66, 82, 59, 25, 32, 60, 99, 55, 18, 44, 8, 47, 70, 23, 50, 47, 70, 7, 82, 75], [99, 87, 34, 94, 16, 25, 38, 55, 34, 47, 95, 19, 23, 33, 65, 4, 12, 69, 58, 37, 49, 64, 31, 15, 8, 81, 49, 21, 43, 17, 36, 69, 66], [36, 37, 27, 32, 39, 87, 14, 14, 20, 91, 54, 77, 73, 98, 84, 49, 31, 88, 35, 60, 64, 92, 11, 25, 83, 61, 81, 9, 17, 75, 41, 26, 9], [56, 72, 59, 52, 16, 37, 54, 75, 37, 61, 38, 68, 69, 30, 45, 88, 94, 90, 63, 37, 68, 93, 36, 66, 81, 75, 22, 26, 70, 1, 91, 57, 48], [12, 1, 43, 29, 13, 3, 73, 28, 90, 13, 17, 93, 52, 42, 98, 43, 50, 25, 73, 54, 77, 70, 68, 53, 34, 14, 36, 19, 74, 2, 3, 62, 91], [53, 16, 54, 88, 98, 49, 27, 72, 31, 44, 42, 79, 26, 27, 2, 29, 98, 49, 13, 86, 43, 39, 15, 35, 93, 47, 36, 30, 55, 50, 14, 6, 62], [78, 34, 23, 81, 13, 49, 39, 23, 3, 56, 41, 98, 47, 22, 13, 60, 99, 73, 1, 12, 63, 72, 96, 76, 28, 40, 41, 59, 78, 36, 67, 94, 80], [49, 16, 72, 51, 7, 35, 73, 49, 91, 86, 45, 12, 4, 60, 56, 32, 55, 92, 19, 93, 55, 11, 79, 31, 58, 36, 61, 16, 68, 36, 80, 2, 61], [5, 36, 19, 30, 33, 96, 99, 83, 98, 89, 30, 33, 31, 36, 31, 65, 94, 40, 31, 13, 42, 60, 66, 2, 74, 95, 41, 77, 59, 60, 23, 29, 50], [44, 80, 2, 23, 40, 79, 46, 11, 47, 85, 79, 1, 36, 61, 2, 56, 79, 51, 31, 3, 44, 76, 47, 12, 37, 43, 13, 43, 47, 2, 98, 56, 7], [16, 78, 74, 73, 14, 67, 14, 10, 48, 6, 18, 81, 76, 3, 95, 20, 59, 93, 2, 69, 49, 45, 12, 25, 31, 17, 37, 17, 9, 21, 88, 21, 10], [76, 93, 65, 22, 27, 8, 28, 66, 46, 92, 12, 73, 84, 28, 43, 95, 15, 83, 77, 90, 32, 85, 52, 89, 21, 82, 11, 21, 11, 98, 70, 31, 43], [44, 70, 41, 47, 92, 72, 99, 44, 62, 51, 70, 76, 10, 37, 50, 27, 39, 42, 81, 59, 82, 41, 33, 57, 57, 4, 14, 34, 95, 59, 33, 16, 2], [22, 63, 34, 90, 6, 55, 79, 36, 55, 52, 96, 12, 19, 95, 26, 58, 31, 41, 77, 55, 25, 22, 13, 64, 39, 2, 53, 77, 70, 60, 40, 99, 14], [81, 48, 68, 96, 21, 87, 19, 85, 97, 55, 12, 43, 26, 17, 74, 82, 37, 66, 79, 27, 39, 8, 33, 69, 69, 51, 64, 64, 65, 55, 69, 40, 64], [87, 40, 17, 98, 18, 93, 65, 49, 93, 30, 55, 5, 70, 42, 31, 1, 23, 72, 23, 4, 25, 27, 77, 39, 19, 20, 89, 83, 70, 31, 97, 14, 67], [13, 48, 77, 97, 13, 89, 48, 57, 27, 18, 84, 78, 58, 84, 73, 45, 97, 6, 12, 27, 63, 83, 59, 51, 75, 15, 28, 89, 14, 24, 34, 91, 77], [92, 66, 37, 4, 47, 78, 71, 32, 83, 73, 64, 91, 27, 29, 83, 9, 39, 58, 80, 63, 43, 59, 14, 22, 75, 40, 39, 66, 91, 12, 83, 94, 59], [76, 33, 76, 72, 72, 20, 38, 51, 14, 15, 85, 73, 91, 6, 11, 38, 69, 33, 33, 80, 82, 48, 38, 10, 66, 80, 57, 74, 23, 85, 93, 17, 63]],30,), ([[20, 59, 92, 38, 68, 74, 80, 12, 75, 17, 90, 28, 32, 68, 51, 92, 9, 87, 92, 42, 1, 58, 4, 54, 95, 81, 87, 47, 29, 71, 32], [91, 56, 90, 35, 34, 99, 8, 1, 13, 48, 11, 13, 98, 49, 66, 59, 93, 31, 94, 67, 76, 95, 12, 9, 3, 97, 74, 32, 52, 88, 51], [78, 15, 37, 60, 60, 51, 19, 57, 62, 95, 22, 82, 60, 17, 70, 11, 38, 99, 11, 81, 53, 98, 69, 80, 85, 22, 66, 18, 6, 85, 35], [61, 35, 21, 18, 30, 38, 26, 82, 1, 31, 86, 8, 68, 82, 95, 73, 51, 5, 27, 97, 67, 64, 52, 15, 59, 45, 36, 76, 75, 94, 96], [84, 55, 25, 87, 88, 21, 76, 60, 54, 69, 74, 12, 36, 77, 84, 1, 34, 16, 19, 69, 34, 75, 97, 87, 13, 52, 38, 9, 75, 94, 14], [47, 82, 61, 86, 67, 43, 66, 51, 25, 35, 15, 48, 16, 93, 50, 91, 44, 57, 52, 56, 3, 11, 97, 92, 25, 37, 99, 14, 68, 34, 64], [31, 12, 98, 9, 45, 80, 4, 61, 55, 46, 38, 31, 40, 42, 27, 53, 49, 59, 20, 19, 62, 16, 9, 52, 95, 75, 87, 70, 96, 90, 74], [88, 20, 61, 40, 55, 58, 43, 50, 34, 77, 73, 86, 17, 24, 98, 56, 14, 47, 41, 90, 41, 32, 63, 66, 88, 57, 6, 66, 20, 9, 26], [16, 54, 1, 53, 79, 34, 12, 30, 7, 23, 9, 46, 40, 45, 3, 44, 83, 99, 63, 56, 38, 76, 82, 11, 18, 59, 88, 74, 42, 21, 44], [38, 50, 80, 48, 98, 72, 60, 51, 67, 96, 55, 70, 71, 70, 87, 87, 12, 42, 87, 65, 19, 14, 20, 19, 84, 32, 21, 48, 30, 23, 58], [7, 23, 15, 17, 86, 87, 76, 92, 19, 13, 15, 21, 65, 52, 12, 37, 74, 19, 13, 33, 73, 60, 39, 50, 37, 32, 62, 58, 10, 20, 31], [69, 27, 28, 76, 93, 14, 24, 96, 83, 94, 77, 47, 14, 11, 39, 86, 40, 24, 69, 30, 45, 24, 9, 24, 93, 32, 3, 86, 87, 61, 87], [47, 83, 78, 32, 86, 32, 92, 82, 10, 76, 45, 83, 6, 77, 91, 63, 78, 24, 86, 61, 90, 51, 44, 88, 11, 81, 90, 33, 17, 23, 97], [84, 97, 32, 2, 6, 19, 17, 53, 25, 60, 15, 42, 17, 76, 86, 35, 29, 28, 69, 95, 60, 92, 6, 31, 80, 21, 2, 52, 14, 46, 32], [1, 71, 62, 39, 44, 88, 75, 39, 9, 53, 48, 76, 63, 27, 69, 71, 22, 89, 15, 25, 1, 75, 39, 75, 31, 86, 52, 29, 38, 64, 76], [48, 70, 75, 49, 76, 5, 82, 72, 83, 58, 66, 43, 25, 87, 73, 6, 9, 87, 42, 47, 82, 43, 71, 19, 7, 17, 61, 78, 44, 3, 31], [78, 89, 29, 56, 19, 7, 68, 28, 81, 68, 91, 88, 41, 98, 8, 3, 12, 11, 85, 78, 1, 21, 19, 69, 32, 72, 62, 9, 26, 20, 14], [94, 60, 73, 46, 60, 12, 21, 21, 47, 91, 56, 74, 88, 76, 60, 84, 10, 38, 4, 23, 20, 46, 59, 8, 19, 51, 14, 6, 15, 25, 69], [4, 48, 57, 98, 25, 86, 76, 78, 66, 21, 16, 71, 18, 65, 95, 33, 10, 7, 50, 21, 81, 52, 30, 92, 15, 40, 7, 20, 90, 1, 9], [92, 58, 71, 51, 54, 56, 57, 21, 32, 7, 54, 97, 57, 32, 71, 81, 51, 25, 82, 81, 35, 25, 45, 69, 82, 20, 31, 77, 20, 70, 17], [55, 96, 60, 73, 88, 63, 2, 90, 14, 37, 9, 94, 55, 44, 55, 96, 84, 54, 20, 90, 6, 54, 34, 7, 16, 58, 58, 88, 72, 44, 68], [98, 72, 10, 44, 74, 20, 96, 24, 85, 9, 23, 58, 7, 32, 30, 65, 75, 28, 57, 25, 37, 61, 94, 38, 5, 45, 86, 77, 55, 50, 23], [9, 43, 13, 86, 41, 42, 4, 64, 59, 31, 90, 68, 99, 93, 10, 88, 89, 83, 84, 95, 52, 25, 99, 95, 75, 1, 27, 99, 92, 61, 95], [23, 9, 95, 28, 79, 76, 53, 1, 13, 47, 30, 14, 81, 43, 84, 84, 99, 77, 44, 52, 47, 35, 90, 64, 77, 47, 66, 32, 77, 96, 40], [53, 27, 68, 47, 54, 21, 53, 24, 38, 1, 85, 65, 33, 50, 32, 60, 37, 6, 54, 15, 78, 35, 98, 88, 73, 32, 84, 10, 31, 79, 55], [45, 44, 77, 84, 86, 83, 10, 64, 60, 57, 20, 71, 9, 92, 78, 61, 29, 62, 63, 39, 49, 58, 88, 5, 25, 61, 59, 55, 39, 12, 9], [12, 35, 58, 74, 10, 97, 46, 66, 22, 77, 6, 87, 64, 20, 55, 65, 68, 10, 15, 51, 24, 96, 93, 36, 5, 20, 59, 3, 22, 76, 18], [29, 27, 6, 76, 52, 73, 81, 12, 7, 55, 18, 30, 81, 15, 86, 93, 48, 40, 63, 78, 8, 5, 79, 83, 93, 78, 91, 7, 94, 7, 83], [10, 29, 80, 26, 28, 72, 4, 94, 69, 37, 89, 26, 40, 78, 22, 1, 99, 4, 73, 79, 51, 89, 83, 79, 30, 41, 17, 71, 10, 32, 99], [39, 61, 3, 58, 92, 51, 77, 76, 79, 30, 44, 5, 30, 3, 95, 15, 50, 89, 39, 73, 53, 82, 1, 18, 76, 99, 29, 65, 75, 32, 32], [38, 40, 23, 94, 62, 91, 94, 42, 32, 52, 10, 23, 51, 7, 77, 52, 86, 13, 65, 12, 25, 26, 84, 32, 19, 36, 94, 91, 48, 50, 11]],25,), ([[93, 83, 42, 36, 3, 96, 99, 4, 83, 84, 92, 19, 69, 39, 25, 37, 46, 22, 48, 91, 51, 83, 1, 5, 31, 15, 80, 59, 40, 93, 95], [54, 11, 90, 56, 27, 57, 45, 62, 95, 13, 85, 33, 86, 20, 39, 58, 72, 86, 29, 60, 14, 95, 58, 85, 72, 58, 90, 6, 73, 96, 83], [33, 22, 85, 19, 97, 11, 52, 56, 85, 45, 6, 97, 69, 99, 37, 43, 16, 45, 91, 6, 44, 85, 1, 20, 38, 8, 8, 43, 76, 88, 25], [69, 43, 13, 63, 41, 26, 51, 26, 83, 20, 65, 38, 60, 76, 13, 80, 51, 90, 70, 63, 88, 47, 82, 52, 15, 55, 98, 12, 36, 21, 81], [2, 91, 37, 21, 77, 38, 47, 83, 46, 50, 21, 80, 13, 54, 53, 31, 44, 94, 85, 47, 20, 54, 23, 60, 86, 86, 56, 35, 86, 88, 18], [46, 75, 65, 1, 94, 23, 37, 13, 73, 70, 90, 44, 12, 54, 50, 69, 28, 80, 64, 10, 44, 71, 6, 68, 63, 79, 22, 10, 96, 19, 95], [13, 71, 30, 9, 50, 85, 17, 41, 16, 58, 27, 14, 25, 59, 51, 15, 48, 61, 50, 15, 39, 7, 79, 49, 43, 21, 28, 32, 60, 5, 8], [40, 81, 37, 19, 62, 87, 90, 26, 23, 70, 64, 89, 35, 10, 1, 50, 94, 20, 75, 48, 62, 41, 59, 43, 38, 78, 4, 44, 37, 73, 16], [97, 37, 78, 7, 32, 92, 29, 80, 85, 68, 52, 98, 15, 27, 54, 46, 37, 33, 40, 20, 72, 68, 50, 49, 50, 22, 52, 96, 94, 54, 29], [35, 66, 92, 81, 84, 52, 72, 10, 3, 52, 10, 22, 25, 14, 22, 43, 78, 75, 95, 55, 11, 95, 93, 14, 16, 81, 14, 82, 61, 82, 7], [92, 56, 47, 97, 57, 39, 82, 67, 14, 63, 49, 24, 27, 33, 12, 98, 16, 70, 55, 13, 12, 29, 59, 8, 15, 78, 60, 94, 36, 50, 79], [79, 56, 75, 54, 90, 10, 59, 53, 87, 86, 48, 65, 9, 10, 5, 55, 35, 37, 75, 75, 72, 63, 41, 43, 96, 33, 51, 49, 55, 97, 89], [51, 24, 59, 88, 43, 51, 67, 10, 84, 22, 15, 62, 77, 24, 75, 34, 97, 71, 3, 46, 38, 59, 82, 53, 52, 69, 2, 57, 21, 89, 88], [33, 49, 78, 9, 9, 85, 92, 47, 9, 36, 67, 24, 14, 66, 72, 45, 11, 49, 2, 44, 87, 98, 3, 28, 15, 22, 42, 30, 28, 26, 45], [30, 97, 41, 94, 2, 35, 30, 83, 75, 35, 77, 12, 40, 15, 9, 39, 64, 47, 63, 92, 54, 33, 23, 4, 3, 42, 32, 55, 16, 46, 20], [11, 80, 79, 61, 36, 97, 56, 15, 15, 5, 55, 11, 96, 66, 51, 51, 99, 45, 55, 77, 33, 49, 91, 96, 58, 10, 53, 69, 12, 6, 6], [23, 73, 85, 83, 94, 51, 28, 20, 39, 36, 50, 60, 74, 68, 38, 30, 65, 71, 78, 69, 78, 87, 26, 49, 20, 44, 10, 72, 97, 1, 17], [12, 50, 96, 79, 8, 43, 71, 63, 13, 88, 21, 13, 62, 80, 42, 85, 19, 53, 97, 62, 21, 75, 86, 78, 91, 35, 88, 9, 3, 73, 28], [28, 62, 83, 54, 34, 11, 79, 29, 20, 74, 75, 68, 46, 22, 4, 59, 89, 29, 24, 56, 8, 49, 12, 87, 89, 95, 90, 21, 48, 39, 29], [98, 88, 4, 74, 67, 38, 35, 65, 58, 36, 35, 24, 59, 12, 49, 92, 84, 27, 56, 81, 48, 43, 73, 65, 51, 84, 39, 93, 56, 24, 94], [94, 92, 81, 45, 74, 80, 98, 72, 40, 20, 41, 34, 23, 59, 59, 28, 83, 13, 23, 74, 12, 89, 90, 82, 2, 12, 49, 50, 51, 2, 52], [29, 74, 58, 85, 1, 37, 5, 66, 26, 58, 7, 84, 70, 73, 16, 6, 98, 87, 51, 49, 87, 89, 24, 30, 80, 16, 76, 50, 6, 74, 9], [14, 96, 38, 81, 29, 8, 19, 75, 17, 83, 63, 5, 57, 46, 3, 52, 46, 47, 94, 96, 18, 22, 77, 14, 9, 60, 94, 50, 7, 37, 30], [85, 76, 84, 18, 58, 48, 45, 54, 93, 16, 10, 22, 30, 5, 62, 51, 18, 44, 27, 23, 55, 56, 28, 58, 13, 14, 6, 85, 32, 25, 30], [70, 19, 93, 74, 98, 7, 55, 67, 38, 49, 77, 85, 37, 65, 80, 83, 67, 15, 99, 71, 51, 81, 25, 77, 65, 37, 62, 80, 8, 78, 48], [1, 76, 42, 12, 54, 26, 18, 30, 9, 61, 74, 7, 58, 5, 48, 43, 41, 18, 70, 24, 8, 15, 41, 47, 46, 44, 9, 95, 82, 24, 3], [17, 28, 29, 45, 1, 80, 41, 27, 18, 50, 1, 43, 84, 92, 19, 18, 23, 2, 68, 7, 18, 27, 32, 9, 65, 85, 21, 33, 89, 74, 72], [98, 66, 13, 88, 97, 14, 26, 83, 71, 6, 59, 65, 34, 10, 39, 78, 45, 95, 70, 22, 89, 93, 98, 58, 63, 80, 93, 98, 31, 73, 85], [56, 76, 20, 78, 84, 26, 43, 32, 39, 14, 64, 37, 99, 54, 44, 6, 98, 26, 9, 29, 78, 19, 41, 51, 33, 37, 33, 93, 55, 93, 42], [56, 29, 87, 54, 47, 91, 90, 47, 11, 43, 63, 8, 53, 88, 76, 63, 87, 41, 64, 81, 39, 85, 74, 56, 4, 3, 58, 86, 20, 85, 53], [64, 65, 80, 69, 83, 7, 3, 64, 27, 52, 18, 45, 3, 51, 86, 16, 59, 73, 4, 48, 47, 20, 20, 34, 74, 40, 16, 37, 30, 86, 93]],29,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_3_LONGEST_INCREASING_SUBSEQUENCE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_3_LONGEST_INCREASING_SUBSEQUENCE_1{ static int f_gold ( int arr [ ] , int n ) { int f_gold [ ] = new int [ n ] ; int i , j , max = 0 ; for ( i = 0 ; i < n ; i ++ ) f_gold [ i ] = 1 ; for ( i = 1 ; i < n ; i ++ ) for ( j = 0 ; j < i ; j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1 ; for ( i = 0 ; i < n ; i ++ ) if ( max < f_gold [ i ] ) max = f_gold [ i ] ; return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,5,6,8,12,12,17,17,18,22,22,26,26,31,31,31,31,32,35,35,38,41,42,49,49,60,60,61,63,64,68,69,70,71,72,76,77,80,83,83,89,90,90,90,96}); param0.add(new int[]{-24,-16,-64,28,-30,-26,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{11,42,44,52,15,35,48}); param0.add(new int[]{-54}); param0.add(new int[]{1,0,1,1,1,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0}); param0.add(new int[]{2,5,6,10,13,15,18,18,19,27,30,32,34,40,47,50,53,54,55,56,56,56,59,60,63,64,71,80,83,84,86,95}); param0.add(new int[]{-80,60,-6,0,-50,82,-84,36,-96,-32,-14,16,60,-14,0,-22,28,12,8,-86,38,56,-32,-6,-80,-42,56,10,72,12,96,84}); param0.add(new int[]{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}); param0.add(new int[]{10,38,45,57,44,13,8,62,74,54,37,75,35,60,36,33,14,71,4,21,6,8,30,5,2,5,4,20,33,69,83,87,83,52,77,79,49,25,11,35,98,31,52,82,13,25,17,35,53}); List param1 = new ArrayList<>(); param1.add(40); param1.add(4); param1.add(11); param1.add(6); param1.add(0); param1.add(22); param1.add(24); param1.add(16); param1.add(37); param1.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { int f_gold [ n ]; f_gold [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { f_gold [ i ] = 1; for ( int j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ j ] && f_gold [ i ] < f_gold [ j ] + 1 ) f_gold [ i ] = f_gold [ j ] + 1; } return * max_element ( f_gold, f_gold + n ); } int main() { int n_success = 0; vector> param0 {{2,3,5,6,8,12,12,17,17,18,22,22,26,26,31,31,31,31,32,35,35,38,41,42,49,49,60,60,61,63,64,68,69,70,71,72,76,77,80,83,83,89,90,90,90,96},{-24,-16,-64,28,-30,-26,-14},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{11,42,44,52,15,35,48},{-54},{1,0,1,1,1,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0},{2,5,6,10,13,15,18,18,19,27,30,32,34,40,47,50,53,54,55,56,56,56,59,60,63,64,71,80,83,84,86,95},{-80,60,-6,0,-50,82,-84,36,-96,-32,-14,16,60,-14,0,-22,28,12,8,-86,38,56,-32,-6,-80,-42,56,10,72,12,96,84},{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},{10,38,45,57,44,13,8,62,74,54,37,75,35,60,36,33,14,71,4,21,6,8,30,5,2,5,4,20,33,69,83,87,83,52,77,79,49,25,11,35,98,31,52,82,13,25,17,35,53}}; vector param1 {40,4,11,6,0,22,24,16,37,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, DYNAMIC_PROGRAMMING_SET_37_BOOLEAN_PARENTHESIZATION_PROBLEM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_37_BOOLEAN_PARENTHESIZATION_PROBLEM{ static int f_gold ( char symb [ ] , char oper [ ] , int n ) { int F [ ] [ ] = new int [ n ] [ n ] ; int T [ ] [ ] = new int [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { F [ i ] [ i ] = ( symb [ i ] == 'F' ) ? 1 : 0 ; T [ i ] [ i ] = ( symb [ i ] == 'T' ) ? 1 : 0 ; } for ( int gap = 1 ; gap < n ; ++ gap ) { for ( int i = 0 , j = gap ; j < n ; ++ i , ++ j ) { T [ i ] [ j ] = F [ i ] [ j ] = 0 ; for ( int g = 0 ; g < gap ; g ++ ) { int k = i + g ; int tik = T [ i ] [ k ] + F [ i ] [ k ] ; int tkj = T [ k + 1 ] [ j ] + F [ k + 1 ] [ j ] ; if ( oper [ k ] == '&' ) { T [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ] ; F [ i ] [ j ] += ( tik * tkj - T [ i ] [ k ] * T [ k + 1 ] [ j ] ) ; } if ( oper [ k ] == '|' ) { F [ i ] [ j ] += F [ i ] [ k ] * F [ k + 1 ] [ j ] ; T [ i ] [ j ] += ( tik * tkj - F [ i ] [ k ] * F [ k + 1 ] [ j ] ) ; } if ( oper [ k ] == '^' ) { T [ i ] [ j ] += F [ i ] [ k ] * T [ k + 1 ] [ j ] + T [ i ] [ k ] * F [ k + 1 ] [ j ] ; F [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ] + F [ i ] [ k ] * F [ k + 1 ] [ j ] ; } } } } return T [ 0 ] [ n - 1 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""TTFT"".toCharArray()); param0.add(""TFT"".toCharArray()); param0.add(""TFF"".toCharArray()); param0.add(""TTFT"".toCharArray()); param0.add(""TTFT"".toCharArray()); param0.add(""TTFT"".toCharArray()); param0.add(""TTFT"".toCharArray()); param0.add(""TTFT"".toCharArray()); param0.add(""TTFT"".toCharArray()); param0.add(""TTFT"".toCharArray()); List param1 = new ArrayList<>(); param1.add(""|&^"".toCharArray()); param1.add(""^&"".toCharArray()); param1.add(""^|"".toCharArray()); param1.add(""|||"".toCharArray()); param1.add(""&&&"".toCharArray()); param1.add(""&&^"".toCharArray()); param1.add(""^&|"".toCharArray()); param1.add(""^^^"".toCharArray()); param1.add(""^||"".toCharArray()); param1.add(""|^|"".toCharArray()); param1.add(""&^|"".toCharArray()); List param2 = new ArrayList<>(); param2.add(4); param2.add(3); param2.add(3); param2.add(4); param2.add(4); param2.add(4); param2.add(4); param2.add(4); param2.add(4); param2.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( symb , oper , n ) : F = [ [ 0 for i in range ( n + 1 ) ] for i in range ( n + 1 ) ] T = [ [ 0 for i in range ( n + 1 ) ] for i in range ( n + 1 ) ] for i in range ( n ) : if symb [ i ] == 'F' : F [ i ] [ i ] = 1 else : F [ i ] [ i ] = 0 if symb [ i ] == 'T' : T [ i ] [ i ] = 1 else : T [ i ] [ i ] = 0 for gap in range ( 1 , n ) : i = 0 for j in range ( gap , n ) : T [ i ] [ j ] = F [ i ] [ j ] = 0 for g in range ( gap ) : k = i + g tik = T [ i ] [ k ] + F [ i ] [ k ] ; tkj = T [ k + 1 ] [ j ] + F [ k + 1 ] [ j ] ; if oper [ k ] == '&' : T [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ] F [ i ] [ j ] += ( tik * tkj - T [ i ] [ k ] * T [ k + 1 ] [ j ] ) if oper [ k ] == '|' : F [ i ] [ j ] += F [ i ] [ k ] * F [ k + 1 ] [ j ] T [ i ] [ j ] += ( tik * tkj - F [ i ] [ k ] * F [ k + 1 ] [ j ] ) if oper [ k ] == '^' : T [ i ] [ j ] += ( F [ i ] [ k ] * T [ k + 1 ] [ j ] + T [ i ] [ k ] * F [ k + 1 ] [ j ] ) F [ i ] [ j ] += ( T [ i ] [ k ] * T [ k + 1 ] [ j ] + F [ i ] [ k ] * F [ k + 1 ] [ j ] ) i += 1 return T [ 0 ] [ n - 1 ] "," using namespace std; int f_gold ( char symb [ ], char oper [ ], int n ) { int F [ n ] [ n ], T [ n ] [ n ]; for ( int i = 0; i < n; i ++ ) { F [ i ] [ i ] = ( symb [ i ] == 'F' ) ? 1 : 0; T [ i ] [ i ] = ( symb [ i ] == 'T' ) ? 1 : 0; } for ( int gap = 1; gap < n; ++ gap ) { for ( int i = 0, j = gap; j < n; ++ i, ++ j ) { T [ i ] [ j ] = F [ i ] [ j ] = 0; for ( int g = 0; g < gap; g ++ ) { int k = i + g; int tik = T [ i ] [ k ] + F [ i ] [ k ]; int tkj = T [ k + 1 ] [ j ] + F [ k + 1 ] [ j ]; if ( oper [ k ] == '&' ) { T [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ]; F [ i ] [ j ] += ( tik * tkj - T [ i ] [ k ] * T [ k + 1 ] [ j ] ); } if ( oper [ k ] == '|' ) { F [ i ] [ j ] += F [ i ] [ k ] * F [ k + 1 ] [ j ]; T [ i ] [ j ] += ( tik * tkj - F [ i ] [ k ] * F [ k + 1 ] [ j ] ); } if ( oper [ k ] == '^' ) { T [ i ] [ j ] += F [ i ] [ k ] * T [ k + 1 ] [ j ] + T [ i ] [ k ] * F [ k + 1 ] [ j ]; F [ i ] [ j ] += T [ i ] [ k ] * T [ k + 1 ] [ j ] + F [ i ] [ k ] * F [ k + 1 ] [ j ]; } } } } return T [ 0 ] [ n - 1 ]; } int main() { int n_success = 0; vector param0 { ""TTFT"", ""TFT"", ""TFF"", ""TTFT"", ""TTFT"", ""TTFT"", ""TTFT"", ""TTFT"", ""TTFT"", ""TTFT"" }; vector param1 { ""|&^"", ""^&"", ""^|"", ""|||"", ""&&&"", ""&&^"", ""^&|"", ""^^^"", ""^||"", ""|^|"" }; vector param2 {4,3,3,4,4,4,4,4,4,4}; for(int i = 0; i < param0.size(); ++i) { char* arr0 = new char[param0[i].length() + 1]; arr0 = strncpy(arr0, param0[i].c_str(), sizeof(arr0)); char* arr1 = new char[param1[i].length() + 1]; arr1 = strncpy(arr1, param1[i].c_str(), sizeof(arr1)); if(f_filled(arr0,arr1,param2[i]) == f_gold(arr0,arr1,param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (""TTFT"", ""|&^"",4,), (""TFT"", ""^&"",3,), (""TFF"", ""^|"",3,), (""TTFT"", ""|||"",4,), (""TTFT"", ""&&&"",4,), (""TTFT"", ""&&^"",4,), (""TTFT"", ""^&|"",4,), (""TTFT"", ""^^^"",4,), (""TTFT"", ""^||"",4,), (""TTFT"", ""|^|"",4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_FIND_THE_AREA_OF_PENTAGON{ static float f_gold ( float a ) { float area ; area = ( float ) ( Math . sqrt ( 5 * ( 5 + 2 * ( Math . sqrt ( 5 ) ) ) ) * a * a ) / 4 ; return area ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(2009.019461888707F); param0.add(-1480.5131394215787F); param0.add(357.7870347569567F); param0.add(-8040.293697508038F); param0.add(3821.882657293133F); param0.add(-6840.635072240347F); param0.add(1623.036598830132F); param0.add(-9714.00706195298F); param0.add(3916.454769669618F); param0.add(-669.068424712943F); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001F) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","from math import sqrt def f_gold ( a ) : area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4 return area "," using namespace std; float f_gold ( float a ) { float area; area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4; return area; } int main() { int n_success = 0; vector param0 {2009.019461888707F,-1480.5131394215787F,357.7870347569567F,-8040.293697508038F,3821.882657293133F,-6840.635072240347F,1623.036598830132F,-9714.00706195298F,3916.454769669618F,-669.068424712943F}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001F) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (2009.019461888707,), (-1480.5131394215787,), (357.7870347569567,), (-8040.293697508038,), (3821.882657293133,), (-6840.635072240347,), (1623.036598830132,), (-9714.00706195298,), (3916.454769669618,), (-669.068424712943,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_CONSECUTIVE_NUMBERS_PRESENT_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_CONSECUTIVE_NUMBERS_PRESENT_ARRAY{ static int f_gold ( int arr [ ] , int n ) { HashSet < Integer > S = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) S . add ( arr [ i ] ) ; int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( S . contains ( arr [ i ] ) ) { int j = arr [ i ] ; while ( S . contains ( j ) ) j ++ ; ans = Math . max ( ans , j - arr [ i ] ) ; } } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,5,9,24,28,31,49,54,67,85,86,94,97,97}); param0.add(new int[]{-34,16,-80,-10,80,2,50,-74,-76,36,-84,-24,74,-54,-22,46,80,58,-8,70,24,-88,52,62,30,42,48,16,78,-82,64,-36,84,-72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{49,61,68,4,90,89,71,74,45,61,35,41,59}); param0.add(new int[]{-42,-8,28,56,80,96}); param0.add(new int[]{1,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,1,1,1,1}); param0.add(new int[]{3,4,6,6,13,27,27,29,32,36,46,50,52,65,69,70,71,83,87,91}); param0.add(new int[]{64,-76,28,6,56,18,32,-50,-20,18,-26,-90,32,50,-18,98,84,40,50,88,-70,-6,-24,-44,-96,-58,48,-78,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{50,48,61,87,7,78,93,44,16,88,98,15,73,93,43,46,42,34,1,35,79,35,84,60,18,79,17,4,78,1,20,64}); List param1 = new ArrayList<>(); param1.add(11); param1.add(29); param1.add(13); param1.add(11); param1.add(4); param1.add(17); param1.add(10); param1.add(15); param1.add(15); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : S = set ( ) ; for i in range ( n ) : S.add ( arr [ i ] ) ; ans = 0 ; for i in range ( n ) : if S.__contains__ ( arr [ i ] ) : j = arr [ i ] ; while ( S.__contains__ ( j ) ) : j += 1 ; ans = max ( ans , j - arr [ i ] ) ; return ans ; "," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_set < int > S; for ( int i = 0; i < n; i ++ ) S . insert ( arr [ i ] ); int ans = 0; for ( int i = 0; i < n; i ++ ) { if ( S . find ( arr [ i ] - 1 ) == S . end ( ) ) { int j = arr [ i ]; while ( S . find ( j ) != S . end ( ) ) j ++; ans = max ( ans, j - arr [ i ] ); } } return ans; } int main() { int n_success = 0; vector> param0 {{3,5,9,24,28,31,49,54,67,85,86,94,97,97},{-34,16,-80,-10,80,2,50,-74,-76,36,-84,-24,74,-54,-22,46,80,58,-8,70,24,-88,52,62,30,42,48,16,78,-82,64,-36,84,-72},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{49,61,68,4,90,89,71,74,45,61,35,41,59},{-42,-8,28,56,80,96},{1,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,1,1,1,1},{3,4,6,6,13,27,27,29,32,36,46,50,52,65,69,70,71,83,87,91},{64,-76,28,6,56,18,32,-50,-20,18,-26,-90,32,50,-18,98,84,40,50,88,-70,-6,-24,-44,-96,-58,48,-78,-14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{50,48,61,87,7,78,93,44,16,88,98,15,73,93,43,46,42,34,1,35,79,35,84,60,18,79,17,4,78,1,20,64}}; vector param1 {11,29,13,11,4,17,10,15,15,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 5, 9, 24, 28, 31, 49, 54, 67, 85, 86, 94, 97, 97],11,), ([-34, 16, -80, -10, 80, 2, 50, -74, -76, 36, -84, -24, 74, -54, -22, 46, 80, 58, -8, 70, 24, -88, 52, 62, 30, 42, 48, 16, 78, -82, 64, -36, 84, -72],29,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([49, 61, 68, 4, 90, 89, 71, 74, 45, 61, 35, 41, 59],11,), ([-42, -8, 28, 56, 80, 96],4,), ([1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1],17,), ([3, 4, 6, 6, 13, 27, 27, 29, 32, 36, 46, 50, 52, 65, 69, 70, 71, 83, 87, 91],10,), ([64, -76, 28, 6, 56, 18, 32, -50, -20, 18, -26, -90, 32, 50, -18, 98, 84, 40, 50, 88, -70, -6, -24, -44, -96, -58, 48, -78, -14],15,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,), ([50, 48, 61, 87, 7, 78, 93, 44, 16, 88, 98, 15, 73, 93, 43, 46, 42, 34, 1, 35, 79, 35, 84, 60, 18, 79, 17, 4, 78, 1, 20, 64],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LARGEST_SUM_CONTIGUOUS_SUBARRAY_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LARGEST_SUM_CONTIGUOUS_SUBARRAY_2{ static int f_gold ( int a [ ] , int size ) { int max_so_far = a [ 0 ] ; int curr_max = a [ 0 ] ; for ( int i = 1 ; i < size ; i ++ ) { curr_max = Math . max ( a [ i ] , curr_max + a [ i ] ) ; max_so_far = Math . max ( max_so_far , curr_max ) ; } return max_so_far ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,3,4,7,8,8,10,12,16,19,19,20,20,21,21,22,26,27,29,34,36,38,38,39,41,43,44,47,47,49,57,57,60,62,63,65,75,77,77,78,81,82,82,83,83,84,85,98,99}); param0.add(new int[]{-40,14,2,-70,86,-90,-50,-54,-2,90,30}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{60,69,41,7,77,36,36,26,35,30,64,75,3,35,60,71,29,47,15,29,43,88,56,22,9,45,40,50,52}); param0.add(new int[]{-96,-88,-80,-72,-64,-64,-60,-60,-60,-58,-56,-54,-54,-50,-50,-26,-26,-24,-20,-8,-2,0,4,4,12,14,18,18,24,32,42,44,44,44,48,50,50,56,60,60,70,80,88,88,90,98}); param0.add(new int[]{0,1,1,0,0,1,1,1,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,1,0,0,0,1,1,1,0}); param0.add(new int[]{2,4,4,5,6,7,11,12,14,18,23,24,27,28,33,36,37,38,39,40,41,41,48,48,52,61,64,66,66,77,79,82,85,88,91,94,99}); param0.add(new int[]{-56,0,16,12,20,36,32,-52,-68,-36,-96,-46,-34,56,2,78,6,30,-68,-48,2,44,-26,-36,-30,-20,-90,-66,4,94,8,4,-4,-32,-24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{39,87,27,89,26,25,80,82,21,25,55,27,20,81,47,79,26,72,10,11,90,89}); List param1 = new ArrayList<>(); param1.add(38); param1.add(10); param1.add(18); param1.add(25); param1.add(35); param1.add(22); param1.add(34); param1.add(20); param1.add(22); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , size ) : max_so_far = a [ 0 ] curr_max = a [ 0 ] for i in range ( 1 , size ) : curr_max = max ( a [ i ] , curr_max + a [ i ] ) max_so_far = max ( max_so_far , curr_max ) return max_so_far "," using namespace std; int f_gold ( int a [ ], int size ) { int max_so_far = a [ 0 ]; int curr_max = a [ 0 ]; for ( int i = 1; i < size; i ++ ) { curr_max = max ( a [ i ], curr_max + a [ i ] ); max_so_far = max ( max_so_far, curr_max ); } return max_so_far; } int main() { int n_success = 0; vector> param0 {{1,3,4,7,8,8,10,12,16,19,19,20,20,21,21,22,26,27,29,34,36,38,38,39,41,43,44,47,47,49,57,57,60,62,63,65,75,77,77,78,81,82,82,83,83,84,85,98,99},{-40,14,2,-70,86,-90,-50,-54,-2,90,30},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{60,69,41,7,77,36,36,26,35,30,64,75,3,35,60,71,29,47,15,29,43,88,56,22,9,45,40,50,52},{-96,-88,-80,-72,-64,-64,-60,-60,-60,-58,-56,-54,-54,-50,-50,-26,-26,-24,-20,-8,-2,0,4,4,12,14,18,18,24,32,42,44,44,44,48,50,50,56,60,60,70,80,88,88,90,98},{0,1,1,0,0,1,1,1,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,1,0,0,0,1,1,1,0},{2,4,4,5,6,7,11,12,14,18,23,24,27,28,33,36,37,38,39,40,41,41,48,48,52,61,64,66,66,77,79,82,85,88,91,94,99},{-56,0,16,12,20,36,32,-52,-68,-36,-96,-46,-34,56,2,78,6,30,-68,-48,2,44,-26,-36,-30,-20,-90,-66,4,94,8,4,-4,-32,-24},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{39,87,27,89,26,25,80,82,21,25,55,27,20,81,47,79,26,72,10,11,90,89}}; vector param1 {38,10,18,25,35,22,34,20,22,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 3, 4, 7, 8, 8, 10, 12, 16, 19, 19, 20, 20, 21, 21, 22, 26, 27, 29, 34, 36, 38, 38, 39, 41, 43, 44, 47, 47, 49, 57, 57, 60, 62, 63, 65, 75, 77, 77, 78, 81, 82, 82, 83, 83, 84, 85, 98, 99],38,), ([-40, 14, 2, -70, 86, -90, -50, -54, -2, 90, 30],10,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],18,), ([60, 69, 41, 7, 77, 36, 36, 26, 35, 30, 64, 75, 3, 35, 60, 71, 29, 47, 15, 29, 43, 88, 56, 22, 9, 45, 40, 50, 52],25,), ([-96, -88, -80, -72, -64, -64, -60, -60, -60, -58, -56, -54, -54, -50, -50, -26, -26, -24, -20, -8, -2, 0, 4, 4, 12, 14, 18, 18, 24, 32, 42, 44, 44, 44, 48, 50, 50, 56, 60, 60, 70, 80, 88, 88, 90, 98],35,), ([0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0],22,), ([2, 4, 4, 5, 6, 7, 11, 12, 14, 18, 23, 24, 27, 28, 33, 36, 37, 38, 39, 40, 41, 41, 48, 48, 52, 61, 64, 66, 66, 77, 79, 82, 85, 88, 91, 94, 99],34,), ([-56, 0, 16, 12, 20, 36, 32, -52, -68, -36, -96, -46, -34, 56, 2, 78, 6, 30, -68, -48, 2, 44, -26, -36, -30, -20, -90, -66, 4, 94, 8, 4, -4, -32, -24],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([39, 87, 27, 89, 26, 25, 80, 82, 21, 25, 55, 27, 20, 81, 47, 79, 26, 72, 10, 11, 90, 89],21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY_2{ static int f_gold ( int a [ ] , int n ) { Arrays . sort ( a ) ; int num1 = 0 ; int num2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 0 ) num1 = num1 * 10 + a [ i ] ; else num2 = num2 * 10 + a [ i ] ; } return num2 + num1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,16,29,30,38,83}); param0.add(new int[]{58,74,-28,-60,-6,66,-76,46,0,-24,28,-16,-14,24,-94,-56,-80,40,-18,-68,-8,-94,-88,-12,-20,-8}); param0.add(new int[]{0,1}); param0.add(new int[]{7,12,78,8}); param0.add(new int[]{-78,-48,-48,-26,8,34}); param0.add(new int[]{1,1,1,1,0,1,1,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0}); param0.add(new int[]{2,3,5,7,25,30,31,38,42,45,52,53,56,59,60,71,74,76,80,90,91,98}); param0.add(new int[]{40,-62,-2,-58,60,38,48,-4,0,62,-52,-80,56,38,58,-72,32,-26,-14,70,58,-86,-32,56,-40,84,24,60,-46,-32,78,78,-66,20,-32,98,84,44,48,4,54,-66,6,-62,58}); param0.add(new int[]{0,0,0,0,0,0,1,1,1}); param0.add(new int[]{59,9,3,20,83,87,48,4,86,67,89,96,17,36,39,45,99,8,56,92,63,81,7,75,32,10,71,82,97,92,65,23,22,47,70,79,57,81,65,50}); List param1 = new ArrayList<>(); param1.add(5); param1.add(16); param1.add(1); param1.add(3); param1.add(4); param1.add(27); param1.add(13); param1.add(34); param1.add(8); param1.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : a = sorted ( a ) num1 , num2 = 0 , 0 for i in range ( n ) : if i % 2 == 0 : num1 = num1 * 10 + a [ i ] else : num2 = num2 * 10 + a [ i ] return num2 + num1 "," using namespace std; int f_gold ( int a [ ], int n ) { sort ( a, a + n ); int num1 = 0; int num2 = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) num1 = num1 * 10 + a [ i ]; else num2 = num2 * 10 + a [ i ]; } return num2 + num1; } int main() { int n_success = 0; vector> param0 {{4,16,29,30,38,83},{58,74,-28,-60,-6,66,-76,46,0,-24,28,-16,-14,24,-94,-56,-80,40,-18,-68,-8,-94,-88,-12,-20,-8},{0,1},{7,12,78,8},{-78,-48,-48,-26,8,34},{1,1,1,1,0,1,1,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0},{2,3,5,7,25,30,31,38,42,45,52,53,56,59,60,71,74,76,80,90,91,98},{40,-62,-2,-58,60,38,48,-4,0,62,-52,-80,56,38,58,-72,32,-26,-14,70,58,-86,-32,56,-40,84,24,60,-46,-32,78,78,-66,20,-32,98,84,44,48,4,54,-66,6,-62,58},{0,0,0,0,0,0,1,1,1},{59,9,3,20,83,87,48,4,86,67,89,96,17,36,39,45,99,8,56,92,63,81,7,75,32,10,71,82,97,92,65,23,22,47,70,79,57,81,65,50}}; vector param1 {5,16,1,3,4,27,13,34,8,35}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 16, 29, 30, 38, 83],5,), ([58, 74, -28, -60, -6, 66, -76, 46, 0, -24, 28, -16, -14, 24, -94, -56, -80, 40, -18, -68, -8, -94, -88, -12, -20, -8],16,), ([0, 1],1,), ([7, 12, 78, 8],3,), ([-78, -48, -48, -26, 8, 34],4,), ([1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0],27,), ([2, 3, 5, 7, 25, 30, 31, 38, 42, 45, 52, 53, 56, 59, 60, 71, 74, 76, 80, 90, 91, 98],13,), ([40, -62, -2, -58, 60, 38, 48, -4, 0, 62, -52, -80, 56, 38, 58, -72, 32, -26, -14, 70, 58, -86, -32, 56, -40, 84, 24, 60, -46, -32, 78, 78, -66, 20, -32, 98, 84, 44, 48, 4, 54, -66, 6, -62, 58],34,), ([0, 0, 0, 0, 0, 0, 1, 1, 1],8,), ([59, 9, 3, 20, 83, 87, 48, 4, 86, 67, 89, 96, 17, 36, 39, 45, 99, 8, 56, 92, 63, 81, 7, 75, 32, 10, 71, 82, 97, 92, 65, 23, 22, 47, 70, 79, 57, 81, 65, 50],35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC{ static int f_gold ( int x , int y , int p ) { int res = 1 ; x = x % p ; while ( y > 0 ) { if ( ( y & 1 ) == 1 ) res = ( res * x ) % p ; y = y >> 1 ; x = ( x * x ) % p ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(45); param0.add(67); param0.add(26); param0.add(33); param0.add(35); param0.add(68); param0.add(14); param0.add(5); param0.add(23); param0.add(37); List param1 = new ArrayList<>(); param1.add(5); param1.add(25); param1.add(91); param1.add(61); param1.add(8); param1.add(41); param1.add(76); param1.add(89); param1.add(42); param1.add(63); List param2 = new ArrayList<>(); param2.add(68); param2.add(49); param2.add(44); param2.add(9); param2.add(13); param2.add(5); param2.add(20); param2.add(13); param2.add(45); param2.add(56); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y , p ) : res = 1 x = x % p while ( y > 0 ) : if ( ( y & 1 ) == 1 ) : res = ( res * x ) % p y = y >> 1 x = ( x * x ) % p return res "," using namespace std; int f_gold ( int x, unsigned int y, int p ) { int res = 1; x = x % p; while ( y > 0 ) { if ( y & 1 ) res = ( res * x ) % p; y = y >> 1; x = ( x * x ) % p; } return res; } int main() { int n_success = 0; vector param0 {45,67,26,33,35,68,14,5,23,37}; vector param1 {5,25,91,61,8,41,76,89,42,63}; vector param2 {68,49,44,9,13,5,20,13,45,56}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (45,5,68,), (67,25,49,), (26,91,44,), (33,61,9,), (35,8,13,), (68,41,5,), (14,76,20,), (5,89,13,), (23,42,45,), (37,63,56,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER{ static boolean f_gold ( int n ) { boolean parity = false ; while ( n != 0 ) { parity = ! parity ; n = n & ( n - 1 ) ; } return parity ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(63); param0.add(64); param0.add(85); param0.add(36); param0.add(20); param0.add(63); param0.add(42); param0.add(19); param0.add(62); param0.add(97); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : parity = 0 while n : parity = ~ parity n = n & ( n - 1 ) return parity "," using namespace std; bool f_gold ( unsigned int n ) { bool parity = 0; while ( n ) { parity = ! parity; n = n & ( n - 1 ); } return parity; } int main() { int n_success = 0; vector param0 {63,64,85,36,20,63,42,19,62,97}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (63,), (64,), (85,), (36,), (20,), (63,), (42,), (19,), (62,), (97,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_LARGE_NUMBER_DIVISIBLE_11_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_LARGE_NUMBER_DIVISIBLE_11_NOT{ static boolean f_gold ( String str ) { int n = str . length ( ) ; int oddDigSum = 0 , evenDigSum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 0 ) oddDigSum += ( str . charAt ( i ) - '0' ) ; else evenDigSum += ( str . charAt ( i ) - '0' ) ; } return ( ( oddDigSum - evenDigSum ) % 11 == 0 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""r""); param0.add(""7386620""); param0.add(""1010""); param0.add(""rWFOLX VB""); param0.add(""3845847974820""); param0.add(""01001""); param0.add(""yq""); param0.add(""770356""); param0.add(""0000110111001""); param0.add(""tDMrBdHJJITDx""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string str ) { int n = str . length ( ); int oddDigSum = 0, evenDigSum = 0; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) oddDigSum += ( str [ i ] - '0' ); else evenDigSum += ( str [ i ] - '0' ); } return ( ( oddDigSum - evenDigSum ) % 11 == 0 ); } int main() { int n_success = 0; vector param0 {""r"",""7386620"",""1010"",""rWFOLX VB"",""3845847974820"",""01001"",""yq"",""770356"",""0000110111001"",""tDMrBdHJJITDx""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_1{ static int f_gold ( int n ) { int p = 1 ; if ( n > 0 && ( n & ( n - 1 ) ) == 0 ) return n ; while ( p < n ) p <<= 1 ; return p ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(31); param0.add(89); param0.add(92); param0.add(66); param0.add(38); param0.add(34); param0.add(17); param0.add(24); param0.add(54); param0.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : p = 1 if ( n and not ( n & ( n - 1 ) ) ) : return n while ( p < n ) : p <<= 1 return p ; "," 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; } int main() { int n_success = 0; vector param0 {31,89,92,66,38,34,17,24,54,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (31,), (89,), (92,), (66,), (38,), (34,), (17,), (24,), (54,), (20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", K_TH_MISSING_ELEMENT_INCREASING_SEQUENCE_NOT_PRESENT_GIVEN_SEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_MISSING_ELEMENT_INCREASING_SEQUENCE_NOT_PRESENT_GIVEN_SEQUENCE{ static int f_gold ( int a [ ] , int b [ ] , int k , int n1 , int n2 ) { LinkedHashSet < Integer > s = new LinkedHashSet < > ( ) ; for ( int i = 0 ; i < n2 ; i ++ ) s . add ( b [ i ] ) ; int missing = 0 ; for ( int i = 0 ; i < n1 ; i ++ ) { if ( ! s . contains ( a [ i ] ) ) missing ++ ; if ( missing == k ) return a [ i ] ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,9,9,13,38,41,50,59,64,64,72,78,79,80,84,92,94,98,99}); param0.add(new int[]{-54,-80,-62,98,-68,42,98,80,-8,-6,26,0,-60,-24,-74,-48,4,-54,20,32,42,68,-50,58,-50,96,-34,22,56,-60,-10,-18,80,20,-50}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{85,44,60,86,26,22,95,47,43,24,30,37,22,33,6,56}); param0.add(new int[]{-32,-18,2,54,72,92,94}); param0.add(new int[]{1,0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,1,1,1,1,0,0,0,1,0,1,1,1,0,0}); param0.add(new int[]{3,9,13,14,16,19,20,21,23,26,27,27,28,29,31,36,37,38,41,42,45,46,52,56,63,65,70,70,72,72,76,77,78,78,79,82,83,86,87,87,90,93,93,94,96,96,97,98}); param0.add(new int[]{-82,-62}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param0.add(new int[]{26,5,60,53,35}); List param1 = new ArrayList<>(); param1.add(new int[]{5,9,11,21,24,27,30,35,38,39,40,45,48,48,51,58,61,91,92}); param1.add(new int[]{90,-86,-82,92,-42,-34,10,-28,-78,8,66,96,-16,-22,-68,-36,-72,84,-54,-44,-80,-30,64,10,-60,-90,22,54,-88,74,-56,22,-24,-52,82}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param1.add(new int[]{66,76,38,91,57,50,12,21,90,17,18,78,23,12,90,81}); param1.add(new int[]{-76,-68,-34,-24,8,12,32}); param1.add(new int[]{0,0,1,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0,1,0,1,1,0,1,0,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,0}); param1.add(new int[]{2,5,6,7,9,11,11,13,17,18,20,20,26,27,35,35,36,37,41,42,45,46,48,49,50,50,54,54,56,60,62,63,65,67,68,68,70,72,74,74,78,79,80,80,86,89,97,99}); param1.add(new int[]{48,32}); param1.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{41,80,35,14,47}); List param2 = new ArrayList<>(); param2.add(11); param2.add(24); param2.add(15); param2.add(12); param2.add(6); param2.add(29); param2.add(27); param2.add(1); param2.add(10); param2.add(3); List param3 = new ArrayList<>(); param3.add(9); param3.add(24); param3.add(15); param3.add(14); param3.add(3); param3.add(29); param3.add(39); param3.add(1); param3.add(14); param3.add(2); List param4 = new ArrayList<>(); param4.add(18); param4.add(21); param4.add(11); param4.add(10); param4.add(5); param4.add(37); param4.add(28); param4.add(1); param4.add(12); param4.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , k , n1 , n2 ) : s = set ( ) for i in range ( n2 ) : s.add ( b [ i ] ) missing = 0 for i in range ( n1 ) : if a [ i ] not in s : missing += 1 if missing == k : return a [ i ] return - 1 ",,," if __name__ == '__main__': param = [ ([2, 9, 9, 13, 38, 41, 50, 59, 64, 64, 72, 78, 79, 80, 84, 92, 94, 98, 99],[5, 9, 11, 21, 24, 27, 30, 35, 38, 39, 40, 45, 48, 48, 51, 58, 61, 91, 92],11,9,18,), ([-54, -80, -62, 98, -68, 42, 98, 80, -8, -6, 26, 0, -60, -24, -74, -48, 4, -54, 20, 32, 42, 68, -50, 58, -50, 96, -34, 22, 56, -60, -10, -18, 80, 20, -50],[90, -86, -82, 92, -42, -34, 10, -28, -78, 8, 66, 96, -16, -22, -68, -36, -72, 84, -54, -44, -80, -30, 64, 10, -60, -90, 22, 54, -88, 74, -56, 22, -24, -52, 82],24,24,21,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],15,15,11,), ([85, 44, 60, 86, 26, 22, 95, 47, 43, 24, 30, 37, 22, 33, 6, 56],[66, 76, 38, 91, 57, 50, 12, 21, 90, 17, 18, 78, 23, 12, 90, 81],12,14,10,), ([-32, -18, 2, 54, 72, 92, 94],[-76, -68, -34, -24, 8, 12, 32],6,3,5,), ([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0],[0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0],29,29,37,), ([3, 9, 13, 14, 16, 19, 20, 21, 23, 26, 27, 27, 28, 29, 31, 36, 37, 38, 41, 42, 45, 46, 52, 56, 63, 65, 70, 70, 72, 72, 76, 77, 78, 78, 79, 82, 83, 86, 87, 87, 90, 93, 93, 94, 96, 96, 97, 98],[2, 5, 6, 7, 9, 11, 11, 13, 17, 18, 20, 20, 26, 27, 35, 35, 36, 37, 41, 42, 45, 46, 48, 49, 50, 50, 54, 54, 56, 60, 62, 63, 65, 67, 68, 68, 70, 72, 74, 74, 78, 79, 80, 80, 86, 89, 97, 99],27,39,28,), ([-82, -62],[48, 32],1,1,1,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],10,14,12,), ([26, 5, 60, 53, 35],[41, 80, 35, 14, 47],3,2,3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_2{ static int f_gold ( int ar [ ] , int ar_size ) { int i ; int res = 0 ; for ( i = 0 ; i < ar_size ; i ++ ) { res = res ^ ar [ i ] ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,7,10,12,19,20,22,23,25,27,32,33,39,43,44,45,46,47,47,48,49,50,51,55,58,68,69,73,76,77,79,81,84,92,95,99}); param0.add(new int[]{-12,-40,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{86,56,98,58,7,40,84,45,69,77,36,50,72,99,95}); param0.add(new int[]{-90,-68,-66,-66,-58,-54,-52,-48,-40,-30,-26,-24,-20,-14,-10,-8,-6,-6,-6,18,30,34,36,42,50,56,64,68,70,74,92,92,98}); param0.add(new int[]{0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,1,1,0,1,0,1,1,1,1,0,0,1,0,0,0}); param0.add(new int[]{3,21,47,51,78,84,84,85,86,99}); param0.add(new int[]{-26,-72,44,62,-22,22,28,-28,32,-72,72,96,92,-52,-2,-22,-76,-88,-74,-8,-30,54,0,-62,14,-92,-58,72,40,46,96,86,-54,-92,46,92,20,-96,-92,-70,-94,78,-92,-54,-90}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,1,12,81,78,18,81,47,49,19,99,40,52,47,71,69,80,72,66,84,72,6,98,89,3,87,81,85,37,14,5,36,26,74}); List param1 = new ArrayList<>(); param1.add(36); param1.add(2); param1.add(21); param1.add(9); param1.add(26); param1.add(27); param1.add(9); param1.add(33); param1.add(9); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int ar [ ], int ar_size ) { int res = 0; for ( int i = 0; i < ar_size; i ++ ) res = res ^ ar [ i ]; return res; } int main() { int n_success = 0; vector> param0 {{1,1,7,10,12,19,20,22,23,25,27,32,33,39,43,44,45,46,47,47,48,49,50,51,55,58,68,69,73,76,77,79,81,84,92,95,99},{-12,-40,-68},{0,0,0,0,0,0,0,0,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},{86,56,98,58,7,40,84,45,69,77,36,50,72,99,95},{-90,-68,-66,-66,-58,-54,-52,-48,-40,-30,-26,-24,-20,-14,-10,-8,-6,-6,-6,18,30,34,36,42,50,56,64,68,70,74,92,92,98},{0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,1,1,0,1,0,1,1,1,1,0,0,1,0,0,0},{3,21,47,51,78,84,84,85,86,99},{-26,-72,44,62,-22,22,28,-28,32,-72,72,96,92,-52,-2,-22,-76,-88,-74,-8,-30,54,0,-62,14,-92,-58,72,40,46,96,86,-54,-92,46,92,20,-96,-92,-70,-94,78,-92,-54,-90},{0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{69,1,12,81,78,18,81,47,49,19,99,40,52,47,71,69,80,72,66,84,72,6,98,89,3,87,81,85,37,14,5,36,26,74}}; vector param1 {36,2,21,9,26,27,9,33,9,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS{ static int f_gold ( int n ) { int [ ] [ ] arr = new int [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < n ; j ++ ) arr [ i ] [ j ] = Math . abs ( i - j ) ; int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < n ; j ++ ) sum += arr [ i ] [ j ] ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(60); param0.add(44); param0.add(72); param0.add(90); param0.add(99); param0.add(45); param0.add(27); param0.add(11); param0.add(65); param0.add(52); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : arr = [ [ 0 for x in range ( n ) ] for y in range ( n ) ] for i in range ( n ) : for j in range ( n ) : arr [ i ] [ j ] = abs ( i - j ) sum = 0 for i in range ( n ) : for j in range ( n ) : sum += arr [ i ] [ j ] return sum "," using namespace std; int f_gold ( int n ) { int arr [ n ] [ n ]; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) arr [ i ] [ j ] = abs ( i - j ); int sum = 0; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n; j ++ ) sum += arr [ i ] [ j ]; return sum; } int main() { int n_success = 0; vector param0 {60,44,72,90,99,45,27,11,65,52}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (60,), (44,), (72,), (90,), (99,), (45,), (27,), (11,), (65,), (52,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", WRITE_YOU_OWN_POWER_WITHOUT_USING_MULTIPLICATION_AND_DIVISION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_YOU_OWN_POWER_WITHOUT_USING_MULTIPLICATION_AND_DIVISION{ static int f_gold ( int a , int b ) { if ( b == 0 ) return 1 ; int answer = a ; int increment = a ; int i , j ; for ( i = 1 ; i < b ; i ++ ) { for ( j = 1 ; j < a ; j ++ ) { answer += increment ; } increment = answer ; } return answer ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(66); param0.add(82); param0.add(12); param0.add(55); param0.add(34); param0.add(22); param0.add(13); param0.add(57); param0.add(76); param0.add(76); List param1 = new ArrayList<>(); param1.add(4); param1.add(66); param1.add(38); param1.add(33); param1.add(26); param1.add(23); param1.add(98); param1.add(84); param1.add(94); param1.add(95); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b ) : if ( b == 0 ) : return 1 answer = a increment = a for i in range ( 1 , b ) : for j in range ( 1 , a ) : answer += increment increment = answer return answer "," using namespace std; int f_gold ( int a, int b ) { if ( b == 0 ) return 1; int answer = a; int increment = a; int i, j; for ( i = 1; i < b; i ++ ) { for ( j = 1; j < a; j ++ ) { answer += increment; } increment = answer; } return answer; } int main() { int n_success = 0; vector param0 {66,82,12,55,34,22,13,57,76,76}; vector param1 {4,66,38,33,26,23,98,84,94,95}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (66,4,), (82,66,), (12,38,), (55,33,), (34,26,), (22,23,), (13,98,), (57,84,), (76,94,), (76,95,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1_1{ static boolean f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n ) { int i = 0 , j = 0 ; if ( m < n ) return false ; Arrays . sort ( arr1 ) ; Arrays . sort ( arr2 ) ; while ( i < n && j < m ) { if ( arr1 [ j ] < arr2 [ i ] ) j ++ ; else if ( arr1 [ j ] == arr2 [ i ] ) { j ++ ; i ++ ; } else if ( arr1 [ j ] > arr2 [ i ] ) return false ; } if ( i < n ) return false ; else return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96}); param0.add(new int[]{12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-76}); param0.add(new int[]{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}); param0.add(new int[]{94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56}); param0.add(new int[]{-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98}); param0.add(new int[]{1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1}); param0.add(new int[]{6,8,11,13,14,26,26,41,48,70,82,83,84,88,96}); param0.add(new int[]{-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}); List param1 = new ArrayList<>(); param1.add(new int[]{10,13,17,63}); param1.add(new int[]{12, -18, 44}); param1.add(new int[]{0,0,0}); param1.add(new int[]{80,58,32,2}); param1.add(new int[]{-99,-90,-90,-86}); param1.add(new int[]{0,0,1,1}); param1.add(new int[]{1,9,12,16}); param1.add(new int[]{-76,-54,4,78}); param1.add(new int[]{0,1,0,1}); param1.add(new int[]{93,5,9,13}); List param2 = new ArrayList<>(); param2.add(29); param2.add(46); param2.add(34); param2.add(17); param2.add(23); param2.add(10); param2.add(10); param2.add(27); param2.add(10); param2.add(19); List param3 = new ArrayList<>(); param3.add(4); param3.add(3); param3.add(3); param3.add(4); param3.add(4); param3.add(4); param3.add(4); param3.add(4); param3.add(4); param3.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr1 , arr2 , m , n ) : i = 0 j = 0 if m < n : return 0 arr1.sort ( ) arr2.sort ( ) while i < n and j < m : if arr1 [ j ] < arr2 [ i ] : j += 1 elif arr1 [ j ] == arr2 [ i ] : j += 1 i += 1 elif arr1 [ j ] > arr2 [ i ] : return 0 return False if i < n else True "," using namespace std; bool f_gold ( int arr1 [ ], int arr2 [ ], int m, int n ) { int i = 0, j = 0; if ( m < n ) return 0; sort ( arr1, arr1 + m ); sort ( arr2, arr2 + n ); while ( i < n && j < m ) { if ( arr1 [ j ] < arr2 [ i ] ) j ++; else if ( arr1 [ j ] == arr2 [ i ] ) { j ++; i ++; } else if ( arr1 [ j ] > arr2 [ i ] ) return 0; } return ( i < n ) ? false : true; } int main() { int n_success = 0; vector> param0 {{7,10,10,10,13,17,23,24,25,28,30,33,37,49,49,50,57,60,60,63,63,64,65,65,72,81,84,85,85,94,96},{12,30,-94,-92,-62,-18,-56,44,-50,-92,6,2,56,-90,0,0,18,86,-58,58,-54,62,-94,94,0,8,82,-68,-88,-18,8,-80,-42,18,62,-8,56,-76,-42,56,44,-2,-20,62,-14,74,-86,-76},{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},{94,26,32,20,46,55,9,51,57,80,45,38,68,12,90,10,80,65,12,52,51,86,64,57,93,19,30,92,85,82,24,26,36,56},{-98,-90,-86,-86,-84,-84,-82,-80,-78,-72,-70,-68,-66,-64,-52,-52,-50,-38,-28,-26,-24,-14,-8,16,26,26,28,34,36,40,42,44,44,46,50,60,68,78,80,86,90,92,98},{1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1},{6,8,11,13,14,26,26,41,48,70,82,83,84,88,96},{-88,80,62,76,48,92,18,-94,-62,98,-46,-50,70,32,68,-54,26,16,94,0,-84,2,-16,88,26,-38,18,64,90,80,76,2,14,-90,50,4,76,30},{0,0,0,0,0,1,1,1,1,1,1,1},{54,44,97,92,13,54,27,8,43,70,77,84,55,64,5,59,27,19,65,68,66,26,33,38,7}}; vector> param1 { {10,13,17,63}, {12, -18, 44}, {0,0,0}, {80,58,32,2}, {-99,-90,-90,-86}, {0,0,1,1}, {1,9,12,16}, {-76,-54,4,78}, {0,1,0,1}, {93,5,9,13}}; vector param2 {29,46,34,17,23,10,10,27,10,19}; vector param3 {4,3,3,4,4,4,4,4,4,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([7, 10, 10, 10, 13, 17, 23, 24, 25, 28, 30, 33, 37, 49, 49, 50, 57, 60, 60, 63, 63, 64, 65, 65, 72, 81, 84, 85, 85, 94, 96], [10,13,17,63],29,4,), ([12, 30, -94, -92, -62, -18, -56, 44, -50, -92, 6, 2, 56, -90, 0, 0, 18, 86, -58, 58, -54, 62, -94, 94, 0, 8, 82, -68, -88, -18, 8, -80, -42, 18, 62, -8, 56, -76, -42, 56, 44, -2, -20, 62, -14, 74, -86, -76], [12, -18, 44],46,3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0,0,0],34,3,), ([94, 26, 32, 20, 46, 55, 9, 51, 57, 80, 45, 38, 68, 12, 90, 10, 80, 65, 12, 52, 51, 86, 64, 57, 93, 19, 30, 92, 85, 82, 24, 26, 36, 56], [80,58,32,2],17,4,), ([-98, -90, -86, -86, -84, -84, -82, -80, -78, -72, -70, -68, -66, -64, -52, -52, -50, -38, -28, -26, -24, -14, -8, 16, 26, 26, 28, 34, 36, 40, 42, 44, 44, 46, 50, 60, 68, 78, 80, 86, 90, 92, 98], [-99,-90,-90,-86],23,4,), ([1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1], [0,0,1,1],10,4,), ([6, 8, 11, 13, 14, 26, 26, 41, 48, 70, 82, 83, 84, 88, 96], [1,9,12,16],10,4,), ([-88, 80, 62, 76, 48, 92, 18, -94, -62, 98, -46, -50, 70, 32, 68, -54, 26, 16, 94, 0, -84, 2, -16, 88, 26, -38, 18, 64, 90, 80, 76, 2, 14, -90, 50, 4, 76, 30], [-76,-54,4,78],27,4,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0,1,0,1],10,4,), ([54, 44, 97, 92, 13, 54, 27, 8, 43, 70, 77, 84, 55, 64, 5, 59, 27, 19, 65, 68, 66, 26, 33, 38, 7], [93,5,9,13],19,4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SORT_EVEN_PLACED_ELEMENTS_INCREASING_ODD_PLACED_DECREASING_ORDER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SPLIT_ARRAY_ADD_FIRST_PART_END{ public static void f_gold ( int arr [ ] , int n , int k ) { for ( int i = 0 ; i < k ; i ++ ) { int x = arr [ 0 ] ; for ( int j = 0 ; j < n - 1 ; ++ j ) arr [ j ] = arr [ j + 1 ] ; arr [ n - 1 ] = x ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{75}); param0.add(new int[]{-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}); param0.add(new int[]{-88,-72,-64,-46,-40,-16,-8,0,22,34,44}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}); param0.add(new int[]{8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}); param0.add(new int[]{-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}); param0.add(new int[]{0,0,0,0,1,1,1,1,1}); param0.add(new int[]{80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}); List param1 = new ArrayList<>(); param1.add(0); param1.add(27); param1.add(7); param1.add(23); param1.add(6); param1.add(23); param1.add(21); param1.add(23); param1.add(5); param1.add(9); List param2 = new ArrayList<>(); param2.add(0); param2.add(17); param2.add(7); param2.add(24); param2.add(6); param2.add(30); param2.add(20); param2.add(13); param2.add(8); param2.add(7); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{75}); filled_function_param0.add(new int[]{-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}); filled_function_param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); filled_function_param0.add(new int[]{45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}); filled_function_param0.add(new int[]{-88,-72,-64,-46,-40,-16,-8,0,22,34,44}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}); filled_function_param0.add(new int[]{8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}); filled_function_param0.add(new int[]{-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}); filled_function_param0.add(new int[]{0,0,0,0,1,1,1,1,1}); filled_function_param0.add(new int[]{80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(0); filled_function_param1.add(27); filled_function_param1.add(7); filled_function_param1.add(23); filled_function_param1.add(6); filled_function_param1.add(23); filled_function_param1.add(21); filled_function_param1.add(23); filled_function_param1.add(5); filled_function_param1.add(9); List filled_function_param2 = new ArrayList<>(); filled_function_param2.add(0); filled_function_param2.add(17); filled_function_param2.add(7); filled_function_param2.add(24); filled_function_param2.add(6); filled_function_param2.add(30); filled_function_param2.add(20); filled_function_param2.add(13); filled_function_param2.add(8); filled_function_param2.add(7); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : evenArr = [ ] oddArr = [ ] for i in range ( n ) : if ( ( i % 2 ) == 0 ) : evenArr.append ( arr [ i ] ) else : oddArr.append ( arr [ i ] ) evenArr = sorted ( evenArr ) oddArr = sorted ( oddArr ) oddArr = oddArr [ : : - 1 ] i = 0 for j in range ( len ( evenArr ) ) : arr [ i ] = evenArr [ j ] i += 1 for j in range ( len ( oddArr ) ) : arr [ i ] = oddArr [ j ] i += 1 "," using namespace std; void f_gold ( int arr [ ], int n ) { vector < int > evenArr; vector < int > oddArr; for ( int i = 0; i < n; i ++ ) { if ( ! ( i % 2 ) ) evenArr . push_back ( arr [ i ] ); else oddArr . push_back ( arr [ i ] ); } sort ( evenArr . begin ( ), evenArr . end ( ) ); sort ( oddArr . begin ( ), oddArr . end ( ), greater < int > ( ) ); int i = 0; for ( int j = 0; j < evenArr . size ( ); j ++ ) arr [ i ++ ] = evenArr [ j ]; for ( int j = 0; j < oddArr . size ( ); j ++ ) arr [ i ++ ] = oddArr [ j ]; } int main() { int n_success = 0; vector> param0 {{6,6,6,10,15,21,38,50,51,72,79,81,82,84,85,86,87},{82,-36,18,-88,-24,20,26,-52,28,2},{0,0,0,1,1,1},{81,47,38,70,35,43,94,30,57,55,78,97,72,1},{-80,-78,-72,-46,-26,-24,-20,8,16,26,38,44,54,68,68,78,86,92},{0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0},{3,4,9,12,20,30,33,34,37,38,50,51,52,54,60,69,73,74,92,93,94,97,98},{86,-32,64,-36,-36,-30,-66,-60,-76,-56,-60,-16,-60,-98,-18,72,-14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{61,11,46,40,82,35,37,41,52,76,13,53,53,3,40,29,7,51,20,51,87,1,80,73,89,93,1,71,33,50,62,85,46,1,71,54,81,85}}; vector param1 {15,7,3,8,11,21,13,10,29,36}; vector> filled_function_param0 {{6,6,6,10,15,21,38,50,51,72,79,81,82,84,85,86,87},{82,-36,18,-88,-24,20,26,-52,28,2},{0,0,0,1,1,1},{81,47,38,70,35,43,94,30,57,55,78,97,72,1},{-80,-78,-72,-46,-26,-24,-20,8,16,26,38,44,54,68,68,78,86,92},{0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0},{3,4,9,12,20,30,33,34,37,38,50,51,52,54,60,69,73,74,92,93,94,97,98},{86,-32,64,-36,-36,-30,-66,-60,-76,-56,-60,-16,-60,-98,-18,72,-14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{61,11,46,40,82,35,37,41,52,76,13,53,53,3,40,29,7,51,20,51,87,1,80,73,89,93,1,71,33,50,62,85,46,1,71,54,81,85}}; vector filled_function_param1 {15,7,3,8,11,21,13,10,29,36}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([6, 6, 6, 10, 15, 21, 38, 50, 51, 72, 79, 81, 82, 84, 85, 86, 87],15,), ([82, -36, 18, -88, -24, 20, 26, -52, 28, 2],7,), ([0, 0, 0, 1, 1, 1],3,), ([81, 47, 38, 70, 35, 43, 94, 30, 57, 55, 78, 97, 72, 1],8,), ([-80, -78, -72, -46, -26, -24, -20, 8, 16, 26, 38, 44, 54, 68, 68, 78, 86, 92],11,), ([0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0],21,), ([3, 4, 9, 12, 20, 30, 33, 34, 37, 38, 50, 51, 52, 54, 60, 69, 73, 74, 92, 93, 94, 97, 98],13,), ([86, -32, 64, -36, -36, -30, -66, -60, -76, -56, -60, -16, -60, -98, -18, 72, -14],10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,), ([61, 11, 46, 40, 82, 35, 37, 41, 52, 76, 13, 53, 53, 3, 40, 29, 7, 51, 20, 51, 87, 1, 80, 73, 89, 93, 1, 71, 33, 50, 62, 85, 46, 1, 71, 54, 81, 85],36,) ] filled_function_param = [ ([6, 6, 6, 10, 15, 21, 38, 50, 51, 72, 79, 81, 82, 84, 85, 86, 87],15,), ([82, -36, 18, -88, -24, 20, 26, -52, 28, 2],7,), ([0, 0, 0, 1, 1, 1],3,), ([81, 47, 38, 70, 35, 43, 94, 30, 57, 55, 78, 97, 72, 1],8,), ([-80, -78, -72, -46, -26, -24, -20, 8, 16, 26, 38, 44, 54, 68, 68, 78, 86, 92],11,), ([0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0],21,), ([3, 4, 9, 12, 20, 30, 33, 34, 37, 38, 50, 51, 52, 54, 60, 69, 73, 74, 92, 93, 94, 97, 98],13,), ([86, -32, 64, -36, -36, -30, -66, -60, -76, -56, -60, -16, -60, -98, -18, 72, -14],10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,), ([61, 11, 46, 40, 82, 35, 37, 41, 52, 76, 13, 53, 53, 3, 40, 29, 7, 51, 20, 51, 87, 1, 80, 73, 89, 93, 1, 71, 33, 50, 62, 85, 46, 1, 71, 54, 81, 85],36,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1{ static boolean f_gold ( int x , int y ) { int res1 = ( int ) Math . log ( y ) / ( int ) Math . log ( x ) ; double res2 = Math . log ( y ) / Math . log ( x ) ; return ( res1 == res2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(3); param0.add(10); param0.add(10); param0.add(6); param0.add(2); param0.add(2); param0.add(20); param0.add(96); param0.add(25); List param1 = new ArrayList<>(); param1.add(1); param1.add(9); param1.add(101); param1.add(10000); param1.add(46656); param1.add(2048); param1.add(40); param1.add(79); param1.add(98); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( x , y ) : res1 = math.log ( y ) / math.log ( x ) ; res2 = math.log ( y ) / math.log ( x ) ; return 1 if ( res1 == res2 ) else 0 ; "," using namespace std; bool f_gold ( int x, int y ) { int res1 = log ( y ) / log ( x ); double res2 = log ( y ) / log ( x ); return ( res1 == res2 ); } int main() { int n_success = 0; vector param0 {57,3,10,10,6,2,2,20,96,25}; vector param1 {1,9,101,10000,46656,2048,40,79,98,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,1,), (3,9,), (10,101,), (10,10000,), (6,46656,), (2,2048,), (2,40,), (20,79,), (96,98,), (25,5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", POLICEMEN_CATCH_THIEVES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class POLICEMEN_CATCH_THIEVES{ static int f_gold ( char arr [ ] , int n , int k ) { int res = 0 ; ArrayList < Integer > thi = new ArrayList < Integer > ( ) ; ArrayList < Integer > pol = new ArrayList < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == 'P' ) pol . add ( i ) ; else if ( arr [ i ] == 'T' ) thi . add ( i ) ; } int l = 0 , r = 0 ; while ( l < thi . size ( ) && r < pol . size ( ) ) { if ( Math . abs ( thi . get ( l ) - pol . get ( r ) ) <= k ) { res ++ ; l ++ ; r ++ ; } else if ( thi . get ( l ) < pol . get ( r ) ) l ++ ; else r ++ ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new char[]{'A','B','B','D','E','E','F','G','G','G','I','J','O','P','Q','Q','Q','Q','R','R','S','U','X','Y','Y','c','d','h','i','i','i','i','k','k','l','l','l','l','m','p','r','r','s','t','t','u','x','z'}); param0.add(new char[]{'7','6','0','1','0','1'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'y','k','S','i','s','r','i','z','y','f','E','U','y','G','f','f','s','v','v','D','v','V','S','D','K','S','f','V','g','I','J','p','j','k','R','n','m','O','L','X','y','U','y','k','w'}); param0.add(new char[]{'1','1','5','8','8'}); param0.add(new char[]{'0','1','0','0','1','1','1','0','0','0','1','0','1','0','1','0','0','0','0','0','1','0','0','0','0','1','1','1','0','0','0','0','0','0'}); param0.add(new char[]{'A','I','K','Q','Q','X','Z','f','g'}); param0.add(new char[]{'7','0','6','9','7','5','1','3','9','8','0','0','1','3','9','2','5','5','2','7','9','3','3','9','3','8','5','5','0','4','6','2','7','4','0','4','6','4','2','3'}); param0.add(new char[]{'0','0','0','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'D','C','P','H','G','o','u','P','T','G','E','U','n','E','U'}); List param1 = new ArrayList<>(); param1.add(33); param1.add(3); param1.add(9); param1.add(24); param1.add(2); param1.add(23); param1.add(5); param1.add(35); param1.add(8); param1.add(11); List param2 = new ArrayList<>(); param2.add(45); param2.add(3); param2.add(10); param2.add(44); param2.add(2); param2.add(18); param2.add(8); param2.add(28); param2.add(10); param2.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : i = 0 l = 0 r = 0 res = 0 thi = [ ] pol = [ ] while i < n : if arr [ i ] == 'P' : pol.append ( i ) elif arr [ i ] == 'T' : thi.append ( i ) i += 1 while l < len ( thi ) and r < len ( pol ) : if ( abs ( thi [ l ] - pol [ r ] ) <= k ) : res += 1 l += 1 r += 1 elif thi [ l ] < pol [ r ] : l += 1 else : r += 1 return res "," using namespace std; int f_gold ( char arr [ ], int n, int k ) { int res = 0; vector < int > thi; vector < int > pol; for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] == 'P' ) pol . push_back ( i ); else if ( arr [ i ] == 'T' ) thi . push_back ( i ); } int l = 0, r = 0; while ( l < thi . size ( ) && r < pol . size ( ) ) { if ( abs ( thi [ l ] - pol [ r ] ) <= k ) { res ++; l ++; r ++; } else if ( thi [ l ] < pol [ r ] ) l ++; else r ++; } return res; } int main() { int n_success = 0; vector> param0 {{'A','B','B','D','E','E','F','G','G','G','I','J','O','P','Q','Q','Q','Q','R','R','S','U','X','Y','Y','c','d','h','i','i','i','i','k','k','l','l','l','l','m','p','r','r','s','t','t','u','x','z'},{'7','6','0','1','0','1'},{'0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1'},{'y','k','S','i','s','r','i','z','y','f','E','U','y','G','f','f','s','v','v','D','v','V','S','D','K','S','f','V','g','I','J','p','j','k','R','n','m','O','L','X','y','U','y','k','w'},{'1','1','5','8','8'},{'0','1','0','0','1','1','1','0','0','0','1','0','1','0','1','0','0','0','0','0','1','0','0','0','0','1','1','1','0','0','0','0','0','0'},{'A','I','K','Q','Q','X','Z','f','g'},{'7','0','6','9','7','5','1','3','9','8','0','0','1','3','9','2','5','5','2','7','9','3','3','9','3','8','5','5','0','4','6','2','7','4','0','4','6','4','2','3'},{'0','0','0','1','1','1','1','1','1','1','1'},{'D','C','P','H','G','o','u','P','T','G','E','U','n','E','U'}}; vector param1 {33,3,9,24,2,23,5,35,8,11}; vector param2 {45,3,10,44,2,18,8,28,10,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (['A', 'B', 'B', 'D', 'E', 'E', 'F', 'G', 'G', 'G', 'I', 'J', 'O', 'P', 'Q', 'Q', 'Q', 'Q', 'R', 'R', 'S', 'U', 'X', 'Y', 'Y', 'c', 'd', 'h', 'i', 'i', 'i', 'i', 'k', 'k', 'l', 'l', 'l', 'l', 'm', 'p', 'r', 'r', 's', 't', 't', 'u', 'x', 'z'],33,45,), (['7', '6', '0', '1', '0', '1'],3,3,), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1'],9,10,), (['y', 'k', 'S', 'i', 's', 'r', 'i', 'z', 'y', 'f', 'E', 'U', 'y', 'G', 'f', 'f', 's', 'v', 'v', 'D', 'v', 'V', 'S', 'D', 'K', 'S', 'f', 'V', 'g', 'I', 'J', 'p', 'j', 'k', 'R', 'n', 'm', 'O', 'L', 'X', 'y', 'U', 'y', 'k', 'w'],24,44,), (['1', '1', '5', '8', '8'],2,2,), (['0', '1', '0', '0', '1', '1', '1', '0', '0', '0', '1', '0', '1', '0', '1', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0'],23,18,), (['A', 'I', 'K', 'Q', 'Q', 'X', 'Z', 'f', 'g'],5,8,), (['7', '0', '6', '9', '7', '5', '1', '3', '9', '8', '0', '0', '1', '3', '9', '2', '5', '5', '2', '7', '9', '3', '3', '9', '3', '8', '5', '5', '0', '4', '6', '2', '7', '4', '0', '4', '6', '4', '2', '3'],35,28,), (['0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1'],8,10,), (['D', 'C', 'P', 'H', 'G', 'o', 'u', 'P', 'T', 'G', 'E', 'U', 'n', 'E', 'U'],11,12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1{ static int f_gold ( int n ) { if ( n == 2 || n == 3 ) return ( n - 1 ) ; int res = 1 ; while ( n > 4 ) { n -= 3 ; res *= 3 ; } return ( n * res ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(62); param0.add(53); param0.add(8); param0.add(6); param0.add(35); param0.add(35); param0.add(46); param0.add(74); param0.add(69); param0.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): if (n == 2 or n == 3): return (n - 1) res = 1 while (n > 4): n -= 3 res *= 3 return (n * res) "," using namespace std; int f_gold ( int n ) { if ( n == 2 || n == 3 ) return ( n - 1 ); int res = 1; while ( n > 4 ) { n -= 3; res *= 3; } return ( n * res ); } int main() { int n_success = 0; vector param0 {62,53,8,6,35,35,46,74,69,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (62,), (53,), (8,), (6,), (35,), (35,), (46,), (74,), (69,), (3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING{ static char f_gold ( String str ) { int len = str . length ( ) ; int count = 0 ; char res = str . charAt ( 0 ) ; for ( int i = 0 ; i < len ; i ++ ) { int cur_count = 1 ; for ( int j = i + 1 ; j < len ; j ++ ) { if ( str . charAt ( i ) != str . charAt ( j ) ) break ; cur_count ++ ; } if ( cur_count > count ) { count = cur_count ; res = str . charAt ( i ) ; } } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""geeekk""); param0.add(""3786868""); param0.add(""110""); param0.add(""aaaabbcbbb""); param0.add(""11""); param0.add(""011101""); param0.add(""WoHNyJYLC""); param0.add(""3141711779""); param0.add(""10111101101""); param0.add(""aabbabababcc""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : l = len ( str ) count = 0 res = str [ 0 ] for i in range ( l ) : cur_count = 1 for j in range ( i + 1 , l ) : if ( str [ i ] != str [ j ] ) : break cur_count += 1 if cur_count > count : count = cur_count res = str [ i ] return res "," using namespace std; char f_gold ( string str ) { int len = str . length ( ); int count = 0; char res = str [ 0 ]; for ( int i = 0; i < len; i ++ ) { int cur_count = 1; for ( int j = i + 1; j < len; j ++ ) { if ( str [ i ] != str [ j ] ) break; cur_count ++; } if ( cur_count > count ) { count = cur_count; res = str [ i ]; } } return res; } int main() { int n_success = 0; vector param0 {""geeekk"",""3786868"",""110"",""aaaabbcbbb"",""11"",""011101"",""WoHNyJYLC"",""3141711779"",""10111101101"",""aabbabababcc""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('geeekk',), ('3786868',), ('110',), ('aaaabbcbbb',), ('11',), ('011101',), ('WoHNyJYLC',), ('3141711779',), ('10111101101',), ('aabbabababcc',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NEGATIVE_NUMBERS_IN_A_COLUMN_WISE_ROW_WISE_SORTED_MATRIX{ static int f_gold ( int M [ ] [ ] , int n , int m ) { int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( M [ i ] [ j ] < 0 ) count += 1 ; else break ; } } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{31,92,57,28,79,84,92,19,31,71,91,46,60,79,82,4,70,82,41,79,80,29,26,76,92,18,94,55,46,69,67,60,85,25,11},new int[]{58,69,14,55,6,69,81,60,38,52,81,80,1,47,42,82,2,70,68,71,50,98,84,1,45,24,49,33,56,4,60,42,14,45,13},new int[]{28,92,91,71,75,97,30,9,76,94,55,84,76,38,32,7,73,49,37,76,41,3,89,56,71,99,71,25,94,37,43,9,89,55,55},new int[]{77,31,94,14,2,88,64,71,57,18,81,51,66,82,16,46,15,28,48,54,49,34,80,12,26,64,41,46,32,87,18,12,38,28,88},new int[]{84,93,86,10,92,89,62,65,33,66,92,52,28,49,98,37,49,91,42,64,43,12,83,61,51,11,80,35,28,50,35,1,31,81,77},new int[]{22,30,43,76,37,59,48,82,40,2,66,58,7,13,38,73,14,28,55,52,28,10,98,93,97,27,1,50,80,83,11,82,80,7,38},new int[]{54,30,50,31,57,2,73,56,24,35,85,99,28,51,83,86,82,30,72,98,40,81,15,5,18,76,62,5,50,37,99,46,31,16,66},new int[]{52,62,92,37,29,66,66,98,1,56,60,85,43,98,46,34,21,71,28,84,92,93,58,79,3,37,76,14,63,33,46,8,2,56,31},new int[]{70,69,43,26,58,80,60,28,24,79,42,80,16,52,17,93,25,16,77,35,39,16,77,19,45,27,96,44,30,88,76,6,18,2,33},new int[]{1,6,28,49,25,25,14,31,5,60,78,45,20,88,9,80,72,46,75,90,26,11,25,77,22,39,83,65,95,64,78,86,23,48,20},new int[]{98,5,39,62,57,87,52,68,32,98,90,99,67,81,94,96,15,44,13,17,47,35,84,14,23,69,5,96,42,42,65,60,10,10,88},new int[]{4,91,15,32,39,40,39,26,25,26,35,22,5,46,72,27,44,23,49,67,9,17,64,74,68,84,94,76,22,22,30,29,26,63,51},new int[]{10,53,32,7,39,74,91,85,79,47,47,11,54,51,43,75,19,74,33,27,15,29,96,96,87,83,62,32,79,62,43,62,97,87,16},new int[]{11,15,6,98,56,59,40,13,99,53,48,46,99,16,59,58,21,57,89,63,67,50,71,98,10,49,78,39,5,64,9,7,60,86,83},new int[]{94,9,64,64,80,70,1,77,15,64,69,43,40,56,82,28,15,92,40,38,61,74,32,1,95,30,5,43,1,8,57,5,5,97,54},new int[]{79,58,95,22,97,60,97,87,35,14,58,59,86,89,57,33,1,71,16,48,77,69,6,99,74,96,79,98,65,86,32,45,61,49,36},new int[]{19,37,45,27,48,21,83,82,96,85,83,54,37,22,38,43,45,28,84,91,38,16,58,46,48,20,61,8,90,66,42,47,65,60,15},new int[]{48,19,73,34,64,86,86,4,50,81,67,14,28,49,83,56,97,24,38,84,39,82,1,14,7,32,90,7,7,47,85,55,96,87,83},new int[]{70,68,59,18,72,95,7,62,53,22,82,64,72,3,24,52,26,41,30,19,47,55,13,10,69,54,93,42,44,49,72,18,29,70,85},new int[]{96,40,94,49,87,60,26,23,86,18,72,90,32,11,48,47,94,96,98,59,11,19,27,49,62,29,23,22,1,88,54,41,39,76,44},new int[]{45,99,44,67,5,80,36,33,89,52,2,49,74,36,7,14,57,67,62,97,22,92,44,2,65,67,58,91,56,84,53,49,11,13,24},new int[]{69,81,60,52,34,72,33,56,28,17,3,62,7,78,40,19,95,42,49,77,90,42,22,1,60,92,65,28,11,83,19,59,52,45,26},new int[]{23,17,21,54,31,32,81,15,13,65,62,16,21,70,6,84,5,91,37,20,89,73,3,65,86,24,27,11,98,92,54,23,9,1,90},new int[]{53,67,14,42,52,55,52,86,99,43,74,48,71,55,85,87,73,41,55,52,83,67,78,14,15,27,83,28,65,35,45,33,59,13,34},new int[]{29,4,17,82,11,18,95,71,10,34,79,43,45,58,9,26,84,9,49,6,63,41,43,75,35,54,55,18,81,55,2,53,1,67,87},new int[]{98,3,18,56,33,97,20,90,38,80,83,80,18,94,11,43,60,85,30,2,89,85,32,35,62,32,93,71,62,93,24,33,86,21,32},new int[]{38,45,16,40,18,67,71,49,46,98,64,83,35,78,40,86,28,66,77,24,31,10,82,1,31,9,47,39,84,51,1,6,32,4,63},new int[]{85,48,64,11,29,77,59,1,99,17,17,38,49,78,82,50,87,75,18,75,73,98,17,27,51,4,98,96,6,74,5,47,52,47,75},new int[]{36,68,16,99,38,84,45,71,71,36,3,97,69,15,48,77,6,4,33,36,67,65,52,55,37,35,76,69,98,84,62,5,80,15,36},new int[]{67,84,38,44,5,66,58,57,67,75,61,66,60,2,66,50,6,83,91,86,67,99,1,32,71,91,52,29,51,73,23,32,4,75,25},new int[]{24,94,50,60,28,73,99,1,10,37,54,96,56,46,19,9,57,78,19,70,76,25,14,87,13,22,63,73,97,3,19,39,16,36,22},new int[]{92,41,48,68,30,72,1,76,98,58,57,61,32,11,58,29,80,86,22,94,50,66,78,22,91,56,91,82,61,67,12,18,46,99,69},new int[]{49,64,35,55,67,78,11,71,12,98,10,9,82,35,61,40,29,10,83,11,63,16,97,97,96,91,30,97,21,91,32,61,27,33,35},new int[]{29,58,88,23,96,94,1,55,79,30,87,83,5,70,25,62,14,67,29,22,84,2,25,75,11,57,89,65,80,82,36,28,45,44,4},new int[]{70,94,49,13,26,24,42,24,58,83,41,6,50,78,22,12,21,84,70,28,44,51,78,75,9,70,37,23,60,25,68,97,49,17,27}}); param0.add(new int[][]{new int[]{22,49,27,1,69,48,44,18,89,36,93,10,67,18,7,62,55,3,84,76,49,57},new int[]{59,6,37,2,33,16,20,60,69,98,92,2,70,12,99,57,32,92,64,92,68,62},new int[]{41,89,70,69,62,88,52,23,8,37,77,87,54,44,87,32,53,29,38,80,68,32},new int[]{63,77,82,97,7,56,2,68,44,52,40,8,71,50,26,62,18,61,12,20,1,76},new int[]{44,47,86,67,53,27,80,57,53,74,7,11,86,58,7,55,30,57,23,97,38,33},new int[]{48,84,9,77,60,53,41,15,99,30,90,36,89,64,78,63,51,51,22,17,72,50},new int[]{14,56,77,30,59,64,26,22,86,92,80,88,63,46,81,3,81,64,14,72,14,77},new int[]{36,48,97,59,34,64,11,24,41,30,37,66,33,98,60,27,76,90,48,10,90,41},new int[]{76,54,4,86,40,31,85,51,38,72,28,12,35,99,78,12,13,49,34,33,21,83},new int[]{37,15,61,52,17,81,90,44,16,13,2,92,88,84,18,99,10,71,82,33,75,44},new int[]{40,49,88,11,67,52,39,2,92,49,52,31,77,97,51,31,66,98,66,37,25,62},new int[]{99,9,6,66,15,61,15,58,33,62,80,65,59,1,79,54,78,51,97,19,83,59},new int[]{3,76,87,47,71,66,86,18,79,62,44,67,5,82,94,27,48,2,88,34,55,46},new int[]{38,66,48,93,40,7,6,14,82,56,83,2,8,58,21,26,90,10,85,3,8,78},new int[]{54,43,93,86,42,41,87,70,67,60,90,78,66,42,30,57,76,2,30,24,12,49},new int[]{12,5,75,55,17,62,87,21,91,88,10,20,49,46,79,51,33,94,59,48,97,70},new int[]{49,75,21,53,2,92,14,80,92,40,84,67,39,48,53,49,68,57,14,58,97,9},new int[]{45,23,2,43,89,62,28,46,74,38,70,84,67,22,62,86,72,24,39,5,64,43},new int[]{28,93,44,61,47,23,52,97,62,31,98,1,63,7,86,46,66,61,24,14,15,62},new int[]{60,58,17,60,19,91,78,22,56,84,99,91,42,55,30,83,84,42,86,73,76,53},new int[]{95,93,92,53,56,72,31,67,4,61,39,88,64,94,48,88,23,54,37,10,18,67},new int[]{97,70,9,43,34,94,43,71,13,81,56,73,85,54,35,89,45,18,8,54,70,36}}); param0.add(new int[][]{new int[]{54,62,19,8,61,82,54,69,91,14,56,78,22,81,38,47},new int[]{22,25,33,85,89,78,7,42,24,24,24,74,89,83,23,1},new int[]{79,9,51,67,71,49,87,45,81,2,4,50,16,71,91,44},new int[]{77,99,85,40,90,45,3,54,39,69,40,88,81,41,84,24},new int[]{84,24,42,18,51,45,16,97,97,64,56,35,9,33,37,97},new int[]{61,55,53,21,5,1,71,23,87,71,59,83,27,77,9,9},new int[]{60,42,94,10,69,95,98,38,54,64,17,71,83,38,60,38},new int[]{2,45,33,60,92,31,55,48,31,19,79,9,81,47,4,38},new int[]{68,16,10,37,43,45,10,93,47,99,74,88,79,85,2,27},new int[]{69,72,66,74,32,60,90,70,88,68,15,72,65,35,87,75},new int[]{49,36,73,88,81,8,78,65,98,35,5,5,46,53,39,92},new int[]{5,39,16,95,34,59,36,19,80,5,69,39,26,45,15,11},new int[]{14,95,52,74,90,61,75,19,71,69,37,45,8,71,49,26},new int[]{71,95,22,95,95,48,53,75,96,68,82,99,9,15,4,54},new int[]{26,94,94,81,47,4,22,74,41,98,98,11,89,77,7,65},new int[]{47,37,49,52,68,83,51,70,32,47,60,93,61,10,21,42}}); param0.add(new int[][]{new int[]{39,79,41,68,91,31,87,47,16,92,42,68,79,59,17,45,68,78,99,19,51},new int[]{43,46,81,76,18,20,62,54,42,52,8,66,3,79,60,12,50,87,88,70,11},new int[]{49,2,91,98,51,74,47,72,32,42,92,52,98,89,9,91,86,38,78,89,42},new int[]{45,76,87,45,3,88,56,16,16,59,78,40,9,7,55,69,58,39,64,2,32},new int[]{65,45,40,81,13,71,33,46,27,47,92,5,9,75,80,2,90,50,40,4,1},new int[]{99,5,44,17,65,99,27,27,5,1,87,95,78,27,4,40,57,79,82,46,33},new int[]{99,3,6,49,52,24,66,91,66,84,92,96,48,24,81,69,46,58,16,49,83},new int[]{2,42,95,3,17,63,45,82,69,10,86,44,64,55,2,44,93,16,98,3,41},new int[]{27,2,95,31,58,64,21,14,90,14,86,42,84,47,4,82,70,47,97,1,49},new int[]{59,74,19,7,3,89,77,72,52,57,86,31,70,55,89,25,43,52,24,50,30},new int[]{89,57,9,45,89,74,76,89,23,90,57,77,38,25,49,3,85,90,90,26,47},new int[]{55,39,1,53,31,10,76,47,77,33,6,22,29,95,29,14,32,28,27,11,93},new int[]{95,75,56,23,21,30,76,98,25,79,41,3,63,87,96,53,92,40,74,22,8},new int[]{91,35,88,59,74,92,5,6,56,42,97,80,14,45,12,61,63,79,73,52,81},new int[]{73,86,4,14,11,1,47,35,12,99,37,31,61,86,60,17,28,82,3,18,20},new int[]{46,85,58,67,3,32,53,13,86,7,78,12,29,48,58,37,77,43,75,14,42},new int[]{38,93,44,22,94,76,29,63,20,19,51,57,53,11,9,63,24,43,51,11,37},new int[]{19,71,53,61,91,91,20,99,7,81,88,37,29,9,23,10,22,38,55,89,29},new int[]{62,33,81,98,9,79,80,50,63,67,64,95,69,84,22,4,98,71,1,81,77},new int[]{97,1,28,52,20,16,45,31,69,9,98,60,55,97,5,3,95,77,65,54,32},new int[]{71,97,30,68,74,7,15,99,62,39,20,55,30,22,20,31,54,31,93,10,80}}); param0.add(new int[][]{new int[]{48,19,66,15,8,54,8,66,22,72,93,33,96,26,89,57,86,16,99,75,9,20,36,26},new int[]{67,60,72,35,68,26,18,53,54,82,23,15,89,43,82,1,33,46,61,87,93,27,33,21},new int[]{7,78,68,44,49,95,1,16,16,7,1,92,3,44,47,52,31,61,41,28,95,28,51,46},new int[]{98,90,93,45,10,2,88,20,1,67,2,75,27,31,68,59,11,50,4,40,5,61,34,24},new int[]{41,37,20,59,32,13,84,27,58,17,40,54,43,7,30,97,90,6,40,68,95,99,2,81},new int[]{83,50,27,89,94,39,35,9,45,45,9,20,25,12,36,18,74,75,69,66,37,82,16,25},new int[]{84,20,8,12,15,79,41,13,81,39,48,76,65,89,70,85,93,48,51,16,87,37,30,96},new int[]{29,45,15,54,15,54,4,36,9,81,22,74,25,17,61,80,78,70,39,46,14,16,69,43},new int[]{32,81,24,3,19,56,37,2,42,2,87,90,14,41,50,66,5,32,83,72,62,16,87,46},new int[]{17,7,38,46,97,72,9,17,32,80,47,15,20,21,61,28,11,12,34,86,11,50,98,66},new int[]{32,52,6,16,31,72,58,64,21,10,33,37,34,32,34,21,44,82,82,66,70,99,50,6},new int[]{90,84,81,74,86,24,34,66,16,89,58,92,98,12,71,74,6,9,35,41,32,78,1,42},new int[]{1,24,27,69,79,52,11,85,7,66,11,24,90,72,98,15,37,33,36,68,16,69,66,62},new int[]{25,97,59,93,94,2,46,61,60,24,19,21,7,91,93,19,1,84,70,46,19,36,44,31},new int[]{97,67,2,88,1,15,75,35,48,69,72,53,90,75,74,59,8,53,39,29,4,44,92,24},new int[]{87,84,38,81,81,71,32,87,72,23,34,6,88,33,56,25,31,28,89,50,14,55,1,7},new int[]{85,64,80,66,71,99,62,53,87,71,86,59,74,85,68,31,38,34,36,14,13,95,81,47},new int[]{25,70,61,78,68,26,23,57,84,61,14,22,40,83,68,29,75,21,54,92,47,29,47,64},new int[]{43,12,8,16,12,80,76,31,22,96,74,64,30,54,39,60,13,8,44,80,56,45,58,28},new int[]{54,12,30,68,79,24,78,79,64,33,40,44,74,50,31,94,44,42,57,4,82,66,27,77},new int[]{80,2,92,92,97,18,55,73,34,26,1,11,3,3,51,13,49,65,70,8,33,88,93,97},new int[]{34,96,94,8,28,58,22,8,60,57,86,16,84,63,21,84,59,83,75,46,95,54,52,16},new int[]{81,18,98,77,20,14,13,18,2,86,46,48,49,26,69,54,63,76,97,11,39,58,75,87},new int[]{36,48,94,97,96,39,34,90,17,48,72,39,85,40,63,85,41,55,23,76,39,21,52,27}}); param0.add(new int[][]{new int[]{45,42,10,70,41,89,22,51,39,46,25,16,53,79,40,94,32,42,36,72,38,23,87,9,24},new int[]{76,21,4,75,31,69,97,57,38,25,98,78,51,37,19,29,73,57,81,83,82,19,25,93,80},new int[]{72,9,91,68,96,53,68,30,52,70,80,60,61,53,25,30,10,36,92,15,19,75,83,54,57},new int[]{6,31,21,12,97,20,53,80,76,41,42,1,9,89,35,3,68,29,20,29,18,86,67,21,83},new int[]{45,46,53,3,55,32,40,51,40,54,89,93,81,5,93,28,7,19,84,62,21,53,55,16,25},new int[]{55,37,70,58,26,71,89,81,11,29,66,99,82,2,86,91,47,90,30,45,70,62,10,13,77},new int[]{48,68,68,43,69,27,80,39,88,28,70,36,19,79,86,11,53,74,99,77,37,88,97,66,7},new int[]{58,69,76,76,50,29,40,47,2,67,12,42,27,27,57,48,77,49,93,24,83,27,81,1,58},new int[]{78,82,51,58,67,53,97,94,77,33,98,18,66,87,96,50,77,8,62,21,71,87,83,56,54},new int[]{95,45,29,19,52,65,12,58,38,50,80,27,80,31,66,35,68,51,47,96,62,94,22,66,21},new int[]{23,29,38,27,67,30,52,15,90,85,25,67,51,91,92,71,81,17,79,50,23,80,29,64,74},new int[]{7,79,94,85,6,82,98,69,37,93,82,93,76,94,87,93,84,7,67,18,27,70,98,25,62},new int[]{64,31,65,86,15,8,13,23,35,54,57,62,45,50,20,81,58,34,69,35,94,13,44,78,48},new int[]{98,25,26,89,53,89,20,20,51,54,76,28,55,45,75,86,90,29,41,19,1,63,17,51,5},new int[]{26,68,55,36,33,15,92,63,9,53,97,63,9,63,95,8,28,74,58,57,35,66,56,17,40},new int[]{40,73,83,78,5,28,71,97,66,84,47,47,13,92,99,71,15,17,86,19,74,33,17,63,20},new int[]{59,14,65,17,39,59,61,95,62,32,33,39,88,49,87,11,17,32,19,11,61,95,75,50,5},new int[]{81,34,42,39,28,11,20,98,60,26,2,8,64,10,55,94,24,66,88,13,81,37,99,83,83},new int[]{92,18,41,52,83,78,53,87,26,47,14,97,91,45,77,37,39,22,1,46,52,42,8,99,17},new int[]{30,40,15,66,32,80,35,5,90,6,56,30,51,33,48,74,9,51,58,46,32,47,59,97,33},new int[]{60,14,19,5,98,49,4,94,66,59,44,28,35,60,12,80,80,6,42,99,7,35,72,76,60},new int[]{73,83,80,67,93,71,52,2,91,88,30,12,70,74,88,4,21,65,12,79,48,25,8,85,82},new int[]{20,75,62,20,10,71,60,52,34,17,58,88,64,3,37,52,35,20,9,20,80,36,15,94,88},new int[]{19,47,94,21,5,37,13,40,74,87,17,48,9,65,96,33,68,25,72,43,85,50,70,82,80},new int[]{21,88,58,48,84,38,37,33,92,56,16,71,9,50,45,66,61,61,93,37,97,36,38,3,2}}); param0.add(new int[][]{new int[]{67,61,32,22,31,43,25,63,3,92,10,14,64,23,61,58,67,98,19,25,98,71,41,23,17,63,20,17,59,89,92,20,28,94,38,41,20,63,67,88,68,90,50,64},new int[]{64,48,46,95,50,42,25,50,77,30,3,62,81,31,11,99,52,24,70,86,98,27,53,71,24,84,1,34,70,51,75,57,37,14,83,21,82,88,4,56,88,66,31,88},new int[]{48,68,58,58,7,23,44,49,84,87,89,22,42,4,57,60,36,54,69,3,61,82,14,41,37,69,76,30,78,74,93,79,82,44,6,66,37,80,98,20,32,13,99,73},new int[]{58,86,91,80,4,35,46,27,79,87,94,34,24,22,21,94,16,72,91,70,53,66,64,42,71,31,36,77,70,65,39,22,43,41,23,85,20,32,77,9,16,11,88,71},new int[]{6,33,85,2,73,8,3,3,48,45,21,63,77,46,71,47,54,93,40,56,95,77,13,51,43,58,18,26,96,63,62,69,60,72,47,74,44,77,17,9,7,69,5,90},new int[]{25,49,72,10,59,4,11,43,79,15,66,50,59,42,72,57,13,65,74,93,90,52,34,26,12,43,34,6,63,27,47,45,4,96,51,21,74,91,12,21,34,94,55,75},new int[]{72,45,43,54,9,93,57,13,59,90,47,16,78,82,98,94,7,98,40,70,57,83,42,6,36,60,96,11,38,36,79,5,24,84,35,70,61,3,54,64,58,65,54,80},new int[]{91,61,97,86,81,18,9,66,58,55,73,86,13,95,10,49,12,98,97,85,47,37,67,62,12,25,51,69,77,47,91,66,85,74,69,10,96,66,41,30,95,43,66,31},new int[]{57,50,96,40,96,8,25,10,88,47,54,54,55,72,77,60,97,87,5,30,24,1,96,95,81,89,42,65,69,34,88,37,4,48,10,74,44,55,84,76,72,17,97,38},new int[]{93,52,95,81,54,74,7,40,98,99,79,39,14,58,72,9,66,11,67,77,74,83,75,31,82,67,80,80,18,26,84,61,36,3,13,22,16,87,55,13,42,19,95,3},new int[]{83,10,52,84,97,72,53,18,85,10,1,53,96,7,57,14,27,77,15,86,12,46,59,23,30,58,63,68,19,94,4,57,25,33,17,97,88,80,10,24,13,55,71,6},new int[]{97,7,58,88,38,52,32,12,93,50,58,97,24,85,77,91,52,10,56,18,61,85,58,7,7,64,22,81,94,60,42,68,84,76,83,50,28,82,89,27,96,43,28,39},new int[]{86,3,88,2,33,97,8,15,40,94,84,9,62,6,39,47,9,10,29,6,52,78,87,4,64,20,85,7,89,8,50,83,4,49,72,44,24,49,21,72,64,84,39,51},new int[]{88,80,76,94,47,13,29,30,85,20,85,92,78,2,59,7,87,24,86,83,25,8,26,22,93,56,74,19,9,7,71,65,79,25,76,63,87,93,44,16,76,92,98,85},new int[]{67,42,81,11,30,32,64,67,30,8,22,70,35,47,5,35,89,82,31,98,42,50,87,99,18,24,35,81,40,11,83,52,16,69,53,97,73,16,37,2,32,60,86,89},new int[]{39,47,27,27,81,67,65,76,8,75,27,21,44,48,61,94,42,22,46,15,95,97,57,9,61,78,74,13,48,48,89,91,37,2,8,85,19,56,27,22,26,19,49,94},new int[]{87,67,37,46,62,40,85,22,73,99,51,36,99,47,43,13,37,91,58,71,90,93,73,15,92,84,1,59,3,84,36,66,8,23,16,88,79,43,52,10,15,69,24,23},new int[]{19,47,92,46,24,53,91,58,15,30,46,82,43,65,88,68,18,90,24,35,41,69,48,53,48,86,65,75,2,87,89,40,26,3,95,2,24,32,37,57,85,94,77,81},new int[]{24,26,2,36,32,10,44,77,59,11,15,98,12,47,70,44,18,7,6,16,67,23,3,51,51,82,86,6,18,53,49,25,22,42,99,83,90,85,66,22,22,26,15,24},new int[]{84,24,11,3,88,47,6,60,25,92,84,11,42,25,81,18,81,43,8,85,79,27,99,5,16,66,79,14,73,78,29,74,15,95,13,79,39,36,79,60,6,85,36,81},new int[]{6,20,9,7,85,83,50,31,90,91,7,38,20,26,15,14,53,49,7,9,15,17,94,18,88,63,22,34,26,66,54,30,9,19,53,11,13,5,32,51,35,48,82,63},new int[]{80,96,47,59,1,91,84,75,95,31,43,32,70,34,95,54,13,49,27,73,50,69,29,75,17,50,88,42,76,95,51,19,87,34,91,20,90,5,64,2,34,54,76,46},new int[]{85,70,55,7,39,24,41,60,89,74,2,18,50,75,96,84,1,97,18,1,42,23,17,59,98,44,49,83,50,50,77,37,12,56,32,67,72,6,32,65,7,76,52,54},new int[]{46,45,14,49,65,22,4,3,28,21,43,19,1,35,31,50,67,46,65,44,74,3,76,27,84,74,66,97,14,21,32,93,45,27,57,51,9,72,27,50,44,45,11,69},new int[]{25,24,88,33,90,89,56,49,69,69,2,85,95,78,79,51,46,26,20,99,3,99,2,27,82,59,24,57,68,94,17,26,10,19,86,24,50,44,28,5,69,23,68,9},new int[]{29,5,31,57,47,89,65,37,32,54,64,70,48,19,50,88,88,84,33,84,1,42,43,83,90,64,72,8,58,80,33,96,4,53,84,58,29,70,24,96,36,37,58,97},new int[]{73,47,38,22,77,37,38,22,3,57,14,27,59,24,68,68,87,94,5,32,97,26,52,90,46,65,69,14,33,66,63,70,57,80,82,89,77,15,79,91,75,67,4,53},new int[]{88,3,45,71,71,2,27,68,22,59,58,47,89,82,74,10,32,24,74,68,36,20,98,83,34,6,75,36,26,7,74,98,19,61,86,16,86,51,46,46,81,59,39,79},new int[]{84,11,50,52,59,41,98,62,3,23,91,15,83,4,37,36,77,97,66,19,37,92,79,32,18,50,53,1,71,28,95,7,12,11,80,78,81,11,98,92,28,5,23,49},new int[]{37,57,14,93,49,66,35,63,83,84,19,20,17,16,83,21,28,29,7,10,70,55,54,24,86,85,8,83,27,87,63,46,45,39,8,18,78,75,6,2,67,33,2,58},new int[]{9,52,26,95,57,4,49,80,60,90,39,83,14,49,22,99,7,72,62,11,76,99,33,93,90,53,20,47,23,89,5,22,16,89,40,89,54,22,74,51,11,21,79,80},new int[]{66,12,85,75,41,2,23,46,57,90,45,32,77,74,90,73,75,22,3,13,94,89,2,12,64,4,45,21,35,45,33,44,86,86,44,40,97,51,30,46,76,20,76,5},new int[]{35,15,99,54,22,51,23,42,37,47,90,34,11,50,32,78,42,54,28,28,36,5,51,45,44,47,83,48,5,38,98,73,97,72,81,45,40,94,51,1,35,63,69,48},new int[]{53,69,64,24,50,8,77,80,54,15,52,5,17,55,80,35,7,80,14,91,34,30,61,99,59,39,32,18,39,1,26,75,2,8,46,63,24,99,97,23,86,58,77,61},new int[]{79,15,11,8,31,31,21,37,12,64,24,38,23,39,91,48,23,67,55,62,56,10,62,3,96,60,54,42,63,18,5,74,32,19,49,7,47,13,9,66,50,89,49,17},new int[]{9,14,44,11,27,85,41,71,76,60,29,15,82,35,91,54,31,26,34,47,8,46,85,99,61,50,15,25,66,7,16,69,11,72,90,17,6,94,12,34,47,62,88,96},new int[]{7,41,81,66,10,11,72,78,94,4,11,45,73,25,88,38,25,50,2,14,98,86,3,84,7,84,29,7,7,97,15,23,70,10,19,14,25,96,64,64,33,8,15,97},new int[]{31,90,82,65,98,19,90,90,7,1,20,19,39,39,56,30,94,65,43,74,12,89,81,28,16,88,54,74,31,91,44,52,80,13,95,62,10,10,79,91,71,31,66,92},new int[]{87,2,17,28,71,7,17,37,37,72,2,25,25,35,64,95,66,69,90,63,34,16,80,77,41,78,25,9,99,3,62,17,2,79,16,82,83,67,97,49,76,32,25,32},new int[]{22,53,6,71,49,38,44,43,77,95,28,19,76,12,82,48,91,25,66,50,78,28,44,69,26,83,25,15,96,20,77,1,33,88,8,38,28,79,34,34,29,78,9,52},new int[]{44,10,43,22,19,24,34,3,14,37,37,30,87,48,75,99,84,99,18,65,52,93,64,90,73,91,11,23,40,72,7,61,98,11,8,42,32,86,40,21,19,90,95,52},new int[]{12,51,98,82,51,4,86,40,74,1,82,26,56,54,89,81,38,73,25,18,3,95,8,86,38,6,55,56,65,40,88,40,68,41,84,40,93,7,16,79,5,52,20,71},new int[]{56,34,12,72,32,49,62,57,25,69,16,51,76,23,40,41,15,39,77,63,63,22,95,86,73,26,28,44,35,92,42,52,7,23,71,88,92,99,44,4,81,78,51,69},new int[]{29,17,82,37,10,15,25,54,37,30,60,73,16,85,56,98,42,99,14,46,78,50,72,61,72,4,39,99,71,55,50,46,80,21,96,49,47,10,70,29,60,16,24,60}}); param0.add(new int[][]{new int[]{10,67,53,58,73,24,62,89,36,84,54,60,46,96,96,92,26,82,97,63},new int[]{48,41,1,86,53,43,18,90,36,96,15,29,95,85,70,25,86,25,26,76},new int[]{62,70,29,37,26,52,66,37,64,30,55,90,77,26,1,91,73,37,75,10},new int[]{37,25,56,27,77,68,12,12,31,9,54,8,6,38,8,59,80,17,35,10},new int[]{84,63,29,21,63,58,6,76,14,43,20,88,95,82,81,30,36,53,41,35},new int[]{12,20,52,81,63,57,16,97,91,89,19,62,95,56,54,13,6,61,67,86},new int[]{88,77,55,5,57,19,14,94,46,2,65,49,64,86,45,54,89,67,3,90},new int[]{46,18,40,16,53,95,61,90,34,18,86,6,99,4,42,20,33,87,51,81},new int[]{91,94,23,19,60,94,94,16,43,45,94,78,23,79,86,82,70,15,79,60},new int[]{43,54,93,45,56,71,75,98,99,22,35,76,48,98,67,29,12,97,37,77},new int[]{33,63,58,43,8,94,28,18,4,11,80,38,35,67,48,41,4,21,62,17},new int[]{48,23,50,36,84,41,78,91,78,38,72,52,41,21,14,53,32,43,1,65},new int[]{22,5,5,11,55,80,64,98,49,41,77,61,75,48,65,51,4,2,54,55},new int[]{36,33,97,47,39,18,23,11,93,47,58,76,33,76,18,21,22,53,87,72},new int[]{77,9,31,43,61,78,92,74,94,66,63,54,94,39,5,91,5,36,7,87},new int[]{10,50,16,13,94,93,26,48,80,23,56,93,85,46,16,37,73,86,50,41},new int[]{1,49,47,8,53,12,8,62,90,60,29,61,87,81,87,76,59,44,72,79},new int[]{9,63,35,78,26,57,4,37,95,93,13,52,40,76,28,9,94,80,76,96},new int[]{48,39,62,36,11,9,59,79,23,73,62,64,5,77,9,1,51,66,91,53},new int[]{38,84,93,19,79,34,77,87,14,83,86,10,36,65,98,5,78,15,66,87}}); param0.add(new int[][]{new int[]{77,56,21,16,3,4,66,99,72,94,34,33,76,11,85,89,9,74},new int[]{19,31,23,11,31,52,97,53,56,6,28,4,68,74,92,14,90,64},new int[]{61,79,82,4,63,17,35,22,53,84,18,49,57,77,67,52,63,50},new int[]{15,14,6,59,1,21,5,46,43,70,54,51,90,94,92,97,91,53},new int[]{91,42,70,95,16,16,29,89,52,60,1,60,39,54,48,71,94,69},new int[]{4,86,36,45,15,74,86,35,5,55,14,51,81,76,76,67,32,1},new int[]{79,1,94,83,6,91,26,32,55,77,17,90,37,99,68,40,44,87},new int[]{63,57,15,2,26,35,92,15,16,53,14,4,49,99,18,47,35,85},new int[]{72,52,11,94,54,45,98,39,94,4,68,72,6,18,94,33,61,22},new int[]{20,62,47,73,41,88,83,88,96,73,4,67,28,91,11,56,95,15},new int[]{32,29,44,46,61,48,51,64,59,47,49,17,30,75,30,10,58,76},new int[]{96,46,69,13,88,44,82,58,93,96,43,51,91,86,68,72,6,83},new int[]{84,40,99,55,58,57,32,5,30,83,30,27,50,42,56,11,18,88},new int[]{3,94,46,14,38,91,36,62,80,54,62,60,83,93,97,4,38,36},new int[]{70,84,86,57,43,23,7,59,5,24,12,37,49,10,82,83,45,71},new int[]{25,75,55,79,31,96,47,61,25,1,66,12,16,46,84,52,57,50},new int[]{86,98,54,8,35,6,85,99,58,48,49,76,29,36,82,77,72,68},new int[]{95,53,87,51,41,30,56,16,31,33,48,91,17,90,47,59,75,7}}); param0.add(new int[][]{new int[]{34,1,55,60,18,68,91,6,94,26,74,59,4,58,39,76,49,81,16,6,76,4,89,24,75,14,42,58,50,97,13,37,17,12,49,87,66,41,35,8,92,76,97,76,87,34,31,98},new int[]{90,60,31,75,59,62,78,99,32,64,98,14,13,54,62,66,71,90,8,14,79,19,22,89,55,57,14,64,90,48,26,49,5,1,92,2,25,59,49,62,56,24,79,60,70,18,93,11},new int[]{27,45,53,94,75,27,40,42,87,55,73,75,86,13,77,16,41,8,30,71,34,11,70,90,59,4,86,38,9,17,5,44,39,49,47,16,80,5,84,77,73,65,33,67,90,10,6,91},new int[]{86,24,6,58,22,53,14,6,38,5,94,58,77,96,52,88,57,76,19,80,52,61,41,25,6,42,34,25,77,58,12,1,45,42,67,9,8,53,79,53,54,34,69,21,68,49,86,9},new int[]{71,11,83,90,39,31,56,64,69,40,91,57,59,4,97,70,27,33,85,21,17,82,10,16,12,99,89,82,34,40,70,53,88,77,18,15,99,93,62,25,3,98,9,43,46,16,16,88},new int[]{43,71,10,81,76,35,37,17,59,7,86,34,53,27,4,49,61,89,73,14,38,7,63,73,8,78,29,28,62,72,25,54,89,86,99,15,59,29,57,67,67,18,72,85,51,76,69,43},new int[]{19,57,50,26,95,65,89,97,97,20,48,74,57,29,79,66,4,42,67,73,55,90,58,46,34,44,78,6,28,68,61,76,22,1,25,9,81,17,79,54,83,80,43,39,13,31,75,52},new int[]{46,21,43,57,20,54,26,30,88,15,65,17,37,49,52,84,81,57,72,89,46,79,89,42,20,8,76,45,34,18,90,24,36,70,80,18,22,58,93,92,95,72,95,46,36,65,5,16},new int[]{7,96,69,10,42,76,23,25,73,93,61,72,85,70,34,77,36,83,88,75,23,33,71,63,69,60,54,89,68,56,30,47,99,22,17,95,68,42,67,96,39,90,3,71,75,5,19,43},new int[]{23,91,35,60,60,78,49,80,78,42,86,42,3,2,7,45,57,84,49,35,91,16,39,51,34,1,99,57,36,18,34,44,62,84,41,15,78,78,46,33,39,2,75,79,7,90,99,34},new int[]{70,61,64,66,92,86,11,85,26,99,11,10,32,72,3,52,21,2,52,25,17,69,22,9,97,65,79,90,93,46,84,33,33,84,3,52,70,18,15,3,90,70,7,77,78,90,41,95},new int[]{20,62,11,12,16,66,64,45,10,33,79,52,34,17,57,47,24,37,57,89,74,63,38,59,50,90,27,60,63,72,89,24,76,42,82,30,69,30,22,49,83,29,26,70,57,48,54,40},new int[]{81,50,53,62,11,44,96,77,7,23,22,15,77,77,46,22,86,98,62,44,30,3,55,64,92,18,22,78,1,64,39,45,25,91,23,92,37,47,66,54,43,68,4,61,21,21,3,73},new int[]{94,88,19,88,94,42,38,60,83,36,92,52,72,89,53,52,25,28,49,77,42,75,80,46,15,80,40,51,58,89,4,19,54,66,39,40,12,13,5,92,86,37,85,72,6,60,55,36},new int[]{18,28,83,83,52,63,61,28,18,14,98,53,76,8,4,98,33,29,61,12,29,99,51,31,1,74,14,37,22,77,69,41,77,87,8,46,25,20,60,8,54,69,88,52,70,89,45,69},new int[]{98,51,93,91,42,33,87,62,1,31,5,12,37,87,29,40,59,11,1,46,78,82,90,6,23,98,90,79,36,87,83,25,61,89,11,63,3,11,96,98,23,81,62,83,79,4,43,54},new int[]{61,26,32,69,69,62,95,36,41,46,32,98,62,43,49,22,33,88,36,29,15,9,30,74,96,77,41,13,86,43,96,50,91,46,29,26,84,89,49,52,10,27,8,57,55,36,54,82},new int[]{89,6,53,46,51,50,49,69,7,38,53,96,84,23,13,62,40,35,12,41,38,72,72,40,83,57,2,58,18,42,20,51,71,11,71,93,53,16,35,17,8,99,57,39,99,14,22,7},new int[]{98,11,25,47,36,80,96,77,93,84,52,25,14,19,13,98,75,70,94,27,87,53,8,31,1,41,31,75,51,36,69,43,2,12,19,77,7,89,61,96,99,5,10,99,78,67,98,94},new int[]{61,48,23,56,86,87,32,87,39,93,86,41,48,32,8,80,31,54,77,48,8,28,31,73,48,84,32,4,45,7,19,34,91,36,13,9,50,83,9,50,90,79,78,15,37,80,52,99},new int[]{27,5,64,47,73,88,29,61,88,91,99,44,25,93,77,80,76,95,27,59,98,97,69,99,5,58,7,16,74,43,48,59,4,33,36,75,10,73,60,48,85,35,77,61,26,61,65,30},new int[]{39,84,58,47,4,37,53,41,54,75,98,50,98,36,16,95,85,32,63,45,70,40,92,81,30,76,41,21,86,71,13,56,48,13,36,5,39,5,21,44,87,31,26,28,34,65,75,8},new int[]{8,89,99,81,99,51,90,59,75,96,23,49,29,63,15,86,50,26,51,55,45,89,88,49,62,92,52,78,58,53,63,84,45,43,52,3,12,42,4,87,81,32,52,44,79,1,62,63},new int[]{77,11,44,2,2,81,31,15,15,58,6,90,84,99,95,64,67,21,92,22,97,35,13,77,37,46,9,92,10,26,90,94,25,57,4,36,61,97,1,18,86,32,8,67,81,70,48,90},new int[]{17,69,7,39,49,60,41,58,75,85,89,62,11,55,85,37,20,24,80,36,68,75,94,3,11,42,5,43,75,76,16,78,79,61,67,78,79,61,8,24,66,31,97,35,91,33,31,60},new int[]{25,42,49,77,52,3,53,62,34,91,21,85,24,73,60,10,55,97,7,73,41,39,86,40,58,76,9,12,7,91,32,43,48,95,55,71,39,41,26,61,30,98,89,39,14,40,6,76},new int[]{64,99,34,93,26,89,72,1,31,68,93,46,44,96,88,92,6,70,68,33,83,39,15,42,70,86,53,78,23,9,15,10,17,71,96,22,8,40,90,94,32,95,90,7,13,49,4,97},new int[]{53,17,23,66,81,12,48,28,48,71,54,35,93,21,87,34,50,17,17,1,14,27,15,35,23,32,21,56,52,43,45,38,74,52,28,40,51,99,72,47,82,78,9,16,44,94,38,90},new int[]{52,48,12,76,55,89,94,97,52,99,1,29,41,1,78,43,86,16,93,29,25,83,83,78,71,57,98,19,19,25,13,55,52,95,75,14,28,38,93,88,69,53,20,44,67,57,94,7},new int[]{34,46,56,14,19,41,73,18,96,99,45,82,1,93,51,80,5,20,14,29,96,16,92,18,17,12,87,77,65,70,46,90,32,53,56,69,50,50,92,52,84,42,58,11,90,80,55,66},new int[]{2,35,27,4,13,85,68,1,21,62,1,95,16,32,19,80,37,81,6,97,44,95,55,88,35,16,75,35,57,81,89,9,41,68,53,58,80,86,84,43,65,69,23,32,13,36,52,5},new int[]{11,74,57,15,92,66,10,83,98,58,32,95,13,66,39,33,23,18,86,90,85,5,96,2,40,17,19,7,39,32,70,90,39,2,69,57,20,47,81,20,52,81,17,91,72,17,20,98},new int[]{96,37,13,9,80,60,58,46,62,79,36,48,34,6,44,30,56,94,34,79,76,89,60,3,18,8,45,95,68,5,9,82,8,34,20,27,34,34,12,15,58,59,80,76,10,65,36,39},new int[]{20,10,39,70,21,21,80,89,99,42,40,67,73,18,16,74,33,92,22,28,13,19,81,38,52,70,41,39,13,87,53,61,48,43,31,14,22,19,39,95,61,49,6,36,61,15,81,53},new int[]{68,26,46,53,96,87,73,7,35,56,89,41,58,24,14,4,24,77,76,47,19,60,85,1,87,60,89,88,20,60,57,56,11,54,90,85,79,63,37,33,11,6,12,9,16,41,68,52},new int[]{44,20,66,30,16,72,15,3,31,32,69,93,77,43,50,63,72,42,98,28,49,9,34,49,65,89,80,31,67,12,75,27,60,65,36,96,86,70,2,39,63,46,95,40,10,99,27,22},new int[]{67,2,94,6,87,53,8,87,36,39,72,59,85,60,19,36,71,71,16,48,68,35,3,99,81,31,40,45,49,33,54,69,75,78,7,60,5,5,42,57,94,75,9,32,83,1,49,15},new int[]{23,31,16,78,68,20,21,55,59,71,90,72,43,2,79,11,93,64,19,21,84,89,93,1,20,5,39,77,81,82,19,44,59,71,7,63,79,94,37,63,89,52,52,30,61,22,33,3},new int[]{98,99,44,46,75,2,87,79,39,85,80,76,21,22,67,46,88,94,32,43,27,41,31,99,15,25,99,66,55,92,11,18,14,36,43,12,9,50,43,97,25,60,9,70,12,43,95,87},new int[]{51,61,10,97,97,32,40,18,14,90,39,1,57,62,52,51,35,94,48,63,72,16,85,24,1,66,61,7,17,50,82,31,72,83,95,15,57,99,65,51,18,73,76,94,35,73,36,84},new int[]{22,73,81,80,43,73,95,3,24,5,42,31,49,54,97,53,69,25,48,67,39,98,83,83,55,74,45,83,78,15,95,56,94,80,42,38,95,71,49,94,7,7,47,13,45,25,50,64},new int[]{88,80,68,97,95,56,44,59,2,30,62,54,47,2,56,68,22,87,81,71,73,80,64,87,34,29,71,98,22,64,78,29,90,15,25,66,39,92,91,75,79,11,35,57,95,74,13,27},new int[]{23,99,14,62,52,33,98,58,62,13,77,21,34,36,81,40,1,1,71,59,2,85,35,50,48,62,24,24,79,26,14,52,93,76,88,98,10,34,45,73,51,31,22,19,64,95,6,8},new int[]{20,88,73,46,27,35,76,10,38,80,58,26,3,72,29,45,46,12,91,23,9,15,33,15,24,14,40,73,14,4,89,78,40,11,59,76,77,80,33,3,61,1,54,65,89,53,54,38},new int[]{22,73,56,45,75,2,10,5,88,72,42,34,24,12,52,23,48,69,19,77,35,8,76,85,49,92,76,5,13,54,49,58,15,45,96,72,81,64,54,82,87,4,60,23,8,95,40,13},new int[]{95,49,45,39,82,36,91,66,26,2,33,80,4,55,32,81,61,7,79,83,56,67,67,5,49,20,3,61,23,16,10,64,62,36,79,74,49,67,64,14,84,29,68,52,62,39,54,50},new int[]{75,71,26,55,45,54,26,94,10,44,68,30,12,87,47,72,92,85,25,78,33,42,90,33,45,50,61,14,82,61,26,81,58,4,88,69,5,91,3,24,90,88,42,52,96,54,6,49},new int[]{56,17,62,40,7,94,96,82,92,15,68,71,56,47,5,7,63,28,76,93,25,71,47,20,77,48,95,3,69,77,77,50,60,66,91,75,1,11,13,39,30,7,89,19,80,22,75,68}}); List param1 = new ArrayList<>(); param1.add(22); param1.add(12); param1.add(12); param1.add(18); param1.add(20); param1.add(24); param1.add(30); param1.add(15); param1.add(16); param1.add(35); List param2 = new ArrayList<>(); param2.add(27); param2.add(18); param2.add(8); param2.add(12); param2.add(18); param2.add(15); param2.add(36); param2.add(14); param2.add(10); param2.add(31); for(int i =0; i < param0.size(); ++i ){ for(int j =0; j < param0.get(i).length; ++j ){ Arrays.sort(param0.get(i)[j]); for(int k =0; k < param0.get(i)[j].length; ++k){ param0.get(i)[j][k]-=50; } } } for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( M , n , m ) : count = 0 for i in range ( n ) : for j in range ( m ) : if M [ i ] [ j ] < 0 : count += 1 else : break return count ",,," if __name__ == '__main__': param = [ ([[31, 92, 57, 28, 79, 84, 92, 19, 31, 71, 91, 46, 60, 79, 82, 4, 70, 82, 41, 79, 80, 29, 26, 76, 92, 18, 94, 55, 46, 69, 67, 60, 85, 25, 11], [58, 69, 14, 55, 6, 69, 81, 60, 38, 52, 81, 80, 1, 47, 42, 82, 2, 70, 68, 71, 50, 98, 84, 1, 45, 24, 49, 33, 56, 4, 60, 42, 14, 45, 13], [28, 92, 91, 71, 75, 97, 30, 9, 76, 94, 55, 84, 76, 38, 32, 7, 73, 49, 37, 76, 41, 3, 89, 56, 71, 99, 71, 25, 94, 37, 43, 9, 89, 55, 55], [77, 31, 94, 14, 2, 88, 64, 71, 57, 18, 81, 51, 66, 82, 16, 46, 15, 28, 48, 54, 49, 34, 80, 12, 26, 64, 41, 46, 32, 87, 18, 12, 38, 28, 88], [84, 93, 86, 10, 92, 89, 62, 65, 33, 66, 92, 52, 28, 49, 98, 37, 49, 91, 42, 64, 43, 12, 83, 61, 51, 11, 80, 35, 28, 50, 35, 1, 31, 81, 77], [22, 30, 43, 76, 37, 59, 48, 82, 40, 2, 66, 58, 7, 13, 38, 73, 14, 28, 55, 52, 28, 10, 98, 93, 97, 27, 1, 50, 80, 83, 11, 82, 80, 7, 38], [54, 30, 50, 31, 57, 2, 73, 56, 24, 35, 85, 99, 28, 51, 83, 86, 82, 30, 72, 98, 40, 81, 15, 5, 18, 76, 62, 5, 50, 37, 99, 46, 31, 16, 66], [52, 62, 92, 37, 29, 66, 66, 98, 1, 56, 60, 85, 43, 98, 46, 34, 21, 71, 28, 84, 92, 93, 58, 79, 3, 37, 76, 14, 63, 33, 46, 8, 2, 56, 31], [70, 69, 43, 26, 58, 80, 60, 28, 24, 79, 42, 80, 16, 52, 17, 93, 25, 16, 77, 35, 39, 16, 77, 19, 45, 27, 96, 44, 30, 88, 76, 6, 18, 2, 33], [1, 6, 28, 49, 25, 25, 14, 31, 5, 60, 78, 45, 20, 88, 9, 80, 72, 46, 75, 90, 26, 11, 25, 77, 22, 39, 83, 65, 95, 64, 78, 86, 23, 48, 20], [98, 5, 39, 62, 57, 87, 52, 68, 32, 98, 90, 99, 67, 81, 94, 96, 15, 44, 13, 17, 47, 35, 84, 14, 23, 69, 5, 96, 42, 42, 65, 60, 10, 10, 88], [4, 91, 15, 32, 39, 40, 39, 26, 25, 26, 35, 22, 5, 46, 72, 27, 44, 23, 49, 67, 9, 17, 64, 74, 68, 84, 94, 76, 22, 22, 30, 29, 26, 63, 51], [10, 53, 32, 7, 39, 74, 91, 85, 79, 47, 47, 11, 54, 51, 43, 75, 19, 74, 33, 27, 15, 29, 96, 96, 87, 83, 62, 32, 79, 62, 43, 62, 97, 87, 16], [11, 15, 6, 98, 56, 59, 40, 13, 99, 53, 48, 46, 99, 16, 59, 58, 21, 57, 89, 63, 67, 50, 71, 98, 10, 49, 78, 39, 5, 64, 9, 7, 60, 86, 83], [94, 9, 64, 64, 80, 70, 1, 77, 15, 64, 69, 43, 40, 56, 82, 28, 15, 92, 40, 38, 61, 74, 32, 1, 95, 30, 5, 43, 1, 8, 57, 5, 5, 97, 54], [79, 58, 95, 22, 97, 60, 97, 87, 35, 14, 58, 59, 86, 89, 57, 33, 1, 71, 16, 48, 77, 69, 6, 99, 74, 96, 79, 98, 65, 86, 32, 45, 61, 49, 36], [19, 37, 45, 27, 48, 21, 83, 82, 96, 85, 83, 54, 37, 22, 38, 43, 45, 28, 84, 91, 38, 16, 58, 46, 48, 20, 61, 8, 90, 66, 42, 47, 65, 60, 15], [48, 19, 73, 34, 64, 86, 86, 4, 50, 81, 67, 14, 28, 49, 83, 56, 97, 24, 38, 84, 39, 82, 1, 14, 7, 32, 90, 7, 7, 47, 85, 55, 96, 87, 83], [70, 68, 59, 18, 72, 95, 7, 62, 53, 22, 82, 64, 72, 3, 24, 52, 26, 41, 30, 19, 47, 55, 13, 10, 69, 54, 93, 42, 44, 49, 72, 18, 29, 70, 85], [96, 40, 94, 49, 87, 60, 26, 23, 86, 18, 72, 90, 32, 11, 48, 47, 94, 96, 98, 59, 11, 19, 27, 49, 62, 29, 23, 22, 1, 88, 54, 41, 39, 76, 44], [45, 99, 44, 67, 5, 80, 36, 33, 89, 52, 2, 49, 74, 36, 7, 14, 57, 67, 62, 97, 22, 92, 44, 2, 65, 67, 58, 91, 56, 84, 53, 49, 11, 13, 24], [69, 81, 60, 52, 34, 72, 33, 56, 28, 17, 3, 62, 7, 78, 40, 19, 95, 42, 49, 77, 90, 42, 22, 1, 60, 92, 65, 28, 11, 83, 19, 59, 52, 45, 26], [23, 17, 21, 54, 31, 32, 81, 15, 13, 65, 62, 16, 21, 70, 6, 84, 5, 91, 37, 20, 89, 73, 3, 65, 86, 24, 27, 11, 98, 92, 54, 23, 9, 1, 90], [53, 67, 14, 42, 52, 55, 52, 86, 99, 43, 74, 48, 71, 55, 85, 87, 73, 41, 55, 52, 83, 67, 78, 14, 15, 27, 83, 28, 65, 35, 45, 33, 59, 13, 34], [29, 4, 17, 82, 11, 18, 95, 71, 10, 34, 79, 43, 45, 58, 9, 26, 84, 9, 49, 6, 63, 41, 43, 75, 35, 54, 55, 18, 81, 55, 2, 53, 1, 67, 87], [98, 3, 18, 56, 33, 97, 20, 90, 38, 80, 83, 80, 18, 94, 11, 43, 60, 85, 30, 2, 89, 85, 32, 35, 62, 32, 93, 71, 62, 93, 24, 33, 86, 21, 32], [38, 45, 16, 40, 18, 67, 71, 49, 46, 98, 64, 83, 35, 78, 40, 86, 28, 66, 77, 24, 31, 10, 82, 1, 31, 9, 47, 39, 84, 51, 1, 6, 32, 4, 63], [85, 48, 64, 11, 29, 77, 59, 1, 99, 17, 17, 38, 49, 78, 82, 50, 87, 75, 18, 75, 73, 98, 17, 27, 51, 4, 98, 96, 6, 74, 5, 47, 52, 47, 75], [36, 68, 16, 99, 38, 84, 45, 71, 71, 36, 3, 97, 69, 15, 48, 77, 6, 4, 33, 36, 67, 65, 52, 55, 37, 35, 76, 69, 98, 84, 62, 5, 80, 15, 36], [67, 84, 38, 44, 5, 66, 58, 57, 67, 75, 61, 66, 60, 2, 66, 50, 6, 83, 91, 86, 67, 99, 1, 32, 71, 91, 52, 29, 51, 73, 23, 32, 4, 75, 25], [24, 94, 50, 60, 28, 73, 99, 1, 10, 37, 54, 96, 56, 46, 19, 9, 57, 78, 19, 70, 76, 25, 14, 87, 13, 22, 63, 73, 97, 3, 19, 39, 16, 36, 22], [92, 41, 48, 68, 30, 72, 1, 76, 98, 58, 57, 61, 32, 11, 58, 29, 80, 86, 22, 94, 50, 66, 78, 22, 91, 56, 91, 82, 61, 67, 12, 18, 46, 99, 69], [49, 64, 35, 55, 67, 78, 11, 71, 12, 98, 10, 9, 82, 35, 61, 40, 29, 10, 83, 11, 63, 16, 97, 97, 96, 91, 30, 97, 21, 91, 32, 61, 27, 33, 35], [29, 58, 88, 23, 96, 94, 1, 55, 79, 30, 87, 83, 5, 70, 25, 62, 14, 67, 29, 22, 84, 2, 25, 75, 11, 57, 89, 65, 80, 82, 36, 28, 45, 44, 4], [70, 94, 49, 13, 26, 24, 42, 24, 58, 83, 41, 6, 50, 78, 22, 12, 21, 84, 70, 28, 44, 51, 78, 75, 9, 70, 37, 23, 60, 25, 68, 97, 49, 17, 27]],22,27,), ([[22, 49, 27, 1, 69, 48, 44, 18, 89, 36, 93, 10, 67, 18, 7, 62, 55, 3, 84, 76, 49, 57], [59, 6, 37, 2, 33, 16, 20, 60, 69, 98, 92, 2, 70, 12, 99, 57, 32, 92, 64, 92, 68, 62], [41, 89, 70, 69, 62, 88, 52, 23, 8, 37, 77, 87, 54, 44, 87, 32, 53, 29, 38, 80, 68, 32], [63, 77, 82, 97, 7, 56, 2, 68, 44, 52, 40, 8, 71, 50, 26, 62, 18, 61, 12, 20, 1, 76], [44, 47, 86, 67, 53, 27, 80, 57, 53, 74, 7, 11, 86, 58, 7, 55, 30, 57, 23, 97, 38, 33], [48, 84, 9, 77, 60, 53, 41, 15, 99, 30, 90, 36, 89, 64, 78, 63, 51, 51, 22, 17, 72, 50], [14, 56, 77, 30, 59, 64, 26, 22, 86, 92, 80, 88, 63, 46, 81, 3, 81, 64, 14, 72, 14, 77], [36, 48, 97, 59, 34, 64, 11, 24, 41, 30, 37, 66, 33, 98, 60, 27, 76, 90, 48, 10, 90, 41], [76, 54, 4, 86, 40, 31, 85, 51, 38, 72, 28, 12, 35, 99, 78, 12, 13, 49, 34, 33, 21, 83], [37, 15, 61, 52, 17, 81, 90, 44, 16, 13, 2, 92, 88, 84, 18, 99, 10, 71, 82, 33, 75, 44], [40, 49, 88, 11, 67, 52, 39, 2, 92, 49, 52, 31, 77, 97, 51, 31, 66, 98, 66, 37, 25, 62], [99, 9, 6, 66, 15, 61, 15, 58, 33, 62, 80, 65, 59, 1, 79, 54, 78, 51, 97, 19, 83, 59], [3, 76, 87, 47, 71, 66, 86, 18, 79, 62, 44, 67, 5, 82, 94, 27, 48, 2, 88, 34, 55, 46], [38, 66, 48, 93, 40, 7, 6, 14, 82, 56, 83, 2, 8, 58, 21, 26, 90, 10, 85, 3, 8, 78], [54, 43, 93, 86, 42, 41, 87, 70, 67, 60, 90, 78, 66, 42, 30, 57, 76, 2, 30, 24, 12, 49], [12, 5, 75, 55, 17, 62, 87, 21, 91, 88, 10, 20, 49, 46, 79, 51, 33, 94, 59, 48, 97, 70], [49, 75, 21, 53, 2, 92, 14, 80, 92, 40, 84, 67, 39, 48, 53, 49, 68, 57, 14, 58, 97, 9], [45, 23, 2, 43, 89, 62, 28, 46, 74, 38, 70, 84, 67, 22, 62, 86, 72, 24, 39, 5, 64, 43], [28, 93, 44, 61, 47, 23, 52, 97, 62, 31, 98, 1, 63, 7, 86, 46, 66, 61, 24, 14, 15, 62], [60, 58, 17, 60, 19, 91, 78, 22, 56, 84, 99, 91, 42, 55, 30, 83, 84, 42, 86, 73, 76, 53], [95, 93, 92, 53, 56, 72, 31, 67, 4, 61, 39, 88, 64, 94, 48, 88, 23, 54, 37, 10, 18, 67], [97, 70, 9, 43, 34, 94, 43, 71, 13, 81, 56, 73, 85, 54, 35, 89, 45, 18, 8, 54, 70, 36]],12,18,), ([[54, 62, 19, 8, 61, 82, 54, 69, 91, 14, 56, 78, 22, 81, 38, 47], [22, 25, 33, 85, 89, 78, 7, 42, 24, 24, 24, 74, 89, 83, 23, 1], [79, 9, 51, 67, 71, 49, 87, 45, 81, 2, 4, 50, 16, 71, 91, 44], [77, 99, 85, 40, 90, 45, 3, 54, 39, 69, 40, 88, 81, 41, 84, 24], [84, 24, 42, 18, 51, 45, 16, 97, 97, 64, 56, 35, 9, 33, 37, 97], [61, 55, 53, 21, 5, 1, 71, 23, 87, 71, 59, 83, 27, 77, 9, 9], [60, 42, 94, 10, 69, 95, 98, 38, 54, 64, 17, 71, 83, 38, 60, 38], [2, 45, 33, 60, 92, 31, 55, 48, 31, 19, 79, 9, 81, 47, 4, 38], [68, 16, 10, 37, 43, 45, 10, 93, 47, 99, 74, 88, 79, 85, 2, 27], [69, 72, 66, 74, 32, 60, 90, 70, 88, 68, 15, 72, 65, 35, 87, 75], [49, 36, 73, 88, 81, 8, 78, 65, 98, 35, 5, 5, 46, 53, 39, 92], [5, 39, 16, 95, 34, 59, 36, 19, 80, 5, 69, 39, 26, 45, 15, 11], [14, 95, 52, 74, 90, 61, 75, 19, 71, 69, 37, 45, 8, 71, 49, 26], [71, 95, 22, 95, 95, 48, 53, 75, 96, 68, 82, 99, 9, 15, 4, 54], [26, 94, 94, 81, 47, 4, 22, 74, 41, 98, 98, 11, 89, 77, 7, 65], [47, 37, 49, 52, 68, 83, 51, 70, 32, 47, 60, 93, 61, 10, 21, 42]],12,8,), ([[39, 79, 41, 68, 91, 31, 87, 47, 16, 92, 42, 68, 79, 59, 17, 45, 68, 78, 99, 19, 51], [43, 46, 81, 76, 18, 20, 62, 54, 42, 52, 8, 66, 3, 79, 60, 12, 50, 87, 88, 70, 11], [49, 2, 91, 98, 51, 74, 47, 72, 32, 42, 92, 52, 98, 89, 9, 91, 86, 38, 78, 89, 42], [45, 76, 87, 45, 3, 88, 56, 16, 16, 59, 78, 40, 9, 7, 55, 69, 58, 39, 64, 2, 32], [65, 45, 40, 81, 13, 71, 33, 46, 27, 47, 92, 5, 9, 75, 80, 2, 90, 50, 40, 4, 1], [99, 5, 44, 17, 65, 99, 27, 27, 5, 1, 87, 95, 78, 27, 4, 40, 57, 79, 82, 46, 33], [99, 3, 6, 49, 52, 24, 66, 91, 66, 84, 92, 96, 48, 24, 81, 69, 46, 58, 16, 49, 83], [2, 42, 95, 3, 17, 63, 45, 82, 69, 10, 86, 44, 64, 55, 2, 44, 93, 16, 98, 3, 41], [27, 2, 95, 31, 58, 64, 21, 14, 90, 14, 86, 42, 84, 47, 4, 82, 70, 47, 97, 1, 49], [59, 74, 19, 7, 3, 89, 77, 72, 52, 57, 86, 31, 70, 55, 89, 25, 43, 52, 24, 50, 30], [89, 57, 9, 45, 89, 74, 76, 89, 23, 90, 57, 77, 38, 25, 49, 3, 85, 90, 90, 26, 47], [55, 39, 1, 53, 31, 10, 76, 47, 77, 33, 6, 22, 29, 95, 29, 14, 32, 28, 27, 11, 93], [95, 75, 56, 23, 21, 30, 76, 98, 25, 79, 41, 3, 63, 87, 96, 53, 92, 40, 74, 22, 8], [91, 35, 88, 59, 74, 92, 5, 6, 56, 42, 97, 80, 14, 45, 12, 61, 63, 79, 73, 52, 81], [73, 86, 4, 14, 11, 1, 47, 35, 12, 99, 37, 31, 61, 86, 60, 17, 28, 82, 3, 18, 20], [46, 85, 58, 67, 3, 32, 53, 13, 86, 7, 78, 12, 29, 48, 58, 37, 77, 43, 75, 14, 42], [38, 93, 44, 22, 94, 76, 29, 63, 20, 19, 51, 57, 53, 11, 9, 63, 24, 43, 51, 11, 37], [19, 71, 53, 61, 91, 91, 20, 99, 7, 81, 88, 37, 29, 9, 23, 10, 22, 38, 55, 89, 29], [62, 33, 81, 98, 9, 79, 80, 50, 63, 67, 64, 95, 69, 84, 22, 4, 98, 71, 1, 81, 77], [97, 1, 28, 52, 20, 16, 45, 31, 69, 9, 98, 60, 55, 97, 5, 3, 95, 77, 65, 54, 32], [71, 97, 30, 68, 74, 7, 15, 99, 62, 39, 20, 55, 30, 22, 20, 31, 54, 31, 93, 10, 80]],18,12,), ([[48, 19, 66, 15, 8, 54, 8, 66, 22, 72, 93, 33, 96, 26, 89, 57, 86, 16, 99, 75, 9, 20, 36, 26], [67, 60, 72, 35, 68, 26, 18, 53, 54, 82, 23, 15, 89, 43, 82, 1, 33, 46, 61, 87, 93, 27, 33, 21], [7, 78, 68, 44, 49, 95, 1, 16, 16, 7, 1, 92, 3, 44, 47, 52, 31, 61, 41, 28, 95, 28, 51, 46], [98, 90, 93, 45, 10, 2, 88, 20, 1, 67, 2, 75, 27, 31, 68, 59, 11, 50, 4, 40, 5, 61, 34, 24], [41, 37, 20, 59, 32, 13, 84, 27, 58, 17, 40, 54, 43, 7, 30, 97, 90, 6, 40, 68, 95, 99, 2, 81], [83, 50, 27, 89, 94, 39, 35, 9, 45, 45, 9, 20, 25, 12, 36, 18, 74, 75, 69, 66, 37, 82, 16, 25], [84, 20, 8, 12, 15, 79, 41, 13, 81, 39, 48, 76, 65, 89, 70, 85, 93, 48, 51, 16, 87, 37, 30, 96], [29, 45, 15, 54, 15, 54, 4, 36, 9, 81, 22, 74, 25, 17, 61, 80, 78, 70, 39, 46, 14, 16, 69, 43], [32, 81, 24, 3, 19, 56, 37, 2, 42, 2, 87, 90, 14, 41, 50, 66, 5, 32, 83, 72, 62, 16, 87, 46], [17, 7, 38, 46, 97, 72, 9, 17, 32, 80, 47, 15, 20, 21, 61, 28, 11, 12, 34, 86, 11, 50, 98, 66], [32, 52, 6, 16, 31, 72, 58, 64, 21, 10, 33, 37, 34, 32, 34, 21, 44, 82, 82, 66, 70, 99, 50, 6], [90, 84, 81, 74, 86, 24, 34, 66, 16, 89, 58, 92, 98, 12, 71, 74, 6, 9, 35, 41, 32, 78, 1, 42], [1, 24, 27, 69, 79, 52, 11, 85, 7, 66, 11, 24, 90, 72, 98, 15, 37, 33, 36, 68, 16, 69, 66, 62], [25, 97, 59, 93, 94, 2, 46, 61, 60, 24, 19, 21, 7, 91, 93, 19, 1, 84, 70, 46, 19, 36, 44, 31], [97, 67, 2, 88, 1, 15, 75, 35, 48, 69, 72, 53, 90, 75, 74, 59, 8, 53, 39, 29, 4, 44, 92, 24], [87, 84, 38, 81, 81, 71, 32, 87, 72, 23, 34, 6, 88, 33, 56, 25, 31, 28, 89, 50, 14, 55, 1, 7], [85, 64, 80, 66, 71, 99, 62, 53, 87, 71, 86, 59, 74, 85, 68, 31, 38, 34, 36, 14, 13, 95, 81, 47], [25, 70, 61, 78, 68, 26, 23, 57, 84, 61, 14, 22, 40, 83, 68, 29, 75, 21, 54, 92, 47, 29, 47, 64], [43, 12, 8, 16, 12, 80, 76, 31, 22, 96, 74, 64, 30, 54, 39, 60, 13, 8, 44, 80, 56, 45, 58, 28], [54, 12, 30, 68, 79, 24, 78, 79, 64, 33, 40, 44, 74, 50, 31, 94, 44, 42, 57, 4, 82, 66, 27, 77], [80, 2, 92, 92, 97, 18, 55, 73, 34, 26, 1, 11, 3, 3, 51, 13, 49, 65, 70, 8, 33, 88, 93, 97], [34, 96, 94, 8, 28, 58, 22, 8, 60, 57, 86, 16, 84, 63, 21, 84, 59, 83, 75, 46, 95, 54, 52, 16], [81, 18, 98, 77, 20, 14, 13, 18, 2, 86, 46, 48, 49, 26, 69, 54, 63, 76, 97, 11, 39, 58, 75, 87], [36, 48, 94, 97, 96, 39, 34, 90, 17, 48, 72, 39, 85, 40, 63, 85, 41, 55, 23, 76, 39, 21, 52, 27]],20,18,), ([[45, 42, 10, 70, 41, 89, 22, 51, 39, 46, 25, 16, 53, 79, 40, 94, 32, 42, 36, 72, 38, 23, 87, 9, 24], [76, 21, 4, 75, 31, 69, 97, 57, 38, 25, 98, 78, 51, 37, 19, 29, 73, 57, 81, 83, 82, 19, 25, 93, 80], [72, 9, 91, 68, 96, 53, 68, 30, 52, 70, 80, 60, 61, 53, 25, 30, 10, 36, 92, 15, 19, 75, 83, 54, 57], [6, 31, 21, 12, 97, 20, 53, 80, 76, 41, 42, 1, 9, 89, 35, 3, 68, 29, 20, 29, 18, 86, 67, 21, 83], [45, 46, 53, 3, 55, 32, 40, 51, 40, 54, 89, 93, 81, 5, 93, 28, 7, 19, 84, 62, 21, 53, 55, 16, 25], [55, 37, 70, 58, 26, 71, 89, 81, 11, 29, 66, 99, 82, 2, 86, 91, 47, 90, 30, 45, 70, 62, 10, 13, 77], [48, 68, 68, 43, 69, 27, 80, 39, 88, 28, 70, 36, 19, 79, 86, 11, 53, 74, 99, 77, 37, 88, 97, 66, 7], [58, 69, 76, 76, 50, 29, 40, 47, 2, 67, 12, 42, 27, 27, 57, 48, 77, 49, 93, 24, 83, 27, 81, 1, 58], [78, 82, 51, 58, 67, 53, 97, 94, 77, 33, 98, 18, 66, 87, 96, 50, 77, 8, 62, 21, 71, 87, 83, 56, 54], [95, 45, 29, 19, 52, 65, 12, 58, 38, 50, 80, 27, 80, 31, 66, 35, 68, 51, 47, 96, 62, 94, 22, 66, 21], [23, 29, 38, 27, 67, 30, 52, 15, 90, 85, 25, 67, 51, 91, 92, 71, 81, 17, 79, 50, 23, 80, 29, 64, 74], [7, 79, 94, 85, 6, 82, 98, 69, 37, 93, 82, 93, 76, 94, 87, 93, 84, 7, 67, 18, 27, 70, 98, 25, 62], [64, 31, 65, 86, 15, 8, 13, 23, 35, 54, 57, 62, 45, 50, 20, 81, 58, 34, 69, 35, 94, 13, 44, 78, 48], [98, 25, 26, 89, 53, 89, 20, 20, 51, 54, 76, 28, 55, 45, 75, 86, 90, 29, 41, 19, 1, 63, 17, 51, 5], [26, 68, 55, 36, 33, 15, 92, 63, 9, 53, 97, 63, 9, 63, 95, 8, 28, 74, 58, 57, 35, 66, 56, 17, 40], [40, 73, 83, 78, 5, 28, 71, 97, 66, 84, 47, 47, 13, 92, 99, 71, 15, 17, 86, 19, 74, 33, 17, 63, 20], [59, 14, 65, 17, 39, 59, 61, 95, 62, 32, 33, 39, 88, 49, 87, 11, 17, 32, 19, 11, 61, 95, 75, 50, 5], [81, 34, 42, 39, 28, 11, 20, 98, 60, 26, 2, 8, 64, 10, 55, 94, 24, 66, 88, 13, 81, 37, 99, 83, 83], [92, 18, 41, 52, 83, 78, 53, 87, 26, 47, 14, 97, 91, 45, 77, 37, 39, 22, 1, 46, 52, 42, 8, 99, 17], [30, 40, 15, 66, 32, 80, 35, 5, 90, 6, 56, 30, 51, 33, 48, 74, 9, 51, 58, 46, 32, 47, 59, 97, 33], [60, 14, 19, 5, 98, 49, 4, 94, 66, 59, 44, 28, 35, 60, 12, 80, 80, 6, 42, 99, 7, 35, 72, 76, 60], [73, 83, 80, 67, 93, 71, 52, 2, 91, 88, 30, 12, 70, 74, 88, 4, 21, 65, 12, 79, 48, 25, 8, 85, 82], [20, 75, 62, 20, 10, 71, 60, 52, 34, 17, 58, 88, 64, 3, 37, 52, 35, 20, 9, 20, 80, 36, 15, 94, 88], [19, 47, 94, 21, 5, 37, 13, 40, 74, 87, 17, 48, 9, 65, 96, 33, 68, 25, 72, 43, 85, 50, 70, 82, 80], [21, 88, 58, 48, 84, 38, 37, 33, 92, 56, 16, 71, 9, 50, 45, 66, 61, 61, 93, 37, 97, 36, 38, 3, 2]],24,15,), ([[67, 61, 32, 22, 31, 43, 25, 63, 3, 92, 10, 14, 64, 23, 61, 58, 67, 98, 19, 25, 98, 71, 41, 23, 17, 63, 20, 17, 59, 89, 92, 20, 28, 94, 38, 41, 20, 63, 67, 88, 68, 90, 50, 64], [64, 48, 46, 95, 50, 42, 25, 50, 77, 30, 3, 62, 81, 31, 11, 99, 52, 24, 70, 86, 98, 27, 53, 71, 24, 84, 1, 34, 70, 51, 75, 57, 37, 14, 83, 21, 82, 88, 4, 56, 88, 66, 31, 88], [48, 68, 58, 58, 7, 23, 44, 49, 84, 87, 89, 22, 42, 4, 57, 60, 36, 54, 69, 3, 61, 82, 14, 41, 37, 69, 76, 30, 78, 74, 93, 79, 82, 44, 6, 66, 37, 80, 98, 20, 32, 13, 99, 73], [58, 86, 91, 80, 4, 35, 46, 27, 79, 87, 94, 34, 24, 22, 21, 94, 16, 72, 91, 70, 53, 66, 64, 42, 71, 31, 36, 77, 70, 65, 39, 22, 43, 41, 23, 85, 20, 32, 77, 9, 16, 11, 88, 71], [6, 33, 85, 2, 73, 8, 3, 3, 48, 45, 21, 63, 77, 46, 71, 47, 54, 93, 40, 56, 95, 77, 13, 51, 43, 58, 18, 26, 96, 63, 62, 69, 60, 72, 47, 74, 44, 77, 17, 9, 7, 69, 5, 90], [25, 49, 72, 10, 59, 4, 11, 43, 79, 15, 66, 50, 59, 42, 72, 57, 13, 65, 74, 93, 90, 52, 34, 26, 12, 43, 34, 6, 63, 27, 47, 45, 4, 96, 51, 21, 74, 91, 12, 21, 34, 94, 55, 75], [72, 45, 43, 54, 9, 93, 57, 13, 59, 90, 47, 16, 78, 82, 98, 94, 7, 98, 40, 70, 57, 83, 42, 6, 36, 60, 96, 11, 38, 36, 79, 5, 24, 84, 35, 70, 61, 3, 54, 64, 58, 65, 54, 80], [91, 61, 97, 86, 81, 18, 9, 66, 58, 55, 73, 86, 13, 95, 10, 49, 12, 98, 97, 85, 47, 37, 67, 62, 12, 25, 51, 69, 77, 47, 91, 66, 85, 74, 69, 10, 96, 66, 41, 30, 95, 43, 66, 31], [57, 50, 96, 40, 96, 8, 25, 10, 88, 47, 54, 54, 55, 72, 77, 60, 97, 87, 5, 30, 24, 1, 96, 95, 81, 89, 42, 65, 69, 34, 88, 37, 4, 48, 10, 74, 44, 55, 84, 76, 72, 17, 97, 38], [93, 52, 95, 81, 54, 74, 7, 40, 98, 99, 79, 39, 14, 58, 72, 9, 66, 11, 67, 77, 74, 83, 75, 31, 82, 67, 80, 80, 18, 26, 84, 61, 36, 3, 13, 22, 16, 87, 55, 13, 42, 19, 95, 3], [83, 10, 52, 84, 97, 72, 53, 18, 85, 10, 1, 53, 96, 7, 57, 14, 27, 77, 15, 86, 12, 46, 59, 23, 30, 58, 63, 68, 19, 94, 4, 57, 25, 33, 17, 97, 88, 80, 10, 24, 13, 55, 71, 6], [97, 7, 58, 88, 38, 52, 32, 12, 93, 50, 58, 97, 24, 85, 77, 91, 52, 10, 56, 18, 61, 85, 58, 7, 7, 64, 22, 81, 94, 60, 42, 68, 84, 76, 83, 50, 28, 82, 89, 27, 96, 43, 28, 39], [86, 3, 88, 2, 33, 97, 8, 15, 40, 94, 84, 9, 62, 6, 39, 47, 9, 10, 29, 6, 52, 78, 87, 4, 64, 20, 85, 7, 89, 8, 50, 83, 4, 49, 72, 44, 24, 49, 21, 72, 64, 84, 39, 51], [88, 80, 76, 94, 47, 13, 29, 30, 85, 20, 85, 92, 78, 2, 59, 7, 87, 24, 86, 83, 25, 8, 26, 22, 93, 56, 74, 19, 9, 7, 71, 65, 79, 25, 76, 63, 87, 93, 44, 16, 76, 92, 98, 85], [67, 42, 81, 11, 30, 32, 64, 67, 30, 8, 22, 70, 35, 47, 5, 35, 89, 82, 31, 98, 42, 50, 87, 99, 18, 24, 35, 81, 40, 11, 83, 52, 16, 69, 53, 97, 73, 16, 37, 2, 32, 60, 86, 89], [39, 47, 27, 27, 81, 67, 65, 76, 8, 75, 27, 21, 44, 48, 61, 94, 42, 22, 46, 15, 95, 97, 57, 9, 61, 78, 74, 13, 48, 48, 89, 91, 37, 2, 8, 85, 19, 56, 27, 22, 26, 19, 49, 94], [87, 67, 37, 46, 62, 40, 85, 22, 73, 99, 51, 36, 99, 47, 43, 13, 37, 91, 58, 71, 90, 93, 73, 15, 92, 84, 1, 59, 3, 84, 36, 66, 8, 23, 16, 88, 79, 43, 52, 10, 15, 69, 24, 23], [19, 47, 92, 46, 24, 53, 91, 58, 15, 30, 46, 82, 43, 65, 88, 68, 18, 90, 24, 35, 41, 69, 48, 53, 48, 86, 65, 75, 2, 87, 89, 40, 26, 3, 95, 2, 24, 32, 37, 57, 85, 94, 77, 81], [24, 26, 2, 36, 32, 10, 44, 77, 59, 11, 15, 98, 12, 47, 70, 44, 18, 7, 6, 16, 67, 23, 3, 51, 51, 82, 86, 6, 18, 53, 49, 25, 22, 42, 99, 83, 90, 85, 66, 22, 22, 26, 15, 24], [84, 24, 11, 3, 88, 47, 6, 60, 25, 92, 84, 11, 42, 25, 81, 18, 81, 43, 8, 85, 79, 27, 99, 5, 16, 66, 79, 14, 73, 78, 29, 74, 15, 95, 13, 79, 39, 36, 79, 60, 6, 85, 36, 81], [6, 20, 9, 7, 85, 83, 50, 31, 90, 91, 7, 38, 20, 26, 15, 14, 53, 49, 7, 9, 15, 17, 94, 18, 88, 63, 22, 34, 26, 66, 54, 30, 9, 19, 53, 11, 13, 5, 32, 51, 35, 48, 82, 63], [80, 96, 47, 59, 1, 91, 84, 75, 95, 31, 43, 32, 70, 34, 95, 54, 13, 49, 27, 73, 50, 69, 29, 75, 17, 50, 88, 42, 76, 95, 51, 19, 87, 34, 91, 20, 90, 5, 64, 2, 34, 54, 76, 46], [85, 70, 55, 7, 39, 24, 41, 60, 89, 74, 2, 18, 50, 75, 96, 84, 1, 97, 18, 1, 42, 23, 17, 59, 98, 44, 49, 83, 50, 50, 77, 37, 12, 56, 32, 67, 72, 6, 32, 65, 7, 76, 52, 54], [46, 45, 14, 49, 65, 22, 4, 3, 28, 21, 43, 19, 1, 35, 31, 50, 67, 46, 65, 44, 74, 3, 76, 27, 84, 74, 66, 97, 14, 21, 32, 93, 45, 27, 57, 51, 9, 72, 27, 50, 44, 45, 11, 69], [25, 24, 88, 33, 90, 89, 56, 49, 69, 69, 2, 85, 95, 78, 79, 51, 46, 26, 20, 99, 3, 99, 2, 27, 82, 59, 24, 57, 68, 94, 17, 26, 10, 19, 86, 24, 50, 44, 28, 5, 69, 23, 68, 9], [29, 5, 31, 57, 47, 89, 65, 37, 32, 54, 64, 70, 48, 19, 50, 88, 88, 84, 33, 84, 1, 42, 43, 83, 90, 64, 72, 8, 58, 80, 33, 96, 4, 53, 84, 58, 29, 70, 24, 96, 36, 37, 58, 97], [73, 47, 38, 22, 77, 37, 38, 22, 3, 57, 14, 27, 59, 24, 68, 68, 87, 94, 5, 32, 97, 26, 52, 90, 46, 65, 69, 14, 33, 66, 63, 70, 57, 80, 82, 89, 77, 15, 79, 91, 75, 67, 4, 53], [88, 3, 45, 71, 71, 2, 27, 68, 22, 59, 58, 47, 89, 82, 74, 10, 32, 24, 74, 68, 36, 20, 98, 83, 34, 6, 75, 36, 26, 7, 74, 98, 19, 61, 86, 16, 86, 51, 46, 46, 81, 59, 39, 79], [84, 11, 50, 52, 59, 41, 98, 62, 3, 23, 91, 15, 83, 4, 37, 36, 77, 97, 66, 19, 37, 92, 79, 32, 18, 50, 53, 1, 71, 28, 95, 7, 12, 11, 80, 78, 81, 11, 98, 92, 28, 5, 23, 49], [37, 57, 14, 93, 49, 66, 35, 63, 83, 84, 19, 20, 17, 16, 83, 21, 28, 29, 7, 10, 70, 55, 54, 24, 86, 85, 8, 83, 27, 87, 63, 46, 45, 39, 8, 18, 78, 75, 6, 2, 67, 33, 2, 58], [9, 52, 26, 95, 57, 4, 49, 80, 60, 90, 39, 83, 14, 49, 22, 99, 7, 72, 62, 11, 76, 99, 33, 93, 90, 53, 20, 47, 23, 89, 5, 22, 16, 89, 40, 89, 54, 22, 74, 51, 11, 21, 79, 80], [66, 12, 85, 75, 41, 2, 23, 46, 57, 90, 45, 32, 77, 74, 90, 73, 75, 22, 3, 13, 94, 89, 2, 12, 64, 4, 45, 21, 35, 45, 33, 44, 86, 86, 44, 40, 97, 51, 30, 46, 76, 20, 76, 5], [35, 15, 99, 54, 22, 51, 23, 42, 37, 47, 90, 34, 11, 50, 32, 78, 42, 54, 28, 28, 36, 5, 51, 45, 44, 47, 83, 48, 5, 38, 98, 73, 97, 72, 81, 45, 40, 94, 51, 1, 35, 63, 69, 48], [53, 69, 64, 24, 50, 8, 77, 80, 54, 15, 52, 5, 17, 55, 80, 35, 7, 80, 14, 91, 34, 30, 61, 99, 59, 39, 32, 18, 39, 1, 26, 75, 2, 8, 46, 63, 24, 99, 97, 23, 86, 58, 77, 61], [79, 15, 11, 8, 31, 31, 21, 37, 12, 64, 24, 38, 23, 39, 91, 48, 23, 67, 55, 62, 56, 10, 62, 3, 96, 60, 54, 42, 63, 18, 5, 74, 32, 19, 49, 7, 47, 13, 9, 66, 50, 89, 49, 17], [9, 14, 44, 11, 27, 85, 41, 71, 76, 60, 29, 15, 82, 35, 91, 54, 31, 26, 34, 47, 8, 46, 85, 99, 61, 50, 15, 25, 66, 7, 16, 69, 11, 72, 90, 17, 6, 94, 12, 34, 47, 62, 88, 96], [7, 41, 81, 66, 10, 11, 72, 78, 94, 4, 11, 45, 73, 25, 88, 38, 25, 50, 2, 14, 98, 86, 3, 84, 7, 84, 29, 7, 7, 97, 15, 23, 70, 10, 19, 14, 25, 96, 64, 64, 33, 8, 15, 97], [31, 90, 82, 65, 98, 19, 90, 90, 7, 1, 20, 19, 39, 39, 56, 30, 94, 65, 43, 74, 12, 89, 81, 28, 16, 88, 54, 74, 31, 91, 44, 52, 80, 13, 95, 62, 10, 10, 79, 91, 71, 31, 66, 92], [87, 2, 17, 28, 71, 7, 17, 37, 37, 72, 2, 25, 25, 35, 64, 95, 66, 69, 90, 63, 34, 16, 80, 77, 41, 78, 25, 9, 99, 3, 62, 17, 2, 79, 16, 82, 83, 67, 97, 49, 76, 32, 25, 32], [22, 53, 6, 71, 49, 38, 44, 43, 77, 95, 28, 19, 76, 12, 82, 48, 91, 25, 66, 50, 78, 28, 44, 69, 26, 83, 25, 15, 96, 20, 77, 1, 33, 88, 8, 38, 28, 79, 34, 34, 29, 78, 9, 52], [44, 10, 43, 22, 19, 24, 34, 3, 14, 37, 37, 30, 87, 48, 75, 99, 84, 99, 18, 65, 52, 93, 64, 90, 73, 91, 11, 23, 40, 72, 7, 61, 98, 11, 8, 42, 32, 86, 40, 21, 19, 90, 95, 52], [12, 51, 98, 82, 51, 4, 86, 40, 74, 1, 82, 26, 56, 54, 89, 81, 38, 73, 25, 18, 3, 95, 8, 86, 38, 6, 55, 56, 65, 40, 88, 40, 68, 41, 84, 40, 93, 7, 16, 79, 5, 52, 20, 71], [56, 34, 12, 72, 32, 49, 62, 57, 25, 69, 16, 51, 76, 23, 40, 41, 15, 39, 77, 63, 63, 22, 95, 86, 73, 26, 28, 44, 35, 92, 42, 52, 7, 23, 71, 88, 92, 99, 44, 4, 81, 78, 51, 69], [29, 17, 82, 37, 10, 15, 25, 54, 37, 30, 60, 73, 16, 85, 56, 98, 42, 99, 14, 46, 78, 50, 72, 61, 72, 4, 39, 99, 71, 55, 50, 46, 80, 21, 96, 49, 47, 10, 70, 29, 60, 16, 24, 60]],30,36,), ([[10, 67, 53, 58, 73, 24, 62, 89, 36, 84, 54, 60, 46, 96, 96, 92, 26, 82, 97, 63], [48, 41, 1, 86, 53, 43, 18, 90, 36, 96, 15, 29, 95, 85, 70, 25, 86, 25, 26, 76], [62, 70, 29, 37, 26, 52, 66, 37, 64, 30, 55, 90, 77, 26, 1, 91, 73, 37, 75, 10], [37, 25, 56, 27, 77, 68, 12, 12, 31, 9, 54, 8, 6, 38, 8, 59, 80, 17, 35, 10], [84, 63, 29, 21, 63, 58, 6, 76, 14, 43, 20, 88, 95, 82, 81, 30, 36, 53, 41, 35], [12, 20, 52, 81, 63, 57, 16, 97, 91, 89, 19, 62, 95, 56, 54, 13, 6, 61, 67, 86], [88, 77, 55, 5, 57, 19, 14, 94, 46, 2, 65, 49, 64, 86, 45, 54, 89, 67, 3, 90], [46, 18, 40, 16, 53, 95, 61, 90, 34, 18, 86, 6, 99, 4, 42, 20, 33, 87, 51, 81], [91, 94, 23, 19, 60, 94, 94, 16, 43, 45, 94, 78, 23, 79, 86, 82, 70, 15, 79, 60], [43, 54, 93, 45, 56, 71, 75, 98, 99, 22, 35, 76, 48, 98, 67, 29, 12, 97, 37, 77], [33, 63, 58, 43, 8, 94, 28, 18, 4, 11, 80, 38, 35, 67, 48, 41, 4, 21, 62, 17], [48, 23, 50, 36, 84, 41, 78, 91, 78, 38, 72, 52, 41, 21, 14, 53, 32, 43, 1, 65], [22, 5, 5, 11, 55, 80, 64, 98, 49, 41, 77, 61, 75, 48, 65, 51, 4, 2, 54, 55], [36, 33, 97, 47, 39, 18, 23, 11, 93, 47, 58, 76, 33, 76, 18, 21, 22, 53, 87, 72], [77, 9, 31, 43, 61, 78, 92, 74, 94, 66, 63, 54, 94, 39, 5, 91, 5, 36, 7, 87], [10, 50, 16, 13, 94, 93, 26, 48, 80, 23, 56, 93, 85, 46, 16, 37, 73, 86, 50, 41], [1, 49, 47, 8, 53, 12, 8, 62, 90, 60, 29, 61, 87, 81, 87, 76, 59, 44, 72, 79], [9, 63, 35, 78, 26, 57, 4, 37, 95, 93, 13, 52, 40, 76, 28, 9, 94, 80, 76, 96], [48, 39, 62, 36, 11, 9, 59, 79, 23, 73, 62, 64, 5, 77, 9, 1, 51, 66, 91, 53], [38, 84, 93, 19, 79, 34, 77, 87, 14, 83, 86, 10, 36, 65, 98, 5, 78, 15, 66, 87]],15,14,), ([[77, 56, 21, 16, 3, 4, 66, 99, 72, 94, 34, 33, 76, 11, 85, 89, 9, 74], [19, 31, 23, 11, 31, 52, 97, 53, 56, 6, 28, 4, 68, 74, 92, 14, 90, 64], [61, 79, 82, 4, 63, 17, 35, 22, 53, 84, 18, 49, 57, 77, 67, 52, 63, 50], [15, 14, 6, 59, 1, 21, 5, 46, 43, 70, 54, 51, 90, 94, 92, 97, 91, 53], [91, 42, 70, 95, 16, 16, 29, 89, 52, 60, 1, 60, 39, 54, 48, 71, 94, 69], [4, 86, 36, 45, 15, 74, 86, 35, 5, 55, 14, 51, 81, 76, 76, 67, 32, 1], [79, 1, 94, 83, 6, 91, 26, 32, 55, 77, 17, 90, 37, 99, 68, 40, 44, 87], [63, 57, 15, 2, 26, 35, 92, 15, 16, 53, 14, 4, 49, 99, 18, 47, 35, 85], [72, 52, 11, 94, 54, 45, 98, 39, 94, 4, 68, 72, 6, 18, 94, 33, 61, 22], [20, 62, 47, 73, 41, 88, 83, 88, 96, 73, 4, 67, 28, 91, 11, 56, 95, 15], [32, 29, 44, 46, 61, 48, 51, 64, 59, 47, 49, 17, 30, 75, 30, 10, 58, 76], [96, 46, 69, 13, 88, 44, 82, 58, 93, 96, 43, 51, 91, 86, 68, 72, 6, 83], [84, 40, 99, 55, 58, 57, 32, 5, 30, 83, 30, 27, 50, 42, 56, 11, 18, 88], [3, 94, 46, 14, 38, 91, 36, 62, 80, 54, 62, 60, 83, 93, 97, 4, 38, 36], [70, 84, 86, 57, 43, 23, 7, 59, 5, 24, 12, 37, 49, 10, 82, 83, 45, 71], [25, 75, 55, 79, 31, 96, 47, 61, 25, 1, 66, 12, 16, 46, 84, 52, 57, 50], [86, 98, 54, 8, 35, 6, 85, 99, 58, 48, 49, 76, 29, 36, 82, 77, 72, 68], [95, 53, 87, 51, 41, 30, 56, 16, 31, 33, 48, 91, 17, 90, 47, 59, 75, 7]],16,10,), ([[34, 1, 55, 60, 18, 68, 91, 6, 94, 26, 74, 59, 4, 58, 39, 76, 49, 81, 16, 6, 76, 4, 89, 24, 75, 14, 42, 58, 50, 97, 13, 37, 17, 12, 49, 87, 66, 41, 35, 8, 92, 76, 97, 76, 87, 34, 31, 98], [90, 60, 31, 75, 59, 62, 78, 99, 32, 64, 98, 14, 13, 54, 62, 66, 71, 90, 8, 14, 79, 19, 22, 89, 55, 57, 14, 64, 90, 48, 26, 49, 5, 1, 92, 2, 25, 59, 49, 62, 56, 24, 79, 60, 70, 18, 93, 11], [27, 45, 53, 94, 75, 27, 40, 42, 87, 55, 73, 75, 86, 13, 77, 16, 41, 8, 30, 71, 34, 11, 70, 90, 59, 4, 86, 38, 9, 17, 5, 44, 39, 49, 47, 16, 80, 5, 84, 77, 73, 65, 33, 67, 90, 10, 6, 91], [86, 24, 6, 58, 22, 53, 14, 6, 38, 5, 94, 58, 77, 96, 52, 88, 57, 76, 19, 80, 52, 61, 41, 25, 6, 42, 34, 25, 77, 58, 12, 1, 45, 42, 67, 9, 8, 53, 79, 53, 54, 34, 69, 21, 68, 49, 86, 9], [71, 11, 83, 90, 39, 31, 56, 64, 69, 40, 91, 57, 59, 4, 97, 70, 27, 33, 85, 21, 17, 82, 10, 16, 12, 99, 89, 82, 34, 40, 70, 53, 88, 77, 18, 15, 99, 93, 62, 25, 3, 98, 9, 43, 46, 16, 16, 88], [43, 71, 10, 81, 76, 35, 37, 17, 59, 7, 86, 34, 53, 27, 4, 49, 61, 89, 73, 14, 38, 7, 63, 73, 8, 78, 29, 28, 62, 72, 25, 54, 89, 86, 99, 15, 59, 29, 57, 67, 67, 18, 72, 85, 51, 76, 69, 43], [19, 57, 50, 26, 95, 65, 89, 97, 97, 20, 48, 74, 57, 29, 79, 66, 4, 42, 67, 73, 55, 90, 58, 46, 34, 44, 78, 6, 28, 68, 61, 76, 22, 1, 25, 9, 81, 17, 79, 54, 83, 80, 43, 39, 13, 31, 75, 52], [46, 21, 43, 57, 20, 54, 26, 30, 88, 15, 65, 17, 37, 49, 52, 84, 81, 57, 72, 89, 46, 79, 89, 42, 20, 8, 76, 45, 34, 18, 90, 24, 36, 70, 80, 18, 22, 58, 93, 92, 95, 72, 95, 46, 36, 65, 5, 16], [7, 96, 69, 10, 42, 76, 23, 25, 73, 93, 61, 72, 85, 70, 34, 77, 36, 83, 88, 75, 23, 33, 71, 63, 69, 60, 54, 89, 68, 56, 30, 47, 99, 22, 17, 95, 68, 42, 67, 96, 39, 90, 3, 71, 75, 5, 19, 43], [23, 91, 35, 60, 60, 78, 49, 80, 78, 42, 86, 42, 3, 2, 7, 45, 57, 84, 49, 35, 91, 16, 39, 51, 34, 1, 99, 57, 36, 18, 34, 44, 62, 84, 41, 15, 78, 78, 46, 33, 39, 2, 75, 79, 7, 90, 99, 34], [70, 61, 64, 66, 92, 86, 11, 85, 26, 99, 11, 10, 32, 72, 3, 52, 21, 2, 52, 25, 17, 69, 22, 9, 97, 65, 79, 90, 93, 46, 84, 33, 33, 84, 3, 52, 70, 18, 15, 3, 90, 70, 7, 77, 78, 90, 41, 95], [20, 62, 11, 12, 16, 66, 64, 45, 10, 33, 79, 52, 34, 17, 57, 47, 24, 37, 57, 89, 74, 63, 38, 59, 50, 90, 27, 60, 63, 72, 89, 24, 76, 42, 82, 30, 69, 30, 22, 49, 83, 29, 26, 70, 57, 48, 54, 40], [81, 50, 53, 62, 11, 44, 96, 77, 7, 23, 22, 15, 77, 77, 46, 22, 86, 98, 62, 44, 30, 3, 55, 64, 92, 18, 22, 78, 1, 64, 39, 45, 25, 91, 23, 92, 37, 47, 66, 54, 43, 68, 4, 61, 21, 21, 3, 73], [94, 88, 19, 88, 94, 42, 38, 60, 83, 36, 92, 52, 72, 89, 53, 52, 25, 28, 49, 77, 42, 75, 80, 46, 15, 80, 40, 51, 58, 89, 4, 19, 54, 66, 39, 40, 12, 13, 5, 92, 86, 37, 85, 72, 6, 60, 55, 36], [18, 28, 83, 83, 52, 63, 61, 28, 18, 14, 98, 53, 76, 8, 4, 98, 33, 29, 61, 12, 29, 99, 51, 31, 1, 74, 14, 37, 22, 77, 69, 41, 77, 87, 8, 46, 25, 20, 60, 8, 54, 69, 88, 52, 70, 89, 45, 69], [98, 51, 93, 91, 42, 33, 87, 62, 1, 31, 5, 12, 37, 87, 29, 40, 59, 11, 1, 46, 78, 82, 90, 6, 23, 98, 90, 79, 36, 87, 83, 25, 61, 89, 11, 63, 3, 11, 96, 98, 23, 81, 62, 83, 79, 4, 43, 54], [61, 26, 32, 69, 69, 62, 95, 36, 41, 46, 32, 98, 62, 43, 49, 22, 33, 88, 36, 29, 15, 9, 30, 74, 96, 77, 41, 13, 86, 43, 96, 50, 91, 46, 29, 26, 84, 89, 49, 52, 10, 27, 8, 57, 55, 36, 54, 82], [89, 6, 53, 46, 51, 50, 49, 69, 7, 38, 53, 96, 84, 23, 13, 62, 40, 35, 12, 41, 38, 72, 72, 40, 83, 57, 2, 58, 18, 42, 20, 51, 71, 11, 71, 93, 53, 16, 35, 17, 8, 99, 57, 39, 99, 14, 22, 7], [98, 11, 25, 47, 36, 80, 96, 77, 93, 84, 52, 25, 14, 19, 13, 98, 75, 70, 94, 27, 87, 53, 8, 31, 1, 41, 31, 75, 51, 36, 69, 43, 2, 12, 19, 77, 7, 89, 61, 96, 99, 5, 10, 99, 78, 67, 98, 94], [61, 48, 23, 56, 86, 87, 32, 87, 39, 93, 86, 41, 48, 32, 8, 80, 31, 54, 77, 48, 8, 28, 31, 73, 48, 84, 32, 4, 45, 7, 19, 34, 91, 36, 13, 9, 50, 83, 9, 50, 90, 79, 78, 15, 37, 80, 52, 99], [27, 5, 64, 47, 73, 88, 29, 61, 88, 91, 99, 44, 25, 93, 77, 80, 76, 95, 27, 59, 98, 97, 69, 99, 5, 58, 7, 16, 74, 43, 48, 59, 4, 33, 36, 75, 10, 73, 60, 48, 85, 35, 77, 61, 26, 61, 65, 30], [39, 84, 58, 47, 4, 37, 53, 41, 54, 75, 98, 50, 98, 36, 16, 95, 85, 32, 63, 45, 70, 40, 92, 81, 30, 76, 41, 21, 86, 71, 13, 56, 48, 13, 36, 5, 39, 5, 21, 44, 87, 31, 26, 28, 34, 65, 75, 8], [8, 89, 99, 81, 99, 51, 90, 59, 75, 96, 23, 49, 29, 63, 15, 86, 50, 26, 51, 55, 45, 89, 88, 49, 62, 92, 52, 78, 58, 53, 63, 84, 45, 43, 52, 3, 12, 42, 4, 87, 81, 32, 52, 44, 79, 1, 62, 63], [77, 11, 44, 2, 2, 81, 31, 15, 15, 58, 6, 90, 84, 99, 95, 64, 67, 21, 92, 22, 97, 35, 13, 77, 37, 46, 9, 92, 10, 26, 90, 94, 25, 57, 4, 36, 61, 97, 1, 18, 86, 32, 8, 67, 81, 70, 48, 90], [17, 69, 7, 39, 49, 60, 41, 58, 75, 85, 89, 62, 11, 55, 85, 37, 20, 24, 80, 36, 68, 75, 94, 3, 11, 42, 5, 43, 75, 76, 16, 78, 79, 61, 67, 78, 79, 61, 8, 24, 66, 31, 97, 35, 91, 33, 31, 60], [25, 42, 49, 77, 52, 3, 53, 62, 34, 91, 21, 85, 24, 73, 60, 10, 55, 97, 7, 73, 41, 39, 86, 40, 58, 76, 9, 12, 7, 91, 32, 43, 48, 95, 55, 71, 39, 41, 26, 61, 30, 98, 89, 39, 14, 40, 6, 76], [64, 99, 34, 93, 26, 89, 72, 1, 31, 68, 93, 46, 44, 96, 88, 92, 6, 70, 68, 33, 83, 39, 15, 42, 70, 86, 53, 78, 23, 9, 15, 10, 17, 71, 96, 22, 8, 40, 90, 94, 32, 95, 90, 7, 13, 49, 4, 97], [53, 17, 23, 66, 81, 12, 48, 28, 48, 71, 54, 35, 93, 21, 87, 34, 50, 17, 17, 1, 14, 27, 15, 35, 23, 32, 21, 56, 52, 43, 45, 38, 74, 52, 28, 40, 51, 99, 72, 47, 82, 78, 9, 16, 44, 94, 38, 90], [52, 48, 12, 76, 55, 89, 94, 97, 52, 99, 1, 29, 41, 1, 78, 43, 86, 16, 93, 29, 25, 83, 83, 78, 71, 57, 98, 19, 19, 25, 13, 55, 52, 95, 75, 14, 28, 38, 93, 88, 69, 53, 20, 44, 67, 57, 94, 7], [34, 46, 56, 14, 19, 41, 73, 18, 96, 99, 45, 82, 1, 93, 51, 80, 5, 20, 14, 29, 96, 16, 92, 18, 17, 12, 87, 77, 65, 70, 46, 90, 32, 53, 56, 69, 50, 50, 92, 52, 84, 42, 58, 11, 90, 80, 55, 66], [2, 35, 27, 4, 13, 85, 68, 1, 21, 62, 1, 95, 16, 32, 19, 80, 37, 81, 6, 97, 44, 95, 55, 88, 35, 16, 75, 35, 57, 81, 89, 9, 41, 68, 53, 58, 80, 86, 84, 43, 65, 69, 23, 32, 13, 36, 52, 5], [11, 74, 57, 15, 92, 66, 10, 83, 98, 58, 32, 95, 13, 66, 39, 33, 23, 18, 86, 90, 85, 5, 96, 2, 40, 17, 19, 7, 39, 32, 70, 90, 39, 2, 69, 57, 20, 47, 81, 20, 52, 81, 17, 91, 72, 17, 20, 98], [96, 37, 13, 9, 80, 60, 58, 46, 62, 79, 36, 48, 34, 6, 44, 30, 56, 94, 34, 79, 76, 89, 60, 3, 18, 8, 45, 95, 68, 5, 9, 82, 8, 34, 20, 27, 34, 34, 12, 15, 58, 59, 80, 76, 10, 65, 36, 39], [20, 10, 39, 70, 21, 21, 80, 89, 99, 42, 40, 67, 73, 18, 16, 74, 33, 92, 22, 28, 13, 19, 81, 38, 52, 70, 41, 39, 13, 87, 53, 61, 48, 43, 31, 14, 22, 19, 39, 95, 61, 49, 6, 36, 61, 15, 81, 53], [68, 26, 46, 53, 96, 87, 73, 7, 35, 56, 89, 41, 58, 24, 14, 4, 24, 77, 76, 47, 19, 60, 85, 1, 87, 60, 89, 88, 20, 60, 57, 56, 11, 54, 90, 85, 79, 63, 37, 33, 11, 6, 12, 9, 16, 41, 68, 52], [44, 20, 66, 30, 16, 72, 15, 3, 31, 32, 69, 93, 77, 43, 50, 63, 72, 42, 98, 28, 49, 9, 34, 49, 65, 89, 80, 31, 67, 12, 75, 27, 60, 65, 36, 96, 86, 70, 2, 39, 63, 46, 95, 40, 10, 99, 27, 22], [67, 2, 94, 6, 87, 53, 8, 87, 36, 39, 72, 59, 85, 60, 19, 36, 71, 71, 16, 48, 68, 35, 3, 99, 81, 31, 40, 45, 49, 33, 54, 69, 75, 78, 7, 60, 5, 5, 42, 57, 94, 75, 9, 32, 83, 1, 49, 15], [23, 31, 16, 78, 68, 20, 21, 55, 59, 71, 90, 72, 43, 2, 79, 11, 93, 64, 19, 21, 84, 89, 93, 1, 20, 5, 39, 77, 81, 82, 19, 44, 59, 71, 7, 63, 79, 94, 37, 63, 89, 52, 52, 30, 61, 22, 33, 3], [98, 99, 44, 46, 75, 2, 87, 79, 39, 85, 80, 76, 21, 22, 67, 46, 88, 94, 32, 43, 27, 41, 31, 99, 15, 25, 99, 66, 55, 92, 11, 18, 14, 36, 43, 12, 9, 50, 43, 97, 25, 60, 9, 70, 12, 43, 95, 87], [51, 61, 10, 97, 97, 32, 40, 18, 14, 90, 39, 1, 57, 62, 52, 51, 35, 94, 48, 63, 72, 16, 85, 24, 1, 66, 61, 7, 17, 50, 82, 31, 72, 83, 95, 15, 57, 99, 65, 51, 18, 73, 76, 94, 35, 73, 36, 84], [22, 73, 81, 80, 43, 73, 95, 3, 24, 5, 42, 31, 49, 54, 97, 53, 69, 25, 48, 67, 39, 98, 83, 83, 55, 74, 45, 83, 78, 15, 95, 56, 94, 80, 42, 38, 95, 71, 49, 94, 7, 7, 47, 13, 45, 25, 50, 64], [88, 80, 68, 97, 95, 56, 44, 59, 2, 30, 62, 54, 47, 2, 56, 68, 22, 87, 81, 71, 73, 80, 64, 87, 34, 29, 71, 98, 22, 64, 78, 29, 90, 15, 25, 66, 39, 92, 91, 75, 79, 11, 35, 57, 95, 74, 13, 27], [23, 99, 14, 62, 52, 33, 98, 58, 62, 13, 77, 21, 34, 36, 81, 40, 1, 1, 71, 59, 2, 85, 35, 50, 48, 62, 24, 24, 79, 26, 14, 52, 93, 76, 88, 98, 10, 34, 45, 73, 51, 31, 22, 19, 64, 95, 6, 8], [20, 88, 73, 46, 27, 35, 76, 10, 38, 80, 58, 26, 3, 72, 29, 45, 46, 12, 91, 23, 9, 15, 33, 15, 24, 14, 40, 73, 14, 4, 89, 78, 40, 11, 59, 76, 77, 80, 33, 3, 61, 1, 54, 65, 89, 53, 54, 38], [22, 73, 56, 45, 75, 2, 10, 5, 88, 72, 42, 34, 24, 12, 52, 23, 48, 69, 19, 77, 35, 8, 76, 85, 49, 92, 76, 5, 13, 54, 49, 58, 15, 45, 96, 72, 81, 64, 54, 82, 87, 4, 60, 23, 8, 95, 40, 13], [95, 49, 45, 39, 82, 36, 91, 66, 26, 2, 33, 80, 4, 55, 32, 81, 61, 7, 79, 83, 56, 67, 67, 5, 49, 20, 3, 61, 23, 16, 10, 64, 62, 36, 79, 74, 49, 67, 64, 14, 84, 29, 68, 52, 62, 39, 54, 50], [75, 71, 26, 55, 45, 54, 26, 94, 10, 44, 68, 30, 12, 87, 47, 72, 92, 85, 25, 78, 33, 42, 90, 33, 45, 50, 61, 14, 82, 61, 26, 81, 58, 4, 88, 69, 5, 91, 3, 24, 90, 88, 42, 52, 96, 54, 6, 49], [56, 17, 62, 40, 7, 94, 96, 82, 92, 15, 68, 71, 56, 47, 5, 7, 63, 28, 76, 93, 25, 71, 47, 20, 77, 48, 95, 3, 69, 77, 77, 50, 60, 66, 91, 75, 1, 11, 13, 39, 30, 7, 89, 19, 80, 22, 75, 68]],35,31,) ] for i, p_set in enumerate(param): param[i] = list(param[i]) param[i][0] = [[e - 50 for e in sorted(l)] for l in p_set[0]] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES_1{ static int f_gold ( int s ) { int length = s / 3 ; s -= length ; int breadth = s / 2 ; int height = s - breadth ; return length * breadth * height ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(8); param0.add(96); param0.add(96); param0.add(96); param0.add(12); param0.add(95); param0.add(72); param0.add(81); param0.add(42); param0.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : length = int ( s / 3 ) s -= length breadth = s / 2 height = s - breadth return int ( length * breadth * height ) "," using namespace std; int f_gold ( int s ) { int length = s / 3; s -= length; int breadth = s / 2; int height = s - breadth; return length * breadth * height; } int main() { int n_success = 0; vector param0 {8,96,96,96,12,95,72,81,42,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (8,), (96,), (96,), (96,), (12,), (95,), (72,), (81,), (42,), (13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_OF_BINARY_TREES_FOR_GIVEN_PREORDER_SEQUENCE_LENGTH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_OF_BINARY_TREES_FOR_GIVEN_PREORDER_SEQUENCE_LENGTH{ static int f_gold ( int n ) { int BT [ ] = new int [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) BT [ i ] = 0 ; BT [ 0 ] = BT [ 1 ] = 1 ; for ( int i = 2 ; i <= n ; ++ i ) for ( int j = 0 ; j < i ; j ++ ) BT [ i ] += BT [ j ] * BT [ i - j - 1 ] ; return BT [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(87); param0.add(69); param0.add(15); param0.add(11); param0.add(11); param0.add(15); param0.add(47); param0.add(65); param0.add(50); param0.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): BT = [0] * (n + 1) BT[0] = BT[1] = 1 for i in range(2, n + 1): for j in range(i): BT[i] += BT[j] * BT[i - j - 1] return BT[n] "," using namespace std; int f_gold ( int n ) { int BT [ n + 1 ]; memset ( BT, 0, sizeof ( BT ) ); BT [ 0 ] = BT [ 1 ] = 1; for ( int i = 2; i <= n; ++ i ) for ( int j = 0; j < i; j ++ ) BT [ i ] += BT [ j ] * BT [ i - j - 1 ]; return BT [ n ]; } int main() { int n_success = 0; vector param0 {87,69,15,11,11,15,47,65,50,58}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (87,), (69,), (15,), (11,), (11,), (15,), (47,), (65,), (50,), (58,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", GIVEN_P_AND_N_FIND_THE_LARGEST_X_SUCH_THAT_PX_DIVIDES_N_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GIVEN_P_AND_N_FIND_THE_LARGEST_X_SUCH_THAT_PX_DIVIDES_N_2{ static int f_gold ( int n , int p ) { int ans = 0 ; while ( n > 0 ) { n /= p ; ans += n ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(33); param0.add(81); param0.add(18); param0.add(77); param0.add(9); param0.add(31); param0.add(63); param0.add(66); param0.add(57); param0.add(14); List param1 = new ArrayList<>(); param1.add(3); param1.add(71); param1.add(68); param1.add(66); param1.add(52); param1.add(69); param1.add(90); param1.add(48); param1.add(18); param1.add(64); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, CHECK_WHETHER_ARITHMETIC_PROGRESSION_CAN_FORMED_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_ARITHMETIC_PROGRESSION_CAN_FORMED_GIVEN_ARRAY{ static boolean f_gold ( int arr [ ] , int n ) { if ( n == 1 ) return true ; Arrays . sort ( arr ) ; int d = arr [ 1 ] - arr [ 0 ] ; for ( int i = 2 ; i < n ; i ++ ) if ( arr [ i ] - arr [ i - 1 ] != d ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,64,16}); param0.add(new int[]{0, 12, 4, 8}); param0.add(new int[]{-2, 2, 0, 4, 6}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0}); param0.add(new int[]{66,56,86,76,46}); param0.add(new int[]{66,56,56,86,76,46}); param0.add(new int[]{7,9,11,21,44,45,61,67,78,97,98,99}); param0.add(new int[]{66,-28,-26,50,-18,54,84,-2,-70,-74,6,-34,44,-36,-4,36,14,24,64,74,86,-96,54,-68,-84,-62,-36,34,-36,70,-50,6,62,-50,-34,-38,-28,74,78,-2,-12,-4}); param0.add(new int[]{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}); param0.add(new int[]{18,93,79,20,44,36,69,37,33,82,19,51,32,22,1,54,89,20,58,35,70,70,61,63,61,57,3,95,99,45,15,17,15,5,86,46,11,64,92,14,39,67}); List param1 = new ArrayList<>(); param1.add(4); param1.add(4); param1.add(5); param1.add(7); param1.add(5); param1.add(6); param1.add(11); param1.add(33); param1.add(33); param1.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : if ( n == 1 ) : return True arr.sort ( ) d = arr [ 1 ] - arr [ 0 ] for i in range ( 2 , n ) : if ( arr [ i ] - arr [ i - 1 ] != d ) : return False return True "," using namespace std; bool f_gold ( int arr [ ], int n ) { if ( n == 1 ) return true; sort ( arr, arr + n ); int d = arr [ 1 ] - arr [ 0 ]; for ( int i = 2; i < n; i ++ ) if ( arr [ i ] - arr [ i - 1 ] != d ) return false; return true; } int main() { int n_success = 0; vector> param0 { {1,4,64,16}, {0, 12, 4, 8}, {-2, 2, 0, 4, 6}, {0,0,0,0,0,0,0,0,0,0,0,0}, {66,56,86,76,46}, {66,56,56,86,76,46}, {7,9,11,21,44,45,61,67,78,97,98,99}, {66,-28,-26,50,-18,54,84,-2,-70,-74,6,-34,44,-36,-4,36,14,24,64,74,86,-96,54,-68,-84,-62,-36,34,-36,70,-50,6,62,-50,-34,-38,-28,74,78,-2,-12,-4}, {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}, {18,93,79,20,44,36,69,37,33,82,19,51,32,22,1,54,89,20,58,35,70,70,61,63,61,57,3,95,99,45,15,17,15,5,86,46,11,64,92,14,39,67}}; vector param1 {4,4,5,7,5,6,11,33,33,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1,4,64,16],4,), ([0, 12, 4, 8],4,), ([-2, 2, 0, 4, 6],5,), ([0,0,0,0,0,0,0,0,0,0,0,0],7,), ([66,56,86,76,46],5,), ([66,56,56,86,76,46],6,), ([7, 9, 11, 21, 44, 45, 61, 67, 78, 97, 98, 99],11,), ([66, -28, -26, 50, -18, 54, 84, -2, -70, -74, 6, -34, 44, -36, -4, 36, 14, 24, 64, 74, 86, -96, 54, -68, -84, -62, -36, 34, -36, 70, -50, 6, 62, -50, -34, -38, -28, 74, 78, -2, -12, -4],33,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],33,), ([18, 93, 79, 20, 44, 36, 69, 37, 33, 82, 19, 51, 32, 22, 1, 54, 89, 20, 58, 35, 70, 70, 61, 63, 61, 57, 3, 95, 99, 45, 15, 17, 15, 5, 86, 46, 11, 64, 92, 14, 39, 67],40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int result = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) { int product = arr [ i ] * arr [ j ] ; for ( int k = 0 ; k < n ; k ++ ) { if ( arr [ k ] == product ) { result ++ ; break ; } } } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,7,26,40,46,89,99}); param0.add(new int[]{98,42,-24,-60,74,86,6,8,72,-58,38,-20,6,-6,8,48,-34,30,60,66,38,-54,8,-94,-8,0,-64,-94,-94,-72,-84,-36,88,-62,-88,46,-4,88}); param0.add(new int[]{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}); param0.add(new int[]{37,97,57,82,29,68,94,38,81,48,13,84,57,5,27,87,11,35,82,53,67,31,15,99,6,93,91,92,3,23,90,27,6,33,78,3,19,19,27}); param0.add(new int[]{-80,-74,-72,-72,-66,-66,-62,-50,-44,-44,-28,-24,-24,-22,-16,-10,-6,-4,-2,2,2,4,12,16,16,28,30,32,32,38,38,72,84,86,88,90,96}); param0.add(new int[]{0,1,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1}); param0.add(new int[]{25,67}); param0.add(new int[]{82,74,-82,22,-28,-78,-22,-86,-74,42,-6,54,-88,-92,-14,-50,68,46,-50,46,-18,66,-76,-30,36,12,66}); param0.add(new int[]{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}); param0.add(new int[]{50,23,56,9}); List param1 = new ArrayList<>(); param1.add(5); param1.add(24); param1.add(44); param1.add(36); param1.add(34); param1.add(18); param1.add(1); param1.add(14); param1.add(32); param1.add(3); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : result = 0 ; for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : product = arr [ i ] * arr [ j ] ; for k in range ( 0 , n ) : if ( arr [ k ] == product ) : result = result + 1 ; break ; return result ; "," using namespace std; int f_gold ( int arr [ ], int n ) { int result = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = i + 1; j < n; j ++ ) { int product = arr [ i ] * arr [ j ]; for ( int k = 0; k < n; k ++ ) { if ( arr [ k ] == product ) { result ++; break; } } } } return result; } int main() { int n_success = 0; vector> param0 {{3,7,26,40,46,89,99},{98,42,-24,-60,74,86,6,8,72,-58,38,-20,6,-6,8,48,-34,30,60,66,38,-54,8,-94,-8,0,-64,-94,-94,-72,-84,-36,88,-62,-88,46,-4,88},{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},{37,97,57,82,29,68,94,38,81,48,13,84,57,5,27,87,11,35,82,53,67,31,15,99,6,93,91,92,3,23,90,27,6,33,78,3,19,19,27},{-80,-74,-72,-72,-66,-66,-62,-50,-44,-44,-28,-24,-24,-22,-16,-10,-6,-4,-2,2,2,4,12,16,16,28,30,32,32,38,38,72,84,86,88,90,96},{0,1,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1},{25,67},{82,74,-82,22,-28,-78,-22,-86,-74,42,-6,54,-88,-92,-14,-50,68,46,-50,46,-18,66,-76,-30,36,12,66},{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},{50,23,56,9}}; vector param1 {5,24,44,36,34,18,1,14,32,3}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 7, 26, 40, 46, 89, 99],5,), ([98, 42, -24, -60, 74, 86, 6, 8, 72, -58, 38, -20, 6, -6, 8, 48, -34, 30, 60, 66, 38, -54, 8, -94, -8, 0, -64, -94, -94, -72, -84, -36, 88, -62, -88, 46, -4, 88],24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],44,), ([37, 97, 57, 82, 29, 68, 94, 38, 81, 48, 13, 84, 57, 5, 27, 87, 11, 35, 82, 53, 67, 31, 15, 99, 6, 93, 91, 92, 3, 23, 90, 27, 6, 33, 78, 3, 19, 19, 27],36,), ([-80, -74, -72, -72, -66, -66, -62, -50, -44, -44, -28, -24, -24, -22, -16, -10, -6, -4, -2, 2, 2, 4, 12, 16, 16, 28, 30, 32, 32, 38, 38, 72, 84, 86, 88, 90, 96],34,), ([0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1],18,), ([25, 67],1,), ([82, 74, -82, 22, -28, -78, -22, -86, -74, 42, -6, 54, -88, -92, -14, -50, 68, 46, -50, 46, -18, 66, -76, -30, 36, 12, 66],14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],32,), ([50, 23, 56, 9],3,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1{ static char f_gold ( String str ) { int n = str . length ( ) ; int count = 0 ; char res = str . charAt ( 0 ) ; int cur_count = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i < n - 1 && str . charAt ( i ) == str . charAt ( i + 1 ) ) cur_count ++ ; else { if ( cur_count > count ) { count = cur_count ; res = str . charAt ( i ) ; } cur_count = 1 ; } } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""geeekk""); param0.add(""3786868""); param0.add(""110""); param0.add(""aaaabbcbbb""); param0.add(""11""); param0.add(""011101""); param0.add(""WoHNyJYLC""); param0.add(""3141711779""); param0.add(""10111101101""); param0.add(""aabbabababcc""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) count = 0 res = str [ 0 ] cur_count = 1 for i in range ( n ) : if ( i < n - 1 and str [ i ] == str [ i + 1 ] ) : cur_count += 1 else : if cur_count > count : count = cur_count res = str [ i ] cur_count = 1 return res "," using namespace std; char f_gold ( string str ) { int n = str . length ( ); int count = 0; char res = str [ 0 ]; int cur_count = 1; for ( int i = 0; i < n; i ++ ) { if ( i < n - 1 && str [ i ] == str [ i + 1 ] ) cur_count ++; else { if ( cur_count > count ) { count = cur_count; res = str [ i ]; } cur_count = 1; } } return res; } int main() { int n_success = 0; vector param0 {""geeekk"",""3786868"",""110"",""aaaabbcbbb"",""11"",""011101"",""WoHNyJYLC"",""3141711779"",""10111101101"",""aabbabababcc""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('geeekk',), ('3786868',), ('110',), ('aaaabbcbbb',), ('11',), ('011101',), ('WoHNyJYLC',), ('3141711779',), ('10111101101',), ('aabbabababcc',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", C_PROGRAM_CONCATENATE_STRING_GIVEN_NUMBER_TIMES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class C_PROGRAM_CONCATENATE_STRING_GIVEN_NUMBER_TIMES{ static String f_gold ( String s , int n ) { String s1 = s ; for ( int i = 1 ; i < n ; i ++ ) s += s1 ; return s ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""LPWsaI""); param0.add(""9037515104""); param0.add(""00100010010111""); param0.add(""SbwipuE""); param0.add(""574314109""); param0.add(""1101""); param0.add(""f""); param0.add(""068""); param0.add(""000011001""); param0.add(""BWbUtIkC""); List param1 = new ArrayList<>(); param1.add(41); param1.add(72); param1.add(95); param1.add(27); param1.add(5); param1.add(70); param1.add(91); param1.add(50); param1.add(38); param1.add(79); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s , n ) : s1 = s for i in range ( 1 , n ) : s += s1 return s "," using namespace std; string f_gold ( string s, int n ) { string s1 = s; for ( int i = 1; i < n; i ++ ) s += s1; return s; } int main() { int n_success = 0; vector param0 {""LPWsaI"",""9037515104"",""00100010010111"",""SbwipuE"",""574314109"",""1101"",""f"",""068"",""000011001"",""BWbUtIkC""}; vector param1 {41,72,95,27,5,70,91,50,38,79}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('LPWsaI',41,), ('9037515104',72,), ('00100010010111',95,), ('SbwipuE',27,), ('574314109',5,), ('1101',70,), ('f',91,), ('068',50,), ('000011001',38,), ('BWbUtIkC',79,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRODUCT_MAXIMUM_FIRST_ARRAY_MINIMUM_SECOND_1{ public static int f_gold ( int arr1 [ ] , int arr2 [ ] , int n1 , int n2 ) { int max = arr1 [ 0 ] ; int min = arr2 [ 0 ] ; int i ; for ( i = 1 ; i < n1 && i < n2 ; ++ i ) { if ( arr1 [ i ] > max ) max = arr1 [ i ] ; if ( arr2 [ i ] < min ) min = arr2 [ i ] ; } while ( i < n1 ) { if ( arr1 [ i ] > max ) max = arr1 [ i ] ; i ++ ; } while ( i < n2 ) { if ( arr2 [ i ] < min ) min = arr2 [ i ] ; i ++ ; } return max * min ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,6,32,33,34,36,41,43,52,70,70,70,75,78,88,88,95,95}); param0.add(new int[]{78,-88,44,10,96,-46,-66,84,32,44,56,76,-72,-72,82,-12,-20,-76,8,-34,12,-22,-92,-74,76,46,86,-2,-76,-86,36,80}); param0.add(new int[]{0,0,1}); param0.add(new int[]{87,4,90,50,2,35,87}); param0.add(new int[]{-98,-86,-86,-82,-72,-72,-70,-68,-64,-58,-50,-48,-44,-38,-36,-32,-32,-30,-28,-16,-12,-12,-4,8,10,16,18,22,28,32,32,42,60,70,88,88,88,98,98}); param0.add(new int[]{0}); param0.add(new int[]{31,32,33,49,68,77,89,94}); param0.add(new int[]{64,-44,-6,12,-98,42,-48,-70,-76,30,-48,-72,32,-2,68,42,-60,86,-24,98,62,-60,36,-52,-50,-74,96,36,-30,66,-92,-74,8,74,-64,-24,-60,-70}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{35,11,39,23,49,12,96,98,46,76,29,1,88,71,27,49,12,24,95,61,38,33,59,97,56,7,97,7,71,59,46,68,45}); List param1 = new ArrayList<>(); param1.add(new int[]{2,4,11,25,26,26,32,39,50,53,65,66,69,74,81,83,89,99}); param1.add(new int[]{30,0,-50,-62,36,-26,-26,70,-72,-8,58,34,26,36,-14,52,18,-80,-64,92,-22,50,-10,56,2,42,90,-80,-94,-62,76,-56}); param1.add(new int[]{0,0,1}); param1.add(new int[]{33,90,2,95,54,94,96}); param1.add(new int[]{-98,-84,-72,-70,-60,-58,-54,-52,-44,-44,-24,-10,-6,2,10,12,12,14,18,22,30,34,42,48,50,54,54,56,68,68,70,76,76,78,86,88,88,90,96}); param1.add(new int[]{1}); param1.add(new int[]{7,26,28,35,36,37,81,98}); param1.add(new int[]{44,-70,16,60,84,-8,58,-64,-32,-58,38,-30,-38,-94,-64,-42,-42,-84,-94,2,-22,46,-72,-38,-28,0,-94,-92,-24,46,48,-18,-56,52,26,-60,-84,-68}); param1.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param1.add(new int[]{53,67,70,97,2,97,28,59,89,14,83,71,49,86,13,16,40,60,10,54,35,22,59,53,70,83,95,71,91,72,38,91,39}); List param2 = new ArrayList<>(); param2.add(13); param2.add(26); param2.add(2); param2.add(5); param2.add(22); param2.add(0); param2.add(7); param2.add(21); param2.add(12); param2.add(31); List param3 = new ArrayList<>(); param3.add(11); param3.add(31); param3.add(2); param3.add(4); param3.add(31); param3.add(0); param3.add(7); param3.add(23); param3.add(15); param3.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int n1, int n2 ) { int max = arr1 [ 0 ]; int min = arr2 [ 0 ]; int i; for ( i = 1; i < n1 && i < n2; ++ i ) { if ( arr1 [ i ] > max ) max = arr1 [ i ]; if ( arr2 [ i ] < min ) min = arr2 [ i ]; } while ( i < n1 ) { if ( arr1 [ i ] > max ) max = arr1 [ i ]; i ++; } while ( i < n2 ) { if ( arr2 [ i ] < min ) min = arr2 [ i ]; i ++; } return max * min; } int main() { int n_success = 0; vector> param0 {{4,6,32,33,34,36,41,43,52,70,70,70,75,78,88,88,95,95},{78,-88,44,10,96,-46,-66,84,32,44,56,76,-72,-72,82,-12,-20,-76,8,-34,12,-22,-92,-74,76,46,86,-2,-76,-86,36,80},{0,0,1},{87,4,90,50,2,35,87},{-98,-86,-86,-82,-72,-72,-70,-68,-64,-58,-50,-48,-44,-38,-36,-32,-32,-30,-28,-16,-12,-12,-4,8,10,16,18,22,28,32,32,42,60,70,88,88,88,98,98},{0},{31,32,33,49,68,77,89,94},{64,-44,-6,12,-98,42,-48,-70,-76,30,-48,-72,32,-2,68,42,-60,86,-24,98,62,-60,36,-52,-50,-74,96,36,-30,66,-92,-74,8,74,-64,-24,-60,-70},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{35,11,39,23,49,12,96,98,46,76,29,1,88,71,27,49,12,24,95,61,38,33,59,97,56,7,97,7,71,59,46,68,45}}; vector> param1 {{2,4,11,25,26,26,32,39,50,53,65,66,69,74,81,83,89,99},{30,0,-50,-62,36,-26,-26,70,-72,-8,58,34,26,36,-14,52,18,-80,-64,92,-22,50,-10,56,2,42,90,-80,-94,-62,76,-56},{0,0,1},{33,90,2,95,54,94,96},{-98,-84,-72,-70,-60,-58,-54,-52,-44,-44,-24,-10,-6,2,10,12,12,14,18,22,30,34,42,48,50,54,54,56,68,68,70,76,76,78,86,88,88,90,96},{1},{7,26,28,35,36,37,81,98},{44,-70,16,60,84,-8,58,-64,-32,-58,38,-30,-38,-94,-64,-42,-42,-84,-94,2,-22,46,-72,-38,-28,0,-94,-92,-24,46,48,-18,-56,52,26,-60,-84,-68},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{53,67,70,97,2,97,28,59,89,14,83,71,49,86,13,16,40,60,10,54,35,22,59,53,70,83,95,71,91,72,38,91,39}}; vector param2 {13,26,2,5,22,0,7,21,12,31}; vector param3 {11,31,2,4,31,0,7,23,15,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY{ static int f_gold ( int arr [ ] , int n , int x ) { int res = 0 ; for ( int i = 0 ; i < n ; i ++ ) if ( x == arr [ i ] ) res ++ ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{16,18,24,27,34,36,41,43,43,52,59,76,86,87,90,91,94,96,98,98}); param0.add(new int[]{64,66,-36}); param0.add(new int[]{0,0,0}); param0.add(new int[]{9,85,34,43,70,96,44,7,27,33,34,5,91,84,76,45,20,37,15,37,20,24,13,49,74,13,50,81,81,66,23,36,91,80,61,15,96,70,90,25,16,62,75,63,6,65,38,12}); param0.add(new int[]{-98,-98,-98,-34,-32,-26,-12,0,18,52,68,72}); param0.add(new int[]{1,1,0,0,1,1,0,0,1,0,0,1,0,0,1,1}); param0.add(new int[]{1,3,6,6,10,12,15,16,21,22,23,29,33,37,40,40,43,52,55,59,64,65,71,72,80,83,86,86,88,88}); param0.add(new int[]{-14,-30,-38,-38,-8,40,-34,2,-84,68,-42,38,-14,0,-64,12,-2,-38,-8,-44,-88,-34,-80,-36,82,70,96,-32,16,-52,-12,-46,-28,-86,30,-14,50,-44,22,30,-4,78,52}); param0.add(new int[]{1,1,1,1}); param0.add(new int[]{11,50,1,93,12,7,55,35,36,62,61,71,16}); List param1 = new ArrayList<>(); param1.add(14); param1.add(1); param1.add(2); param1.add(43); param1.add(11); param1.add(11); param1.add(29); param1.add(39); param1.add(2); param1.add(11); List param2 = new ArrayList<>(); param2.add(43); param2.add(64); param2.add(0); param2.add(5); param2.add(-98); param2.add(1); param2.add(40); param2.add(26); param2.add(3); param2.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x ) : res = 0 for i in range ( n ) : if x == arr [ i ] : res += 1 return res "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int res = 0; for ( int i = 0; i < n; i ++ ) if ( x == arr [ i ] ) res ++; return res; } int main() { int n_success = 0; vector> param0 {{16,18,24,27,34,36,41,43,43,52,59,76,86,87,90,91,94,96,98,98},{64,66,-36},{0,0,0},{9,85,34,43,70,96,44,7,27,33,34,5,91,84,76,45,20,37,15,37,20,24,13,49,74,13,50,81,81,66,23,36,91,80,61,15,96,70,90,25,16,62,75,63,6,65,38,12},{-98,-98,-98,-34,-32,-26,-12,0,18,52,68,72},{1,1,0,0,1,1,0,0,1,0,0,1,0,0,1,1},{1,3,6,6,10,12,15,16,21,22,23,29,33,37,40,40,43,52,55,59,64,65,71,72,80,83,86,86,88,88},{-14,-30,-38,-38,-8,40,-34,2,-84,68,-42,38,-14,0,-64,12,-2,-38,-8,-44,-88,-34,-80,-36,82,70,96,-32,16,-52,-12,-46,-28,-86,30,-14,50,-44,22,30,-4,78,52},{1,1,1,1},{11,50,1,93,12,7,55,35,36,62,61,71,16}}; vector param1 {14,1,2,43,11,11,29,39,2,11}; vector param2 {43,64,0,5,-98,1,40,26,3,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([16, 18, 24, 27, 34, 36, 41, 43, 43, 52, 59, 76, 86, 87, 90, 91, 94, 96, 98, 98],14,43,), ([64, 66, -36],1,64,), ([0, 0, 0],2,0,), ([9, 85, 34, 43, 70, 96, 44, 7, 27, 33, 34, 5, 91, 84, 76, 45, 20, 37, 15, 37, 20, 24, 13, 49, 74, 13, 50, 81, 81, 66, 23, 36, 91, 80, 61, 15, 96, 70, 90, 25, 16, 62, 75, 63, 6, 65, 38, 12],43,5,), ([-98, -98, -98, -34, -32, -26, -12, 0, 18, 52, 68, 72],11,-98,), ([1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1],11,1,), ([1, 3, 6, 6, 10, 12, 15, 16, 21, 22, 23, 29, 33, 37, 40, 40, 43, 52, 55, 59, 64, 65, 71, 72, 80, 83, 86, 86, 88, 88],29,40,), ([-14, -30, -38, -38, -8, 40, -34, 2, -84, 68, -42, 38, -14, 0, -64, 12, -2, -38, -8, -44, -88, -34, -80, -36, 82, 70, 96, -32, 16, -52, -12, -46, -28, -86, 30, -14, 50, -44, 22, 30, -4, 78, 52],39,26,), ([1, 1, 1, 1],2,3,), ([11, 50, 1, 93, 12, 7, 55, 35, 36, 62, 61, 71, 16],11,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIRST_ELEMENT_OCCURRING_K_TIMES_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIRST_ELEMENT_OCCURRING_K_TIMES_ARRAY{ static int f_gold ( int arr [ ] , int n , int k ) { HashMap < Integer , Integer > count_map = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int a = 0 ; if ( count_map . get ( arr [ i ] ) != null ) { a = count_map . get ( arr [ i ] ) ; } count_map . put ( arr [ i ] , a + 1 ) ; } for ( int i = 0 ; i < n ; i ++ ) { if ( count_map . get ( arr [ i ] ) == k ) { return arr [ i ] ; } } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,4,4,7,18,20,23,27,30,31,31,32,35,36,43,45,46,49,50,53,55,59,60,64,64,65,68,78,80,80,85,95}); param0.add(new int[]{-26,32,36,6,64,24,-28,96}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{38,40,43,70,20,40,95,96,81,82}); param0.add(new int[]{-68,-8,-8,16,24,54}); param0.add(new int[]{1,0,1,0,0,0,1,0,1,0,0,0,1}); param0.add(new int[]{13,18,19,28,31,34,49,49,53,57,58,62,75,76,77,78,80,84,84,85,87,91,98,99}); param0.add(new int[]{-4,24,-86,-84,30,-16,12,-92,-68,22}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{55,44,75,97,25,65,76,53,20,78,25,59,61,29,81,35,15,78,41,44,31,33,39,93,26,67}); List param1 = new ArrayList<>(); param1.add(30); param1.add(6); param1.add(15); param1.add(9); param1.add(3); param1.add(6); param1.add(20); param1.add(6); param1.add(8); param1.add(23); List param2 = new ArrayList<>(); param2.add(2); param2.add(3); param2.add(7); param2.add(1); param2.add(2); param2.add(4); param2.add(2); param2.add(5); param2.add(10); param2.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : count_map = { } ; for i in range ( 0 , n ) : if ( arr [ i ] in count_map.keys ( ) ) : count_map [ arr [ i ] ] += 1 else : count_map [ arr [ i ] ] = 1 i += 1 for i in range ( 0 , n ) : if ( count_map [ arr [ i ] ] == k ) : return arr [ i ] i += 1 return - 1 "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > count_map; for ( int i = 0; i < n; i ++ ) count_map [ arr [ i ] ] ++; for ( int i = 0; i < n; i ++ ) if ( count_map [ arr [ i ] ] == k ) return arr [ i ]; return - 1; } int main() { int n_success = 0; vector> param0 {{2,3,4,4,7,18,20,23,27,30,31,31,32,35,36,43,45,46,49,50,53,55,59,60,64,64,65,68,78,80,80,85,95},{-26,32,36,6,64,24,-28,96},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{38,40,43,70,20,40,95,96,81,82},{-68,-8,-8,16,24,54},{1,0,1,0,0,0,1,0,1,0,0,0,1},{13,18,19,28,31,34,49,49,53,57,58,62,75,76,77,78,80,84,84,85,87,91,98,99},{-4,24,-86,-84,30,-16,12,-92,-68,22},{0,0,0,0,0,0,0,0,0,1,1,1,1},{55,44,75,97,25,65,76,53,20,78,25,59,61,29,81,35,15,78,41,44,31,33,39,93,26,67}}; vector param1 {30,6,15,9,3,6,20,6,8,23}; vector param2 {2,3,7,1,2,4,2,5,10,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 4, 4, 7, 18, 20, 23, 27, 30, 31, 31, 32, 35, 36, 43, 45, 46, 49, 50, 53, 55, 59, 60, 64, 64, 65, 68, 78, 80, 80, 85, 95],30,2,), ([-26, 32, 36, 6, 64, 24, -28, 96],6,3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],15,7,), ([38, 40, 43, 70, 20, 40, 95, 96, 81, 82],9,1,), ([-68, -8, -8, 16, 24, 54],3,2,), ([1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1],6,4,), ([13, 18, 19, 28, 31, 34, 49, 49, 53, 57, 58, 62, 75, 76, 77, 78, 80, 84, 84, 85, 87, 91, 98, 99],20,2,), ([-4, 24, -86, -84, 30, -16, 12, -92, -68, 22],6,5,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],8,10,), ([55, 44, 75, 97, 25, 65, 76, 53, 20, 78, 25, 59, 61, 29, 81, 35, 15, 78, 41, 44, 31, 33, 39, 93, 26, 67],23,20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SPLIT_ARRAY_ADD_FIRST_PART_END," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SPLIT_ARRAY_ADD_FIRST_PART_END{ public static void f_gold ( int arr [ ] , int n , int k ) { for ( int i = 0 ; i < k ; i ++ ) { int x = arr [ 0 ] ; for ( int j = 0 ; j < n - 1 ; ++ j ) arr [ j ] = arr [ j + 1 ] ; arr [ n - 1 ] = x ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{75}); param0.add(new int[]{-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}); param0.add(new int[]{-88,-72,-64,-46,-40,-16,-8,0,22,34,44}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}); param0.add(new int[]{8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}); param0.add(new int[]{-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}); param0.add(new int[]{0,0,0,0,1,1,1,1,1}); param0.add(new int[]{80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}); List param1 = new ArrayList<>(); param1.add(0); param1.add(27); param1.add(7); param1.add(23); param1.add(6); param1.add(23); param1.add(21); param1.add(23); param1.add(5); param1.add(9); List param2 = new ArrayList<>(); param2.add(0); param2.add(17); param2.add(7); param2.add(24); param2.add(6); param2.add(30); param2.add(20); param2.add(13); param2.add(8); param2.add(7); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{75}); filled_function_param0.add(new int[]{-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74}); filled_function_param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); filled_function_param0.add(new int[]{45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22}); filled_function_param0.add(new int[]{-88,-72,-64,-46,-40,-16,-8,0,22,34,44}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0}); filled_function_param0.add(new int[]{8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94}); filled_function_param0.add(new int[]{-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94}); filled_function_param0.add(new int[]{0,0,0,0,1,1,1,1,1}); filled_function_param0.add(new int[]{80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(0); filled_function_param1.add(27); filled_function_param1.add(7); filled_function_param1.add(23); filled_function_param1.add(6); filled_function_param1.add(23); filled_function_param1.add(21); filled_function_param1.add(23); filled_function_param1.add(5); filled_function_param1.add(9); List filled_function_param2 = new ArrayList<>(); filled_function_param2.add(0); filled_function_param2.add(17); filled_function_param2.add(7); filled_function_param2.add(24); filled_function_param2.add(6); filled_function_param2.add(30); filled_function_param2.add(20); filled_function_param2.add(13); filled_function_param2.add(8); filled_function_param2.add(7); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : for i in range ( 0 , k ) : x = arr [ 0 ] for j in range ( 0 , n - 1 ) : arr [ j ] = arr [ j + 1 ] arr [ n - 1 ] = x "," using namespace std; void f_gold ( int arr [ ], int n, int k ) { for ( int i = 0; i < k; i ++ ) { int x = arr [ 0 ]; for ( int j = 0; j < n - 1; ++ j ) arr [ j ] = arr [ j + 1 ]; arr [ n - 1 ] = x; } } int main() { int n_success = 0; vector> param0 {{75},{-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74},{0,0,0,0,0,1,1,1,1,1,1},{45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22},{-88,-72,-64,-46,-40,-16,-8,0,22,34,44},{0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0},{8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94},{-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94},{0,0,0,0,1,1,1,1,1},{80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}}; vector param1 {0,27,7,23,6,23,21,23,5,9}; vector param2 {0,17,7,24,6,30,20,13,8,7}; vector> filled_function_param0 {{75},{-58,-60,-38,48,-2,32,-48,-46,90,-54,-18,28,72,86,0,-2,-74,12,-58,90,-30,10,-88,2,-14,82,-82,-46,2,-74},{0,0,0,0,0,1,1,1,1,1,1},{45,51,26,36,10,62,62,56,61,67,86,97,31,93,32,1,14,25,24,30,1,44,7,98,56,68,53,59,30,90,79,22},{-88,-72,-64,-46,-40,-16,-8,0,22,34,44},{0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0},{8,17,20,23,31,32,37,37,44,45,48,64,64,67,69,71,75,77,78,81,83,87,89,92,94},{-8,-88,-68,48,8,50,30,-88,74,-16,6,74,36,32,22,96,-2,70,40,-46,98,34,2,94},{0,0,0,0,1,1,1,1,1},{80,14,35,25,60,86,45,95,32,29,94,6,63,66,38}}; vector filled_function_param1 {0,27,7,23,6,23,21,23,5,9}; vector filled_function_param2 {0,17,7,24,6,30,20,13,8,7}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i],filled_function_param2[i]); f_gold(¶m0[i].front(),param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_param2[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([75],0,0,), ([-58, -60, -38, 48, -2, 32, -48, -46, 90, -54, -18, 28, 72, 86, 0, -2, -74, 12, -58, 90, -30, 10, -88, 2, -14, 82, -82, -46, 2, -74],27,17,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],7,7,), ([45, 51, 26, 36, 10, 62, 62, 56, 61, 67, 86, 97, 31, 93, 32, 1, 14, 25, 24, 30, 1, 44, 7, 98, 56, 68, 53, 59, 30, 90, 79, 22],23,24,), ([-88, -72, -64, -46, -40, -16, -8, 0, 22, 34, 44],6,6,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0],23,30,), ([8, 17, 20, 23, 31, 32, 37, 37, 44, 45, 48, 64, 64, 67, 69, 71, 75, 77, 78, 81, 83, 87, 89, 92, 94],21,20,), ([-8, -88, -68, 48, 8, 50, 30, -88, 74, -16, 6, 74, 36, 32, 22, 96, -2, 70, 40, -46, 98, 34, 2, 94],23,13,), ([0, 0, 0, 0, 1, 1, 1, 1, 1],5,8,), ([80, 14, 35, 25, 60, 86, 45, 95, 32, 29, 94, 6, 63, 66, 38],9,7,) ] filled_function_param = [ ([75],0,0,), ([-58, -60, -38, 48, -2, 32, -48, -46, 90, -54, -18, 28, 72, 86, 0, -2, -74, 12, -58, 90, -30, 10, -88, 2, -14, 82, -82, -46, 2, -74],27,17,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],7,7,), ([45, 51, 26, 36, 10, 62, 62, 56, 61, 67, 86, 97, 31, 93, 32, 1, 14, 25, 24, 30, 1, 44, 7, 98, 56, 68, 53, 59, 30, 90, 79, 22],23,24,), ([-88, -72, -64, -46, -40, -16, -8, 0, 22, 34, 44],6,6,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0],23,30,), ([8, 17, 20, 23, 31, 32, 37, 37, 44, 45, 48, 64, 64, 67, 69, 71, 75, 77, 78, 81, 83, 87, 89, 92, 94],21,20,), ([-8, -88, -68, 48, 8, 50, 30, -88, 74, -16, 6, 74, 36, 32, 22, 96, -2, 70, 40, -46, 98, 34, 2, 94],23,13,), ([0, 0, 0, 0, 1, 1, 1, 1, 1],5,8,), ([80, 14, 35, 25, 60, 86, 45, 95, 32, 29, 94, 6, 63, 66, 38],9,7,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", K_TH_LARGEST_SUM_CONTIGUOUS_SUBARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class K_TH_LARGEST_SUM_CONTIGUOUS_SUBARRAY{ static int f_gold ( int arr [ ] , int n , int k ) { int sum [ ] = new int [ n + 1 ] ; sum [ 0 ] = 0 ; sum [ 1 ] = arr [ 0 ] ; for ( int i = 2 ; i <= n ; i ++ ) sum [ i ] = sum [ i - 1 ] + arr [ i - 1 ] ; PriorityQueue < Integer > Q = new PriorityQueue < Integer > ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = i ; j <= n ; j ++ ) { int x = sum [ j ] - sum [ i - 1 ] ; if ( Q . size ( ) < k ) Q . add ( x ) ; else { if ( Q . peek ( ) < x ) { Q . poll ( ) ; Q . add ( x ) ; } } } } return Q . poll ( ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,3,5,7,8,29,29,44,47,52,60,65,73,83,87,92,92,95}); param0.add(new int[]{44,-98,-10,14,-6,-46,6,-74,-4,36,10,-2,30,28,96,-84,-36,-76,64,-74,-20,94,-4,14,78,52,-56,98,-68,-76,-10,20,88,-98,96,80,96,-32,-40,-30,82}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{58,21,97,78,78,57,29,33,57,81,66,32,11,82,28,72,46,67,42,15,60,45,16,37}); param0.add(new int[]{-92,-90,-88,-84,-68,-66,-62,-58,-52,-44,-22,-16,-4,-4,2,12,14,14,24,26,44,56,80,90,92,94,98}); param0.add(new int[]{1,1,1,1,1,1,1,1,0,0,0}); param0.add(new int[]{3,4,8,12,13,14,17,19,23,24,28,29,30,35,35,38,44,47,47,53,55,56,56,58,66,67,70,71,72,73,74,75,77,78,82,84,87,87,87,88,88,93,94,96}); param0.add(new int[]{20,-58,94,-70,18,16,-46,38,-44,-92,-20,-70,-30,50}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{90,77,82,38,96,62,66,4,93,30,75,22,26,61,40,11,38,55,88,24,66,47,40,71,21,5,18,31,26,56,19,47,71,34}); List param1 = new ArrayList<>(); param1.add(10); param1.add(34); param1.add(16); param1.add(14); param1.add(15); param1.add(5); param1.add(26); param1.add(11); param1.add(19); param1.add(28); List param2 = new ArrayList<>(); param2.add(12); param2.add(37); param2.add(15); param2.add(20); param2.add(25); param2.add(5); param2.add(25); param2.add(7); param2.add(23); param2.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import heapq def f_gold ( arr , n , k ) : sum = [ ] sum.append ( 0 ) sum.append ( arr [ 0 ] ) for i in range ( 2 , n + 1 ) : sum.append ( sum [ i - 1 ] + arr [ i - 1 ] ) Q = [ ] heapq.heapify ( Q ) for i in range ( 1 , n + 1 ) : for j in range ( i , n + 1 ) : x = sum [ j ] - sum [ i - 1 ] if len ( Q ) < k : heapq.heappush ( Q , x ) else : if Q [ 0 ] < x : heapq.heappop ( Q ) heapq.heappush ( Q , x ) return Q [ 0 ] "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { int sum [ n + 1 ]; sum [ 0 ] = 0; sum [ 1 ] = arr [ 0 ]; for ( int i = 2; i <= n; i ++ ) sum [ i ] = sum [ i - 1 ] + arr [ i - 1 ]; priority_queue < int, vector < int >, greater < int > > Q; for ( int i = 1; i <= n; i ++ ) { for ( int j = i; j <= n; j ++ ) { int x = sum [ j ] - sum [ i - 1 ]; if ( Q . size ( ) < k ) Q . push ( x ); else { if ( Q . top ( ) < x ) { Q . pop ( ); Q . push ( x ); } } } } return Q . top ( ); } int main() { int n_success = 0; vector> param0 {{2,3,5,7,8,29,29,44,47,52,60,65,73,83,87,92,92,95},{44,-98,-10,14,-6,-46,6,-74,-4,36,10,-2,30,28,96,-84,-36,-76,64,-74,-20,94,-4,14,78,52,-56,98,-68,-76,-10,20,88,-98,96,80,96,-32,-40,-30,82},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{58,21,97,78,78,57,29,33,57,81,66,32,11,82,28,72,46,67,42,15,60,45,16,37},{-92,-90,-88,-84,-68,-66,-62,-58,-52,-44,-22,-16,-4,-4,2,12,14,14,24,26,44,56,80,90,92,94,98},{1,1,1,1,1,1,1,1,0,0,0},{3,4,8,12,13,14,17,19,23,24,28,29,30,35,35,38,44,47,47,53,55,56,56,58,66,67,70,71,72,73,74,75,77,78,82,84,87,87,87,88,88,93,94,96},{20,-58,94,-70,18,16,-46,38,-44,-92,-20,-70,-30,50},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{90,77,82,38,96,62,66,4,93,30,75,22,26,61,40,11,38,55,88,24,66,47,40,71,21,5,18,31,26,56,19,47,71,34}}; vector param1 {10,34,16,14,15,5,26,11,19,28}; vector param2 {12,37,15,20,25,5,25,7,23,32}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 3, 5, 7, 8, 29, 29, 44, 47, 52, 60, 65, 73, 83, 87, 92, 92, 95],10,12,), ([44, -98, -10, 14, -6, -46, 6, -74, -4, 36, 10, -2, 30, 28, 96, -84, -36, -76, 64, -74, -20, 94, -4, 14, 78, 52, -56, 98, -68, -76, -10, 20, 88, -98, 96, 80, 96, -32, -40, -30, 82],34,37,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,15,), ([58, 21, 97, 78, 78, 57, 29, 33, 57, 81, 66, 32, 11, 82, 28, 72, 46, 67, 42, 15, 60, 45, 16, 37],14,20,), ([-92, -90, -88, -84, -68, -66, -62, -58, -52, -44, -22, -16, -4, -4, 2, 12, 14, 14, 24, 26, 44, 56, 80, 90, 92, 94, 98],15,25,), ([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],5,5,), ([3, 4, 8, 12, 13, 14, 17, 19, 23, 24, 28, 29, 30, 35, 35, 38, 44, 47, 47, 53, 55, 56, 56, 58, 66, 67, 70, 71, 72, 73, 74, 75, 77, 78, 82, 84, 87, 87, 87, 88, 88, 93, 94, 96],26,25,), ([20, -58, 94, -70, 18, 16, -46, 38, -44, -92, -20, -70, -30, 50],11,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],19,23,), ([90, 77, 82, 38, 96, 62, 66, 4, 93, 30, 75, 22, 26, 61, 40, 11, 38, 55, 88, 24, 66, 47, 40, 71, 21, 5, 18, 31, 26, 56, 19, 47, 71, 34],28,32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TEMPLE_OFFERINGS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TEMPLE_OFFERINGS{ static int f_gold ( int n , int templeHeight [ ] ) { int sum = 0 ; for ( int i = 0 ; i < n ; ++ i ) { int left = 0 , right = 0 ; for ( int j = i - 1 ; j >= 0 ; -- j ) { if ( templeHeight [ j ] < templeHeight [ j + 1 ] ) ++ left ; else break ; } for ( int j = i + 1 ; j < n ; ++ j ) { if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) ++ right ; else break ; } sum += Math . max ( right , left ) + 1 ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(12); param0.add(46); param0.add(16); param0.add(9); param0.add(0); param0.add(38); param0.add(28); param0.add(9); param0.add(18); param0.add(29); List param1 = new ArrayList<>(); param1.add(new int[]{3,11,12,15,16,21,24,29,32,39,42,44,51,68,79,81,81,85,92,94}); param1.add(new int[]{76,48,88,70,-64,66,-6,-58,26,-28,-42,-94,80,-4,-56,-46,4,90,-12,-78,64,18,-38,26,56,-24,66,-18,-12,0,-94,12,-10,4,-68,-20,88,2,-58,16,46,-80,-42,44,-86,96,-44}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{2,95,20,50,2,58,20,14,65,69,78,7}); param1.add(new int[]{-88}); param1.add(new int[]{0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,0}); param1.add(new int[]{2,3,6,8,9,10,14,17,17,22,25,27,29,29,30,32,33,35,38,42,50,51,51,57,59,59,59,60,62,62,63,67,70,75,76,77,81,81,83,84}); param1.add(new int[]{-52,62,74,-62,-58,62,38,42,-50,20}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{96,15,9,9,40,34,17,4,51,49,34,66,97,28,64,65,92,56,74,48,43,17,82,8,21,39,83,35,42,37,64,34,42,59,45,61,55,93,94,29,20,96,77,66}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , templeHeight ) : sum = 0 for i in range ( n ) : left = 0 right = 0 for j in range ( i - 1 , - 1 , - 1 ) : if ( templeHeight [ j ] < templeHeight [ j + 1 ] ) : left += 1 else : break for j in range ( i + 1 , n ) : if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) : right += 1 else : break sum += max ( right , left ) + 1 return sum "," using namespace std; int f_gold ( int n, int templeHeight [ ] ) { int sum = 0; for ( int i = 0; i < n; ++ i ) { int left = 0, right = 0; for ( int j = i - 1; j >= 0; -- j ) { if ( templeHeight [ j ] < templeHeight [ j + 1 ] ) ++ left; else break; } for ( int j = i + 1; j < n; ++ j ) { if ( templeHeight [ j ] < templeHeight [ j - 1 ] ) ++ right; else break; } sum += max ( right, left ) + 1; } return sum; } int main() { int n_success = 0; vector param0 {12,46,16,9,0,38,28,9,18,29}; vector> param1 {{3,11,12,15,16,21,24,29,32,39,42,44,51,68,79,81,81,85,92,94},{76,48,88,70,-64,66,-6,-58,26,-28,-42,-94,80,-4,-56,-46,4,90,-12,-78,64,18,-38,26,56,-24,66,-18,-12,0,-94,12,-10,4,-68,-20,88,2,-58,16,46,-80,-42,44,-86,96,-44},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{2,95,20,50,2,58,20,14,65,69,78,7},{-88},{0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,0},{2,3,6,8,9,10,14,17,17,22,25,27,29,29,30,32,33,35,38,42,50,51,51,57,59,59,59,60,62,62,63,67,70,75,76,77,81,81,83,84},{-52,62,74,-62,-58,62,38,42,-50,20},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{96,15,9,9,40,34,17,4,51,49,34,66,97,28,64,65,92,56,74,48,43,17,82,8,21,39,83,35,42,37,64,34,42,59,45,61,55,93,94,29,20,96,77,66}}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],¶m1[i].front()) == f_gold(param0[i],¶m1[i].front())) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (12,[3, 11, 12, 15, 16, 21, 24, 29, 32, 39, 42, 44, 51, 68, 79, 81, 81, 85, 92, 94],), (46,[76, 48, 88, 70, -64, 66, -6, -58, 26, -28, -42, -94, 80, -4, -56, -46, 4, 90, -12, -78, 64, 18, -38, 26, 56, -24, 66, -18, -12, 0, -94, 12, -10, 4, -68, -20, 88, 2, -58, 16, 46, -80, -42, 44, -86, 96, -44],), (16,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],), (9,[2, 95, 20, 50, 2, 58, 20, 14, 65, 69, 78, 7],), (0,[-88],), (38,[0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0],), (28,[2, 3, 6, 8, 9, 10, 14, 17, 17, 22, 25, 27, 29, 29, 30, 32, 33, 35, 38, 42, 50, 51, 51, 57, 59, 59, 59, 60, 62, 62, 63, 67, 70, 75, 76, 77, 81, 81, 83, 84],), (9,[-52, 62, 74, -62, -58, 62, 38, 42, -50, 20],), (18,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],), (29,[96, 15, 9, 9, 40, 34, 17, 4, 51, 49, 34, 66, 97, 28, 64, 65, 92, 56, 74, 48, 43, 17, 82, 8, 21, 39, 83, 35, 42, 37, 64, 34, 42, 59, 45, 61, 55, 93, 94, 29, 20, 96, 77, 66],) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_1S_SORTED_BINARY_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_1S_SORTED_BINARY_ARRAY{ static int f_gold ( int arr [ ] , int low , int high ) { if ( high >= low ) { int mid = low + ( high - low ) / 2 ; if ( ( mid == high || arr [ mid + 1 ] == 0 ) && ( arr [ mid ] == 1 ) ) return mid + 1 ; if ( arr [ mid ] == 1 ) return f_gold ( arr , ( mid + 1 ) , high ) ; return f_gold ( arr , low , ( mid - 1 ) ) ; } return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,21,38,46,89,91}); param0.add(new int[]{-48,46,12,-68,-82,-16,86,32,98,86,44,-86,60,-28,-60,-6,12,88,-82,-84,28,4,64,30,82,94,64,-34,-46,90,60,52,46,-24,10}); param0.add(new int[]{0,0,1,1}); param0.add(new int[]{19,99,62,68,41,32,55,20,1,18,5,73,10,17,7,19,18,51,88,47,36,80,3,75,35,67,7,83,36,70,19,95,15,61,99,88,26}); param0.add(new int[]{-98,-98,-94,-92,-84,-74,-32,-14,0,0,6,36,48,50,52,60,64,68,72,84,86,88,96}); param0.add(new int[]{1,0,0,0,1,1,1,1,1,0,0,0,1,0,1,0,0,1,1,0,0,1,1,1,1,0}); param0.add(new int[]{2,4,4,8,9,13,16,16,18,19,20,21,22,26,27,28,29,30,37,40,40,41,48,51,54,54,55,61,66,67,68,74,75,77,77,80,80,81,82,84,84,86,88,90,91,95}); param0.add(new int[]{18,78,96,10,82,66,60,-48,-96,72,-66,72,-6,-84,28,90,-50,70,-6,-30,-20,94,30,-56,-16,-52,-16,76,36,50,70,-22,76,-16,-84,-44,-14,-22,-78,86,-60,-4,-22,76,20,56}); param0.add(new int[]{0}); param0.add(new int[]{38,25,44,82,89,86,5,22}); List param1 = new ArrayList<>(); param1.add(3); param1.add(27); param1.add(3); param1.add(33); param1.add(11); param1.add(14); param1.add(29); param1.add(29); param1.add(0); param1.add(5); List param2 = new ArrayList<>(); param2.add(3); param2.add(27); param2.add(3); param2.add(28); param2.add(14); param2.add(15); param2.add(36); param2.add(29); param2.add(0); param2.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_2{ static int f_gold ( int arr [ ] , int n ) { int [ ] jumps = new int [ n ] ; int min ; jumps [ n - 1 ] = 0 ; for ( int i = n - 2 ; i >= 0 ; i -- ) { if ( arr [ i ] == 0 ) jumps [ i ] = Integer . MAX_VALUE ; else if ( arr [ i ] >= n - i - 1 ) jumps [ i ] = 1 ; else { min = Integer . MAX_VALUE ; for ( int j = i + 1 ; j < n && j <= arr [ i ] + i ; j ++ ) { if ( min > jumps [ j ] ) min = jumps [ j ] ; } if ( min != Integer . MAX_VALUE ) jumps [ i ] = min + 1 ; else jumps [ i ] = min ; } } return jumps [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,6,7,14,22,32,42,42,43,48,54,57,59,69,84,92,98}); param0.add(new int[]{98,-66,-70,-64,-88,-76,-90,16,58,68,-10,-42,-28,10,72,68,-30,60,92,-56,80,-4,-82,30,58,98,-56,98,-14,-38,-20,-74,-46,-22,78,36,-54,-64,80,-10,-26,82,96,-72,-36,-36,-32,-88,0}); param0.add(new int[]{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}); param0.add(new int[]{64,25,63,54,7,43,79,27,34,13,84,80,34,48,5,56,67,2}); param0.add(new int[]{2,28,68}); param0.add(new int[]{1,0,0,0,0,1,1,1,1,0,1,0,0}); param0.add(new int[]{1,1,9,16,17,18,19,20,21,22,25,28,29,29,36,37,40,40,42,48,49,49,55,63,65,66,69,70,72,73,76,77,77,79,79,81,81,93,95,99}); param0.add(new int[]{38,-42,-8,98,-90,38,88,-8,70,-28,-50,-22,28,24,88,-26,58,48,6,0,68,-6,8,54,-2,46,-44,96,-82,-14,-48,-18,-16,-48,-44,-16,-58,-64}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{98,46,12,55,57,11,25,64,92,35,90,72,95,30,75,67,64,12,31,84,70,96,71,80,62,34,70,10,54}); List param1 = new ArrayList<>(); param1.add(11); param1.add(26); param1.add(41); param1.add(10); param1.add(2); param1.add(11); param1.add(24); param1.add(34); param1.add(14); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : jumps = [ 0 for i in range ( n ) ] for i in range ( n - 2 , - 1 , - 1 ) : if ( arr [ i ] == 0 ) : jumps [ i ] = float ( 'inf' ) elif ( arr [ i ] >= n - i - 1 ) : jumps [ i ] = 1 else : min = float ( 'inf' ) for j in range ( i + 1 , n ) : if ( j <= arr [ i ] + i ) : if ( min > jumps [ j ] ) : min = jumps [ j ] if ( min != float ( 'inf' ) ) : jumps [ i ] = min + 1 else : jumps [ i ] = min return jumps [ 0 ] "," using namespace std; int f_gold ( int arr [ ], int n ) { int * jumps = new int [ n ]; int min; jumps [ n - 1 ] = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( arr [ i ] == 0 ) jumps [ i ] = INT_MAX; else if ( arr [ i ] >= n - i - 1 ) jumps [ i ] = 1; else { min = INT_MAX; for ( int j = i + 1; j < n && j <= arr [ i ] + i; j ++ ) { if ( min > jumps [ j ] ) min = jumps [ j ]; } if ( min != INT_MAX ) jumps [ i ] = min + 1; else jumps [ i ] = min; } } return jumps [ 0 ]; } int main() { int n_success = 0; vector> param0 {{1,6,7,14,22,32,42,42,43,48,54,57,59,69,84,92,98},{98,-66,-70,-64,-88,-76,-90,16,58,68,-10,-42,-28,10,72,68,-30,60,92,-56,80,-4,-82,30,58,98,-56,98,-14,-38,-20,-74,-46,-22,78,36,-54,-64,80,-10,-26,82,96,-72,-36,-36,-32,-88,0},{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},{64,25,63,54,7,43,79,27,34,13,84,80,34,48,5,56,67,2},{2,28,68},{1,0,0,0,0,1,1,1,1,0,1,0,0},{1,1,9,16,17,18,19,20,21,22,25,28,29,29,36,37,40,40,42,48,49,49,55,63,65,66,69,70,72,73,76,77,77,79,79,81,81,93,95,99},{38,-42,-8,98,-90,38,88,-8,70,-28,-50,-22,28,24,88,-26,58,48,6,0,68,-6,8,54,-2,46,-44,96,-82,-14,-48,-18,-16,-48,-44,-16,-58,-64},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{98,46,12,55,57,11,25,64,92,35,90,72,95,30,75,67,64,12,31,84,70,96,71,80,62,34,70,10,54}}; vector param1 {11,26,41,10,2,11,24,34,14,25}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 6, 7, 14, 22, 32, 42, 42, 43, 48, 54, 57, 59, 69, 84, 92, 98],11,), ([98, -66, -70, -64, -88, -76, -90, 16, 58, 68, -10, -42, -28, 10, 72, 68, -30, 60, 92, -56, 80, -4, -82, 30, 58, 98, -56, 98, -14, -38, -20, -74, -46, -22, 78, 36, -54, -64, 80, -10, -26, 82, 96, -72, -36, -36, -32, -88, 0],26,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],41,), ([64, 25, 63, 54, 7, 43, 79, 27, 34, 13, 84, 80, 34, 48, 5, 56, 67, 2],10,), ([2, 28, 68],2,), ([1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0],11,), ([1, 1, 9, 16, 17, 18, 19, 20, 21, 22, 25, 28, 29, 29, 36, 37, 40, 40, 42, 48, 49, 49, 55, 63, 65, 66, 69, 70, 72, 73, 76, 77, 77, 79, 79, 81, 81, 93, 95, 99],24,), ([38, -42, -8, 98, -90, 38, 88, -8, 70, -28, -50, -22, 28, 24, 88, -26, 58, 48, 6, 0, 68, -6, 8, 54, -2, 46, -44, 96, -82, -14, -48, -18, -16, -48, -44, -16, -58, -64],34,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([98, 46, 12, 55, 57, 11, 25, 64, 92, 35, 90, 72, 95, 30, 75, 67, 64, 12, 31, 84, 70, 96, 71, 80, 62, 34, 70, 10, 54],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_SUBSEQUENCE_LEAST_ONE_EVERY_FOUR_CONSECUTIVE_ELEMENTS_PICKED{ static int f_gold ( int [ ] arr , int n ) { int [ ] dp = new int [ n ] ; if ( n == 1 ) return arr [ 0 ] ; if ( n == 2 ) return Math . min ( arr [ 0 ] , arr [ 1 ] ) ; if ( n == 3 ) return Math . min ( arr [ 0 ] , Math . min ( arr [ 1 ] , arr [ 2 ] ) ) ; if ( n == 4 ) return Math . min ( Math . min ( arr [ 0 ] , arr [ 1 ] ) , Math . min ( arr [ 2 ] , arr [ 3 ] ) ) ; dp [ 0 ] = arr [ 0 ] ; dp [ 1 ] = arr [ 1 ] ; dp [ 2 ] = arr [ 2 ] ; dp [ 3 ] = arr [ 3 ] ; for ( int i = 4 ; i < n ; i ++ ) dp [ i ] = arr [ i ] + Math . min ( Math . min ( dp [ i - 1 ] , dp [ i - 2 ] ) , Math . min ( dp [ i - 3 ] , dp [ i - 4 ] ) ) ; return Math . min ( Math . min ( dp [ n - 1 ] , dp [ n - 2 ] ) , Math . min ( dp [ n - 4 ] , dp [ n - 3 ] ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,7,11,12,13,14,18,20,22,26,28,29,31,32,33,35,38,38,40,40,41,42,43,44,45,53,54,54,59,62,69,72,74,75,75,76,79,83,84,89,91,96,97,98,99,99}); param0.add(new int[]{50,-22,90,-40,46,86,50,44,12,-42,-58,6,52,-16,4,46,44,0,-64,78,-14,-80,30,-66,78,24,28,10,-72,-44,-28,-32,-30,94,-22,26,16,20,-52,-16,-80,2,-56,-70,-76,60,62}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{63,18,13,2,1,94,11,49,82,97,75,98,25,20,96,82,60,94,24,15,79,48,40,60,9,62,24,69,31,78,34,83,22,88}); param0.add(new int[]{-74,16,96}); param0.add(new int[]{0,0,1,0,1,1}); param0.add(new int[]{2,5,6,8,10,16,18,19,20,21,24,30,34,36,39,42,52,53,54,55,56,57,70,71,72,73,75,75,77,78,82,85,87,88,89,91}); param0.add(new int[]{-40,12,-86,-54,-68,32,10,-24,-46,54,-64,20,22,88,62,-4,-2,-8,-32,88,-4,38,4,86,82,-16,-76,-44,54,-24,-92,74,50,-52,52}); param0.add(new int[]{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}); param0.add(new int[]{4,53,96,86,69,81,86,95,80,43,25,66,24,72}); List param1 = new ArrayList<>(); param1.add(30); param1.add(40); param1.add(14); param1.add(33); param1.add(1); param1.add(5); param1.add(25); param1.add(22); param1.add(20); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : dp = [ 0 ] * n if ( n == 1 ) : return arr [ 0 ] if ( n == 2 ) : return min ( arr [ 0 ] , arr [ 1 ] ) if ( n == 3 ) : return min ( arr [ 0 ] , min ( arr [ 1 ] , arr [ 2 ] ) ) if ( n == 4 ) : return min ( min ( arr [ 0 ] , arr [ 1 ] ) , min ( arr [ 2 ] , arr [ 3 ] ) ) dp [ 0 ] = arr [ 0 ] dp [ 1 ] = arr [ 1 ] dp [ 2 ] = arr [ 2 ] dp [ 3 ] = arr [ 3 ] for i in range ( 4 , n ) : dp [ i ] = arr [ i ] + min ( min ( dp [ i - 1 ] , dp [ i - 2 ] ) , min ( dp [ i - 3 ] , dp [ i - 4 ] ) ) return min ( min ( dp [ n - 1 ] , dp [ n - 2 ] ) , min ( dp [ n - 4 ] , dp [ n - 3 ] ) ) "," using namespace std; int f_gold ( int arr [ ], int n ) { int dp [ n ]; if ( n == 1 ) return arr [ 0 ]; if ( n == 2 ) return min ( arr [ 0 ], arr [ 1 ] ); if ( n == 3 ) return min ( arr [ 0 ], min ( arr [ 1 ], arr [ 2 ] ) ); if ( n == 4 ) return min ( min ( arr [ 0 ], arr [ 1 ] ), min ( arr [ 2 ], arr [ 3 ] ) ); dp [ 0 ] = arr [ 0 ]; dp [ 1 ] = arr [ 1 ]; dp [ 2 ] = arr [ 2 ]; dp [ 3 ] = arr [ 3 ]; for ( int i = 4; i < n; i ++ ) dp [ i ] = arr [ i ] + min ( min ( dp [ i - 1 ], dp [ i - 2 ] ), min ( dp [ i - 3 ], dp [ i - 4 ] ) ); return min ( min ( dp [ n - 1 ], dp [ n - 2 ] ), min ( dp [ n - 4 ], dp [ n - 3 ] ) ); } int main() { int n_success = 0; vector> param0 {{2,7,11,12,13,14,18,20,22,26,28,29,31,32,33,35,38,38,40,40,41,42,43,44,45,53,54,54,59,62,69,72,74,75,75,76,79,83,84,89,91,96,97,98,99,99},{50,-22,90,-40,46,86,50,44,12,-42,-58,6,52,-16,4,46,44,0,-64,78,-14,-80,30,-66,78,24,28,10,-72,-44,-28,-32,-30,94,-22,26,16,20,-52,-16,-80,2,-56,-70,-76,60,62},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{63,18,13,2,1,94,11,49,82,97,75,98,25,20,96,82,60,94,24,15,79,48,40,60,9,62,24,69,31,78,34,83,22,88},{-74,16,96},{0,0,1,0,1,1},{2,5,6,8,10,16,18,19,20,21,24,30,34,36,39,42,52,53,54,55,56,57,70,71,72,73,75,75,77,78,82,85,87,88,89,91},{-40,12,-86,-54,-68,32,10,-24,-46,54,-64,20,22,88,62,-4,-2,-8,-32,88,-4,38,4,86,82,-16,-76,-44,54,-24,-92,74,50,-52,52},{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},{4,53,96,86,69,81,86,95,80,43,25,66,24,72}}; vector param1 {30,40,14,33,1,5,25,22,20,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 7, 11, 12, 13, 14, 18, 20, 22, 26, 28, 29, 31, 32, 33, 35, 38, 38, 40, 40, 41, 42, 43, 44, 45, 53, 54, 54, 59, 62, 69, 72, 74, 75, 75, 76, 79, 83, 84, 89, 91, 96, 97, 98, 99, 99],30,), ([50, -22, 90, -40, 46, 86, 50, 44, 12, -42, -58, 6, 52, -16, 4, 46, 44, 0, -64, 78, -14, -80, 30, -66, 78, 24, 28, 10, -72, -44, -28, -32, -30, 94, -22, 26, 16, 20, -52, -16, -80, 2, -56, -70, -76, 60, 62],40,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([63, 18, 13, 2, 1, 94, 11, 49, 82, 97, 75, 98, 25, 20, 96, 82, 60, 94, 24, 15, 79, 48, 40, 60, 9, 62, 24, 69, 31, 78, 34, 83, 22, 88],33,), ([-74, 16, 96],1,), ([0, 0, 1, 0, 1, 1],5,), ([2, 5, 6, 8, 10, 16, 18, 19, 20, 21, 24, 30, 34, 36, 39, 42, 52, 53, 54, 55, 56, 57, 70, 71, 72, 73, 75, 75, 77, 78, 82, 85, 87, 88, 89, 91],25,), ([-40, 12, -86, -54, -68, 32, 10, -24, -46, 54, -64, 20, 22, 88, 62, -4, -2, -8, -32, 88, -4, 38, 4, 86, 82, -16, -76, -44, 54, -24, -92, 74, 50, -52, 52],22,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],20,), ([4, 53, 96, 86, 69, 81, 86, 95, 80, 43, 25, 66, 24, 72],12,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE{ static int f_gold ( int arr [ ] , int n ) { if ( n == 1 || n == 0 ) return 1 ; if ( arr [ n - 1 ] < arr [ n - 2 ] ) return 0 ; return f_gold ( arr , n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,19,21,28,32,35,44,51,55,62,80,80,83,90,93,93}); param0.add(new int[]{84,-28,-42,38,-94,-70,34,54,38,-58,-54,-6,72,-32,-18,80,-6,-38,-30,-86,-10,14,92,-56,40,-58,-2,-6,-46,-80,72,-12,2,-64,36,98,-24}); param0.add(new int[]{0,1,1,1}); param0.add(new int[]{74,75,9,13,57,82,57,37,47,11,28,6,33,14,47,29,15,56,69,86,31,19,18,58,70,73,30,95,35,17,16,97,68,95,33,36,11,60,4,63,5,64,85,77,4}); param0.add(new int[]{-96,-92,-84,-78,-74,-68,-66,-64,-62,-50,-48,-48,-46,-38,-28,-28,-26,-24,-24,-20,-14,-12,-4,16,18,28,32,48,50,62,70,72,78,90,92}); param0.add(new int[]{0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,1,0,0}); param0.add(new int[]{6,8,11,21,29,31,41,50,56,56,69,69,74,79,86,88,93,95,99}); param0.add(new int[]{10,-12,-36,72,-42,-94,38,-78,-4,6,12,6,-48}); param0.add(new int[]{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}); param0.add(new int[]{97,58,88,20,63,1,23,33,57,81,54,66,95,31,54,16,37,7,1,94,18,42,39,26,75,65,57,69,86,77,17,7,71,12,38,87,48,55,54,72,15,30,55}); List param1 = new ArrayList<>(); param1.add(8); param1.add(21); param1.add(2); param1.add(31); param1.add(31); param1.add(38); param1.add(10); param1.add(6); param1.add(35); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { if ( n == 1 || n == 0 ) return 1; if ( arr [ n - 1 ] < arr [ n - 2 ] ) return 0; return f_gold ( arr, n - 1 ); } int main() { int n_success = 0; vector> param0 {{1,4,19,21,28,32,35,44,51,55,62,80,80,83,90,93,93},{84,-28,-42,38,-94,-70,34,54,38,-58,-54,-6,72,-32,-18,80,-6,-38,-30,-86,-10,14,92,-56,40,-58,-2,-6,-46,-80,72,-12,2,-64,36,98,-24},{0,1,1,1},{74,75,9,13,57,82,57,37,47,11,28,6,33,14,47,29,15,56,69,86,31,19,18,58,70,73,30,95,35,17,16,97,68,95,33,36,11,60,4,63,5,64,85,77,4},{-96,-92,-84,-78,-74,-68,-66,-64,-62,-50,-48,-48,-46,-38,-28,-28,-26,-24,-24,-20,-14,-12,-4,16,18,28,32,48,50,62,70,72,78,90,92},{0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,1,0,0},{6,8,11,21,29,31,41,50,56,56,69,69,74,79,86,88,93,95,99},{10,-12,-36,72,-42,-94,38,-78,-4,6,12,6,-48},{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},{97,58,88,20,63,1,23,33,57,81,54,66,95,31,54,16,37,7,1,94,18,42,39,26,75,65,57,69,86,77,17,7,71,12,38,87,48,55,54,72,15,30,55}}; vector param1 {8,21,2,31,31,38,10,6,35,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, PRODUCT_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PRODUCT_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING{ static int f_gold ( String tree , int k ) { int level = - 1 ; int product = 1 ; int n = tree . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( tree . charAt ( i ) == '(' ) level ++ ; else if ( tree . charAt ( i ) == ')' ) level -- ; else { if ( level == k ) product *= ( tree . charAt ( i ) - '0' ) ; } } return product ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""0010""); param0.add(""kjtdgmy""); List param1 = new ArrayList<>(); param1.add(2); param1.add(3); param1.add(1); param1.add(2); param1.add(4); param1.add(100); param1.add(3); param1.add(0); param1.add(12); param1.add(97); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( tree , k ) : level = - 1 product = 1 n = len ( tree ) for i in range ( 0 , n ) : if ( tree [ i ] == '(' ) : level += 1 elif ( tree [ i ] == ')' ) : level -= 1 else : if ( level == k ) : product *= ( int ( tree [ i ] ) - int ( '0' ) ) return product "," using namespace std; int f_gold ( string tree, int k ) { int level = - 1; int product = 1; int n = tree . length ( ); for ( int i = 0; i < n; i ++ ) { if ( tree [ i ] == '(' ) level ++; else if ( tree [ i ] == ')' ) level --; else { if ( level == k ) product *= ( tree [ i ] - '0' ); } } return product; } int main() { int n_success = 0; vector param0 { ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""0010"", ""kjtdgmy""}; vector param1 {2,3,1,2,4,100,3,0,12,97}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',2,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',3,), ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',1,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',2,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',4,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',100,), ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',3,), ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',0,), ('0010',12,), ('kjtdgmy',97,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SIZE_SUBARRAY_MAXIMUM_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SIZE_SUBARRAY_MAXIMUM_SUM{ static int f_gold ( int a [ ] , int size ) { int max_so_far = Integer . MIN_VALUE , max_ending_here = 0 , start = 0 , end = 0 , s = 0 ; for ( int i = 0 ; i < size ; i ++ ) { max_ending_here += a [ i ] ; if ( max_so_far < max_ending_here ) { max_so_far = max_ending_here ; start = s ; end = i ; } if ( max_ending_here < 0 ) { max_ending_here = 0 ; s = i + 1 ; } } return ( end - start + 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{7,7,16,20,21,22,34,34,37,37,49,53,54,55,58,59,60,66,67,68,73,80,80,88,90,98,99,99}); param0.add(new int[]{-90,-98,-10,-84,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{94,2,83,94,10,94,58,99,60,19,3,71,36,84,71,14,50,15}); param0.add(new int[]{-98,-96,-70,-64,-56,-38,-34,-24,-22,-2,26,32,36,50,62,70,70,72,72,74,78,82,84,86}); param0.add(new int[]{0,1,0,1,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,1,0,1,0,1,0}); param0.add(new int[]{1,2,2,5,13,14,15,18,21,34,42,48,50,63,67,68,69,75,80,80,81,83,84,89,90,90,91,92,95,98}); param0.add(new int[]{-88,-10,-88,-90,92,14,68,-90,-86}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{28,39,90,39,12,90,24,89,54,44,3,26,44,36,67,92,3,79,10,45,22,21,39,91,2,5,72,21,55,48,75,47}); List param1 = new ArrayList<>(); param1.add(21); param1.add(2); param1.add(19); param1.add(14); param1.add(13); param1.add(35); param1.add(22); param1.add(5); param1.add(24); param1.add(27); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int a [ ], int size ) { int max_so_far = INT_MIN, max_ending_here = 0, start = 0, end = 0, s = 0; for ( int i = 0; i < size; i ++ ) { max_ending_here += a [ i ]; if ( max_so_far < max_ending_here ) { max_so_far = max_ending_here; start = s; end = i; } if ( max_ending_here < 0 ) { max_ending_here = 0; s = i + 1; } } return ( end - start + 1 ); } int main() { int n_success = 0; vector> param0 {{7,7,16,20,21,22,34,34,37,37,49,53,54,55,58,59,60,66,67,68,73,80,80,88,90,98,99,99},{-90,-98,-10,-84,24},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{94,2,83,94,10,94,58,99,60,19,3,71,36,84,71,14,50,15},{-98,-96,-70,-64,-56,-38,-34,-24,-22,-2,26,32,36,50,62,70,70,72,72,74,78,82,84,86},{0,1,0,1,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,1,0,1,0,1,0},{1,2,2,5,13,14,15,18,21,34,42,48,50,63,67,68,69,75,80,80,81,83,84,89,90,90,91,92,95,98},{-88,-10,-88,-90,92,14,68,-90,-86},{0,0,0,0,0,0,0,0,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},{28,39,90,39,12,90,24,89,54,44,3,26,44,36,67,92,3,79,10,45,22,21,39,91,2,5,72,21,55,48,75,47}}; vector param1 {21,2,19,14,13,35,22,5,24,27}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, RECURSIVE_C_PROGRAM_LINEARLY_SEARCH_ELEMENT_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class RECURSIVE_C_PROGRAM_LINEARLY_SEARCH_ELEMENT_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int l , int r , int x ) { if ( r < l ) return - 1 ; if ( arr [ l ] == x ) return l ; if ( arr [ r ] == x ) return r ; return f_gold ( arr , l + 1 , r - 1 , x ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{10,74,5}); param0.add(new int[]{-90,72,36,96,42,0,-66,5}); param0.add(new int[]{0,5}); param0.add(new int[]{99,70,67,5}); param0.add(new int[]{-98,-98,-26,-26,-24,-18,-16,80,5}); param0.add(new int[]{1,1,1,1,0,1,5}); param0.add(new int[]{1,5,12,12,17,17,12,95,96,98,5}); param0.add(new int[]{50,-70,-30,-54,6,-10,70,84,5}); param0.add(new int[]{0,1,5}); param0.add(new int[]{59,21,28,3,14,5}); List param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); List param2 = new ArrayList<>(); param2.add(2); param2.add(7); param2.add(1); param2.add(3); param2.add(8); param2.add(6); param2.add(10); param2.add(8); param2.add(2); param2.add(5); List param3 = new ArrayList<>(); param3.add(1); param3.add(96); param3.add(-1); param3.add(3); param3.add(80); param3.add(1); param3.add(12); param3.add(27); param3.add(14); param3.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( arr , l , r , x ) : if r < l : return - 1 if arr [ l ] == x : return l if arr [ r ] == x : return r return f_gold ( arr , l + 1 , r - 1 , x ) "," using namespace std; int f_gold ( int arr [ ], int l, int r, int x ) { if ( r < l ) return - 1; if ( arr [ l ] == x ) return l; if ( arr [ r ] == x ) return r; return f_gold ( arr, l + 1, r - 1, x ); } int main() { int n_success = 0; vector> param0 {{10,74,3},{-90,72,36,96,42,0,-66,4},{0},{99,70,67,5},{-98,-98,-26,-26,-24,-18,-16,80,5},{1,1,1,1,0,1,0},{1,5,12,12,17,17,12,95,96,98,4},{50,-70,-30,-54,6,-10,70,84,5},{0,1,5},{59,21,28,3,14,5}}; vector param1 {0,0,0,0,0,0,0,0,0,0}; vector param2 {2,7,1,3,8,6,10,8,2,5}; vector param3 {1,96,-1,3,80,1,12,27,14,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([10,74,5],0,2,1,), ([-90,72,36,96,42,0,-66,5],0,7,96,), ([0,5],0,1,-1,), ([99,70,67,5],0,3,3,), ([-98,-98,-26,-26,-24,-18,-16,80,5],0,8,80,), ([1,1,1,1,0,1,5],0,6,1,), ([1,5,12,12,17,17,12,95,96,98,5],0,0,12,), ([50,-70,-30,-54,6,-10,70,84,5],0,8,27,), ([0,1,5],0,2,14,), ([59,21,28,3,14,5],0,5,28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", CHECK_POSSIBLE_SORT_ARRAY_CONDITIONAL_SWAPPING_ADJACENT_ALLOWED," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_POSSIBLE_SORT_ARRAY_CONDITIONAL_SWAPPING_ADJACENT_ALLOWED{ static boolean f_gold ( int arr [ ] , int n ) { for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( arr [ i ] > arr [ i + 1 ] ) { if ( arr [ i ] - arr [ i + 1 ] == 1 ) { int temp = arr [ i ] ; arr [ i ] = arr [ i + 1 ] ; arr [ i + 1 ] = temp ; } else return false ; } } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,4,12,16,37,44,47,51,55,57,57,62,62,62,64,69,69,70,72,81,81,88,89,97}); param0.add(new int[]{-86,0,14,-16,-12,-72,62,-34,-72,30,84,-60,84,-64,50,74,18,-82,-64,-64,-74,-56,86,84,-32,-10,20,4,8,96,82,26,42}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{48,66,83,12,77,98,18,33,21,16,28,24,46,43}); param0.add(new int[]{-92,-58,-36,-28,-6,2,4,26,48,58,60,62,62,98}); param0.add(new int[]{1,0,0,0,0,1}); param0.add(new int[]{22,38,41,41,42,51,54,58,68,76,80,85}); param0.add(new int[]{84,-38,52,-72,-24,82,54,74,0}); param0.add(new int[]{0,1,1}); param0.add(new int[]{63,31,14,19,77,64,62,23,22,19,39,9,79,1,87,29,58,3,3,39,1,39,35,64,64}); List param1 = new ArrayList<>(); param1.add(15); param1.add(18); param1.add(31); param1.add(13); param1.add(10); param1.add(4); param1.add(9); param1.add(8); param1.add(2); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : for i in range ( 0 , n - 1 ) : if ( arr [ i ] > arr [ i + 1 ] ) : if ( arr [ i ] - arr [ i + 1 ] == 1 ) : arr [ i ] , arr [ i + 1 ] = arr [ i + 1 ] , arr [ i ] else : return False return True "," using namespace std; bool f_gold ( int arr [ ], int n ) { for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] > arr [ i + 1 ] ) { if ( arr [ i ] - arr [ i + 1 ] == 1 ) swap ( arr [ i ], arr [ i + 1 ] ); else return false; } } return true; } int main() { int n_success = 0; vector> param0 {{1,4,12,16,37,44,47,51,55,57,57,62,62,62,64,69,69,70,72,81,81,88,89,97},{-86,0,14,-16,-12,-72,62,-34,-72,30,84,-60,84,-64,50,74,18,-82,-64,-64,-74,-56,86,84,-32,-10,20,4,8,96,82,26,42},{0,0,0,0,0,0,0,0,0,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},{48,66,83,12,77,98,18,33,21,16,28,24,46,43},{-92,-58,-36,-28,-6,2,4,26,48,58,60,62,62,98},{1,0,0,0,0,1},{22,38,41,41,42,51,54,58,68,76,80,85},{84,-38,52,-72,-24,82,54,74,0},{0,1,1},{63,31,14,19,77,64,62,23,22,19,39,9,79,1,87,29,58,3,3,39,1,39,35,64,64}}; vector param1 {15,18,31,13,10,4,9,8,2,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 4, 12, 16, 37, 44, 47, 51, 55, 57, 57, 62, 62, 62, 64, 69, 69, 70, 72, 81, 81, 88, 89, 97],15,), ([-86, 0, 14, -16, -12, -72, 62, -34, -72, 30, 84, -60, 84, -64, 50, 74, 18, -82, -64, -64, -74, -56, 86, 84, -32, -10, 20, 4, 8, 96, 82, 26, 42],18,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([48, 66, 83, 12, 77, 98, 18, 33, 21, 16, 28, 24, 46, 43],13,), ([-92, -58, -36, -28, -6, 2, 4, 26, 48, 58, 60, 62, 62, 98],10,), ([1, 0, 0, 0, 0, 1],4,), ([22, 38, 41, 41, 42, 51, 54, 58, 68, 76, 80, 85],9,), ([84, -38, 52, -72, -24, 82, 54, 74, 0],8,), ([0, 1, 1],2,), ([63, 31, 14, 19, 77, 64, 62, 23, 22, 19, 39, 9, 79, 1, 87, 29, 58, 3, 3, 39, 1, 39, 35, 64, 64],13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", C_PROGRAM_FACTORIAL_NUMBER_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class C_PROGRAM_FACTORIAL_NUMBER_2{ static int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(66); param0.add(93); param0.add(39); param0.add(93); param0.add(68); param0.add(20); param0.add(37); param0.add(52); param0.add(52); param0.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) "," using namespace std; int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); } int main() { int n_success = 0; vector param0 {66,93,39,93,68,20,37,52,52,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (66,), (93,), (39,), (93,), (68,), (20,), (37,), (52,), (52,), (19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_SERIES_23_45_67_89_UPTO_N_TERMS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SERIES_23_45_67_89_UPTO_N_TERMS{ static double f_gold ( int n ) { int i = 1 ; double res = 0.0 ; boolean sign = true ; while ( n > 0 ) { n -- ; if ( sign ) { sign = ! sign ; res = res + ( double ) ++ i / ++ i ; } else { sign = ! sign ; res = res - ( double ) ++ i / ++ i ; } } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(49); param0.add(4); param0.add(60); param0.add(90); param0.add(96); param0.add(29); param0.add(86); param0.add(47); param0.add(77); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : i = 1 ; res = 0.0 ; sign = True ; while ( n > 0 ) : n = n - 1 ; if ( sign ) : sign = False ; res = res + ( i + 1 ) / ( i + 2 ) ; i = i + 2 ; else : sign = True ; res = res - ( i + 1 ) / ( i + 2 ) ; i = i + 2 ; return res ; "," using namespace std; double f_gold ( int n ) { int i = 1; double res = 0.0; bool sign = true; while ( n > 0 ) { n --; if ( sign ) { sign = ! sign; res = res + ( double ) ++ i / ++ i; } else { sign = ! sign; res = res - ( double ) ++ i / ++ i; } } return res; } int main() { int n_success = 0; vector param0 {49,4,60,90,96,29,86,47,77,87}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (49,), (4,), (60,), (90,), (96,), (29,), (86,), (47,), (77,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_NUMBER_PAIRS_N_B_N_GCD_B_B," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_PAIRS_N_B_N_GCD_B_B{ static int f_gold ( int n ) { int k = n ; int imin = 1 ; int ans = 0 ; while ( imin <= n ) { int imax = n / k ; ans += k * ( imax - imin + 1 ) ; imin = imax + 1 ; k = n / imin ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(17); param0.add(72); param0.add(43); param0.add(55); param0.add(62); param0.add(22); param0.add(17); param0.add(68); param0.add(20); param0.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(n): k = n imin = 1 ans = 0 while (imin <= n): imax = n / k ans += k * (imax - imin + 1) imin = imax + 1 k = n / imin return ans "," using namespace std; int f_gold ( int n ) { int k = n; int imin = 1; int ans = 0; while ( imin <= n ) { int imax = n / k; ans += k * ( imax - imin + 1 ); imin = imax + 1; k = n / imin; } return ans; } int main() { int n_success = 0; vector param0 {17,72,43,55,62,22,17,68,20,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (17,), (72,), (43,), (55,), (62,), (22,), (17,), (68,), (20,), (29,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", CALCULATE_VOLUME_DODECAHEDRON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CALCULATE_VOLUME_DODECAHEDRON{ static double f_gold ( int side ) { return ( ( ( 15 + ( 7 * ( Math . sqrt ( 5 ) ) ) ) / 4 ) * ( Math . pow ( side , 3 ) ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(56); param0.add(73); param0.add(22); param0.add(10); param0.add(84); param0.add(20); param0.add(51); param0.add(91); param0.add(10); param0.add(83); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( side ) : return ( ( ( 15 + ( 7 * ( math.sqrt ( 5 ) ) ) ) / 4 ) * ( math.pow ( side , 3 ) ) ) "," using namespace std; double f_gold ( int side ) { return ( ( ( 15 + ( 7 * ( sqrt ( 5 ) ) ) ) / 4 ) * ( pow ( side, 3 ) ) ); } int main() { int n_success = 0; vector param0 {56,73,22,10,84,20,51,91,10,83}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (56,), (73,), (22,), (10,), (84,), (20,), (51,), (91,), (10,), (83,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SORT_ARRAY_CONTAIN_1_N_VALUES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class SORT_ARRAY_CONTAIN_1_N_VALUES{ static void f_gold ( int [ ] arr , int n ) { for ( int i = 0 ; i < n ; i ++ ) { arr [ i ] = i + 1 ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,3,6,7,9,11,15,15,17,19,21,23,26,27,37,48,48,51,53,53,59,64,69,69,70,71,72,84,93,96}); param0.add(new int[]{66,-28,6,25,-65,19,-86,-86,-90,40,-62}); param0.add(new int[]{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}); param0.add(new int[]{85,84,8,36,93,76,14,54,85,86}); param0.add(new int[]{-90,-82,-80,-73,-67,-62,-62,-61,-58,-56,-56,-52,-50,-49,-49,-43,-43,-30,-26,-26,-15,-14,-13,-4,10,19,20,22,26,29,34,35,37,45,49,52,54,66,67,80,84,87,89,90}); param0.add(new int[]{1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,1,1,1}); param0.add(new int[]{10,11,13,19,19,30,33,36,40,42,44,47,49,52,53,58,66,68,72,82,87,89,90,94}); param0.add(new int[]{-46,-35,40,-76,-66,-47,36,-82,-43,12,-95,54,58,82,-87,-17,-71,-97,-10,4,23,86,-24}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{88,76,16,23,40,60,73,32,15,13,5,75,74,52,77,41,53,50,15,7,40,28,32,99,15,85}); List param1 = new ArrayList<>(); param1.add(19); param1.add(8); param1.add(26); param1.add(9); param1.add(31); param1.add(29); param1.add(21); param1.add(12); param1.add(6); param1.add(18); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{3,3,6,7,9,11,15,15,17,19,21,23,26,27,37,48,48,51,53,53,59,64,69,69,70,71,72,84,93,96}); filled_function_param0.add(new int[]{66,-28,6,25,-65,19,-86,-86,-90,40,-62}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{85,84,8,36,93,76,14,54,85,86}); filled_function_param0.add(new int[]{-90,-82,-80,-73,-67,-62,-62,-61,-58,-56,-56,-52,-50,-49,-49,-43,-43,-30,-26,-26,-15,-14,-13,-4,10,19,20,22,26,29,34,35,37,45,49,52,54,66,67,80,84,87,89,90}); filled_function_param0.add(new int[]{1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,1,1,1}); filled_function_param0.add(new int[]{10,11,13,19,19,30,33,36,40,42,44,47,49,52,53,58,66,68,72,82,87,89,90,94}); filled_function_param0.add(new int[]{-46,-35,40,-76,-66,-47,36,-82,-43,12,-95,54,58,82,-87,-17,-71,-97,-10,4,23,86,-24}); filled_function_param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); filled_function_param0.add(new int[]{88,76,16,23,40,60,73,32,15,13,5,75,74,52,77,41,53,50,15,7,40,28,32,99,15,85}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(19); filled_function_param1.add(8); filled_function_param1.add(26); filled_function_param1.add(9); filled_function_param1.add(31); filled_function_param1.add(29); filled_function_param1.add(21); filled_function_param1.add(12); filled_function_param1.add(6); filled_function_param1.add(18); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : for i in range ( n ) : arr [ i ] = i + 1 "," using namespace std; void f_gold ( int arr [ ], int n ) { for ( int i = 0; i < n; i ++ ) { arr [ i ] = i + 1; } } int main() { int n_success = 0; vector> param0 {{3,3,6,7,9,11,15,15,17,19,21,23,26,27,37,48,48,51,53,53,59,64,69,69,70,71,72,84,93,96},{66,-28,6,25,-65,19,-86,-86,-90,40,-62},{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},{85,84,8,36,93,76,14,54,85,86},{-90,-82,-80,-73,-67,-62,-62,-61,-58,-56,-56,-52,-50,-49,-49,-43,-43,-30,-26,-26,-15,-14,-13,-4,10,19,20,22,26,29,34,35,37,45,49,52,54,66,67,80,84,87,89,90},{1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,1,1,1},{10,11,13,19,19,30,33,36,40,42,44,47,49,52,53,58,66,68,72,82,87,89,90,94},{-46,-35,40,-76,-66,-47,36,-82,-43,12,-95,54,58,82,-87,-17,-71,-97,-10,4,23,86,-24},{0,0,0,0,0,1,1,1,1,1,1},{88,76,16,23,40,60,73,32,15,13,5,75,74,52,77,41,53,50,15,7,40,28,32,99,15,85}}; vector param1 {19,8,26,9,31,29,21,12,6,18}; vector> filled_function_param0 {{3,3,6,7,9,11,15,15,17,19,21,23,26,27,37,48,48,51,53,53,59,64,69,69,70,71,72,84,93,96},{66,-28,6,25,-65,19,-86,-86,-90,40,-62},{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},{85,84,8,36,93,76,14,54,85,86},{-90,-82,-80,-73,-67,-62,-62,-61,-58,-56,-56,-52,-50,-49,-49,-43,-43,-30,-26,-26,-15,-14,-13,-4,10,19,20,22,26,29,34,35,37,45,49,52,54,66,67,80,84,87,89,90},{1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,1,1,1},{10,11,13,19,19,30,33,36,40,42,44,47,49,52,53,58,66,68,72,82,87,89,90,94},{-46,-35,40,-76,-66,-47,36,-82,-43,12,-95,54,58,82,-87,-17,-71,-97,-10,4,23,86,-24},{0,0,0,0,0,1,1,1,1,1,1},{88,76,16,23,40,60,73,32,15,13,5,75,74,52,77,41,53,50,15,7,40,28,32,99,15,85}}; vector filled_function_param1 {19,8,26,9,31,29,21,12,6,18}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 3, 6, 7, 9, 11, 15, 15, 17, 19, 21, 23, 26, 27, 37, 48, 48, 51, 53, 53, 59, 64, 69, 69, 70, 71, 72, 84, 93, 96],19,), ([66, -28, 6, 25, -65, 19, -86, -86, -90, 40, -62],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,), ([85, 84, 8, 36, 93, 76, 14, 54, 85, 86],9,), ([-90, -82, -80, -73, -67, -62, -62, -61, -58, -56, -56, -52, -50, -49, -49, -43, -43, -30, -26, -26, -15, -14, -13, -4, 10, 19, 20, 22, 26, 29, 34, 35, 37, 45, 49, 52, 54, 66, 67, 80, 84, 87, 89, 90],31,), ([1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1],29,), ([10, 11, 13, 19, 19, 30, 33, 36, 40, 42, 44, 47, 49, 52, 53, 58, 66, 68, 72, 82, 87, 89, 90, 94],21,), ([-46, -35, 40, -76, -66, -47, 36, -82, -43, 12, -95, 54, 58, 82, -87, -17, -71, -97, -10, 4, 23, 86, -24],12,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],6,), ([88, 76, 16, 23, 40, 60, 73, 32, 15, 13, 5, 75, 74, 52, 77, 41, 53, 50, 15, 7, 40, 28, 32, 99, 15, 85],18,) ] filled_function_param = [ ([3, 3, 6, 7, 9, 11, 15, 15, 17, 19, 21, 23, 26, 27, 37, 48, 48, 51, 53, 53, 59, 64, 69, 69, 70, 71, 72, 84, 93, 96],19,), ([66, -28, 6, 25, -65, 19, -86, -86, -90, 40, -62],8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,), ([85, 84, 8, 36, 93, 76, 14, 54, 85, 86],9,), ([-90, -82, -80, -73, -67, -62, -62, -61, -58, -56, -56, -52, -50, -49, -49, -43, -43, -30, -26, -26, -15, -14, -13, -4, 10, 19, 20, 22, 26, 29, 34, 35, 37, 45, 49, 52, 54, 66, 67, 80, 84, 87, 89, 90],31,), ([1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1],29,), ([10, 11, 13, 19, 19, 30, 33, 36, 40, 42, 44, 47, 49, 52, 53, 58, 66, 68, 72, 82, 87, 89, 90, 94],21,), ([-46, -35, 40, -76, -66, -47, 36, -82, -43, 12, -95, 54, 58, 82, -87, -17, -71, -97, -10, 4, 23, 86, -24],12,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],6,), ([88, 76, 16, 23, 40, 60, 73, 32, 15, 13, 5, 75, 74, 52, 77, 41, 53, 50, 15, 7, 40, 28, 32, 99, 15, 85],18,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_CHECK_INPUT_INTEGER_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CHECK_INPUT_INTEGER_STRING{ static boolean f_gold ( String s ) { for ( int i = 0 ; i < s . length ( ) ; i ++ ) if ( Character . isDigit ( s . charAt ( i ) ) == false ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""MgTOyHo NT""); param0.add(""033675175""); param0.add(""011001""); param0.add(""XLlccG""); param0.add(""8223900094410""); param0.add(""000""); param0.add(""aupp""); param0.add(""90202721499""); param0.add(""110000100011""); param0.add(""MhYHsMQeLhG""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : for i in range ( len ( s ) ) : if s [ i ].isdigit ( ) != True : return False return True "," using namespace std; bool f_gold ( string s ) { for ( int i = 0; i < s . length ( ); i ++ ) if ( isdigit ( s [ i ] ) == false ) return false; return true; } int main() { int n_success = 0; vector param0 {""MgTOyHo NT"",""033675175"",""011001"",""XLlccG"",""8223900094410"",""000"",""aupp"",""90202721499"",""110000100011"",""MhYHsMQeLhG""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('MgTOyHo NT',), ('033675175',), ('011001',), ('XLlccG',), ('8223900094410',), ('000',), ('aupp',), ('90202721499',), ('110000100011',), ('MhYHsMQeLhG',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_XOR_VALUE_PAIR_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_XOR_VALUE_PAIR_1{ static int f_gold ( int arr [ ] , int n ) { Arrays . parallelSort ( arr ) ; int minXor = Integer . MAX_VALUE ; int val = 0 ; for ( int i = 0 ; i < n - 1 ; i ++ ) { val = arr [ i ] ^ arr [ i + 1 ] ; minXor = Math . min ( minXor , val ) ; } return minXor ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,11,12,27,32,32,36,56,57,66,68,70,74,78,82,83,96}); param0.add(new int[]{40,48,66,4,-60,42,-8,38}); param0.add(new int[]{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}); param0.add(new int[]{98,6,82,95,87,20,11,63,78,70,37,12,57,67,10,49,38,28,86,7,61,50,32,68,91,66,57,29,2,64,65,15,16,4,7,76,44,52,81,89,3,36,57,95,48,24}); param0.add(new int[]{-88,-84,-76,-58,-40,-38,-28,-24,-20,-14,-12,16,20,28,28,30,40,44,56,58,60,92,92}); param0.add(new int[]{0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1,1,0,1,0}); param0.add(new int[]{6,6,19,31,41,45,49,56,78,96,98}); param0.add(new int[]{62,-90,22,-84,-4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{83,13,43,99,34,74,56,20,93,65,92,58,91,72,37,10,39,7,29,69,42,28}); List param1 = new ArrayList<>(); param1.add(10); param1.add(7); param1.add(19); param1.add(36); param1.add(13); param1.add(20); param1.add(6); param1.add(3); param1.add(21); param1.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import sys def f_gold ( arr , n ) : arr.sort ( ) minXor = int ( sys.float_info.max ) val = 0 for i in range ( 0 , n - 1 ) : val = arr [ i ] ^ arr [ i + 1 ] ; minXor = min ( minXor , val ) ; return minXor "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int minXor = INT_MAX; int val = 0; for ( int i = 0; i < n - 1; i ++ ) { val = arr [ i ] ^ arr [ i + 1 ]; minXor = min ( minXor, val ); } return minXor; } int main() { int n_success = 0; vector> param0 {{8,11,12,27,32,32,36,56,57,66,68,70,74,78,82,83,96},{40,48,66,4,-60,42,-8,38},{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},{98,6,82,95,87,20,11,63,78,70,37,12,57,67,10,49,38,28,86,7,61,50,32,68,91,66,57,29,2,64,65,15,16,4,7,76,44,52,81,89,3,36,57,95,48,24},{-88,-84,-76,-58,-40,-38,-28,-24,-20,-14,-12,16,20,28,28,30,40,44,56,58,60,92,92},{0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1,1,0,1,0},{6,6,19,31,41,45,49,56,78,96,98},{62,-90,22,-84,-4},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{83,13,43,99,34,74,56,20,93,65,92,58,91,72,37,10,39,7,29,69,42,28}}; vector param1 {10,7,19,36,13,20,6,3,21,14}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 11, 12, 27, 32, 32, 36, 56, 57, 66, 68, 70, 74, 78, 82, 83, 96],10,), ([40, 48, 66, 4, -60, 42, -8, 38],7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([98, 6, 82, 95, 87, 20, 11, 63, 78, 70, 37, 12, 57, 67, 10, 49, 38, 28, 86, 7, 61, 50, 32, 68, 91, 66, 57, 29, 2, 64, 65, 15, 16, 4, 7, 76, 44, 52, 81, 89, 3, 36, 57, 95, 48, 24],36,), ([-88, -84, -76, -58, -40, -38, -28, -24, -20, -14, -12, 16, 20, 28, 28, 30, 40, 44, 56, 58, 60, 92, 92],13,), ([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0],20,), ([6, 6, 19, 31, 41, 45, 49, 56, 78, 96, 98],6,), ([62, -90, 22, -84, -4],3,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],21,), ([83, 13, 43, 99, 34, 74, 56, 20, 93, 65, 92, 58, 91, 72, 37, 10, 39, 7, 29, 69, 42, 28],14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS{ public static int f_gold ( int k ) { int cur = ( k * ( k - 1 ) ) + 1 ; int sum = 0 ; while ( k -- > 0 ) { sum += cur ; cur += 2 ; } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(91); param0.add(52); param0.add(78); param0.add(51); param0.add(65); param0.add(39); param0.add(42); param0.add(12); param0.add(56); param0.add(98); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(k): cur = int((k * (k - 1)) + 1) sum = 0 while k: sum += cur cur += 2 k = k - 1 return sum "," using namespace std; int f_gold ( int k ) { int cur = ( k * ( k - 1 ) ) + 1; int sum = 0; while ( k -- ) { sum += cur; cur += 2; } return sum; } int main() { int n_success = 0; vector param0 {91,52,78,51,65,39,42,12,56,98}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (91,), (52,), (78,), (51,), (65,), (39,), (42,), (12,), (56,), (98,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SMALLEST_VALUE_REPRESENTED_SUM_SUBSET_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int res = 1 ; for ( int i = 0 ; i < n && arr [ i ] <= res ; i ++ ) res = res + arr [ i ] ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{16,23,24,41,48,58,72,75}); param0.add(new int[]{-14,-82,12,-14,-38,12,40,12,-74,42,-36,64}); param0.add(new int[]{0,0,1,1,1,1}); param0.add(new int[]{17,89,44}); param0.add(new int[]{-94,-92,-84,-82,-72,-58,-56,-40,-34,-34,-24,-22,-8,-8,12,14,16,16,22,22,34,46,54,58,68,72,74,78,88,96}); param0.add(new int[]{0,0,0,0,0,1,0,0,1,0,1,0}); param0.add(new int[]{2,12,13,13,13,16,28,32,34,41,41,47,49,49,50,52,58,61,63,65,67,68,68,74,80,80,84,84,89,93,94,98,99,99}); param0.add(new int[]{-54}); param0.add(new int[]{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}); param0.add(new int[]{42,50,76,45,6,63,46,73,65,70,87,5,41,63,96,75,38,76,27,7,71,9,65,44,76,37,94,52,55,3,38,68,45,15,35,90,36,46,13,92,32,22,49,35,83}); List param1 = new ArrayList<>(); param1.add(4); param1.add(8); param1.add(5); param1.add(2); param1.add(25); param1.add(8); param1.add(23); param1.add(0); param1.add(33); param1.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : res = 1 for i in range ( 0 , n ) : if arr [ i ] <= res : res = res + arr [ i ] else : break return res "," using namespace std; int f_gold ( int arr [ ], int n ) { int res = 1; for ( int i = 0; i < n && arr [ i ] <= res; i ++ ) res = res + arr [ i ]; return res; } int main() { int n_success = 0; vector> param0 {{16,23,24,41,48,58,72,75},{-14,-82,12,-14,-38,12,40,12,-74,42,-36,64},{0,0,1,1,1,1},{17,89,44},{-94,-92,-84,-82,-72,-58,-56,-40,-34,-34,-24,-22,-8,-8,12,14,16,16,22,22,34,46,54,58,68,72,74,78,88,96},{0,0,0,0,0,1,0,0,1,0,1,0},{2,12,13,13,13,16,28,32,34,41,41,47,49,49,50,52,58,61,63,65,67,68,68,74,80,80,84,84,89,93,94,98,99,99},{-54},{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},{42,50,76,45,6,63,46,73,65,70,87,5,41,63,96,75,38,76,27,7,71,9,65,44,76,37,94,52,55,3,38,68,45,15,35,90,36,46,13,92,32,22,49,35,83}}; vector param1 {4,8,5,2,25,8,23,0,33,35}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([16, 23, 24, 41, 48, 58, 72, 75],4,), ([-14, -82, 12, -14, -38, 12, 40, 12, -74, 42, -36, 64],8,), ([0, 0, 1, 1, 1, 1],5,), ([17, 89, 44],2,), ([-94, -92, -84, -82, -72, -58, -56, -40, -34, -34, -24, -22, -8, -8, 12, 14, 16, 16, 22, 22, 34, 46, 54, 58, 68, 72, 74, 78, 88, 96],25,), ([0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0],8,), ([2, 12, 13, 13, 13, 16, 28, 32, 34, 41, 41, 47, 49, 49, 50, 52, 58, 61, 63, 65, 67, 68, 68, 74, 80, 80, 84, 84, 89, 93, 94, 98, 99, 99],23,), ([-54],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],33,), ([42, 50, 76, 45, 6, 63, 46, 73, 65, 70, 87, 5, 41, 63, 96, 75, 38, 76, 27, 7, 71, 9, 65, 44, 76, 37, 94, 52, 55, 3, 38, 68, 45, 15, 35, 90, 36, 46, 13, 92, 32, 22, 49, 35, 83],35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10{ static boolean f_gold ( int n ) { if ( n % 15 == 0 ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(30); param0.add(-30); param0.add(60); param0.add(90); param0.add(99); param0.add(32); param0.add(21); param0.add(65); param0.add(21); param0.add(99); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( n % 15 == 0 ) "," using namespace std; bool f_gold ( int n ) { return ( n % 15 == 0 ); } int main() { int n_success = 0; vector param0 {30,-30,60,90,99,32,21,65,21,99}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (30,), (-30,), (60,), (90,), (99,), (32,), (21,), (65,), (21,), (99,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_14_MAXIMUM_SUM_INCREASING_SUBSEQUENCE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_14_MAXIMUM_SUM_INCREASING_SUBSEQUENCE{ static int f_gold ( int arr [ ] , int n ) { int i , j , max = 0 ; int msis [ ] = new int [ n ] ; for ( i = 0 ; i < n ; i ++ ) msis [ i ] = arr [ i ] ; for ( i = 1 ; i < n ; i ++ ) for ( j = 0 ; j < i ; j ++ ) if ( arr [ i ] > arr [ j ] && msis [ i ] < msis [ j ] + arr [ i ] ) msis [ i ] = msis [ j ] + arr [ i ] ; for ( i = 0 ; i < n ; i ++ ) if ( max < msis [ i ] ) max = msis [ i ] ; return max ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,5,7,12,23,31,31,45,47,60,67,70,84,85,91,96}); param0.add(new int[]{-88,-38,-50,-14,36,-32,0,-8,-12,-62,-46,66,-46,-26,6,-44,14,-74,-84,52,-28}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{85,42,7,35,35,21,97,59,88,50,12,44,85,22,38,23,42,61,44,63,23,69,28,17,73,20,71,80,15,42,28,10,56,77,43}); param0.add(new int[]{-92,-82,-82,-74,-72,-68,-68,-66,-60,-54,-42,-38,-36,-32,-30,-16,-14,-12,-10,14,24,28,34,34,38,42,44,52,70,72,80,84,86,94}); param0.add(new int[]{0,1,1,1,1,1,0,1,1,0,1,0,0,0}); param0.add(new int[]{33}); param0.add(new int[]{76,86,46,-70,92,6,70,-66,64,46,86,-42,-46,-24,8,76,4,-96,-86,18,70,-72,-56,-88,-96,62,22,20,42}); param0.add(new int[]{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}); param0.add(new int[]{25,46,41,61,93,29,65,24,10,89,22,51,18,65,70,59,87,82,97,99,15,64,20,97,12,23,76}); List param1 = new ArrayList<>(); param1.add(11); param1.add(18); param1.add(39); param1.add(26); param1.add(32); param1.add(8); param1.add(0); param1.add(21); param1.add(24); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : max = 0 msis = [ 0 for x in range ( n ) ] for i in range ( n ) : msis [ i ] = arr [ i ] for i in range ( 1 , n ) : for j in range ( i ) : if ( arr [ i ] > arr [ j ] and msis [ i ] < msis [ j ] + arr [ i ] ) : msis [ i ] = msis [ j ] + arr [ i ] for i in range ( n ) : if max < msis [ i ] : max = msis [ i ] return max "," using namespace std; int f_gold ( int arr [ ], int n ) { int i, j, max = 0; int msis [ n ]; for ( i = 0; i < n; i ++ ) msis [ i ] = arr [ i ]; for ( i = 1; i < n; i ++ ) for ( j = 0; j < i; j ++ ) if ( arr [ i ] > arr [ j ] && msis [ i ] < msis [ j ] + arr [ i ] ) msis [ i ] = msis [ j ] + arr [ i ]; for ( i = 0; i < n; i ++ ) if ( max < msis [ i ] ) max = msis [ i ]; return max; } int main() { int n_success = 0; vector> param0 {{4,5,7,12,23,31,31,45,47,60,67,70,84,85,91,96},{-88,-38,-50,-14,36,-32,0,-8,-12,-62,-46,66,-46,-26,6,-44,14,-74,-84,52,-28},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{85,42,7,35,35,21,97,59,88,50,12,44,85,22,38,23,42,61,44,63,23,69,28,17,73,20,71,80,15,42,28,10,56,77,43},{-92,-82,-82,-74,-72,-68,-68,-66,-60,-54,-42,-38,-36,-32,-30,-16,-14,-12,-10,14,24,28,34,34,38,42,44,52,70,72,80,84,86,94},{0,1,1,1,1,1,0,1,1,0,1,0,0,0},{33},{76,86,46,-70,92,6,70,-66,64,46,86,-42,-46,-24,8,76,4,-96,-86,18,70,-72,-56,-88,-96,62,22,20,42},{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},{25,46,41,61,93,29,65,24,10,89,22,51,18,65,70,59,87,82,97,99,15,64,20,97,12,23,76}}; vector param1 {11,18,39,26,32,8,0,21,24,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 5, 7, 12, 23, 31, 31, 45, 47, 60, 67, 70, 84, 85, 91, 96],11,), ([-88, -38, -50, -14, 36, -32, 0, -8, -12, -62, -46, 66, -46, -26, 6, -44, 14, -74, -84, 52, -28],18,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],39,), ([85, 42, 7, 35, 35, 21, 97, 59, 88, 50, 12, 44, 85, 22, 38, 23, 42, 61, 44, 63, 23, 69, 28, 17, 73, 20, 71, 80, 15, 42, 28, 10, 56, 77, 43],26,), ([-92, -82, -82, -74, -72, -68, -68, -66, -60, -54, -42, -38, -36, -32, -30, -16, -14, -12, -10, 14, 24, 28, 34, 34, 38, 42, 44, 52, 70, 72, 80, 84, 86, 94],32,), ([0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0],8,), ([33],0,), ([76, 86, 46, -70, 92, 6, 70, -66, 64, 46, 86, -42, -46, -24, 8, 76, 4, -96, -86, 18, 70, -72, -56, -88, -96, 62, 22, 20, 42],21,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([25, 46, 41, 61, 93, 29, 65, 24, 10, 89, 22, 51, 18, 65, 70, 59, 87, 82, 97, 99, 15, 64, 20, 97, 12, 23, 76],20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING{ static int f_gold ( String tree , int k ) { int level = - 1 ; int sum = 0 ; int n = tree . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( tree . charAt ( i ) == '(' ) level ++ ; else if ( tree . charAt ( i ) == ')' ) level -- ; else { if ( level == k ) sum += ( tree . charAt ( i ) - '0' ) ; } } return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))""); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""(0(5(6()())(4()(9()())))(7(1()())(3()())))""); param0.add(""0010""); param0.add(""kjtdgmy""); List param1 = new ArrayList<>(); param1.add(2); param1.add(3); param1.add(1); param1.add(2); param1.add(4); param1.add(100); param1.add(3); param1.add(0); param1.add(12); param1.add(97); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( tree , k ) : level = - 1 sum = 0 n = len ( tree ) for i in range ( n ) : if ( tree [ i ] == '(' ) : level += 1 elif ( tree [ i ] == ')' ) : level -= 1 else : if ( level == k ) : sum += ( ord ( tree [ i ] ) - ord ( '0' ) ) return sum "," using namespace std; int f_gold ( string tree, int k ) { int level = - 1; int sum = 0; int n = tree . length ( ); for ( int i = 0; i < n; i ++ ) { if ( tree [ i ] == '(' ) level ++; else if ( tree [ i ] == ')' ) level --; else { if ( level == k ) sum += ( tree [ i ] - '0' ); } } return sum; } int main() { int n_success = 0; vector param0 { ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))"", ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""(0(5(6()())(4()(9()())))(7(1()())(3()())))"", ""0010"", ""kjtdgmy""}; vector param1 {2,3,1,2,4,100,3,0,12,97}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',2,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',3,), ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',1,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',2,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',4,), ('(8(3(2()())(6(5()())()))(5(10()())(7(13()())())))',100,), ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',3,), ('(0(5(6()())(4()(9()())))(7(1()())(3()())))',0,), ('0010',12,), ('kjtdgmy',97,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_OCTAL_DECIMAL_CONVERSION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_OCTAL_DECIMAL_CONVERSION{ static int f_gold ( int n ) { int num = n ; int dec_value = 0 ; int base = 1 ; int temp = num ; while ( temp > 0 ) { int last_digit = temp % 10 ; temp = temp / 10 ; dec_value += last_digit * base ; base = base * 8 ; } return dec_value ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(37); param0.add(25); param0.add(63); param0.add(66); param0.add(32); param0.add(5); param0.add(41); param0.add(82); param0.add(54); param0.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : num = n ; dec_value = 0 ; base = 1 ; temp = num ; while ( temp ) : last_digit = temp % 10 ; temp = int ( temp / 10 ) ; dec_value += last_digit * base ; base = base * 8 ; return dec_value ; "," 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 * 8; } return dec_value; } int main() { int n_success = 0; vector param0 {37,25,63,66,32,5,41,82,54,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (37,), (25,), (63,), (66,), (32,), (5,), (41,), (82,), (54,), (5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class REARRANGE_ARRAY_MAXIMUM_MINIMUM_FORM_SET_2_O1_EXTRA_SPACE_1{ public static void f_gold ( int arr [ ] , int n ) { int max_ele = arr [ n - 1 ] ; int min_ele = arr [ 0 ] ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 == 0 ) { arr [ i ] = max_ele ; max_ele -= 1 ; } else { arr [ i ] = min_ele ; min_ele += 1 ; } } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99}); param0.add(new int[]{45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52}); param0.add(new int[]{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}); param0.add(new int[]{12,84,16}); param0.add(new int[]{-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90}); param0.add(new int[]{0,0,1,1,1,1,1,1,1,0,1,1,0,0,0}); param0.add(new int[]{5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98}); param0.add(new int[]{31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85}); param0.add(new int[]{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}); param0.add(new int[]{20,75,12,62,18,94,63,84,25,12}); List param1 = new ArrayList<>(); param1.add(40); param1.add(23); param1.add(28); param1.add(2); param1.add(13); param1.add(12); param1.add(12); param1.add(13); param1.add(31); param1.add(9); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99}); filled_function_param0.add(new int[]{45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{12,84,16}); filled_function_param0.add(new int[]{-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90}); filled_function_param0.add(new int[]{0,0,1,1,1,1,1,1,1,0,1,1,0,0,0}); filled_function_param0.add(new int[]{5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98}); filled_function_param0.add(new int[]{31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{20,75,12,62,18,94,63,84,25,12}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(40); filled_function_param1.add(23); filled_function_param1.add(28); filled_function_param1.add(2); filled_function_param1.add(13); filled_function_param1.add(12); filled_function_param1.add(12); filled_function_param1.add(13); filled_function_param1.add(31); filled_function_param1.add(9); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : max_ele = arr [ n - 1 ] min_ele = arr [ 0 ] for i in range ( n ) : if i % 2 == 0 : arr [ i ] = max_ele max_ele -= 1 else : arr [ i ] = min_ele min_ele += 1 "," using namespace std; void f_gold ( int arr [ ], int n ) { int max_ele = arr [ n - 1 ]; int min_ele = arr [ 0 ]; for ( int i = 0; i < n; i ++ ) { if ( i % 2 == 0 ) { arr [ i ] = max_ele; max_ele -= 1; } else { arr [ i ] = min_ele; min_ele += 1; } } } int main() { int n_success = 0; vector> param0 {{3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99},{45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52},{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},{12,84,16},{-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90},{0,0,1,1,1,1,1,1,1,0,1,1,0,0,0},{5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98},{31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85},{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},{20,75,12,62,18,94,63,84,25,12}}; vector param1 {40,23,28,2,13,12,12,13,31,9}; vector> filled_function_param0 {{3,4,8,10,12,14,14,17,18,19,20,25,28,29,30,31,34,35,37,38,40,41,42,45,47,49,54,54,55,58,58,63,65,66,66,67,67,72,74,75,75,80,82,86,92,95,96,99},{45,42,-91,90,-6,49,65,39,-80,-65,-47,75,10,80,36,-96,55,72,68,2,-53,-6,72,-52,-9,80,-16,-32,39,25,-27,-96,-24,-27,-23,-52},{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},{12,84,16},{-85,-77,-70,-67,-55,-51,-49,-41,-37,-24,-18,-8,-6,77,87,90},{0,0,1,1,1,1,1,1,1,0,1,1,0,0,0},{5,8,15,16,20,22,25,33,46,48,52,54,55,57,57,61,61,66,72,73,83,87,88,89,98},{31,2,-46,-86,-64,5,-18,-33,-90,-51,11,-35,-43,-73,13,33,-29,-17,-43,20,-7,-85},{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},{20,75,12,62,18,94,63,84,25,12}}; vector filled_function_param1 {40,23,28,2,13,12,12,13,31,9}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i]); f_gold(¶m0[i].front(),param1[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i]) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([3, 4, 8, 10, 12, 14, 14, 17, 18, 19, 20, 25, 28, 29, 30, 31, 34, 35, 37, 38, 40, 41, 42, 45, 47, 49, 54, 54, 55, 58, 58, 63, 65, 66, 66, 67, 67, 72, 74, 75, 75, 80, 82, 86, 92, 95, 96, 99],40,), ([45, 42, -91, 90, -6, 49, 65, 39, -80, -65, -47, 75, 10, 80, 36, -96, 55, 72, 68, 2, -53, -6, 72, -52, -9, 80, -16, -32, 39, 25, -27, -96, -24, -27, -23, -52],23,), ([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],28,), ([12, 84, 16],2,), ([-85, -77, -70, -67, -55, -51, -49, -41, -37, -24, -18, -8, -6, 77, 87, 90],13,), ([0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0],12,), ([5, 8, 15, 16, 20, 22, 25, 33, 46, 48, 52, 54, 55, 57, 57, 61, 61, 66, 72, 73, 83, 87, 88, 89, 98],12,), ([31, 2, -46, -86, -64, 5, -18, -33, -90, -51, 11, -35, -43, -73, 13, 33, -29, -17, -43, 20, -7, -85],13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([20, 75, 12, 62, 18, 94, 63, 84, 25, 12],9,) ] filled_function_param = [ ([3, 4, 8, 10, 12, 14, 14, 17, 18, 19, 20, 25, 28, 29, 30, 31, 34, 35, 37, 38, 40, 41, 42, 45, 47, 49, 54, 54, 55, 58, 58, 63, 65, 66, 66, 67, 67, 72, 74, 75, 75, 80, 82, 86, 92, 95, 96, 99],40,), ([45, 42, -91, 90, -6, 49, 65, 39, -80, -65, -47, 75, 10, 80, 36, -96, 55, 72, 68, 2, -53, -6, 72, -52, -9, 80, -16, -32, 39, 25, -27, -96, -24, -27, -23, -52],23,), ([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],28,), ([12, 84, 16],2,), ([-85, -77, -70, -67, -55, -51, -49, -41, -37, -24, -18, -8, -6, 77, 87, 90],13,), ([0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0],12,), ([5, 8, 15, 16, 20, 22, 25, 33, 46, 48, 52, 54, 55, 57, 57, 61, 61, 66, 72, 73, 83, 87, 88, 89, 98],12,), ([31, 2, -46, -86, -64, 5, -18, -33, -90, -51, 11, -35, -43, -73, 13, 33, -29, -17, -43, 20, -7, -85],13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([20, 75, 12, 62, 18, 94, 63, 84, 25, 12],9,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", CHECK_IF_STRING_REMAINS_PALINDROME_AFTER_REMOVING_GIVEN_NUMBER_OF_CHARACTERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_STRING_REMAINS_PALINDROME_AFTER_REMOVING_GIVEN_NUMBER_OF_CHARACTERS{ static boolean f_gold ( String str , int n ) { int len = str . length ( ) ; if ( len >= n ) return true ; return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ZCoQhuM""); param0.add(""7437725""); param0.add(""11""); param0.add(""buGlvR""); param0.add(""9""); param0.add(""101101010110""); param0.add(""YguiM""); param0.add(""8198""); param0.add(""11101""); param0.add(""hUInqJXNdbfP""); List param1 = new ArrayList<>(); param1.add(2); param1.add(53); param1.add(30); param1.add(1); param1.add(92); param1.add(3); param1.add(18); param1.add(90); param1.add(71); param1.add(4); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str , n ) : l = len ( str ) if ( l >= n ) : return True return False "," using namespace std; bool f_gold ( string str, int n ) { int len = str . length ( ); if ( len >= n ) return true; return false; } int main() { int n_success = 0; vector param0 {""ZCoQhuM"",""7437725"",""11"",""buGlvR"",""9"",""101101010110"",""YguiM"",""8198"",""11101"",""hUInqJXNdbfP""}; vector param1 {2,53,30,1,92,3,18,90,71,4}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('ZCoQhuM',2,), ('7437725',53,), ('11',30,), ('buGlvR',1,), ('9',92,), ('101101010110',3,), ('YguiM',18,), ('8198',90,), ('11101',71,), ('hUInqJXNdbfP',4,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_3," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_3{ static int f_gold ( int m , int n ) { int path = 1 ; for ( int i = n ; i < ( m + n - 1 ) ; i ++ ) { path *= i ; path /= ( i - n + 1 ) ; } return path ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(10); param0.add(52); param0.add(5); param0.add(84); param0.add(27); param0.add(77); param0.add(52); param0.add(3); param0.add(5); param0.add(14); List param1 = new ArrayList<>(); param1.add(3); param1.add(8); param1.add(23); param1.add(56); param1.add(30); param1.add(90); param1.add(50); param1.add(25); param1.add(75); param1.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int m, int n ) { int path = 1; for ( int i = n; i < ( m + n - 1 ); i ++ ) { path *= i; path /= ( i - n + 1 ); } return path; } int main() { int n_success = 0; vector param0 {10,52,5,84,27,77,52,3,5,14}; vector param1 {3,8,23,56,30,90,50,25,75,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, NUMBER_INDEXES_EQUAL_ELEMENTS_GIVEN_RANGE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_INDEXES_EQUAL_ELEMENTS_GIVEN_RANGE{ static int f_gold ( int a [ ] , int n , int l , int r ) { int count = 0 ; for ( int i = l ; i < r ; i ++ ) if ( a [ i ] == a [ i + 1 ] ) count += 1 ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,13,13,16,16,19,39,41,48,52,57,62,65,67,76,84,88,91,95,96,97,98}); param0.add(new int[]{62,76,86,-8,84,-6,72,84,6,-50,-18,-94,54,90,-74,-64,-26,-14,-32,62,10,4,70,-28,8,18,4,-62,-76,84,-78,-4,84,98,58,-68,42,-6,34,-38,52,-84,78}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{11,75,98,29,62,53,48,91,86,66,48,94}); param0.add(new int[]{-94,-84,-70,-70,-40,-40,-36,-24,10,48,62,74}); param0.add(new int[]{1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,0}); param0.add(new int[]{1,2,6,7,10,11,13,19,19,25,29,30,32,34,35,45,45,46,47,48,48,53,58,61,64,65,67,75,76,81,81,84,84,85,86,94,94,96,99}); param0.add(new int[]{-56,42,-34,-12,-86,82,-96,-66,30,16,-40,72,84,94,-48,-30,26,50,42,-44,-50,22,-38,8,34,94,2,16,-32,18,-58,12,-26,28,-62}); param0.add(new int[]{0,0,0,0,1,1,1}); param0.add(new int[]{6,29}); List param1 = new ArrayList<>(); param1.add(18); param1.add(32); param1.add(10); param1.add(8); param1.add(11); param1.add(36); param1.add(25); param1.add(21); param1.add(4); param1.add(1); List param2 = new ArrayList<>(); param2.add(12); param2.add(38); param2.add(6); param2.add(6); param2.add(7); param2.add(40); param2.add(19); param2.add(30); param2.add(5); param2.add(1); List param3 = new ArrayList<>(); param3.add(17); param3.add(23); param3.add(6); param3.add(6); param3.add(8); param3.add(37); param3.add(37); param3.add(26); param3.add(5); param3.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n , l , r ) : count = 0 for i in range ( l , r ) : if ( a [ i ] == a [ i + 1 ] ) : count += 1 return count "," using namespace std; int f_gold ( int a [ ], int n, int l, int r ) { int count = 0; for ( int i = l; i < r; i ++ ) if ( a [ i ] == a [ i + 1 ] ) count += 1; return count; } int main() { int n_success = 0; vector> param0 {{4,13,13,16,16,19,39,41,48,52,57,62,65,67,76,84,88,91,95,96,97,98},{62,76,86,-8,84,-6,72,84,6,-50,-18,-94,54,90,-74,-64,-26,-14,-32,62,10,4,70,-28,8,18,4,-62,-76,84,-78,-4,84,98,58,-68,42,-6,34,-38,52,-84,78},{0,0,0,0,0,0,1,1,1,1,1,1},{11,75,98,29,62,53,48,91,86,66,48,94},{-94,-84,-70,-70,-40,-40,-36,-24,10,48,62,74},{1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,0},{1,2,6,7,10,11,13,19,19,25,29,30,32,34,35,45,45,46,47,48,48,53,58,61,64,65,67,75,76,81,81,84,84,85,86,94,94,96,99},{-56,42,-34,-12,-86,82,-96,-66,30,16,-40,72,84,94,-48,-30,26,50,42,-44,-50,22,-38,8,34,94,2,16,-32,18,-58,12,-26,28,-62},{0,0,0,0,1,1,1},{6,29}}; vector param1 {18,32,10,8,11,36,25,21,4,1}; vector param2 {12,38,6,6,7,40,19,30,5,1}; vector param3 {17,23,6,6,8,37,37,26,5,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i],param3[i]) == f_gold(¶m0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 13, 13, 16, 16, 19, 39, 41, 48, 52, 57, 62, 65, 67, 76, 84, 88, 91, 95, 96, 97, 98],18,12,17,), ([62, 76, 86, -8, 84, -6, 72, 84, 6, -50, -18, -94, 54, 90, -74, -64, -26, -14, -32, 62, 10, 4, 70, -28, 8, 18, 4, -62, -76, 84, -78, -4, 84, 98, 58, -68, 42, -6, 34, -38, 52, -84, 78],32,38,23,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],10,6,6,), ([11, 75, 98, 29, 62, 53, 48, 91, 86, 66, 48, 94],8,6,6,), ([-94, -84, -70, -70, -40, -40, -36, -24, 10, 48, 62, 74],11,7,8,), ([1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0],36,40,37,), ([1, 2, 6, 7, 10, 11, 13, 19, 19, 25, 29, 30, 32, 34, 35, 45, 45, 46, 47, 48, 48, 53, 58, 61, 64, 65, 67, 75, 76, 81, 81, 84, 84, 85, 86, 94, 94, 96, 99],25,19,37,), ([-56, 42, -34, -12, -86, 82, -96, -66, 30, 16, -40, 72, 84, 94, -48, -30, 26, 50, 42, -44, -50, 22, -38, 8, 34, 94, 2, 16, -32, 18, -58, 12, -26, 28, -62],21,30,26,), ([0, 0, 0, 0, 1, 1, 1],4,5,5,), ([6, 29],1,1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FIND_REMAINDER_LARGE_NUMBER_DIVIDED_11," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FIND_REMAINDER_LARGE_NUMBER_DIVIDED_11{ static int f_gold ( String str ) { int len = str . length ( ) ; int num , rem = 0 ; for ( int i = 0 ; i < len ; i ++ ) { num = rem * 10 + ( str . charAt ( i ) - '0' ) ; rem = num % 11 ; } return rem ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""DvsNZVNZ""); param0.add(""1170""); param0.add(""10""); param0.add(""evsPwREbSY""); param0.add(""09219178704""); param0.add(""1001010""); param0.add(""SkZbWSajDKmiG""); param0.add(""0287976763""); param0.add(""011011000111""); param0.add(""lUn""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string str ) { int len = str . length ( ); int num, rem = 0; for ( int i = 0; i < len; i ++ ) { num = rem * 10 + ( str [ i ] - '0' ); rem = num % 11; } return rem; } int main() { int n_success = 0; vector param0 {""DvsNZVNZ"",""1170"",""10"",""evsPwREbSY"",""09219178704"",""1001010"",""SkZbWSajDKmiG"",""0287976763"",""011011000111"",""lUn""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_SET_BITS_IN_AN_INTEGER_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SET_BITS_IN_AN_INTEGER_2{ static int f_gold ( int n ) { int count = 0 ; while ( n > 0 ) { n &= ( n - 1 ) ; count ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(32); param0.add(94); param0.add(33); param0.add(99); param0.add(17); param0.add(64); param0.add(80); param0.add(42); param0.add(12); param0.add(86); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : count = 0 while ( n ) : n &= ( n - 1 ) count += 1 return count ",,," if __name__ == '__main__': param = [ (32,), (94,), (33,), (99,), (17,), (64,), (80,), (42,), (12,), (86,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TRIANGULAR_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TRIANGULAR_NUMBERS{ static boolean f_gold ( int num ) { if ( num < 0 ) return false ; int sum = 0 ; for ( int n = 1 ; sum <= num ; n ++ ) { sum = sum + n ; if ( sum == num ) return true ; } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(97); param0.add(97); param0.add(32); param0.add(40); param0.add(18); param0.add(14); param0.add(90); param0.add(39); param0.add(1); param0.add(57); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num ) : if ( num < 0 ) : return False sum , n = 0 , 1 while ( sum <= num ) : sum = sum + n if ( sum == num ) : return True n += 1 return False "," using namespace std; bool f_gold ( int num ) { if ( num < 0 ) return false; int sum = 0; for ( int n = 1; sum <= num; n ++ ) { sum = sum + n; if ( sum == num ) return true; } return false; } int main() { int n_success = 0; vector param0 {97,97,32,40,18,14,90,39,1,57}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (97,), (97,), (32,), (40,), (18,), (14,), (90,), (39,), (1,), (57,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10{ static int f_gold ( int n ) { int a = ( n / 10 ) * 10 ; int b = a + 10 ; return ( n - a > b - n ) ? b : a ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(31); param0.add(78); param0.add(19); param0.add(36); param0.add(77); param0.add(94); param0.add(86); param0.add(16); param0.add(95); param0.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : a = ( n // 10 ) * 10 b = a + 10 return ( b if n - a > b - n else a ) "," using namespace std; int f_gold ( int n ) { int a = ( n / 10 ) * 10; int b = a + 10; return ( n - a > b - n ) ? b : a; } int main() { int n_success = 0; vector param0 {31,78,19,36,77,94,86,16,95,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (31,), (78,), (19,), (36,), (77,), (94,), (86,), (16,), (95,), (2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_FACTORS_NUMBER_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_FACTORS_NUMBER_1{ static int f_gold ( int n ) { int res = 1 ; for ( int i = 2 ; i <= Math . sqrt ( n ) ; i ++ ) { int curr_sum = 1 ; int curr_term = 1 ; while ( n % i == 0 ) { n = n / i ; curr_term *= i ; curr_sum += curr_term ; } res *= curr_sum ; } if ( n > 2 ) res *= ( 1 + n ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(96); param0.add(32); param0.add(93); param0.add(78); param0.add(30); param0.add(5); param0.add(62); param0.add(27); param0.add(95); param0.add(45); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int n ) { int res = 1; for ( int i = 2; i <= sqrt ( n ); i ++ ) { int curr_sum = 1; int curr_term = 1; while ( n % i == 0 ) { n = n / i; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int main() { int n_success = 0; vector param0 {96,32,93,78,30,5,62,27,95,45}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_ROTATIONS_DIVISIBLE_8," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_ROTATIONS_DIVISIBLE_8{ static int f_gold ( String n ) { int len = n . length ( ) ; int count = 0 ; if ( len == 1 ) { int oneDigit = n . charAt ( 0 ) - '0' ; if ( oneDigit % 8 == 0 ) return 1 ; return 0 ; } if ( len == 2 ) { int first = ( n . charAt ( 0 ) - '0' ) * 10 + ( n . charAt ( 1 ) - '0' ) ; int second = ( n . charAt ( 1 ) - '0' ) * 10 + ( n . charAt ( 0 ) - '0' ) ; if ( first % 8 == 0 ) count ++ ; if ( second % 8 == 0 ) count ++ ; return count ; } int threeDigit ; for ( int i = 0 ; i < ( len - 2 ) ; i ++ ) { threeDigit = ( n . charAt ( i ) - '0' ) * 100 + ( n . charAt ( i + 1 ) - '0' ) * 10 + ( n . charAt ( i + 2 ) - '0' ) ; if ( threeDigit % 8 == 0 ) count ++ ; } threeDigit = ( n . charAt ( len - 1 ) - '0' ) * 100 + ( n . charAt ( 0 ) - '0' ) * 10 + ( n . charAt ( 1 ) - '0' ) ; if ( threeDigit % 8 == 0 ) count ++ ; threeDigit = ( n . charAt ( len - 2 ) - '0' ) * 100 + ( n . charAt ( len - 1 ) - '0' ) * 10 + ( n . charAt ( 0 ) - '0' ) ; if ( threeDigit % 8 == 0 ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add("" MwBVIb""); param0.add(""37291205493""); param0.add(""0111111""); param0.add(""BrrQon""); param0.add(""226051""); param0.add(""1001101""); param0.add(""eREctoEen""); param0.add(""299967""); param0.add(""000111""); param0.add(""GJUYuqbampKo""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string n ) { int len = n . length ( ); int count = 0; if ( len == 1 ) { int oneDigit = n [ 0 ] - '0'; if ( oneDigit % 8 == 0 ) return 1; return 0; } if ( len == 2 ) { int first = ( n [ 0 ] - '0' ) * 10 + ( n [ 1 ] - '0' ); int second = ( n [ 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( first % 8 == 0 ) count ++; if ( second % 8 == 0 ) count ++; return count; } int threeDigit; for ( int i = 0; i < ( len - 2 ); i ++ ) { threeDigit = ( n [ i ] - '0' ) * 100 + ( n [ i + 1 ] - '0' ) * 10 + ( n [ i + 2 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; } threeDigit = ( n [ len - 1 ] - '0' ) * 100 + ( n [ 0 ] - '0' ) * 10 + ( n [ 1 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; threeDigit = ( n [ len - 2 ] - '0' ) * 100 + ( n [ len - 1 ] - '0' ) * 10 + ( n [ 0 ] - '0' ); if ( threeDigit % 8 == 0 ) count ++; return count; } int main() { int n_success = 0; vector param0 {"" MwBVIb"",""37291205493"",""0111111"",""BrrQon"",""226051"",""1001101"",""eREctoEen"",""299967"",""000111"",""GJUYuqbampKo""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1{ static int f_gold ( int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += i * ( n - i ) ; return 2 * sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(63); param0.add(72); param0.add(28); param0.add(35); param0.add(6); param0.add(70); param0.add(20); param0.add(8); param0.add(8); param0.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 for i in range ( n ) : sum += i * ( n - i ) return 2 * sum "," using namespace std; int f_gold ( int n ) { int sum = 0; for ( int i = 0; i < n; i ++ ) sum += i * ( n - i ); return 2 * sum; } int main() { int n_success = 0; vector param0 {63,72,28,35,6,70,20,8,8,35}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (63,), (72,), (28,), (35,), (6,), (70,), (20,), (8,), (8,), (35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_JUMP_REQUIRED_GIVEN_LENGTH_REACH_POINT_FORM_D_0_ORIGIN_2D_PLANE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_JUMP_REQUIRED_GIVEN_LENGTH_REACH_POINT_FORM_D_0_ORIGIN_2D_PLANE{ static int f_gold ( int a , int b , int d ) { int temp = a ; a = Math . min ( a , b ) ; b = Math . max ( temp , b ) ; if ( d >= b ) return ( d + b - 1 ) / b ; if ( d == 0 ) return 0 ; if ( d == a ) return 1 ; return 2 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(35); param0.add(85); param0.add(22); param0.add(8); param0.add(12); param0.add(58); param0.add(65); param0.add(10); param0.add(23); param0.add(5); List param1 = new ArrayList<>(); param1.add(8); param1.add(55); param1.add(23); param1.add(43); param1.add(64); param1.add(25); param1.add(4); param1.add(95); param1.add(13); param1.add(50); List param2 = new ArrayList<>(); param2.add(77); param2.add(33); param2.add(64); param2.add(29); param2.add(11); param2.add(26); param2.add(28); param2.add(55); param2.add(54); param2.add(71); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , d ) : temp = a a = min ( a , b ) b = max ( temp , b ) if ( d >= b ) : return ( d + b - 1 ) / b if ( d == 0 ) : return 0 if ( d == a ) : return 1 return 2 "," using namespace std; int f_gold ( int a, int b, int d ) { int temp = a; a = min ( a, b ); b = max ( temp, b ); if ( d >= b ) return ( d + b - 1 ) / b; if ( d == 0 ) return 0; if ( d == a ) return 1; return 2; } int main() { int n_success = 0; vector param0 {35,85,22,8,12,58,65,10,23,5}; vector param1 {8,55,23,43,64,25,4,95,13,50}; vector param2 {77,33,64,29,11,26,28,55,54,71}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (35,8,77,), (85,55,33,), (22,23,64,), (8,43,29,), (12,64,11,), (58,25,26,), (65,4,28,), (10,95,55,), (23,13,54,), (5,50,71,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER{ public static boolean f_gold ( int x , int y ) { if ( x == 1 ) return ( y == 1 ) ; int pow = 1 ; while ( pow < y ) pow = pow * x ; return ( pow == y ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(57); param0.add(3); param0.add(10); param0.add(10); param0.add(6); param0.add(2); param0.add(1); param0.add(20); param0.add(96); param0.add(25); List param1 = new ArrayList<>(); param1.add(1); param1.add(9); param1.add(101); param1.add(10000); param1.add(46656); param1.add(2048); param1.add(40); param1.add(79); param1.add(98); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x , y ) : if ( x == 1 ) : return ( y == 1 ) pow = 1 while ( pow < y ) : pow = pow * x return ( pow == y ) "," using namespace std; bool f_gold ( int x, long int y ) { if ( x == 1 ) return ( y == 1 ); long int pow = 1; while ( pow < y ) pow *= x; return ( pow == y ); } int main() { int n_success = 0; vector param0 {57,3,10,10,6,2,1,20,96,25}; vector param1 {1,9,101,10000,46656,2048,40,79,98,5}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (57,1,), (3,9,), (10,101,), (10,10000,), (6,46656,), (2,2048,), (1,40,), (20,79,), (96,98,), (25,5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MINIMUM_FLIP_REQUIRED_MAKE_BINARY_MATRIX_SYMMETRIC_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_FLIP_REQUIRED_MAKE_BINARY_MATRIX_SYMMETRIC_1{ static int f_gold ( int mat [ ] [ ] , int n ) { int flip = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < i ; j ++ ) if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) flip ++ ; return flip ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{16,16,47,49,50,64,70,83,88},new int[]{11,12,24,32,36,39,48,58,62},new int[]{29,31,35,49,71,78,82,92,96},new int[]{6,21,46,53,83,88,94,94,97},new int[]{29,36,41,52,83,89,89,90,90},new int[]{3,11,35,45,47,79,81,85,96},new int[]{31,43,62,62,62,65,66,68,81},new int[]{8,9,10,26,36,43,58,70,95},new int[]{2,8,24,31,42,43,58,90,94}}); param0.add(new int[][]{new int[]{20,8,-42,-16,58,58,80},new int[]{-28,-20,54,94,62,22,-86},new int[]{-26,86,48,-28,10,90,-40},new int[]{68,76,16,-50,-58,18,-86},new int[]{40,-52,8,-14,-8,54,78},new int[]{82,92,2,54,62,80,14},new int[]{-56,-90,74,-16,-92,76,32}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1},new int[]{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,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1},new int[]{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},new int[]{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,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1},new int[]{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,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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,1,1},new int[]{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,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{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},new int[]{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,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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}}); param0.add(new int[][]{new int[]{66,95,76,26,11,80,1,59,16},new int[]{79,5,47,12,55,11,49,12,84},new int[]{77,16,8,92,95,71,16,71,44},new int[]{14,17,30,80,42,42,35,62,87},new int[]{47,75,69,34,25,54,87,49,62},new int[]{9,20,35,98,95,57,51,64,72},new int[]{66,38,22,59,82,49,40,46,64},new int[]{31,15,63,84,6,18,93,36,62},new int[]{96,13,34,87,16,6,91,65,13}}); param0.add(new int[][]{new int[]{-94,-68,-54,-36,-32,-28,-10,10,30,38,58,66,78,90},new int[]{-98,-62,-44,-38,-36,-34,-34,-26,28,30,34,64,90,98},new int[]{-90,-88,-84,-62,-54,-24,4,6,30,32,40,50,56,68},new int[]{-98,-80,-74,-48,-18,-14,-10,10,24,42,54,54,74,96},new int[]{-84,-68,-52,-32,-16,-8,-4,6,44,48,50,78,80,84},new int[]{-96,-84,-78,-42,-38,-36,-16,-14,2,14,16,24,28,40},new int[]{-94,-92,-86,-84,-62,-58,-52,-46,-22,-12,16,32,62,68},new int[]{-92,-72,-68,-62,-50,-50,-38,-12,22,40,40,42,48,70},new int[]{-90,-72,-42,-28,16,22,26,36,42,50,68,82,90,94},new int[]{-86,-78,-66,-60,-46,-30,-26,-20,-14,54,60,66,76,84},new int[]{-98,-96,-76,-64,-30,-16,-4,14,22,28,48,64,74,96},new int[]{-88,-68,-58,-50,-28,-16,-8,2,18,20,28,58,60,82},new int[]{-94,-82,-70,14,14,24,30,36,48,50,50,76,78,96},new int[]{-88,-74,-12,6,10,18,28,46,56,58,84,90,90,96}}); param0.add(new int[][]{new int[]{1,0,1,1,1,0,0,1,1,1,0,0,0,0,0,1,1,0,0,0,1,1,1,0,0,1,1,1,1},new int[]{0,0,0,0,0,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,0,1,1,0,1,0,1,1,0},new int[]{0,1,0,0,0,1,1,1,1,1,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,1,1,1,1},new int[]{0,0,1,1,0,1,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,0,1,0,1},new int[]{1,0,0,0,1,0,1,0,0,0,0,0,1,1,0,1,1,0,1,0,1,0,0,1,1,1,1,1,1},new int[]{0,0,1,1,1,1,0,1,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,0,1,1,1,0,0},new int[]{1,1,0,1,1,1,1,1,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,1,1,1,1,0},new int[]{0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0},new int[]{0,0,1,1,1,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1},new int[]{1,1,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,1,1,0,1,1,1,1,1,1,0},new int[]{0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,0,1,1,1,1,1,0,1,0,1},new int[]{1,0,1,0,1,1,0,1,1,0,1,1,1,1,1,1,0,0,1,0,1,0,0,1,0,1,0,0,0},new int[]{0,1,1,1,1,1,0,1,0,1,1,0,1,0,1,0,0,1,1,1,0,0,0,0,1,0,0,0,1},new int[]{1,1,0,0,0,1,0,0,1,0,1,0,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0},new int[]{1,1,1,1,1,0,0,1,0,1,1,1,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,0,1},new int[]{1,0,0,1,0,1,1,0,1,0,1,1,1,1,1,1,1,0,0,1,1,0,0,0,1,0,0,1,1},new int[]{1,0,0,1,0,1,1,1,0,1,1,0,1,0,0,1,1,0,1,0,0,0,1,1,0,1,1,1,1},new int[]{1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,0,1,0,0,1},new int[]{0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,0,1,0,0,0,1,1,1,1,0,0,1,0},new int[]{1,0,1,1,1,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,0},new int[]{1,1,1,0,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,0,1,1,1,1,1,1},new int[]{0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,0,1,1,0,1,0,0,1,0,1,1,0,1},new int[]{0,1,1,1,1,0,1,1,0,1,1,0,0,1,0,0,1,0,0,0,1,1,0,1,1,0,1,0,1},new int[]{0,1,0,0,0,1,1,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,1,0,0,0,1},new int[]{0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1,0,0},new int[]{1,1,1,0,1,1,1,0,0,1,0,1,0,1,0,1,0,0,0,0,1,1,1,0,1,0,1,0,1},new int[]{0,1,1,1,1,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,1,0,0,0,0,1,0,1,0},new int[]{1,1,1,0,0,1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,1,1,1,0,1,1,1,0,0},new int[]{0,0,1,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,1,1,0,0,0,1,0,1,0,1,1}}); param0.add(new int[][]{new int[]{1,4,11,16,18,19,20,25,27,29,30,30,33,34,35,36,37,38,40,40,49,49,51,51,53,56,57,59,60,61,61,62,63,69,72,77,79,82,85,86,89,94,97,98},new int[]{2,6,8,10,11,11,11,14,15,19,20,21,21,23,26,31,31,34,37,37,40,40,41,47,47,48,52,53,55,59,67,77,81,82,82,83,88,92,92,93,94,96,97,98},new int[]{3,4,4,6,10,13,13,13,16,18,24,25,26,27,28,31,32,34,35,38,45,50,52,53,55,57,57,58,62,64,65,70,71,72,75,77,82,86,86,92,93,94,98,99},new int[]{2,4,5,8,10,10,13,14,15,18,19,21,21,21,24,24,28,30,30,31,36,37,38,48,48,52,53,58,59,60,61,67,75,77,77,78,80,81,86,87,89,89,96,96},new int[]{2,4,8,16,20,20,24,26,27,28,29,36,37,43,43,43,44,45,46,46,47,48,49,50,51,52,56,59,59,62,70,71,71,72,73,79,79,86,86,89,91,91,91,97},new int[]{1,1,2,5,6,10,17,21,22,23,23,28,31,34,36,38,41,42,43,44,52,53,54,56,56,58,59,62,64,67,67,68,70,71,77,81,82,83,83,85,88,89,90,98},new int[]{1,1,2,3,3,4,6,6,7,10,11,12,13,14,15,15,19,21,25,27,42,45,46,50,51,51,52,55,60,60,67,70,71,71,77,78,81,85,86,86,87,90,95,99},new int[]{2,4,7,9,9,11,15,17,19,22,27,27,30,32,34,35,35,36,41,42,46,46,48,54,55,56,59,61,61,65,66,67,70,73,80,81,85,89,90,91,92,96,96,97},new int[]{7,8,12,14,17,19,21,24,27,28,34,36,38,48,54,57,59,59,62,66,66,67,70,71,71,71,72,73,74,74,76,76,78,79,80,80,83,88,88,90,92,95,96,98},new int[]{3,3,8,10,10,15,16,20,25,25,25,29,34,36,42,50,52,54,56,58,59,63,64,65,71,73,73,74,75,75,76,76,78,80,82,86,86,87,87,92,94,94,96,99},new int[]{7,9,12,15,24,24,25,26,27,28,32,37,38,43,44,46,50,50,52,52,55,56,56,56,58,58,59,62,64,65,68,72,72,80,85,85,86,90,91,92,98,98,98,99},new int[]{2,7,9,18,28,29,31,32,32,38,39,39,41,41,45,48,49,49,49,50,50,58,58,62,62,63,68,69,69,71,72,74,74,75,77,78,79,81,82,82,83,83,95,98},new int[]{3,5,6,6,7,10,10,13,15,17,22,23,25,25,25,25,27,29,35,37,38,46,47,50,50,51,53,56,56,59,71,71,72,74,77,79,80,83,84,90,90,92,95,98},new int[]{1,9,19,20,22,22,22,23,24,28,32,32,32,36,36,37,37,39,45,50,53,56,58,58,60,64,66,68,68,69,72,73,73,73,75,75,79,80,80,82,86,87,91,99},new int[]{5,9,12,13,14,18,23,25,25,28,29,32,33,34,39,41,46,49,50,52,55,55,56,59,61,63,65,65,67,69,69,74,75,78,80,81,85,85,86,88,88,92,96,98},new int[]{4,4,9,11,12,20,23,23,24,27,33,35,37,40,41,43,44,45,45,49,50,51,54,54,56,58,63,65,71,71,72,73,75,76,76,78,81,84,86,88,90,90,96,99},new int[]{1,2,8,9,10,15,17,18,18,19,20,21,21,21,26,27,29,32,33,34,34,39,44,47,55,56,58,60,62,64,65,70,70,72,74,74,75,76,79,81,84,86,90,93},new int[]{2,2,6,8,9,13,15,16,16,17,18,20,24,28,33,34,36,39,40,44,46,48,50,53,53,54,61,67,69,71,72,75,76,78,83,87,88,91,93,94,94,96,97,98},new int[]{2,6,9,10,12,13,14,15,16,17,21,22,29,29,31,31,34,38,38,39,40,43,44,46,48,50,52,52,57,62,65,66,68,69,69,73,74,77,79,80,83,84,87,95},new int[]{7,7,13,14,19,22,24,24,25,30,30,32,39,41,43,48,49,50,50,52,53,54,58,61,62,65,65,66,66,67,69,70,73,73,75,77,88,89,92,92,96,96,97,98},new int[]{1,3,3,4,12,14,27,32,32,33,33,37,42,42,42,43,47,49,53,55,56,57,59,60,61,61,61,65,66,66,67,71,72,73,78,79,80,82,87,89,92,94,95,96},new int[]{5,6,6,11,11,13,18,18,19,21,25,28,31,37,40,40,43,45,51,53,53,58,63,64,67,68,73,75,75,77,82,84,84,86,88,91,92,94,94,96,97,97,98,99},new int[]{1,2,3,7,8,8,8,17,23,23,24,31,33,33,36,37,38,38,43,44,47,47,47,49,52,55,56,56,59,68,71,72,72,75,79,79,80,82,83,92,93,97,97,98},new int[]{1,2,6,6,11,13,15,15,17,20,20,24,27,27,28,30,30,33,36,37,38,40,40,40,40,42,46,51,58,60,64,65,67,71,72,75,78,82,85,87,89,97,98,98},new int[]{1,2,3,5,7,7,7,16,16,18,20,20,23,23,32,32,33,33,34,38,39,41,42,43,45,47,47,50,50,53,53,56,59,60,61,64,72,79,79,84,85,89,94,98},new int[]{2,9,11,11,14,25,26,27,29,31,32,34,35,38,38,38,40,46,47,47,48,49,51,55,58,63,63,66,67,67,68,69,70,77,80,81,83,85,89,90,92,95,97,98},new int[]{1,2,5,8,8,9,12,12,17,19,20,28,29,35,38,38,38,41,43,45,48,51,56,62,68,69,70,73,74,74,77,79,81,83,84,87,88,89,92,93,93,97,98,99},new int[]{2,3,4,5,6,6,10,11,11,13,14,14,18,18,19,20,26,30,31,32,32,34,34,35,38,42,43,44,48,53,55,56,59,59,65,72,78,84,85,88,90,97,97,98},new int[]{1,9,10,15,17,17,18,18,20,24,25,26,30,31,33,35,36,42,43,43,44,46,46,48,49,49,49,49,51,51,52,59,62,64,65,71,72,74,79,79,89,90,94,97},new int[]{1,2,10,11,15,18,18,19,21,22,25,28,28,30,37,38,40,41,46,46,49,51,52,53,53,56,64,69,69,72,72,74,77,77,77,78,78,84,85,96,97,98,98,99},new int[]{1,6,6,6,7,7,10,11,16,17,18,18,27,27,33,33,35,38,41,46,47,53,54,54,56,62,63,63,66,67,67,77,77,78,79,83,88,88,89,92,95,95,96,99},new int[]{3,4,6,8,8,8,10,12,15,17,19,19,22,22,25,28,28,29,34,34,39,41,42,43,46,46,46,53,53,54,56,56,56,63,64,68,70,75,82,84,85,94,95,96},new int[]{3,4,4,5,8,9,17,21,23,25,31,32,35,38,38,39,39,43,49,54,56,61,61,64,64,65,65,65,69,70,70,70,71,72,74,74,77,78,78,80,84,90,96,99},new int[]{1,3,6,12,13,13,13,20,21,21,24,29,33,33,38,40,42,42,45,46,47,49,55,57,58,60,60,62,63,63,67,68,69,70,72,72,74,75,75,77,77,88,95,99},new int[]{3,4,4,8,9,9,9,11,12,12,15,16,17,18,20,21,22,22,25,28,29,33,34,35,36,43,46,57,58,59,63,68,69,72,76,78,83,89,90,91,93,96,97,99},new int[]{1,9,11,12,13,15,19,26,27,32,34,42,42,44,48,54,54,56,57,58,60,64,76,80,81,82,82,82,83,84,85,85,85,86,87,92,94,95,96,97,97,97,98,98},new int[]{5,7,16,20,21,22,27,29,30,31,32,33,36,37,38,44,47,47,50,53,54,56,58,60,60,61,62,63,63,64,64,68,69,77,81,81,82,82,84,86,87,90,92,96},new int[]{3,3,6,6,8,8,9,13,20,21,27,27,29,32,34,40,43,47,49,49,50,53,54,54,57,61,63,65,66,71,72,72,73,73,74,75,75,75,79,82,85,90,92,94},new int[]{2,3,5,5,9,9,14,17,20,21,23,27,29,31,33,36,38,42,43,45,45,46,47,47,48,53,54,55,56,58,60,64,67,67,69,77,77,84,87,92,92,93,94,98},new int[]{4,9,10,12,13,15,16,20,24,25,26,27,31,34,38,38,40,41,43,44,46,46,47,47,48,57,64,74,77,78,79,82,82,85,87,87,88,89,91,92,94,96,97,99},new int[]{2,2,4,8,10,12,13,20,21,21,29,32,34,40,40,40,43,45,46,47,47,48,49,51,57,67,68,68,70,72,76,76,77,78,79,81,84,88,89,91,94,95,97,98},new int[]{3,4,4,6,8,8,9,11,14,14,15,16,16,22,22,23,25,30,30,33,33,35,36,37,40,40,42,42,44,52,55,56,56,58,60,64,64,66,67,69,80,81,81,91},new int[]{7,10,10,11,13,13,13,15,23,25,27,28,28,30,34,35,37,38,39,44,45,46,49,50,53,53,56,60,60,64,64,65,66,68,68,70,77,78,79,80,81,85,92,95},new int[]{1,3,7,7,9,11,12,19,19,20,22,22,25,26,34,38,43,45,47,49,50,54,55,55,57,60,62,62,64,69,70,72,72,76,77,79,83,89,93,94,95,98,99,99}}); param0.add(new int[][]{new int[]{-6}}); param0.add(new int[][]{new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{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},new int[]{0,0,0,0,0,0,0,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}}); param0.add(new int[][]{new int[]{57,35,39,48,79,25,49,44,40,59,90,18,4,14,32,39,2,15,34,91,11,16,23,1,7,3,40,93,14,33,51,35,78,35,67,3,38,71},new int[]{57,4,10,9,40,48,47,9,33,91,47,12,66,45,90,89,94,69,71,43,83,23,30,15,52,78,42,34,65,45,35,9,48,4,6,1,40,13},new int[]{58,15,43,30,58,15,58,90,96,92,80,66,14,16,79,49,91,19,1,64,21,27,41,48,21,21,21,26,70,97,63,35,92,96,61,3,86,47},new int[]{92,91,51,18,77,83,67,81,77,78,53,40,53,35,43,16,39,69,10,38,19,3,33,94,60,84,95,76,23,52,72,67,14,61,26,52,81,62},new int[]{27,60,67,50,57,97,65,22,57,91,71,61,5,56,59,55,67,23,89,88,61,21,70,69,63,59,36,29,63,60,82,33,60,83,24,22,69,96},new int[]{89,59,51,55,68,44,41,11,19,44,14,47,14,3,23,84,76,95,19,69,67,62,42,69,43,18,93,93,6,18,16,37,28,46,53,82,5,64},new int[]{73,22,7,71,4,28,4,43,3,28,82,66,45,52,59,66,80,50,84,82,22,52,98,13,48,33,58,15,44,79,91,80,30,67,72,23,14,1},new int[]{70,78,31,58,42,81,50,88,23,99,7,59,1,63,60,8,69,81,19,96,61,16,37,47,69,83,70,77,72,45,41,34,78,71,71,6,94,53},new int[]{38,46,91,77,24,94,98,68,4,23,30,65,12,71,20,21,84,39,83,98,79,72,76,71,99,73,27,47,55,43,4,10,38,93,14,65,18,98},new int[]{66,76,94,19,66,43,17,53,69,25,48,29,70,65,90,93,6,85,21,33,12,90,66,32,14,88,13,6,12,5,57,75,87,44,72,45,66,48},new int[]{66,44,52,38,99,65,41,88,18,93,96,39,45,19,35,53,68,76,14,6,74,30,18,28,39,67,20,48,9,77,25,45,72,48,36,24,36,16},new int[]{14,90,11,65,5,97,61,91,5,47,11,85,83,39,69,12,76,44,52,24,35,99,23,94,56,55,71,19,3,86,7,1,44,20,95,81,77,43},new int[]{10,93,48,53,66,88,68,58,67,17,7,54,16,33,46,15,34,56,84,18,46,93,54,99,63,47,28,48,35,94,77,34,56,36,43,12,73,90},new int[]{8,56,60,26,78,18,28,30,65,81,84,40,74,17,52,46,28,4,14,41,2,91,9,16,85,82,59,58,63,35,1,13,48,39,1,12,31,34},new int[]{48,3,7,11,44,41,4,35,30,23,86,98,35,82,72,49,58,32,71,58,92,49,88,84,80,3,86,37,65,91,12,7,44,74,50,65,52,16},new int[]{27,21,48,22,70,83,45,34,84,45,39,9,33,76,51,19,82,27,30,83,93,62,21,84,13,24,22,95,86,33,18,74,88,95,41,91,51,7},new int[]{62,22,26,38,15,3,28,93,54,23,46,10,36,83,66,14,32,80,73,58,79,51,34,94,70,24,7,64,76,96,3,85,93,79,12,37,94,93},new int[]{33,20,76,50,37,56,92,79,66,76,28,69,38,6,90,30,51,95,34,15,40,24,47,99,50,3,5,8,50,35,27,30,44,31,64,79,13,73},new int[]{69,56,99,12,4,16,97,89,62,15,41,67,82,6,20,80,98,42,78,86,77,59,21,11,96,96,34,69,84,67,91,64,67,75,50,47,59,79},new int[]{82,78,57,77,3,60,27,93,26,98,24,38,49,31,57,44,23,33,68,66,26,17,4,76,11,10,7,98,73,57,55,37,41,57,82,29,80,86},new int[]{78,61,89,44,96,59,79,39,55,23,94,23,59,4,37,19,10,94,72,90,25,86,50,68,71,34,56,72,46,45,28,85,91,50,34,71,49,68},new int[]{46,60,27,21,44,61,86,9,64,78,53,97,30,57,24,67,38,30,61,87,79,40,20,59,31,20,2,22,96,63,9,8,81,96,19,60,97,40},new int[]{61,59,30,75,21,33,92,89,85,72,98,3,23,61,87,93,92,83,9,82,44,89,68,54,14,76,49,29,44,33,94,23,17,46,45,50,1,88},new int[]{53,90,59,33,63,59,94,93,7,61,96,16,51,52,3,42,9,10,94,66,14,89,72,94,99,14,74,45,78,99,54,53,80,19,87,48,12,38},new int[]{9,17,96,94,10,97,46,40,35,37,16,11,88,65,94,87,75,42,16,32,95,4,54,42,62,10,90,31,79,45,42,88,96,47,88,4,10,76},new int[]{1,14,14,41,6,62,47,66,23,51,65,6,16,47,32,22,93,54,72,82,40,24,94,62,25,61,41,14,95,50,98,30,65,22,85,79,3,10},new int[]{64,40,52,51,32,35,71,5,89,12,91,33,78,88,39,68,44,30,5,57,18,30,58,57,22,44,12,16,50,42,80,85,53,29,5,56,14,92},new int[]{35,81,5,71,97,39,34,19,78,75,51,49,39,12,80,2,90,35,25,48,87,75,23,92,33,78,39,37,70,74,62,92,12,99,18,33,89,28},new int[]{79,82,20,51,35,70,24,9,34,25,27,53,84,45,31,20,58,55,12,51,78,45,48,66,92,7,93,72,93,59,70,66,67,11,10,95,57,65},new int[]{56,23,53,92,41,98,86,27,56,38,95,34,5,83,80,49,10,71,54,40,81,44,91,61,96,22,53,7,60,35,65,93,2,59,92,60,80,70},new int[]{58,75,10,84,37,32,71,91,66,98,51,28,17,91,45,22,13,19,93,85,19,11,66,2,87,58,24,42,15,21,95,59,67,27,39,48,94,53},new int[]{48,39,19,44,34,20,42,38,95,24,69,5,12,75,17,5,72,70,91,24,20,45,14,29,43,10,27,98,93,21,89,23,40,38,36,99,90,82},new int[]{38,1,96,18,20,6,20,88,73,92,41,90,2,18,78,89,7,81,34,8,36,88,60,64,56,70,53,27,41,54,35,94,30,20,90,47,18,75},new int[]{49,44,96,84,67,89,40,83,21,42,41,3,19,59,94,65,56,16,79,61,59,63,35,32,2,8,73,65,87,56,83,16,85,83,80,11,92,74},new int[]{59,63,9,66,85,47,15,81,41,75,3,5,73,2,99,89,87,67,10,2,97,20,57,75,18,77,66,36,78,43,5,76,31,3,87,62,13,38},new int[]{68,88,92,3,70,43,61,91,7,17,56,91,74,15,31,8,17,25,75,5,55,46,73,48,21,53,9,23,45,30,63,67,29,53,30,68,58,41},new int[]{14,51,22,93,95,99,28,63,48,48,31,5,8,96,86,98,21,34,16,31,2,27,25,34,30,68,27,86,30,24,25,14,72,6,28,5,30,97},new int[]{93,73,8,62,72,47,31,64,16,42,84,12,40,49,52,62,96,3,95,10,35,62,69,77,31,90,51,13,91,58,6,77,5,86,81,19,76,12}}); List param1 = new ArrayList<>(); param1.add(8); param1.add(6); param1.add(38); param1.add(7); param1.add(11); param1.add(14); param1.add(22); param1.add(0); param1.add(37); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , n ) : flip = 0 for i in range ( n ) : for j in range ( i ) : if mat [ i ] [ j ] != mat [ j ] [ i ] : flip += 1 return flip ",,," if __name__ == '__main__': param = [ ([[16, 16, 47, 49, 50, 64, 70, 83, 88], [11, 12, 24, 32, 36, 39, 48, 58, 62], [29, 31, 35, 49, 71, 78, 82, 92, 96], [6, 21, 46, 53, 83, 88, 94, 94, 97], [29, 36, 41, 52, 83, 89, 89, 90, 90], [3, 11, 35, 45, 47, 79, 81, 85, 96], [31, 43, 62, 62, 62, 65, 66, 68, 81], [8, 9, 10, 26, 36, 43, 58, 70, 95], [2, 8, 24, 31, 42, 43, 58, 90, 94]],8,), ([[20, 8, -42, -16, 58, 58, 80], [-28, -20, 54, 94, 62, 22, -86], [-26, 86, 48, -28, 10, 90, -40], [68, 76, 16, -50, -58, 18, -86], [40, -52, 8, -14, -8, 54, 78], [82, 92, 2, 54, 62, 80, 14], [-56, -90, 74, -16, -92, 76, 32]],6,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 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, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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, 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, 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, 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, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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, 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, 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, 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, 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, 1, 1]],38,), ([[66, 95, 76, 26, 11, 80, 1, 59, 16], [79, 5, 47, 12, 55, 11, 49, 12, 84], [77, 16, 8, 92, 95, 71, 16, 71, 44], [14, 17, 30, 80, 42, 42, 35, 62, 87], [47, 75, 69, 34, 25, 54, 87, 49, 62], [9, 20, 35, 98, 95, 57, 51, 64, 72], [66, 38, 22, 59, 82, 49, 40, 46, 64], [31, 15, 63, 84, 6, 18, 93, 36, 62], [96, 13, 34, 87, 16, 6, 91, 65, 13]],7,), ([[-94, -68, -54, -36, -32, -28, -10, 10, 30, 38, 58, 66, 78, 90], [-98, -62, -44, -38, -36, -34, -34, -26, 28, 30, 34, 64, 90, 98], [-90, -88, -84, -62, -54, -24, 4, 6, 30, 32, 40, 50, 56, 68], [-98, -80, -74, -48, -18, -14, -10, 10, 24, 42, 54, 54, 74, 96], [-84, -68, -52, -32, -16, -8, -4, 6, 44, 48, 50, 78, 80, 84], [-96, -84, -78, -42, -38, -36, -16, -14, 2, 14, 16, 24, 28, 40], [-94, -92, -86, -84, -62, -58, -52, -46, -22, -12, 16, 32, 62, 68], [-92, -72, -68, -62, -50, -50, -38, -12, 22, 40, 40, 42, 48, 70], [-90, -72, -42, -28, 16, 22, 26, 36, 42, 50, 68, 82, 90, 94], [-86, -78, -66, -60, -46, -30, -26, -20, -14, 54, 60, 66, 76, 84], [-98, -96, -76, -64, -30, -16, -4, 14, 22, 28, 48, 64, 74, 96], [-88, -68, -58, -50, -28, -16, -8, 2, 18, 20, 28, 58, 60, 82], [-94, -82, -70, 14, 14, 24, 30, 36, 48, 50, 50, 76, 78, 96], [-88, -74, -12, 6, 10, 18, 28, 46, 56, 58, 84, 90, 90, 96]],11,), ([[1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0], [0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1], [1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1], [1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1]],14,), ([[1, 4, 11, 16, 18, 19, 20, 25, 27, 29, 30, 30, 33, 34, 35, 36, 37, 38, 40, 40, 49, 49, 51, 51, 53, 56, 57, 59, 60, 61, 61, 62, 63, 69, 72, 77, 79, 82, 85, 86, 89, 94, 97, 98], [2, 6, 8, 10, 11, 11, 11, 14, 15, 19, 20, 21, 21, 23, 26, 31, 31, 34, 37, 37, 40, 40, 41, 47, 47, 48, 52, 53, 55, 59, 67, 77, 81, 82, 82, 83, 88, 92, 92, 93, 94, 96, 97, 98], [3, 4, 4, 6, 10, 13, 13, 13, 16, 18, 24, 25, 26, 27, 28, 31, 32, 34, 35, 38, 45, 50, 52, 53, 55, 57, 57, 58, 62, 64, 65, 70, 71, 72, 75, 77, 82, 86, 86, 92, 93, 94, 98, 99], [2, 4, 5, 8, 10, 10, 13, 14, 15, 18, 19, 21, 21, 21, 24, 24, 28, 30, 30, 31, 36, 37, 38, 48, 48, 52, 53, 58, 59, 60, 61, 67, 75, 77, 77, 78, 80, 81, 86, 87, 89, 89, 96, 96], [2, 4, 8, 16, 20, 20, 24, 26, 27, 28, 29, 36, 37, 43, 43, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 56, 59, 59, 62, 70, 71, 71, 72, 73, 79, 79, 86, 86, 89, 91, 91, 91, 97], [1, 1, 2, 5, 6, 10, 17, 21, 22, 23, 23, 28, 31, 34, 36, 38, 41, 42, 43, 44, 52, 53, 54, 56, 56, 58, 59, 62, 64, 67, 67, 68, 70, 71, 77, 81, 82, 83, 83, 85, 88, 89, 90, 98], [1, 1, 2, 3, 3, 4, 6, 6, 7, 10, 11, 12, 13, 14, 15, 15, 19, 21, 25, 27, 42, 45, 46, 50, 51, 51, 52, 55, 60, 60, 67, 70, 71, 71, 77, 78, 81, 85, 86, 86, 87, 90, 95, 99], [2, 4, 7, 9, 9, 11, 15, 17, 19, 22, 27, 27, 30, 32, 34, 35, 35, 36, 41, 42, 46, 46, 48, 54, 55, 56, 59, 61, 61, 65, 66, 67, 70, 73, 80, 81, 85, 89, 90, 91, 92, 96, 96, 97], [7, 8, 12, 14, 17, 19, 21, 24, 27, 28, 34, 36, 38, 48, 54, 57, 59, 59, 62, 66, 66, 67, 70, 71, 71, 71, 72, 73, 74, 74, 76, 76, 78, 79, 80, 80, 83, 88, 88, 90, 92, 95, 96, 98], [3, 3, 8, 10, 10, 15, 16, 20, 25, 25, 25, 29, 34, 36, 42, 50, 52, 54, 56, 58, 59, 63, 64, 65, 71, 73, 73, 74, 75, 75, 76, 76, 78, 80, 82, 86, 86, 87, 87, 92, 94, 94, 96, 99], [7, 9, 12, 15, 24, 24, 25, 26, 27, 28, 32, 37, 38, 43, 44, 46, 50, 50, 52, 52, 55, 56, 56, 56, 58, 58, 59, 62, 64, 65, 68, 72, 72, 80, 85, 85, 86, 90, 91, 92, 98, 98, 98, 99], [2, 7, 9, 18, 28, 29, 31, 32, 32, 38, 39, 39, 41, 41, 45, 48, 49, 49, 49, 50, 50, 58, 58, 62, 62, 63, 68, 69, 69, 71, 72, 74, 74, 75, 77, 78, 79, 81, 82, 82, 83, 83, 95, 98], [3, 5, 6, 6, 7, 10, 10, 13, 15, 17, 22, 23, 25, 25, 25, 25, 27, 29, 35, 37, 38, 46, 47, 50, 50, 51, 53, 56, 56, 59, 71, 71, 72, 74, 77, 79, 80, 83, 84, 90, 90, 92, 95, 98], [1, 9, 19, 20, 22, 22, 22, 23, 24, 28, 32, 32, 32, 36, 36, 37, 37, 39, 45, 50, 53, 56, 58, 58, 60, 64, 66, 68, 68, 69, 72, 73, 73, 73, 75, 75, 79, 80, 80, 82, 86, 87, 91, 99], [5, 9, 12, 13, 14, 18, 23, 25, 25, 28, 29, 32, 33, 34, 39, 41, 46, 49, 50, 52, 55, 55, 56, 59, 61, 63, 65, 65, 67, 69, 69, 74, 75, 78, 80, 81, 85, 85, 86, 88, 88, 92, 96, 98], [4, 4, 9, 11, 12, 20, 23, 23, 24, 27, 33, 35, 37, 40, 41, 43, 44, 45, 45, 49, 50, 51, 54, 54, 56, 58, 63, 65, 71, 71, 72, 73, 75, 76, 76, 78, 81, 84, 86, 88, 90, 90, 96, 99], [1, 2, 8, 9, 10, 15, 17, 18, 18, 19, 20, 21, 21, 21, 26, 27, 29, 32, 33, 34, 34, 39, 44, 47, 55, 56, 58, 60, 62, 64, 65, 70, 70, 72, 74, 74, 75, 76, 79, 81, 84, 86, 90, 93], [2, 2, 6, 8, 9, 13, 15, 16, 16, 17, 18, 20, 24, 28, 33, 34, 36, 39, 40, 44, 46, 48, 50, 53, 53, 54, 61, 67, 69, 71, 72, 75, 76, 78, 83, 87, 88, 91, 93, 94, 94, 96, 97, 98], [2, 6, 9, 10, 12, 13, 14, 15, 16, 17, 21, 22, 29, 29, 31, 31, 34, 38, 38, 39, 40, 43, 44, 46, 48, 50, 52, 52, 57, 62, 65, 66, 68, 69, 69, 73, 74, 77, 79, 80, 83, 84, 87, 95], [7, 7, 13, 14, 19, 22, 24, 24, 25, 30, 30, 32, 39, 41, 43, 48, 49, 50, 50, 52, 53, 54, 58, 61, 62, 65, 65, 66, 66, 67, 69, 70, 73, 73, 75, 77, 88, 89, 92, 92, 96, 96, 97, 98], [1, 3, 3, 4, 12, 14, 27, 32, 32, 33, 33, 37, 42, 42, 42, 43, 47, 49, 53, 55, 56, 57, 59, 60, 61, 61, 61, 65, 66, 66, 67, 71, 72, 73, 78, 79, 80, 82, 87, 89, 92, 94, 95, 96], [5, 6, 6, 11, 11, 13, 18, 18, 19, 21, 25, 28, 31, 37, 40, 40, 43, 45, 51, 53, 53, 58, 63, 64, 67, 68, 73, 75, 75, 77, 82, 84, 84, 86, 88, 91, 92, 94, 94, 96, 97, 97, 98, 99], [1, 2, 3, 7, 8, 8, 8, 17, 23, 23, 24, 31, 33, 33, 36, 37, 38, 38, 43, 44, 47, 47, 47, 49, 52, 55, 56, 56, 59, 68, 71, 72, 72, 75, 79, 79, 80, 82, 83, 92, 93, 97, 97, 98], [1, 2, 6, 6, 11, 13, 15, 15, 17, 20, 20, 24, 27, 27, 28, 30, 30, 33, 36, 37, 38, 40, 40, 40, 40, 42, 46, 51, 58, 60, 64, 65, 67, 71, 72, 75, 78, 82, 85, 87, 89, 97, 98, 98], [1, 2, 3, 5, 7, 7, 7, 16, 16, 18, 20, 20, 23, 23, 32, 32, 33, 33, 34, 38, 39, 41, 42, 43, 45, 47, 47, 50, 50, 53, 53, 56, 59, 60, 61, 64, 72, 79, 79, 84, 85, 89, 94, 98], [2, 9, 11, 11, 14, 25, 26, 27, 29, 31, 32, 34, 35, 38, 38, 38, 40, 46, 47, 47, 48, 49, 51, 55, 58, 63, 63, 66, 67, 67, 68, 69, 70, 77, 80, 81, 83, 85, 89, 90, 92, 95, 97, 98], [1, 2, 5, 8, 8, 9, 12, 12, 17, 19, 20, 28, 29, 35, 38, 38, 38, 41, 43, 45, 48, 51, 56, 62, 68, 69, 70, 73, 74, 74, 77, 79, 81, 83, 84, 87, 88, 89, 92, 93, 93, 97, 98, 99], [2, 3, 4, 5, 6, 6, 10, 11, 11, 13, 14, 14, 18, 18, 19, 20, 26, 30, 31, 32, 32, 34, 34, 35, 38, 42, 43, 44, 48, 53, 55, 56, 59, 59, 65, 72, 78, 84, 85, 88, 90, 97, 97, 98], [1, 9, 10, 15, 17, 17, 18, 18, 20, 24, 25, 26, 30, 31, 33, 35, 36, 42, 43, 43, 44, 46, 46, 48, 49, 49, 49, 49, 51, 51, 52, 59, 62, 64, 65, 71, 72, 74, 79, 79, 89, 90, 94, 97], [1, 2, 10, 11, 15, 18, 18, 19, 21, 22, 25, 28, 28, 30, 37, 38, 40, 41, 46, 46, 49, 51, 52, 53, 53, 56, 64, 69, 69, 72, 72, 74, 77, 77, 77, 78, 78, 84, 85, 96, 97, 98, 98, 99], [1, 6, 6, 6, 7, 7, 10, 11, 16, 17, 18, 18, 27, 27, 33, 33, 35, 38, 41, 46, 47, 53, 54, 54, 56, 62, 63, 63, 66, 67, 67, 77, 77, 78, 79, 83, 88, 88, 89, 92, 95, 95, 96, 99], [3, 4, 6, 8, 8, 8, 10, 12, 15, 17, 19, 19, 22, 22, 25, 28, 28, 29, 34, 34, 39, 41, 42, 43, 46, 46, 46, 53, 53, 54, 56, 56, 56, 63, 64, 68, 70, 75, 82, 84, 85, 94, 95, 96], [3, 4, 4, 5, 8, 9, 17, 21, 23, 25, 31, 32, 35, 38, 38, 39, 39, 43, 49, 54, 56, 61, 61, 64, 64, 65, 65, 65, 69, 70, 70, 70, 71, 72, 74, 74, 77, 78, 78, 80, 84, 90, 96, 99], [1, 3, 6, 12, 13, 13, 13, 20, 21, 21, 24, 29, 33, 33, 38, 40, 42, 42, 45, 46, 47, 49, 55, 57, 58, 60, 60, 62, 63, 63, 67, 68, 69, 70, 72, 72, 74, 75, 75, 77, 77, 88, 95, 99], [3, 4, 4, 8, 9, 9, 9, 11, 12, 12, 15, 16, 17, 18, 20, 21, 22, 22, 25, 28, 29, 33, 34, 35, 36, 43, 46, 57, 58, 59, 63, 68, 69, 72, 76, 78, 83, 89, 90, 91, 93, 96, 97, 99], [1, 9, 11, 12, 13, 15, 19, 26, 27, 32, 34, 42, 42, 44, 48, 54, 54, 56, 57, 58, 60, 64, 76, 80, 81, 82, 82, 82, 83, 84, 85, 85, 85, 86, 87, 92, 94, 95, 96, 97, 97, 97, 98, 98], [5, 7, 16, 20, 21, 22, 27, 29, 30, 31, 32, 33, 36, 37, 38, 44, 47, 47, 50, 53, 54, 56, 58, 60, 60, 61, 62, 63, 63, 64, 64, 68, 69, 77, 81, 81, 82, 82, 84, 86, 87, 90, 92, 96], [3, 3, 6, 6, 8, 8, 9, 13, 20, 21, 27, 27, 29, 32, 34, 40, 43, 47, 49, 49, 50, 53, 54, 54, 57, 61, 63, 65, 66, 71, 72, 72, 73, 73, 74, 75, 75, 75, 79, 82, 85, 90, 92, 94], [2, 3, 5, 5, 9, 9, 14, 17, 20, 21, 23, 27, 29, 31, 33, 36, 38, 42, 43, 45, 45, 46, 47, 47, 48, 53, 54, 55, 56, 58, 60, 64, 67, 67, 69, 77, 77, 84, 87, 92, 92, 93, 94, 98], [4, 9, 10, 12, 13, 15, 16, 20, 24, 25, 26, 27, 31, 34, 38, 38, 40, 41, 43, 44, 46, 46, 47, 47, 48, 57, 64, 74, 77, 78, 79, 82, 82, 85, 87, 87, 88, 89, 91, 92, 94, 96, 97, 99], [2, 2, 4, 8, 10, 12, 13, 20, 21, 21, 29, 32, 34, 40, 40, 40, 43, 45, 46, 47, 47, 48, 49, 51, 57, 67, 68, 68, 70, 72, 76, 76, 77, 78, 79, 81, 84, 88, 89, 91, 94, 95, 97, 98], [3, 4, 4, 6, 8, 8, 9, 11, 14, 14, 15, 16, 16, 22, 22, 23, 25, 30, 30, 33, 33, 35, 36, 37, 40, 40, 42, 42, 44, 52, 55, 56, 56, 58, 60, 64, 64, 66, 67, 69, 80, 81, 81, 91], [7, 10, 10, 11, 13, 13, 13, 15, 23, 25, 27, 28, 28, 30, 34, 35, 37, 38, 39, 44, 45, 46, 49, 50, 53, 53, 56, 60, 60, 64, 64, 65, 66, 68, 68, 70, 77, 78, 79, 80, 81, 85, 92, 95], [1, 3, 7, 7, 9, 11, 12, 19, 19, 20, 22, 22, 25, 26, 34, 38, 43, 45, 47, 49, 50, 54, 55, 55, 57, 60, 62, 62, 64, 69, 70, 72, 72, 76, 77, 79, 83, 89, 93, 94, 95, 98, 99, 99]],22,), ([[-6]],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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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], [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, 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], [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], [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], [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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 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, 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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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], [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], [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, 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], [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, 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], [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], [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, 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], [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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],37,), ([[57, 35, 39, 48, 79, 25, 49, 44, 40, 59, 90, 18, 4, 14, 32, 39, 2, 15, 34, 91, 11, 16, 23, 1, 7, 3, 40, 93, 14, 33, 51, 35, 78, 35, 67, 3, 38, 71], [57, 4, 10, 9, 40, 48, 47, 9, 33, 91, 47, 12, 66, 45, 90, 89, 94, 69, 71, 43, 83, 23, 30, 15, 52, 78, 42, 34, 65, 45, 35, 9, 48, 4, 6, 1, 40, 13], [58, 15, 43, 30, 58, 15, 58, 90, 96, 92, 80, 66, 14, 16, 79, 49, 91, 19, 1, 64, 21, 27, 41, 48, 21, 21, 21, 26, 70, 97, 63, 35, 92, 96, 61, 3, 86, 47], [92, 91, 51, 18, 77, 83, 67, 81, 77, 78, 53, 40, 53, 35, 43, 16, 39, 69, 10, 38, 19, 3, 33, 94, 60, 84, 95, 76, 23, 52, 72, 67, 14, 61, 26, 52, 81, 62], [27, 60, 67, 50, 57, 97, 65, 22, 57, 91, 71, 61, 5, 56, 59, 55, 67, 23, 89, 88, 61, 21, 70, 69, 63, 59, 36, 29, 63, 60, 82, 33, 60, 83, 24, 22, 69, 96], [89, 59, 51, 55, 68, 44, 41, 11, 19, 44, 14, 47, 14, 3, 23, 84, 76, 95, 19, 69, 67, 62, 42, 69, 43, 18, 93, 93, 6, 18, 16, 37, 28, 46, 53, 82, 5, 64], [73, 22, 7, 71, 4, 28, 4, 43, 3, 28, 82, 66, 45, 52, 59, 66, 80, 50, 84, 82, 22, 52, 98, 13, 48, 33, 58, 15, 44, 79, 91, 80, 30, 67, 72, 23, 14, 1], [70, 78, 31, 58, 42, 81, 50, 88, 23, 99, 7, 59, 1, 63, 60, 8, 69, 81, 19, 96, 61, 16, 37, 47, 69, 83, 70, 77, 72, 45, 41, 34, 78, 71, 71, 6, 94, 53], [38, 46, 91, 77, 24, 94, 98, 68, 4, 23, 30, 65, 12, 71, 20, 21, 84, 39, 83, 98, 79, 72, 76, 71, 99, 73, 27, 47, 55, 43, 4, 10, 38, 93, 14, 65, 18, 98], [66, 76, 94, 19, 66, 43, 17, 53, 69, 25, 48, 29, 70, 65, 90, 93, 6, 85, 21, 33, 12, 90, 66, 32, 14, 88, 13, 6, 12, 5, 57, 75, 87, 44, 72, 45, 66, 48], [66, 44, 52, 38, 99, 65, 41, 88, 18, 93, 96, 39, 45, 19, 35, 53, 68, 76, 14, 6, 74, 30, 18, 28, 39, 67, 20, 48, 9, 77, 25, 45, 72, 48, 36, 24, 36, 16], [14, 90, 11, 65, 5, 97, 61, 91, 5, 47, 11, 85, 83, 39, 69, 12, 76, 44, 52, 24, 35, 99, 23, 94, 56, 55, 71, 19, 3, 86, 7, 1, 44, 20, 95, 81, 77, 43], [10, 93, 48, 53, 66, 88, 68, 58, 67, 17, 7, 54, 16, 33, 46, 15, 34, 56, 84, 18, 46, 93, 54, 99, 63, 47, 28, 48, 35, 94, 77, 34, 56, 36, 43, 12, 73, 90], [8, 56, 60, 26, 78, 18, 28, 30, 65, 81, 84, 40, 74, 17, 52, 46, 28, 4, 14, 41, 2, 91, 9, 16, 85, 82, 59, 58, 63, 35, 1, 13, 48, 39, 1, 12, 31, 34], [48, 3, 7, 11, 44, 41, 4, 35, 30, 23, 86, 98, 35, 82, 72, 49, 58, 32, 71, 58, 92, 49, 88, 84, 80, 3, 86, 37, 65, 91, 12, 7, 44, 74, 50, 65, 52, 16], [27, 21, 48, 22, 70, 83, 45, 34, 84, 45, 39, 9, 33, 76, 51, 19, 82, 27, 30, 83, 93, 62, 21, 84, 13, 24, 22, 95, 86, 33, 18, 74, 88, 95, 41, 91, 51, 7], [62, 22, 26, 38, 15, 3, 28, 93, 54, 23, 46, 10, 36, 83, 66, 14, 32, 80, 73, 58, 79, 51, 34, 94, 70, 24, 7, 64, 76, 96, 3, 85, 93, 79, 12, 37, 94, 93], [33, 20, 76, 50, 37, 56, 92, 79, 66, 76, 28, 69, 38, 6, 90, 30, 51, 95, 34, 15, 40, 24, 47, 99, 50, 3, 5, 8, 50, 35, 27, 30, 44, 31, 64, 79, 13, 73], [69, 56, 99, 12, 4, 16, 97, 89, 62, 15, 41, 67, 82, 6, 20, 80, 98, 42, 78, 86, 77, 59, 21, 11, 96, 96, 34, 69, 84, 67, 91, 64, 67, 75, 50, 47, 59, 79], [82, 78, 57, 77, 3, 60, 27, 93, 26, 98, 24, 38, 49, 31, 57, 44, 23, 33, 68, 66, 26, 17, 4, 76, 11, 10, 7, 98, 73, 57, 55, 37, 41, 57, 82, 29, 80, 86], [78, 61, 89, 44, 96, 59, 79, 39, 55, 23, 94, 23, 59, 4, 37, 19, 10, 94, 72, 90, 25, 86, 50, 68, 71, 34, 56, 72, 46, 45, 28, 85, 91, 50, 34, 71, 49, 68], [46, 60, 27, 21, 44, 61, 86, 9, 64, 78, 53, 97, 30, 57, 24, 67, 38, 30, 61, 87, 79, 40, 20, 59, 31, 20, 2, 22, 96, 63, 9, 8, 81, 96, 19, 60, 97, 40], [61, 59, 30, 75, 21, 33, 92, 89, 85, 72, 98, 3, 23, 61, 87, 93, 92, 83, 9, 82, 44, 89, 68, 54, 14, 76, 49, 29, 44, 33, 94, 23, 17, 46, 45, 50, 1, 88], [53, 90, 59, 33, 63, 59, 94, 93, 7, 61, 96, 16, 51, 52, 3, 42, 9, 10, 94, 66, 14, 89, 72, 94, 99, 14, 74, 45, 78, 99, 54, 53, 80, 19, 87, 48, 12, 38], [9, 17, 96, 94, 10, 97, 46, 40, 35, 37, 16, 11, 88, 65, 94, 87, 75, 42, 16, 32, 95, 4, 54, 42, 62, 10, 90, 31, 79, 45, 42, 88, 96, 47, 88, 4, 10, 76], [1, 14, 14, 41, 6, 62, 47, 66, 23, 51, 65, 6, 16, 47, 32, 22, 93, 54, 72, 82, 40, 24, 94, 62, 25, 61, 41, 14, 95, 50, 98, 30, 65, 22, 85, 79, 3, 10], [64, 40, 52, 51, 32, 35, 71, 5, 89, 12, 91, 33, 78, 88, 39, 68, 44, 30, 5, 57, 18, 30, 58, 57, 22, 44, 12, 16, 50, 42, 80, 85, 53, 29, 5, 56, 14, 92], [35, 81, 5, 71, 97, 39, 34, 19, 78, 75, 51, 49, 39, 12, 80, 2, 90, 35, 25, 48, 87, 75, 23, 92, 33, 78, 39, 37, 70, 74, 62, 92, 12, 99, 18, 33, 89, 28], [79, 82, 20, 51, 35, 70, 24, 9, 34, 25, 27, 53, 84, 45, 31, 20, 58, 55, 12, 51, 78, 45, 48, 66, 92, 7, 93, 72, 93, 59, 70, 66, 67, 11, 10, 95, 57, 65], [56, 23, 53, 92, 41, 98, 86, 27, 56, 38, 95, 34, 5, 83, 80, 49, 10, 71, 54, 40, 81, 44, 91, 61, 96, 22, 53, 7, 60, 35, 65, 93, 2, 59, 92, 60, 80, 70], [58, 75, 10, 84, 37, 32, 71, 91, 66, 98, 51, 28, 17, 91, 45, 22, 13, 19, 93, 85, 19, 11, 66, 2, 87, 58, 24, 42, 15, 21, 95, 59, 67, 27, 39, 48, 94, 53], [48, 39, 19, 44, 34, 20, 42, 38, 95, 24, 69, 5, 12, 75, 17, 5, 72, 70, 91, 24, 20, 45, 14, 29, 43, 10, 27, 98, 93, 21, 89, 23, 40, 38, 36, 99, 90, 82], [38, 1, 96, 18, 20, 6, 20, 88, 73, 92, 41, 90, 2, 18, 78, 89, 7, 81, 34, 8, 36, 88, 60, 64, 56, 70, 53, 27, 41, 54, 35, 94, 30, 20, 90, 47, 18, 75], [49, 44, 96, 84, 67, 89, 40, 83, 21, 42, 41, 3, 19, 59, 94, 65, 56, 16, 79, 61, 59, 63, 35, 32, 2, 8, 73, 65, 87, 56, 83, 16, 85, 83, 80, 11, 92, 74], [59, 63, 9, 66, 85, 47, 15, 81, 41, 75, 3, 5, 73, 2, 99, 89, 87, 67, 10, 2, 97, 20, 57, 75, 18, 77, 66, 36, 78, 43, 5, 76, 31, 3, 87, 62, 13, 38], [68, 88, 92, 3, 70, 43, 61, 91, 7, 17, 56, 91, 74, 15, 31, 8, 17, 25, 75, 5, 55, 46, 73, 48, 21, 53, 9, 23, 45, 30, 63, 67, 29, 53, 30, 68, 58, 41], [14, 51, 22, 93, 95, 99, 28, 63, 48, 48, 31, 5, 8, 96, 86, 98, 21, 34, 16, 31, 2, 27, 25, 34, 30, 68, 27, 86, 30, 24, 25, 14, 72, 6, 28, 5, 30, 97], [93, 73, 8, 62, 72, 47, 31, 64, 16, 42, 84, 12, 40, 49, 52, 62, 96, 3, 95, 10, 35, 62, 69, 77, 31, 90, 51, 13, 91, 58, 6, 77, 5, 86, 81, 19, 76, 12]],30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SUM_SERIES_12_32_52_2N_12," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_SERIES_12_32_52_2N_12{ static int f_gold ( int n ) { int sum = 0 ; for ( int i = 1 ; i <= n ; i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 ) ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(14); param0.add(61); param0.add(37); param0.add(86); param0.add(47); param0.add(98); param0.add(70); param0.add(24); param0.add(76); param0.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : sum = 0 for i in range ( 1 , n + 1 ) : sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 ) return sum "," using namespace std; int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 ); return sum; } int main() { int n_success = 0; vector param0 {14,61,37,86,47,98,70,24,76,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (14,), (61,), (37,), (86,), (47,), (98,), (70,), (24,), (76,), (24,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SWAP_TWO_NUMBERS_WITHOUT_USING_TEMPORARY_VARIABLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class SWAP_TWO_NUMBERS_WITHOUT_USING_TEMPORARY_VARIABLE{ static void f_gold ( int [ ] xp , int [ ] yp ) { xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] ; yp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] ; xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,7,12,13,15,17,24,27,28,31,36,44,55,55,56,58,60,62,64,73,75,77,89,90,93,93,95,97,98}); param0.add(new int[]{36,51,6,25,13,-36,23,14,-80,-84,45,-81,20,36,66,-62,81,-7,5,0,-10,59,-56,88,-24,45,-21,-27,67,70,76,40,-4,-11,3,46,-94,22,71,16,63,82,-38,97,44,36,-11,-4}); param0.add(new int[]{0,0,0,0,0,0,0,0,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}); param0.add(new int[]{63,87,32,10,11,70,62,47,34,17,54,76,85,40,19,67,82,53,64,83,47,6,16,72,18,52,48,43,39,49,12,10,71,55,1,49,36,21,37,24,55,25,7,81,93,94,71,97,71}); param0.add(new int[]{-85,3}); param0.add(new int[]{1,1,0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1}); param0.add(new int[]{2,3,4,5,6,8,14,16,16,17,19,21,21,25,26,26,29,33,36,39,46,53,55,56,66,77,81,84,84,86,86,88,89,89,92,97}); param0.add(new int[]{15,-37,13,-6,-52,91,-88,56,72,71,45,-60,77,-15,-43,-13,-16,92,85,21,-26,7,24,98,0,-57,19,-77,55,86,-63,34,-35,34,78,-78,5,-12,53,25,-21,-10,-49,76,2,98,6}); param0.add(new int[]{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}); param0.add(new int[]{75,24,60,95,55}); List param1 = new ArrayList<>(); param1.add(new int[]{5,8,12,13,14,20,23,25,27,28,31,33,33,37,38,39,42,42,43,47,52,54,62,67,71,72,73,76,77,79,81,81,85,86,89,91,91,96,96,99}); param1.add(new int[]{-14,59,38,84,21,-24,-8,-30,48,33,-77,37,-42,87,82,-54,-78,92,-92,23,-80,79,-22,-61,-63,78}); param1.add(new int[]{0,0,0,0,0,1,1,1,1,1}); param1.add(new int[]{11,73,12,35,63,68,92,57,13,23,83,39,88,80,97,12,34,71,75,31,93,62,13,31}); param1.add(new int[]{-84,-71,-66,-63,-25,-23,-19,3,67,94,96}); param1.add(new int[]{0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,1,0}); param1.add(new int[]{5,13,22,24,27,33,46,67,74,77,78,82,86,90,91}); param1.add(new int[]{-40}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param1.add(new int[]{80,24,77,24,54,26,66,80,38,65,75,51,35}); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{2,7,12,13,15,17,24,27,28,31,36,44,55,55,56,58,60,62,64,73,75,77,89,90,93,93,95,97,98}); filled_function_param0.add(new int[]{36,51,6,25,13,-36,23,14,-80,-84,45,-81,20,36,66,-62,81,-7,5,0,-10,59,-56,88,-24,45,-21,-27,67,70,76,40,-4,-11,3,46,-94,22,71,16,63,82,-38,97,44,36,-11,-4}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,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}); filled_function_param0.add(new int[]{63,87,32,10,11,70,62,47,34,17,54,76,85,40,19,67,82,53,64,83,47,6,16,72,18,52,48,43,39,49,12,10,71,55,1,49,36,21,37,24,55,25,7,81,93,94,71,97,71}); filled_function_param0.add(new int[]{-85,3}); filled_function_param0.add(new int[]{1,1,0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1}); filled_function_param0.add(new int[]{2,3,4,5,6,8,14,16,16,17,19,21,21,25,26,26,29,33,36,39,46,53,55,56,66,77,81,84,84,86,86,88,89,89,92,97}); filled_function_param0.add(new int[]{15,-37,13,-6,-52,91,-88,56,72,71,45,-60,77,-15,-43,-13,-16,92,85,21,-26,7,24,98,0,-57,19,-77,55,86,-63,34,-35,34,78,-78,5,-12,53,25,-21,-10,-49,76,2,98,6}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{75,24,60,95,55}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(new int[]{5,8,12,13,14,20,23,25,27,28,31,33,33,37,38,39,42,42,43,47,52,54,62,67,71,72,73,76,77,79,81,81,85,86,89,91,91,96,96,99}); filled_function_param1.add(new int[]{-14,59,38,84,21,-24,-8,-30,48,33,-77,37,-42,87,82,-54,-78,92,-92,23,-80,79,-22,-61,-63,78}); filled_function_param1.add(new int[]{0,0,0,0,0,1,1,1,1,1}); filled_function_param1.add(new int[]{11,73,12,35,63,68,92,57,13,23,83,39,88,80,97,12,34,71,75,31,93,62,13,31}); filled_function_param1.add(new int[]{-84,-71,-66,-63,-25,-23,-19,3,67,94,96}); filled_function_param1.add(new int[]{0,0,0,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,1,0}); filled_function_param1.add(new int[]{5,13,22,24,27,33,46,67,74,77,78,82,86,90,91}); filled_function_param1.add(new int[]{-40}); filled_function_param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); filled_function_param1.add(new int[]{80,24,77,24,54,26,66,80,38,65,75,51,35}); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && Arrays.equals(param1.get(i), filled_function_param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( xp , yp ) : xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] yp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] ",,," if __name__ == '__main__': param = [ ([2, 7, 12, 13, 15, 17, 24, 27, 28, 31, 36, 44, 55, 55, 56, 58, 60, 62, 64, 73, 75, 77, 89, 90, 93, 93, 95, 97, 98],[5, 8, 12, 13, 14, 20, 23, 25, 27, 28, 31, 33, 33, 37, 38, 39, 42, 42, 43, 47, 52, 54, 62, 67, 71, 72, 73, 76, 77, 79, 81, 81, 85, 86, 89, 91, 91, 96, 96, 99],), ([36, 51, 6, 25, 13, -36, 23, 14, -80, -84, 45, -81, 20, 36, 66, -62, 81, -7, 5, 0, -10, 59, -56, 88, -24, 45, -21, -27, 67, 70, 76, 40, -4, -11, 3, 46, -94, 22, 71, 16, 63, 82, -38, 97, 44, 36, -11, -4],[-14, 59, 38, 84, 21, -24, -8, -30, 48, 33, -77, 37, -42, 87, 82, -54, -78, 92, -92, 23, -80, 79, -22, -61, -63, 78],), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 1, 1, 1, 1, 1],), ([63, 87, 32, 10, 11, 70, 62, 47, 34, 17, 54, 76, 85, 40, 19, 67, 82, 53, 64, 83, 47, 6, 16, 72, 18, 52, 48, 43, 39, 49, 12, 10, 71, 55, 1, 49, 36, 21, 37, 24, 55, 25, 7, 81, 93, 94, 71, 97, 71],[11, 73, 12, 35, 63, 68, 92, 57, 13, 23, 83, 39, 88, 80, 97, 12, 34, 71, 75, 31, 93, 62, 13, 31],), ([-85, 3],[-84, -71, -66, -63, -25, -23, -19, 3, 67, 94, 96],), ([1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1],[0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0],), ([2, 3, 4, 5, 6, 8, 14, 16, 16, 17, 19, 21, 21, 25, 26, 26, 29, 33, 36, 39, 46, 53, 55, 56, 66, 77, 81, 84, 84, 86, 86, 88, 89, 89, 92, 97],[5, 13, 22, 24, 27, 33, 46, 67, 74, 77, 78, 82, 86, 90, 91],), ([15, -37, 13, -6, -52, 91, -88, 56, 72, 71, 45, -60, 77, -15, -43, -13, -16, 92, 85, 21, -26, 7, 24, 98, 0, -57, 19, -77, 55, 86, -63, 34, -35, 34, 78, -78, 5, -12, 53, 25, -21, -10, -49, 76, 2, 98, 6],[-40],), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],), ([75, 24, 60, 95, 55],[80, 24, 77, 24, 54, 26, 66, 80, 38, 65, 75, 51, 35],) ] filled_function_param = [ ([2, 7, 12, 13, 15, 17, 24, 27, 28, 31, 36, 44, 55, 55, 56, 58, 60, 62, 64, 73, 75, 77, 89, 90, 93, 93, 95, 97, 98],[5, 8, 12, 13, 14, 20, 23, 25, 27, 28, 31, 33, 33, 37, 38, 39, 42, 42, 43, 47, 52, 54, 62, 67, 71, 72, 73, 76, 77, 79, 81, 81, 85, 86, 89, 91, 91, 96, 96, 99],), ([36, 51, 6, 25, 13, -36, 23, 14, -80, -84, 45, -81, 20, 36, 66, -62, 81, -7, 5, 0, -10, 59, -56, 88, -24, 45, -21, -27, 67, 70, 76, 40, -4, -11, 3, 46, -94, 22, 71, 16, 63, 82, -38, 97, 44, 36, -11, -4],[-14, 59, 38, 84, 21, -24, -8, -30, 48, 33, -77, 37, -42, 87, 82, -54, -78, 92, -92, 23, -80, 79, -22, -61, -63, 78],), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 1, 1, 1, 1, 1],), ([63, 87, 32, 10, 11, 70, 62, 47, 34, 17, 54, 76, 85, 40, 19, 67, 82, 53, 64, 83, 47, 6, 16, 72, 18, 52, 48, 43, 39, 49, 12, 10, 71, 55, 1, 49, 36, 21, 37, 24, 55, 25, 7, 81, 93, 94, 71, 97, 71],[11, 73, 12, 35, 63, 68, 92, 57, 13, 23, 83, 39, 88, 80, 97, 12, 34, 71, 75, 31, 93, 62, 13, 31],), ([-85, 3],[-84, -71, -66, -63, -25, -23, -19, 3, 67, 94, 96],), ([1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1],[0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0],), ([2, 3, 4, 5, 6, 8, 14, 16, 16, 17, 19, 21, 21, 25, 26, 26, 29, 33, 36, 39, 46, 53, 55, 56, 66, 77, 81, 84, 84, 86, 86, 88, 89, 89, 92, 97],[5, 13, 22, 24, 27, 33, 46, 67, 74, 77, 78, 82, 86, 90, 91],), ([15, -37, 13, -6, -52, 91, -88, 56, 72, 71, 45, -60, 77, -15, -43, -13, -16, 92, 85, 21, -26, 7, 24, 98, 0, -57, 19, -77, 55, 86, -63, 34, -35, 34, 78, -78, 5, -12, 53, 25, -21, -10, -49, 76, 2, 98, 6],[-40],), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],), ([75, 24, 60, 95, 55],[80, 24, 77, 24, 54, 26, 66, 80, 38, 65, 75, 51, 35],) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_IF_ALL_THE_ELEMENTS_CAN_BE_MADE_OF_SAME_PARITY_BY_INVERTING_ADJACENT_ELEMENTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_IF_ALL_THE_ELEMENTS_CAN_BE_MADE_OF_SAME_PARITY_BY_INVERTING_ADJACENT_ELEMENTS{ static boolean f_gold ( int [ ] a , int n ) { int count_odd = 0 , count_even = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( a [ i ] & 1 ) == 1 ) count_odd ++ ; else count_even ++ ; } if ( count_odd % 2 == 1 && count_even % 2 == 1 ) return false ; else return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,1,7,7,8,10,10,10,14,15,18,20,23,24,24,26,30,32,32,33,36,42,43,46,48,51,51,52,53,58,58,59,59,59,60,67,71,72,74,76,77,83,84,86,90,91}); param0.add(new int[]{-90,-20,-60,-64,-24,84,-2,-32,28,-54,44,-96,52,88,20,-56,-2}); param0.add(new int[]{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}); param0.add(new int[]{98,70,24,18,7,4,78,19,70,56,99,54,69,15,88,20,40,13,19,56,62}); param0.add(new int[]{-72,-66,-58,-20,36,80,92}); param0.add(new int[]{0,1}); param0.add(new int[]{6,13,14,16,21,26,26,28,29,35,38,42,47,47,62,67,77,81,81,83,84,88,90,96,97,98}); param0.add(new int[]{-48,-8,20,32,-90,-42,-6,-88,-72,42,66,-62,82,-4,8,12,-22,82,56,96,-54,92,-42,30,-18,14,-6,-66,34,16,-84,-94,48,-48,52,-60,-92,-16}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{45,86,53,80,27,45,1,85,91,93,92,43,75,86,81,48,21,34,5,10,88,42,7,15,96,85,62,86,52,37}); List param1 = new ArrayList<>(); param1.add(30); param1.add(12); param1.add(36); param1.add(19); param1.add(6); param1.add(1); param1.add(17); param1.add(35); param1.add(14); param1.add(29); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , n ) : count_odd = 0 ; count_even = 0 ; for i in range ( n ) : if ( a [ i ] & 1 ) : count_odd += 1 ; else : count_even += 1 ; if ( count_odd % 2 and count_even % 2 ) : return False ; else : return True ; "," using namespace std; bool f_gold ( int a [ ], int n ) { int count_odd = 0, count_even = 0; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] & 1 ) count_odd ++; else count_even ++; } if ( count_odd % 2 && count_even % 2 ) return false; else return true; } int main() { int n_success = 0; vector> param0 {{1,1,1,7,7,8,10,10,10,14,15,18,20,23,24,24,26,30,32,32,33,36,42,43,46,48,51,51,52,53,58,58,59,59,59,60,67,71,72,74,76,77,83,84,86,90,91},{-90,-20,-60,-64,-24,84,-2,-32,28,-54,44,-96,52,88,20,-56,-2},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{98,70,24,18,7,4,78,19,70,56,99,54,69,15,88,20,40,13,19,56,62},{-72,-66,-58,-20,36,80,92},{0,1},{6,13,14,16,21,26,26,28,29,35,38,42,47,47,62,67,77,81,81,83,84,88,90,96,97,98},{-48,-8,20,32,-90,-42,-6,-88,-72,42,66,-62,82,-4,8,12,-22,82,56,96,-54,92,-42,30,-18,14,-6,-66,34,16,-84,-94,48,-48,52,-60,-92,-16},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{45,86,53,80,27,45,1,85,91,93,92,43,75,86,81,48,21,34,5,10,88,42,7,15,96,85,62,86,52,37}}; vector param1 {30,12,36,19,6,1,17,35,14,29}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 1, 1, 7, 7, 8, 10, 10, 10, 14, 15, 18, 20, 23, 24, 24, 26, 30, 32, 32, 33, 36, 42, 43, 46, 48, 51, 51, 52, 53, 58, 58, 59, 59, 59, 60, 67, 71, 72, 74, 76, 77, 83, 84, 86, 90, 91],30,), ([-90, -20, -60, -64, -24, 84, -2, -32, 28, -54, 44, -96, 52, 88, 20, -56, -2],12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],36,), ([98, 70, 24, 18, 7, 4, 78, 19, 70, 56, 99, 54, 69, 15, 88, 20, 40, 13, 19, 56, 62],19,), ([-72, -66, -58, -20, 36, 80, 92],6,), ([0, 1],1,), ([6, 13, 14, 16, 21, 26, 26, 28, 29, 35, 38, 42, 47, 47, 62, 67, 77, 81, 81, 83, 84, 88, 90, 96, 97, 98],17,), ([-48, -8, 20, 32, -90, -42, -6, -88, -72, 42, 66, -62, 82, -4, 8, 12, -22, 82, 56, 96, -54, 92, -42, 30, -18, 14, -6, -66, 34, 16, -84, -94, 48, -48, 52, -60, -92, -16],35,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([45, 86, 53, 80, 27, 45, 1, 85, 91, 93, 92, 43, 75, 86, 81, 48, 21, 34, 5, 10, 88, 42, 7, 15, 96, 85, 62, 86, 52, 37],29,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_TRIANGLE_VALID_NOT_SIDES_GIVEN{ public static int f_gold ( int a , int b , int c ) { if ( a + b <= c || a + c <= b || b + c <= a ) return 0 ; else return 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(29); param0.add(83); param0.add(48); param0.add(59); param0.add(56); param0.add(68); param0.add(63); param0.add(95); param0.add(2); param0.add(11); List param1 = new ArrayList<>(); param1.add(19); param1.add(34); param1.add(14); param1.add(12); param1.add(39); param1.add(85); param1.add(36); param1.add(34); param1.add(90); param1.add(16); List param2 = new ArrayList<>(); param2.add(52); param2.add(49); param2.add(65); param2.add(94); param2.add(22); param2.add(9); param2.add(41); param2.add(37); param2.add(27); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( a , b , c ) : if ( a + b <= c ) or ( a + c <= b ) or ( b + c <= a ) : return False else : return True "," using namespace std; bool f_gold ( int a, int b, int c ) { if ( a + b <= c || a + c <= b || b + c <= a ) return false; else return true; } int main() { int n_success = 0; vector param0 {29,83,48,59,56,68,63,95,2,11}; vector param1 {19,34,14,12,39,85,36,34,90,16}; vector param2 {52,49,65,94,22,9,41,37,27,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (29,19,52,), (83,34,49,), (48,14,65,), (59,12,94,), (56,39,22,), (68,85,9,), (63,36,41,), (95,34,37,), (2,90,27,), (11,16,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS{ static int f_gold ( int n ) { int dp [ ] [ ] = new int [ 10 ] [ n + 1 ] ; for ( int i = 0 ; i < 10 ; i ++ ) dp [ i ] [ 1 ] = 1 ; for ( int digit = 0 ; digit <= 9 ; digit ++ ) { for ( int len = 2 ; len <= n ; len ++ ) { for ( int x = 0 ; x <= digit ; x ++ ) dp [ digit ] [ len ] += dp [ x ] [ len - 1 ] ; } } int count = 0 ; for ( int i = 0 ; i < 10 ; i ++ ) count += dp [ i ] [ n ] ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(21); param0.add(40); param0.add(83); param0.add(93); param0.add(43); param0.add(98); param0.add(35); param0.add(86); param0.add(76); param0.add(88); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : dp = [ [ 0 for i in range ( n + 1 ) ] for i in range ( 10 ) ] for i in range ( 10 ) : dp [ i ] [ 1 ] = 1 for digit in range ( 10 ) : for len in range ( 2 , n + 1 ) : for x in range ( digit + 1 ) : dp [ digit ] [ len ] += dp [ x ] [ len - 1 ] count = 0 for i in range ( 10 ) : count += dp [ i ] [ n ] return count "," using namespace std; long long int f_gold ( int n ) { long long int dp [ 10 ] [ n + 1 ]; memset ( dp, 0, sizeof dp ); for ( int i = 0; i < 10; i ++ ) dp [ i ] [ 1 ] = 1; for ( int digit = 0; digit <= 9; digit ++ ) { for ( int len = 2; len <= n; len ++ ) { for ( int x = 0; x <= digit; x ++ ) dp [ digit ] [ len ] += dp [ x ] [ len - 1 ]; } } long long int count = 0; for ( int i = 0; i < 10; i ++ ) count += dp [ i ] [ n ]; return count; } int main() { int n_success = 0; vector param0 {21,40,83,93,43,98,35,86,76,88}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (21,), (40,), (83,), (93,), (43,), (98,), (35,), (86,), (76,), (88,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_TWICE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PROFIT_BY_BUYING_AND_SELLING_A_SHARE_AT_MOST_TWICE{ static int f_gold ( int price [ ] , int n ) { int profit [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) profit [ i ] = 0 ; int max_price = price [ n - 1 ] ; for ( int i = n - 2 ; i >= 0 ; i -- ) { if ( price [ i ] > max_price ) max_price = price [ i ] ; profit [ i ] = Math . max ( profit [ i + 1 ] , max_price - price [ i ] ) ; } int min_price = price [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { if ( price [ i ] < min_price ) min_price = price [ i ] ; profit [ i ] = Math . max ( profit [ i - 1 ] , profit [ i ] + ( price [ i ] - min_price ) ) ; } int result = profit [ n - 1 ] ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{9,10,10,12,17,18,23,32,41,44,47,50,59,69,69,75,82,84,87,89,97,99}); param0.add(new int[]{6,6,60,40,32,-70,-92,88,10,-8,-54,4,16,8,-44,80,-70,36,36,-74,-94,18,-64,-66,-46,0,-54,-84,16,-88,-34,-24,92,84,62}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{2,67,50,8,20,42,37,69,86,74,85,96,78,89,91}); param0.add(new int[]{-68,-52,-14,-2,18,22,30,34,64,64,70}); param0.add(new int[]{1,1,0,0,0,1,0,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1}); param0.add(new int[]{4,17,19,28,29,30,30,30,35,36,36,38,40,40,42,43,45,51,55,57,58,59,64,65,66,82,84,85,87,91,92,94,98,98}); param0.add(new int[]{52,88,-40,60,30,8,-96,66,-96,-28,-56,-14,76,-92,56,58,64,-60,-90,26,64,-2,54,-24,54,-46,-44}); param0.add(new int[]{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}); param0.add(new int[]{82,14,51,12,5,15,50,88,91,82,16,98,23,58,86,91,30,81,7,73,67,47,10,50,43,31,19,2,22}); List param1 = new ArrayList<>(); param1.add(20); param1.add(34); param1.add(13); param1.add(8); param1.add(9); param1.add(21); param1.add(25); param1.add(14); param1.add(22); param1.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(price, n): profit = [0] * n max_price = price[n - 1] for i in range(n - 2, 0, - 1): if price[i] > max_price: max_price = price[i] profit[i] = max(profit[i + 1], max_price - price[i]) min_price = price[0] for i in range(1, n): if price[i] < min_price: min_price = price[i] profit[i] = max(profit[i - 1], profit[i] + (price[i] - min_price)) result = profit[n - 1] return result "," using namespace std; int f_gold ( int price [ ], int n ) { int * profit = new int [ n ]; for ( int i = 0; i < n; i ++ ) profit [ i ] = 0; int max_price = price [ n - 1 ]; for ( int i = n - 2; i >= 0; i -- ) { if ( price [ i ] > max_price ) max_price = price [ i ]; profit [ i ] = max ( profit [ i + 1 ], max_price - price [ i ] ); } int min_price = price [ 0 ]; for ( int i = 1; i < n; i ++ ) { if ( price [ i ] < min_price ) min_price = price [ i ]; profit [ i ] = max ( profit [ i - 1 ], profit [ i ] + ( price [ i ] - min_price ) ); } int result = profit [ n - 1 ]; delete [ ] profit; return result; } int main() { int n_success = 0; vector> param0 {{9,10,10,12,17,18,23,32,41,44,47,50,59,69,69,75,82,84,87,89,97,99},{6,6,60,40,32,-70,-92,88,10,-8,-54,4,16,8,-44,80,-70,36,36,-74,-94,18,-64,-66,-46,0,-54,-84,16,-88,-34,-24,92,84,62},{0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{2,67,50,8,20,42,37,69,86,74,85,96,78,89,91},{-68,-52,-14,-2,18,22,30,34,64,64,70},{1,1,0,0,0,1,0,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1},{4,17,19,28,29,30,30,30,35,36,36,38,40,40,42,43,45,51,55,57,58,59,64,65,66,82,84,85,87,91,92,94,98,98},{52,88,-40,60,30,8,-96,66,-96,-28,-56,-14,76,-92,56,58,64,-60,-90,26,64,-2,54,-24,54,-46,-44},{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},{82,14,51,12,5,15,50,88,91,82,16,98,23,58,86,91,30,81,7,73,67,47,10,50,43,31,19,2,22}}; vector param1 {20,34,13,8,9,21,25,14,22,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([9, 10, 10, 12, 17, 18, 23, 32, 41, 44, 47, 50, 59, 69, 69, 75, 82, 84, 87, 89, 97, 99], 20,), ([6, 6, 60, 40, 32, -70, -92, 88, 10, -8, -54, 4, 16, 8, -44, 80, -70, 36, 36, - 74, -94, 18, -64, -66, -46, 0, -54, -84, 16, -88, -34, -24, 92, 84, 62], 34,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 13,), ([2, 67, 50, 8, 20, 42, 37, 69, 86, 74, 85, 96, 78, 89, 91], 8,), ([-68, -52, -14, -2, 18, 22, 30, 34, 64, 64, 70], 9,), ([1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1], 21,), ([4, 17, 19, 28, 29, 30, 30, 30, 35, 36, 36, 38, 40, 40, 42, 43, 45, 51, 55, 57, 58, 59, 64, 65, 66, 82, 84, 85, 87, 91, 92, 94, 98, 98], 25,), ([52, 88, -40, 60, 30, 8, -96, 66, -96, -28, -56, -14, 76, -92, 56, 58, 64, -60, -90, 26, 64, -2, 54, -24, 54, -46, -44], 14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 22,), ([82, 14, 51, 12, 5, 15, 50, 88, 91, 82, 16, 98, 23, 58, 86, 91, 30, 81, 7, 73, 67, 47, 10, 50, 43, 31, 19, 2, 22], 18,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MAXIMUM_POSSIBLE_SUM_WINDOW_ARRAY_ELEMENTS_WINDOW_ARRAY_UNIQUE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_POSSIBLE_SUM_WINDOW_ARRAY_ELEMENTS_WINDOW_ARRAY_UNIQUE{ static int f_gold ( int A [ ] , int B [ ] , int n ) { Set < Integer > mp = new HashSet < Integer > ( ) ; int result = 0 ; int curr_sum = 0 , curr_begin = 0 ; for ( int i = 0 ; i < n ; ++ i ) { while ( mp . contains ( A [ i ] ) ) { mp . remove ( A [ curr_begin ] ) ; curr_sum -= B [ curr_begin ] ; curr_begin ++ ; } mp . add ( A [ i ] ) ; curr_sum += B [ i ] ; result = Integer . max ( result , curr_sum ) ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{4,8,10,10,16,23,33,36,43,47,50,55,56,72,84,85,86,86,88,90,92,99}); param0.add(new int[]{48,-22,84,76,50,-14,-82,28,86,-50,-40,10,48,20,-48,-84,-64,-48,-32,-84,-32,10,42,-10,-68,-16,-94,-76,42,-96,16,-64,60,8,-88,-62,82,-24,-28,40,18,8}); param0.add(new int[]{0,0,0,1}); param0.add(new int[]{74,64,93,72,75,90,46,72,91,98,57,58,76,29,88,3,86,1,78,74,56,54,57,3,94,2,14,32,67,62,1,30,78,95,40}); param0.add(new int[]{-94,-88,-68,-24,60,94}); param0.add(new int[]{0,0,0,0,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,0,1,0,1,1,1,0,0}); param0.add(new int[]{3,7,12,15,17,23,31,31,32,37,41,54,57,60,62,62,64,70,71,74,75,83,97,98}); param0.add(new int[]{-2,26,-74,96,-70,56,92,-74,-38,-18,36,44,-10,-26,26,-22,-58,78,86,22,76,50,88,-86,-80,-36,-48,90,-34,62,46,-56,-32}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,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}); param0.add(new int[]{86,30,87,99,8,1,24,46,12,21,43,73,28,3,35,49,14,37,63,98,65,43,86,69,27,60,45,88,25,86,11,9,86,73,40,70,49,50,95,69,94}); List param1 = new ArrayList<>(); param1.add(new int[]{8,26,30,35,45,47,55,56,59,61,64,66,67,69,73,77,78,81,82,85,86,99}); param1.add(new int[]{82,94,34,12,18,-68,14,-16,-30,-16,6,74,-68,76,-76,52,-32,-38,78,64,-60,-46,82,-60,98,-70,-52,-96,-6,-44,66,-66,22,-42,-66,4,-2,-48,-94,72,56,88}); param1.add(new int[]{0,0,1,1}); param1.add(new int[]{9,50,22,60,36,46,76,48,90,64,16,24,41,12,36,36,93,52,26,38,68,5,55,19,35,5,7,96,67,64,24,85,6,33,7}); param1.add(new int[]{-80,-72,-60,-42,-24,-6}); param1.add(new int[]{1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,0,1,1,0,1,1,1,1,1,0}); param1.add(new int[]{3,10,10,12,12,14,15,19,19,20,25,27,27,28,40,41,50,51,53,57,60,65,75,99}); param1.add(new int[]{76,42,0,4,-96,-24,-50,-54,26,-8,-38,-46,42,-50,16,-2,-6,2,-8,56,64,-58,-96,2,-64,-66,-14,58,-76,-26,78,-96,48}); param1.add(new int[]{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}); param1.add(new int[]{27,66,77,34,98,75,43,27,79,32,54,40,29,47,63,15,23,33,59,76,27,31,92,43,12,20,97,67,11,12,83,79,52,46,51,36,87,96,90,6,62}); List param2 = new ArrayList<>(); param2.add(20); param2.add(30); param2.add(2); param2.add(20); param2.add(4); param2.add(22); param2.add(22); param2.add(17); param2.add(39); param2.add(34); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( A , B , n ) : mp = set ( ) result = 0 curr_sum = curr_begin = 0 for i in range ( 0 , n ) : while A [ i ] in mp : mp.remove ( A [ curr_begin ] ) curr_sum -= B [ curr_begin ] curr_begin += 1 mp.add ( A [ i ] ) curr_sum += B [ i ] result = max ( result , curr_sum ) return result "," using namespace std; int f_gold ( int A [ ], int B [ ], int n ) { unordered_set < int > mp; int result = 0; int curr_sum = 0, curr_begin = 0; for ( int i = 0; i < n; ++ i ) { while ( mp . find ( A [ i ] ) != mp . end ( ) ) { mp . erase ( A [ curr_begin ] ); curr_sum -= B [ curr_begin ]; curr_begin ++; } mp . insert ( A [ i ] ); curr_sum += B [ i ]; result = max ( result, curr_sum ); } return result; } int main() { int n_success = 0; vector> param0 {{4,8,10,10,16,23,33,36,43,47,50,55,56,72,84,85,86,86,88,90,92,99},{48,-22,84,76,50,-14,-82,28,86,-50,-40,10,48,20,-48,-84,-64,-48,-32,-84,-32,10,42,-10,-68,-16,-94,-76,42,-96,16,-64,60,8,-88,-62,82,-24,-28,40,18,8},{0,0,0,1},{74,64,93,72,75,90,46,72,91,98,57,58,76,29,88,3,86,1,78,74,56,54,57,3,94,2,14,32,67,62,1,30,78,95,40},{-94,-88,-68,-24,60,94},{0,0,0,0,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,0,1,0,1,1,1,0,0},{3,7,12,15,17,23,31,31,32,37,41,54,57,60,62,62,64,70,71,74,75,83,97,98},{-2,26,-74,96,-70,56,92,-74,-38,-18,36,44,-10,-26,26,-22,-58,78,86,22,76,50,88,-86,-80,-36,-48,90,-34,62,46,-56,-32},{0,0,0,0,0,0,0,0,0,0,0,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},{86,30,87,99,8,1,24,46,12,21,43,73,28,3,35,49,14,37,63,98,65,43,86,69,27,60,45,88,25,86,11,9,86,73,40,70,49,50,95,69,94}}; vector> param1 {{8,26,30,35,45,47,55,56,59,61,64,66,67,69,73,77,78,81,82,85,86,99},{82,94,34,12,18,-68,14,-16,-30,-16,6,74,-68,76,-76,52,-32,-38,78,64,-60,-46,82,-60,98,-70,-52,-96,-6,-44,66,-66,22,-42,-66,4,-2,-48,-94,72,56,88},{0,0,1,1},{9,50,22,60,36,46,76,48,90,64,16,24,41,12,36,36,93,52,26,38,68,5,55,19,35,5,7,96,67,64,24,85,6,33,7},{-80,-72,-60,-42,-24,-6},{1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,0,1,1,0,1,1,1,1,1,0},{3,10,10,12,12,14,15,19,19,20,25,27,27,28,40,41,50,51,53,57,60,65,75,99},{76,42,0,4,-96,-24,-50,-54,26,-8,-38,-46,42,-50,16,-2,-6,2,-8,56,64,-58,-96,2,-64,-66,-14,58,-76,-26,78,-96,48},{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},{27,66,77,34,98,75,43,27,79,32,54,40,29,47,63,15,23,33,59,76,27,31,92,43,12,20,97,67,11,12,83,79,52,46,51,36,87,96,90,6,62}}; vector param2 {20,30,2,20,4,22,22,17,39,34}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([4, 8, 10, 10, 16, 23, 33, 36, 43, 47, 50, 55, 56, 72, 84, 85, 86, 86, 88, 90, 92, 99],[8, 26, 30, 35, 45, 47, 55, 56, 59, 61, 64, 66, 67, 69, 73, 77, 78, 81, 82, 85, 86, 99],20,), ([48, -22, 84, 76, 50, -14, -82, 28, 86, -50, -40, 10, 48, 20, -48, -84, -64, -48, -32, -84, -32, 10, 42, -10, -68, -16, -94, -76, 42, -96, 16, -64, 60, 8, -88, -62, 82, -24, -28, 40, 18, 8],[82, 94, 34, 12, 18, -68, 14, -16, -30, -16, 6, 74, -68, 76, -76, 52, -32, -38, 78, 64, -60, -46, 82, -60, 98, -70, -52, -96, -6, -44, 66, -66, 22, -42, -66, 4, -2, -48, -94, 72, 56, 88],30,), ([0, 0, 0, 1],[0, 0, 1, 1],2,), ([74, 64, 93, 72, 75, 90, 46, 72, 91, 98, 57, 58, 76, 29, 88, 3, 86, 1, 78, 74, 56, 54, 57, 3, 94, 2, 14, 32, 67, 62, 1, 30, 78, 95, 40],[9, 50, 22, 60, 36, 46, 76, 48, 90, 64, 16, 24, 41, 12, 36, 36, 93, 52, 26, 38, 68, 5, 55, 19, 35, 5, 7, 96, 67, 64, 24, 85, 6, 33, 7],20,), ([-94, -88, -68, -24, 60, 94],[-80, -72, -60, -42, -24, -6],4,), ([0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0],[1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0],22,), ([3, 7, 12, 15, 17, 23, 31, 31, 32, 37, 41, 54, 57, 60, 62, 62, 64, 70, 71, 74, 75, 83, 97, 98],[3, 10, 10, 12, 12, 14, 15, 19, 19, 20, 25, 27, 27, 28, 40, 41, 50, 51, 53, 57, 60, 65, 75, 99],22,), ([-2, 26, -74, 96, -70, 56, 92, -74, -38, -18, 36, 44, -10, -26, 26, -22, -58, 78, 86, 22, 76, 50, 88, -86, -80, -36, -48, 90, -34, 62, 46, -56, -32],[76, 42, 0, 4, -96, -24, -50, -54, 26, -8, -38, -46, 42, -50, 16, -2, -6, 2, -8, 56, 64, -58, -96, 2, -64, -66, -14, 58, -76, -26, 78, -96, 48],17,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],39,), ([86, 30, 87, 99, 8, 1, 24, 46, 12, 21, 43, 73, 28, 3, 35, 49, 14, 37, 63, 98, 65, 43, 86, 69, 27, 60, 45, 88, 25, 86, 11, 9, 86, 73, 40, 70, 49, 50, 95, 69, 94],[27, 66, 77, 34, 98, 75, 43, 27, 79, 32, 54, 40, 29, 47, 63, 15, 23, 33, 59, 76, 27, 31, 92, 43, 12, 20, 97, 67, 11, 12, 83, 79, 52, 46, 51, 36, 87, 96, 90, 6, 62],34,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_WEIGHT_PATH_ENDING_ELEMENT_LAST_ROW_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_WEIGHT_PATH_ENDING_ELEMENT_LAST_ROW_MATRIX{ public static int f_gold ( int mat [ ] [ ] , int N ) { int dp [ ] [ ] = new int [ N ] [ N ] ; dp [ 0 ] [ 0 ] = mat [ 0 ] [ 0 ] ; for ( int i = 1 ; i < N ; i ++ ) dp [ i ] [ 0 ] = mat [ i ] [ 0 ] + dp [ i - 1 ] [ 0 ] ; for ( int i = 1 ; i < N ; i ++ ) for ( int j = 1 ; j < i + 1 && j < N ; j ++ ) dp [ i ] [ j ] = mat [ i ] [ j ] + Math . max ( dp [ i - 1 ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) ; int result = 0 ; for ( int i = 0 ; i < N ; i ++ ) if ( result < dp [ N - 1 ] [ i ] ) result = dp [ N - 1 ] [ i ] ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,3,17,22,24,29,36,38,41,42,44,44,47,48,49,51,52,54,64,69,70,77,79,82,86,86,87,88,97,99},new int[]{5,6,17,21,27,27,37,39,47,48,48,52,53,54,57,59,61,63,68,72,75,77,78,81,88,89,91,95,95,97},new int[]{2,8,10,16,17,18,18,18,20,27,33,35,36,42,48,51,56,66,72,72,75,76,76,76,84,85,91,94,96,98},new int[]{1,2,4,11,12,12,14,21,24,26,30,33,37,42,43,47,54,56,62,64,67,68,69,71,72,73,86,86,90,93},new int[]{1,1,3,7,9,10,11,12,14,14,15,17,21,25,26,40,45,46,46,48,49,54,56,60,64,68,68,73,93,93},new int[]{8,11,12,13,13,15,19,20,24,27,29,31,32,33,34,37,39,42,45,50,51,61,65,68,75,81,84,85,87,94},new int[]{12,16,17,24,34,34,35,40,43,48,50,51,53,55,60,60,62,66,68,70,71,73,77,83,84,86,88,95,96,97},new int[]{1,5,7,18,18,22,32,36,38,38,40,43,46,49,50,54,58,61,71,74,78,78,79,82,86,87,87,88,90,95},new int[]{4,11,22,26,28,35,35,37,39,42,45,46,51,57,60,61,62,63,65,65,79,79,79,82,83,87,89,90,91,98},new int[]{6,7,7,8,9,11,13,16,18,23,29,37,38,41,44,46,50,50,51,56,58,67,71,74,77,79,80,90,91,97},new int[]{3,7,10,15,19,20,22,28,28,32,33,36,36,38,41,49,51,54,63,66,66,70,72,79,87,88,89,92,93,98},new int[]{3,8,10,14,21,25,33,35,37,37,43,44,45,50,59,62,63,75,79,79,79,84,85,86,87,87,88,90,91,96},new int[]{2,4,7,12,13,18,23,23,28,29,32,34,37,37,37,38,41,44,45,47,48,49,59,64,72,75,87,92,93,98},new int[]{2,4,5,5,11,14,18,23,24,27,32,35,35,37,39,40,45,48,49,52,60,66,68,71,72,74,78,81,91,92},new int[]{4,4,4,6,11,18,20,23,24,29,32,33,37,40,42,47,51,52,58,59,62,67,68,75,77,78,80,85,89,95},new int[]{5,5,19,21,22,23,29,30,32,39,42,42,44,44,45,46,52,55,59,63,65,76,78,80,81,82,84,93,94,97},new int[]{3,4,6,8,10,15,15,17,27,28,34,36,39,42,53,54,59,63,65,66,70,71,72,80,80,91,92,94,95,99},new int[]{1,7,12,13,16,25,32,32,36,46,46,49,52,55,61,61,67,68,69,72,74,76,77,78,79,81,85,90,90,92},new int[]{2,12,12,13,18,20,25,28,31,31,34,36,38,39,42,43,44,47,54,60,75,76,77,80,82,83,86,90,91,91},new int[]{3,8,9,11,12,14,14,14,19,25,27,29,43,45,48,50,50,56,58,61,63,65,68,71,73,81,83,83,86,93},new int[]{11,15,15,15,15,18,28,29,33,33,36,43,44,48,50,50,53,55,59,59,60,61,62,63,75,78,81,82,87,94},new int[]{4,7,8,10,11,12,19,24,31,36,36,37,40,41,46,48,49,51,57,62,73,75,78,81,82,86,86,91,97,97},new int[]{5,5,7,8,10,14,15,17,19,21,22,23,31,34,36,43,46,58,60,72,72,75,77,81,83,84,86,91,96,98},new int[]{6,10,13,15,22,27,28,29,30,31,32,35,35,36,37,39,39,43,44,47,55,68,68,69,77,83,94,94,98,99},new int[]{4,4,5,6,6,10,18,27,28,29,31,33,34,41,43,44,54,56,63,74,76,77,80,80,83,89,89,90,98,99},new int[]{2,7,15,19,23,23,36,41,44,46,47,49,53,58,58,60,60,66,70,73,76,77,78,80,80,88,88,91,93,94},new int[]{3,3,9,9,10,13,15,19,20,23,25,33,36,37,47,54,58,60,60,65,71,73,81,88,89,90,92,94,94,96},new int[]{6,7,11,19,22,27,27,31,31,33,34,44,46,47,47,48,49,53,53,56,60,60,70,72,79,80,86,93,94,96},new int[]{2,7,7,7,8,10,13,15,17,18,27,27,30,33,33,34,37,41,43,47,55,55,59,71,71,75,78,78,84,85},new int[]{5,6,7,7,14,21,24,26,29,31,32,34,40,42,43,45,46,53,57,58,67,73,74,77,81,85,88,91,91,92}}); param0.add(new int[][]{new int[]{62,44,46,46,-20,-40,24,42,-66,-90,62,-98,60},new int[]{62,88,-38,-30,44,-40,70,-70,96,12,20,-46,-96},new int[]{48,28,-90,82,36,-74,62,70,-54,94,0,58,56},new int[]{46,-26,-40,86,-54,-32,28,10,42,-82,-92,32,82},new int[]{-34,-36,-12,-26,82,84,34,20,18,-28,-2,2,-84},new int[]{0,-18,-24,72,56,58,10,36,-64,30,28,-76,-18},new int[]{-16,20,0,62,66,-28,-4,42,46,-84,-50,-86,-84},new int[]{76,62,52,-38,-76,14,32,-76,-46,-8,-86,22,16},new int[]{16,-74,6,30,-2,-30,88,90,-66,44,34,-80,-32},new int[]{72,-92,92,-42,-8,50,-8,54,18,22,36,32,-32},new int[]{72,-90,-82,-60,-58,-66,-76,84,64,34,-90,20,6},new int[]{4,56,-4,80,-62,-66,8,36,-30,76,-18,-74,-34},new int[]{-70,26,-70,-38,-44,-80,14,42,-34,-86,-90,80,60}}); param0.add(new int[][]{new int[]{0,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1},new int[]{0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,0,1},new int[]{0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1},new int[]{0,0,0,0,0,0,0,1},new int[]{0,0,0,0,0,1,1,1}}); param0.add(new int[][]{new int[]{89,8,34,49,96},new int[]{58,75,47,25,3},new int[]{45,52,96,99,96},new int[]{34,69,92,92,8},new int[]{27,80,63,82,25}}); param0.add(new int[][]{new int[]{-98,-94,-92,-86,-86,-86,-84,-78,-76,-70,-68,-66,-64,-58,-56,-52,-42,-40,-38,-38,-36,-32,-30,-24,-20,-12,-8,4,4,6,8,12,18,22,26,30,32,56,58,72,76,78,80,82,88,94,96,98},new int[]{-94,-94,-92,-84,-84,-82,-80,-80,-80,-78,-78,-76,-74,-68,-64,-64,-58,-54,-48,-46,-40,-38,-36,-30,-22,-22,-12,-12,-6,-2,2,4,6,22,22,22,24,24,24,24,26,42,44,50,52,54,66,80},new int[]{-98,-92,-92,-84,-80,-76,-76,-70,-64,-60,-60,-52,-48,-48,-46,-46,-36,-32,-30,-24,-22,-16,-14,-8,-8,-4,-2,0,2,2,2,8,10,12,22,32,38,38,40,48,64,68,76,78,78,86,96,96},new int[]{-98,-96,-88,-86,-78,-78,-70,-68,-62,-60,-58,-42,-38,-38,-38,-36,-36,-32,-28,-26,-24,-12,-10,-4,2,12,12,18,26,32,34,36,38,44,44,50,52,54,54,56,56,58,70,74,76,82,86,90},new int[]{-98,-96,-96,-94,-90,-90,-90,-86,-82,-78,-76,-74,-72,-68,-66,-60,-52,-46,-44,-44,-38,-38,-34,-32,-22,-20,-18,-14,8,8,12,12,12,16,20,38,40,44,52,76,78,80,82,86,90,90,96,98},new int[]{-88,-84,-84,-80,-78,-70,-68,-66,-62,-62,-54,-52,-48,-42,-42,-40,-32,-30,-26,-26,-24,-24,-14,-6,-4,-2,-2,4,4,8,22,24,40,42,52,52,56,56,58,64,72,72,74,74,86,92,96,98},new int[]{-98,-98,-92,-82,-76,-72,-68,-66,-64,-62,-56,-50,-48,-46,-46,-40,-40,-40,-38,-28,-28,-24,-22,-20,-20,-10,-6,4,6,10,12,26,32,38,38,40,42,56,60,64,64,72,72,76,84,90,94,98},new int[]{-98,-86,-72,-72,-66,-66,-64,-58,-56,-54,-54,-50,-44,-44,-36,-32,-30,-28,-26,-18,-14,-6,-4,6,6,10,10,14,22,28,38,40,46,46,50,52,54,56,60,68,68,72,76,90,90,92,92,98},new int[]{-90,-86,-86,-84,-76,-74,-70,-66,-58,-58,-54,-50,-48,-44,-38,-38,-36,-34,-30,-22,-22,-8,-6,4,6,6,6,8,10,24,24,28,32,32,32,36,44,48,48,50,52,64,70,74,76,92,94,96},new int[]{-96,-94,-84,-76,-76,-70,-68,-66,-56,-50,-50,-48,-46,-42,-42,-40,-40,-38,-38,-36,-36,-34,-30,-24,-22,-6,-4,-2,2,4,10,12,16,24,28,32,38,46,50,56,56,62,64,66,74,74,98,98},new int[]{-98,-96,-92,-88,-88,-84,-82,-78,-68,-66,-54,-52,-52,-50,-44,-40,-40,-38,-34,-34,-30,-26,-26,-24,-18,-14,-10,4,6,6,16,20,24,26,26,32,36,38,56,66,70,78,78,84,86,88,88,90},new int[]{-94,-90,-86,-86,-86,-86,-84,-82,-78,-78,-76,-72,-68,-64,-64,-62,-46,-42,-42,-28,-26,-18,-16,-10,-8,-2,0,10,10,12,18,18,26,26,32,34,34,40,50,54,56,58,62,66,66,82,84,94},new int[]{-98,-94,-88,-86,-84,-80,-80,-78,-78,-74,-72,-72,-70,-70,-68,-66,-66,-64,-50,-44,-28,-24,-16,-6,-4,0,2,8,12,22,26,32,38,38,50,54,58,58,64,64,66,70,78,86,88,90,96,98},new int[]{-96,-94,-90,-82,-78,-76,-76,-72,-64,-62,-54,-52,-50,-46,-44,-36,-30,-28,-28,-28,-22,-14,-12,0,0,2,6,6,10,18,22,22,24,28,28,30,34,36,36,42,46,48,54,66,72,76,86,96},new int[]{-98,-96,-92,-92,-90,-88,-86,-82,-78,-70,-68,-66,-60,-58,-48,-48,-46,-30,-26,-22,-20,-16,-12,-8,-4,-4,4,16,22,32,34,34,36,36,40,52,60,62,64,66,66,74,74,78,82,82,86,94},new int[]{-92,-90,-88,-84,-82,-80,-78,-76,-74,-60,-56,-48,-48,-48,-48,-42,-38,-38,-30,-28,-28,-26,-12,-12,-10,-10,-2,14,16,22,26,34,42,44,52,54,56,58,58,60,62,66,70,82,84,90,94,96},new int[]{-96,-92,-92,-84,-80,-76,-74,-74,-72,-70,-66,-66,-62,-60,-58,-56,-56,-50,-36,-34,-26,-10,2,2,10,10,10,10,12,18,22,22,34,34,40,60,62,62,68,72,76,78,82,82,82,82,94,96},new int[]{-96,-96,-88,-84,-78,-72,-68,-62,-56,-56,-52,-38,-32,-24,-20,-18,-18,-16,-10,-6,8,8,12,18,24,24,26,28,30,30,32,32,56,62,64,66,66,72,74,74,78,84,84,86,88,92,92,98},new int[]{-92,-86,-78,-68,-68,-68,-64,-58,-56,-48,-44,-38,-36,-34,-26,-22,-20,-18,-8,-6,0,2,4,12,12,18,20,22,30,32,36,38,42,44,46,50,50,52,56,58,62,64,68,70,70,82,90,98},new int[]{-94,-92,-92,-90,-88,-84,-80,-76,-74,-72,-72,-68,-62,-62,-56,-54,-50,-44,-42,-42,-30,-20,-16,-6,-6,12,14,16,18,30,30,40,42,44,54,58,58,68,74,74,80,84,84,86,88,94,96,96},new int[]{-90,-86,-84,-84,-78,-78,-70,-70,-64,-56,-52,-50,-48,-48,-48,-46,-42,-40,-40,-30,-30,-28,-24,-22,-18,-16,-14,-6,-2,4,10,12,14,14,20,26,32,44,58,64,68,68,74,76,76,82,86,88},new int[]{-98,-84,-80,-80,-78,-78,-78,-76,-68,-62,-56,-50,-34,-30,-30,-12,-8,-4,2,8,10,12,14,22,24,26,36,38,38,44,46,48,56,58,62,64,64,66,66,70,70,74,78,82,88,90,94,96},new int[]{-96,-96,-96,-96,-94,-94,-90,-86,-84,-80,-78,-74,-64,-60,-56,-54,-42,-38,-38,-38,-36,-34,-18,-16,-14,-14,-10,-10,-10,-6,-4,8,14,20,32,42,44,48,54,54,56,70,70,72,74,80,84,94},new int[]{-96,-94,-86,-84,-78,-76,-70,-66,-62,-60,-56,-56,-54,-54,-52,-52,-50,-46,-46,-34,-32,-32,-28,-16,-12,-6,0,16,18,18,20,20,28,34,38,40,42,42,52,56,62,66,66,70,82,84,88,98},new int[]{-86,-84,-80,-78,-62,-60,-58,-56,-54,-52,-48,-44,-40,-38,-38,-26,-26,-24,-24,-18,-10,-6,2,8,12,16,22,26,32,36,42,44,46,48,52,52,52,62,66,70,78,78,78,80,84,90,92,92},new int[]{-98,-96,-88,-86,-82,-78,-78,-72,-72,-70,-64,-64,-60,-58,-54,-52,-46,-42,-30,-18,-14,-2,2,2,6,12,20,24,24,28,32,38,38,48,54,58,60,66,68,70,70,74,78,80,82,84,86,90},new int[]{-98,-88,-82,-82,-76,-76,-74,-70,-70,-68,-66,-64,-62,-58,-56,-52,-40,-38,-38,-38,-38,-36,-30,-26,-26,-12,-2,4,6,16,20,24,26,26,28,34,44,50,60,68,72,74,78,84,84,88,90,90},new int[]{-98,-98,-96,-94,-88,-88,-86,-82,-66,-64,-62,-62,-40,-38,-34,-20,-14,-12,-10,-8,0,6,10,10,12,18,22,26,26,28,32,36,40,44,44,46,64,68,70,72,74,78,80,82,82,82,92,96},new int[]{-94,-94,-92,-88,-88,-84,-82,-78,-78,-76,-72,-64,-60,-56,-54,-54,-50,-48,-46,-42,-32,-28,-28,-24,-22,-22,-16,-14,-12,-12,4,10,16,16,16,28,30,40,48,56,62,64,68,76,88,90,92,98},new int[]{-94,-90,-88,-80,-76,-76,-76,-76,-72,-72,-68,-68,-68,-68,-66,-64,-62,-62,-54,-52,-46,-44,-36,-34,-20,-20,-16,-16,-10,-8,0,4,22,24,28,36,38,44,50,52,60,64,68,72,76,84,86,88},new int[]{-98,-98,-96,-94,-92,-80,-74,-72,-68,-68,-66,-64,-64,-62,-54,-52,-52,-28,-28,-28,-20,-10,2,6,6,14,16,16,24,28,28,32,32,36,38,44,44,46,50,58,64,68,78,86,90,90,96,98},new int[]{-96,-92,-80,-78,-68,-56,-54,-54,-44,-44,-36,-34,-34,-32,-30,-26,-22,-12,-8,-2,-2,-2,6,8,8,20,20,24,28,32,36,36,38,40,42,44,44,46,48,52,54,56,60,68,70,76,80,86},new int[]{-96,-86,-82,-82,-78,-76,-74,-68,-62,-54,-50,-48,-40,-38,-36,-34,-32,-26,-14,-12,-12,-6,-4,0,8,10,14,20,20,26,28,40,44,46,48,56,58,60,62,66,68,76,78,86,88,88,90,94},new int[]{-98,-96,-86,-86,-84,-76,-76,-72,-72,-70,-64,-62,-58,-58,-54,-48,-46,-42,-32,-28,-28,-26,-24,-20,-14,0,0,0,0,2,10,14,18,48,50,50,52,56,58,60,62,68,76,82,86,88,94,94},new int[]{-96,-92,-86,-82,-82,-80,-80,-78,-76,-74,-72,-62,-62,-56,-56,-50,-40,-30,-28,-18,-18,-12,-10,0,4,10,12,12,16,18,18,18,22,30,34,42,68,74,82,86,86,90,90,90,92,92,94,94},new int[]{-92,-90,-88,-82,-82,-80,-74,-70,-66,-60,-58,-54,-48,-44,-40,-38,-32,-30,-26,-4,2,2,10,16,18,26,30,32,32,54,56,56,58,60,62,64,64,66,72,76,78,78,78,80,80,82,86,92},new int[]{-82,-82,-76,-74,-70,-66,-62,-62,-56,-54,-46,-46,-42,-36,-32,-30,-30,-26,-24,-22,-20,-10,-8,4,8,14,20,22,26,36,38,46,46,46,50,50,52,54,54,58,68,76,80,84,86,86,90,98},new int[]{-98,-92,-92,-82,-78,-76,-62,-56,-54,-50,-50,-48,-48,-46,-44,-44,-34,-26,-24,-20,-16,-2,16,16,22,28,28,30,36,36,38,38,40,42,42,44,50,56,56,60,62,74,78,90,92,94,96,98},new int[]{-96,-92,-92,-86,-84,-74,-56,-54,-50,-42,-38,-36,-30,-28,-24,-22,-14,-10,-10,-10,-8,-8,0,4,8,8,10,18,24,24,30,30,34,38,38,42,44,44,50,54,54,66,72,74,78,84,92,98},new int[]{-90,-88,-80,-70,-56,-56,-54,-54,-50,-44,-44,-42,-40,-38,-26,-22,-22,-16,-14,-8,0,2,18,20,34,36,36,40,42,44,46,46,48,54,54,54,56,68,68,72,72,72,76,84,86,90,92,96},new int[]{-98,-96,-94,-86,-82,-76,-76,-70,-70,-68,-64,-48,-38,-38,-36,-28,-28,-26,-20,-18,-6,-2,-2,2,4,6,8,8,12,12,14,16,26,30,30,34,44,44,48,48,56,72,80,80,84,84,92,94},new int[]{-90,-88,-84,-74,-74,-72,-70,-70,-68,-68,-64,-56,-52,-50,-40,-38,-32,-28,-22,-14,-14,-12,-8,-4,-2,8,10,14,14,18,22,24,30,32,36,40,58,62,64,64,64,68,72,74,82,94,98,98},new int[]{-98,-92,-88,-80,-76,-70,-70,-66,-58,-56,-56,-40,-32,-26,-18,-6,-4,-2,0,0,0,2,2,6,18,20,26,32,46,46,48,48,48,52,66,68,68,68,70,70,82,82,84,86,92,96,96,98},new int[]{-98,-96,-92,-92,-92,-82,-72,-68,-66,-62,-46,-44,-44,-42,-38,-34,-32,-26,-26,-16,-12,-12,-10,-6,-6,-2,0,0,4,10,12,12,14,30,36,42,46,54,58,58,66,68,68,70,90,92,96,98},new int[]{-92,-86,-76,-76,-76,-72,-72,-68,-68,-58,-48,-40,-40,-36,-36,-26,-18,-14,-12,-10,-8,-8,2,8,12,16,20,24,26,30,30,34,42,42,46,56,60,62,66,72,78,78,82,82,88,90,92,92},new int[]{-92,-90,-90,-88,-84,-78,-70,-64,-60,-54,-42,-36,-34,-32,-30,-20,-14,-10,-8,-2,0,8,10,10,20,24,28,32,42,42,42,50,54,56,60,60,60,68,68,72,78,78,86,86,92,92,98,98},new int[]{-98,-98,-96,-96,-94,-90,-88,-86,-80,-78,-76,-72,-58,-52,-48,-34,-34,-28,-28,-24,-24,-18,-16,-12,-8,-8,-6,8,10,12,12,12,12,26,30,30,38,52,52,64,68,72,74,80,80,82,88,90},new int[]{-92,-90,-82,-80,-72,-66,-52,-44,-44,-42,-42,-36,-34,-32,-26,-24,-22,-20,-18,-18,-16,-16,-16,-2,2,4,8,10,16,22,24,36,38,40,46,50,56,58,64,66,74,74,84,84,88,92,96,98}}); param0.add(new int[][]{new int[]{0,1,0,0,0,1,0,1,0,0,1,0,1,1,0,1,1,1,1,0,1,1,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0},new int[]{0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1},new int[]{0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,1,1,0,0,0,1},new int[]{1,0,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,1,0,1,0,0,0,0},new int[]{0,0,1,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,1},new int[]{0,0,1,1,1,1,1,0,0,1,1,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0},new int[]{0,1,1,0,0,1,1,1,0,0,1,0,0,0,1,0,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,0,0,0,0,1},new int[]{1,0,0,0,0,1,1,1,1,0,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0},new int[]{1,0,1,0,0,1,0,1,1,1,0,1,0,1,0,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1,1,0,0,1},new int[]{1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,1,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0},new int[]{1,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0},new int[]{1,0,1,1,0,1,1,1,1,0,1,0,1,1,1,0,0,0,0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,1,1,0,0},new int[]{0,1,1,0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1,0,0,0,0,1},new int[]{0,0,0,1,1,0,1,1,1,1,1,1,1,0,0,0,1,0,1,1,0,0,0,0,1,0,0,1,1,1,1,1,0,0,1,0,1},new int[]{0,0,0,0,0,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,1,0,1,1},new int[]{0,1,0,0,0,0,1,1,0,1,1,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,1,1,0,0,0,1},new int[]{1,1,1,1,0,1,1,0,0,0,1,0,1,0,1,1,0,1,0,1,1,1,0,1,0,1,1,0,0,1,1,1,1,1,1,0,1},new int[]{0,1,1,0,1,1,0,1,0,1,1,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,1,0,0,0,1,0,0},new int[]{1,1,0,0,1,1,0,0,1,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,0,1,1,0,1,0},new int[]{1,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,0,0,0,1,0,1,0,0,1},new int[]{0,0,1,0,0,0,1,1,1,1,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,1,0,0,0,1,0,1,0,1,1,0,0},new int[]{0,0,0,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,0,1,0,0,0,0,0,0,1,1,0,1,0,1,0,0,0,1},new int[]{0,0,1,1,0,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,1,0,0,0,0,1},new int[]{0,1,0,0,1,1,1,1,0,0,1,0,0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0},new int[]{1,0,1,0,1,0,1,0,1,0,0,1,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,1,0},new int[]{0,1,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1,0,0,1,1,1,1,1,0,1,1,0,0,1,0,1,0,0,0,1,0},new int[]{1,1,1,0,1,0,0,1,1,1,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,1},new int[]{1,1,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,1,0},new int[]{1,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,1,1,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1},new int[]{0,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,0,1,1,1,0,1,0,1,1,0,0,0,0,1,0},new int[]{0,1,1,1,0,0,1,1,1,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,0,0,0,1,0,0,0},new int[]{1,1,1,1,0,0,1,1,0,1,1,1,1,0,1,0,1,1,0,0,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1},new int[]{1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0},new int[]{1,0,0,1,0,1,1,1,0,0,1,0,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,1,0,1},new int[]{0,1,0,1,0,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1},new int[]{1,1,0,1,1,0,0,1,1,1,1,0,0,0,1,0,1,0,1,1,0,0,1,0,1,1,0,0,1,1,1,1,1,1,0,0,0},new int[]{1,1,0,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1,0,0,0}}); param0.add(new int[][]{new int[]{1,3,3,4,4,5,8,11,13,15,16,18,20,21,24,25,25,35,36,37,39,40,40,41,41,42,42,44,44,44,45,47,49,54,61,62,64,64,70,72,82,85,87,92,93,93,94,95},new int[]{1,2,2,3,4,5,5,6,8,8,9,11,15,16,19,20,20,22,22,25,33,36,37,39,40,41,41,44,54,60,62,65,67,68,68,70,72,77,77,78,78,79,85,86,87,88,93,99},new int[]{1,1,1,1,3,5,6,7,7,10,12,13,13,15,17,20,21,21,22,25,31,33,37,40,41,41,46,50,53,54,55,57,61,63,64,65,68,69,76,76,81,81,82,82,84,87,89,90},new int[]{1,1,1,1,4,6,19,19,19,20,21,21,22,22,23,23,25,25,26,26,29,30,34,34,35,37,48,48,50,52,59,60,62,63,64,66,68,68,75,85,88,89,91,92,94,95,97,99},new int[]{2,3,7,12,15,16,18,20,20,23,24,27,29,31,33,36,36,37,38,44,47,52,52,54,55,61,62,62,64,66,66,73,74,75,76,80,81,81,83,83,84,87,87,89,92,92,96,99},new int[]{1,4,4,5,6,8,12,12,14,16,21,24,24,27,29,34,35,39,41,44,44,46,48,50,52,52,53,56,60,62,64,67,72,77,78,80,81,83,84,84,85,88,91,93,93,94,94,95},new int[]{3,3,4,11,11,12,15,15,17,17,18,20,24,24,27,27,29,32,35,37,39,39,41,43,43,44,48,49,53,60,69,70,73,74,75,76,76,84,85,85,85,87,87,89,90,91,93,93},new int[]{1,11,11,12,15,15,16,16,17,17,18,19,20,23,27,27,31,32,32,35,37,39,39,41,43,45,47,49,49,49,56,60,61,64,67,71,73,78,79,79,81,82,83,85,87,89,92,98},new int[]{5,6,9,13,14,16,17,20,20,22,22,23,28,29,29,30,32,33,36,37,45,47,49,49,50,50,52,56,60,62,65,66,69,70,71,77,78,78,80,82,83,86,86,88,88,90,90,99},new int[]{3,11,12,13,14,14,15,19,19,20,26,27,28,31,32,32,32,35,35,39,39,42,43,49,54,55,57,58,59,60,61,62,62,65,65,67,73,74,81,82,83,86,88,88,93,95,95,97},new int[]{1,3,3,5,7,11,17,20,20,21,21,23,24,25,26,26,30,32,35,37,38,39,42,44,47,47,48,49,51,57,57,59,60,61,62,63,66,69,70,73,78,80,84,84,89,92,96,97},new int[]{1,1,2,11,12,13,15,17,19,21,22,24,27,28,28,29,30,34,39,40,40,44,45,48,57,58,58,59,61,63,63,64,66,66,68,69,70,71,74,78,79,82,84,86,89,90,94,97},new int[]{2,3,7,10,10,12,13,13,17,17,19,21,36,47,48,48,51,51,52,55,57,61,61,61,65,70,71,73,74,74,75,75,76,78,79,80,80,85,86,87,87,89,91,94,95,97,97,97},new int[]{1,2,2,8,9,9,9,14,16,17,23,24,27,29,30,30,34,35,36,43,44,44,47,49,50,54,56,57,58,63,67,68,69,70,72,76,77,80,81,84,84,86,88,90,93,96,96,96},new int[]{2,3,3,5,5,7,7,11,18,19,19,20,23,24,27,27,28,30,30,36,38,39,40,48,50,51,53,57,57,66,67,68,73,77,78,79,82,84,85,87,88,89,95,96,97,98,99,99},new int[]{3,8,10,10,12,13,13,15,16,16,17,21,21,22,23,24,26,26,27,29,32,34,35,37,42,42,52,54,61,61,65,65,66,70,73,74,76,79,83,83,85,89,91,93,94,96,97,97},new int[]{3,5,6,7,9,10,13,16,16,19,23,24,24,26,28,29,30,32,33,36,37,37,41,41,41,42,42,44,45,49,50,52,55,57,58,60,61,63,75,77,77,79,80,81,86,89,94,99},new int[]{1,10,13,14,15,17,18,20,21,22,23,25,26,28,32,37,39,44,46,47,47,47,47,50,51,52,55,55,58,61,69,72,73,77,77,78,80,81,82,84,88,91,93,94,95,96,97,98},new int[]{1,5,5,13,13,17,26,28,30,32,34,41,43,44,45,45,46,46,49,52,53,56,57,61,61,62,63,63,63,64,65,67,69,70,73,76,77,80,80,81,82,87,87,88,89,89,93,96},new int[]{5,11,12,12,18,19,19,22,24,26,26,26,30,32,33,35,35,36,38,39,42,44,46,48,52,56,57,58,59,65,65,66,67,67,68,70,73,73,75,76,77,78,80,83,84,88,92,99},new int[]{5,6,9,13,17,20,20,21,22,24,25,26,30,32,33,36,37,38,38,40,44,45,48,53,55,58,58,58,59,61,63,63,63,65,67,72,75,75,75,77,77,77,79,82,88,93,97,97},new int[]{9,13,14,16,17,18,21,22,22,23,24,25,33,37,40,41,42,46,49,49,51,54,57,58,58,60,67,71,73,74,74,75,77,78,80,82,85,85,86,86,86,87,91,92,93,95,97,98},new int[]{1,3,10,11,14,18,18,19,23,24,26,28,33,36,37,42,42,47,47,48,48,52,53,56,57,59,61,63,63,64,65,67,69,71,75,77,78,79,83,83,83,85,86,86,92,96,97,97},new int[]{3,5,6,7,7,9,13,13,18,25,27,28,29,30,32,34,37,43,44,51,52,53,54,59,63,63,64,66,68,70,70,72,72,73,77,78,80,82,83,83,84,85,85,93,95,97,99,99},new int[]{4,6,7,9,9,20,20,22,31,33,34,35,35,38,40,41,42,42,44,46,47,50,52,54,57,58,60,61,62,63,63,64,65,70,72,74,80,81,87,87,88,88,92,92,95,99,99,99},new int[]{3,5,9,10,10,15,18,20,21,21,23,25,28,29,37,38,40,40,40,46,51,53,55,57,59,59,60,67,68,71,72,73,75,76,79,79,81,83,86,87,88,90,90,90,92,95,96,98},new int[]{5,7,8,9,9,12,14,16,18,18,18,24,25,26,28,28,29,30,32,37,38,44,44,45,46,48,51,55,55,56,58,58,62,63,64,67,71,74,76,81,86,87,88,90,90,91,95,97},new int[]{4,5,13,13,16,19,19,20,22,26,27,28,30,30,31,32,33,39,39,41,41,43,45,49,50,51,64,66,67,71,73,75,78,78,79,82,84,86,87,87,88,90,91,91,92,93,96,97},new int[]{2,3,5,11,16,20,21,21,25,29,31,34,36,36,37,37,38,38,44,45,46,54,60,60,61,61,67,67,67,70,71,72,76,77,79,80,83,84,84,87,87,88,90,92,93,98,99,99},new int[]{1,2,5,5,12,13,13,15,18,19,24,25,25,26,28,29,30,33,34,35,35,36,36,37,38,42,44,49,50,53,58,58,58,60,65,67,72,75,77,78,81,84,88,88,90,91,94,97},new int[]{5,5,6,7,8,11,11,13,19,23,25,35,37,40,40,46,47,48,48,49,51,58,60,61,63,65,67,68,71,72,76,77,79,80,84,87,88,88,89,90,92,94,94,96,96,97,97,99},new int[]{1,2,3,3,5,5,13,18,19,23,31,32,34,35,36,38,39,40,42,49,51,53,54,56,62,64,64,64,66,67,67,67,69,72,74,74,80,81,83,83,84,85,91,91,94,95,96,98},new int[]{1,2,5,9,10,11,14,15,16,16,24,27,30,32,35,37,39,39,40,43,48,49,50,54,57,57,58,59,60,63,63,64,64,64,68,70,76,77,80,82,85,87,88,90,91,94,94,97},new int[]{10,14,15,17,17,18,22,22,28,29,29,32,32,34,36,36,38,39,40,42,43,45,45,45,54,54,55,55,59,63,67,68,74,75,75,77,77,79,80,86,86,87,87,87,87,88,93,96},new int[]{2,2,5,5,9,14,17,17,20,22,22,23,25,32,32,32,35,37,37,38,39,40,47,52,55,56,60,62,63,63,63,63,64,69,73,73,74,75,77,79,82,85,88,88,90,92,92,93},new int[]{3,4,4,6,8,10,12,15,16,16,17,20,21,21,24,26,27,28,28,29,30,32,38,44,49,49,50,54,59,59,61,62,64,64,65,70,70,71,72,72,73,74,75,80,83,90,92,92},new int[]{4,5,9,9,13,15,16,16,17,23,25,27,28,29,29,37,37,40,43,45,49,50,51,51,53,55,56,60,61,61,64,67,68,73,74,75,76,77,79,80,85,89,89,89,91,97,97,97},new int[]{2,5,9,10,11,11,11,15,15,16,18,20,21,22,23,24,40,41,47,47,48,48,49,51,53,53,54,55,61,63,65,68,70,73,74,74,77,78,79,80,82,83,85,85,86,87,98,99},new int[]{1,12,13,14,16,17,18,19,20,21,23,23,27,27,30,34,36,36,38,42,43,43,44,44,48,49,53,54,55,61,62,66,67,72,72,73,73,77,78,78,86,88,89,92,93,98,98,99},new int[]{1,2,4,6,9,13,13,13,17,18,20,28,28,30,32,33,37,38,42,42,44,47,50,52,53,54,56,57,59,60,66,68,70,71,72,74,76,77,79,83,83,84,85,90,94,94,97,99},new int[]{1,1,9,9,10,10,11,12,12,15,21,22,24,24,25,26,26,27,30,31,34,35,40,41,43,47,47,53,53,53,57,60,61,61,64,66,68,71,71,79,82,82,84,88,88,90,96,99},new int[]{4,4,6,6,6,6,8,9,11,11,14,16,21,25,29,37,38,40,44,45,50,51,51,53,53,56,57,58,59,59,63,69,71,72,74,76,79,80,82,83,87,93,94,96,98,98,99,99},new int[]{2,2,5,9,10,12,13,13,13,13,19,22,27,32,33,34,34,38,41,45,46,47,48,50,51,51,52,54,54,57,57,60,61,74,76,76,77,79,81,83,85,92,93,95,96,97,99,99},new int[]{4,4,4,6,7,9,14,15,16,18,19,23,27,37,38,39,40,41,41,44,45,51,52,53,54,54,56,57,58,59,60,63,65,65,69,79,85,85,88,89,90,90,93,94,95,95,95,99},new int[]{6,6,7,9,10,10,11,15,15,16,16,17,19,20,24,28,30,31,31,33,35,37,38,40,40,43,44,44,45,46,48,58,59,62,72,73,74,80,82,82,83,85,88,90,91,91,91,96},new int[]{2,2,2,2,3,4,5,12,12,15,23,23,24,24,29,35,36,38,40,41,47,47,48,49,51,54,56,57,60,62,63,64,70,75,75,76,77,80,82,83,87,90,91,91,92,93,94,94},new int[]{3,4,4,7,8,9,11,12,15,19,21,22,23,24,28,28,31,37,37,37,39,48,52,52,55,55,55,57,61,66,72,75,76,77,79,83,84,84,84,88,90,92,93,94,98,98,98,99},new int[]{2,5,7,11,13,15,27,29,29,31,35,38,41,42,44,44,46,47,49,52,52,53,53,53,54,54,55,56,58,60,61,61,63,69,72,72,77,77,79,80,84,84,86,87,90,92,92,93}}); param0.add(new int[][]{new int[]{28,84,-76,-76,-28,-42,-78,6,40,70,48,92,-6,-34,62,34,-14,-64},new int[]{48,6,-22,44,-32,-26,-18,94,-2,-80,-20,-64,-50,-18,-28,-96,66,48},new int[]{-2,34,6,-62,-48,8,2,-50,-66,48,22,-8,10,0,50,-78,-76,-20},new int[]{-4,12,-84,76,-72,74,12,8,-66,-10,-90,-94,-82,68,-60,66,-58,60},new int[]{-34,-90,-52,26,58,-48,78,84,-34,-64,-64,-24,-34,-46,-2,0,-70,54},new int[]{4,96,36,98,-62,90,-50,52,52,-50,-34,20,-26,84,-14,-82,-72,-94},new int[]{38,12,-48,6,-18,64,-58,-22,60,-54,86,48,16,38,50,-42,24,6},new int[]{-10,-46,-32,-72,-18,48,20,-16,2,50,-78,-30,-62,76,30,52,22,-6},new int[]{-72,34,4,-36,60,-80,-66,-20,36,26,-70,94,-22,14,-80,42,94,-66},new int[]{52,-66,-68,56,-94,2,88,-8,10,98,-48,52,-38,62,44,-62,80,36},new int[]{-70,16,56,-40,-4,12,-16,-52,4,-14,-32,20,66,-94,36,-78,-74,0},new int[]{64,-62,-12,-34,-24,-94,98,30,-30,-28,-24,-22,-50,28,-74,36,40,50},new int[]{-98,44,8,96,-82,-28,-26,18,-58,-60,-98,98,18,-44,42,12,-82,30},new int[]{-28,96,-32,62,-36,32,-50,2,26,80,-10,-48,-58,64,86,2,-52,84},new int[]{-76,-78,-46,-54,-34,60,84,84,-24,10,40,-16,-42,-32,14,-94,-88,-4},new int[]{28,-74,-28,58,40,-34,52,14,10,-74,94,2,84,6,-28,-90,-50,62},new int[]{-26,-62,-30,-32,8,-8,-88,66,-98,42,-32,12,66,94,-48,-16,82,-24},new int[]{-48,98,18,68,-52,-58,20,80,-60,-88,34,-80,-76,94,-56,24,22,60}}); param0.add(new int[][]{new int[]{0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1},new int[]{0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1},new int[]{0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1},new int[]{0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1}}); param0.add(new int[][]{new int[]{93,9,33,88,35,75,39,77,87,25},new int[]{80,56,48,85,10,41,83,99,59,28},new int[]{41,66,51,62,30,40,40,69,62,15},new int[]{3,24,41,63,48,61,48,47,56,76},new int[]{8,78,18,84,23,69,65,46,66,80},new int[]{69,22,65,12,19,22,55,62,51,48},new int[]{17,13,28,67,5,60,15,81,44,46},new int[]{29,68,96,49,43,68,77,20,18,64},new int[]{49,42,12,89,94,79,36,8,28,86},new int[]{60,49,38,80,58,5,46,98,75,2}}); List param1 = new ArrayList<>(); param1.add(29); param1.add(9); param1.add(4); param1.add(3); param1.add(28); param1.add(26); param1.add(44); param1.add(9); param1.add(5); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , N ) : dp = [ [ 0 for i in range ( N ) ] for j in range ( N ) ] dp [ 0 ] [ 0 ] = mat [ 0 ] [ 0 ] for i in range ( 1 , N ) : dp [ i ] [ 0 ] = mat [ i ] [ 0 ] + dp [ i - 1 ] [ 0 ] for i in range ( 1 , N ) : for j in range ( 1 , min ( i + 1 , N ) ) : dp [ i ] [ j ] = mat [ i ] [ j ] + \ max ( dp [ i - 1 ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) result = 0 for i in range ( N ) : if ( result < dp [ N - 1 ] [ i ] ) : result = dp [ N - 1 ] [ i ] return result ",,," if __name__ == '__main__': param = [ ([[1, 3, 17, 22, 24, 29, 36, 38, 41, 42, 44, 44, 47, 48, 49, 51, 52, 54, 64, 69, 70, 77, 79, 82, 86, 86, 87, 88, 97, 99], [5, 6, 17, 21, 27, 27, 37, 39, 47, 48, 48, 52, 53, 54, 57, 59, 61, 63, 68, 72, 75, 77, 78, 81, 88, 89, 91, 95, 95, 97], [2, 8, 10, 16, 17, 18, 18, 18, 20, 27, 33, 35, 36, 42, 48, 51, 56, 66, 72, 72, 75, 76, 76, 76, 84, 85, 91, 94, 96, 98], [1, 2, 4, 11, 12, 12, 14, 21, 24, 26, 30, 33, 37, 42, 43, 47, 54, 56, 62, 64, 67, 68, 69, 71, 72, 73, 86, 86, 90, 93], [1, 1, 3, 7, 9, 10, 11, 12, 14, 14, 15, 17, 21, 25, 26, 40, 45, 46, 46, 48, 49, 54, 56, 60, 64, 68, 68, 73, 93, 93], [8, 11, 12, 13, 13, 15, 19, 20, 24, 27, 29, 31, 32, 33, 34, 37, 39, 42, 45, 50, 51, 61, 65, 68, 75, 81, 84, 85, 87, 94], [12, 16, 17, 24, 34, 34, 35, 40, 43, 48, 50, 51, 53, 55, 60, 60, 62, 66, 68, 70, 71, 73, 77, 83, 84, 86, 88, 95, 96, 97], [1, 5, 7, 18, 18, 22, 32, 36, 38, 38, 40, 43, 46, 49, 50, 54, 58, 61, 71, 74, 78, 78, 79, 82, 86, 87, 87, 88, 90, 95], [4, 11, 22, 26, 28, 35, 35, 37, 39, 42, 45, 46, 51, 57, 60, 61, 62, 63, 65, 65, 79, 79, 79, 82, 83, 87, 89, 90, 91, 98], [6, 7, 7, 8, 9, 11, 13, 16, 18, 23, 29, 37, 38, 41, 44, 46, 50, 50, 51, 56, 58, 67, 71, 74, 77, 79, 80, 90, 91, 97], [3, 7, 10, 15, 19, 20, 22, 28, 28, 32, 33, 36, 36, 38, 41, 49, 51, 54, 63, 66, 66, 70, 72, 79, 87, 88, 89, 92, 93, 98], [3, 8, 10, 14, 21, 25, 33, 35, 37, 37, 43, 44, 45, 50, 59, 62, 63, 75, 79, 79, 79, 84, 85, 86, 87, 87, 88, 90, 91, 96], [2, 4, 7, 12, 13, 18, 23, 23, 28, 29, 32, 34, 37, 37, 37, 38, 41, 44, 45, 47, 48, 49, 59, 64, 72, 75, 87, 92, 93, 98], [2, 4, 5, 5, 11, 14, 18, 23, 24, 27, 32, 35, 35, 37, 39, 40, 45, 48, 49, 52, 60, 66, 68, 71, 72, 74, 78, 81, 91, 92], [4, 4, 4, 6, 11, 18, 20, 23, 24, 29, 32, 33, 37, 40, 42, 47, 51, 52, 58, 59, 62, 67, 68, 75, 77, 78, 80, 85, 89, 95], [5, 5, 19, 21, 22, 23, 29, 30, 32, 39, 42, 42, 44, 44, 45, 46, 52, 55, 59, 63, 65, 76, 78, 80, 81, 82, 84, 93, 94, 97], [3, 4, 6, 8, 10, 15, 15, 17, 27, 28, 34, 36, 39, 42, 53, 54, 59, 63, 65, 66, 70, 71, 72, 80, 80, 91, 92, 94, 95, 99], [1, 7, 12, 13, 16, 25, 32, 32, 36, 46, 46, 49, 52, 55, 61, 61, 67, 68, 69, 72, 74, 76, 77, 78, 79, 81, 85, 90, 90, 92], [2, 12, 12, 13, 18, 20, 25, 28, 31, 31, 34, 36, 38, 39, 42, 43, 44, 47, 54, 60, 75, 76, 77, 80, 82, 83, 86, 90, 91, 91], [3, 8, 9, 11, 12, 14, 14, 14, 19, 25, 27, 29, 43, 45, 48, 50, 50, 56, 58, 61, 63, 65, 68, 71, 73, 81, 83, 83, 86, 93], [11, 15, 15, 15, 15, 18, 28, 29, 33, 33, 36, 43, 44, 48, 50, 50, 53, 55, 59, 59, 60, 61, 62, 63, 75, 78, 81, 82, 87, 94], [4, 7, 8, 10, 11, 12, 19, 24, 31, 36, 36, 37, 40, 41, 46, 48, 49, 51, 57, 62, 73, 75, 78, 81, 82, 86, 86, 91, 97, 97], [5, 5, 7, 8, 10, 14, 15, 17, 19, 21, 22, 23, 31, 34, 36, 43, 46, 58, 60, 72, 72, 75, 77, 81, 83, 84, 86, 91, 96, 98], [6, 10, 13, 15, 22, 27, 28, 29, 30, 31, 32, 35, 35, 36, 37, 39, 39, 43, 44, 47, 55, 68, 68, 69, 77, 83, 94, 94, 98, 99], [4, 4, 5, 6, 6, 10, 18, 27, 28, 29, 31, 33, 34, 41, 43, 44, 54, 56, 63, 74, 76, 77, 80, 80, 83, 89, 89, 90, 98, 99], [2, 7, 15, 19, 23, 23, 36, 41, 44, 46, 47, 49, 53, 58, 58, 60, 60, 66, 70, 73, 76, 77, 78, 80, 80, 88, 88, 91, 93, 94], [3, 3, 9, 9, 10, 13, 15, 19, 20, 23, 25, 33, 36, 37, 47, 54, 58, 60, 60, 65, 71, 73, 81, 88, 89, 90, 92, 94, 94, 96], [6, 7, 11, 19, 22, 27, 27, 31, 31, 33, 34, 44, 46, 47, 47, 48, 49, 53, 53, 56, 60, 60, 70, 72, 79, 80, 86, 93, 94, 96], [2, 7, 7, 7, 8, 10, 13, 15, 17, 18, 27, 27, 30, 33, 33, 34, 37, 41, 43, 47, 55, 55, 59, 71, 71, 75, 78, 78, 84, 85], [5, 6, 7, 7, 14, 21, 24, 26, 29, 31, 32, 34, 40, 42, 43, 45, 46, 53, 57, 58, 67, 73, 74, 77, 81, 85, 88, 91, 91, 92]],29,), ([[62, 44, 46, 46, -20, -40, 24, 42, -66, -90, 62, -98, 60], [62, 88, -38, -30, 44, -40, 70, -70, 96, 12, 20, -46, -96], [48, 28, -90, 82, 36, -74, 62, 70, -54, 94, 0, 58, 56], [46, -26, -40, 86, -54, -32, 28, 10, 42, -82, -92, 32, 82], [-34, -36, -12, -26, 82, 84, 34, 20, 18, -28, -2, 2, -84], [0, -18, -24, 72, 56, 58, 10, 36, -64, 30, 28, -76, -18], [-16, 20, 0, 62, 66, -28, -4, 42, 46, -84, -50, -86, -84], [76, 62, 52, -38, -76, 14, 32, -76, -46, -8, -86, 22, 16], [16, -74, 6, 30, -2, -30, 88, 90, -66, 44, 34, -80, -32], [72, -92, 92, -42, -8, 50, -8, 54, 18, 22, 36, 32, -32], [72, -90, -82, -60, -58, -66, -76, 84, 64, 34, -90, 20, 6], [4, 56, -4, 80, -62, -66, 8, 36, -30, 76, -18, -74, -34], [-70, 26, -70, -38, -44, -80, 14, 42, -34, -86, -90, 80, 60]],9,), ([[0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1, 1]],4,), ([[89, 8, 34, 49, 96], [58, 75, 47, 25, 3], [45, 52, 96, 99, 96], [34, 69, 92, 92, 8], [27, 80, 63, 82, 25]],3,), ([[-98, -94, -92, -86, -86, -86, -84, -78, -76, -70, -68, -66, -64, -58, -56, -52, -42, -40, -38, -38, -36, -32, -30, -24, -20, -12, -8, 4, 4, 6, 8, 12, 18, 22, 26, 30, 32, 56, 58, 72, 76, 78, 80, 82, 88, 94, 96, 98], [-94, -94, -92, -84, -84, -82, -80, -80, -80, -78, -78, -76, -74, -68, -64, -64, -58, -54, -48, -46, -40, -38, -36, -30, -22, -22, -12, -12, -6, -2, 2, 4, 6, 22, 22, 22, 24, 24, 24, 24, 26, 42, 44, 50, 52, 54, 66, 80], [-98, -92, -92, -84, -80, -76, -76, -70, -64, -60, -60, -52, -48, -48, -46, -46, -36, -32, -30, -24, -22, -16, -14, -8, -8, -4, -2, 0, 2, 2, 2, 8, 10, 12, 22, 32, 38, 38, 40, 48, 64, 68, 76, 78, 78, 86, 96, 96], [-98, -96, -88, -86, -78, -78, -70, -68, -62, -60, -58, -42, -38, -38, -38, -36, -36, -32, -28, -26, -24, -12, -10, -4, 2, 12, 12, 18, 26, 32, 34, 36, 38, 44, 44, 50, 52, 54, 54, 56, 56, 58, 70, 74, 76, 82, 86, 90], [-98, -96, -96, -94, -90, -90, -90, -86, -82, -78, -76, -74, -72, -68, -66, -60, -52, -46, -44, -44, -38, -38, -34, -32, -22, -20, -18, -14, 8, 8, 12, 12, 12, 16, 20, 38, 40, 44, 52, 76, 78, 80, 82, 86, 90, 90, 96, 98], [-88, -84, -84, -80, -78, -70, -68, -66, -62, -62, -54, -52, -48, -42, -42, -40, -32, -30, -26, -26, -24, -24, -14, -6, -4, -2, -2, 4, 4, 8, 22, 24, 40, 42, 52, 52, 56, 56, 58, 64, 72, 72, 74, 74, 86, 92, 96, 98], [-98, -98, -92, -82, -76, -72, -68, -66, -64, -62, -56, -50, -48, -46, -46, -40, -40, -40, -38, -28, -28, -24, -22, -20, -20, -10, -6, 4, 6, 10, 12, 26, 32, 38, 38, 40, 42, 56, 60, 64, 64, 72, 72, 76, 84, 90, 94, 98], [-98, -86, -72, -72, -66, -66, -64, -58, -56, -54, -54, -50, -44, -44, -36, -32, -30, -28, -26, -18, -14, -6, -4, 6, 6, 10, 10, 14, 22, 28, 38, 40, 46, 46, 50, 52, 54, 56, 60, 68, 68, 72, 76, 90, 90, 92, 92, 98], [-90, -86, -86, -84, -76, -74, -70, -66, -58, -58, -54, -50, -48, -44, -38, -38, -36, -34, -30, -22, -22, -8, -6, 4, 6, 6, 6, 8, 10, 24, 24, 28, 32, 32, 32, 36, 44, 48, 48, 50, 52, 64, 70, 74, 76, 92, 94, 96], [-96, -94, -84, -76, -76, -70, -68, -66, -56, -50, -50, -48, -46, -42, -42, -40, -40, -38, -38, -36, -36, -34, -30, -24, -22, -6, -4, -2, 2, 4, 10, 12, 16, 24, 28, 32, 38, 46, 50, 56, 56, 62, 64, 66, 74, 74, 98, 98], [-98, -96, -92, -88, -88, -84, -82, -78, -68, -66, -54, -52, -52, -50, -44, -40, -40, -38, -34, -34, -30, -26, -26, -24, -18, -14, -10, 4, 6, 6, 16, 20, 24, 26, 26, 32, 36, 38, 56, 66, 70, 78, 78, 84, 86, 88, 88, 90], [-94, -90, -86, -86, -86, -86, -84, -82, -78, -78, -76, -72, -68, -64, -64, -62, -46, -42, -42, -28, -26, -18, -16, -10, -8, -2, 0, 10, 10, 12, 18, 18, 26, 26, 32, 34, 34, 40, 50, 54, 56, 58, 62, 66, 66, 82, 84, 94], [-98, -94, -88, -86, -84, -80, -80, -78, -78, -74, -72, -72, -70, -70, -68, -66, -66, -64, -50, -44, -28, -24, -16, -6, -4, 0, 2, 8, 12, 22, 26, 32, 38, 38, 50, 54, 58, 58, 64, 64, 66, 70, 78, 86, 88, 90, 96, 98], [-96, -94, -90, -82, -78, -76, -76, -72, -64, -62, -54, -52, -50, -46, -44, -36, -30, -28, -28, -28, -22, -14, -12, 0, 0, 2, 6, 6, 10, 18, 22, 22, 24, 28, 28, 30, 34, 36, 36, 42, 46, 48, 54, 66, 72, 76, 86, 96], [-98, -96, -92, -92, -90, -88, -86, -82, -78, -70, -68, -66, -60, -58, -48, -48, -46, -30, -26, -22, -20, -16, -12, -8, -4, -4, 4, 16, 22, 32, 34, 34, 36, 36, 40, 52, 60, 62, 64, 66, 66, 74, 74, 78, 82, 82, 86, 94], [-92, -90, -88, -84, -82, -80, -78, -76, -74, -60, -56, -48, -48, -48, -48, -42, -38, -38, -30, -28, -28, -26, -12, -12, -10, -10, -2, 14, 16, 22, 26, 34, 42, 44, 52, 54, 56, 58, 58, 60, 62, 66, 70, 82, 84, 90, 94, 96], [-96, -92, -92, -84, -80, -76, -74, -74, -72, -70, -66, -66, -62, -60, -58, -56, -56, -50, -36, -34, -26, -10, 2, 2, 10, 10, 10, 10, 12, 18, 22, 22, 34, 34, 40, 60, 62, 62, 68, 72, 76, 78, 82, 82, 82, 82, 94, 96], [-96, -96, -88, -84, -78, -72, -68, -62, -56, -56, -52, -38, -32, -24, -20, -18, -18, -16, -10, -6, 8, 8, 12, 18, 24, 24, 26, 28, 30, 30, 32, 32, 56, 62, 64, 66, 66, 72, 74, 74, 78, 84, 84, 86, 88, 92, 92, 98], [-92, -86, -78, -68, -68, -68, -64, -58, -56, -48, -44, -38, -36, -34, -26, -22, -20, -18, -8, -6, 0, 2, 4, 12, 12, 18, 20, 22, 30, 32, 36, 38, 42, 44, 46, 50, 50, 52, 56, 58, 62, 64, 68, 70, 70, 82, 90, 98], [-94, -92, -92, -90, -88, -84, -80, -76, -74, -72, -72, -68, -62, -62, -56, -54, -50, -44, -42, -42, -30, -20, -16, -6, -6, 12, 14, 16, 18, 30, 30, 40, 42, 44, 54, 58, 58, 68, 74, 74, 80, 84, 84, 86, 88, 94, 96, 96], [-90, -86, -84, -84, -78, -78, -70, -70, -64, -56, -52, -50, -48, -48, -48, -46, -42, -40, -40, -30, -30, -28, -24, -22, -18, -16, -14, -6, -2, 4, 10, 12, 14, 14, 20, 26, 32, 44, 58, 64, 68, 68, 74, 76, 76, 82, 86, 88], [-98, -84, -80, -80, -78, -78, -78, -76, -68, -62, -56, -50, -34, -30, -30, -12, -8, -4, 2, 8, 10, 12, 14, 22, 24, 26, 36, 38, 38, 44, 46, 48, 56, 58, 62, 64, 64, 66, 66, 70, 70, 74, 78, 82, 88, 90, 94, 96], [-96, -96, -96, -96, -94, -94, -90, -86, -84, -80, -78, -74, -64, -60, -56, -54, -42, -38, -38, -38, -36, -34, -18, -16, -14, -14, -10, -10, -10, -6, -4, 8, 14, 20, 32, 42, 44, 48, 54, 54, 56, 70, 70, 72, 74, 80, 84, 94], [-96, -94, -86, -84, -78, -76, -70, -66, -62, -60, -56, -56, -54, -54, -52, -52, -50, -46, -46, -34, -32, -32, -28, -16, -12, -6, 0, 16, 18, 18, 20, 20, 28, 34, 38, 40, 42, 42, 52, 56, 62, 66, 66, 70, 82, 84, 88, 98], [-86, -84, -80, -78, -62, -60, -58, -56, -54, -52, -48, -44, -40, -38, -38, -26, -26, -24, -24, -18, -10, -6, 2, 8, 12, 16, 22, 26, 32, 36, 42, 44, 46, 48, 52, 52, 52, 62, 66, 70, 78, 78, 78, 80, 84, 90, 92, 92], [-98, -96, -88, -86, -82, -78, -78, -72, -72, -70, -64, -64, -60, -58, -54, -52, -46, -42, -30, -18, -14, -2, 2, 2, 6, 12, 20, 24, 24, 28, 32, 38, 38, 48, 54, 58, 60, 66, 68, 70, 70, 74, 78, 80, 82, 84, 86, 90], [-98, -88, -82, -82, -76, -76, -74, -70, -70, -68, -66, -64, -62, -58, -56, -52, -40, -38, -38, -38, -38, -36, -30, -26, -26, -12, -2, 4, 6, 16, 20, 24, 26, 26, 28, 34, 44, 50, 60, 68, 72, 74, 78, 84, 84, 88, 90, 90], [-98, -98, -96, -94, -88, -88, -86, -82, -66, -64, -62, -62, -40, -38, -34, -20, -14, -12, -10, -8, 0, 6, 10, 10, 12, 18, 22, 26, 26, 28, 32, 36, 40, 44, 44, 46, 64, 68, 70, 72, 74, 78, 80, 82, 82, 82, 92, 96], [-94, -94, -92, -88, -88, -84, -82, -78, -78, -76, -72, -64, -60, -56, -54, -54, -50, -48, -46, -42, -32, -28, -28, -24, -22, -22, -16, -14, -12, -12, 4, 10, 16, 16, 16, 28, 30, 40, 48, 56, 62, 64, 68, 76, 88, 90, 92, 98], [-94, -90, -88, -80, -76, -76, -76, -76, -72, -72, -68, -68, -68, -68, -66, -64, -62, -62, -54, -52, -46, -44, -36, -34, -20, -20, -16, -16, -10, -8, 0, 4, 22, 24, 28, 36, 38, 44, 50, 52, 60, 64, 68, 72, 76, 84, 86, 88], [-98, -98, -96, -94, -92, -80, -74, -72, -68, -68, -66, -64, -64, -62, -54, -52, -52, -28, -28, -28, -20, -10, 2, 6, 6, 14, 16, 16, 24, 28, 28, 32, 32, 36, 38, 44, 44, 46, 50, 58, 64, 68, 78, 86, 90, 90, 96, 98], [-96, -92, -80, -78, -68, -56, -54, -54, -44, -44, -36, -34, -34, -32, -30, -26, -22, -12, -8, -2, -2, -2, 6, 8, 8, 20, 20, 24, 28, 32, 36, 36, 38, 40, 42, 44, 44, 46, 48, 52, 54, 56, 60, 68, 70, 76, 80, 86], [-96, -86, -82, -82, -78, -76, -74, -68, -62, -54, -50, -48, -40, -38, -36, -34, -32, -26, -14, -12, -12, -6, -4, 0, 8, 10, 14, 20, 20, 26, 28, 40, 44, 46, 48, 56, 58, 60, 62, 66, 68, 76, 78, 86, 88, 88, 90, 94], [-98, -96, -86, -86, -84, -76, -76, -72, -72, -70, -64, -62, -58, -58, -54, -48, -46, -42, -32, -28, -28, -26, -24, -20, -14, 0, 0, 0, 0, 2, 10, 14, 18, 48, 50, 50, 52, 56, 58, 60, 62, 68, 76, 82, 86, 88, 94, 94], [-96, -92, -86, -82, -82, -80, -80, -78, -76, -74, -72, -62, -62, -56, -56, -50, -40, -30, -28, -18, -18, -12, -10, 0, 4, 10, 12, 12, 16, 18, 18, 18, 22, 30, 34, 42, 68, 74, 82, 86, 86, 90, 90, 90, 92, 92, 94, 94], [-92, -90, -88, -82, -82, -80, -74, -70, -66, -60, -58, -54, -48, -44, -40, -38, -32, -30, -26, -4, 2, 2, 10, 16, 18, 26, 30, 32, 32, 54, 56, 56, 58, 60, 62, 64, 64, 66, 72, 76, 78, 78, 78, 80, 80, 82, 86, 92], [-82, -82, -76, -74, -70, -66, -62, -62, -56, -54, -46, -46, -42, -36, -32, -30, -30, -26, -24, -22, -20, -10, -8, 4, 8, 14, 20, 22, 26, 36, 38, 46, 46, 46, 50, 50, 52, 54, 54, 58, 68, 76, 80, 84, 86, 86, 90, 98], [-98, -92, -92, -82, -78, -76, -62, -56, -54, -50, -50, -48, -48, -46, -44, -44, -34, -26, -24, -20, -16, -2, 16, 16, 22, 28, 28, 30, 36, 36, 38, 38, 40, 42, 42, 44, 50, 56, 56, 60, 62, 74, 78, 90, 92, 94, 96, 98], [-96, -92, -92, -86, -84, -74, -56, -54, -50, -42, -38, -36, -30, -28, -24, -22, -14, -10, -10, -10, -8, -8, 0, 4, 8, 8, 10, 18, 24, 24, 30, 30, 34, 38, 38, 42, 44, 44, 50, 54, 54, 66, 72, 74, 78, 84, 92, 98], [-90, -88, -80, -70, -56, -56, -54, -54, -50, -44, -44, -42, -40, -38, -26, -22, -22, -16, -14, -8, 0, 2, 18, 20, 34, 36, 36, 40, 42, 44, 46, 46, 48, 54, 54, 54, 56, 68, 68, 72, 72, 72, 76, 84, 86, 90, 92, 96], [-98, -96, -94, -86, -82, -76, -76, -70, -70, -68, -64, -48, -38, -38, -36, -28, -28, -26, -20, -18, -6, -2, -2, 2, 4, 6, 8, 8, 12, 12, 14, 16, 26, 30, 30, 34, 44, 44, 48, 48, 56, 72, 80, 80, 84, 84, 92, 94], [-90, -88, -84, -74, -74, -72, -70, -70, -68, -68, -64, -56, -52, -50, -40, -38, -32, -28, -22, -14, -14, -12, -8, -4, -2, 8, 10, 14, 14, 18, 22, 24, 30, 32, 36, 40, 58, 62, 64, 64, 64, 68, 72, 74, 82, 94, 98, 98], [-98, -92, -88, -80, -76, -70, -70, -66, -58, -56, -56, -40, -32, -26, -18, -6, -4, -2, 0, 0, 0, 2, 2, 6, 18, 20, 26, 32, 46, 46, 48, 48, 48, 52, 66, 68, 68, 68, 70, 70, 82, 82, 84, 86, 92, 96, 96, 98], [-98, -96, -92, -92, -92, -82, -72, -68, -66, -62, -46, -44, -44, -42, -38, -34, -32, -26, -26, -16, -12, -12, -10, -6, -6, -2, 0, 0, 4, 10, 12, 12, 14, 30, 36, 42, 46, 54, 58, 58, 66, 68, 68, 70, 90, 92, 96, 98], [-92, -86, -76, -76, -76, -72, -72, -68, -68, -58, -48, -40, -40, -36, -36, -26, -18, -14, -12, -10, -8, -8, 2, 8, 12, 16, 20, 24, 26, 30, 30, 34, 42, 42, 46, 56, 60, 62, 66, 72, 78, 78, 82, 82, 88, 90, 92, 92], [-92, -90, -90, -88, -84, -78, -70, -64, -60, -54, -42, -36, -34, -32, -30, -20, -14, -10, -8, -2, 0, 8, 10, 10, 20, 24, 28, 32, 42, 42, 42, 50, 54, 56, 60, 60, 60, 68, 68, 72, 78, 78, 86, 86, 92, 92, 98, 98], [-98, -98, -96, -96, -94, -90, -88, -86, -80, -78, -76, -72, -58, -52, -48, -34, -34, -28, -28, -24, -24, -18, -16, -12, -8, -8, -6, 8, 10, 12, 12, 12, 12, 26, 30, 30, 38, 52, 52, 64, 68, 72, 74, 80, 80, 82, 88, 90], [-92, -90, -82, -80, -72, -66, -52, -44, -44, -42, -42, -36, -34, -32, -26, -24, -22, -20, -18, -18, -16, -16, -16, -2, 2, 4, 8, 10, 16, 22, 24, 36, 38, 40, 46, 50, 56, 58, 64, 66, 74, 74, 84, 84, 88, 92, 96, 98]],28,), ([[0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0], [0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1], [0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1], [1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0]],26,), ([[1, 3, 3, 4, 4, 5, 8, 11, 13, 15, 16, 18, 20, 21, 24, 25, 25, 35, 36, 37, 39, 40, 40, 41, 41, 42, 42, 44, 44, 44, 45, 47, 49, 54, 61, 62, 64, 64, 70, 72, 82, 85, 87, 92, 93, 93, 94, 95], [1, 2, 2, 3, 4, 5, 5, 6, 8, 8, 9, 11, 15, 16, 19, 20, 20, 22, 22, 25, 33, 36, 37, 39, 40, 41, 41, 44, 54, 60, 62, 65, 67, 68, 68, 70, 72, 77, 77, 78, 78, 79, 85, 86, 87, 88, 93, 99], [1, 1, 1, 1, 3, 5, 6, 7, 7, 10, 12, 13, 13, 15, 17, 20, 21, 21, 22, 25, 31, 33, 37, 40, 41, 41, 46, 50, 53, 54, 55, 57, 61, 63, 64, 65, 68, 69, 76, 76, 81, 81, 82, 82, 84, 87, 89, 90], [1, 1, 1, 1, 4, 6, 19, 19, 19, 20, 21, 21, 22, 22, 23, 23, 25, 25, 26, 26, 29, 30, 34, 34, 35, 37, 48, 48, 50, 52, 59, 60, 62, 63, 64, 66, 68, 68, 75, 85, 88, 89, 91, 92, 94, 95, 97, 99], [2, 3, 7, 12, 15, 16, 18, 20, 20, 23, 24, 27, 29, 31, 33, 36, 36, 37, 38, 44, 47, 52, 52, 54, 55, 61, 62, 62, 64, 66, 66, 73, 74, 75, 76, 80, 81, 81, 83, 83, 84, 87, 87, 89, 92, 92, 96, 99], [1, 4, 4, 5, 6, 8, 12, 12, 14, 16, 21, 24, 24, 27, 29, 34, 35, 39, 41, 44, 44, 46, 48, 50, 52, 52, 53, 56, 60, 62, 64, 67, 72, 77, 78, 80, 81, 83, 84, 84, 85, 88, 91, 93, 93, 94, 94, 95], [3, 3, 4, 11, 11, 12, 15, 15, 17, 17, 18, 20, 24, 24, 27, 27, 29, 32, 35, 37, 39, 39, 41, 43, 43, 44, 48, 49, 53, 60, 69, 70, 73, 74, 75, 76, 76, 84, 85, 85, 85, 87, 87, 89, 90, 91, 93, 93], [1, 11, 11, 12, 15, 15, 16, 16, 17, 17, 18, 19, 20, 23, 27, 27, 31, 32, 32, 35, 37, 39, 39, 41, 43, 45, 47, 49, 49, 49, 56, 60, 61, 64, 67, 71, 73, 78, 79, 79, 81, 82, 83, 85, 87, 89, 92, 98], [5, 6, 9, 13, 14, 16, 17, 20, 20, 22, 22, 23, 28, 29, 29, 30, 32, 33, 36, 37, 45, 47, 49, 49, 50, 50, 52, 56, 60, 62, 65, 66, 69, 70, 71, 77, 78, 78, 80, 82, 83, 86, 86, 88, 88, 90, 90, 99], [3, 11, 12, 13, 14, 14, 15, 19, 19, 20, 26, 27, 28, 31, 32, 32, 32, 35, 35, 39, 39, 42, 43, 49, 54, 55, 57, 58, 59, 60, 61, 62, 62, 65, 65, 67, 73, 74, 81, 82, 83, 86, 88, 88, 93, 95, 95, 97], [1, 3, 3, 5, 7, 11, 17, 20, 20, 21, 21, 23, 24, 25, 26, 26, 30, 32, 35, 37, 38, 39, 42, 44, 47, 47, 48, 49, 51, 57, 57, 59, 60, 61, 62, 63, 66, 69, 70, 73, 78, 80, 84, 84, 89, 92, 96, 97], [1, 1, 2, 11, 12, 13, 15, 17, 19, 21, 22, 24, 27, 28, 28, 29, 30, 34, 39, 40, 40, 44, 45, 48, 57, 58, 58, 59, 61, 63, 63, 64, 66, 66, 68, 69, 70, 71, 74, 78, 79, 82, 84, 86, 89, 90, 94, 97], [2, 3, 7, 10, 10, 12, 13, 13, 17, 17, 19, 21, 36, 47, 48, 48, 51, 51, 52, 55, 57, 61, 61, 61, 65, 70, 71, 73, 74, 74, 75, 75, 76, 78, 79, 80, 80, 85, 86, 87, 87, 89, 91, 94, 95, 97, 97, 97], [1, 2, 2, 8, 9, 9, 9, 14, 16, 17, 23, 24, 27, 29, 30, 30, 34, 35, 36, 43, 44, 44, 47, 49, 50, 54, 56, 57, 58, 63, 67, 68, 69, 70, 72, 76, 77, 80, 81, 84, 84, 86, 88, 90, 93, 96, 96, 96], [2, 3, 3, 5, 5, 7, 7, 11, 18, 19, 19, 20, 23, 24, 27, 27, 28, 30, 30, 36, 38, 39, 40, 48, 50, 51, 53, 57, 57, 66, 67, 68, 73, 77, 78, 79, 82, 84, 85, 87, 88, 89, 95, 96, 97, 98, 99, 99], [3, 8, 10, 10, 12, 13, 13, 15, 16, 16, 17, 21, 21, 22, 23, 24, 26, 26, 27, 29, 32, 34, 35, 37, 42, 42, 52, 54, 61, 61, 65, 65, 66, 70, 73, 74, 76, 79, 83, 83, 85, 89, 91, 93, 94, 96, 97, 97], [3, 5, 6, 7, 9, 10, 13, 16, 16, 19, 23, 24, 24, 26, 28, 29, 30, 32, 33, 36, 37, 37, 41, 41, 41, 42, 42, 44, 45, 49, 50, 52, 55, 57, 58, 60, 61, 63, 75, 77, 77, 79, 80, 81, 86, 89, 94, 99], [1, 10, 13, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 28, 32, 37, 39, 44, 46, 47, 47, 47, 47, 50, 51, 52, 55, 55, 58, 61, 69, 72, 73, 77, 77, 78, 80, 81, 82, 84, 88, 91, 93, 94, 95, 96, 97, 98], [1, 5, 5, 13, 13, 17, 26, 28, 30, 32, 34, 41, 43, 44, 45, 45, 46, 46, 49, 52, 53, 56, 57, 61, 61, 62, 63, 63, 63, 64, 65, 67, 69, 70, 73, 76, 77, 80, 80, 81, 82, 87, 87, 88, 89, 89, 93, 96], [5, 11, 12, 12, 18, 19, 19, 22, 24, 26, 26, 26, 30, 32, 33, 35, 35, 36, 38, 39, 42, 44, 46, 48, 52, 56, 57, 58, 59, 65, 65, 66, 67, 67, 68, 70, 73, 73, 75, 76, 77, 78, 80, 83, 84, 88, 92, 99], [5, 6, 9, 13, 17, 20, 20, 21, 22, 24, 25, 26, 30, 32, 33, 36, 37, 38, 38, 40, 44, 45, 48, 53, 55, 58, 58, 58, 59, 61, 63, 63, 63, 65, 67, 72, 75, 75, 75, 77, 77, 77, 79, 82, 88, 93, 97, 97], [9, 13, 14, 16, 17, 18, 21, 22, 22, 23, 24, 25, 33, 37, 40, 41, 42, 46, 49, 49, 51, 54, 57, 58, 58, 60, 67, 71, 73, 74, 74, 75, 77, 78, 80, 82, 85, 85, 86, 86, 86, 87, 91, 92, 93, 95, 97, 98], [1, 3, 10, 11, 14, 18, 18, 19, 23, 24, 26, 28, 33, 36, 37, 42, 42, 47, 47, 48, 48, 52, 53, 56, 57, 59, 61, 63, 63, 64, 65, 67, 69, 71, 75, 77, 78, 79, 83, 83, 83, 85, 86, 86, 92, 96, 97, 97], [3, 5, 6, 7, 7, 9, 13, 13, 18, 25, 27, 28, 29, 30, 32, 34, 37, 43, 44, 51, 52, 53, 54, 59, 63, 63, 64, 66, 68, 70, 70, 72, 72, 73, 77, 78, 80, 82, 83, 83, 84, 85, 85, 93, 95, 97, 99, 99], [4, 6, 7, 9, 9, 20, 20, 22, 31, 33, 34, 35, 35, 38, 40, 41, 42, 42, 44, 46, 47, 50, 52, 54, 57, 58, 60, 61, 62, 63, 63, 64, 65, 70, 72, 74, 80, 81, 87, 87, 88, 88, 92, 92, 95, 99, 99, 99], [3, 5, 9, 10, 10, 15, 18, 20, 21, 21, 23, 25, 28, 29, 37, 38, 40, 40, 40, 46, 51, 53, 55, 57, 59, 59, 60, 67, 68, 71, 72, 73, 75, 76, 79, 79, 81, 83, 86, 87, 88, 90, 90, 90, 92, 95, 96, 98], [5, 7, 8, 9, 9, 12, 14, 16, 18, 18, 18, 24, 25, 26, 28, 28, 29, 30, 32, 37, 38, 44, 44, 45, 46, 48, 51, 55, 55, 56, 58, 58, 62, 63, 64, 67, 71, 74, 76, 81, 86, 87, 88, 90, 90, 91, 95, 97], [4, 5, 13, 13, 16, 19, 19, 20, 22, 26, 27, 28, 30, 30, 31, 32, 33, 39, 39, 41, 41, 43, 45, 49, 50, 51, 64, 66, 67, 71, 73, 75, 78, 78, 79, 82, 84, 86, 87, 87, 88, 90, 91, 91, 92, 93, 96, 97], [2, 3, 5, 11, 16, 20, 21, 21, 25, 29, 31, 34, 36, 36, 37, 37, 38, 38, 44, 45, 46, 54, 60, 60, 61, 61, 67, 67, 67, 70, 71, 72, 76, 77, 79, 80, 83, 84, 84, 87, 87, 88, 90, 92, 93, 98, 99, 99], [1, 2, 5, 5, 12, 13, 13, 15, 18, 19, 24, 25, 25, 26, 28, 29, 30, 33, 34, 35, 35, 36, 36, 37, 38, 42, 44, 49, 50, 53, 58, 58, 58, 60, 65, 67, 72, 75, 77, 78, 81, 84, 88, 88, 90, 91, 94, 97], [5, 5, 6, 7, 8, 11, 11, 13, 19, 23, 25, 35, 37, 40, 40, 46, 47, 48, 48, 49, 51, 58, 60, 61, 63, 65, 67, 68, 71, 72, 76, 77, 79, 80, 84, 87, 88, 88, 89, 90, 92, 94, 94, 96, 96, 97, 97, 99], [1, 2, 3, 3, 5, 5, 13, 18, 19, 23, 31, 32, 34, 35, 36, 38, 39, 40, 42, 49, 51, 53, 54, 56, 62, 64, 64, 64, 66, 67, 67, 67, 69, 72, 74, 74, 80, 81, 83, 83, 84, 85, 91, 91, 94, 95, 96, 98], [1, 2, 5, 9, 10, 11, 14, 15, 16, 16, 24, 27, 30, 32, 35, 37, 39, 39, 40, 43, 48, 49, 50, 54, 57, 57, 58, 59, 60, 63, 63, 64, 64, 64, 68, 70, 76, 77, 80, 82, 85, 87, 88, 90, 91, 94, 94, 97], [10, 14, 15, 17, 17, 18, 22, 22, 28, 29, 29, 32, 32, 34, 36, 36, 38, 39, 40, 42, 43, 45, 45, 45, 54, 54, 55, 55, 59, 63, 67, 68, 74, 75, 75, 77, 77, 79, 80, 86, 86, 87, 87, 87, 87, 88, 93, 96], [2, 2, 5, 5, 9, 14, 17, 17, 20, 22, 22, 23, 25, 32, 32, 32, 35, 37, 37, 38, 39, 40, 47, 52, 55, 56, 60, 62, 63, 63, 63, 63, 64, 69, 73, 73, 74, 75, 77, 79, 82, 85, 88, 88, 90, 92, 92, 93], [3, 4, 4, 6, 8, 10, 12, 15, 16, 16, 17, 20, 21, 21, 24, 26, 27, 28, 28, 29, 30, 32, 38, 44, 49, 49, 50, 54, 59, 59, 61, 62, 64, 64, 65, 70, 70, 71, 72, 72, 73, 74, 75, 80, 83, 90, 92, 92], [4, 5, 9, 9, 13, 15, 16, 16, 17, 23, 25, 27, 28, 29, 29, 37, 37, 40, 43, 45, 49, 50, 51, 51, 53, 55, 56, 60, 61, 61, 64, 67, 68, 73, 74, 75, 76, 77, 79, 80, 85, 89, 89, 89, 91, 97, 97, 97], [2, 5, 9, 10, 11, 11, 11, 15, 15, 16, 18, 20, 21, 22, 23, 24, 40, 41, 47, 47, 48, 48, 49, 51, 53, 53, 54, 55, 61, 63, 65, 68, 70, 73, 74, 74, 77, 78, 79, 80, 82, 83, 85, 85, 86, 87, 98, 99], [1, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 23, 27, 27, 30, 34, 36, 36, 38, 42, 43, 43, 44, 44, 48, 49, 53, 54, 55, 61, 62, 66, 67, 72, 72, 73, 73, 77, 78, 78, 86, 88, 89, 92, 93, 98, 98, 99], [1, 2, 4, 6, 9, 13, 13, 13, 17, 18, 20, 28, 28, 30, 32, 33, 37, 38, 42, 42, 44, 47, 50, 52, 53, 54, 56, 57, 59, 60, 66, 68, 70, 71, 72, 74, 76, 77, 79, 83, 83, 84, 85, 90, 94, 94, 97, 99], [1, 1, 9, 9, 10, 10, 11, 12, 12, 15, 21, 22, 24, 24, 25, 26, 26, 27, 30, 31, 34, 35, 40, 41, 43, 47, 47, 53, 53, 53, 57, 60, 61, 61, 64, 66, 68, 71, 71, 79, 82, 82, 84, 88, 88, 90, 96, 99], [4, 4, 6, 6, 6, 6, 8, 9, 11, 11, 14, 16, 21, 25, 29, 37, 38, 40, 44, 45, 50, 51, 51, 53, 53, 56, 57, 58, 59, 59, 63, 69, 71, 72, 74, 76, 79, 80, 82, 83, 87, 93, 94, 96, 98, 98, 99, 99], [2, 2, 5, 9, 10, 12, 13, 13, 13, 13, 19, 22, 27, 32, 33, 34, 34, 38, 41, 45, 46, 47, 48, 50, 51, 51, 52, 54, 54, 57, 57, 60, 61, 74, 76, 76, 77, 79, 81, 83, 85, 92, 93, 95, 96, 97, 99, 99], [4, 4, 4, 6, 7, 9, 14, 15, 16, 18, 19, 23, 27, 37, 38, 39, 40, 41, 41, 44, 45, 51, 52, 53, 54, 54, 56, 57, 58, 59, 60, 63, 65, 65, 69, 79, 85, 85, 88, 89, 90, 90, 93, 94, 95, 95, 95, 99], [6, 6, 7, 9, 10, 10, 11, 15, 15, 16, 16, 17, 19, 20, 24, 28, 30, 31, 31, 33, 35, 37, 38, 40, 40, 43, 44, 44, 45, 46, 48, 58, 59, 62, 72, 73, 74, 80, 82, 82, 83, 85, 88, 90, 91, 91, 91, 96], [2, 2, 2, 2, 3, 4, 5, 12, 12, 15, 23, 23, 24, 24, 29, 35, 36, 38, 40, 41, 47, 47, 48, 49, 51, 54, 56, 57, 60, 62, 63, 64, 70, 75, 75, 76, 77, 80, 82, 83, 87, 90, 91, 91, 92, 93, 94, 94], [3, 4, 4, 7, 8, 9, 11, 12, 15, 19, 21, 22, 23, 24, 28, 28, 31, 37, 37, 37, 39, 48, 52, 52, 55, 55, 55, 57, 61, 66, 72, 75, 76, 77, 79, 83, 84, 84, 84, 88, 90, 92, 93, 94, 98, 98, 98, 99], [2, 5, 7, 11, 13, 15, 27, 29, 29, 31, 35, 38, 41, 42, 44, 44, 46, 47, 49, 52, 52, 53, 53, 53, 54, 54, 55, 56, 58, 60, 61, 61, 63, 69, 72, 72, 77, 77, 79, 80, 84, 84, 86, 87, 90, 92, 92, 93]],44,), ([[28, 84, -76, -76, -28, -42, -78, 6, 40, 70, 48, 92, -6, -34, 62, 34, -14, -64], [48, 6, -22, 44, -32, -26, -18, 94, -2, -80, -20, -64, -50, -18, -28, -96, 66, 48], [-2, 34, 6, -62, -48, 8, 2, -50, -66, 48, 22, -8, 10, 0, 50, -78, -76, -20], [-4, 12, -84, 76, -72, 74, 12, 8, -66, -10, -90, -94, -82, 68, -60, 66, -58, 60], [-34, -90, -52, 26, 58, -48, 78, 84, -34, -64, -64, -24, -34, -46, -2, 0, -70, 54], [4, 96, 36, 98, -62, 90, -50, 52, 52, -50, -34, 20, -26, 84, -14, -82, -72, -94], [38, 12, -48, 6, -18, 64, -58, -22, 60, -54, 86, 48, 16, 38, 50, -42, 24, 6], [-10, -46, -32, -72, -18, 48, 20, -16, 2, 50, -78, -30, -62, 76, 30, 52, 22, -6], [-72, 34, 4, -36, 60, -80, -66, -20, 36, 26, -70, 94, -22, 14, -80, 42, 94, -66], [52, -66, -68, 56, -94, 2, 88, -8, 10, 98, -48, 52, -38, 62, 44, -62, 80, 36], [-70, 16, 56, -40, -4, 12, -16, -52, 4, -14, -32, 20, 66, -94, 36, -78, -74, 0], [64, -62, -12, -34, -24, -94, 98, 30, -30, -28, -24, -22, -50, 28, -74, 36, 40, 50], [-98, 44, 8, 96, -82, -28, -26, 18, -58, -60, -98, 98, 18, -44, 42, 12, -82, 30], [-28, 96, -32, 62, -36, 32, -50, 2, 26, 80, -10, -48, -58, 64, 86, 2, -52, 84], [-76, -78, -46, -54, -34, 60, 84, 84, -24, 10, 40, -16, -42, -32, 14, -94, -88, -4], [28, -74, -28, 58, 40, -34, 52, 14, 10, -74, 94, 2, 84, 6, -28, -90, -50, 62], [-26, -62, -30, -32, 8, -8, -88, 66, -98, 42, -32, 12, 66, 94, -48, -16, 82, -24], [-48, 98, 18, 68, -52, -58, 20, 80, -60, -88, 34, -80, -76, 94, -56, 24, 22, 60]],9,), ([[0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]],5,), ([[93, 9, 33, 88, 35, 75, 39, 77, 87, 25], [80, 56, 48, 85, 10, 41, 83, 99, 59, 28], [41, 66, 51, 62, 30, 40, 40, 69, 62, 15], [3, 24, 41, 63, 48, 61, 48, 47, 56, 76], [8, 78, 18, 84, 23, 69, 65, 46, 66, 80], [69, 22, 65, 12, 19, 22, 55, 62, 51, 48], [17, 13, 28, 67, 5, 60, 15, 81, 44, 46], [29, 68, 96, 49, 43, 68, 77, 20, 18, 64], [49, 42, 12, 89, 94, 79, 36, 8, 28, 86], [60, 49, 38, 80, 58, 5, 46, 98, 75, 2]],5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP{ static boolean f_gold ( int arr [ ] , int i , int n ) { if ( i > ( n - 2 ) / 2 ) { return true ; } if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr , 2 * i + 1 , n ) && f_gold ( arr , 2 * i + 2 , n ) ) { return true ; } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,2,3,5,24,24,25,25,36,37,37,39,42,44,46,50,51,54,56,60,62,70,71,73,75,80,80,85,86,89,91,95,99}); param0.add(new int[]{-44,-58,88,-42,42,-14,-44,42,64,94,-46,-70,34,-10,-46,-52,-6,-78,64,56,74,98,-34,-4,-92,6,-52,-20,78,-72,-40}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{10,2,1,34,21,37,49,31,70,97,87,50,76,55}); param0.add(new int[]{-94,-84,-82,-66,-64,-62,-56,-38,-24,-24,-4,2,4,4,8,14,16,20,30,34,34,48,58,58,70,76,78,86,88,96,98}); param0.add(new int[]{1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,0,0}); param0.add(new int[]{5,20,30,5,10,21,5}); param0.add(new int[]{50,20,30,5,10,21,5}); param0.add(new int[]{50,20,30,5,10,21,5}); param0.add(new int[]{50,20,30,5,10,21,5}); List param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(29); param1.add(12); param1.add(0); param1.add(0); param1.add(2); param1.add(7); List param2 = new ArrayList<>(); param2.add(18); param2.add(27); param2.add(20); param2.add(8); param2.add(26); param2.add(11); param2.add(7); param2.add(7); param2.add(7); param2.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } } ","def f_gold ( arr , i , n ) : if i > int ( ( n - 2 ) / 2 ) : return True if ( arr [ i ] >= arr [ 2 * i + 1 ] and arr [ i ] >= arr [ 2 * i + 2 ] and f_gold ( arr , 2 * i + 1 , n ) and f_gold ( arr , 2 * i + 2 , n ) ) : return True return False "," using namespace std; bool f_gold ( int arr [ ], int i, int n ) { if ( i > ( n - 2 ) / 2 ) return true; if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return true; return false; } int main() { int n_success = 0; vector> param0 {{1,2,3,5,24,24,25,25,36,37,37,39,42,44,46,50,51,54,56,60,62,70,71,73,75,80,80,85,86,89,91,95,99},{-44,-58,88,-42,42,-14,-44,42,64,94,-46,-70,34,-10,-46,-52,-6,-78,64,56,74,98,-34,-4,-92,6,-52,-20,78,-72,-40},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{10,2,1,34,21,37,49,31,70,97,87,50,76,55},{-94,-84,-82,-66,-64,-62,-56,-38,-24,-24,-4,2,4,4,8,14,16,20,30,34,34,48,58,58,70,76,78,86,88,96,98},{1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,0,0},{5,20,30,5,10,21,5},{50,20,30,5,10,21,5},{50,20,30,5,10,21,5},{50,20,30,5,10,21,5}}; vector param1 {0,0,0,0,29,12,0,0,2,7}; vector param2 {18,27,20,8,26,11,7,7,7,7}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; } ",," if __name__ == '__main__': param = [ ([1, 2, 3, 5, 24, 24, 25, 25, 36, 37, 37, 39, 42, 44, 46, 50, 51, 54, 56, 60, 62, 70, 71, 73, 75, 80, 80, 85, 86, 89, 91, 95, 99],0,18,), ([-44, -58, 88, -42, 42, -14, -44, 42, 64, 94, -46, -70, 34, -10, -46, -52, -6, -78, 64, 56, 74, 98, -34, -4, -92, 6, -52, -20, 78, -72, -40],0,27,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],0,20,), ([10, 2, 1, 34, 21, 37, 49, 31, 70, 97, 87, 50, 76, 55],0,8,), ([-94, -84, -82, -66, -64, -62, -56, -38, -24, -24, -4, 2, 4, 4, 8, 14, 16, 20, 30, 34, 34, 48, 58, 58, 70, 76, 78, 86, 88, 96, 98],0,26,), ([1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0],12,11,), ([5,20,30,5,10,21,5],0,7), ([50,20,30,5,10,21,5],0,7), ([50,20,30,5,10,21,5],2,7), ([50,20,30,5,10,21,5],4,7), ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION{ static int f_gold ( int n , int r , int p ) { int C [ ] = new int [ r + 1 ] ; Arrays . fill ( C , 0 ) ; C [ 0 ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = Math . min ( i , r ) ; j > 0 ; j -- ) C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p ; } return C [ r ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(82); param0.add(45); param0.add(44); param0.add(88); param0.add(90); param0.add(98); param0.add(80); param0.add(60); param0.add(52); param0.add(71); List param1 = new ArrayList<>(); param1.add(5); param1.add(24); param1.add(68); param1.add(24); param1.add(75); param1.add(55); param1.add(54); param1.add(75); param1.add(73); param1.add(26); List param2 = new ArrayList<>(); param2.add(94); param2.add(95); param2.add(61); param2.add(43); param2.add(57); param2.add(43); param2.add(88); param2.add(65); param2.add(86); param2.add(45); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n , r , p ) : C = [ 0 for i in range ( r + 1 ) ] C [ 0 ] = 1 for i in range ( 1 , n + 1 ) : for j in range ( min ( i , r ) , 0 , - 1 ) : C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p return C [ r ] "," using namespace std; int f_gold ( int n, int r, int p ) { int C [ r + 1 ]; memset ( C, 0, sizeof ( C ) ); C [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) { for ( int j = min ( i, r ); j > 0; j -- ) C [ j ] = ( C [ j ] + C [ j - 1 ] ) % p; } return C [ r ]; } int main() { int n_success = 0; vector param0 {82,45,44,88,90,98,80,60,52,71}; vector param1 {5,24,68,24,75,55,54,75,73,26}; vector param2 {94,95,61,43,57,43,88,65,86,45}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (82,5,94,), (45,24,95,), (44,68,61,), (88,24,43,), (90,75,57,), (98,55,43,), (80,54,88,), (60,75,65,), (52,73,86,), (71,26,45,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", SQUARE_ROOT_OF_AN_INTEGER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_ROOT_OF_AN_INTEGER{ static int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x ; int i = 1 , result = 1 ; while ( result <= x ) { i ++ ; result = i * i ; } return i - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(89); param0.add(11); param0.add(14); param0.add(92); param0.add(76); param0.add(63); param0.add(51); param0.add(16); param0.add(83); param0.add(66); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( x ) : if ( x == 0 or x == 1 ) : return x i = 1 ; result = 1 while ( result <= x ) : i += 1 result = i * i return i - 1 "," using namespace std; int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x; int i = 1, result = 1; while ( result <= x ) { i ++; result = i * i; } return i - 1; } int main() { int n_success = 0; vector param0 {89,11,14,92,76,63,51,16,83,66}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (89,), (11,), (14,), (92,), (76,), (63,), (51,), (16,), (83,), (66,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_SUBSEQUENCE_DIFFERENCE_ADJACENTS_ONE_SET_2," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_SUBSEQUENCE_DIFFERENCE_ADJACENTS_ONE_SET_2{ static int f_gold ( int [ ] arr , int n ) { HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ; int longLen = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int len = 0 ; if ( um . containsKey ( arr [ i ] - 1 ) && len < um . get ( arr [ i ] - 1 ) ) len = um . get ( arr [ i ] - 1 ) ; if ( um . containsKey ( arr [ i ] + 1 ) && len < um . get ( arr [ i ] + 1 ) ) len = um . get ( arr [ i ] + 1 ) ; um . put ( arr [ i ] , len + 1 ) ; if ( longLen < um . get ( arr [ i ] ) ) longLen = um . get ( arr [ i ] ) ; } return longLen ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{20,48,58}); param0.add(new int[]{-36,94,-20,-90,-80,88,46,-8,-36,22,70,-16,-48,-54,-82,38,10,-84,12,10,-14,50,12,-28,-64,-38,-84,-62,-56,32,-78,34,-34,48}); param0.add(new int[]{0,0,0}); param0.add(new int[]{50,28,14,52,92,30,30,27,66,77,39,42,28,84,63,55,18,34,57,45,81,38,23,31,9,35,25,39,30,5,28,7,42,42}); param0.add(new int[]{-96,-70,-64,-60,-56,-44,-40,-32,-30,-22,-10,14,26,28,28,38,58,78,80}); param0.add(new int[]{1,0,0,0,1,0,0,1,0,1}); param0.add(new int[]{8,19,30,37,44,46,49,50,51,57,65,67,70,70,76,83,91,92}); param0.add(new int[]{40,62,-6,88,58,66,-40,46,-32,80,22,-30,32,-74,20,-82,-58,-18,30,68,-2,38,-76,-58,22,-22,74}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{46,6,71,56,21,97,80,67,26,25,79,86,64,84,53,50,29,19,95,58,14,15,63,1,76,64,11,47,9,97,54,27}); List param1 = new ArrayList<>(); param1.add(2); param1.add(29); param1.add(1); param1.add(22); param1.add(11); param1.add(8); param1.add(13); param1.add(20); param1.add(12); param1.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > um; int longLen = 0; for ( int i = 0; i < n; i ++ ) { int len = 0; if ( um . find ( arr [ i ] - 1 ) != um . end ( ) && len < um [ arr [ i ] - 1 ] ) len = um [ arr [ i ] - 1 ]; if ( um . find ( arr [ i ] + 1 ) != um . end ( ) && len < um [ arr [ i ] + 1 ] ) len = um [ arr [ i ] + 1 ]; um [ arr [ i ] ] = len + 1; if ( longLen < um [ arr [ i ] ] ) longLen = um [ arr [ i ] ]; } return longLen; } int main() { int n_success = 0; vector> param0 {{20,48,58},{-36,94,-20,-90,-80,88,46,-8,-36,22,70,-16,-48,-54,-82,38,10,-84,12,10,-14,50,12,-28,-64,-38,-84,-62,-56,32,-78,34,-34,48},{0,0,0},{50,28,14,52,92,30,30,27,66,77,39,42,28,84,63,55,18,34,57,45,81,38,23,31,9,35,25,39,30,5,28,7,42,42},{-96,-70,-64,-60,-56,-44,-40,-32,-30,-22,-10,14,26,28,28,38,58,78,80},{1,0,0,0,1,0,0,1,0,1},{8,19,30,37,44,46,49,50,51,57,65,67,70,70,76,83,91,92},{40,62,-6,88,58,66,-40,46,-32,80,22,-30,32,-74,20,-82,-58,-18,30,68,-2,38,-76,-58,22,-22,74},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{46,6,71,56,21,97,80,67,26,25,79,86,64,84,53,50,29,19,95,58,14,15,63,1,76,64,11,47,9,97,54,27}}; vector param1 {2,29,1,22,11,8,13,20,12,17}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMIZE_VOLUME_CUBOID_GIVEN_SUM_SIDES{ static int f_gold ( int s ) { int maxvalue = 0 ; for ( int i = 1 ; i <= s - 2 ; i ++ ) { for ( int j = 1 ; j <= s - 1 ; j ++ ) { int k = s - i - j ; maxvalue = Math . max ( maxvalue , i * j * k ) ; } } return maxvalue ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(67); param0.add(48); param0.add(59); param0.add(22); param0.add(14); param0.add(66); param0.add(1); param0.add(75); param0.add(58); param0.add(78); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(s): maxvalue = 0 i = 1 for i in range(s - 1): j = 1 for j in range(s): k = s - i - j maxvalue = max(maxvalue, i * j * k) return maxvalue "," using namespace std; int f_gold ( int s ) { int maxvalue = 0; for ( int i = 1; i <= s - 2; i ++ ) { for ( int j = 1; j <= s - 1; j ++ ) { int k = s - i - j; maxvalue = max ( maxvalue, i * j * k ); } } return maxvalue; } int main() { int n_success = 0; vector param0 {67,48,59,22,14,66,1,75,58,78}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (67,), (48,), (59,), (22,), (14,), (66,), (1,), (75,), (58,), (78,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1{ static int f_gold ( long n ) { return ( int ) Math . pow ( n , 2 ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(42L); param0.add(40L); param0.add(67L); param0.add(73L); param0.add(18L); param0.add(16L); param0.add(74L); param0.add(33L); param0.add(92L); param0.add(22L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : return math.pow ( n , 2 ) "," using namespace std; int f_gold ( long n ) { return pow ( n, 2 ); } int main() { int n_success = 0; vector param0 {42,40,67,73,18,16,74,33,92,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (42,), (40,), (67,), (73,), (18,), (16,), (74,), (33,), (92,), (22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", REARRANGE_POSITIVE_AND_NEGATIVE_NUMBERS_PUBLISH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class REARRANGE_POSITIVE_AND_NEGATIVE_NUMBERS_PUBLISH{ static void f_gold ( int arr [ ] , int n ) { int i = - 1 , temp = 0 ; for ( int j = 0 ; j < n ; j ++ ) { if ( arr [ j ] < 0 ) { i ++ ; temp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = temp ; } } int pos = i + 1 , neg = 0 ; while ( pos < n && neg < pos && arr [ neg ] < 0 ) { temp = arr [ neg ] ; arr [ neg ] = arr [ pos ] ; arr [ pos ] = temp ; pos ++ ; neg += 2 ; } } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,5,6,7,8,10,13,15,15,27,27,29,29,29,29,31,33,33,36,38,38,39,42,47,47,51,51,51,52,53,55,56,57,64,66,66,67,68,70,72,74,78,86,88,94,97,97}); param0.add(new int[]{73,30,55,-5,15,64,-64,-74,-57,-73,-31,48}); param0.add(new int[]{0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{62,82,89,97,60,43,76,68,5,37,72,92,31}); param0.add(new int[]{-99,-89,-71,-60,-59,-54,-49,1,51}); param0.add(new int[]{1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,1,0,0,1,0,0,0,1}); param0.add(new int[]{2,7,17,22,24,25,26,28,29,33,34,38,43,49,51,52,54,59,63,70,71,75,82,88,91,91}); param0.add(new int[]{-51,99,-19,-16,5,77,48,18,-14,-37,89,4,-51,-29,-99,41,79,23,84,-38,-68}); param0.add(new int[]{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}); param0.add(new int[]{88,87,59}); List param1 = new ArrayList<>(); param1.add(26); param1.add(8); param1.add(6); param1.add(7); param1.add(8); param1.add(21); param1.add(14); param1.add(10); param1.add(44); param1.add(1); List filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{5,5,6,7,8,10,13,15,15,27,27,29,29,29,29,31,33,33,36,38,38,39,42,47,47,51,51,51,52,53,55,56,57,64,66,66,67,68,70,72,74,78,86,88,94,97,97}); filled_function_param0.add(new int[]{73,30,55,-5,15,64,-64,-74,-57,-73,-31,48}); filled_function_param0.add(new int[]{0,0,0,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{62,82,89,97,60,43,76,68,5,37,72,92,31}); filled_function_param0.add(new int[]{-99,-89,-71,-60,-59,-54,-49,1,51}); filled_function_param0.add(new int[]{1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,1,0,0,1,0,0,0,1}); filled_function_param0.add(new int[]{2,7,17,22,24,25,26,28,29,33,34,38,43,49,51,52,54,59,63,70,71,75,82,88,91,91}); filled_function_param0.add(new int[]{-51,99,-19,-16,5,77,48,18,-14,-37,89,4,-51,-29,-99,41,79,23,84,-38,-68}); filled_function_param0.add(new int[]{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}); filled_function_param0.add(new int[]{88,87,59}); List filled_function_param1 = new ArrayList<>(); filled_function_param1.add(26); filled_function_param1.add(8); filled_function_param1.add(6); filled_function_param1.add(7); filled_function_param1.add(8); filled_function_param1.add(21); filled_function_param1.add(14); filled_function_param1.add(10); filled_function_param1.add(44); filled_function_param1.add(1); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i)); f_gold(param0.get(i),param1.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i)) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : i = - 1 for j in range ( n ) : if ( arr [ j ] < 0 ) : i += 1 arr [ i ] , arr [ j ] = arr [ j ] , arr [ i ] pos , neg = i + 1 , 0 while ( pos < n and neg < pos and arr [ neg ] < 0 ) : arr [ neg ] , arr [ pos ] = arr [ pos ] , arr [ neg ] pos += 1 neg += 2 ",,," if __name__ == '__main__': param = [ ([5, 5, 6, 7, 8, 10, 13, 15, 15, 27, 27, 29, 29, 29, 29, 31, 33, 33, 36, 38, 38, 39, 42, 47, 47, 51, 51, 51, 52, 53, 55, 56, 57, 64, 66, 66, 67, 68, 70, 72, 74, 78, 86, 88, 94, 97, 97],26,), ([73, 30, 55, -5, 15, 64, -64, -74, -57, -73, -31, 48],8,), ([0, 0, 0, 1, 1, 1, 1, 1, 1, 1],6,), ([62, 82, 89, 97, 60, 43, 76, 68, 5, 37, 72, 92, 31],7,), ([-99, -89, -71, -60, -59, -54, -49, 1, 51],8,), ([1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1],21,), ([2, 7, 17, 22, 24, 25, 26, 28, 29, 33, 34, 38, 43, 49, 51, 52, 54, 59, 63, 70, 71, 75, 82, 88, 91, 91],14,), ([-51, 99, -19, -16, 5, 77, 48, 18, -14, -37, 89, 4, -51, -29, -99, 41, 79, 23, 84, -38, -68],10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],44,), ([88, 87, 59],1,) ] filled_function_param = [ ([5, 5, 6, 7, 8, 10, 13, 15, 15, 27, 27, 29, 29, 29, 29, 31, 33, 33, 36, 38, 38, 39, 42, 47, 47, 51, 51, 51, 52, 53, 55, 56, 57, 64, 66, 66, 67, 68, 70, 72, 74, 78, 86, 88, 94, 97, 97],26,), ([73, 30, 55, -5, 15, 64, -64, -74, -57, -73, -31, 48],8,), ([0, 0, 0, 1, 1, 1, 1, 1, 1, 1],6,), ([62, 82, 89, 97, 60, 43, 76, 68, 5, 37, 72, 92, 31],7,), ([-99, -89, -71, -60, -59, -54, -49, 1, 51],8,), ([1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1],21,), ([2, 7, 17, 22, 24, 25, 26, 28, 29, 33, 34, 38, 43, 49, 51, 52, 54, 59, 63, 70, 71, 75, 82, 88, 91, 91],14,), ([-51, 99, -19, -16, 5, 77, 48, 18, -14, -37, 89, 4, -51, -29, -99, 41, 79, 23, 84, -38, -68],10,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],44,), ([88, 87, 59],1,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param))) ", PARTITION_INTO_TWO_SUBARRAYS_OF_LENGTHS_K_AND_N_K_SUCH_THAT_THE_DIFFERENCE_OF_SUMS_IS_MAXIMUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PARTITION_INTO_TWO_SUBARRAYS_OF_LENGTHS_K_AND_N_K_SUCH_THAT_THE_DIFFERENCE_OF_SUMS_IS_MAXIMUM{ static int f_gold ( int arr [ ] , int N , int k ) { int M , S = 0 , S1 = 0 , max_difference = 0 ; for ( int i = 0 ; i < N ; i ++ ) S += arr [ i ] ; int temp ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = i + 1 ; j < N ; j ++ ) { if ( arr [ i ] < arr [ j ] ) { temp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = temp ; } } } M = Math . max ( k , N - k ) ; for ( int i = 0 ; i < M ; i ++ ) S1 += arr [ i ] ; max_difference = S1 - ( S - S1 ) ; return max_difference ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,5,5,9,9,19,22,24,27,33,39,39,40,41,42,43,44,45,48,52,52,53,53,55,55,56,57,57,60,60,61,62,65,66,67,70,71,72,73,77,78,79,84,87,89,91,95,98}); param0.add(new int[]{-22,-28}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{63,72,2,94,89,11,95,79,90,9,70,28,25,74,16,36,50,91,38,47,47,13,27,29,31,35}); param0.add(new int[]{-86,-78,-76,-76,-66,-62,-62,-38,-34,-32,-30,-26,-22,-4,-4,2,8,8,10,22,52,52,58,64,66,66,66,70,82,82}); param0.add(new int[]{0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0}); param0.add(new int[]{1,2,2,9,9,12,13,26,26,33,34,35,51,57,70,79,83}); param0.add(new int[]{98,-72,2,40,-20,-14,42,8,14,-58,-18,-70,-8,-66,-68,72,82,-38,-78,2,-66,-88,-34,52,12,84,72,-28,-34,60,-60,12,-28,-42,22,-66,88,-96}); param0.add(new int[]{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}); param0.add(new int[]{21,85,64,20,4,5,2}); List param1 = new ArrayList<>(); param1.add(41); param1.add(1); param1.add(20); param1.add(23); param1.add(29); param1.add(42); param1.add(9); param1.add(28); param1.add(37); param1.add(5); List param2 = new ArrayList<>(); param2.add(44); param2.add(1); param2.add(29); param2.add(16); param2.add(24); param2.add(32); param2.add(16); param2.add(28); param2.add(27); param2.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int N, int k ) { int M, S = 0, S1 = 0, max_difference = 0; for ( int i = 0; i < N; i ++ ) S += arr [ i ]; sort ( arr, arr + N, greater < int > ( ) ); M = max ( k, N - k ); for ( int i = 0; i < M; i ++ ) S1 += arr [ i ]; max_difference = S1 - ( S - S1 ); return max_difference; } int main() { int n_success = 0; vector> param0 {{1,5,5,9,9,19,22,24,27,33,39,39,40,41,42,43,44,45,48,52,52,53,53,55,55,56,57,57,60,60,61,62,65,66,67,70,71,72,73,77,78,79,84,87,89,91,95,98},{-22,-28},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{63,72,2,94,89,11,95,79,90,9,70,28,25,74,16,36,50,91,38,47,47,13,27,29,31,35},{-86,-78,-76,-76,-66,-62,-62,-38,-34,-32,-30,-26,-22,-4,-4,2,8,8,10,22,52,52,58,64,66,66,66,70,82,82},{0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0},{1,2,2,9,9,12,13,26,26,33,34,35,51,57,70,79,83},{98,-72,2,40,-20,-14,42,8,14,-58,-18,-70,-8,-66,-68,72,82,-38,-78,2,-66,-88,-34,52,12,84,72,-28,-34,60,-60,12,-28,-42,22,-66,88,-96},{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},{21,85,64,20,4,5,2}}; vector param1 {41,1,20,23,29,42,9,28,37,5}; vector param2 {44,1,29,16,24,32,16,28,27,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_1{ static int f_gold ( int arr [ ] , int n , int x ) { int i ; for ( i = 0 ; i < n - 1 ; i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break ; int l = ( i + 1 ) % n ; int r = i ; int cnt = 0 ; while ( l != r ) { if ( arr [ l ] + arr [ r ] == x ) { cnt ++ ; if ( l == ( r - 1 + n ) % n ) { return cnt ; } l = ( l + 1 ) % n ; r = ( r - 1 + n ) % n ; } else if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n ; else r = ( n + r - 1 ) % n ; } return cnt ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{24,54}); param0.add(new int[]{68,-30,-18,-6,70,-40,86,98,-24,-48}); param0.add(new int[]{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}); param0.add(new int[]{84,44,40,45,2,41,52,17,50,41,5,52,48,90,13,55,34,55,94,44,41,2}); param0.add(new int[]{-92,-76,-74,-72,-68,-64,-58,-44,-44,-38,-26,-24,-20,-12,-8,-8,-4,10,10,10,20,20,26,26,28,50,52,54,60,66,72,74,78,78,78,80,86,88}); param0.add(new int[]{1,1,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,1}); param0.add(new int[]{5,5,15,19,22,24,26,27,28,32,37,39,40,43,49,52,55,56,58,58,59,62,67,68,77,79,79,80,81,87,95,95,96,98,98}); param0.add(new int[]{-98,28,54,44,-98,-70,48,-98,56,4,-18,26,-8,-58,30,82,4,-38,42,64,-28}); param0.add(new int[]{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}); param0.add(new int[]{26,72,74,86,98,86,22,6,95,36,11,82,34,3,50,36,81,94,55,30,62,53,50,95,32,83,9,16}); List param1 = new ArrayList<>(); param1.add(1); param1.add(8); param1.add(33); param1.add(18); param1.add(29); param1.add(19); param1.add(28); param1.add(17); param1.add(24); param1.add(19); List param2 = new ArrayList<>(); param2.add(1); param2.add(8); param2.add(28); param2.add(16); param2.add(30); param2.add(10); param2.add(34); param2.add(14); param2.add(24); param2.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , x ) : for i in range ( n ) : if arr [ i ] > arr [ i + 1 ] : break l = ( i + 1 ) % n r = i cnt = 0 while ( l != r ) : if arr [ l ] + arr [ r ] == x : cnt += 1 if l == ( r - 1 + n ) % n : return cnt l = ( l + 1 ) % n r = ( r - 1 + n ) % n elif arr [ l ] + arr [ r ] < x : l = ( l + 1 ) % n else : r = ( n + r - 1 ) % n return cnt "," using namespace std; int f_gold ( int arr [ ], int n, int x ) { int i; for ( i = 0; i < n - 1; i ++ ) if ( arr [ i ] > arr [ i + 1 ] ) break; int l = ( i + 1 ) % n; int r = i; int cnt = 0; while ( l != r ) { if ( arr [ l ] + arr [ r ] == x ) { cnt ++; if ( l == ( r - 1 + n ) % n ) { return cnt; } l = ( l + 1 ) % n; r = ( r - 1 + n ) % n; } else if ( arr [ l ] + arr [ r ] < x ) l = ( l + 1 ) % n; else r = ( n + r - 1 ) % n; } return cnt; } int main() { int n_success = 0; vector> param0 {{24,54},{68,-30,-18,-6,70,-40,86,98,-24,-48},{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},{84,44,40,45,2,41,52,17,50,41,5,52,48,90,13,55,34,55,94,44,41,2},{-92,-76,-74,-72,-68,-64,-58,-44,-44,-38,-26,-24,-20,-12,-8,-8,-4,10,10,10,20,20,26,26,28,50,52,54,60,66,72,74,78,78,78,80,86,88},{1,1,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,1},{5,5,15,19,22,24,26,27,28,32,37,39,40,43,49,52,55,56,58,58,59,62,67,68,77,79,79,80,81,87,95,95,96,98,98},{-98,28,54,44,-98,-70,48,-98,56,4,-18,26,-8,-58,30,82,4,-38,42,64,-28},{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},{26,72,74,86,98,86,22,6,95,36,11,82,34,3,50,36,81,94,55,30,62,53,50,95,32,83,9,16}}; vector param1 {1,8,33,18,29,19,28,17,24,19}; vector param2 {1,8,28,16,30,10,34,14,24,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([24, 54],1,1,), ([68, -30, -18, -6, 70, -40, 86, 98, -24, -48],8,8,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],33,28,), ([84, 44, 40, 45, 2, 41, 52, 17, 50, 41, 5, 52, 48, 90, 13, 55, 34, 55, 94, 44, 41, 2],18,16,), ([-92, -76, -74, -72, -68, -64, -58, -44, -44, -38, -26, -24, -20, -12, -8, -8, -4, 10, 10, 10, 20, 20, 26, 26, 28, 50, 52, 54, 60, 66, 72, 74, 78, 78, 78, 80, 86, 88],29,30,), ([1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1],19,10,), ([5, 5, 15, 19, 22, 24, 26, 27, 28, 32, 37, 39, 40, 43, 49, 52, 55, 56, 58, 58, 59, 62, 67, 68, 77, 79, 79, 80, 81, 87, 95, 95, 96, 98, 98],28,34,), ([-98, 28, 54, 44, -98, -70, 48, -98, 56, 4, -18, 26, -8, -58, 30, 82, 4, -38, 42, 64, -28],17,14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,24,), ([26, 72, 74, 86, 98, 86, 22, 6, 95, 36, 11, 82, 34, 3, 50, 36, 81, 94, 55, 30, 62, 53, 50, 95, 32, 83, 9, 16],19,16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_DISTANCE_TWO_POINTS_EARTH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_DISTANCE_TWO_POINTS_EARTH{ public static double f_gold ( double lat1 , double lat2 , double lon1 , double lon2 ) { lon1 = Math . toRadians ( lon1 ) ; lon2 = Math . toRadians ( lon2 ) ; lat1 = Math . toRadians ( lat1 ) ; lat2 = Math . toRadians ( lat2 ) ; double dlon = lon2 - lon1 ; double dlat = lat2 - lat1 ; double a = Math . pow ( Math . sin ( dlat / 2 ) , 2 ) + Math . cos ( lat1 ) * Math . cos ( lat2 ) * Math . pow ( Math . sin ( dlon / 2 ) , 2 ) ; double c = 2 * Math . asin ( Math . sqrt ( a ) ) ; double r = 6371 ; return ( c * r ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(6578.099266893886); param0.add(-9410.77783405426); param0.add(6641.858718352012); param0.add(-4142.202863100186); param0.add(4181.4508741498075); param0.add(-7745.655002884576); param0.add(7725.024650172891); param0.add(-5881.135770052704); param0.add(8322.143446980337); param0.add(-1772.9564288056765); List param1 = new ArrayList<>(); param1.add(482.6430542568438); param1.add(-1203.2861272633245); param1.add(3498.0959749989424); param1.add(-6286.669946106916); param1.add(3845.247033476332); param1.add(-8197.864556657836); param1.add(9295.96418476119); param1.add(-4802.015139707946); param1.add(1841.108539911126); param1.add(-8246.345733364455); List param2 = new ArrayList<>(); param2.add(1342.7044674704348); param2.add(-1947.91060583419); param2.add(228.4572635598181); param2.add(-2742.3608603803173); param2.add(4909.334120366857); param2.add(-3667.1524343381157); param2.add(588.3703338670609); param2.add(-35.713164290259726); param2.add(9049.321929418034); param2.add(-9716.057194373958); List param3 = new ArrayList<>(); param3.add(3416.2819128903197); param3.add(-781.7419983063755); param3.add(5599.787943215038); param3.add(-6584.987721971118); param3.add(5159.242793722949); param3.add(-8067.806767671396); param3.add(1220.0418662747136); param3.add(-4696.734461092275); param3.add(4470.7365519306095); param3.add(-8367.588380851601); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N{ static int f_gold ( int n ) { int i = 0 ; int ans = 0 ; while ( ( 1 << i ) <= n ) { boolean k = false ; int change = 1 << i ; for ( int j = 0 ; j <= n ; j ++ ) { if ( k == true ) ans += 1 ; else ans += 0 ; if ( change == 1 ) { k = ! k ; change = 1 << i ; } else { change -- ; } } i ++ ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(90); param0.add(56); param0.add(43); param0.add(31); param0.add(77); param0.add(35); param0.add(43); param0.add(66); param0.add(15); param0.add(95); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : i = 0 ans = 0 while ( ( 1 << i ) <= n ) : k = 0 change = 1 << i for j in range ( 0 , n + 1 ) : ans += k if change == 1 : k = not k change = 1 << i else : change -= 1 i += 1 return ans "," using namespace std; int f_gold ( int n ) { int i = 0; int ans = 0; while ( ( 1 << i ) <= n ) { bool k = 0; int change = 1 << i; for ( int j = 0; j <= n; j ++ ) { ans += k; if ( change == 1 ) { k = ! k; change = 1 << i; } else { change --; } } i ++; } return ans; } int main() { int n_success = 0; vector param0 {90,56,43,31,77,35,43,66,15,95}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (90,), (56,), (43,), (31,), (77,), (35,), (43,), (66,), (15,), (95,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_GIVEN_SENTENCE_GIVEN_SET_SIMPLE_GRAMMER_RULES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_GIVEN_SENTENCE_GIVEN_SET_SIMPLE_GRAMMER_RULES{ static boolean f_gold ( char [ ] str ) { int len = str . length ; if ( str [ 0 ] < 'A' || str [ 0 ] > 'Z' ) return false ; if ( str [ len - 1 ] != '.' ) return false ; int prev_state = 0 , curr_state = 0 ; int index = 1 ; while ( index <= str . length ) { if ( str [ index ] >= 'A' && str [ index ] <= 'Z' ) curr_state = 0 ; else if ( str [ index ] == ' ' ) curr_state = 1 ; else if ( str [ index ] >= 'a' && str [ index ] <= 'z' ) curr_state = 2 ; else if ( str [ index ] == '.' ) curr_state = 3 ; if ( prev_state == curr_state && curr_state != 2 ) return false ; if ( prev_state == 2 && curr_state == 0 ) return false ; if ( curr_state == 3 && prev_state != 1 ) return ( index + 1 == str . length ) ; index ++ ; prev_state = curr_state ; } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = Arrays.asList(""I love cinema."", ""The vertex is S."", ""I am single."", ""My name is KG."", ""I lovE cinema."", ""GeeksQuiz. is a quiz site."", ""I love Geeksquiz and Geeksforgeeks."", "" You are my friend."", ""I love cinema"", ""Hello world !""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i).toCharArray()) == f_gold(param0.get(i).toCharArray())) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( string ) : length = len ( string ) if string [ 0 ] < 'A' or string [ 0 ] > 'Z' : return False if string [ length - 1 ] != '.' : return False prev_state = 0 curr_state = 0 index = 1 while ( string [ index ] ) : if string [ index ] >= 'A' and string [ index ] <= 'Z' : curr_state = 0 elif string [ index ] == ' ' : curr_state = 1 elif string [ index ] >= 'a' and string [ index ] <= 'z' : curr_state = 2 elif string [ index ] == '.' : curr_state = 3 if prev_state == curr_state and curr_state != 2 : return False if prev_state == 2 and curr_state == 0 : return False if curr_state == 3 and prev_state != 1 : return True index += 1 prev_state = curr_state return False "," using namespace std; bool f_gold ( char str [ ] ) { int len = strlen ( str ); if ( str [ 0 ] < 'A' || str [ 0 ] > 'Z' ) return false; if ( str [ len - 1 ] != '.' ) return false; int prev_state = 0, curr_state = 0; int index = 1; while ( str [ index ] ) { if ( str [ index ] >= 'A' && str [ index ] <= 'Z' ) curr_state = 0; else if ( str [ index ] == ' ' ) curr_state = 1; else if ( str [ index ] >= 'a' && str [ index ] <= 'z' ) curr_state = 2; else if ( str [ index ] == '.' ) curr_state = 3; if ( prev_state == curr_state && curr_state != 2 ) return false; if ( prev_state == 2 && curr_state == 0 ) return false; if ( curr_state == 3 && prev_state != 1 ) return ( str [ index + 1 ] == '\0' ); index ++; prev_state = curr_state; } return false; } int main() { int n_success = 0; vector param0 { ""I love cinema."", ""The vertex is S."", ""I am single."", ""My name is KG."", ""I lovE cinema."", ""GeeksQuiz. is a quiz site."", ""I love Geeksquiz and Geeksforgeeks."", "" You are my friend."", ""I love cinema"", ""Hello world !"" }; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front()) == f_gold(¶m0[i].front())) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [""I love cinema."", ""The vertex is S."", ""I am single."", ""My name is KG."", ""I lovE cinema."", ""GeeksQuiz. is a quiz site."", ""I love Geeksquiz and Geeksforgeeks."", "" You are my friend."", ""I love cinema"", ""Hello world !""] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(parameters_set) == f_gold(parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_EXIST_TWO_ELEMENTS_ARRAY_WHOSE_SUM_EQUAL_SUM_REST_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_EXIST_TWO_ELEMENTS_ARRAY_WHOSE_SUM_EQUAL_SUM_REST_ARRAY{ static boolean f_gold ( int arr [ ] , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { sum += arr [ i ] ; } if ( sum % 2 != 0 ) { return false ; } sum = sum / 2 ; HashSet < Integer > s = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { int val = sum - arr [ i ] ; if ( s . contains ( val ) && val == ( int ) s . toArray ( ) [ s . size ( ) - 1 ] ) { System . out . printf ( ""Pair elements are %d and %d\n"" , arr [ i ] , val ) ; return true ; } s . add ( arr [ i ] ) ; } return false ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2, 11, 5, 1, 4, 7}); param0.add(new int[]{2, 4, 2, 1, 11, 15}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,6,24,30,75,37,61,76,19,18,90,9,49,24,58,97,18,85,24,93,71,98,92,59,75,75,75,70,35,58,50,1,64,66,33}); param0.add(new int[]{-94,-94,-92,-74,-60,-58,-56,-44,-42,-40,-28,-14,2,4,14,20,24,28,40,42,42,66,78,78,80,82,96}); param0.add(new int[]{1,0,1,1,0,0,1,1,0,0,1,1,0,1}); param0.add(new int[]{21,26,26,27,61,62,96}); param0.add(new int[]{-54,86,20,26}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{44,35,26,15,56,6,36,53,15,66,20,53,99,96,51,12,61,19,79,40,99,42,86,8,11,54,93,46,23,47,41,26,66,5,86,52,64,51,4,21,63,14,7,53,31,8,9,63}); List param1 = new ArrayList<>(); param1.add(6); param1.add(6); param1.add(13); param1.add(18); param1.add(26); param1.add(10); param1.add(6); param1.add(3); param1.add(4); param1.add(31); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : s = set ( ) sum = 0 for i in range ( n ) : sum += arr [ i ] if sum % 2 != 0 : return False sum = sum / 2 for i in range ( n ) : val = sum - arr [ i ] if arr [ i ] not in s : s.add ( arr [ i ] ) if val in s : print ( ""Pair elements are"" , arr [ i ] , ""and"" , int ( val ) ) "," using namespace std; bool f_gold ( int arr [ ], int n ) { int sum = 0; for ( int i = 0; i < n; i ++ ) sum += arr [ i ]; if ( sum % 2 != 0 ) return false; sum = sum / 2; unordered_set < int > s; for ( int i = 0; i < n; i ++ ) { int val = sum - arr [ i ]; if ( s . find ( val ) != s . end ( ) ) { printf ( ""Pair elements are %d and %d\n"", arr [ i ], val ); return true; } s . insert ( arr [ i ] ); } return false; } int main() { int n_success = 0; vector> param0 { {2, 11, 5, 1, 4, 7}, {2, 4, 2, 1, 11, 15}, {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{69,6,24,30,75,37,61,76,19,18,90,9,49,24,58,97,18,85,24,93,71,98,92,59,75,75,75,70,35,58,50,1,64,66,33},{-94,-94,-92,-74,-60,-58,-56,-44,-42,-40,-28,-14,2,4,14,20,24,28,40,42,42,66,78,78,80,82,96},{1,0,1,1,0,0,1,1,0,0,1,1,0,1},{21,26,26,27,61,62,96},{-54,86,20,26},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{44,35,26,15,56,6,36,53,15,66,20,53,99,96,51,12,61,19,79,40,99,42,86,8,11,54,93,46,23,47,41,26,66,5,86,52,64,51,4,21,63,14,7,53,31,8,9,63}}; vector param1 {6,6,13,18,26,10,6,3,4,31}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([2, 11, 5, 1, 4, 7],6,), ([2, 4, 2, 1, 11, 15],6,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([69, 6, 24, 30, 75, 37, 61, 76, 19, 18, 90, 9, 49, 24, 58, 97, 18, 85, 24, 93, 71, 98, 92, 59, 75, 75, 75, 70, 35, 58, 50, 1, 64, 66, 33],18,), ([-94, -94, -92, -74, -60, -58, -56, -44, -42, -40, -28, -14, 2, 4, 14, 20, 24, 28, 40, 42, 42, 66, 78, 78, 80, 82, 96],26,), ([1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1],10,), ([21, 26, 26, 27, 61, 62, 96],6,), ([-54, 86, 20, 26],3,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],4,), ([44, 35, 26, 15, 56, 6, 36, 53, 15, 66, 20, 53, 99, 96, 51, 12, 61, 19, 79, 40, 99, 42, 86, 8, 11, 54, 93, 46, 23, 47, 41, 26, 66, 5, 86, 52, 64, 51, 4, 21, 63, 14, 7, 53, 31, 8, 9, 63],31,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER{ static boolean f_gold ( String s1 , String s2 ) { int n = s1 . length ( ) ; int m = s2 . length ( ) ; boolean dp [ ] [ ] = new boolean [ n + 1 ] [ m + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= m ; j ++ ) { dp [ i ] [ j ] = false ; } } dp [ 0 ] [ 0 ] = true ; for ( int i = 0 ; i < s1 . length ( ) ; i ++ ) { for ( int j = 0 ; j <= s2 . length ( ) ; j ++ ) { if ( dp [ i ] [ j ] ) { if ( j < s2 . length ( ) && ( Character . toUpperCase ( s1 . charAt ( i ) ) == s2 . charAt ( j ) ) ) dp [ i + 1 ] [ j + 1 ] = true ; if ( ! Character . isUpperCase ( s1 . charAt ( i ) ) ) dp [ i + 1 ] [ j ] = true ; } } } return ( dp [ n ] [ m ] ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""daBcd""); param0.add(""417514""); param0.add(""010000""); param0.add(""ZcKYguiMrdyn""); param0.add(""argaju""); param0.add(""1110101101""); param0.add(""ySOCoSaygi""); param0.add(""204""); param0.add(""10011100000010""); param0.add(""nMAioozPmY""); List param1 = new ArrayList<>(); param1.add(""ABC""); param1.add(""9""); param1.add(""1111011010""); param1.add(""iz""); param1.add(""RAJ""); param1.add(""110101001""); param1.add(""aRhxkYqh""); param1.add(""6986871066""); param1.add(""0""); param1.add(""WZFdDKw""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s1 , s2 ) : n = len ( s1 ) m = len ( s2 ) dp = ( [ [ False for i in range ( m + 1 ) ] for i in range ( n + 1 ) ] ) dp [ 0 ] [ 0 ] = True for i in range ( len ( s1 ) ) : for j in range ( len ( s2 ) + 1 ) : if ( dp [ i ] [ j ] ) : if ( ( j < len ( s2 ) and ( s1 [ i ].upper ( ) == s2 [ j ] ) ) ) : dp [ i + 1 ] [ j + 1 ] = True if ( s1 [ i ].isupper ( ) == False ) : dp [ i + 1 ] [ j ] = True return ( dp [ n ] [ m ] ) "," using namespace std; bool f_gold ( string s1, string s2 ) { int n = s1 . length ( ); int m = s2 . length ( ); bool dp [ n + 1 ] [ m + 1 ]; for ( int i = 0; i <= n; i ++ ) { for ( int j = 0; j <= m; j ++ ) { dp [ i ] [ j ] = false; } } dp [ 0 ] [ 0 ] = true; for ( int i = 0; i < s1 . length ( ); i ++ ) { for ( int j = 0; j <= s2 . length ( ); j ++ ) { if ( dp [ i ] [ j ] ) { if ( j < s2 . length ( ) && ( toupper ( s1 [ i ] ) == s2 [ j ] ) ) dp [ i + 1 ] [ j + 1 ] = true; if ( ! isupper ( s1 [ i ] ) ) dp [ i + 1 ] [ j ] = true; } } } return ( dp [ n ] [ m ] ); } int main() { int n_success = 0; vector param0 {""daBcd"",""417514"",""010000"",""ZcKYguiMrdyn"",""argaju"",""1110101101"",""ySOCoSaygi"",""204"",""10011100000010"",""nMAioozPmY""}; vector param1 {""ABC"",""9"",""1111011010"",""iz"",""RAJ"",""110101001"",""aRhxkYqh"",""6986871066"",""0"",""WZFdDKw""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('daBcd','ABC',), ('417514','9',), ('010000','1111011010',), ('ZcKYguiMrdyn','iz',), ('argaju','RAJ',), ('1110101101','110101001',), ('ySOCoSaygi','aRhxkYqh',), ('204','6986871066',), ('10011100000010','0',), ('nMAioozPmY','WZFdDKw',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_EVEN_FACTORS_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_EVEN_FACTORS_NUMBER{ public static int f_gold ( int n ) { if ( n % 2 != 0 ) return 0 ; int res = 1 ; for ( int i = 2 ; i <= Math . sqrt ( n ) ; i ++ ) { int count = 0 , curr_sum = 1 ; int curr_term = 1 ; while ( n % i == 0 ) { count ++ ; n = n / i ; if ( i == 2 && count == 1 ) curr_sum = 0 ; curr_term *= i ; curr_sum += curr_term ; } res *= curr_sum ; } if ( n >= 2 ) res *= ( 1 + n ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(71); param0.add(78); param0.add(39); param0.add(36); param0.add(49); param0.add(17); param0.add(53); param0.add(66); param0.add(92); param0.add(71); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( n ) : if ( n % 2 != 0 ) : return 0 res = 1 for i in range ( 2 , ( int ) ( math.sqrt ( n ) ) + 1 ) : count = 0 curr_sum = 1 curr_term = 1 while ( n % i == 0 ) : count = count + 1 n = n // i if ( i == 2 and count == 1 ) : curr_sum = 0 curr_term = curr_term * i curr_sum = curr_sum + curr_term res = res * curr_sum if ( n >= 2 ) : res = res * ( 1 + n ) return res "," using namespace std; int f_gold ( int n ) { if ( n % 2 != 0 ) return 0; int res = 1; for ( int i = 2; i <= sqrt ( n ); i ++ ) { int count = 0, curr_sum = 1, curr_term = 1; while ( n % i == 0 ) { count ++; n = n / i; if ( i == 2 && count == 1 ) curr_sum = 0; curr_term *= i; curr_sum += curr_term; } res *= curr_sum; } if ( n >= 2 ) res *= ( 1 + n ); return res; } int main() { int n_success = 0; vector param0 {71,78,39,36,49,17,53,66,92,71}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (71,), (78,), (39,), (36,), (49,), (17,), (53,), (66,), (92,), (71,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CALCULATE_AREA_TETRAHEDRON," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CALCULATE_AREA_TETRAHEDRON{ static double f_gold ( int side ) { double volume = ( Math . pow ( side , 3 ) / ( 6 * Math . sqrt ( 2 ) ) ) ; return volume ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(58); param0.add(56); param0.add(35); param0.add(99); param0.add(13); param0.add(45); param0.add(40); param0.add(92); param0.add(7); param0.add(13); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( side ) : volume = ( side ** 3 / ( 6 * math.sqrt ( 2 ) ) ) return round ( volume , 2 ) "," using namespace std; double f_gold ( int side ) { double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) ); return volume; } int main() { int n_success = 0; vector param0 {58,56,35,99,13,45,40,92,7,13}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (58,), (56,), (35,), (99,), (13,), (45,), (40,), (92,), (7,), (13,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD{ static int f_gold ( int price [ ] , int n ) { int val [ ] = new int [ n + 1 ] ; val [ 0 ] = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { int max_val = Integer . MIN_VALUE ; for ( int j = 0 ; j < i ; j ++ ) max_val = Math . max ( max_val , price [ j ] + val [ i - j - 1 ] ) ; val [ i ] = max_val ; } return val [ n ] ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,7,15,16,18,22,22,30,34,35,37,41,42,42,43,47,49,52,53,55,58,60,62,62,62,65,65,67,69,73,73,73,75,78,83,84,86,90,91,91,93,94,96}); param0.add(new int[]{50,-30,-84,-2,-96,-54,-14,56,-48,70,38,-86,16,-48,66,34,36,40,40,36,-16,-92,30}); param0.add(new int[]{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}); param0.add(new int[]{79,33,54,12,53,9,29,45,85,20,6,52,8,26,43,42,17,54,8,70,5,71,1,81,42,59,42,63,8,86,29,16,72}); param0.add(new int[]{-78,-64,-38,-22,2,8,28,32,58,72,72,90}); param0.add(new int[]{1,0,1,1,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0}); param0.add(new int[]{1,3,6,7,10,17,18,22,23,24,28,31,37,43,48,54,56,65,70,71,73,74,79,84,87,95,96}); param0.add(new int[]{-30,20,-72,-86,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{96,99,20,87,17,13,45,65,33,13,59,77,35,79,20,51,69,71,55,37,23,35,82,70}); List param1 = new ArrayList<>(); param1.add(37); param1.add(19); param1.add(29); param1.add(22); param1.add(11); param1.add(20); param1.add(21); param1.add(3); param1.add(21); param1.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int price [ ], int n ) { int val [ n + 1 ]; val [ 0 ] = 0; int i, j; for ( i = 1; i <= n; i ++ ) { int max_val = INT_MIN; for ( j = 0; j < i; j ++ ) max_val = max ( max_val, price [ j ] + val [ i - j - 1 ] ); val [ i ] = max_val; } return val [ n ]; } int main() { int n_success = 0; vector> param0 {{5,7,15,16,18,22,22,30,34,35,37,41,42,42,43,47,49,52,53,55,58,60,62,62,62,65,65,67,69,73,73,73,75,78,83,84,86,90,91,91,93,94,96},{50,-30,-84,-2,-96,-54,-14,56,-48,70,38,-86,16,-48,66,34,36,40,40,36,-16,-92,30},{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},{79,33,54,12,53,9,29,45,85,20,6,52,8,26,43,42,17,54,8,70,5,71,1,81,42,59,42,63,8,86,29,16,72},{-78,-64,-38,-22,2,8,28,32,58,72,72,90},{1,0,1,1,1,0,0,1,0,0,1,1,0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0},{1,3,6,7,10,17,18,22,23,24,28,31,37,43,48,54,56,65,70,71,73,74,79,84,87,95,96},{-30,20,-72,-86,-8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{96,99,20,87,17,13,45,65,33,13,59,77,35,79,20,51,69,71,55,37,23,35,82,70}}; vector param1 {37,19,29,22,11,20,21,3,21,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, SQUARED_TRIANGULAR_NUMBER_SUM_CUBES," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARED_TRIANGULAR_NUMBER_SUM_CUBES{ static int f_gold ( int s ) { int sum = 0 ; for ( int n = 1 ; sum < s ; n ++ ) { sum += n * n * n ; if ( sum == s ) return n ; } return - 1 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(15); param0.add(36); param0.add(39); param0.add(43); param0.add(75); param0.add(49); param0.add(56); param0.add(14); param0.add(62); param0.add(97); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : _sum = 0 n = 1 while ( _sum < s ) : _sum += n * n * n n += 1 n -= 1 if _sum == s : return n return - 1 "," using namespace std; int f_gold ( int s ) { int sum = 0; for ( int n = 1; sum < s; n ++ ) { sum += n * n * n; if ( sum == s ) return n; } return - 1; } int main() { int n_success = 0; vector param0 {15,36,39,43,75,49,56,14,62,97}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (15,), (36,), (39,), (43,), (75,), (49,), (56,), (14,), (62,), (97,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FREQUENT_ELEMENT_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FREQUENT_ELEMENT_ARRAY{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int max_count = 1 , res = arr [ 0 ] ; int curr_count = 1 ; for ( int i = 1 ; i < n ; i ++ ) { if ( arr [ i ] == arr [ i - 1 ] ) curr_count ++ ; else { if ( curr_count > max_count ) { max_count = curr_count ; res = arr [ i - 1 ] ; } curr_count = 1 ; } } if ( curr_count > max_count ) { max_count = curr_count ; res = arr [ n - 1 ] ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,3,11,11,11,18,20,26,26,27,30,33,39,39,42,42,48,51,51,51,51,60,66,66,68,68,69,71,72,73,76,76,77,77,77,78,90,96}); param0.add(new int[]{46,-8,64,-46,-38,92,-14,-22,-32,48,72,96,30,66,94,36,42,-18,14,-74,80,96,-4}); param0.add(new int[]{0,0,0,0,0,0,1}); param0.add(new int[]{93,32,3,31,67,96,52,80,70,49,45,23,58,87,31,56,21,71,55,97}); param0.add(new int[]{-98,-96,-84,-82,-72,-64,-62,-56,-52,-52,-48,-46,-42,-36,-32,-30,-30,-18,-16,-10,-2,0,6,18,22,22,40,42,50,54,64,68,68,72,80,82,84,96}); param0.add(new int[]{1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0}); param0.add(new int[]{9,12,13,28,43,46,64,66,68,89,92}); param0.add(new int[]{22,-8,-56,68,-12,-26,-40,-46,-42,-80,4,-42,-72,-22,36,22,-94,48,96,80,-52,46,90,94,36,92,-12,-24,-60,-32,92,18,76,40,-32,6,-22,86,86,-88,38,50,32,78,-82,54,-40,18}); param0.add(new int[]{0,0,0,0,0,0,1,1,1}); param0.add(new int[]{81,74,32,41,85,65,81,74,40,64,97,4,61,43,54,96,62,2,97,86,80,25,9,31,16,29,4,63,76,41,5,95}); List param1 = new ArrayList<>(); param1.add(25); param1.add(18); param1.add(6); param1.add(15); param1.add(20); param1.add(29); param1.add(6); param1.add(41); param1.add(4); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( ) max_count = 1 ; res = arr [ 0 ] ; curr_count = 1 for i in range ( 1 , n ) : if ( arr [ i ] == arr [ i - 1 ] ) : curr_count += 1 else : if ( curr_count > max_count ) : max_count = curr_count res = arr [ i - 1 ] curr_count = 1 if ( curr_count > max_count ) : max_count = curr_count res = arr [ n - 1 ] return res "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int max_count = 1, res = arr [ 0 ], curr_count = 1; for ( int i = 1; i < n; i ++ ) { if ( arr [ i ] == arr [ i - 1 ] ) curr_count ++; else { if ( curr_count > max_count ) { max_count = curr_count; res = arr [ i - 1 ]; } curr_count = 1; } } if ( curr_count > max_count ) { max_count = curr_count; res = arr [ n - 1 ]; } return res; } int main() { int n_success = 0; vector> param0 {{1,1,3,11,11,11,18,20,26,26,27,30,33,39,39,42,42,48,51,51,51,51,60,66,66,68,68,69,71,72,73,76,76,77,77,77,78,90,96},{46,-8,64,-46,-38,92,-14,-22,-32,48,72,96,30,66,94,36,42,-18,14,-74,80,96,-4},{0,0,0,0,0,0,1},{93,32,3,31,67,96,52,80,70,49,45,23,58,87,31,56,21,71,55,97},{-98,-96,-84,-82,-72,-64,-62,-56,-52,-52,-48,-46,-42,-36,-32,-30,-30,-18,-16,-10,-2,0,6,18,22,22,40,42,50,54,64,68,68,72,80,82,84,96},{1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0},{9,12,13,28,43,46,64,66,68,89,92},{22,-8,-56,68,-12,-26,-40,-46,-42,-80,4,-42,-72,-22,36,22,-94,48,96,80,-52,46,90,94,36,92,-12,-24,-60,-32,92,18,76,40,-32,6,-22,86,86,-88,38,50,32,78,-82,54,-40,18},{0,0,0,0,0,0,1,1,1},{81,74,32,41,85,65,81,74,40,64,97,4,61,43,54,96,62,2,97,86,80,25,9,31,16,29,4,63,76,41,5,95}}; vector param1 {25,18,6,15,20,29,6,41,4,16}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([1, 1, 3, 11, 11, 11, 18, 20, 26, 26, 27, 30, 33, 39, 39, 42, 42, 48, 51, 51, 51, 51, 60, 66, 66, 68, 68, 69, 71, 72, 73, 76, 76, 77, 77, 77, 78, 90, 96],25,), ([46, -8, 64, -46, -38, 92, -14, -22, -32, 48, 72, 96, 30, 66, 94, 36, 42, -18, 14, -74, 80, 96, -4],18,), ([0, 0, 0, 0, 0, 0, 1],6,), ([93, 32, 3, 31, 67, 96, 52, 80, 70, 49, 45, 23, 58, 87, 31, 56, 21, 71, 55, 97],15,), ([-98, -96, -84, -82, -72, -64, -62, -56, -52, -52, -48, -46, -42, -36, -32, -30, -30, -18, -16, -10, -2, 0, 6, 18, 22, 22, 40, 42, 50, 54, 64, 68, 68, 72, 80, 82, 84, 96],20,), ([1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0],29,), ([9, 12, 13, 28, 43, 46, 64, 66, 68, 89, 92],6,), ([22, -8, -56, 68, -12, -26, -40, -46, -42, -80, 4, -42, -72, -22, 36, 22, -94, 48, 96, 80, -52, 46, 90, 94, 36, 92, -12, -24, -60, -32, 92, 18, 76, 40, -32, 6, -22, 86, 86, -88, 38, 50, 32, 78, -82, 54, -40, 18],41,), ([0, 0, 0, 0, 0, 0, 1, 1, 1],4,), ([81, 74, 32, 41, 85, 65, 81, 74, 40, 64, 97, 4, 61, 43, 54, 96, 62, 2, 97, 86, 80, 25, 9, 31, 16, 29, 4, 63, 76, 41, 5, 95],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS_1{ static int f_gold ( int n ) { return ( 1 << ( n - 1 ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(56); param0.add(28); param0.add(4); param0.add(24); param0.add(72); param0.add(30); param0.add(48); param0.add(32); param0.add(13); param0.add(19); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : return ( 1 << ( n - 1 ) ) "," using namespace std; int f_gold ( int n ) { return ( 1 << ( n - 1 ) ); } int main() { int n_success = 0; vector param0 {56,28,4,24,72,30,48,32,13,19}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (56,), (28,), (4,), (24,), (72,), (30,), (48,), (32,), (13,), (19,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1{ static int f_gold ( int l , int w ) { return ( 2 * ( l + w ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(58); param0.add(37); param0.add(56); param0.add(22); param0.add(77); param0.add(34); param0.add(74); param0.add(37); param0.add(21); param0.add(75); List param1 = new ArrayList<>(); param1.add(39); param1.add(49); param1.add(52); param1.add(43); param1.add(12); param1.add(31); param1.add(54); param1.add(52); param1.add(37); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( l , w ) : return ( 2 * ( l + w ) ) "," using namespace std; int f_gold ( int l, int w ) { return ( 2 * ( l + w ) ); } int main() { int n_success = 0; vector param0 {58,37,56,22,77,34,74,37,21,75}; vector param1 {39,49,52,43,12,31,54,52,37,30}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (58,39,), (37,49,), (56,52,), (22,43,), (77,12,), (34,31,), (74,54,), (37,52,), (21,37,), (75,30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", LONGEST_REPEATING_AND_NON_OVERLAPPING_SUBSTRING," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_REPEATING_AND_NON_OVERLAPPING_SUBSTRING{ static String f_gold ( String str ) { int n = str . length ( ) ; int LCSRe [ ] [ ] = new int [ n + 1 ] [ n + 1 ] ; String res = """" ; int res_length = 0 ; int i , index = 0 ; for ( i = 1 ; i <= n ; i ++ ) { for ( int j = i + 1 ; j <= n ; j ++ ) { if ( str . charAt ( i - 1 ) == str . charAt ( j - 1 ) && LCSRe [ i - 1 ] [ j - 1 ] < ( j - i ) ) { LCSRe [ i ] [ j ] = LCSRe [ i - 1 ] [ j - 1 ] + 1 ; if ( LCSRe [ i ] [ j ] > res_length ) { res_length = LCSRe [ i ] [ j ] ; index = Math . max ( i , index ) ; } } else { LCSRe [ i ] [ j ] = 0 ; } } } if ( res_length > 0 ) { for ( i = index - res_length + 1 ; i <= index ; i ++ ) { res += str . charAt ( i - 1 ) ; } } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""fbfHTjE""); param0.add(""09285256323""); param0.add(""0011000101110""); param0.add(""ue JkVZTt""); param0.add(""48387612426300""); param0.add(""010""); param0.add(""ddRrUz""); param0.add(""1049162633793""); param0.add(""100011""); param0.add(""iJfadiVaQqv""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) LCSRe = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] res = """" res_length = 0 index = 0 for i in range ( 1 , n + 1 ) : for j in range ( i + 1 , n + 1 ) : if ( str [ i - 1 ] == str [ j - 1 ] and LCSRe [ i - 1 ] [ j - 1 ] < ( j - i ) ) : LCSRe [ i ] [ j ] = LCSRe [ i - 1 ] [ j - 1 ] + 1 if ( LCSRe [ i ] [ j ] > res_length ) : res_length = LCSRe [ i ] [ j ] index = max ( i , index ) else : LCSRe [ i ] [ j ] = 0 if ( res_length > 0 ) : for i in range ( index - res_length + 1 , index + 1 ) : res = res + str [ i - 1 ] return res "," using namespace std; string f_gold ( string str ) { int n = str . length ( ); int LCSRe [ n + 1 ] [ n + 1 ]; memset ( LCSRe, 0, sizeof ( LCSRe ) ); string res; int res_length = 0; int i, index = 0; for ( i = 1; i <= n; i ++ ) { for ( int j = i + 1; j <= n; j ++ ) { if ( str [ i - 1 ] == str [ j - 1 ] && LCSRe [ i - 1 ] [ j - 1 ] < ( j - i ) ) { LCSRe [ i ] [ j ] = LCSRe [ i - 1 ] [ j - 1 ] + 1; if ( LCSRe [ i ] [ j ] > res_length ) { res_length = LCSRe [ i ] [ j ]; index = max ( i, index ); } } else LCSRe [ i ] [ j ] = 0; } } if ( res_length > 0 ) for ( i = index - res_length + 1; i <= index; i ++ ) res . push_back ( str [ i - 1 ] ); return res; } int main() { int n_success = 0; vector param0 {""fbfHTjE"",""09285256323"",""0011000101110"",""ue JkVZTt"",""48387612426300"",""010"",""ddRrUz"",""1049162633793"",""100011"",""iJfadiVaQqv""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('fbfHTjE',), ('09285256323',), ('0011000101110',), ('ue JkVZTt',), ('48387612426300',), ('010',), ('ddRrUz',), ('1049162633793',), ('100011',), ('iJfadiVaQqv',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_N_DIGIT_STEPPING_NUMBERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_N_DIGIT_STEPPING_NUMBERS{ static long f_gold ( int n ) { int dp [ ] [ ] = new int [ n + 1 ] [ 10 ] ; if ( n == 1 ) return 10 ; for ( int j = 0 ; j <= 9 ; j ++ ) dp [ 1 ] [ j ] = 1 ; for ( int i = 2 ; i <= n ; i ++ ) { for ( int j = 0 ; j <= 9 ; j ++ ) { if ( j == 0 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ] ; else if ( j == 9 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ] ; else dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ; } } long sum = 0 ; for ( int j = 1 ; j <= 9 ; j ++ ) sum += dp [ n ] [ j ] ; return sum ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(18); param0.add(66); param0.add(73); param0.add(70); param0.add(26); param0.add(41); param0.add(20); param0.add(25); param0.add(52); param0.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : dp = [ [ 0 for x in range ( 10 ) ] for y in range ( n + 1 ) ] ; if ( n == 1 ) : return 10 ; for j in range ( 10 ) : dp [ 1 ] [ j ] = 1 ; for i in range ( 2 , n + 1 ) : for j in range ( 10 ) : if ( j == 0 ) : dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ] ; elif ( j == 9 ) : dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ] ; else : dp [ i ] [ j ] = ( dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ] ) ; sum = 0 ; for j in range ( 1 , 10 ) : sum = sum + dp [ n ] [ j ] ; return sum ; "," using namespace std; long long f_gold ( int n ) { int dp [ n + 1 ] [ 10 ]; if ( n == 1 ) return 10; for ( int j = 0; j <= 9; j ++ ) dp [ 1 ] [ j ] = 1; for ( int i = 2; i <= n; i ++ ) { for ( int j = 0; j <= 9; j ++ ) { if ( j == 0 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j + 1 ]; else if ( j == 9 ) dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ] + dp [ i - 1 ] [ j + 1 ]; } } long long sum = 0; for ( int j = 1; j <= 9; j ++ ) sum += dp [ n ] [ j ]; return sum; } int main() { int n_success = 0; vector param0 {18,66,73,70,26,41,20,25,52,13}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (18,), (66,), (73,), (70,), (26,), (41,), (20,), (25,), (52,), (13,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", PROGRAM_FIND_STRING_START_END_GEEKS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FIND_STRING_START_END_GEEKS{ static boolean f_gold ( String str , String corner ) { int n = str . length ( ) ; int cl = corner . length ( ) ; if ( n < cl ) return false ; return ( str . substring ( 0 , cl ) . equals ( corner ) && str . substring ( n - cl , n ) . equals ( corner ) ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""geeksmanishgeeks""); param0.add(""shreyadhatwalia""); param0.add(""10000100""); param0.add(""abaa""); param0.add(""30645530""); param0.add(""0000011011001""); param0.add(""dkqEd""); param0.add(""48694119324654""); param0.add(""1101010010""); param0.add(""Ks""); List param1 = new ArrayList<>(); param1.add(""geeks""); param1.add(""abc""); param1.add(""100""); param1.add(""a""); param1.add(""30""); param1.add(""001""); param1.add(""d""); param1.add(""654""); param1.add(""11""); param1.add(""KsFLmngGGOmHKs""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str , corner ) : n = len ( str ) cl = len ( corner ) if ( n < cl ) : return False return ( ( str [ : cl ] == corner ) and ( str [ n - cl : ] == corner ) ) "," using namespace std; bool f_gold ( string str, string corner ) { int n = str . length ( ); int cl = corner . length ( ); if ( n < cl ) return false; return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == 0 ); } int main() { int n_success = 0; vector param0 {""geeksmanishgeeks"",""shreyadhatwalia"",""10000100"",""abaa"",""30645530"",""0000011011001"",""dkqEd"",""48694119324654"",""1101010010"",""Ks""}; vector param1 {""geeks"",""abc"",""100"",""a"",""30"",""001"",""d"",""654"",""11"",""KsFLmngGGOmHKs""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('geeksmanishgeeks','geeks',), ('shreyadhatwalia','abc',), ('10000100','100',), ('abaa','a',), ('30645530','30',), ('0000011011001','001',), ('dkqEd','d',), ('48694119324654','654',), ('1101010010','11',), ('Ks','KsFLmngGGOmHKs',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", FIND_NUMBER_ENDLESS_POINTS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_NUMBER_ENDLESS_POINTS{ static int f_gold ( boolean input [ ] [ ] , int n ) { boolean row [ ] [ ] = new boolean [ n ] [ n ] ; boolean col [ ] [ ] = new boolean [ n ] [ n ] ; for ( int j = 0 ; j < n ; j ++ ) { boolean isEndless = true ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( input [ i ] [ j ] == false ) isEndless = false ; col [ i ] [ j ] = isEndless ; } } for ( int i = 0 ; i < n ; i ++ ) { boolean isEndless = true ; for ( int j = n - 1 ; j >= 0 ; j -- ) { if ( input [ i ] [ j ] == false ) isEndless = false ; row [ i ] [ j ] = isEndless ; } } int ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 1 ; j < n ; j ++ ) if ( row [ i ] [ j ] && col [ i ] [ j ] ) ans ++ ; return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new boolean[][]{new boolean[]{false,false,false,true},new boolean[]{false,true,true,true},new boolean[]{false,false,true,true},new boolean[]{true,true,true,true}}); param0.add(new boolean[][]{new boolean[]{true,false,true,true,true,true,false,false,false},new boolean[]{false,true,true,true,true,true,false,true,true},new boolean[]{false,true,false,true,false,true,true,true,false},new boolean[]{false,false,false,false,true,true,false,false,true},new boolean[]{true,true,true,true,false,true,true,false,false},new boolean[]{false,false,true,true,false,true,false,false,true},new boolean[]{true,true,false,false,false,true,true,false,true},new boolean[]{false,true,true,false,false,false,false,false,false},new boolean[]{true,false,false,false,true,true,false,false,true}}); param0.add(new boolean[][]{new boolean[]{false,false,false,true},new boolean[]{false,false,true,true},new boolean[]{false,false,false,true},new boolean[]{false,false,true,true}}); param0.add(new boolean[][]{new boolean[]{false,true,true,false,false,true,false,false,true,false,false,false,true,false,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,false,false,false,true,false,true,true,true,false},new boolean[]{false,true,true,true,false,false,true,false,true,true,true,true,true,false,true,false,false,true,false,true,true,true,true,false,false,true,false,true,true,false,true,false,true,false,false,false,true,true,false},new boolean[]{false,true,true,false,true,false,false,true,false,true,true,false,true,true,false,true,false,true,false,true,false,true,true,false,true,false,true,false,true,false,false,false,false,true,false,false,true,true,true},new boolean[]{false,false,false,true,false,true,true,true,true,false,true,true,true,false,false,false,false,true,false,false,false,true,true,false,true,true,false,true,false,false,false,false,false,true,true,true,false,false,false},new boolean[]{true,false,false,true,false,false,false,true,false,true,true,false,false,true,true,true,false,false,false,false,false,true,true,false,true,false,false,true,false,true,false,false,false,true,false,true,false,true,false},new boolean[]{false,true,true,false,false,true,false,true,false,true,false,true,true,true,true,true,false,true,false,false,false,true,true,true,false,false,false,false,true,true,true,false,true,false,true,true,false,true,true},new boolean[]{false,false,true,false,true,true,true,true,false,true,true,true,true,false,false,true,false,true,false,false,false,true,true,true,false,true,true,true,false,false,false,false,false,true,true,false,true,true,false},new boolean[]{false,true,false,false,true,false,false,false,true,false,true,true,true,false,true,true,false,false,false,true,true,true,false,true,false,false,true,false,true,false,false,true,false,true,true,false,true,false,true},new boolean[]{true,true,true,false,true,true,true,false,false,false,false,true,true,false,false,false,true,false,false,true,false,false,false,true,true,false,false,false,true,true,false,true,false,true,false,false,false,true,false},new boolean[]{false,false,true,false,true,true,true,false,true,false,false,false,true,false,true,false,true,false,false,false,false,true,false,false,true,false,true,false,false,true,false,true,true,false,true,false,false,false,false},new boolean[]{true,false,true,true,true,false,true,true,false,true,false,true,false,false,false,true,true,true,true,true,false,true,true,false,true,true,true,true,false,false,true,false,false,false,false,true,false,false,false},new boolean[]{false,true,true,false,true,false,true,true,true,true,false,false,false,false,true,false,true,true,true,false,true,false,false,true,true,true,true,false,false,true,false,false,true,false,false,true,false,true,true},new boolean[]{false,false,false,false,true,false,false,true,true,true,false,true,true,false,true,false,false,false,true,true,true,true,true,false,false,true,false,false,true,false,true,false,false,false,true,true,true,false,false},new boolean[]{false,true,false,true,false,true,true,true,false,false,true,true,true,false,false,true,true,false,true,true,false,true,false,true,true,false,false,true,false,false,true,false,false,true,true,false,false,false,true},new boolean[]{false,false,true,false,true,true,false,false,false,true,true,true,true,true,false,true,false,false,false,false,false,false,true,false,false,false,false,false,true,true,false,false,false,true,false,true,true,false,false},new boolean[]{false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,false,false,true,false,true,true,true,true,true,false,true,false,true,true,true,false,false,true,true,false,false,false,false,false},new boolean[]{true,true,false,false,true,true,true,false,false,false,true,true,true,true,false,true,false,false,true,true,false,true,true,true,false,true,true,false,false,false,true,true,false,false,false,false,true,false,true},new boolean[]{false,false,false,true,false,false,true,false,true,true,false,true,true,true,false,true,false,false,true,true,false,false,true,false,false,true,false,false,false,true,false,false,false,true,false,false,false,false,false},new boolean[]{false,true,false,false,true,false,true,true,true,false,true,true,true,true,true,false,false,false,true,false,true,true,true,false,true,false,true,false,false,true,true,true,true,true,false,true,true,true,true},new boolean[]{true,false,true,false,true,true,false,false,false,true,true,false,true,true,true,true,true,false,false,true,false,true,false,true,true,true,true,true,false,false,true,true,false,true,false,true,false,false,false},new boolean[]{true,true,false,false,false,false,false,true,true,true,false,true,false,true,true,true,false,true,false,true,true,false,true,true,true,false,false,true,true,true,false,true,false,true,true,false,true,false,true},new boolean[]{false,false,false,false,true,true,true,false,false,true,true,true,false,false,true,true,true,false,true,false,false,true,false,false,true,false,true,true,true,true,false,true,true,false,false,true,false,true,true},new boolean[]{false,true,true,false,true,true,true,true,false,false,true,false,false,true,true,true,false,false,false,true,true,true,false,true,true,true,true,false,true,false,true,false,false,false,true,false,false,true,true},new boolean[]{true,false,false,false,false,true,true,false,false,true,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,false,false,true,true,true,true,true,false,false,true,true,true},new boolean[]{true,true,true,false,false,true,false,true,false,true,true,true,true,false,false,true,true,true,false,false,false,true,false,false,false,false,false,true,true,true,false,true,true,false,false,false,true,true,true},new boolean[]{true,false,true,true,true,false,false,true,true,false,false,false,true,true,false,true,false,true,true,true,false,false,false,true,false,false,true,true,true,false,true,false,false,true,true,true,false,false,true},new boolean[]{false,false,false,true,true,false,false,false,true,true,false,false,false,true,false,true,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,false,false,true},new boolean[]{false,false,false,true,false,false,false,true,false,false,true,false,false,true,false,true,true,false,true,true,true,true,true,true,false,false,false,true,true,true,true,false,false,false,false,false,true,true,true},new boolean[]{false,true,false,true,true,false,true,true,true,true,true,true,false,false,true,true,true,true,false,false,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,false,true,true,false},new boolean[]{true,false,false,true,false,true,true,true,true,false,false,true,false,false,false,true,true,true,false,false,true,false,false,false,false,true,false,true,true,false,false,true,false,false,true,true,true,true,true},new boolean[]{false,true,true,true,false,false,true,false,false,true,false,false,true,true,true,false,false,true,false,false,false,true,false,true,true,true,false,true,false,false,true,true,false,false,false,true,false,true,false},new boolean[]{false,false,true,false,true,false,false,false,false,true,false,false,false,true,true,false,false,true,false,false,true,false,true,false,true,false,false,false,true,true,false,true,false,false,false,true,false,true,true},new boolean[]{false,true,false,false,true,true,true,true,true,true,false,false,true,false,true,false,false,true,true,true,true,false,false,true,false,true,false,true,true,true,true,true,true,false,true,false,false,true,true},new boolean[]{false,false,false,true,true,true,false,false,false,false,true,true,false,true,false,false,true,false,false,false,true,true,true,true,false,true,false,true,true,true,false,true,true,true,false,false,false,false,false},new boolean[]{false,false,true,true,true,false,true,false,true,true,true,true,false,true,false,true,false,false,true,false,false,true,false,true,false,true,false,true,true,false,false,false,true,false,false,false,true,false,true},new boolean[]{false,false,false,false,true,true,false,true,false,true,false,true,true,true,false,false,false,true,false,false,true,false,false,false,false,false,true,false,true,true,true,false,false,true,true,true,true,true,false},new boolean[]{true,true,true,true,false,false,false,true,false,false,false,true,false,false,true,false,false,false,false,false,true,true,false,false,false,false,false,true,true,true,true,true,true,true,true,false,true,true,true},new boolean[]{true,false,false,true,true,false,true,false,false,false,true,false,true,false,false,false,false,true,true,false,false,false,true,false,false,true,true,true,false,true,true,false,false,false,false,true,false,false,false},new boolean[]{true,true,false,true,true,false,true,true,false,false,true,true,true,false,true,false,true,false,true,false,true,false,true,true,true,true,false,false,false,false,false,true,true,false,false,true,true,false,false}}); param0.add(new boolean[][]{new boolean[]{false,false,false,false,false,true,true,true,true},new boolean[]{false,false,false,false,true,true,true,true,true},new boolean[]{false,false,false,false,false,true,true,true,true},new boolean[]{false,false,false,false,false,true,true,true,true},new boolean[]{false,false,false,false,false,false,true,true,true},new boolean[]{true,true,true,true,true,true,true,true,true},new boolean[]{false,false,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,true,true,true,true},new boolean[]{false,false,false,false,false,false,true,true,true}}); param0.add(new boolean[][]{new boolean[]{false,true,true,true,true,false,false,true,false,false,false,true,true,false,true,false,false,false,false,true,true,true,true,false,false},new boolean[]{false,true,false,false,false,false,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true},new boolean[]{true,false,false,false,true,false,false,true,true,false,true,false,true,true,false,false,true,false,true,true,true,false,false,true,true},new boolean[]{false,true,true,false,true,true,true,true,false,true,false,false,false,true,false,false,false,false,true,false,true,true,false,true,false},new boolean[]{true,true,true,false,true,true,false,false,true,true,false,false,false,true,true,false,true,false,false,true,true,false,false,true,false},new boolean[]{true,false,false,true,false,false,true,false,true,true,true,false,false,true,false,true,true,false,false,false,false,false,true,true,false},new boolean[]{true,false,false,false,false,false,false,false,true,false,true,false,true,false,false,false,true,true,true,true,false,true,false,false,false},new boolean[]{true,false,true,false,false,false,false,false,true,false,true,false,true,false,true,false,false,true,true,false,false,true,false,true,false},new boolean[]{true,true,true,false,true,true,true,false,false,false,true,true,false,true,true,false,true,true,false,false,false,true,false,true,false},new boolean[]{true,false,true,false,true,false,true,true,false,true,true,false,false,true,true,true,true,true,false,false,true,false,true,true,false},new boolean[]{true,false,false,false,true,true,false,false,true,false,false,false,true,true,false,true,false,false,true,true,false,false,false,false,true},new boolean[]{false,true,false,true,true,false,true,false,false,true,false,false,false,false,false,true,false,true,true,true,false,true,true,false,false},new boolean[]{true,false,false,true,true,false,false,true,false,true,false,false,false,true,false,false,true,true,false,true,true,true,true,true,false},new boolean[]{false,true,true,true,true,false,false,false,false,true,true,true,true,false,true,true,false,false,true,true,true,true,true,true,false},new boolean[]{true,false,true,false,false,true,false,true,true,true,true,false,true,true,false,true,false,true,true,false,true,true,true,false,true},new boolean[]{true,true,true,false,false,false,true,false,true,false,true,false,true,true,false,false,true,true,true,false,false,true,true,false,true},new boolean[]{false,false,true,true,true,false,false,false,true,true,false,true,true,true,false,true,false,true,true,false,false,false,false,false,false},new boolean[]{false,false,false,true,true,true,true,false,false,true,true,true,false,true,true,false,true,true,true,false,false,true,false,true,false},new boolean[]{false,false,true,false,false,true,false,true,false,false,false,false,true,false,false,false,false,true,false,true,false,false,true,false,false},new boolean[]{false,false,true,true,false,false,false,true,true,true,false,false,true,false,false,true,true,false,false,false,false,true,false,true,false},new boolean[]{true,false,false,false,false,true,false,true,false,false,false,false,true,false,true,false,false,true,true,true,false,false,false,true,true},new boolean[]{false,true,false,false,true,false,false,true,false,true,true,true,true,false,true,false,true,true,false,true,true,false,false,false,false},new boolean[]{true,false,true,true,false,true,true,true,true,true,true,false,false,true,true,true,false,false,false,true,false,true,true,false,false},new boolean[]{true,true,true,false,true,false,true,true,true,false,true,true,true,false,false,false,false,true,false,true,true,true,true,false,true},new boolean[]{true,true,true,true,false,true,false,false,false,true,false,false,true,false,true,false,true,true,false,false,false,true,false,false,true}}); param0.add(new boolean[][]{new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true},new boolean[]{false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true}}); param0.add(new boolean[][]{new boolean[]{true,false,true,false,false,false,true,true,false,true,false,true,true,true,false,false,false,false,true,false,true,false,false,true,false,false,true},new boolean[]{false,true,false,true,false,false,true,true,false,false,false,true,true,false,true,false,true,false,true,false,true,false,false,false,false,true,true},new boolean[]{true,false,true,true,true,false,false,true,true,true,true,true,true,true,true,false,false,false,true,false,true,true,false,false,true,false,true},new boolean[]{true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,false,true,false,false,true,true,true,false,false,true},new boolean[]{true,false,true,false,false,true,true,false,false,true,true,true,false,false,false,true,false,true,false,true,true,true,true,true,true,false,false},new boolean[]{true,false,false,true,true,false,false,true,false,true,true,true,true,false,false,true,true,true,false,false,true,false,false,true,true,true,false},new boolean[]{true,false,true,true,true,true,false,true,false,false,false,true,true,false,true,true,false,true,true,false,true,false,false,false,false,false,false},new boolean[]{true,false,false,true,false,false,true,true,true,false,true,false,false,false,true,true,true,true,false,true,false,false,true,false,true,false,true},new boolean[]{false,true,false,true,false,true,true,true,false,true,true,false,false,false,true,false,false,false,false,true,true,false,true,false,true,false,true},new boolean[]{false,true,true,true,false,true,false,true,false,true,true,false,true,true,true,true,true,true,true,false,true,true,false,false,true,false,true},new boolean[]{false,true,false,false,true,true,false,false,false,false,true,true,false,false,true,false,false,true,true,true,true,false,false,true,false,false,true},new boolean[]{false,false,true,true,false,true,true,true,false,false,false,false,true,false,true,false,true,false,false,true,false,false,true,true,true,false,false},new boolean[]{true,true,false,false,true,true,false,false,true,true,true,false,false,true,true,false,false,false,true,false,false,false,true,false,false,false,true},new boolean[]{false,true,true,true,false,true,true,true,false,false,false,false,false,true,true,false,false,false,false,false,true,false,true,true,false,true,false},new boolean[]{true,true,true,true,true,true,true,true,true,false,true,true,true,true,false,false,false,false,false,true,false,false,false,false,false,false,true},new boolean[]{false,false,false,true,false,false,false,false,false,true,false,false,false,false,false,false,false,true,false,true,false,true,false,true,false,true,false},new boolean[]{true,true,false,true,true,true,true,true,true,false,false,true,true,false,true,true,false,false,false,false,false,true,true,false,false,false,false},new boolean[]{false,false,false,false,true,true,true,false,true,true,false,true,false,false,true,true,false,false,false,false,true,true,false,true,true,false,false},new boolean[]{true,false,true,true,false,true,false,false,false,false,false,false,false,false,true,false,true,true,false,true,true,true,true,false,false,false,true},new boolean[]{true,false,false,false,true,false,true,false,true,true,false,false,false,true,false,true,true,true,false,false,false,true,false,true,true,false,true},new boolean[]{true,false,true,true,true,true,false,true,true,false,true,true,true,false,false,true,true,false,false,false,false,false,true,false,true,true,true},new boolean[]{true,true,false,false,false,true,false,true,true,true,true,false,true,true,true,true,true,true,false,false,false,false,true,true,false,false,false},new boolean[]{true,false,false,false,false,false,false,true,true,true,false,true,false,false,false,false,true,false,false,false,true,true,false,true,true,true,true},new boolean[]{false,true,true,true,true,false,false,false,true,true,false,true,false,false,false,true,false,false,true,true,true,false,false,false,true,true,true},new boolean[]{false,false,true,true,false,true,true,false,false,true,true,true,false,false,true,false,true,true,true,true,false,true,true,true,true,false,false},new boolean[]{true,true,false,true,false,true,false,true,true,false,false,true,false,false,true,true,false,false,true,true,false,true,true,true,true,false,false},new boolean[]{true,false,true,false,true,true,true,true,true,false,false,false,false,false,false,true,true,false,false,false,false,false,false,true,false,true,true}}); param0.add(new boolean[][]{new boolean[]{false,false,false,true},new boolean[]{false,true,true,true},new boolean[]{false,false,false,true},new boolean[]{false,true,true,true}}); param0.add(new boolean[][]{new boolean[]{true,true,false,false,true,true,true,true,true,false,true,true,false,true,true,false,false,false,false,false,true,false,true,false,true,true,false,true},new boolean[]{false,false,true,true,false,false,false,true,true,false,false,true,false,true,false,false,true,true,false,false,true,true,true,true,false,true,false,false},new boolean[]{true,true,false,false,false,true,false,true,true,true,false,true,false,true,false,false,true,true,false,true,true,false,true,true,false,false,false,false},new boolean[]{true,false,true,false,true,false,true,false,false,true,true,true,true,true,true,false,true,false,false,true,false,false,false,true,false,true,false,true},new boolean[]{true,true,true,true,false,false,false,true,true,false,true,false,true,false,true,true,true,true,false,false,true,true,true,true,false,true,true,true},new boolean[]{true,false,true,true,true,true,true,true,false,true,false,false,false,false,false,true,false,true,true,false,true,true,false,true,false,false,false,true},new boolean[]{true,true,false,false,false,true,true,false,true,false,true,false,false,false,true,true,true,false,false,true,true,false,true,false,false,false,true,false},new boolean[]{false,true,true,true,true,false,false,true,false,false,false,false,false,false,false,false,true,false,true,false,false,true,false,true,true,true,false,true},new boolean[]{true,false,true,false,false,false,true,false,true,true,true,true,false,true,true,true,false,false,true,true,false,false,false,false,true,false,false,false},new boolean[]{false,false,true,true,false,true,false,false,true,true,true,true,false,false,true,false,false,true,true,false,true,false,true,true,false,true,true,true},new boolean[]{true,false,true,true,true,true,false,true,true,true,false,true,true,false,false,false,true,false,true,true,true,true,true,false,false,false,false,false},new boolean[]{false,false,false,false,true,false,true,true,true,false,false,false,false,true,false,false,true,true,false,true,true,true,true,true,true,true,true,false},new boolean[]{false,false,false,true,true,false,false,true,false,false,false,false,true,true,true,true,false,false,true,true,true,true,true,true,true,true,false,false},new boolean[]{false,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,false,false,false,true,false,true,false},new boolean[]{false,true,false,false,false,true,true,false,false,true,false,true,false,true,false,true,true,false,true,true,false,false,true,false,true,false,false,true},new boolean[]{true,true,false,true,true,true,true,true,false,false,false,true,true,false,false,true,true,true,false,false,false,false,true,false,true,true,false,true},new boolean[]{true,false,true,false,false,false,true,true,false,true,true,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true},new boolean[]{true,false,true,false,true,false,false,false,true,true,true,false,true,true,true,false,false,false,false,false,true,true,true,true,true,true,false,false},new boolean[]{true,false,true,false,true,true,true,false,false,false,false,false,false,false,true,true,false,false,false,true,true,true,true,false,true,false,false,false},new boolean[]{false,false,true,false,true,false,true,false,true,true,false,true,true,true,false,false,true,true,true,false,false,false,false,false,false,false,false,false},new boolean[]{true,false,true,false,true,true,true,true,false,true,true,false,false,true,true,false,true,false,true,true,true,true,true,true,false,false,true,false},new boolean[]{true,false,false,true,false,false,false,false,false,true,true,false,false,true,false,false,true,false,true,false,true,false,true,true,false,true,false,false},new boolean[]{false,true,true,true,true,true,true,false,false,true,true,false,true,false,true,true,true,false,true,true,true,true,false,true,false,false,false,false},new boolean[]{true,true,false,false,true,true,false,false,true,false,false,false,true,false,false,false,false,false,true,true,true,false,true,true,false,false,true,false},new boolean[]{false,true,true,true,true,true,true,true,false,true,false,false,false,true,true,false,false,true,true,false,false,true,false,true,true,false,true,false},new boolean[]{true,true,true,true,true,true,true,true,false,true,false,false,true,false,true,false,true,true,true,true,false,false,true,false,true,false,true,true},new boolean[]{true,false,true,true,true,false,false,true,false,true,true,false,false,false,true,true,true,false,false,true,false,false,true,true,true,true,false,true},new boolean[]{false,true,true,false,false,false,true,true,true,true,false,true,true,false,false,false,true,true,true,true,false,true,true,true,true,false,true,false}}); List param1 = new ArrayList<>(); param1.add(2); param1.add(4); param1.add(2); param1.add(30); param1.add(7); param1.add(13); param1.add(19); param1.add(15); param1.add(3); param1.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, CHECK_STRING_FOLLOWS_ANBN_PATTERN_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_STRING_FOLLOWS_ANBN_PATTERN_NOT{ public static boolean f_gold ( String s ) { int l = s . length ( ) ; if ( l % 2 == 1 ) { return false ; } int i = 0 ; int j = l - 1 ; while ( i < j ) { if ( s . charAt ( i ) != 'a' || s . charAt ( j ) != 'b' ) { return false ; } i ++ ; j -- ; } return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""ba""); param0.add(""aabb""); param0.add(""abab""); param0.add(""aaabb""); param0.add(""aabbb""); param0.add(""abaabbaa""); param0.add(""abaababb""); param0.add(""bbaa""); param0.add(""11001000""); param0.add(""ZWXv te""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( str ) : n = len ( str ) for i in range ( n ) : if ( str [ i ] != 'a' ) : break if ( i * 2 != n ) : return False for j in range ( i , n ) : if ( str [ j ] != 'b' ) : return False return True "," using namespace std; bool f_gold ( string str ) { int n = str . length ( ); int i; for ( i = 0; i < n; i ++ ) if ( str [ i ] != 'a' ) break; if ( i * 2 != n ) return false; int j; for ( j = i; j < n; j ++ ) if ( str [ j ] != 'b' ) return false; return true; } int main() { int n_success = 0; vector param0 {""ba"",""aabb"",""abab"",""aaabb"",""aabbb"",""abaabbaa"",""abaababb"",""bbaa"",""11001000"",""ZWXv te""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('ba',), ('aabb',), ('abab',), ('aaabb',), ('aabbb',), ('abaabbaa',), ('abaababb',), ('bbaa',), ('11001000',), ('ZWXv te',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", MAXIMUM_SUBARRAY_SUM_USING_PREFIX_SUM," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUBARRAY_SUM_USING_PREFIX_SUM{ static int f_gold ( int arr [ ] , int n ) { int min_prefix_sum = 0 ; int res = Integer . MIN_VALUE ; int prefix_sum [ ] = new int [ n ] ; prefix_sum [ 0 ] = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) prefix_sum [ i ] = prefix_sum [ i - 1 ] + arr [ i ] ; for ( int i = 0 ; i < n ; i ++ ) { res = Math . max ( res , prefix_sum [ i ] - min_prefix_sum ) ; min_prefix_sum = Math . min ( min_prefix_sum , prefix_sum [ i ] ) ; } return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,9,11,17,18,19,23,24,27,30,31,31,35,44,46,47,49,51,55,58,59,61,65,67,71,71,71,71,78,78,82,91,98}); param0.add(new int[]{-82,-28,-66,-52,-36,36,-88,52,-62,46,42,26,-60,18,-52,38,94,-68,44,-94,14,36,-70}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{28,36,42,42,5,52,74,86,55,82,59,81,4,90,24,34,20,99,86,25,52,48,62,5,67,83,60,72,80,73,38,55,8,70,95}); param0.add(new int[]{-92,-52,-24,36,56}); param0.add(new int[]{0,1,1,1,0,1,0,1,0,0,1,1,0,1,1,0,0,0}); param0.add(new int[]{1,1,4,4,7,7,17,18,20,26,26,32,37,38,42,44,44,46,50,53,57,58,58,60,61,61,64,74,75,77,83,83,84,84,85,87,88,90,95,96,97,98,99,99}); param0.add(new int[]{-86,2,26,54,-16,16,48,24,50,-10,-32,-62,48,-12,-66}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{58,14,79,11,31,28,61,86,25,27,75,78,32,55,86,48,15,51,6,78,23,82,16,62,35,51,91,16,79,38,97,30,23,58,95,57,82,35,57,43,22,41,58,69,25,65,13,79}); List param1 = new ArrayList<>(); param1.add(20); param1.add(15); param1.add(19); param1.add(19); param1.add(3); param1.add(13); param1.add(25); param1.add(13); param1.add(14); param1.add(39); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","import math def f_gold ( arr , n ) : min_prefix_sum = 0 res = - math.inf prefix_sum = [ ] prefix_sum.append ( arr [ 0 ] ) for i in range ( 1 , n ) : prefix_sum.append ( prefix_sum [ i - 1 ] + arr [ i ] ) for i in range ( n ) : res = max ( res , prefix_sum [ i ] - min_prefix_sum ) min_prefix_sum = min ( min_prefix_sum , prefix_sum [ i ] ) return res "," using namespace std; int f_gold ( int arr [ ], int n ) { int min_prefix_sum = 0; int res = numeric_limits < int > :: min ( ); int prefix_sum [ n ]; prefix_sum [ 0 ] = arr [ 0 ]; for ( int i = 1; i < n; i ++ ) prefix_sum [ i ] = prefix_sum [ i - 1 ] + arr [ i ]; for ( int i = 0; i < n; i ++ ) { res = max ( res, prefix_sum [ i ] - min_prefix_sum ); min_prefix_sum = min ( min_prefix_sum, prefix_sum [ i ] ); } return res; } int main() { int n_success = 0; vector> param0 {{8,9,11,17,18,19,23,24,27,30,31,31,35,44,46,47,49,51,55,58,59,61,65,67,71,71,71,71,78,78,82,91,98},{-82,-28,-66,-52,-36,36,-88,52,-62,46,42,26,-60,18,-52,38,94,-68,44,-94,14,36,-70},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{28,36,42,42,5,52,74,86,55,82,59,81,4,90,24,34,20,99,86,25,52,48,62,5,67,83,60,72,80,73,38,55,8,70,95},{-92,-52,-24,36,56},{0,1,1,1,0,1,0,1,0,0,1,1,0,1,1,0,0,0},{1,1,4,4,7,7,17,18,20,26,26,32,37,38,42,44,44,46,50,53,57,58,58,60,61,61,64,74,75,77,83,83,84,84,85,87,88,90,95,96,97,98,99,99},{-86,2,26,54,-16,16,48,24,50,-10,-32,-62,48,-12,-66},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{58,14,79,11,31,28,61,86,25,27,75,78,32,55,86,48,15,51,6,78,23,82,16,62,35,51,91,16,79,38,97,30,23,58,95,57,82,35,57,43,22,41,58,69,25,65,13,79}}; vector param1 {20,15,19,19,3,13,25,13,14,39}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 9, 11, 17, 18, 19, 23, 24, 27, 30, 31, 31, 35, 44, 46, 47, 49, 51, 55, 58, 59, 61, 65, 67, 71, 71, 71, 71, 78, 78, 82, 91, 98],20,), ([-82, -28, -66, -52, -36, 36, -88, 52, -62, 46, 42, 26, -60, 18, -52, 38, 94, -68, 44, -94, 14, 36, -70],15,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],19,), ([28, 36, 42, 42, 5, 52, 74, 86, 55, 82, 59, 81, 4, 90, 24, 34, 20, 99, 86, 25, 52, 48, 62, 5, 67, 83, 60, 72, 80, 73, 38, 55, 8, 70, 95],19,), ([-92, -52, -24, 36, 56],3,), ([0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0],13,), ([1, 1, 4, 4, 7, 7, 17, 18, 20, 26, 26, 32, 37, 38, 42, 44, 44, 46, 50, 53, 57, 58, 58, 60, 61, 61, 64, 74, 75, 77, 83, 83, 84, 84, 85, 87, 88, 90, 95, 96, 97, 98, 99, 99],25,), ([-86, 2, 26, 54, -16, 16, 48, 24, 50, -10, -32, -62, 48, -12, -66],13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([58, 14, 79, 11, 31, 28, 61, 86, 25, 27, 75, 78, 32, 55, 86, 48, 15, 51, 6, 78, 23, 82, 16, 62, 35, 51, 91, 16, 79, 38, 97, 30, 23, 58, 95, 57, 82, 35, 57, 43, 22, 41, 58, 69, 25, 65, 13, 79],39,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_1{ public static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > hm = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( hm . containsKey ( arr [ i ] ) ) hm . put ( arr [ i ] , hm . get ( arr [ i ] ) + 1 ) ; else hm . put ( arr [ i ] , 1 ) ; } int ans = 0 ; for ( Map . Entry < Integer , Integer > it : hm . entrySet ( ) ) { int count = it . getValue ( ) ; ans += ( count * ( count - 1 ) ) / 2 ; } return ans ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,11,18,22,40,46,50,51,53,55,64,67,73,78,86}); param0.add(new int[]{14,-98,98,58,-82,90,-80,-56,-30,-36,-56,-30,-58,68,72,-76,38,-90,-72,4,-32,32,-28,2,12,-72,54,2,0,-74,8,12,46,72,-84,-66,70,18,26,72,-26,44,-8,20,-32,-56,28}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{93,23,62,64,31,78,99}); param0.add(new int[]{-94,-94,-92,-86,-84,-76,-76,-68,-66,-56,-56,-54,-50,-46,-38,-34,-34,-30,-26,-18,-16,2,8,42,52,54,56,64,68,82,82,82,94,96,98}); param0.add(new int[]{0}); param0.add(new int[]{3,18,18,20,21,23,24,27,35,36,38,40,46,50,50,51,52,53,59,61,63,63,65,66,68,68,70,71,74,75,96,98}); param0.add(new int[]{-68,40,16,50,36,42,-20,-46,-92,4,-18,-12,48,0,-46,64,-74,-50,42,44,-56,28,-10,78,62,70,-60,12,-44,-78}); param0.add(new int[]{0,0,0,0,0,0,0,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}); param0.add(new int[]{31,5}); List param1 = new ArrayList<>(); param1.add(14); param1.add(24); param1.add(13); param1.add(4); param1.add(19); param1.add(0); param1.add(19); param1.add(23); param1.add(30); param1.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : mp = dict ( ) for i in range ( n ) : if arr [ i ] in mp.keys ( ) : mp [ arr [ i ] ] += 1 else : mp [ arr [ i ] ] = 1 ans = 0 for it in mp : count = mp [ it ] ans += ( count * ( count - 1 ) ) // 2 return ans "," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; int ans = 0; for ( auto it = mp . begin ( ); it != mp . end ( ); it ++ ) { int count = it -> second; ans += ( count * ( count - 1 ) ) / 2; } return ans; } int main() { int n_success = 0; vector> param0 {{5,11,18,22,40,46,50,51,53,55,64,67,73,78,86},{14,-98,98,58,-82,90,-80,-56,-30,-36,-56,-30,-58,68,72,-76,38,-90,-72,4,-32,32,-28,2,12,-72,54,2,0,-74,8,12,46,72,-84,-66,70,18,26,72,-26,44,-8,20,-32,-56,28},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{93,23,62,64,31,78,99},{-94,-94,-92,-86,-84,-76,-76,-68,-66,-56,-56,-54,-50,-46,-38,-34,-34,-30,-26,-18,-16,2,8,42,52,54,56,64,68,82,82,82,94,96,98},{0},{3,18,18,20,21,23,24,27,35,36,38,40,46,50,50,51,52,53,59,61,63,63,65,66,68,68,70,71,74,75,96,98},{-68,40,16,50,36,42,-20,-46,-92,4,-18,-12,48,0,-46,64,-74,-50,42,44,-56,28,-10,78,62,70,-60,12,-44,-78},{0,0,0,0,0,0,0,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},{31,5}}; vector param1 {14,24,13,4,19,0,19,23,30,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 11, 18, 22, 40, 46, 50, 51, 53, 55, 64, 67, 73, 78, 86],14,), ([14, -98, 98, 58, -82, 90, -80, -56, -30, -36, -56, -30, -58, 68, 72, -76, 38, -90, -72, 4, -32, 32, -28, 2, 12, -72, 54, 2, 0, -74, 8, 12, 46, 72, -84, -66, 70, 18, 26, 72, -26, 44, -8, 20, -32, -56, 28],24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([93, 23, 62, 64, 31, 78, 99],4,), ([-94, -94, -92, -86, -84, -76, -76, -68, -66, -56, -56, -54, -50, -46, -38, -34, -34, -30, -26, -18, -16, 2, 8, 42, 52, 54, 56, 64, 68, 82, 82, 82, 94, 96, 98],19,), ([0],0,), ([3, 18, 18, 20, 21, 23, 24, 27, 35, 36, 38, 40, 46, 50, 50, 51, 52, 53, 59, 61, 63, 63, 65, 66, 68, 68, 70, 71, 74, 75, 96, 98],19,), ([-68, 40, 16, 50, 36, 42, -20, -46, -92, 4, -18, -12, 48, 0, -46, 64, -74, -50, 42, 44, -56, 28, -10, 78, 62, 70, -60, 12, -44, -78],23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],30,), ([31, 5],1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", HOW_TO_COMPUTE_MOD_OF_A_BIG_NUMBER," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_TO_COMPUTE_MOD_OF_A_BIG_NUMBER{ static int f_gold ( String num , int a ) { int res = 0 ; for ( int i = 0 ; i < num . length ( ) ; i ++ ) res = ( res * 10 + ( int ) num . charAt ( i ) - '0' ) % a ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""RElCP""); param0.add(""0139035510""); param0.add(""00011110""); param0.add(""TwanZWwLNXhFN""); param0.add(""6247009752778""); param0.add(""0100001011011""); param0.add(""NCh""); param0.add(""00714746542""); param0.add(""101000100""); param0.add(""MSTkXmlbPkV""); List param1 = new ArrayList<>(); param1.add(13); param1.add(44); param1.add(86); param1.add(66); param1.add(55); param1.add(33); param1.add(75); param1.add(54); param1.add(93); param1.add(78); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string num, int a ) { int res = 0; for ( int i = 0; i < num . length ( ); i ++ ) res = ( res * 10 + ( int ) num [ i ] - '0' ) % a; return res; } int main() { int n_success = 0; vector param0 {""RElCP"",""0139035510"",""00011110"",""TwanZWwLNXhFN"",""6247009752778"",""0100001011011"",""NCh"",""00714746542"",""101000100"",""MSTkXmlbPkV""}; vector param1 {13,44,86,66,55,33,75,54,93,78}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S{ static int f_gold ( int arr [ ] , int n ) { int sum = 0 ; int maxsize = - 1 , startindex = 0 ; int endindex = 0 ; for ( int i = 0 ; i < n - 1 ; i ++ ) { sum = ( arr [ i ] == 0 ) ? - 1 : 1 ; for ( int j = i + 1 ; j < n ; j ++ ) { if ( arr [ j ] == 0 ) sum += - 1 ; else sum += 1 ; if ( sum == 0 && maxsize < j - i + 1 ) { maxsize = j - i + 1 ; startindex = i ; } } } endindex = startindex + maxsize - 1 ; if ( maxsize == - 1 ) System . out . println ( ""No such subarray"" ) ; else System . out . println ( startindex + "" to "" + endindex ) ; return maxsize ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{56,8,67,35,19,82,81,66,10,24,82,2,42,48,18,63,48,74,60,64,64,95,95,20,95,55,63,96,54}); param0.add(new int[]{78,67,1,78,48,83,17,19,21,44,99,68,16,54,9}); param0.add(new int[]{3,69,97,21,12,67,45,53,77,70,26,43}); param0.add(new int[]{21,80,29,22,77,64,42,4,71,75,62,27,30,36,66,37,49,97}); param0.add(new int[]{18,66,9,90,21,95,74,48,44,9,43,17}); param0.add(new int[]{42,41,87,3,64,25,96,55,99,57,32,64,10,75,69,95,11,36,15,2,78,70,14,54,11,28,55,47,27,85,47,62,97,68,44,70,12,27,36,85,76,91,17,75,83,34,32,89,55}); param0.add(new int[]{44}); param0.add(new int[]{1,43,28,17,30,46,89,51,15,70,96,79,65,55,8}); param0.add(new int[]{25,91,68,4,35,49,33}); param0.add(new int[]{14,86,22,42,94,54,28,41,48,8,82,84,99,92,33,75,38,31,59,86,21,6,77,89,79,83,57,26,89,45,60,55,60,76,76,6,40,57,38,44,7,98,64,65,88,73,88,99}); List param1 = new ArrayList<>(); param1.add(26); param1.add(8); param1.add(9); param1.add(10); param1.add(10); param1.add(41); param1.add(0); param1.add(9); param1.add(4); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(arr, n): sum = 0 maxsize = - 1 for i in range(0, n - 1): sum = - 1 if (arr[i] == 0) else 1 for j in range(i + 1, n): sum = sum + (- 1) if (arr[j] == 0) else sum + 1 if (sum == 0 and maxsize < j - i + 1): maxsize = j - i + 1 startindex = i if (maxsize == - 1): print(""No such subarray"") else: print(startindex, ""to"", startindex + maxsize - 1) return maxsize "," using namespace std; int f_gold ( int arr [ ], int n ) { int sum = 0; int maxsize = - 1, startindex; for ( int i = 0; i < n - 1; i ++ ) { sum = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int j = i + 1; j < n; j ++ ) { ( arr [ j ] == 0 ) ? ( sum += - 1 ) : ( sum += 1 ); if ( sum == 0 && maxsize < j - i + 1 ) { maxsize = j - i + 1; startindex = i; } } } if ( maxsize == - 1 ) cout << ""No such subarray""; else cout << startindex << "" to "" << startindex + maxsize - 1; return maxsize; } int main() { int n_success = 0; vector> param0 {{56,8,67,35,19,82,81,66,10,24,82,2,42,48,18,63,48,74,60,64,64,95,95,20,95,55,63,96,54},{78,67,1,78,48,83,17,19,21,44,99,68,16,54,9},{3,69,97,21,12,67,45,53,77,70,26,43},{21,80,29,22,77,64,42,4,71,75,62,27,30,36,66,37,49,97},{18,66,9,90,21,95,74,48,44,9,43,17},{42,41,87,3,64,25,96,55,99,57,32,64,10,75,69,95,11,36,15,2,78,70,14,54,11,28,55,47,27,85,47,62,97,68,44,70,12,27,36,85,76,91,17,75,83,34,32,89,55},{44},{1,43,28,17,30,46,89,51,15,70,96,79,65,55,8},{25,91,68,4,35,49,33},{14,86,22,42,94,54,28,41,48,8,82,84,99,92,33,75,38,31,59,86,21,6,77,89,79,83,57,26,89,45,60,55,60,76,76,6,40,57,38,44,7,98,64,65,88,73,88,99}}; vector param1 {26,8,9,10,10,41,0,9,4,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([56, 8, 67, 35, 19, 82, 81, 66, 10, 24, 82, 2, 42, 48, 18, 63, 48, 74, 60, 64, 64, 95, 95, 20, 95, 55, 63, 96, 54], 26,), ([78, 67, 1, 78, 48, 83, 17, 19, 21, 44, 99, 68, 16, 54, 9], 8,), ([3, 69, 97, 21, 12, 67, 45, 53, 77, 70, 26, 43], 9,), ([21, 80, 29, 22, 77, 64, 42, 4, 71, 75, 62, 27, 30, 36, 66, 37, 49, 97], 10,), ([18, 66, 9, 90, 21, 95, 74, 48, 44, 9, 43, 17], 10,), ([42, 41, 87, 3, 64, 25, 96, 55, 99, 57, 32, 64, 10, 75, 69, 95, 11, 36, 15, 2, 78, 70, 14, 54, 11, 28, 55, 47, 27, 85, 47, 62, 97, 68, 44, 70, 12, 27, 36, 85, 76, 91, 17, 75, 83, 34, 32, 89, 55], 41,), ([44], 0,), ([1, 43, 28, 17, 30, 46, 89, 51, 15, 70, 96, 79, 65, 55, 8], 9,), ([25, 91, 68, 4, 35, 49, 33], 4,), ([14, 86, 22, 42, 94, 54, 28, 41, 48, 8, 82, 84, 99, 92, 33, 75, 38, 31, 59, 86, 21, 6, 77, 89, 79, 83, 57, 26, 89, 45, 60, 55, 60, 76, 76, 6, 40, 57, 38, 44, 7, 98, 64, 65, 88, 73, 88, 99], 26,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", COUNT_PAIRS_DIFFERENCE_EQUAL_K_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_DIFFERENCE_EQUAL_K_1{ static int f_gold ( int arr [ ] , int n , int k ) { int count = 0 ; Arrays . sort ( arr ) ; int l = 0 ; int r = 0 ; while ( r < n ) { if ( arr [ r ] - arr [ l ] == k ) { count ++ ; l ++ ; r ++ ; } else if ( arr [ r ] - arr [ l ] > k ) l ++ ; else r ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,5,10,19,29,32,40,60,65,70,72,89,92}); param0.add(new int[]{-38,40,8,64,-38,56,4,8,84,60,-48,-78,-82,-88,-30,58,-58,62,-52,-98,24,22,14,68,-74,48,-56,-72,-90,26,-10,58,40,36,-80,68,58,-74,-46,-62,-12,74,-58}); param0.add(new int[]{0,0,1}); param0.add(new int[]{16,80,59,29,14,44,13,76,7,65,62,1,34,49,70,96,73,71,42,73,66,96}); param0.add(new int[]{-98,-88,-58,-56,-48,-34,-22,-18,-14,-14,-8,-4,-2,2,18,38,42,46,54,68,70,90,94,96,98}); param0.add(new int[]{0,1,1}); param0.add(new int[]{11,43,50,58,60,68,75}); param0.add(new int[]{86,94,-80,0,52,-56,42,88,-10,24,6,8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{54,99,4,14,9,34,81,36,80,50,34,9,7}); List param1 = new ArrayList<>(); param1.add(7); param1.add(24); param1.add(1); param1.add(12); param1.add(23); param1.add(2); param1.add(4); param1.add(11); param1.add(29); param1.add(9); List param2 = new ArrayList<>(); param2.add(12); param2.add(36); param2.add(1); param2.add(16); param2.add(22); param2.add(1); param2.add(4); param2.add(9); param2.add(30); param2.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n , k ) : count = 0 arr.sort ( ) l = 0 r = 0 while r < n : if arr [ r ] - arr [ l ] == k : count += 1 l += 1 r += 1 elif arr [ r ] - arr [ l ] > k : l += 1 else : r += 1 return count "," using namespace std; int f_gold ( int arr [ ], int n, int k ) { int count = 0; sort ( arr, arr + n ); int l = 0; int r = 0; while ( r < n ) { if ( arr [ r ] - arr [ l ] == k ) { count ++; l ++; r ++; } else if ( arr [ r ] - arr [ l ] > k ) l ++; else r ++; } return count; } int main() { int n_success = 0; vector> param0 {{5,5,10,19,29,32,40,60,65,70,72,89,92},{-38,40,8,64,-38,56,4,8,84,60,-48,-78,-82,-88,-30,58,-58,62,-52,-98,24,22,14,68,-74,48,-56,-72,-90,26,-10,58,40,36,-80,68,58,-74,-46,-62,-12,74,-58},{0,0,1},{16,80,59,29,14,44,13,76,7,65,62,1,34,49,70,96,73,71,42,73,66,96},{-98,-88,-58,-56,-48,-34,-22,-18,-14,-14,-8,-4,-2,2,18,38,42,46,54,68,70,90,94,96,98},{0,1,1},{11,43,50,58,60,68,75},{86,94,-80,0,52,-56,42,88,-10,24,6,8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{54,99,4,14,9,34,81,36,80,50,34,9,7}}; vector param1 {7,24,1,12,23,2,4,11,29,9}; vector param2 {12,36,1,16,22,1,4,9,30,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 5, 10, 19, 29, 32, 40, 60, 65, 70, 72, 89, 92],7,12,), ([-38, 40, 8, 64, -38, 56, 4, 8, 84, 60, -48, -78, -82, -88, -30, 58, -58, 62, -52, -98, 24, 22, 14, 68, -74, 48, -56, -72, -90, 26, -10, 58, 40, 36, -80, 68, 58, -74, -46, -62, -12, 74, -58],24,36,), ([0, 0, 1],1,1,), ([16, 80, 59, 29, 14, 44, 13, 76, 7, 65, 62, 1, 34, 49, 70, 96, 73, 71, 42, 73, 66, 96],12,16,), ([-98, -88, -58, -56, -48, -34, -22, -18, -14, -14, -8, -4, -2, 2, 18, 38, 42, 46, 54, 68, 70, 90, 94, 96, 98],23,22,), ([0, 1, 1],2,1,), ([11, 43, 50, 58, 60, 68, 75],4,4,), ([86, 94, -80, 0, 52, -56, 42, 88, -10, 24, 6, 8],11,9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],29,30,), ([54, 99, 4, 14, 9, 34, 81, 36, 80, 50, 34, 9, 7],9,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_ROTATIONS_DIVISIBLE_4," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_ROTATIONS_DIVISIBLE_4{ static int f_gold ( String n ) { int len = n . length ( ) ; if ( len == 1 ) { int oneDigit = n . charAt ( 0 ) - '0' ; if ( oneDigit % 4 == 0 ) return 1 ; return 0 ; } int twoDigit , count = 0 ; for ( int i = 0 ; i < ( len - 1 ) ; i ++ ) { twoDigit = ( n . charAt ( i ) - '0' ) * 10 + ( n . charAt ( i + 1 ) - '0' ) ; if ( twoDigit % 4 == 0 ) count ++ ; } twoDigit = ( n . charAt ( len - 1 ) - '0' ) * 10 + ( n . charAt ( 0 ) - '0' ) ; if ( twoDigit % 4 == 0 ) count ++ ; return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""MRRuQJvxe""); param0.add(""87395768""); param0.add(""10111100110111""); param0.add(""aVDUEfzG""); param0.add(""55794792""); param0.add(""111010""); param0.add(""cndMLMJVmzuH""); param0.add(""487717559382""); param0.add(""11110""); param0.add(""dRMDPyr""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( string n ) { int len = n . length ( ); if ( len == 1 ) { int oneDigit = n . at ( 0 ) - '0'; if ( oneDigit % 4 == 0 ) return 1; return 0; } int twoDigit, count = 0; for ( int i = 0; i < ( len - 1 ); i ++ ) { twoDigit = ( n . at ( i ) - '0' ) * 10 + ( n . at ( i + 1 ) - '0' ); if ( twoDigit % 4 == 0 ) count ++; } twoDigit = ( n . at ( len - 1 ) - '0' ) * 10 + ( n . at ( 0 ) - '0' ); if ( twoDigit % 4 == 0 ) count ++; return count; } int main() { int n_success = 0; vector param0 {""MRRuQJvxe"",""87395768"",""10111100110111"",""aVDUEfzG"",""55794792"",""111010"",""cndMLMJVmzuH"",""487717559382"",""11110"",""dRMDPyr""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_1{ static boolean f_gold ( int arr [ ] , int n , int k ) { HashMap < Integer , Integer > hash = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! hash . containsKey ( arr [ i ] ) ) hash . put ( arr [ i ] , 0 ) ; hash . put ( arr [ i ] , hash . get ( arr [ i ] ) + 1 ) ; } for ( Map . Entry x : hash . entrySet ( ) ) if ( ( int ) x . getValue ( ) > 2 * k ) return false ; return true ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{1,1,2,3,1}); param0.add(new int[]{2,3,3,5,3,3}); param0.add(new int[]{0,0,1,1,1}); param0.add(new int[]{7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31}); param0.add(new int[]{-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94}); param0.add(new int[]{0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0}); param0.add(new int[]{16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94}); param0.add(new int[]{-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10}); param0.add(new int[]{0,0,0,0,0,1,1,1}); param0.add(new int[]{83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}); List param1 = new ArrayList<>(); param1.add(5); param1.add(6); param1.add(2); param1.add(24); param1.add(24); param1.add(34); param1.add(10); param1.add(20); param1.add(5); param1.add(21); List param2 = new ArrayList<>(); param2.add(2); param2.add(2); param2.add(1); param2.add(2); param2.add(3); param2.add(2); param2.add(8); param2.add(4); param2.add(2); param2.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; bool f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > hash; for ( int i = 0; i < n; i ++ ) hash [ arr [ i ] ] ++; for ( auto x : hash ) if ( x . second > 2 * k ) return false; return true; } int main() { int n_success = 0; vector> param0 {{1,1,2,3,1},{2,3,3,5,3,3},{0,0,1,1,1},{7,60,78,91,80,75,85,21,41,63,1,84,69,13,94,25,54,54,52,68,53,35,17,37,98,27,2,31},{-96,-94,-82,-80,-78,-66,-36,-24,-18,-12,-2,-2,6,8,10,12,36,38,42,58,64,68,82,84,86,88,94},{0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,1,0},{16,19,25,25,32,37,48,59,60,60,71,74,77,81,91,94},{-62,-94,72,-22,86,-80,64,98,-82,-50,12,-4,56,46,-80,2,-86,-44,-26,68,-94,-82,74,26,94,40,50,-40,-42,-10},{0,0,0,0,0,1,1,1},{83,57,2,47,70,22,49,51,25,57,32,7,8,99,6,86,24,79,42,43,1,24,68,11,24,12,43,40,14,45,11,46,12,80,66}}; vector param1 {5,6,2,24,24,34,10,20,5,21}; vector param2 {2,2,1,2,3,2,8,4,2,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i],param2[i]) == f_gold(¶m0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS_1," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_SUBSETS_DISTINCT_ELEMENTS_1{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > mp = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) mp . put ( arr [ i ] , mp . get ( arr [ i ] ) == null ? 1 : mp . get ( arr [ i ] ) + 1 ) ; int res = 0 ; for ( Map . Entry < Integer , Integer > entry : mp . entrySet ( ) ) res = Math . max ( res , entry . getValue ( ) ) ; return res ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{2,6,9,12,15,19,21,23,24,24,25,27,29,35,36,37,41,44,44,47,48,51,56,59,59,59,60,64,64,66,67,68,68,69,73,74,77,78,81,82,83,85,89,94,95,96,98,99}); param0.add(new int[]{96,20,-40,74,-44,98,-24,92,58,-84,-76,-14,64,-2,-84,52,-8,38,-26,-10,-62,-30,-76,58}); param0.add(new int[]{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}); param0.add(new int[]{35,16,42,3,57,70,4,31,93,60,98,97,81,57,62,98,88,51,5,58,48,14,58,22,40,26,66,41,9,78,62,32,79,88,65,75,80,12,15,93,92,13,83,26}); param0.add(new int[]{-62,-44,-36,-18,-16,-6,4,14,22,42,68,90}); param0.add(new int[]{1,0,1,0,1,1,1,1,0,1,0,1,0,0,0,0}); param0.add(new int[]{20,25,27,29,47,47,49,53,59,66,74,82,86,86,94,94,97}); param0.add(new int[]{92,50,76,46,14,40,22}); param0.add(new int[]{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}); param0.add(new int[]{8,82,92,42,55,4,94,73,57,7,21,71,68,97}); List param1 = new ArrayList<>(); param1.add(30); param1.add(20); param1.add(31); param1.add(37); param1.add(11); param1.add(12); param1.add(13); param1.add(3); param1.add(27); param1.add(12); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",," using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > mp; for ( int i = 0; i < n; i ++ ) mp [ arr [ i ] ] ++; int res = 0; for ( auto x : mp ) res = max ( res, x . second ); return res; } int main() { int n_success = 0; vector> param0 {{2,6,9,12,15,19,21,23,24,24,25,27,29,35,36,37,41,44,44,47,48,51,56,59,59,59,60,64,64,66,67,68,68,69,73,74,77,78,81,82,83,85,89,94,95,96,98,99},{96,20,-40,74,-44,98,-24,92,58,-84,-76,-14,64,-2,-84,52,-8,38,-26,-10,-62,-30,-76,58},{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},{35,16,42,3,57,70,4,31,93,60,98,97,81,57,62,98,88,51,5,58,48,14,58,22,40,26,66,41,9,78,62,32,79,88,65,75,80,12,15,93,92,13,83,26},{-62,-44,-36,-18,-16,-6,4,14,22,42,68,90},{1,0,1,0,1,1,1,1,0,1,0,1,0,0,0,0},{20,25,27,29,47,47,49,53,59,66,74,82,86,86,94,94,97},{92,50,76,46,14,40,22},{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},{8,82,92,42,55,4,94,73,57,7,21,71,68,97}}; vector param1 {30,20,31,37,11,12,13,3,27,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",,, COUNT_SORTED_ROWS_MATRIX," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SORTED_ROWS_MATRIX{ static int f_gold ( int mat [ ] [ ] , int r , int c ) { int result = 0 ; for ( int i = 0 ; i < r ; i ++ ) { int j ; for ( j = 0 ; j < c - 1 ; j ++ ) if ( mat [ i ] [ j + 1 ] <= mat [ i ] [ j ] ) break ; if ( j == c - 1 ) result ++ ; } for ( int i = 0 ; i < r ; i ++ ) { int j ; for ( j = c - 1 ; j > 0 ; j -- ) if ( mat [ i ] [ j - 1 ] <= mat [ i ] [ j ] ) break ; if ( c > 1 && j == 0 ) result ++ ; } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{4,12,13,24,25,26,27,35,41,60,69,71,73,78,85,86,95,99},new int[]{1,13,18,25,41,42,44,45,49,49,51,52,59,63,64,67,78,97},new int[]{1,2,11,18,23,26,30,31,41,42,45,71,75,90,91,92,95,97},new int[]{26,30,44,46,46,54,56,60,67,68,75,77,77,83,87,87,94,98},new int[]{19,20,27,31,33,34,37,41,42,49,60,60,64,67,71,73,77,92},new int[]{2,6,9,11,20,29,37,41,42,44,49,58,62,76,87,89,94,97},new int[]{7,8,9,14,20,45,49,54,63,63,64,71,72,73,73,89,94,95},new int[]{2,3,7,16,17,23,23,25,44,50,58,58,59,78,83,87,90,99},new int[]{4,16,18,22,23,33,34,43,43,46,51,56,62,75,79,85,97,97},new int[]{16,18,29,32,39,53,54,55,67,70,72,72,76,76,86,87,96,96},new int[]{6,30,34,37,38,42,52,54,59,67,71,71,72,81,85,87,91,93},new int[]{2,6,6,16,18,20,21,31,40,42,50,56,62,80,80,83,91,96},new int[]{2,5,6,14,16,21,23,37,52,59,72,86,86,87,87,89,90,91},new int[]{1,10,17,20,22,25,27,32,37,37,44,49,65,78,80,81,85,95},new int[]{1,13,14,21,43,50,52,58,62,64,65,66,66,66,67,70,81,82},new int[]{1,2,9,16,17,23,25,29,30,31,42,65,73,74,82,87,92,92},new int[]{1,5,9,13,21,28,32,33,34,38,46,60,80,86,93,94,96,98},new int[]{11,18,23,24,25,26,28,48,59,59,67,72,82,83,86,89,92,96}}); param0.add(new int[][]{new int[]{82,82,2,8,-32,90,-76,-64,-66,-46,-72,-58,-28,-86,-8,-96,-62,-32,54,-16,96,28,76,90,-40,98,88,-90,4,-50,70,32,-74,-72,-72,10,36,50,-16,-36},new int[]{-52,-6,12,-6,-64,6,38,-14,-86,74,-74,82,54,2,46,-94,88,86,-32,-72,72,88,90,-8,-58,32,-90,-68,-70,72,34,74,-30,92,90,-88,82,-54,42,94},new int[]{-4,-32,-12,-96,16,-32,32,52,2,-6,2,-10,40,-64,4,-56,-50,46,54,-6,-14,-40,-98,-4,-20,98,94,60,-70,-94,52,-4,32,20,-30,-94,-50,50,-86,-66},new int[]{10,84,2,-44,-54,-82,-64,70,-20,-40,-50,10,26,-14,-88,10,-80,-48,10,16,-14,-52,74,-60,48,-60,-62,38,56,-34,86,20,74,-20,28,-46,-44,96,-58,-8},new int[]{-48,-36,-18,-66,-20,60,-36,34,-94,44,-14,-34,-84,-26,38,48,14,12,72,-76,26,50,-58,40,90,14,-40,22,-26,-24,66,-62,-34,16,-34,-30,54,-76,-26,4},new int[]{-26,56,74,-82,58,-42,-98,96,-24,-36,-86,-80,42,78,-2,-90,-8,-52,46,-20,-16,64,-36,-8,-16,-60,96,40,66,98,14,-36,-78,-40,52,60,-20,38,26,-98},new int[]{-12,60,-56,-66,68,-20,-74,30,14,-36,-22,-54,50,62,-44,14,90,66,80,76,-86,92,-80,-6,48,44,24,40,94,-42,68,28,-20,98,40,50,-18,90,6,2},new int[]{-98,4,-32,-34,-64,58,16,48,82,10,36,32,-60,-40,2,-14,-58,28,-44,60,-28,-6,-68,46,-50,62,10,44,-4,76,60,-26,52,40,-88,-56,-36,-70,-66,-22},new int[]{18,-66,-82,52,34,-86,-50,-64,18,10,-14,8,80,-76,20,76,96,-12,-36,86,-10,16,-14,66,-4,14,-82,0,2,90,78,-48,42,-60,90,-16,80,16,-64,-58},new int[]{12,8,-74,78,46,-84,20,14,-2,-42,-80,-66,-64,34,58,0,28,-8,34,92,-14,-54,82,68,64,6,30,78,-50,-28,-74,-12,-18,82,-50,-86,-2,-78,94,-66},new int[]{10,-76,58,32,-44,60,-14,24,-92,24,16,80,90,-60,-6,8,-50,90,60,82,6,84,74,-48,-98,-2,-38,74,64,52,8,-32,-58,-58,70,-14,68,46,32,74},new int[]{84,98,78,34,-94,84,10,84,10,-58,-70,-30,98,-28,-80,56,-36,96,82,38,2,-38,28,18,82,60,-16,-64,90,34,-10,98,36,40,-6,-32,-32,-24,92,12},new int[]{54,92,-30,-12,40,48,8,34,-20,-58,8,-14,0,-34,98,-32,-98,40,-44,34,94,-56,-90,64,4,-76,-34,-68,48,28,84,-4,-46,-54,72,-82,0,-82,38,-6},new int[]{44,-66,-86,54,-4,36,62,88,-16,-88,-26,-50,-84,-90,38,14,62,14,-92,64,-50,-2,-96,-4,94,-84,26,-86,-68,6,-18,-66,-56,-88,-92,-86,64,-6,-92,-12},new int[]{-36,80,-28,-42,58,-12,-66,-38,-76,34,-52,-32,-80,66,54,-2,-40,78,14,-54,6,-92,68,-40,72,-80,52,-60,98,-60,-92,26,-24,26,46,34,80,-92,16,16},new int[]{-4,60,-72,-6,46,76,-8,82,42,-68,-86,10,20,80,-22,64,-40,22,-6,-58,-74,-86,-16,-14,-76,-54,-98,-50,-74,80,-44,18,-70,-80,58,-48,-70,44,46,88},new int[]{-80,-76,-46,-92,-78,-72,-56,72,-52,-86,-48,6,84,38,-14,66,48,86,36,-80,-54,-44,-88,-18,-50,-56,-20,-14,-52,-98,-44,-76,-42,-66,-20,62,0,-54,-82,-70},new int[]{44,98,78,56,-14,-70,-24,62,88,70,-42,72,80,42,22,-90,-50,-22,14,40,42,34,66,-58,70,22,-86,58,-82,54,-20,72,20,32,8,30,52,-6,-12,-62},new int[]{-4,70,-76,22,22,44,-84,-74,34,-36,64,-78,50,72,-40,-78,-26,-66,-84,-28,-40,-96,66,36,-28,-18,4,0,20,18,78,-74,-58,-64,-68,68,-84,20,-56,-16},new int[]{0,24,64,-50,-36,70,-88,-34,70,68,-68,80,88,12,-50,74,32,18,-14,74,58,68,-62,-30,20,94,-68,96,-32,-94,-70,-44,-76,-94,34,54,-74,62,-80,-10},new int[]{-64,-26,-26,44,14,-72,-74,36,-8,-64,-34,6,18,14,74,-90,66,-12,-6,-6,-12,-58,72,18,62,-44,12,-56,66,34,44,0,-98,96,-94,-60,76,52,48,-6},new int[]{6,-58,14,82,-72,0,92,8,-6,-18,74,-66,68,-24,-20,90,-48,54,18,-24,-8,-48,72,-78,-54,84,18,-52,-36,-30,-82,-34,8,-94,-34,-78,-28,44,92,-78},new int[]{-50,-84,-82,-12,62,-72,-36,84,-36,-82,12,-52,12,-34,36,8,-24,58,6,-34,0,-22,46,98,62,80,-88,-24,98,30,22,94,-38,-24,78,62,0,-10,2,52},new int[]{94,-10,-88,-12,-10,56,-86,18,54,-20,22,-18,76,-88,-38,38,-88,-20,82,88,-80,-34,14,54,28,-46,-88,-84,-86,38,86,26,98,-28,14,-24,-22,-80,-98,58},new int[]{60,52,12,-86,-54,-30,10,-2,-54,-74,56,74,-74,92,86,-92,-28,-54,30,-56,40,96,92,16,82,-70,-80,92,-80,14,56,-6,8,-92,20,10,-50,-64,-34,50},new int[]{64,70,-74,-72,78,46,42,44,-96,-18,-62,56,-90,-14,38,82,8,-58,52,92,-90,22,-60,62,60,-64,-56,-74,92,-2,-90,-14,-56,-64,38,18,-52,-92,30,-36},new int[]{50,84,82,36,60,34,-50,-64,-72,30,8,84,48,-24,78,80,-10,-90,82,-80,-4,-94,24,92,92,-16,-80,68,60,98,-92,52,60,8,-72,12,-60,-84,-44,-34},new int[]{-98,-30,30,36,96,74,-82,-2,-72,-38,-40,10,92,30,98,-28,56,70,-84,66,40,92,42,-86,-58,-90,-10,98,-12,-80,94,4,-84,60,94,-90,74,-68,64,-76},new int[]{2,94,38,-6,64,4,-42,92,-12,54,82,90,-64,32,0,-24,-16,-68,78,54,28,-86,-56,4,16,98,32,-18,-76,90,-6,72,40,20,6,-90,52,-62,4,30},new int[]{22,90,54,-34,-30,0,-72,-6,36,28,-96,86,-2,-48,-30,8,-60,-32,24,-50,-76,-86,32,28,-66,-88,24,86,72,96,22,-32,-92,-26,48,-52,-12,4,-94,2},new int[]{-44,70,38,36,-36,46,-68,-44,-36,34,-32,-44,-22,-80,-64,28,60,92,-52,14,42,-80,-70,50,24,-34,16,64,62,-94,18,-48,-68,16,76,-42,30,-88,46,-12},new int[]{46,46,44,16,-70,-6,-78,-46,70,30,70,88,66,56,-12,4,76,-50,-28,-98,-16,-86,-68,36,28,-92,-46,-86,-2,90,6,36,-62,-30,-26,-38,22,-60,-20,-70},new int[]{80,38,-94,-42,70,-20,42,-62,-30,54,82,-94,-78,74,60,54,-52,-56,66,86,-30,-14,0,-6,-22,56,70,-86,50,82,72,-10,54,24,-46,-26,-20,-54,-96,30},new int[]{-48,94,54,-16,70,20,-20,-2,-8,84,-60,30,-18,-14,32,42,24,26,-12,-62,2,-94,26,36,-88,-22,-64,46,36,74,-44,-56,-36,-98,70,72,-68,68,76,-32},new int[]{-4,36,0,14,-42,-38,-98,-2,-44,-90,82,80,-66,38,62,34,52,44,-22,80,-74,-88,-74,24,98,8,18,-26,-4,-82,-60,44,-2,30,20,52,26,-22,-54,96},new int[]{98,-54,-12,-12,-74,34,-6,-36,-94,40,96,42,-32,-46,-46,88,-90,26,-98,30,92,-34,74,-94,36,-68,-66,74,-2,6,94,-12,82,90,-2,78,-80,-84,18,74},new int[]{-42,30,56,-74,-16,-44,4,-62,-12,-62,-22,64,56,96,-16,40,10,88,-66,54,56,96,74,-6,-36,-70,-82,74,-14,-18,-32,-70,60,26,-88,-78,-8,32,-84,90},new int[]{-44,-14,-44,96,0,54,2,74,36,-56,-98,-16,-70,68,-88,26,-18,30,62,-88,-28,-58,62,-38,-62,28,-80,-6,88,-16,64,-58,14,94,-40,2,-12,-16,-24,-64},new int[]{20,18,-94,94,-2,-74,-56,-46,62,-88,-16,-30,-10,-54,38,22,-42,32,28,-42,44,64,46,66,-96,70,-32,10,-14,72,-42,98,-54,36,76,24,-96,86,54,-88},new int[]{74,-48,90,78,-44,0,76,-16,-28,-92,10,-32,-30,-78,-8,40,-90,74,-40,16,-78,22,-42,36,68,44,42,6,-60,36,-74,-92,92,-44,40,-92,-46,56,-36,-94}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{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},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{91,8,34,7,66,59,90,78,54,77,55,29,90,69,85,42,39,49,83,59,3,41,65,60,4,45,65,29,47,40,96,11,21,74,34,83,12,3,6,67,30,29,40,87,35,73,17,13,20},new int[]{38,36,55,16,85,38,67,15,37,25,81,61,31,68,31,11,23,39,35,21,66,66,52,49,55,35,40,47,99,25,91,6,50,3,62,11,46,88,95,17,40,70,35,76,59,84,4,99,84},new int[]{61,2,63,5,81,77,7,32,74,17,53,17,86,5,86,15,80,84,94,64,86,94,64,7,90,64,15,94,56,51,64,84,77,70,49,2,46,96,64,25,18,54,39,73,77,23,46,14,23},new int[]{48,22,2,60,46,8,3,70,58,6,27,23,71,92,10,45,48,85,81,86,61,27,85,75,1,49,47,82,8,74,92,40,61,27,12,30,37,66,84,36,86,40,36,96,60,96,70,27,41},new int[]{13,6,54,10,54,19,24,61,87,77,14,45,37,15,74,4,47,61,78,91,68,99,67,70,70,26,72,19,75,93,56,66,76,80,49,45,62,85,50,51,48,40,48,13,69,62,82,13,13},new int[]{25,75,45,24,38,4,19,83,38,61,21,59,71,72,76,59,36,31,72,23,16,22,68,40,28,60,89,87,87,89,16,11,45,89,75,25,43,67,69,41,66,91,38,62,73,29,13,45,68},new int[]{30,1,39,11,69,4,8,3,52,59,24,47,88,62,30,96,38,80,62,86,81,12,72,65,10,64,95,58,60,95,51,60,89,35,54,85,67,38,58,85,12,40,5,47,35,95,26,60,33},new int[]{47,58,24,5,76,9,56,45,32,69,14,63,7,2,55,36,29,59,15,64,65,80,99,2,99,23,18,98,26,38,58,52,92,53,18,40,86,93,18,26,71,65,29,91,80,91,29,44,31},new int[]{63,5,55,56,10,58,53,43,89,30,98,71,20,94,28,27,65,65,54,66,69,28,82,30,2,13,71,16,31,55,65,62,76,66,36,70,42,66,82,73,63,21,27,89,44,99,70,75,96},new int[]{6,19,62,34,59,79,75,95,84,64,95,81,81,77,83,62,24,4,18,97,33,43,57,40,90,65,10,88,84,54,68,58,40,46,88,32,1,97,4,36,41,57,30,13,43,77,88,99,29},new int[]{23,37,24,76,53,11,28,95,2,89,27,47,2,3,12,67,25,66,7,38,45,63,15,93,2,12,44,28,68,27,52,23,85,4,59,92,35,17,27,7,91,20,84,22,26,34,63,87,54},new int[]{97,74,14,36,43,72,69,25,78,13,46,10,88,50,49,98,55,43,22,78,13,78,46,9,24,32,61,91,51,53,58,95,54,47,11,21,18,60,10,27,82,66,90,40,45,52,98,85,16},new int[]{34,59,78,37,11,87,79,40,58,33,82,33,96,86,94,40,71,85,59,22,65,73,20,63,76,91,24,29,68,27,45,97,69,33,43,86,92,31,19,32,15,39,37,19,14,38,5,53,20},new int[]{44,25,58,89,40,99,34,90,26,87,63,16,43,84,77,25,48,55,7,47,43,84,3,41,28,65,34,9,43,39,76,8,52,12,75,43,16,94,18,93,12,83,54,15,27,81,46,89,24},new int[]{67,92,60,34,46,5,80,64,53,65,94,65,36,66,56,52,82,54,32,55,69,88,43,41,11,8,33,95,32,48,71,9,89,7,2,33,29,76,33,38,99,48,99,92,68,22,70,19,14},new int[]{90,32,71,27,57,73,87,90,40,24,15,27,70,87,74,29,8,30,17,87,13,93,46,87,12,30,43,80,14,3,23,75,67,51,23,49,69,69,69,54,57,46,60,43,47,70,14,30,95},new int[]{69,58,48,20,45,70,13,66,65,42,62,76,9,8,17,28,22,2,60,6,73,54,24,32,15,11,75,62,8,99,51,36,83,15,55,18,17,78,80,82,97,70,60,46,78,16,1,26,43},new int[]{34,59,69,68,91,5,24,72,81,23,64,19,72,6,66,72,91,96,65,11,28,27,27,87,87,61,29,52,86,14,41,86,59,5,42,91,22,50,9,6,99,37,24,4,8,67,62,38,99},new int[]{62,48,96,3,14,75,47,80,50,61,51,77,82,37,31,49,87,48,94,4,92,94,99,26,65,29,18,4,9,14,35,60,54,33,52,49,44,31,53,95,28,3,14,97,53,19,80,73,5},new int[]{18,14,24,76,93,33,55,40,65,59,45,3,29,17,12,4,60,72,23,82,14,94,65,19,24,50,91,80,96,78,41,37,75,77,4,94,69,80,48,5,55,85,43,58,36,3,8,40,87},new int[]{92,18,42,47,28,4,55,10,46,52,75,20,48,62,7,14,78,95,49,58,14,2,43,29,57,98,83,90,56,62,92,91,2,69,79,44,1,5,43,54,34,88,67,60,42,37,56,51,3},new int[]{28,31,22,14,75,56,68,57,39,10,73,69,72,27,79,2,99,99,10,24,48,56,19,9,21,80,36,43,11,49,85,49,84,84,28,48,13,80,39,94,8,19,97,73,3,12,29,34,34},new int[]{99,50,58,74,49,22,2,84,94,89,94,38,68,86,42,41,43,69,49,17,17,96,78,18,93,48,18,32,87,16,6,70,97,72,55,20,40,56,51,54,3,57,69,71,74,18,64,31,39},new int[]{23,18,26,32,12,65,32,90,98,14,8,79,44,56,52,33,34,31,92,95,99,11,90,65,59,95,49,27,77,64,21,33,2,69,11,67,65,89,40,12,66,60,65,10,62,48,32,84,43},new int[]{87,26,33,4,89,44,32,68,19,61,35,74,56,55,82,66,79,76,10,64,95,33,87,89,88,67,11,14,85,99,56,78,72,51,43,44,76,11,77,14,83,70,44,58,2,46,75,61,31},new int[]{93,73,8,30,6,84,16,28,43,47,80,29,89,86,91,83,98,42,91,65,20,77,34,1,24,57,77,96,66,61,55,63,7,1,52,67,85,47,32,74,88,34,94,73,7,59,78,47,42},new int[]{90,35,30,1,10,96,62,91,53,13,6,33,44,6,62,49,40,35,55,30,96,98,51,57,83,45,52,51,64,70,92,99,91,2,7,95,50,77,82,23,2,56,39,97,86,55,72,69,92},new int[]{45,12,56,49,85,32,64,91,3,47,10,82,50,33,71,53,94,32,57,63,59,65,83,85,73,94,28,95,76,11,51,17,87,12,69,65,58,31,76,94,13,42,15,43,34,14,60,88,24},new int[]{75,34,12,19,35,60,73,5,33,74,27,12,68,58,69,94,31,99,86,32,35,78,56,6,43,71,30,56,88,14,46,41,12,6,52,15,84,52,6,13,60,49,61,45,42,72,51,82,99},new int[]{95,81,81,39,93,29,96,7,99,11,94,42,1,16,99,74,68,49,15,6,15,80,68,25,86,69,76,6,64,96,87,57,94,99,39,71,3,92,68,30,5,91,49,40,5,26,58,82,90},new int[]{4,57,97,16,67,90,23,89,24,84,90,66,76,51,21,44,41,52,54,71,14,64,80,49,88,2,94,76,10,71,78,1,59,39,18,56,45,43,95,13,30,93,86,78,21,14,31,98,76},new int[]{40,86,5,71,50,83,56,89,56,6,75,48,16,31,65,10,90,63,84,63,1,81,6,21,89,58,70,18,72,49,10,68,2,99,10,51,86,63,55,77,90,32,53,48,99,76,45,31,52},new int[]{99,19,61,12,65,15,53,96,50,46,9,32,91,55,84,30,59,58,92,99,37,68,94,78,59,47,51,4,89,10,84,84,43,83,95,2,54,81,22,60,11,30,98,59,57,37,88,43,9},new int[]{14,75,98,81,61,53,54,7,97,68,98,21,92,20,12,26,14,69,52,59,36,37,89,82,13,57,26,34,12,72,12,63,91,10,21,73,46,60,8,17,5,50,30,10,83,53,97,90,39},new int[]{64,61,79,7,82,31,35,88,41,39,61,54,15,67,50,86,79,58,54,9,51,83,47,8,43,6,53,61,51,45,90,42,38,35,70,7,1,18,26,87,51,76,34,82,76,66,10,66,7},new int[]{62,86,31,83,51,75,40,72,22,4,42,47,56,77,36,55,36,36,74,55,67,3,96,88,38,68,2,34,92,83,16,97,70,13,36,65,73,20,49,53,49,13,32,47,42,29,26,81,44},new int[]{44,18,97,11,67,31,23,89,39,31,82,62,55,55,15,83,66,6,13,58,88,97,62,21,37,75,27,18,78,11,52,47,33,9,87,49,38,67,12,14,3,5,60,63,13,22,2,31,45},new int[]{55,47,20,4,13,45,34,25,95,4,13,19,1,36,74,85,51,23,35,95,23,65,63,58,67,12,18,51,21,23,38,87,92,65,69,14,48,62,86,73,41,52,12,55,85,46,88,44,38},new int[]{83,29,86,98,92,66,4,69,74,50,78,75,3,44,78,34,12,54,17,90,23,97,21,96,6,3,73,5,58,93,45,64,2,97,33,93,14,62,68,19,53,66,78,5,52,94,84,60,54},new int[]{15,44,11,54,64,99,91,94,57,73,95,25,24,4,66,11,84,83,50,89,31,83,27,75,98,49,15,3,59,20,67,67,4,67,23,97,87,17,67,57,91,34,81,99,90,29,55,88,28},new int[]{18,89,80,81,71,51,19,14,63,18,10,40,7,64,41,55,51,75,30,89,7,18,18,89,46,98,25,1,71,6,43,89,88,30,90,30,37,57,99,3,37,91,45,69,46,32,19,51,83},new int[]{11,5,99,30,60,57,35,66,16,60,93,22,7,20,58,29,91,80,59,81,52,1,51,79,88,26,92,40,12,59,9,57,42,94,24,17,79,36,48,71,83,48,88,50,69,12,62,27,22},new int[]{50,91,58,61,4,65,8,12,10,67,97,24,59,37,57,29,58,43,66,25,7,97,93,73,98,24,86,31,8,30,64,93,66,4,91,78,70,67,33,5,63,41,16,39,7,42,21,22,75},new int[]{2,16,31,71,84,77,39,36,83,7,14,43,53,3,76,98,29,68,75,3,5,94,73,21,2,97,73,48,6,66,45,85,27,99,62,67,34,66,13,39,18,11,4,35,62,55,91,86,63},new int[]{1,57,15,25,30,61,83,28,24,17,60,56,58,7,68,10,76,6,35,18,28,55,82,52,19,18,63,40,49,95,82,76,78,85,61,79,31,48,49,40,60,67,65,86,71,44,45,58,33},new int[]{64,70,88,84,20,95,73,14,2,56,94,73,83,25,93,58,49,91,76,72,10,42,73,35,49,88,12,87,78,87,78,38,57,81,12,19,14,75,71,24,78,32,23,61,8,68,61,54,4},new int[]{22,20,70,20,61,33,74,38,14,2,88,96,31,86,10,34,61,59,92,47,92,70,52,1,39,47,62,17,92,95,7,5,56,73,86,36,25,73,10,90,38,25,42,88,3,75,44,71,61},new int[]{90,36,14,93,21,25,23,58,5,43,65,53,93,76,93,25,48,20,73,42,28,2,92,13,24,28,20,88,53,90,52,86,33,31,39,58,19,80,54,24,19,48,11,17,41,13,63,56,48},new int[]{87,89,92,89,55,51,31,4,3,3,8,39,23,32,25,74,83,66,79,54,45,97,33,22,89,1,7,91,97,2,55,18,32,69,12,71,94,85,56,47,16,27,99,80,32,15,50,79,25}}); param0.add(new int[][]{new int[]{-94,-78,-30,-16,-14,22,44,44,54,60,68,72,92,94,98},new int[]{-92,-68,-52,-40,-30,-28,-20,-16,14,38,42,54,60,72,86},new int[]{-78,-68,-58,-36,-10,-10,42,48,52,52,58,68,72,78,96},new int[]{-94,-86,-84,-60,-40,0,0,22,48,56,70,72,80,90,96},new int[]{-98,-92,-80,-68,-58,38,50,52,58,60,62,62,72,86,90},new int[]{-94,-92,-70,-64,-46,-38,-32,-14,-10,-6,18,30,32,74,98},new int[]{-72,-60,-52,-50,-26,-24,-6,4,10,40,46,86,88,98,98},new int[]{-94,-72,-40,-36,-36,-28,0,18,34,36,38,44,50,54,98},new int[]{-72,-60,-40,-38,-36,-26,-18,-8,-2,2,30,34,50,76,80},new int[]{-96,-74,-46,-38,-26,-16,-10,2,2,20,28,48,48,60,90},new int[]{-86,-60,-58,-58,-46,-40,-4,2,16,18,26,62,64,78,98},new int[]{-98,-50,-12,-10,-2,12,20,40,60,66,76,78,84,90,92},new int[]{-72,-68,-68,-52,-8,-6,10,20,42,52,54,56,72,86,90},new int[]{-80,-74,-32,10,18,54,62,74,76,78,86,86,88,94,96},new int[]{-98,-78,-76,-72,-56,-30,-26,0,36,42,44,76,84,88,94}}); param0.add(new int[][]{new int[]{0,0,0,1,0,1,1,1,1,1,0,0,1,0,1,0,0,1,1,1,1,0,0,0,1,1,0},new int[]{0,0,1,0,0,0,0,0,1,0,1,0,1,1,1,0,0,1,1,1,1,1,1,0,0,0,1},new int[]{1,0,0,1,1,0,0,1,0,1,0,0,1,1,1,1,0,1,0,1,1,1,0,0,0,1,0},new int[]{1,1,1,1,1,0,0,1,0,1,0,0,0,1,0,0,0,0,1,1,1,1,1,0,0,1,0},new int[]{1,1,1,1,0,0,0,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0},new int[]{1,0,1,1,0,0,1,1,0,1,0,0,0,1,0,0,1,0,0,1,1,1,0,1,1,0,0},new int[]{1,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,1},new int[]{1,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,0,0,0,1,0,0,0},new int[]{0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,0,0,1,1},new int[]{0,1,0,0,1,0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,1,1,0,1,1,0,1},new int[]{1,1,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,0,1,0,0,1,0,1,1},new int[]{0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,1,1,1,0,0,1},new int[]{1,1,0,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,0,0,0,1,0,1,1,0,0},new int[]{1,1,1,0,1,1,1,0,0,1,0,0,1,1,1,0,0,1,1,1,0,0,0,0,0,1,0},new int[]{1,1,1,0,1,1,1,0,0,0,1,0,1,1,0,1,1,0,0,1,0,1,0,0,0,1,1},new int[]{0,1,1,0,0,1,0,0,1,0,1,0,1,1,1,0,1,1,0,1,0,0,0,0,1,1,0},new int[]{1,1,1,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,1,0},new int[]{0,0,0,0,0,0,1,1,1,0,0,1,0,0,1,0,0,0,1,1,0,1,1,1,0,0,1},new int[]{1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,1,0,0,0,0,1},new int[]{0,0,0,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,0,1},new int[]{1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,1,0,1,1,0,1,0,0,0,0,0},new int[]{1,1,0,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,1,0,1,1,1,0,1,0,0},new int[]{1,1,0,0,0,1,1,0,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,0,1,0,0},new int[]{0,1,0,1,0,0,0,1,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,0,0,1},new int[]{1,1,1,1,1,0,1,1,0,1,0,1,1,1,1,1,0,0,1,1,0,1,0,0,1,1,1},new int[]{1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,0,1,1,0,1},new int[]{0,0,0,1,0,1,1,1,1,1,1,0,0,0,1,0,1,0,1,1,1,1,1,1,0,0,0}}); param0.add(new int[][]{new int[]{2,21,39,67,70,73,83,86,87,93},new int[]{31,42,53,56,64,65,85,89,94,98},new int[]{3,15,17,50,52,67,73,82,91,94},new int[]{12,15,16,21,23,30,33,38,50,89},new int[]{5,7,25,28,38,43,43,58,64,86},new int[]{24,26,29,33,46,47,52,71,86,96},new int[]{7,10,23,24,36,39,47,61,77,89},new int[]{1,10,26,27,61,62,64,80,85,94},new int[]{3,8,16,32,37,48,54,58,77,82},new int[]{43,52,70,76,81,84,84,85,95,99}}); param0.add(new int[][]{new int[]{62,-24,-62,-18,46,14,90,-42,-98,-52,36,96,26,-26,38,-88,88,-98,-86},new int[]{-24,58,-70,-56,68,-66,-24,30,-86,-74,98,-24,-48,-28,24,-64,22,46,40},new int[]{2,-30,-94,6,-24,-42,-70,-20,-80,14,74,72,-68,58,36,40,88,-80,54},new int[]{-24,-50,-96,-36,36,30,-58,64,98,-86,-74,-18,-64,74,-46,-24,68,34,24},new int[]{-34,96,14,-50,-68,-72,-38,-52,56,4,60,-90,-70,16,-4,0,-82,2,-16},new int[]{22,10,54,-86,14,12,64,-54,92,2,88,50,-24,-86,-32,46,-66,-26,-90},new int[]{-22,26,44,2,70,-94,-78,32,-30,-64,90,-16,68,-60,-10,-18,-64,20,-18},new int[]{72,-14,-98,-54,72,18,24,4,-16,-26,78,-80,26,-10,18,20,22,68,20},new int[]{-32,74,14,-18,88,42,6,-6,-16,-30,80,-16,24,-96,-96,-52,-38,-34,-46},new int[]{-12,-72,-48,52,-64,-30,26,64,0,34,52,-66,98,-96,-52,-96,38,-56,-32},new int[]{-2,18,-60,-52,-46,62,-10,82,-24,34,72,50,-98,-96,78,86,6,32,-60},new int[]{-44,-52,-66,-46,24,80,-68,92,-32,26,-44,30,72,-56,-56,28,-26,22,-92},new int[]{82,-58,-60,-30,-68,-18,-72,98,92,-28,-30,44,78,10,54,56,2,-92,24},new int[]{4,96,-84,68,14,-86,6,22,-6,-60,2,-38,-48,48,-74,-52,-44,-68,-96},new int[]{46,4,16,20,-12,86,-56,88,8,-68,56,14,2,-38,-20,-42,-64,86,30},new int[]{96,68,-74,14,66,-20,72,60,56,-78,-14,2,60,16,-2,-90,-46,24,68},new int[]{-80,40,72,-88,-2,12,-96,-34,-88,94,46,-62,84,-68,14,-62,-26,-94,-66},new int[]{24,-60,-30,-22,-42,-2,-52,76,-16,26,-82,64,88,6,-42,-46,36,50,98},new int[]{-30,-16,-80,-16,-42,-6,60,-78,-94,-42,-20,44,-78,70,48,-84,-52,-22,46}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{58,85,97,21,67,89,63,21,3,59,28,4,57,94,75,40,26,76,91,6,64,58,31,26,69,56},new int[]{61,73,86,49,29,98,33,19,25,73,53,43,38,38,35,8,76,31,86,93,82,13,22,28,38,88},new int[]{36,22,61,11,68,82,29,74,11,31,71,46,70,47,91,56,26,34,52,41,82,3,21,59,15,3},new int[]{67,75,36,39,7,71,38,63,36,73,77,63,61,19,58,96,24,71,76,5,92,80,56,51,57,11},new int[]{81,94,93,62,55,71,63,25,30,12,82,98,12,57,44,59,67,18,56,20,37,80,66,57,34,64},new int[]{69,90,68,50,46,79,27,12,24,37,33,24,2,33,50,3,21,20,30,30,27,8,82,99,71,83},new int[]{4,52,66,74,99,99,10,51,25,84,50,37,10,56,36,42,92,89,70,67,17,89,44,63,1,34},new int[]{78,19,58,40,15,68,31,14,96,72,74,34,10,64,69,91,12,65,82,30,20,76,73,22,49,65},new int[]{11,46,64,46,13,96,43,95,47,18,45,16,69,36,53,50,24,68,43,91,31,48,47,1,91,44},new int[]{86,37,91,17,78,5,39,37,62,68,26,91,19,64,42,55,65,56,85,33,90,70,97,51,61,42},new int[]{47,84,97,98,53,58,83,86,30,42,4,72,67,32,50,37,43,92,40,6,1,98,25,16,36,18},new int[]{5,15,23,78,81,92,74,55,30,59,43,27,48,24,33,90,79,61,16,76,13,75,13,91,86,97},new int[]{50,81,63,53,30,92,83,19,43,90,40,66,2,92,72,35,87,11,26,55,26,92,80,79,68,73},new int[]{2,55,80,76,99,98,8,31,23,87,99,75,72,45,79,70,84,36,9,78,44,45,38,96,66,39},new int[]{78,28,1,62,38,69,48,57,89,60,15,7,67,99,63,37,65,27,1,8,17,15,1,39,11,49},new int[]{20,70,15,29,42,31,49,87,50,11,66,55,21,35,77,7,65,3,92,86,52,36,16,55,25,59},new int[]{24,90,55,67,66,96,58,49,21,1,39,30,65,55,57,64,98,27,90,65,43,26,10,77,86,9},new int[]{40,44,98,40,1,40,6,30,39,41,10,55,44,38,44,86,95,80,86,41,40,94,35,46,87,36},new int[]{30,21,73,92,41,17,19,71,53,19,80,65,93,1,69,48,95,54,81,52,50,72,91,9,73,74},new int[]{42,87,8,31,39,47,35,29,70,42,94,53,27,53,67,51,28,86,27,77,8,84,48,34,71,2},new int[]{84,68,18,85,35,63,98,68,95,24,85,10,23,88,15,70,15,46,46,52,4,72,21,75,11,21},new int[]{21,1,28,27,46,61,52,56,43,9,88,19,41,40,12,90,49,56,92,65,3,46,16,46,45,64},new int[]{65,27,31,4,16,63,97,48,45,39,37,7,89,99,19,93,57,16,25,43,80,27,70,63,50,69},new int[]{97,69,6,27,72,96,13,62,99,28,63,5,85,45,67,97,60,65,21,24,85,46,21,6,31,19},new int[]{89,76,25,93,74,3,97,44,8,25,95,57,65,17,32,72,31,85,38,53,76,1,58,41,87,76},new int[]{42,30,40,72,77,45,71,43,39,3,8,52,99,92,80,1,83,60,29,93,9,96,50,73,32,92}}); List param1 = new ArrayList<>(); param1.add(14); param1.add(28); param1.add(28); param1.add(48); param1.add(14); param1.add(19); param1.add(6); param1.add(11); param1.add(8); param1.add(25); List param2 = new ArrayList<>(); param2.add(17); param2.add(27); param2.add(16); param2.add(37); param2.add(7); param2.add(20); param2.add(5); param2.add(18); param2.add(10); param2.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( mat , r , c ) : result = 0 for i in range ( r ) : j = 0 for j in range ( c - 1 ) : if mat [ i ] [ j + 1 ] <= mat [ i ] [ j ] : break if j == c - 2 : result += 1 for i in range ( 0 , r ) : j = 0 for j in range ( c - 1 , 0 , - 1 ) : if mat [ i ] [ j - 1 ] <= mat [ i ] [ j ] : break if c > 1 and j == 1 : result += 1 return result ",,," if __name__ == '__main__': param = [ ([[4, 12, 13, 24, 25, 26, 27, 35, 41, 60, 69, 71, 73, 78, 85, 86, 95, 99], [1, 13, 18, 25, 41, 42, 44, 45, 49, 49, 51, 52, 59, 63, 64, 67, 78, 97], [1, 2, 11, 18, 23, 26, 30, 31, 41, 42, 45, 71, 75, 90, 91, 92, 95, 97], [26, 30, 44, 46, 46, 54, 56, 60, 67, 68, 75, 77, 77, 83, 87, 87, 94, 98], [19, 20, 27, 31, 33, 34, 37, 41, 42, 49, 60, 60, 64, 67, 71, 73, 77, 92], [2, 6, 9, 11, 20, 29, 37, 41, 42, 44, 49, 58, 62, 76, 87, 89, 94, 97], [7, 8, 9, 14, 20, 45, 49, 54, 63, 63, 64, 71, 72, 73, 73, 89, 94, 95], [2, 3, 7, 16, 17, 23, 23, 25, 44, 50, 58, 58, 59, 78, 83, 87, 90, 99], [4, 16, 18, 22, 23, 33, 34, 43, 43, 46, 51, 56, 62, 75, 79, 85, 97, 97], [16, 18, 29, 32, 39, 53, 54, 55, 67, 70, 72, 72, 76, 76, 86, 87, 96, 96], [6, 30, 34, 37, 38, 42, 52, 54, 59, 67, 71, 71, 72, 81, 85, 87, 91, 93], [2, 6, 6, 16, 18, 20, 21, 31, 40, 42, 50, 56, 62, 80, 80, 83, 91, 96], [2, 5, 6, 14, 16, 21, 23, 37, 52, 59, 72, 86, 86, 87, 87, 89, 90, 91], [1, 10, 17, 20, 22, 25, 27, 32, 37, 37, 44, 49, 65, 78, 80, 81, 85, 95], [1, 13, 14, 21, 43, 50, 52, 58, 62, 64, 65, 66, 66, 66, 67, 70, 81, 82], [1, 2, 9, 16, 17, 23, 25, 29, 30, 31, 42, 65, 73, 74, 82, 87, 92, 92], [1, 5, 9, 13, 21, 28, 32, 33, 34, 38, 46, 60, 80, 86, 93, 94, 96, 98], [11, 18, 23, 24, 25, 26, 28, 48, 59, 59, 67, 72, 82, 83, 86, 89, 92, 96]],14,17,), ([[82, 82, 2, 8, -32, 90, -76, -64, -66, -46, -72, -58, -28, -86, -8, -96, -62, -32, 54, -16, 96, 28, 76, 90, -40, 98, 88, -90, 4, -50, 70, 32, -74, -72, -72, 10, 36, 50, -16, -36], [-52, -6, 12, -6, -64, 6, 38, -14, -86, 74, -74, 82, 54, 2, 46, -94, 88, 86, -32, -72, 72, 88, 90, -8, -58, 32, -90, -68, -70, 72, 34, 74, -30, 92, 90, -88, 82, -54, 42, 94], [-4, -32, -12, -96, 16, -32, 32, 52, 2, -6, 2, -10, 40, -64, 4, -56, -50, 46, 54, -6, -14, -40, -98, -4, -20, 98, 94, 60, -70, -94, 52, -4, 32, 20, -30, -94, -50, 50, -86, -66], [10, 84, 2, -44, -54, -82, -64, 70, -20, -40, -50, 10, 26, -14, -88, 10, -80, -48, 10, 16, -14, -52, 74, -60, 48, -60, -62, 38, 56, -34, 86, 20, 74, -20, 28, -46, -44, 96, -58, -8], [-48, -36, -18, -66, -20, 60, -36, 34, -94, 44, -14, -34, -84, -26, 38, 48, 14, 12, 72, -76, 26, 50, -58, 40, 90, 14, -40, 22, -26, -24, 66, -62, -34, 16, -34, -30, 54, -76, -26, 4], [-26, 56, 74, -82, 58, -42, -98, 96, -24, -36, -86, -80, 42, 78, -2, -90, -8, -52, 46, -20, -16, 64, -36, -8, -16, -60, 96, 40, 66, 98, 14, -36, -78, -40, 52, 60, -20, 38, 26, -98], [-12, 60, -56, -66, 68, -20, -74, 30, 14, -36, -22, -54, 50, 62, -44, 14, 90, 66, 80, 76, -86, 92, -80, -6, 48, 44, 24, 40, 94, -42, 68, 28, -20, 98, 40, 50, -18, 90, 6, 2], [-98, 4, -32, -34, -64, 58, 16, 48, 82, 10, 36, 32, -60, -40, 2, -14, -58, 28, -44, 60, -28, -6, -68, 46, -50, 62, 10, 44, -4, 76, 60, -26, 52, 40, -88, -56, -36, -70, -66, -22], [18, -66, -82, 52, 34, -86, -50, -64, 18, 10, -14, 8, 80, -76, 20, 76, 96, -12, -36, 86, -10, 16, -14, 66, -4, 14, -82, 0, 2, 90, 78, -48, 42, -60, 90, -16, 80, 16, -64, -58], [12, 8, -74, 78, 46, -84, 20, 14, -2, -42, -80, -66, -64, 34, 58, 0, 28, -8, 34, 92, -14, -54, 82, 68, 64, 6, 30, 78, -50, -28, -74, -12, -18, 82, -50, -86, -2, -78, 94, -66], [10, -76, 58, 32, -44, 60, -14, 24, -92, 24, 16, 80, 90, -60, -6, 8, -50, 90, 60, 82, 6, 84, 74, -48, -98, -2, -38, 74, 64, 52, 8, -32, -58, -58, 70, -14, 68, 46, 32, 74], [84, 98, 78, 34, -94, 84, 10, 84, 10, -58, -70, -30, 98, -28, -80, 56, -36, 96, 82, 38, 2, -38, 28, 18, 82, 60, -16, -64, 90, 34, -10, 98, 36, 40, -6, -32, -32, -24, 92, 12], [54, 92, -30, -12, 40, 48, 8, 34, -20, -58, 8, -14, 0, -34, 98, -32, -98, 40, -44, 34, 94, -56, -90, 64, 4, -76, -34, -68, 48, 28, 84, -4, -46, -54, 72, -82, 0, -82, 38, -6], [44, -66, -86, 54, -4, 36, 62, 88, -16, -88, -26, -50, -84, -90, 38, 14, 62, 14, -92, 64, -50, -2, -96, -4, 94, -84, 26, -86, -68, 6, -18, -66, -56, -88, -92, -86, 64, -6, -92, -12], [-36, 80, -28, -42, 58, -12, -66, -38, -76, 34, -52, -32, -80, 66, 54, -2, -40, 78, 14, -54, 6, -92, 68, -40, 72, -80, 52, -60, 98, -60, -92, 26, -24, 26, 46, 34, 80, -92, 16, 16], [-4, 60, -72, -6, 46, 76, -8, 82, 42, -68, -86, 10, 20, 80, -22, 64, -40, 22, -6, -58, -74, -86, -16, -14, -76, -54, -98, -50, -74, 80, -44, 18, -70, -80, 58, -48, -70, 44, 46, 88], [-80, -76, -46, -92, -78, -72, -56, 72, -52, -86, -48, 6, 84, 38, -14, 66, 48, 86, 36, -80, -54, -44, -88, -18, -50, -56, -20, -14, -52, -98, -44, -76, -42, -66, -20, 62, 0, -54, -82, -70], [44, 98, 78, 56, -14, -70, -24, 62, 88, 70, -42, 72, 80, 42, 22, -90, -50, -22, 14, 40, 42, 34, 66, -58, 70, 22, -86, 58, -82, 54, -20, 72, 20, 32, 8, 30, 52, -6, -12, -62], [-4, 70, -76, 22, 22, 44, -84, -74, 34, -36, 64, -78, 50, 72, -40, -78, -26, -66, -84, -28, -40, -96, 66, 36, -28, -18, 4, 0, 20, 18, 78, -74, -58, -64, -68, 68, -84, 20, -56, -16], [0, 24, 64, -50, -36, 70, -88, -34, 70, 68, -68, 80, 88, 12, -50, 74, 32, 18, -14, 74, 58, 68, -62, -30, 20, 94, -68, 96, -32, -94, -70, -44, -76, -94, 34, 54, -74, 62, -80, -10], [-64, -26, -26, 44, 14, -72, -74, 36, -8, -64, -34, 6, 18, 14, 74, -90, 66, -12, -6, -6, -12, -58, 72, 18, 62, -44, 12, -56, 66, 34, 44, 0, -98, 96, -94, -60, 76, 52, 48, -6], [6, -58, 14, 82, -72, 0, 92, 8, -6, -18, 74, -66, 68, -24, -20, 90, -48, 54, 18, -24, -8, -48, 72, -78, -54, 84, 18, -52, -36, -30, -82, -34, 8, -94, -34, -78, -28, 44, 92, -78], [-50, -84, -82, -12, 62, -72, -36, 84, -36, -82, 12, -52, 12, -34, 36, 8, -24, 58, 6, -34, 0, -22, 46, 98, 62, 80, -88, -24, 98, 30, 22, 94, -38, -24, 78, 62, 0, -10, 2, 52], [94, -10, -88, -12, -10, 56, -86, 18, 54, -20, 22, -18, 76, -88, -38, 38, -88, -20, 82, 88, -80, -34, 14, 54, 28, -46, -88, -84, -86, 38, 86, 26, 98, -28, 14, -24, -22, -80, -98, 58], [60, 52, 12, -86, -54, -30, 10, -2, -54, -74, 56, 74, -74, 92, 86, -92, -28, -54, 30, -56, 40, 96, 92, 16, 82, -70, -80, 92, -80, 14, 56, -6, 8, -92, 20, 10, -50, -64, -34, 50], [64, 70, -74, -72, 78, 46, 42, 44, -96, -18, -62, 56, -90, -14, 38, 82, 8, -58, 52, 92, -90, 22, -60, 62, 60, -64, -56, -74, 92, -2, -90, -14, -56, -64, 38, 18, -52, -92, 30, -36], [50, 84, 82, 36, 60, 34, -50, -64, -72, 30, 8, 84, 48, -24, 78, 80, -10, -90, 82, -80, -4, -94, 24, 92, 92, -16, -80, 68, 60, 98, -92, 52, 60, 8, -72, 12, -60, -84, -44, -34], [-98, -30, 30, 36, 96, 74, -82, -2, -72, -38, -40, 10, 92, 30, 98, -28, 56, 70, -84, 66, 40, 92, 42, -86, -58, -90, -10, 98, -12, -80, 94, 4, -84, 60, 94, -90, 74, -68, 64, -76], [2, 94, 38, -6, 64, 4, -42, 92, -12, 54, 82, 90, -64, 32, 0, -24, -16, -68, 78, 54, 28, -86, -56, 4, 16, 98, 32, -18, -76, 90, -6, 72, 40, 20, 6, -90, 52, -62, 4, 30], [22, 90, 54, -34, -30, 0, -72, -6, 36, 28, -96, 86, -2, -48, -30, 8, -60, -32, 24, -50, -76, -86, 32, 28, -66, -88, 24, 86, 72, 96, 22, -32, -92, -26, 48, -52, -12, 4, -94, 2], [-44, 70, 38, 36, -36, 46, -68, -44, -36, 34, -32, -44, -22, -80, -64, 28, 60, 92, -52, 14, 42, -80, -70, 50, 24, -34, 16, 64, 62, -94, 18, -48, -68, 16, 76, -42, 30, -88, 46, -12], [46, 46, 44, 16, -70, -6, -78, -46, 70, 30, 70, 88, 66, 56, -12, 4, 76, -50, -28, -98, -16, -86, -68, 36, 28, -92, -46, -86, -2, 90, 6, 36, -62, -30, -26, -38, 22, -60, -20, -70], [80, 38, -94, -42, 70, -20, 42, -62, -30, 54, 82, -94, -78, 74, 60, 54, -52, -56, 66, 86, -30, -14, 0, -6, -22, 56, 70, -86, 50, 82, 72, -10, 54, 24, -46, -26, -20, -54, -96, 30], [-48, 94, 54, -16, 70, 20, -20, -2, -8, 84, -60, 30, -18, -14, 32, 42, 24, 26, -12, -62, 2, -94, 26, 36, -88, -22, -64, 46, 36, 74, -44, -56, -36, -98, 70, 72, -68, 68, 76, -32], [-4, 36, 0, 14, -42, -38, -98, -2, -44, -90, 82, 80, -66, 38, 62, 34, 52, 44, -22, 80, -74, -88, -74, 24, 98, 8, 18, -26, -4, -82, -60, 44, -2, 30, 20, 52, 26, -22, -54, 96], [98, -54, -12, -12, -74, 34, -6, -36, -94, 40, 96, 42, -32, -46, -46, 88, -90, 26, -98, 30, 92, -34, 74, -94, 36, -68, -66, 74, -2, 6, 94, -12, 82, 90, -2, 78, -80, -84, 18, 74], [-42, 30, 56, -74, -16, -44, 4, -62, -12, -62, -22, 64, 56, 96, -16, 40, 10, 88, -66, 54, 56, 96, 74, -6, -36, -70, -82, 74, -14, -18, -32, -70, 60, 26, -88, -78, -8, 32, -84, 90], [-44, -14, -44, 96, 0, 54, 2, 74, 36, -56, -98, -16, -70, 68, -88, 26, -18, 30, 62, -88, -28, -58, 62, -38, -62, 28, -80, -6, 88, -16, 64, -58, 14, 94, -40, 2, -12, -16, -24, -64], [20, 18, -94, 94, -2, -74, -56, -46, 62, -88, -16, -30, -10, -54, 38, 22, -42, 32, 28, -42, 44, 64, 46, 66, -96, 70, -32, 10, -14, 72, -42, 98, -54, 36, 76, 24, -96, 86, 54, -88], [74, -48, 90, 78, -44, 0, 76, -16, -28, -92, 10, -32, -30, -78, -8, 40, -90, 74, -40, 16, -78, 22, -42, 36, 68, 44, 42, 6, -60, 36, -74, -92, 92, -44, 40, -92, -46, 56, -36, -94]],28,27,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [0, 0, 0, 0, 0, 0, 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], [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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [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], [0, 0, 0, 0, 0, 0, 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, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],28,16,), ([[91, 8, 34, 7, 66, 59, 90, 78, 54, 77, 55, 29, 90, 69, 85, 42, 39, 49, 83, 59, 3, 41, 65, 60, 4, 45, 65, 29, 47, 40, 96, 11, 21, 74, 34, 83, 12, 3, 6, 67, 30, 29, 40, 87, 35, 73, 17, 13, 20], [38, 36, 55, 16, 85, 38, 67, 15, 37, 25, 81, 61, 31, 68, 31, 11, 23, 39, 35, 21, 66, 66, 52, 49, 55, 35, 40, 47, 99, 25, 91, 6, 50, 3, 62, 11, 46, 88, 95, 17, 40, 70, 35, 76, 59, 84, 4, 99, 84], [61, 2, 63, 5, 81, 77, 7, 32, 74, 17, 53, 17, 86, 5, 86, 15, 80, 84, 94, 64, 86, 94, 64, 7, 90, 64, 15, 94, 56, 51, 64, 84, 77, 70, 49, 2, 46, 96, 64, 25, 18, 54, 39, 73, 77, 23, 46, 14, 23], [48, 22, 2, 60, 46, 8, 3, 70, 58, 6, 27, 23, 71, 92, 10, 45, 48, 85, 81, 86, 61, 27, 85, 75, 1, 49, 47, 82, 8, 74, 92, 40, 61, 27, 12, 30, 37, 66, 84, 36, 86, 40, 36, 96, 60, 96, 70, 27, 41], [13, 6, 54, 10, 54, 19, 24, 61, 87, 77, 14, 45, 37, 15, 74, 4, 47, 61, 78, 91, 68, 99, 67, 70, 70, 26, 72, 19, 75, 93, 56, 66, 76, 80, 49, 45, 62, 85, 50, 51, 48, 40, 48, 13, 69, 62, 82, 13, 13], [25, 75, 45, 24, 38, 4, 19, 83, 38, 61, 21, 59, 71, 72, 76, 59, 36, 31, 72, 23, 16, 22, 68, 40, 28, 60, 89, 87, 87, 89, 16, 11, 45, 89, 75, 25, 43, 67, 69, 41, 66, 91, 38, 62, 73, 29, 13, 45, 68], [30, 1, 39, 11, 69, 4, 8, 3, 52, 59, 24, 47, 88, 62, 30, 96, 38, 80, 62, 86, 81, 12, 72, 65, 10, 64, 95, 58, 60, 95, 51, 60, 89, 35, 54, 85, 67, 38, 58, 85, 12, 40, 5, 47, 35, 95, 26, 60, 33], [47, 58, 24, 5, 76, 9, 56, 45, 32, 69, 14, 63, 7, 2, 55, 36, 29, 59, 15, 64, 65, 80, 99, 2, 99, 23, 18, 98, 26, 38, 58, 52, 92, 53, 18, 40, 86, 93, 18, 26, 71, 65, 29, 91, 80, 91, 29, 44, 31], [63, 5, 55, 56, 10, 58, 53, 43, 89, 30, 98, 71, 20, 94, 28, 27, 65, 65, 54, 66, 69, 28, 82, 30, 2, 13, 71, 16, 31, 55, 65, 62, 76, 66, 36, 70, 42, 66, 82, 73, 63, 21, 27, 89, 44, 99, 70, 75, 96], [6, 19, 62, 34, 59, 79, 75, 95, 84, 64, 95, 81, 81, 77, 83, 62, 24, 4, 18, 97, 33, 43, 57, 40, 90, 65, 10, 88, 84, 54, 68, 58, 40, 46, 88, 32, 1, 97, 4, 36, 41, 57, 30, 13, 43, 77, 88, 99, 29], [23, 37, 24, 76, 53, 11, 28, 95, 2, 89, 27, 47, 2, 3, 12, 67, 25, 66, 7, 38, 45, 63, 15, 93, 2, 12, 44, 28, 68, 27, 52, 23, 85, 4, 59, 92, 35, 17, 27, 7, 91, 20, 84, 22, 26, 34, 63, 87, 54], [97, 74, 14, 36, 43, 72, 69, 25, 78, 13, 46, 10, 88, 50, 49, 98, 55, 43, 22, 78, 13, 78, 46, 9, 24, 32, 61, 91, 51, 53, 58, 95, 54, 47, 11, 21, 18, 60, 10, 27, 82, 66, 90, 40, 45, 52, 98, 85, 16], [34, 59, 78, 37, 11, 87, 79, 40, 58, 33, 82, 33, 96, 86, 94, 40, 71, 85, 59, 22, 65, 73, 20, 63, 76, 91, 24, 29, 68, 27, 45, 97, 69, 33, 43, 86, 92, 31, 19, 32, 15, 39, 37, 19, 14, 38, 5, 53, 20], [44, 25, 58, 89, 40, 99, 34, 90, 26, 87, 63, 16, 43, 84, 77, 25, 48, 55, 7, 47, 43, 84, 3, 41, 28, 65, 34, 9, 43, 39, 76, 8, 52, 12, 75, 43, 16, 94, 18, 93, 12, 83, 54, 15, 27, 81, 46, 89, 24], [67, 92, 60, 34, 46, 5, 80, 64, 53, 65, 94, 65, 36, 66, 56, 52, 82, 54, 32, 55, 69, 88, 43, 41, 11, 8, 33, 95, 32, 48, 71, 9, 89, 7, 2, 33, 29, 76, 33, 38, 99, 48, 99, 92, 68, 22, 70, 19, 14], [90, 32, 71, 27, 57, 73, 87, 90, 40, 24, 15, 27, 70, 87, 74, 29, 8, 30, 17, 87, 13, 93, 46, 87, 12, 30, 43, 80, 14, 3, 23, 75, 67, 51, 23, 49, 69, 69, 69, 54, 57, 46, 60, 43, 47, 70, 14, 30, 95], [69, 58, 48, 20, 45, 70, 13, 66, 65, 42, 62, 76, 9, 8, 17, 28, 22, 2, 60, 6, 73, 54, 24, 32, 15, 11, 75, 62, 8, 99, 51, 36, 83, 15, 55, 18, 17, 78, 80, 82, 97, 70, 60, 46, 78, 16, 1, 26, 43], [34, 59, 69, 68, 91, 5, 24, 72, 81, 23, 64, 19, 72, 6, 66, 72, 91, 96, 65, 11, 28, 27, 27, 87, 87, 61, 29, 52, 86, 14, 41, 86, 59, 5, 42, 91, 22, 50, 9, 6, 99, 37, 24, 4, 8, 67, 62, 38, 99], [62, 48, 96, 3, 14, 75, 47, 80, 50, 61, 51, 77, 82, 37, 31, 49, 87, 48, 94, 4, 92, 94, 99, 26, 65, 29, 18, 4, 9, 14, 35, 60, 54, 33, 52, 49, 44, 31, 53, 95, 28, 3, 14, 97, 53, 19, 80, 73, 5], [18, 14, 24, 76, 93, 33, 55, 40, 65, 59, 45, 3, 29, 17, 12, 4, 60, 72, 23, 82, 14, 94, 65, 19, 24, 50, 91, 80, 96, 78, 41, 37, 75, 77, 4, 94, 69, 80, 48, 5, 55, 85, 43, 58, 36, 3, 8, 40, 87], [92, 18, 42, 47, 28, 4, 55, 10, 46, 52, 75, 20, 48, 62, 7, 14, 78, 95, 49, 58, 14, 2, 43, 29, 57, 98, 83, 90, 56, 62, 92, 91, 2, 69, 79, 44, 1, 5, 43, 54, 34, 88, 67, 60, 42, 37, 56, 51, 3], [28, 31, 22, 14, 75, 56, 68, 57, 39, 10, 73, 69, 72, 27, 79, 2, 99, 99, 10, 24, 48, 56, 19, 9, 21, 80, 36, 43, 11, 49, 85, 49, 84, 84, 28, 48, 13, 80, 39, 94, 8, 19, 97, 73, 3, 12, 29, 34, 34], [99, 50, 58, 74, 49, 22, 2, 84, 94, 89, 94, 38, 68, 86, 42, 41, 43, 69, 49, 17, 17, 96, 78, 18, 93, 48, 18, 32, 87, 16, 6, 70, 97, 72, 55, 20, 40, 56, 51, 54, 3, 57, 69, 71, 74, 18, 64, 31, 39], [23, 18, 26, 32, 12, 65, 32, 90, 98, 14, 8, 79, 44, 56, 52, 33, 34, 31, 92, 95, 99, 11, 90, 65, 59, 95, 49, 27, 77, 64, 21, 33, 2, 69, 11, 67, 65, 89, 40, 12, 66, 60, 65, 10, 62, 48, 32, 84, 43], [87, 26, 33, 4, 89, 44, 32, 68, 19, 61, 35, 74, 56, 55, 82, 66, 79, 76, 10, 64, 95, 33, 87, 89, 88, 67, 11, 14, 85, 99, 56, 78, 72, 51, 43, 44, 76, 11, 77, 14, 83, 70, 44, 58, 2, 46, 75, 61, 31], [93, 73, 8, 30, 6, 84, 16, 28, 43, 47, 80, 29, 89, 86, 91, 83, 98, 42, 91, 65, 20, 77, 34, 1, 24, 57, 77, 96, 66, 61, 55, 63, 7, 1, 52, 67, 85, 47, 32, 74, 88, 34, 94, 73, 7, 59, 78, 47, 42], [90, 35, 30, 1, 10, 96, 62, 91, 53, 13, 6, 33, 44, 6, 62, 49, 40, 35, 55, 30, 96, 98, 51, 57, 83, 45, 52, 51, 64, 70, 92, 99, 91, 2, 7, 95, 50, 77, 82, 23, 2, 56, 39, 97, 86, 55, 72, 69, 92], [45, 12, 56, 49, 85, 32, 64, 91, 3, 47, 10, 82, 50, 33, 71, 53, 94, 32, 57, 63, 59, 65, 83, 85, 73, 94, 28, 95, 76, 11, 51, 17, 87, 12, 69, 65, 58, 31, 76, 94, 13, 42, 15, 43, 34, 14, 60, 88, 24], [75, 34, 12, 19, 35, 60, 73, 5, 33, 74, 27, 12, 68, 58, 69, 94, 31, 99, 86, 32, 35, 78, 56, 6, 43, 71, 30, 56, 88, 14, 46, 41, 12, 6, 52, 15, 84, 52, 6, 13, 60, 49, 61, 45, 42, 72, 51, 82, 99], [95, 81, 81, 39, 93, 29, 96, 7, 99, 11, 94, 42, 1, 16, 99, 74, 68, 49, 15, 6, 15, 80, 68, 25, 86, 69, 76, 6, 64, 96, 87, 57, 94, 99, 39, 71, 3, 92, 68, 30, 5, 91, 49, 40, 5, 26, 58, 82, 90], [4, 57, 97, 16, 67, 90, 23, 89, 24, 84, 90, 66, 76, 51, 21, 44, 41, 52, 54, 71, 14, 64, 80, 49, 88, 2, 94, 76, 10, 71, 78, 1, 59, 39, 18, 56, 45, 43, 95, 13, 30, 93, 86, 78, 21, 14, 31, 98, 76], [40, 86, 5, 71, 50, 83, 56, 89, 56, 6, 75, 48, 16, 31, 65, 10, 90, 63, 84, 63, 1, 81, 6, 21, 89, 58, 70, 18, 72, 49, 10, 68, 2, 99, 10, 51, 86, 63, 55, 77, 90, 32, 53, 48, 99, 76, 45, 31, 52], [99, 19, 61, 12, 65, 15, 53, 96, 50, 46, 9, 32, 91, 55, 84, 30, 59, 58, 92, 99, 37, 68, 94, 78, 59, 47, 51, 4, 89, 10, 84, 84, 43, 83, 95, 2, 54, 81, 22, 60, 11, 30, 98, 59, 57, 37, 88, 43, 9], [14, 75, 98, 81, 61, 53, 54, 7, 97, 68, 98, 21, 92, 20, 12, 26, 14, 69, 52, 59, 36, 37, 89, 82, 13, 57, 26, 34, 12, 72, 12, 63, 91, 10, 21, 73, 46, 60, 8, 17, 5, 50, 30, 10, 83, 53, 97, 90, 39], [64, 61, 79, 7, 82, 31, 35, 88, 41, 39, 61, 54, 15, 67, 50, 86, 79, 58, 54, 9, 51, 83, 47, 8, 43, 6, 53, 61, 51, 45, 90, 42, 38, 35, 70, 7, 1, 18, 26, 87, 51, 76, 34, 82, 76, 66, 10, 66, 7], [62, 86, 31, 83, 51, 75, 40, 72, 22, 4, 42, 47, 56, 77, 36, 55, 36, 36, 74, 55, 67, 3, 96, 88, 38, 68, 2, 34, 92, 83, 16, 97, 70, 13, 36, 65, 73, 20, 49, 53, 49, 13, 32, 47, 42, 29, 26, 81, 44], [44, 18, 97, 11, 67, 31, 23, 89, 39, 31, 82, 62, 55, 55, 15, 83, 66, 6, 13, 58, 88, 97, 62, 21, 37, 75, 27, 18, 78, 11, 52, 47, 33, 9, 87, 49, 38, 67, 12, 14, 3, 5, 60, 63, 13, 22, 2, 31, 45], [55, 47, 20, 4, 13, 45, 34, 25, 95, 4, 13, 19, 1, 36, 74, 85, 51, 23, 35, 95, 23, 65, 63, 58, 67, 12, 18, 51, 21, 23, 38, 87, 92, 65, 69, 14, 48, 62, 86, 73, 41, 52, 12, 55, 85, 46, 88, 44, 38], [83, 29, 86, 98, 92, 66, 4, 69, 74, 50, 78, 75, 3, 44, 78, 34, 12, 54, 17, 90, 23, 97, 21, 96, 6, 3, 73, 5, 58, 93, 45, 64, 2, 97, 33, 93, 14, 62, 68, 19, 53, 66, 78, 5, 52, 94, 84, 60, 54], [15, 44, 11, 54, 64, 99, 91, 94, 57, 73, 95, 25, 24, 4, 66, 11, 84, 83, 50, 89, 31, 83, 27, 75, 98, 49, 15, 3, 59, 20, 67, 67, 4, 67, 23, 97, 87, 17, 67, 57, 91, 34, 81, 99, 90, 29, 55, 88, 28], [18, 89, 80, 81, 71, 51, 19, 14, 63, 18, 10, 40, 7, 64, 41, 55, 51, 75, 30, 89, 7, 18, 18, 89, 46, 98, 25, 1, 71, 6, 43, 89, 88, 30, 90, 30, 37, 57, 99, 3, 37, 91, 45, 69, 46, 32, 19, 51, 83], [11, 5, 99, 30, 60, 57, 35, 66, 16, 60, 93, 22, 7, 20, 58, 29, 91, 80, 59, 81, 52, 1, 51, 79, 88, 26, 92, 40, 12, 59, 9, 57, 42, 94, 24, 17, 79, 36, 48, 71, 83, 48, 88, 50, 69, 12, 62, 27, 22], [50, 91, 58, 61, 4, 65, 8, 12, 10, 67, 97, 24, 59, 37, 57, 29, 58, 43, 66, 25, 7, 97, 93, 73, 98, 24, 86, 31, 8, 30, 64, 93, 66, 4, 91, 78, 70, 67, 33, 5, 63, 41, 16, 39, 7, 42, 21, 22, 75], [2, 16, 31, 71, 84, 77, 39, 36, 83, 7, 14, 43, 53, 3, 76, 98, 29, 68, 75, 3, 5, 94, 73, 21, 2, 97, 73, 48, 6, 66, 45, 85, 27, 99, 62, 67, 34, 66, 13, 39, 18, 11, 4, 35, 62, 55, 91, 86, 63], [1, 57, 15, 25, 30, 61, 83, 28, 24, 17, 60, 56, 58, 7, 68, 10, 76, 6, 35, 18, 28, 55, 82, 52, 19, 18, 63, 40, 49, 95, 82, 76, 78, 85, 61, 79, 31, 48, 49, 40, 60, 67, 65, 86, 71, 44, 45, 58, 33], [64, 70, 88, 84, 20, 95, 73, 14, 2, 56, 94, 73, 83, 25, 93, 58, 49, 91, 76, 72, 10, 42, 73, 35, 49, 88, 12, 87, 78, 87, 78, 38, 57, 81, 12, 19, 14, 75, 71, 24, 78, 32, 23, 61, 8, 68, 61, 54, 4], [22, 20, 70, 20, 61, 33, 74, 38, 14, 2, 88, 96, 31, 86, 10, 34, 61, 59, 92, 47, 92, 70, 52, 1, 39, 47, 62, 17, 92, 95, 7, 5, 56, 73, 86, 36, 25, 73, 10, 90, 38, 25, 42, 88, 3, 75, 44, 71, 61], [90, 36, 14, 93, 21, 25, 23, 58, 5, 43, 65, 53, 93, 76, 93, 25, 48, 20, 73, 42, 28, 2, 92, 13, 24, 28, 20, 88, 53, 90, 52, 86, 33, 31, 39, 58, 19, 80, 54, 24, 19, 48, 11, 17, 41, 13, 63, 56, 48], [87, 89, 92, 89, 55, 51, 31, 4, 3, 3, 8, 39, 23, 32, 25, 74, 83, 66, 79, 54, 45, 97, 33, 22, 89, 1, 7, 91, 97, 2, 55, 18, 32, 69, 12, 71, 94, 85, 56, 47, 16, 27, 99, 80, 32, 15, 50, 79, 25]],48,37,), ([[-94, -78, -30, -16, -14, 22, 44, 44, 54, 60, 68, 72, 92, 94, 98], [-92, -68, -52, -40, -30, -28, -20, -16, 14, 38, 42, 54, 60, 72, 86], [-78, -68, -58, -36, -10, -10, 42, 48, 52, 52, 58, 68, 72, 78, 96], [-94, -86, -84, -60, -40, 0, 0, 22, 48, 56, 70, 72, 80, 90, 96], [-98, -92, -80, -68, -58, 38, 50, 52, 58, 60, 62, 62, 72, 86, 90], [-94, -92, -70, -64, -46, -38, -32, -14, -10, -6, 18, 30, 32, 74, 98], [-72, -60, -52, -50, -26, -24, -6, 4, 10, 40, 46, 86, 88, 98, 98], [-94, -72, -40, -36, -36, -28, 0, 18, 34, 36, 38, 44, 50, 54, 98], [-72, -60, -40, -38, -36, -26, -18, -8, -2, 2, 30, 34, 50, 76, 80], [-96, -74, -46, -38, -26, -16, -10, 2, 2, 20, 28, 48, 48, 60, 90], [-86, -60, -58, -58, -46, -40, -4, 2, 16, 18, 26, 62, 64, 78, 98], [-98, -50, -12, -10, -2, 12, 20, 40, 60, 66, 76, 78, 84, 90, 92], [-72, -68, -68, -52, -8, -6, 10, 20, 42, 52, 54, 56, 72, 86, 90], [-80, -74, -32, 10, 18, 54, 62, 74, 76, 78, 86, 86, 88, 94, 96], [-98, -78, -76, -72, -56, -30, -26, 0, 36, 42, 44, 76, 84, 88, 94]],14,7,), ([[0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1], [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1], [0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1], [0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0]],19,20,), ([[2, 21, 39, 67, 70, 73, 83, 86, 87, 93], [31, 42, 53, 56, 64, 65, 85, 89, 94, 98], [3, 15, 17, 50, 52, 67, 73, 82, 91, 94], [12, 15, 16, 21, 23, 30, 33, 38, 50, 89], [5, 7, 25, 28, 38, 43, 43, 58, 64, 86], [24, 26, 29, 33, 46, 47, 52, 71, 86, 96], [7, 10, 23, 24, 36, 39, 47, 61, 77, 89], [1, 10, 26, 27, 61, 62, 64, 80, 85, 94], [3, 8, 16, 32, 37, 48, 54, 58, 77, 82], [43, 52, 70, 76, 81, 84, 84, 85, 95, 99]],6,5,), ([[62, -24, -62, -18, 46, 14, 90, -42, -98, -52, 36, 96, 26, -26, 38, -88, 88, -98, -86], [-24, 58, -70, -56, 68, -66, -24, 30, -86, -74, 98, -24, -48, -28, 24, -64, 22, 46, 40], [2, -30, -94, 6, -24, -42, -70, -20, -80, 14, 74, 72, -68, 58, 36, 40, 88, -80, 54], [-24, -50, -96, -36, 36, 30, -58, 64, 98, -86, -74, -18, -64, 74, -46, -24, 68, 34, 24], [-34, 96, 14, -50, -68, -72, -38, -52, 56, 4, 60, -90, -70, 16, -4, 0, -82, 2, -16], [22, 10, 54, -86, 14, 12, 64, -54, 92, 2, 88, 50, -24, -86, -32, 46, -66, -26, -90], [-22, 26, 44, 2, 70, -94, -78, 32, -30, -64, 90, -16, 68, -60, -10, -18, -64, 20, -18], [72, -14, -98, -54, 72, 18, 24, 4, -16, -26, 78, -80, 26, -10, 18, 20, 22, 68, 20], [-32, 74, 14, -18, 88, 42, 6, -6, -16, -30, 80, -16, 24, -96, -96, -52, -38, -34, -46], [-12, -72, -48, 52, -64, -30, 26, 64, 0, 34, 52, -66, 98, -96, -52, -96, 38, -56, -32], [-2, 18, -60, -52, -46, 62, -10, 82, -24, 34, 72, 50, -98, -96, 78, 86, 6, 32, -60], [-44, -52, -66, -46, 24, 80, -68, 92, -32, 26, -44, 30, 72, -56, -56, 28, -26, 22, -92], [82, -58, -60, -30, -68, -18, -72, 98, 92, -28, -30, 44, 78, 10, 54, 56, 2, -92, 24], [4, 96, -84, 68, 14, -86, 6, 22, -6, -60, 2, -38, -48, 48, -74, -52, -44, -68, -96], [46, 4, 16, 20, -12, 86, -56, 88, 8, -68, 56, 14, 2, -38, -20, -42, -64, 86, 30], [96, 68, -74, 14, 66, -20, 72, 60, 56, -78, -14, 2, 60, 16, -2, -90, -46, 24, 68], [-80, 40, 72, -88, -2, 12, -96, -34, -88, 94, 46, -62, 84, -68, 14, -62, -26, -94, -66], [24, -60, -30, -22, -42, -2, -52, 76, -16, 26, -82, 64, 88, 6, -42, -46, 36, 50, 98], [-30, -16, -80, -16, -42, -6, 60, -78, -94, -42, -20, 44, -78, 70, 48, -84, -52, -22, 46]],11,18,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],8,10,), ([[58, 85, 97, 21, 67, 89, 63, 21, 3, 59, 28, 4, 57, 94, 75, 40, 26, 76, 91, 6, 64, 58, 31, 26, 69, 56], [61, 73, 86, 49, 29, 98, 33, 19, 25, 73, 53, 43, 38, 38, 35, 8, 76, 31, 86, 93, 82, 13, 22, 28, 38, 88], [36, 22, 61, 11, 68, 82, 29, 74, 11, 31, 71, 46, 70, 47, 91, 56, 26, 34, 52, 41, 82, 3, 21, 59, 15, 3], [67, 75, 36, 39, 7, 71, 38, 63, 36, 73, 77, 63, 61, 19, 58, 96, 24, 71, 76, 5, 92, 80, 56, 51, 57, 11], [81, 94, 93, 62, 55, 71, 63, 25, 30, 12, 82, 98, 12, 57, 44, 59, 67, 18, 56, 20, 37, 80, 66, 57, 34, 64], [69, 90, 68, 50, 46, 79, 27, 12, 24, 37, 33, 24, 2, 33, 50, 3, 21, 20, 30, 30, 27, 8, 82, 99, 71, 83], [4, 52, 66, 74, 99, 99, 10, 51, 25, 84, 50, 37, 10, 56, 36, 42, 92, 89, 70, 67, 17, 89, 44, 63, 1, 34], [78, 19, 58, 40, 15, 68, 31, 14, 96, 72, 74, 34, 10, 64, 69, 91, 12, 65, 82, 30, 20, 76, 73, 22, 49, 65], [11, 46, 64, 46, 13, 96, 43, 95, 47, 18, 45, 16, 69, 36, 53, 50, 24, 68, 43, 91, 31, 48, 47, 1, 91, 44], [86, 37, 91, 17, 78, 5, 39, 37, 62, 68, 26, 91, 19, 64, 42, 55, 65, 56, 85, 33, 90, 70, 97, 51, 61, 42], [47, 84, 97, 98, 53, 58, 83, 86, 30, 42, 4, 72, 67, 32, 50, 37, 43, 92, 40, 6, 1, 98, 25, 16, 36, 18], [5, 15, 23, 78, 81, 92, 74, 55, 30, 59, 43, 27, 48, 24, 33, 90, 79, 61, 16, 76, 13, 75, 13, 91, 86, 97], [50, 81, 63, 53, 30, 92, 83, 19, 43, 90, 40, 66, 2, 92, 72, 35, 87, 11, 26, 55, 26, 92, 80, 79, 68, 73], [2, 55, 80, 76, 99, 98, 8, 31, 23, 87, 99, 75, 72, 45, 79, 70, 84, 36, 9, 78, 44, 45, 38, 96, 66, 39], [78, 28, 1, 62, 38, 69, 48, 57, 89, 60, 15, 7, 67, 99, 63, 37, 65, 27, 1, 8, 17, 15, 1, 39, 11, 49], [20, 70, 15, 29, 42, 31, 49, 87, 50, 11, 66, 55, 21, 35, 77, 7, 65, 3, 92, 86, 52, 36, 16, 55, 25, 59], [24, 90, 55, 67, 66, 96, 58, 49, 21, 1, 39, 30, 65, 55, 57, 64, 98, 27, 90, 65, 43, 26, 10, 77, 86, 9], [40, 44, 98, 40, 1, 40, 6, 30, 39, 41, 10, 55, 44, 38, 44, 86, 95, 80, 86, 41, 40, 94, 35, 46, 87, 36], [30, 21, 73, 92, 41, 17, 19, 71, 53, 19, 80, 65, 93, 1, 69, 48, 95, 54, 81, 52, 50, 72, 91, 9, 73, 74], [42, 87, 8, 31, 39, 47, 35, 29, 70, 42, 94, 53, 27, 53, 67, 51, 28, 86, 27, 77, 8, 84, 48, 34, 71, 2], [84, 68, 18, 85, 35, 63, 98, 68, 95, 24, 85, 10, 23, 88, 15, 70, 15, 46, 46, 52, 4, 72, 21, 75, 11, 21], [21, 1, 28, 27, 46, 61, 52, 56, 43, 9, 88, 19, 41, 40, 12, 90, 49, 56, 92, 65, 3, 46, 16, 46, 45, 64], [65, 27, 31, 4, 16, 63, 97, 48, 45, 39, 37, 7, 89, 99, 19, 93, 57, 16, 25, 43, 80, 27, 70, 63, 50, 69], [97, 69, 6, 27, 72, 96, 13, 62, 99, 28, 63, 5, 85, 45, 67, 97, 60, 65, 21, 24, 85, 46, 21, 6, 31, 19], [89, 76, 25, 93, 74, 3, 97, 44, 8, 25, 95, 57, 65, 17, 32, 72, 31, 85, 38, 53, 76, 1, 58, 41, 87, 76], [42, 30, 40, 72, 77, 45, 71, 43, 39, 3, 8, 52, 99, 92, 80, 1, 83, 60, 29, 93, 9, 96, 50, 73, 32, 92]],25,14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS{ static int f_gold ( String s ) { int result = 0 ; int n = s . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i ; j < n ; j ++ ) if ( s . charAt ( i ) == s . charAt ( j ) ) result ++ ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""LZIKA""); param0.add(""0556979952""); param0.add(""110010""); param0.add(""kGaYfd""); param0.add(""413567670657""); param0.add(""01001""); param0.add(""EQPuFa""); param0.add(""48848378""); param0.add(""110""); param0.add(""PLehNeP""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( s ) : result = 0 ; n = len ( s ) ; for i in range ( n ) : for j in range ( i , n ) : if ( s [ i ] == s [ j ] ) : result = result + 1 return result "," using namespace std; int f_gold ( string s ) { int result = 0; int n = s . length ( ); for ( int i = 0; i < n; i ++ ) for ( int j = i; j < n; j ++ ) if ( s [ i ] == s [ j ] ) result ++; return result; } int main() { int n_success = 0; vector param0 {""LZIKA"",""0556979952"",""110010"",""kGaYfd"",""413567670657"",""01001"",""EQPuFa"",""48848378"",""110"",""PLehNeP""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ('LZIKA',), ('0556979952',), ('110010',), ('kGaYfd',), ('413567670657',), ('01001',), ('EQPuFa',), ('48848378',), ('110',), ('PLehNeP',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int count = 0 , max_count = 0 , min_count = n ; for ( int i = 0 ; i < ( n - 1 ) ; i ++ ) { if ( arr [ i ] == arr [ i + 1 ] ) { count += 1 ; continue ; } else { max_count = Math . max ( max_count , count ) ; min_count = Math . min ( min_count , count ) ; count = 0 ; } } return ( max_count - min_count ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{5,15,19,22,28,29,39,46,46,49,51,55,62,69,72,72,72,74,79,92,92,93,95,96}); param0.add(new int[]{-26,-54,92,76,-92,-14,-24,-70,-78,-50,-48,-22,12,2,-34,-60,4,-32,-10,52,-92,-74,18,34,6,-66,42,-10,-6,56,92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{59,35,13,79,61,97,92,48,98,38,65,54,31,49,81,22,96,29,65,48,92,66,25,21,26,1,32,73,46,5,40,17,53,93,83,29}); param0.add(new int[]{-70,-34,-32,-30,-14,80,86,90}); param0.add(new int[]{0,1,0,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0}); param0.add(new int[]{9}); param0.add(new int[]{94,10,70,42}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,76,49,55,92,15,4,8,95,60,90,3,7,79,84,17,96,10,80,26,22,15}); List param1 = new ArrayList<>(); param1.add(15); param1.add(30); param1.add(24); param1.add(29); param1.add(4); param1.add(23); param1.add(0); param1.add(2); param1.add(24); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , n ) : arr.sort ( ) count = 0 ; max_count = 0 ; min_count = n for i in range ( 0 , ( n - 1 ) ) : if arr [ i ] == arr [ i + 1 ] : count += 1 continue else : max_count = max ( max_count , count ) min_count = min ( min_count , count ) count = 0 return max_count - min_count "," using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int count = 0, max_count = 0, min_count = n; for ( int i = 0; i < ( n - 1 ); i ++ ) { if ( arr [ i ] == arr [ i + 1 ] ) { count += 1; continue; } else { max_count = max ( max_count, count ); min_count = min ( min_count, count ); count = 0; } } return ( max_count - min_count ); } int main() { int n_success = 0; vector> param0 {{5,15,19,22,28,29,39,46,46,49,51,55,62,69,72,72,72,74,79,92,92,93,95,96},{-26,-54,92,76,-92,-14,-24,-70,-78,-50,-48,-22,12,2,-34,-60,4,-32,-10,52,-92,-74,18,34,6,-66,42,-10,-6,56,92},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{59,35,13,79,61,97,92,48,98,38,65,54,31,49,81,22,96,29,65,48,92,66,25,21,26,1,32,73,46,5,40,17,53,93,83,29},{-70,-34,-32,-30,-14,80,86,90},{0,1,0,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0},{9},{94,10,70,42},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{64,76,49,55,92,15,4,8,95,60,90,3,7,79,84,17,96,10,80,26,22,15}}; vector param1 {15,30,24,29,4,23,0,2,24,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),param1[i]) == f_gold(¶m0[i].front(),param1[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([5, 15, 19, 22, 28, 29, 39, 46, 46, 49, 51, 55, 62, 69, 72, 72, 72, 74, 79, 92, 92, 93, 95, 96],15,), ([-26, -54, 92, 76, -92, -14, -24, -70, -78, -50, -48, -22, 12, 2, -34, -60, 4, -32, -10, 52, -92, -74, 18, 34, 6, -66, 42, -10, -6, 56, 92],30,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([59, 35, 13, 79, 61, 97, 92, 48, 98, 38, 65, 54, 31, 49, 81, 22, 96, 29, 65, 48, 92, 66, 25, 21, 26, 1, 32, 73, 46, 5, 40, 17, 53, 93, 83, 29],29,), ([-70, -34, -32, -30, -14, 80, 86, 90],4,), ([0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0],23,), ([9],0,), ([94, 10, 70, 42],2,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],24,), ([64, 76, 49, 55, 92, 15, 4, 8, 95, 60, 90, 3, 7, 79, 84, 17, 96, 10, 80, 26, 22, 15],20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_WHETHER_NUMBER_DUCK_NUMBER_NOT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_NUMBER_DUCK_NUMBER_NOT{ static int f_gold ( String num ) { int len = num . length ( ) ; int count_zero = 0 ; char ch ; for ( int i = 1 ; i < len ; i ++ ) { ch = num . charAt ( i ) ; if ( ch == '0' ) count_zero ++ ; } return count_zero ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(""HLlQWSphZcIC""); param0.add(""080287724""); param0.add(""0000100000""); param0.add("" Q""); param0.add(""4247040983""); param0.add(""00001011101""); param0.add(""LbNsnYTHmLbCf""); param0.add(""24""); param0.add(""110""); param0.add(""ie""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( num ) : l = len ( num ) count_zero = 0 i = 1 while i < l : ch = num [ i ] if ( ch == ""0"" ) : count_zero = count_zero + 1 i = i + 1 return count_zero ",,," if __name__ == '__main__': param = [ ('HLlQWSphZcIC',), ('080287724',), ('0000100000',), (' Q',), ('4247040983',), ('00001011101',), ('LbNsnYTHmLbCf',), ('24',), ('110',), ('ie',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", COUNT_SINGLE_NODE_ISOLATED_SUB_GRAPHS_DISCONNECTED_GRAPH," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_SINGLE_NODE_ISOLATED_SUB_GRAPHS_DISCONNECTED_GRAPH{ static int f_gold ( int [ ] graph , int N ) { int count = 0 ; for ( int i = 1 ; i < 7 ; i ++ ) { if ( graph [ i ] == 0 ) count ++ ; } return count ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{18,26,39,43,46,57,63,76,84,88}); param0.add(new int[]{76,-92,-40,48,84,8,28,64,84,-58,40,48,-8,22,84,-14,-32,-66,84,-74,10,50,96,92,-60,70,0,2,16,-26}); param0.add(new int[]{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}); param0.add(new int[]{15,76,11,70,34,54,4,33,20,93,51,9,58,50,23,97,42,28,98,3,21,39,20,11,38}); param0.add(new int[]{-96,-84,-74,-58,-52,-52,-28,-24,-22,-12,-12,-8,-6,-2,-2,8,10,20,24,32,36,36,46,54,66,88,94}); param0.add(new int[]{0,1,1,1,1,0,0,0,0,0,0,1,1,0,1,1,0,1,1,1,0,1,1,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,1,1,0,1,1,1,0,1}); param0.add(new int[]{1,1,4,9,13,18,18,21,22,32,33,39,41,44,51,55,56,59,60,61,63,68,69,71,72,73,74,74,75,81,83,87,88,92,94,97}); param0.add(new int[]{10,54,-64,30,-50,-4,14,-96,-22,80,-36,-36,-92,58,28,10,32,-82,-6,-40,0,-46,-68,-18,-16,-38,-22,-68,-82,76,70,-48,10,50,82,98,-22,-74,22,-60,-70,46,84,88,-34,-30,88,26}); param0.add(new int[]{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}); param0.add(new int[]{25,39,1,6,86,45,19,76,65,29,9}); List param1 = new ArrayList<>(); param1.add(8); param1.add(15); param1.add(31); param1.add(12); param1.add(20); param1.add(24); param1.add(22); param1.add(35); param1.add(41); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }",,,,, AREA_SQUARE_CIRCUMSCRIBED_CIRCLE," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class AREA_SQUARE_CIRCUMSCRIBED_CIRCLE{ static int f_gold ( int r ) { return ( 2 * r * r ) ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(14); param0.add(78); param0.add(45); param0.add(66); param0.add(18); param0.add(32); param0.add(60); param0.add(16); param0.add(99); param0.add(65); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( r ) : return ( 2 * r * r ) "," using namespace std; int f_gold ( int r ) { return ( 2 * r * r ); } int main() { int n_success = 0; vector param0 {14,78,45,66,18,32,60,16,99,65}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (14,), (78,), (45,), (66,), (18,), (32,), (60,), (16,), (99,), (65,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_NON_NEGATIVE_INTEGRAL_SOLUTIONS_B_C_N{ static int f_gold ( int n ) { int result = 0 ; for ( int i = 0 ; i <= n ; i ++ ) for ( int j = 0 ; j <= n - i ; j ++ ) for ( int k = 0 ; k <= ( n - i - j ) ; k ++ ) if ( i + j + k == n ) result ++ ; return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(62); param0.add(44); param0.add(37); param0.add(81); param0.add(14); param0.add(20); param0.add(76); param0.add(72); param0.add(96); param0.add(52); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( n ) : result = 0 for i in range ( n + 1 ) : for j in range ( n + 1 ) : for k in range ( n + 1 ) : if i + j + k == n : result += 1 return result "," using namespace std; int f_gold ( int n ) { int result = 0; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n - i; j ++ ) for ( int k = 0; k <= ( n - i - j ); k ++ ) if ( i + j + k == n ) result ++; return result; } int main() { int n_success = 0; vector param0 {62,44,37,81,14,20,76,72,96,52}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (62,), (44,), (37,), (81,), (14,), (20,), (76,), (72,), (96,), (52,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))", CHECK_TWO_GIVEN_CIRCLES_TOUCH_INTERSECT," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_TWO_GIVEN_CIRCLES_TOUCH_INTERSECT{ static int f_gold ( int x1 , int y1 , int x2 , int y2 , int r1 , int r2 ) { int distSq = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) ; int radSumSq = ( r1 + r2 ) * ( r1 + r2 ) ; if ( distSq == radSumSq ) return 1 ; else if ( distSq > radSumSq ) return - 1 ; else return 0 ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(11); param0.add(87); param0.add(51); param0.add(89); param0.add(64); param0.add(57); param0.add(65); param0.add(32); param0.add(73); param0.add(3); List param1 = new ArrayList<>(); param1.add(36); param1.add(1); param1.add(1); param1.add(67); param1.add(10); param1.add(86); param1.add(90); param1.add(23); param1.add(61); param1.add(99); List param2 = new ArrayList<>(); param2.add(62); param2.add(62); param2.add(47); param2.add(9); param2.add(79); param2.add(99); param2.add(42); param2.add(28); param2.add(63); param2.add(6); List param3 = new ArrayList<>(); param3.add(64); param3.add(64); param3.add(90); param3.add(52); param3.add(45); param3.add(43); param3.add(82); param3.add(26); param3.add(77); param3.add(19); List param4 = new ArrayList<>(); param4.add(50); param4.add(54); param4.add(14); param4.add(94); param4.add(67); param4.add(83); param4.add(77); param4.add(60); param4.add(92); param4.add(21); List param5 = new ArrayList<>(); param5.add(4); param5.add(41); param5.add(71); param5.add(21); param5.add(78); param5.add(63); param5.add(32); param5.add(45); param5.add(76); param5.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i),param5.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold(x1, y1, x2, y2, r1, r2): distSq = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) radSumSq = (r1 + r2) * (r1 + r2) if (distSq == radSumSq): return 1 elif (distSq > radSumSq): return - 1 else: return 0 "," using namespace std; int f_gold ( int x1, int y1, int x2, int y2, int r1, int r2 ) { int distSq = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ); int radSumSq = ( r1 + r2 ) * ( r1 + r2 ); if ( distSq == radSumSq ) return 1; else if ( distSq > radSumSq ) return - 1; else return 0; } int main() { int n_success = 0; vector param0 {11,87,51,89,64,57,65,32,73,3}; vector param1 {36,1,1,67,10,86,90,23,61,99}; vector param2 {62,62,47,9,79,99,42,28,63,6}; vector param3 {64,64,90,52,45,43,82,26,77,19}; vector param4 {50,54,14,94,67,83,77,60,92,21}; vector param5 {4,41,71,21,78,63,32,45,76,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i],param5[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ (11, 36, 62, 64, 50, 4,), (87, 1, 62, 64, 54, 41,), (51, 1, 47, 90, 14, 71,), (89, 67, 9, 52, 94, 21,), (64, 10, 79, 45, 67, 78,), (57, 86, 99, 43, 83, 63,), (65, 90, 42, 82, 77, 32,), (32, 23, 28, 26, 60, 45,), (73, 61, 63, 77, 92, 76,), (3, 99, 6, 19, 21, 28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print(""#Results: %i, %i"" % (n_success, len(param))) ", MINIMUM_NUMBER_PLATFORMS_REQUIRED_RAILWAYBUS_STATION," import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_NUMBER_PLATFORMS_REQUIRED_RAILWAYBUS_STATION{ static int f_gold ( int arr [ ] , int dep [ ] , int n ) { Arrays . sort ( arr ) ; Arrays . sort ( dep ) ; int plat_needed = 1 , result = 1 ; int i = 1 , j = 0 ; while ( i < n && j < n ) { if ( arr [ i ] <= dep [ j ] ) { plat_needed ++ ; i ++ ; if ( plat_needed > result ) result = plat_needed ; } else { plat_needed -- ; j ++ ; } } return result ; } public static void main(String args[]) { int n_success = 0; List param0 = new ArrayList<>(); param0.add(new int[]{8,24,28,64,75,86,93,95}); param0.add(new int[]{2,-30,-8,-78,58,-42,-94,84,-58,14,78,34,30,6,-18,-92,0,94,-54,58,0,-86,66,86,8,-26,50,16,-30,-68,98,-28,-4,-6}); param0.add(new int[]{0,0,0,0,0,0,1}); param0.add(new int[]{51,5,48,61,71,2,4,35,50,76,59,64,81,5,21,95}); param0.add(new int[]{-64,-52,44,52,90}); param0.add(new int[]{0,0,1,0,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,1,1,1}); param0.add(new int[]{2,15,25,55,72,96,98}); param0.add(new int[]{-60,30,-58,52,40,74,74,76,-72,-48,8,-56,-24,-40,-98,-76,-56,-20,30,-30,-34,4,-34}); param0.add(new int[]{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}); param0.add(new int[]{37,84,20,34,56,1,87,72}); List param1 = new ArrayList<>(); param1.add(new int[]{19,30,41,51,62,68,85,96}); param1.add(new int[]{40,22,-24,80,-76,-4,-8,-34,96,-98,16,28,14,52,10,-10,-62,64,-48,10,-64,-90,-52,46,34,50,50,-84,68,-12,-44,28,-22,78}); param1.add(new int[]{0,0,0,0,0,1,1}); param1.add(new int[]{67,84,86,43,50,90,49,8,40,67,5,51,40,28,31,47}); param1.add(new int[]{-62,-16,22,26,58}); param1.add(new int[]{0,0,1,1,1,0,1,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0}); param1.add(new int[]{3,6,11,19,26,37,39}); param1.add(new int[]{-96,-40,-76,52,-20,-28,-64,-72,36,56,52,34,14,8,-50,6,-82,-98,-8,18,-76,-66,-22}); param1.add(new int[]{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}); param1.add(new int[]{68,62,84,54,15,29,70,96}); List param2 = new ArrayList<>(); param2.add(6); param2.add(18); param2.add(6); param2.add(8); param2.add(3); param2.add(17); param2.add(6); param2.add(20); param2.add(22); param2.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println(""#Results:"" + n_success + "", "" + param0.size()); } }","def f_gold ( arr , dep , n ) : arr.sort ( ) dep.sort ( ) plat_needed = 1 result = 1 i = 1 j = 0 while ( i < n and j < n ) : if ( arr [ i ] < dep [ j ] ) : plat_needed += 1 i += 1 if ( plat_needed > result ) : result = plat_needed else : plat_needed -= 1 j += 1 return result "," using namespace std; int f_gold ( int arr [ ], int dep [ ], int n ) { sort ( arr, arr + n ); sort ( dep, dep + n ); int plat_needed = 1, result = 1; int i = 1, j = 0; while ( i < n && j < n ) { if ( arr [ i ] <= dep [ j ] ) { plat_needed ++; i ++; if ( plat_needed > result ) result = plat_needed; } else { plat_needed --; j ++; } } return result; } int main() { int n_success = 0; vector> param0 {{8,24,28,64,75,86,93,95},{2,-30,-8,-78,58,-42,-94,84,-58,14,78,34,30,6,-18,-92,0,94,-54,58,0,-86,66,86,8,-26,50,16,-30,-68,98,-28,-4,-6},{0,0,0,0,0,0,1},{51,5,48,61,71,2,4,35,50,76,59,64,81,5,21,95},{-64,-52,44,52,90},{0,0,1,0,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,1,1,1},{2,15,25,55,72,96,98},{-60,30,-58,52,40,74,74,76,-72,-48,8,-56,-24,-40,-98,-76,-56,-20,30,-30,-34,4,-34},{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},{37,84,20,34,56,1,87,72}}; vector> param1 {{19,30,41,51,62,68,85,96},{40,22,-24,80,-76,-4,-8,-34,96,-98,16,28,14,52,10,-10,-62,64,-48,10,-64,-90,-52,46,34,50,50,-84,68,-12,-44,28,-22,78},{0,0,0,0,0,1,1},{67,84,86,43,50,90,49,8,40,67,5,51,40,28,31,47},{-62,-16,22,26,58},{0,0,1,1,1,0,1,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0},{3,6,11,19,26,37,39},{-96,-40,-76,52,-20,-28,-64,-72,36,56,52,34,14,8,-50,6,-82,-98,-8,18,-76,-66,-22},{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},{68,62,84,54,15,29,70,96}}; vector param2 {6,18,6,8,3,17,6,20,22,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(¶m0[i].front(),¶m1[i].front(),param2[i]) == f_gold(¶m0[i].front(),¶m1[i].front(),param2[i])) { n_success+=1; } } cout << ""#Results:"" << "" "" << n_success << "", "" << param0.size(); return 0; }",," if __name__ == '__main__': param = [ ([8, 24, 28, 64, 75, 86, 93, 95],[19, 30, 41, 51, 62, 68, 85, 96],6,), ([2, -30, -8, -78, 58, -42, -94, 84, -58, 14, 78, 34, 30, 6, -18, -92, 0, 94, -54, 58, 0, -86, 66, 86, 8, -26, 50, 16, -30, -68, 98, -28, -4, -6],[40, 22, -24, 80, -76, -4, -8, -34, 96, -98, 16, 28, 14, 52, 10, -10, -62, 64, -48, 10, -64, -90, -52, 46, 34, 50, 50, -84, 68, -12, -44, 28, -22, 78],18,), ([0, 0, 0, 0, 0, 0, 1],[0, 0, 0, 0, 0, 1, 1],6,), ([51, 5, 48, 61, 71, 2, 4, 35, 50, 76, 59, 64, 81, 5, 21, 95],[67, 84, 86, 43, 50, 90, 49, 8, 40, 67, 5, 51, 40, 28, 31, 47],8,), ([-64, -52, 44, 52, 90],[-62, -16, 22, 26, 58],3,), ([0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1],[0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],17,), ([2, 15, 25, 55, 72, 96, 98],[3, 6, 11, 19, 26, 37, 39],6,), ([-60, 30, -58, 52, 40, 74, 74, 76, -72, -48, 8, -56, -24, -40, -98, -76, -56, -20, 30, -30, -34, 4, -34],[-96, -40, -76, 52, -20, -28, -64, -72, 36, 56, 52, 34, 14, 8, -50, 6, -82, -98, -8, 18, -76, -66, -22],20,), ([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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([37, 84, 20, 34, 56, 1, 87, 72],[68, 62, 84, 54, 15, 29, 70, 96],6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print(""#Results: %i, %i"" % (n_success, len(param)))",