id
stringlengths
9
111
java
stringlengths
188
2.04k
python
stringlengths
40
1.94k
cpp
stringlengths
65
1.25k
java_test
stringlengths
532
56.4k
python_test
stringlengths
348
57.4k
cpp_test
stringlengths
328
4.71k
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {20,15,19,19,3,13,25,13,14,39}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i]) == f_gold(&param0[i].front(),param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {14,24,13,4,19,0,19,23,30,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i]) == f_gold(&param0[i].front(),param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
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 ; }
null
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; }
public static void main(String args[]) { int n_success = 0; List<String> 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<Integer> 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()); } }
null
int main() { int n_success = 0; vector<string> param0 {"RElCP","0139035510","00011110","TwanZWwLNXhFN","6247009752778","0100001011011","NCh","00714746542","101000100","MSTkXmlbPkV"}; vector<int> 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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {26,8,9,10,10,41,0,9,4,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i]) == f_gold(&param0[i].front(),param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {7,24,1,12,23,2,4,11,29,9}; vector<int> param2 {12,36,1,16,22,1,4,9,30,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i],param2[i]) == f_gold(&param0[i].front(),param1[i],param2[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
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 ; }
null
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; }
public static void main(String args[]) { int n_success = 0; List<String> 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()); } }
null
int main() { int n_success = 0; vector<string> 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 ; }
null
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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<Integer> 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()); } }
null
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {5,6,2,24,24,34,10,20,5,21}; vector<int> param2 {2,2,1,2,3,2,8,4,2,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i],param2[i]) == f_gold(&param0[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 ; }
null
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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()); } }
null
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {30,20,31,37,11,12,13,3,27,12}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i]) == f_gold(&param0[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 ; }
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
null
public static void main(String args[]) { int n_success = 0; List<int [ ] [ ]> 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<Integer> 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<Integer> 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()); } }
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)))
null
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<String> 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()); } }
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)))
int main() { int n_success = 0; vector<string> 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; }
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 ) ; }
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 ); }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<vector<int>> 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<int> param1 {15,30,24,29,4,23,0,2,24,20}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i]) == f_gold(&param0[i].front(),param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
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 ; }
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
null
public static void main(String args[]) { int n_success = 0; List<String> 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()); } }
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)))
null
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 ; }
null
null
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<Integer> 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()); } }
null
null
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 ) ; }
def f_gold ( r ) : return ( 2 * r * r )
using namespace std; int f_gold ( int r ) { return ( 2 * r * r ); }
public static void main(String args[]) { int n_success = 0; List<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<int> 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; }
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<int> 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; }
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<Integer> 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<Integer> 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<Integer> 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<Integer> 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<Integer> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<int> param0 {11,87,51,89,64,57,65,32,73,3}; vector<int> param1 {36,1,1,67,10,86,90,23,61,99}; vector<int> param2 {62,62,47,9,79,99,42,28,63,6}; vector<int> param3 {64,64,90,52,45,43,82,26,77,19}; vector<int> param4 {50,54,14,94,67,83,77,60,92,21}; vector<int> 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; }
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 ; }
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; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> 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<int [ ]> 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<Integer> 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()); } }
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)))
int main() { int n_success = 0; vector<vector<int>> 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<vector<int>> 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<int> param2 {6,18,6,8,3,17,6,20,22,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),&param1[i].front(),param2[i]) == f_gold(&param0[i].front(),&param1[i].front(),param2[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }