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
MINIMUM_XOR_VALUE_PAIR
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_XOR_VALUE_PAIR{ static int f_gold ( int arr [ ] , int n ) { int min_xor = Integer . MAX_VALUE ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) min_xor = Math . min ( min_xor , arr [ i ] ^ arr [ j ] ) ; return min_xor ; }
def f_gold ( arr , n ) : arr.sort ( ) ; min_xor = 999999 val = 0 for i in range ( 0 , n - 1 ) : for j in range ( i + 1 , n - 1 ) : val = arr [ i ] ^ arr [ j ] min_xor = min ( min_xor , val ) return min_xor
using namespace std; int f_gold ( int arr [ ], int n ) { int min_xor = INT_MAX; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) min_xor = min ( min_xor, arr [ i ] ^ arr [ j ] ); return min_xor; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,5,7,10,10,11,14,19,21,24,27,27,27,28,28,28,33,34,41,42,43,48,52,53,53,59,62,64,66,71,77,78,78,79,80,82,90,97,99,99}); param0.add(new int[]{-68,-58,52,88,90,66,-66,-84,-70,-64,56,42,94,-10,0,80,8,28,-94,36,90,56,56,80,-94,50,90,-28,-22,-2,-96,74,-16,-14}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{57,63,11,73,60,73,25,65,39,48,31,17,23,94,10,97,42,45,83,75,97,96}); param0.add(new int[]{-92,-92,-90,-88,-84,-82,-66,-64,-64,-62,-44,-42,-40,-28,-22,-12,-4,-2,0,4,16,22,28,34,54,60,72,74,78,86,94}); param0.add(new int[]{1,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0}); param0.add(new int[]{2,2,6,13,16,16,17,19,19,20,22,25,27,29,34,34,34,36,38,39,42,49,49,53,59,59,71,77,79,82,83,83,84,84,86,86,87,88,93,96}); param0.add(new int[]{-14,20,36,12,-54,-50,92,-28,44,-46,6,96,82,70,-20,24,-96,-14,46,-28,-46,-28,22,-82,36,-94,-48,-92,96,74,14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{50,48,94,64,60,48,79,75,77,62,33,42,22,78,32,99,27,23,76,51,34,54,70,12,19,17,13,82,96,70,4,12,5,11,23,23,18,93,38,69}); List<Integer> param1 = new ArrayList<>(); param1.add(34); param1.add(17); param1.add(9); param1.add(21); param1.add(18); param1.add(36); param1.add(36); param1.add(20); param1.add(39); param1.add(30); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([4, 5, 7, 10, 10, 11, 14, 19, 21, 24, 27, 27, 27, 28, 28, 28, 33, 34, 41, 42, 43, 48, 52, 53, 53, 59, 62, 64, 66, 71, 77, 78, 78, 79, 80, 82, 90, 97, 99, 99],34,), ([-68, -58, 52, 88, 90, 66, -66, -84, -70, -64, 56, 42, 94, -10, 0, 80, 8, 28, -94, 36, 90, 56, 56, 80, -94, 50, 90, -28, -22, -2, -96, 74, -16, -14],17,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],9,), ([57, 63, 11, 73, 60, 73, 25, 65, 39, 48, 31, 17, 23, 94, 10, 97, 42, 45, 83, 75, 97, 96],21,), ([-92, -92, -90, -88, -84, -82, -66, -64, -64, -62, -44, -42, -40, -28, -22, -12, -4, -2, 0, 4, 16, 22, 28, 34, 54, 60, 72, 74, 78, 86, 94],18,), ([1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0],36,), ([2, 2, 6, 13, 16, 16, 17, 19, 19, 20, 22, 25, 27, 29, 34, 34, 34, 36, 38, 39, 42, 49, 49, 53, 59, 59, 71, 77, 79, 82, 83, 83, 84, 84, 86, 86, 87, 88, 93, 96],36,), ([-14, 20, 36, 12, -54, -50, 92, -28, 44, -46, 6, 96, 82, 70, -20, 24, -96, -14, 46, -28, -46, -28, 22, -82, 36, -94, -48, -92, 96, 74, 14],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],39,), ([50, 48, 94, 64, 60, 48, 79, 75, 77, 62, 33, 42, 22, 78, 32, 99, 27, 23, 76, 51, 34, 54, 70, 12, 19, 17, 13, 82, 96, 70, 4, 12, 5, 11, 23, 23, 18, 93, 38, 69],30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{4,5,7,10,10,11,14,19,21,24,27,27,27,28,28,28,33,34,41,42,43,48,52,53,53,59,62,64,66,71,77,78,78,79,80,82,90,97,99,99},{-68,-58,52,88,90,66,-66,-84,-70,-64,56,42,94,-10,0,80,8,28,-94,36,90,56,56,80,-94,50,90,-28,-22,-2,-96,74,-16,-14},{0,0,0,0,0,0,1,1,1,1,1,1},{57,63,11,73,60,73,25,65,39,48,31,17,23,94,10,97,42,45,83,75,97,96},{-92,-92,-90,-88,-84,-82,-66,-64,-64,-62,-44,-42,-40,-28,-22,-12,-4,-2,0,4,16,22,28,34,54,60,72,74,78,86,94},{1,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0},{2,2,6,13,16,16,17,19,19,20,22,25,27,29,34,34,34,36,38,39,42,49,49,53,59,59,71,77,79,82,83,83,84,84,86,86,87,88,93,96},{-14,20,36,12,-54,-50,92,-28,44,-46,6,96,82,70,-20,24,-96,-14,46,-28,-46,-28,22,-82,36,-94,-48,-92,96,74,14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{50,48,94,64,60,48,79,75,77,62,33,42,22,78,32,99,27,23,76,51,34,54,70,12,19,17,13,82,96,70,4,12,5,11,23,23,18,93,38,69}}; vector<int> param1 {34,17,9,21,18,36,36,20,39,30}; 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; }
SUM_DIVISORS_1_N_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_DIVISORS_1_N_1{ static int f_gold ( int n ) { int sum = 0 ; for ( int i = 1 ; i <= n ; ++ i ) sum += ( n / i ) * i ; return sum ; }
def f_gold ( n ) : sum = 0 for i in range ( 1 , n + 1 ) : sum += int ( n / i ) * i return int ( sum )
using namespace std; int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; ++ i ) sum += ( n / i ) * i; return sum; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(73); param0.add(41); param0.add(36); param0.add(28); param0.add(49); param0.add(24); param0.add(85); param0.add(59); param0.add(82); param0.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (73,), (41,), (36,), (28,), (49,), (24,), (85,), (59,), (82,), (40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {73,41,36,28,49,24,85,59,82,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
PIZZA_CUT_PROBLEM_CIRCLE_DIVISION_LINES
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PIZZA_CUT_PROBLEM_CIRCLE_DIVISION_LINES{ static int f_gold ( int n ) { return 1 + n * ( n + 1 ) / 2 ; }
def f_gold ( n ) : return int ( 1 + n * ( n + 1 ) / 2 )
using namespace std; int f_gold ( int n ) { return 1 + n * ( n + 1 ) / 2; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(46); param0.add(68); param0.add(4); param0.add(12); param0.add(56); param0.add(14); param0.add(81); param0.add(29); param0.add(26); param0.add(40); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (46,), (68,), (4,), (12,), (56,), (14,), (81,), (29,), (26,), (40,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {46,68,4,12,56,14,81,29,26,40}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MAXIMUM_TRIPLET_SUM_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_TRIPLET_SUM_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int sum = - 1000000 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) for ( int k = j + 1 ; k < n ; k ++ ) if ( sum < arr [ i ] + arr [ j ] + arr [ k ] ) sum = arr [ i ] + arr [ j ] + arr [ k ] ; return sum ; }
def f_gold ( arr , n ) : sm = - 1000000 for i in range ( 0 , n ) : for j in range ( i + 1 , n ) : for k in range ( j + 1 , n ) : if ( sm < ( arr [ i ] + arr [ j ] + arr [ k ] ) ) : sm = arr [ i ] + arr [ j ] + arr [ k ] return sm
using namespace std; int f_gold ( int arr [ ], int n ) { int sum = INT_MIN; for ( int i = 0; i < n; i ++ ) for ( int j = i + 1; j < n; j ++ ) for ( int k = j + 1; k < n; k ++ ) if ( sum < arr [ i ] + arr [ j ] + arr [ k ] ) sum = arr [ i ] + arr [ j ] + arr [ k ]; return sum; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{6,10,14,19,24,29,42,43,44,47,47,55,57,59,60,61,76,76,77,81,84,92,92,93,95,97}); param0.add(new int[]{-98,72,52,-62,74,-26,-82,-74,90,58,94,-2,76,-28,12,64,-94,86,56,10,40,20,92,-4,-80,26,-40,36,66,-46,4,-42,-76,76,-90,-48,22,30,48,38,78}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{96,96,38,26,2,36,15,51,78,98,94,31,62,21,7,68,37,4}); param0.add(new int[]{-8,12,68,78,78}); param0.add(new int[]{0,0,0,0,1,0,0,0,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0}); param0.add(new int[]{1,15,16,17,28,28,28,30,31,37,38,38,45,45,46,46,50,51,53,53,55,55,56,58,58,64,78,82,82,85,87,89,89,90,94,95}); param0.add(new int[]{-56,-72,-20,88,20,86,30,36,-44,-66,-26,-88,12,-76,78,62,62,68,-34,0,-22,64,72,56,-64,-16,-4,86,0,98,-70,98,-68,92,-84,-56,28,-74,6,-10,-82,36,-12,-26,66,-60,-68,70,2}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{85,31,15,68,92,89,32,56,27,70,82,58,63,83,89,95,78,9,27,34,24,42,66,6,1,71,55,23,75,26,19,58,25}); List<Integer> param1 = new ArrayList<>(); param1.add(15); param1.add(28); param1.add(22); param1.add(10); param1.add(4); param1.add(35); param1.add(29); param1.add(36); param1.add(11); param1.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([6, 10, 14, 19, 24, 29, 42, 43, 44, 47, 47, 55, 57, 59, 60, 61, 76, 76, 77, 81, 84, 92, 92, 93, 95, 97],15,), ([-98, 72, 52, -62, 74, -26, -82, -74, 90, 58, 94, -2, 76, -28, 12, 64, -94, 86, 56, 10, 40, 20, 92, -4, -80, 26, -40, 36, 66, -46, 4, -42, -76, 76, -90, -48, 22, 30, 48, 38, 78],28,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([96, 96, 38, 26, 2, 36, 15, 51, 78, 98, 94, 31, 62, 21, 7, 68, 37, 4],10,), ([-8, 12, 68, 78, 78],4,), ([0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],35,), ([1, 15, 16, 17, 28, 28, 28, 30, 31, 37, 38, 38, 45, 45, 46, 46, 50, 51, 53, 53, 55, 55, 56, 58, 58, 64, 78, 82, 82, 85, 87, 89, 89, 90, 94, 95],29,), ([-56, -72, -20, 88, 20, 86, 30, 36, -44, -66, -26, -88, 12, -76, 78, 62, 62, 68, -34, 0, -22, 64, 72, 56, -64, -16, -4, 86, 0, 98, -70, 98, -68, 92, -84, -56, 28, -74, 6, -10, -82, 36, -12, -26, 66, -60, -68, 70, 2],36,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],11,), ([85, 31, 15, 68, 92, 89, 32, 56, 27, 70, 82, 58, 63, 83, 89, 95, 78, 9, 27, 34, 24, 42, 66, 6, 1, 71, 55, 23, 75, 26, 19, 58, 25],16,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{6,10,14,19,24,29,42,43,44,47,47,55,57,59,60,61,76,76,77,81,84,92,92,93,95,97},{-98,72,52,-62,74,-26,-82,-74,90,58,94,-2,76,-28,12,64,-94,86,56,10,40,20,92,-4,-80,26,-40,36,66,-46,4,-42,-76,76,-90,-48,22,30,48,38,78},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{96,96,38,26,2,36,15,51,78,98,94,31,62,21,7,68,37,4},{-8,12,68,78,78},{0,0,0,0,1,0,0,0,1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0},{1,15,16,17,28,28,28,30,31,37,38,38,45,45,46,46,50,51,53,53,55,55,56,58,58,64,78,82,82,85,87,89,89,90,94,95},{-56,-72,-20,88,20,86,30,36,-44,-66,-26,-88,12,-76,78,62,62,68,-34,0,-22,64,72,56,-64,-16,-4,86,0,98,-70,98,-68,92,-84,-56,28,-74,6,-10,-82,36,-12,-26,66,-60,-68,70,2},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{85,31,15,68,92,89,32,56,27,70,82,58,63,83,89,95,78,9,27,34,24,42,66,6,1,71,55,23,75,26,19,58,25}}; vector<int> param1 {15,28,22,10,4,35,29,36,11,16}; 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; }
MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_SUM_TWO_NUMBERS_FORMED_DIGITS_ARRAY{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int a = 0 , b = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( i % 2 != 0 ) a = a * 10 + arr [ i ] ; else b = b * 10 + arr [ i ] ; } return a + b ; }
def f_gold ( arr , n ) : arr.sort ( ) a = 0 ; b = 0 for i in range ( n ) : if ( i % 2 != 0 ) : a = a * 10 + arr [ i ] else : b = b * 10 + arr [ i ] return a + b
using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int a = 0, b = 0; for ( int i = 0; i < n; i ++ ) { if ( i & 1 ) a = a * 10 + arr [ i ]; else b = b * 10 + arr [ i ]; } return a + b; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,4,5,10,14,16,18,42,43,43,45,46,51,52,53,58,61,66,79,81,82,84}); param0.add(new int[]{48,-22,60,32,48,-2,-76,-50,-26,56,-86,98,-30,-22,82,-20,58,40,76,-2,82,-90,8,-46,22,94}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{79,45}); param0.add(new int[]{-90,-68,-38,-34,-4,6,10,28,48,52,54,68,88,90}); param0.add(new int[]{1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0}); param0.add(new int[]{4,8,8,23,26,27,30,42,44,55,59,64,67,69,74,77,82,82,87,96,97}); param0.add(new int[]{0,-18,-98,-36,-62,0,-32,-98,46,72,-18,30,-86,-42,-82,2,-76,-64,-66,-48,-28,52,-46,-76,76,10,70,4,18,94,88,80,-60,-36,62,96,-4,88,50}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{8,71,75,58,97,24,56,98,71,69,32,64,54,96,69,22,7,47,45,68,17,36,90,9,71,86,16,61,53,63,9,74,38,87,14,86,42,42,14,43,58,82,72,73,32}); List<Integer> param1 = new ArrayList<>(); param1.add(19); param1.add(25); param1.add(23); param1.add(1); param1.add(11); param1.add(22); param1.add(17); param1.add(32); param1.add(6); param1.add(25); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([3, 4, 5, 10, 14, 16, 18, 42, 43, 43, 45, 46, 51, 52, 53, 58, 61, 66, 79, 81, 82, 84],19,), ([48, -22, 60, 32, 48, -2, -76, -50, -26, 56, -86, 98, -30, -22, 82, -20, 58, 40, 76, -2, 82, -90, 8, -46, 22, 94],25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,), ([79, 45],1,), ([-90, -68, -38, -34, -4, 6, 10, 28, 48, 52, 54, 68, 88, 90],11,), ([1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0],22,), ([4, 8, 8, 23, 26, 27, 30, 42, 44, 55, 59, 64, 67, 69, 74, 77, 82, 82, 87, 96, 97],17,), ([0, -18, -98, -36, -62, 0, -32, -98, 46, 72, -18, 30, -86, -42, -82, 2, -76, -64, -66, -48, -28, 52, -46, -76, 76, 10, 70, 4, 18, 94, 88, 80, -60, -36, 62, 96, -4, 88, 50],32,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1],6,), ([8, 71, 75, 58, 97, 24, 56, 98, 71, 69, 32, 64, 54, 96, 69, 22, 7, 47, 45, 68, 17, 36, 90, 9, 71, 86, 16, 61, 53, 63, 9, 74, 38, 87, 14, 86, 42, 42, 14, 43, 58, 82, 72, 73, 32],25,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{3,4,5,10,14,16,18,42,43,43,45,46,51,52,53,58,61,66,79,81,82,84},{48,-22,60,32,48,-2,-76,-50,-26,56,-86,98,-30,-22,82,-20,58,40,76,-2,82,-90,8,-46,22,94},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{79,45},{-90,-68,-38,-34,-4,6,10,28,48,52,54,68,88,90},{1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0},{4,8,8,23,26,27,30,42,44,55,59,64,67,69,74,77,82,82,87,96,97},{0,-18,-98,-36,-62,0,-32,-98,46,72,-18,30,-86,-42,-82,2,-76,-64,-66,-48,-28,52,-46,-76,76,10,70,4,18,94,88,80,-60,-36,62,96,-4,88,50},{0,0,0,0,0,0,1,1,1,1},{8,71,75,58,97,24,56,98,71,69,32,64,54,96,69,22,7,47,45,68,17,36,90,9,71,86,16,61,53,63,9,74,38,87,14,86,42,42,14,43,58,82,72,73,32}}; vector<int> param1 {19,25,23,1,11,22,17,32,6,25}; 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; }
LONGEST_PREFIX_ALSO_SUFFIX_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_PREFIX_ALSO_SUFFIX_1{ static int f_gold ( String s ) { int n = s . length ( ) ; int lps [ ] = new int [ n ] ; lps [ 0 ] = 0 ; int len = 0 ; int i = 1 ; while ( i < n ) { if ( s . charAt ( i ) == s . charAt ( len ) ) { len ++ ; lps [ i ] = len ; i ++ ; } else { if ( len != 0 ) { len = lps [ len - 1 ] ; } else { lps [ i ] = 0 ; i ++ ; } } } int res = lps [ n - 1 ] ; return ( res > n / 2 ) ? n / 2 : res ; }
def f_gold ( s ) : n = len ( s ) lps = [ 0 ] * n l = 0 i = 1 while ( i < n ) : if ( s [ i ] == s [ l ] ) : l = l + 1 lps [ i ] = l i = i + 1 else : if ( l != 0 ) : l = lps [ l - 1 ] else : lps [ i ] = 0 i = i + 1 res = lps [ n - 1 ] if ( res > n / 2 ) : return n // 2 else : return res
using namespace std; int f_gold ( string s ) { int n = s . length ( ); int lps [ n ]; lps [ 0 ] = 0; int len = 0; int i = 1; while ( i < n ) { if ( s [ i ] == s [ len ] ) { len ++; lps [ i ] = len; i ++; } else { if ( len != 0 ) { len = lps [ len - 1 ]; } else { lps [ i ] = 0; i ++; } } } int res = lps [ n - 1 ]; return ( res > n / 2 ) ? n / 2 : res; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("aabcdaabc"); param0.add("1372494598"); param0.add("110000100001"); param0.add("abcab"); param0.add("488938"); param0.add("011010101011"); param0.add("aaaa"); param0.add("3356203205"); param0.add("1010"); param0.add("kkXiiTZkGeh"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('aabcdaabc',), ('1372494598',), ('110000100001',), ('abcab',), ('488938',), ('011010101011',), ('aaaa',), ('3356203205',), ('1010',), ('kkXiiTZkGeh',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"aabcdaabc","1372494598","110000100001","abcab","488938","011010101011","aaaa","3356203205","1010","kkXiiTZkGeh"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
SEARCHING_ARRAY_ADJACENT_DIFFER_K
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCHING_ARRAY_ADJACENT_DIFFER_K{ static int f_gold ( int arr [ ] , int n , int x , int k ) { int i = 0 ; while ( i < n ) { if ( arr [ i ] == x ) return i ; i = i + Math . max ( 1 , Math . abs ( arr [ i ] - x ) / k ) ; } System . out . println ( "number is " + "not present!" ) ; return - 1 ; }
def f_gold ( arr , n , x , k ) : i = 0 while ( i < n ) : if ( arr [ i ] == x ) : return i i = i + max ( 1 , int ( abs ( arr [ i ] - x ) / k ) ) print ( "number is not present!" ) return - 1
using namespace std; int f_gold ( int arr [ ], int n, int x, int k ) { int i = 0; while ( i < n ) { if ( arr [ i ] == x ) return i; i = i + max ( 1, abs ( arr [ i ] - x ) / k ); } cout << "number is not present!"; return - 1; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,5,9,11,14,18,19,21,26,32,38,38,43,47,49,52,55,61,65,67,69,73,74,79,84,90,91,91,92,93,94,99}); param0.add(new int[]{12,-86,-66,-50,-48,78,-92,-56,-2,66,64}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{10,87,39,87,45,33,5,37,70,69,88,78,90,3}); param0.add(new int[]{-78,-70,-68,-60,-52,-34,-24,-4,12,18,58,58,64,76,84,94}); param0.add(new int[]{0,1,0,1,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,1,0,1,0}); param0.add(new int[]{5,5,7,11,11,15,22,23,28,38,41,53,54,57,59,68,71,89}); param0.add(new int[]{-4,0,60,-14,-48,54,-96,-68,-40,64,-50,-74,-20,-22,48,-48,42,62,66,84,54,-52,-52,6,46,-90,-18,90}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1}); param0.add(new int[]{30,91,34,44,3,76,43,75,49,33,74,72,68,79,26,62,23,5,32,75,82,25,7,19,32,87,87,94,34,62,3,32,59}); List<Integer> param1 = new ArrayList<>(); param1.add(22); param1.add(5); param1.add(35); param1.add(9); param1.add(14); param1.add(26); param1.add(16); param1.add(18); param1.add(9); param1.add(32); List<Integer> param2 = new ArrayList<>(); param2.add(19); param2.add(10); param2.add(37); param2.add(8); param2.add(9); param2.add(36); param2.add(17); param2.add(14); param2.add(8); param2.add(30); List<Integer> param3 = new ArrayList<>(); param3.add(26); param3.add(5); param3.add(43); param3.add(10); param3.add(13); param3.add(32); param3.add(16); param3.add(23); param3.add(9); param3.add(24); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([1, 5, 9, 11, 14, 18, 19, 21, 26, 32, 38, 38, 43, 47, 49, 52, 55, 61, 65, 67, 69, 73, 74, 79, 84, 90, 91, 91, 92, 93, 94, 99],22,19,26,), ([12, -86, -66, -50, -48, 78, -92, -56, -2, 66, 64],5,10,5,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],35,37,43,), ([10, 87, 39, 87, 45, 33, 5, 37, 70, 69, 88, 78, 90, 3],9,8,10,), ([-78, -70, -68, -60, -52, -34, -24, -4, 12, 18, 58, 58, 64, 76, 84, 94],14,9,13,), ([0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0],26,36,32,), ([5, 5, 7, 11, 11, 15, 22, 23, 28, 38, 41, 53, 54, 57, 59, 68, 71, 89],16,17,16,), ([-4, 0, 60, -14, -48, 54, -96, -68, -40, 64, -50, -74, -20, -22, 48, -48, 42, 62, 66, 84, 54, -52, -52, 6, 46, -90, -18, 90],18,14,23,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],9,8,9,), ([30, 91, 34, 44, 3, 76, 43, 75, 49, 33, 74, 72, 68, 79, 26, 62, 23, 5, 32, 75, 82, 25, 7, 19, 32, 87, 87, 94, 34, 62, 3, 32, 59],32,30,24,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{1,5,9,11,14,18,19,21,26,32,38,38,43,47,49,52,55,61,65,67,69,73,74,79,84,90,91,91,92,93,94,99},{12,-86,-66,-50,-48,78,-92,-56,-2,66,64},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{10,87,39,87,45,33,5,37,70,69,88,78,90,3},{-78,-70,-68,-60,-52,-34,-24,-4,12,18,58,58,64,76,84,94},{0,1,0,1,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,1,0,1,0},{5,5,7,11,11,15,22,23,28,38,41,53,54,57,59,68,71,89},{-4,0,60,-14,-48,54,-96,-68,-40,64,-50,-74,-20,-22,48,-48,42,62,66,84,54,-52,-52,6,46,-90,-18,90},{0,0,0,0,0,0,0,1,1,1,1,1},{30,91,34,44,3,76,43,75,49,33,74,72,68,79,26,62,23,5,32,75,82,25,7,19,32,87,87,94,34,62,3,32,59}}; vector<int> param1 {22,5,35,9,14,26,16,18,9,32}; vector<int> param2 {19,10,37,8,9,36,17,14,8,30}; vector<int> param3 {26,5,43,10,13,32,16,23,9,24}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i],param2[i],param3[i]) == f_gold(&param0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1{ static int f_gold ( int m , int n ) { int count [ ] [ ] = new int [ m ] [ n ] ; for ( int i = 0 ; i < m ; i ++ ) count [ i ] [ 0 ] = 1 ; for ( int j = 0 ; j < n ; j ++ ) count [ 0 ] [ j ] = 1 ; for ( int i = 1 ; i < m ; i ++ ) { for ( int j = 1 ; j < n ; j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ] ; } return count [ m - 1 ] [ n - 1 ] ; }
null
using namespace std; int f_gold ( int m, int n ) { int count [ m ] [ n ]; for ( int i = 0; i < m; i ++ ) count [ i ] [ 0 ] = 1; for ( int j = 0; j < n; j ++ ) count [ 0 ] [ j ] = 1; for ( int i = 1; i < m; i ++ ) { for ( int j = 1; j < n; j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ]; } return count [ m - 1 ] [ n - 1 ]; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(79); param0.add(95); param0.add(15); param0.add(71); param0.add(16); param0.add(91); param0.add(10); param0.add(98); param0.add(30); param0.add(58); List<Integer> param1 = new ArrayList<>(); param1.add(16); param1.add(62); param1.add(9); param1.add(18); param1.add(85); param1.add(52); param1.add(91); param1.add(81); param1.add(42); param1.add(69); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<int> param0 {79,95,15,71,16,91,10,98,30,58}; vector<int> param1 {16,62,9,18,85,52,91,81,42,69}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MULTIPLY_TWO_NUMBERS_WITHOUT_USING_MULTIPLY_DIVISION_BITWISE_OPERATORS_AND_NO_LOOPS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_TWO_NUMBERS_WITHOUT_USING_MULTIPLY_DIVISION_BITWISE_OPERATORS_AND_NO_LOOPS{ static int f_gold ( int x , int y ) { if ( y == 0 ) return 0 ; if ( y > 0 ) return ( x + f_gold ( x , y - 1 ) ) ; if ( y < 0 ) return - f_gold ( x , - y ) ; return - 1 ; }
def f_gold ( x , y ) : if ( y == 0 ) : return 0 if ( y > 0 ) : return ( x + f_gold ( x , y - 1 ) ) if ( y < 0 ) : return - f_gold ( x , - y )
null
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(18); param0.add(23); param0.add(24); param0.add(75); param0.add(25); param0.add(57); param0.add(31); param0.add(8); param0.add(12); param0.add(74); List<Integer> param1 = new ArrayList<>(); param1.add(94); param1.add(36); param1.add(22); param1.add(92); param1.add(43); param1.add(32); param1.add(57); param1.add(17); param1.add(76); param1.add(70); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (18,94,), (23,36,), (24,22,), (75,92,), (25,43,), (57,32,), (31,57,), (8,17,), (12,76,), (74,70,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
FIND_NUMBER_PAIRS_ARRAY_XOR_0
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_NUMBER_PAIRS_ARRAY_XOR_0{ static int f_gold ( int a [ ] , int n ) { Arrays . sort ( a ) ; int count = 1 ; int answer = 0 ; for ( int i = 1 ; i < n ; i ++ ) { if ( a [ i ] == a [ i - 1 ] ) { count += 1 ; } else { answer = answer + ( count * ( count - 1 ) ) / 2 ; count = 1 ; } } answer = answer + ( count * ( count - 1 ) ) / 2 ; return answer ; }
null
using namespace std; int f_gold ( int a [ ], int n ) { sort ( a, a + n ); int count = 1; int answer = 0; for ( int i = 1; i < n; i ++ ) { if ( a [ i ] == a [ i - 1 ] ) { count += 1; } else { answer = answer + ( count * ( count - 1 ) ) / 2; count = 1; } } answer = answer + ( count * ( count - 1 ) ) / 2; return answer; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,7,9,12,13,13,14,16,19,23,24,25,28,29,38,38,41,42,44,51,55,56,58,59,61,62,62,63,63,64,67,68,69,71,78,78,80,82,82,82,83,85,86,92,94,98}); param0.add(new int[]{42,-20,52,34,58,62,-60,70,36,-8,-26,68,34,-92,42,94,56,84,-70,70}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{31,87,75,69,11,65,25,27}); param0.add(new int[]{-92,-88,-86,-74,-72,-70,-70,-66,-62,-60,-52,-42,-42,8,14,30,36,84,88}); param0.add(new int[]{1,0,0,0}); param0.add(new int[]{2,8,9,12,21,23,30,31,33,34,34,41,43,45,52,53,53,55,56,61,73,73,73,74,76,79,81,81,81,90,91,92,92,97,99,99}); param0.add(new int[]{84,6,-36,62,-2,-32,-82,-78,20,8,-50,-70,20,-58,94,-28,-84,-22,-44,-84,2,-68,-34,58,-64,-86,-40,-80,74,-26,12,2,-20,20,76,-14,-40,56,24,-16,-66,14,-42,0,72,82,-70}); param0.add(new int[]{0,0,0,0,0,0,0,1,1}); param0.add(new int[]{67,93,54,91,74,88,48,68,17,6,15,25}); List<Integer> param1 = new ArrayList<>(); param1.add(24); param1.add(17); param1.add(37); param1.add(5); param1.add(13); param1.add(3); param1.add(30); param1.add(31); param1.add(8); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{4,7,9,12,13,13,14,16,19,23,24,25,28,29,38,38,41,42,44,51,55,56,58,59,61,62,62,63,63,64,67,68,69,71,78,78,80,82,82,82,83,85,86,92,94,98},{42,-20,52,34,58,62,-60,70,36,-8,-26,68,34,-92,42,94,56,84,-70,70},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{31,87,75,69,11,65,25,27},{-92,-88,-86,-74,-72,-70,-70,-66,-62,-60,-52,-42,-42,8,14,30,36,84,88},{1,0,0,0},{2,8,9,12,21,23,30,31,33,34,34,41,43,45,52,53,53,55,56,61,73,73,73,74,76,79,81,81,81,90,91,92,92,97,99,99},{84,6,-36,62,-2,-32,-82,-78,20,8,-50,-70,20,-58,94,-28,-84,-22,-44,-84,2,-68,-34,58,-64,-86,-40,-80,74,-26,12,2,-20,20,76,-14,-40,56,24,-16,-66,14,-42,0,72,82,-70},{0,0,0,0,0,0,0,1,1},{67,93,54,91,74,88,48,68,17,6,15,25}}; vector<int> param1 {24,17,37,5,13,3,30,31,8,9}; 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; }
FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_PAIR_WITH_GREATEST_PRODUCT_IN_ARRAY{ static int f_gold ( int [ ] arr , int n ) { int result = - 1 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < n - 1 ; j ++ ) for ( int k = j + 1 ; k < n ; k ++ ) if ( arr [ j ] * arr [ k ] == arr [ i ] ) result = Math . max ( result , arr [ i ] ) ; return result ; }
def f_gold ( arr , n ) : result = - 1 for i in range ( n ) : for j in range ( n - 1 ) : for k in range ( j + 1 , n ) : if ( arr [ j ] * arr [ k ] == arr [ i ] ) : result = max ( result , arr [ i ] ) return result
using namespace std; int f_gold ( int arr [ ], int n ) { int result = - 1; for ( int i = 0; i < n; i ++ ) for ( int j = 0; j < n - 1; j ++ ) for ( int k = j + 1; k < n; k ++ ) if ( arr [ j ] * arr [ k ] == arr [ i ] ) result = max ( result, arr [ i ] ); return result; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,78,84}); param0.add(new int[]{-54,64,60,14,18,-68,-54,-58,38,-72,-84,46,74,76,28,-2,54,24,18,-74,-78,14,-38,-70,26,-54,-36,-96,-12,8,62,-42,-84,10,-6,36,-72,10,10,-20,16,92,-64,-34,74,-98,18}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{39,49,94,80,48,34,63,82,47,51,60,68,79,23,97,22,54,53,40,2,25}); param0.add(new int[]{-90,-52,-10,12,72}); param0.add(new int[]{1,0,0}); param0.add(new int[]{2,9,11,14,16,17,17,18,19,21,24,25,28,29,30,33,33,39,41,41,43,46,50,51,60,62,67,80,84,86,91,92,97}); param0.add(new int[]{4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{52,8,31,92,20,18,34,5,15,8,73,20,40,61,80,51,95,73,38,30,21,69,52,38,68,77}); List<Integer> param1 = new ArrayList<>(); param1.add(2); param1.add(26); param1.add(22); param1.add(10); param1.add(3); param1.add(2); param1.add(27); param1.add(0); param1.add(16); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([4, 78, 84],2,), ([-54, 64, 60, 14, 18, -68, -54, -58, 38, -72, -84, 46, 74, 76, 28, -2, 54, 24, 18, -74, -78, 14, -38, -70, 26, -54, -36, -96, -12, 8, 62, -42, -84, 10, -6, 36, -72, 10, 10, -20, 16, 92, -64, -34, 74, -98, 18],26,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],22,), ([39, 49, 94, 80, 48, 34, 63, 82, 47, 51, 60, 68, 79, 23, 97, 22, 54, 53, 40, 2, 25],10,), ([-90, -52, -10, 12, 72],3,), ([1, 0, 0],2,), ([2, 9, 11, 14, 16, 17, 17, 18, 19, 21, 24, 25, 28, 29, 30, 33, 33, 39, 41, 41, 43, 46, 50, 51, 60, 62, 67, 80, 84, 86, 91, 92, 97],27,), ([4],0,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,), ([52, 8, 31, 92, 20, 18, 34, 5, 15, 8, 73, 20, 40, 61, 80, 51, 95, 73, 38, 30, 21, 69, 52, 38, 68, 77],22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{4,78,84},{-54,64,60,14,18,-68,-54,-58,38,-72,-84,46,74,76,28,-2,54,24,18,-74,-78,14,-38,-70,26,-54,-36,-96,-12,8,62,-42,-84,10,-6,36,-72,10,10,-20,16,92,-64,-34,74,-98,18},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{39,49,94,80,48,34,63,82,47,51,60,68,79,23,97,22,54,53,40,2,25},{-90,-52,-10,12,72},{1,0,0},{2,9,11,14,16,17,17,18,19,21,24,25,28,29,30,33,33,39,41,41,43,46,50,51,60,62,67,80,84,86,91,92,97},{4},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{52,8,31,92,20,18,34,5,15,8,73,20,40,61,80,51,95,73,38,30,21,69,52,38,68,77}}; vector<int> param1 {2,26,22,10,3,2,27,0,16,22}; 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; }
NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_1{ public static int f_gold ( int a , int b ) { if ( a == 0 || b == 0 ) return 1 ; return ( int ) Math . floor ( Math . log10 ( Math . abs ( a ) ) + Math . log10 ( Math . abs ( b ) ) ) + 1 ; }
import math def f_gold ( a , b ) : if ( a == 0 or b == 0 ) : return 1 return math.floor ( math.log10 ( abs ( a ) ) + math.log10 ( abs ( b ) ) ) + 1
using namespace std; int f_gold ( int a, int b ) { if ( a == 0 || b == 0 ) return 1; return floor ( log10 ( abs ( a ) ) + log10 ( abs ( b ) ) ) + 1; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(97); param0.add(52); param0.add(95); param0.add(35); param0.add(40); param0.add(18); param0.add(92); param0.add(73); param0.add(10); param0.add(82); List<Integer> param1 = new ArrayList<>(); param1.add(91); param1.add(49); param1.add(34); param1.add(40); param1.add(85); param1.add(97); param1.add(15); param1.add(98); param1.add(62); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (97,91,), (52,49,), (95,34,), (35,40,), (40,85,), (18,97,), (92,15,), (73,98,), (10,62,), (82,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {97,52,95,35,40,18,92,73,10,82}; vector<int> param1 {91,49,34,40,85,97,15,98,62,22}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_WAYS_BUILD_STREET_GIVEN_CONSTRAINTS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_WAYS_BUILD_STREET_GIVEN_CONSTRAINTS{ static long f_gold ( int n ) { long dp [ ] [ ] = new long [ 2 ] [ n + 1 ] ; dp [ 0 ] [ 1 ] = 1 ; dp [ 1 ] [ 1 ] = 2 ; for ( int i = 2 ; i <= n ; i ++ ) { dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ] ; dp [ 1 ] [ i ] = dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ] ; } return dp [ 0 ] [ n ] + dp [ 1 ] [ n ] ; }
def f_gold ( n ) : dp = [ [ 0 ] * ( n + 1 ) for i in range ( 2 ) ] dp [ 0 ] [ 1 ] = 1 dp [ 1 ] [ 1 ] = 2 for i in range ( 2 , n + 1 ) : dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ] dp [ 1 ] [ i ] = ( dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ] ) return dp [ 0 ] [ n ] + dp [ 1 ] [ n ]
using namespace std; long f_gold ( int n ) { long dp [ 2 ] [ n + 1 ]; dp [ 0 ] [ 1 ] = 1; dp [ 1 ] [ 1 ] = 2; for ( int i = 2; i <= n; i ++ ) { dp [ 0 ] [ i ] = dp [ 0 ] [ i - 1 ] + dp [ 1 ] [ i - 1 ]; dp [ 1 ] [ i ] = dp [ 0 ] [ i - 1 ] * 2 + dp [ 1 ] [ i - 1 ]; } return dp [ 0 ] [ n ] + dp [ 1 ] [ n ]; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(68); param0.add(91); param0.add(99); param0.add(79); param0.add(61); param0.add(48); param0.add(89); param0.add(20); param0.add(83); param0.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (68,), (91,), (99,), (79,), (61,), (48,), (89,), (20,), (83,), (1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {68,91,99,79,61,48,89,20,83,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
PROGRAM_FIND_CIRCUMFERENCE_CIRCLE
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_FIND_CIRCUMFERENCE_CIRCLE{ static double f_gold ( double r ) { double PI = 3.1415 ; double cir = 2 * PI * r ; return cir ; }
null
null
public static void main(String args[]) { int n_success = 0; List<Double> param0 = new ArrayList<>(); param0.add(8650.932760642281); param0.add(-9475.213251789266); param0.add(3895.3903681587985); param0.add(-2977.0280936855806); param0.add(8513.1890392562); param0.add(-239.5023899621529); param0.add(3460.951135898811); param0.add(-8717.439885353786); param0.add(6512.42862487631); param0.add(-2607.390557447935); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
null
NTH_NON_FIBONACCI_NUMBER
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_NON_FIBONACCI_NUMBER{ static int f_gold ( int n ) { int prevPrev = 1 , prev = 2 , curr = 3 ; while ( n > 0 ) { prevPrev = prev ; prev = curr ; curr = prevPrev + prev ; n = n - ( curr - prev - 1 ) ; } n = n + ( curr - prev - 1 ) ; return prev + n ; }
def f_gold ( n ) : prevPrev = 1 prev = 2 curr = 3 while n > 0 : prevPrev = prev prev = curr curr = prevPrev + prev n = n - ( curr - prev - 1 ) n = n + ( curr - prev - 1 ) return prev + n
using namespace std; int f_gold ( int n ) { int prevPrev = 1, prev = 2, curr = 3; while ( n > 0 ) { prevPrev = prev; prev = curr; curr = prevPrev + prev; n = n - ( curr - prev - 1 ); } n = n + ( curr - prev - 1 ); return prev + n; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(76); param0.add(91); param0.add(62); param0.add(65); param0.add(83); param0.add(57); param0.add(76); param0.add(6); param0.add(2); param0.add(86); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (76,), (91,), (62,), (65,), (83,), (57,), (76,), (6,), (2,), (86,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {76,91,62,65,83,57,76,6,2,86}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_TO_CHECK_IF_A_GIVEN_NUMBER_IS_LUCKY_ALL_DIGITS_ARE_DIFFERENT{ static boolean f_gold ( int n ) { boolean arr [ ] = new boolean [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) arr [ i ] = false ; while ( n > 0 ) { int digit = n % 10 ; if ( arr [ digit ] ) return false ; arr [ digit ] = true ; n = n / 10 ; } return true ; }
import math def f_gold ( n ) : ar = [ 0 ] * 10 while ( n > 0 ) : digit = math.floor ( n % 10 ) if ( ar [ digit ] ) : return 0 ar [ digit ] = 1 n = n / 10 return 1
using namespace std; bool f_gold ( int n ) { bool arr [ 10 ]; for ( int i = 0; i < 10; i ++ ) arr [ i ] = false; while ( n > 0 ) { int digit = n % 10; if ( arr [ digit ] ) return false; arr [ digit ] = true; n = n / 10; } return true; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(474); param0.add(9445); param0.add(90); param0.add(30); param0.add(37453); param0.add(27); param0.add(2400); param0.add(98); param0.add(46); param0.add(722); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (474,), (9445,), (90,), (30,), (37453,), (27,), (2400,), (98,), (46,), (722,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {474,9445,90,30,37453,27,2400,98,46,722}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
AREA_OF_A_HEXAGON
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class AREA_OF_A_HEXAGON{ public static double f_gold ( double s ) { return ( ( 3 * Math . sqrt ( 3 ) * ( s * s ) ) / 2 ) ; }
import math def f_gold ( s ) : return ( ( 3 * math.sqrt ( 3 ) * ( s * s ) ) / 2 ) ;
using namespace std; double f_gold ( double s ) { return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 ); }
public static void main(String args[]) { int n_success = 0; List<Double> param0 = new ArrayList<>(); param0.add(1772.6589509256596); param0.add(-599.737107809315); param0.add(1074.1765931782); param0.add(-1182.4087746714795); param0.add(8083.035797247716); param0.add(-6126.414356565494); param0.add(5370.057504189614); param0.add(-6947.020794285176); param0.add(2110.5107873533325); param0.add(-6458.751326919488); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i))) )/ (Math.abs(f_filled(param0.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (1772.6589509256596,), (-599.737107809315,), (1074.1765931782,), (-1182.4087746714795,), (8083.035797247716,), (-6126.414356565494,), (5370.057504189614,), (-6947.020794285176,), (2110.5107873533325,), (-6458.751326919488,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<double> param0 {1772.6589509256596,-599.737107809315,1074.1765931782,-1182.4087746714795,8083.035797247716,-6126.414356565494,5370.057504189614,-6947.020794285176,2110.5107873533325,-6458.751326919488}; for(int i = 0; i < param0.size(); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
REMOVE_ARRAY_END_ELEMENT_MAXIMIZE_SUM_PRODUCT
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REMOVE_ARRAY_END_ELEMENT_MAXIMIZE_SUM_PRODUCT{ static int f_gold ( int dp [ ] [ ] , int a [ ] , int low , int high , int turn ) { if ( low == high ) { return a [ low ] * turn ; } if ( dp [ low ] [ high ] != 0 ) { return dp [ low ] [ high ] ; } dp [ low ] [ high ] = Math . max ( a [ low ] * turn + f_gold ( dp , a , low + 1 , high , turn + 1 ) , a [ high ] * turn + f_gold ( dp , a , low , high - 1 , turn + 1 ) ) ; return dp [ low ] [ high ] ; }
def f_gold ( dp , a , low , high , turn ) : if ( low == high ) : return a [ low ] * turn if ( dp [ low ] [ high ] != 0 ) : return dp [ low ] [ high ] dp [ low ] [ high ] = max ( a [ low ] * turn + f_gold ( dp , a , low + 1 , high , turn + 1 ) , a [ high ] * turn + f_gold ( dp , a , low , high - 1 , turn + 1 ) ) ; return dp [ low ] [ high ]
null
public static void main(String args[]) { int n_success = 0; List<int [ ] [ ]> param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{23,37,54,57,59,75,97},new int[]{9,15,34,39,80,96,99},new int[]{15,25,26,31,43,47,93},new int[]{22,31,37,44,54,62,91},new int[]{7,19,32,56,57,70,81},new int[]{16,37,49,77,81,82,85},new int[]{44,48,64,74,79,89,99}}); param0.add(new int[][]{new int[]{-24,-34,-86,-16,-34,14,76,4,18,60,-4,-24,46,-26,-74,6,50,-34,8,-30,-62,56,-78,-50,76,-98,-64,-72,-76,46,-70,4,-92,-18,10,-76,78,-26},new int[]{-34,-30,-96,-4,76,48,-10,96,-88,96,90,40,-24,68,-42,-48,-30,-32,-44,-50,-98,34,-78,-52,-88,-38,54,-64,-94,-48,-80,-2,-90,-14,-8,90,-78,-36},new int[]{30,-80,-58,48,-80,-78,40,-48,-40,-84,2,44,72,6,78,-84,-30,-70,32,86,16,68,40,-36,80,-46,66,-92,8,72,-56,58,-72,44,40,6,66,-66},new int[]{16,-72,-66,-30,66,-94,36,-34,-78,14,-74,-54,48,6,-40,-40,-24,-6,18,-20,-88,-8,82,-56,-96,-32,30,-22,70,-4,98,-40,-72,66,-54,-60,52,66},new int[]{-28,-52,90,-52,12,98,42,-52,38,-60,-28,94,86,-22,-62,68,12,92,-82,18,-2,82,-28,72,-78,-70,40,-54,-24,-68,-74,-40,-32,14,88,94,-46,-14},new int[]{-38,-30,62,-52,54,56,12,32,-78,24,38,-82,6,-64,-96,-56,-30,62,-94,-26,-64,-38,96,72,54,-56,56,82,6,-30,94,80,-68,18,84,58,-48,-34},new int[]{82,-44,14,-26,-14,-92,62,-48,-52,26,-30,-76,-26,28,54,-16,-60,16,-76,-90,20,-8,56,-86,66,-84,92,-52,90,30,38,-2,90,-50,88,44,-66,-80},new int[]{-22,68,62,-84,-76,-12,82,70,-58,86,20,-66,96,-28,6,60,-90,52,-28,8,34,90,38,24,76,-22,6,16,-46,-4,84,-6,6,30,50,26,8,-8},new int[]{34,-62,-26,18,-14,42,-50,72,16,-62,-76,32,-20,82,8,74,60,-60,-16,-50,-38,-88,68,-26,66,-14,64,42,98,40,-56,28,-96,36,-82,-74,38,-26},new int[]{-66,-58,-84,16,-42,4,-38,-6,-32,-98,20,-96,60,-38,24,-8,-74,52,98,52,-10,-24,-22,78,-20,58,-24,-98,-76,0,-94,6,28,42,20,-36,68,-68},new int[]{-20,70,-80,68,-26,-26,-22,88,86,12,-98,-80,2,-22,-2,2,-52,-50,30,12,74,34,-14,-54,70,16,-76,-56,16,-50,-14,-4,30,48,-14,84,-34,30},new int[]{68,68,-86,66,-64,60,-28,52,14,-40,-98,22,-30,28,-48,-76,66,94,-28,32,88,86,-76,-4,68,-56,76,-4,36,16,-4,8,-44,-84,74,74,96,-22},new int[]{-14,-88,-52,-72,-60,-50,32,86,14,-26,36,-84,38,80,-86,-64,14,-96,86,-52,-48,-16,-78,-66,-10,-24,70,22,90,46,-74,36,-74,2,96,6,4,34},new int[]{-34,72,-40,34,-30,18,54,-50,0,94,-62,80,4,84,10,98,56,-36,-94,88,10,-30,90,-52,14,-46,30,82,-66,8,-98,86,-90,46,-44,-92,22,58},new int[]{70,-44,-28,-78,-62,-78,-96,-6,-92,-86,-82,72,-50,26,-4,82,-42,58,28,-88,98,-98,-14,72,-24,58,72,-72,6,-78,34,-34,58,-62,78,-98,0,50},new int[]{84,48,-82,-32,-22,16,-34,-28,-76,40,26,30,70,28,-64,-90,70,-90,82,60,10,-52,0,50,-38,-32,-18,2,48,20,-96,4,62,-28,28,-12,50,-90},new int[]{64,58,-34,10,-44,-72,62,70,60,84,-12,-46,-82,-12,80,46,44,-58,-18,10,44,50,-60,-20,82,-10,18,-4,48,22,-14,12,-76,-32,8,-60,-54,-6},new int[]{22,-58,58,-24,-58,-64,62,-38,-36,44,-82,46,-78,54,96,24,84,90,-2,-98,-74,8,44,-94,84,48,-2,66,-44,52,-42,-36,34,-98,-6,54,26,18},new int[]{-28,30,-66,-14,-20,-44,-62,-20,90,-92,-38,64,44,-60,90,-60,-82,36,-46,52,-60,26,12,80,-64,92,-22,-68,-10,54,-96,44,70,10,4,-4,-94,66},new int[]{-70,54,-32,92,-26,-66,28,-98,-14,-20,40,-36,-6,-60,-36,-32,26,90,34,-34,82,48,-82,-8,-86,-74,-58,-68,-68,-16,-26,-88,-6,-76,-12,-68,-98,-94},new int[]{14,-84,90,88,80,-28,-46,4,-4,36,-56,-44,68,24,24,70,36,-4,58,-78,14,-48,-46,58,-44,-66,72,-36,84,70,-26,72,76,30,-30,92,4,-40},new int[]{-24,-28,0,-44,-48,74,76,50,-88,36,-24,62,-34,82,-20,38,-76,16,-70,92,-82,56,72,78,40,52,-52,-38,36,-44,92,46,-60,-54,58,96,74,-18},new int[]{70,-30,-62,-74,-88,-92,72,-42,34,76,-4,-94,22,-82,56,2,44,-64,-88,-20,96,0,-12,-20,-40,-56,-8,18,-8,18,98,28,50,-14,72,50,4,38},new int[]{72,-66,16,-44,94,10,60,96,24,12,92,30,2,64,4,58,74,-24,-96,-52,72,10,-2,-18,-74,-2,70,-6,-60,72,-32,34,-78,-10,-2,-30,54,42},new int[]{80,92,18,54,-42,50,-62,76,94,38,84,78,44,98,78,-54,-36,-80,62,14,24,86,52,4,78,96,20,58,-64,-42,20,-98,-90,6,30,56,-66,-34},new int[]{-86,60,-62,-32,-12,92,-54,-2,8,58,68,42,-46,-8,82,-28,-96,62,46,-12,0,88,82,-26,-42,36,46,-46,54,-58,-58,-62,32,-48,-60,86,4,56},new int[]{88,-36,4,60,24,6,72,58,44,14,-40,-64,36,-92,36,-56,-78,86,80,80,-94,64,-4,-2,86,26,-98,-56,62,-56,-18,40,12,26,50,72,-16,-58},new int[]{-88,4,-66,64,42,94,54,-38,8,-18,-8,88,46,42,64,-88,94,58,-50,26,38,92,-66,82,8,38,-92,-32,50,-44,-88,-6,34,12,66,54,-52,-86},new int[]{20,-90,2,-94,-76,-28,-76,44,-12,-56,50,4,34,-88,46,2,60,52,22,98,-84,6,-26,-90,-4,48,-66,-42,58,-22,30,-22,-82,-50,42,84,94,4},new int[]{-56,4,-4,54,64,82,88,8,50,66,-2,80,-4,12,24,-56,-52,80,66,82,-66,-92,-42,-56,66,-92,-60,-92,-52,-54,32,22,-42,-46,-66,60,10,-62},new int[]{-44,0,6,-54,-98,72,-98,-28,-4,-86,-10,-76,-64,-66,58,60,24,90,-6,-54,-22,84,-34,64,36,18,14,-32,-88,-32,84,-8,60,98,28,-6,14,-88},new int[]{-94,-92,74,96,28,34,56,74,-62,-46,-8,10,-96,-72,50,-98,-28,72,2,46,68,14,-72,-78,-76,68,52,-30,-32,90,40,50,50,20,98,2,72,44},new int[]{-6,94,16,-70,-74,-46,22,24,44,-40,52,-50,94,-66,84,-66,14,-12,48,-6,64,-12,-44,-14,2,-48,-22,52,-28,-18,8,72,-28,68,44,-28,-20,62},new int[]{12,-94,-86,-52,-92,-76,-78,10,-8,30,34,26,-80,-8,68,92,66,16,-48,70,30,-56,-80,-78,58,94,-56,-12,56,-94,-60,-70,0,-94,6,36,48,-98},new int[]{74,72,20,-84,96,-84,40,-36,-88,-14,60,-70,36,-28,-18,-82,-36,92,-86,44,-16,-66,28,-88,-18,-52,66,-26,-90,-12,-16,80,-28,82,-92,82,-76,-80},new int[]{40,-38,-48,72,-30,70,-14,14,90,42,-6,52,-94,44,-32,-8,-74,80,-18,-10,74,-80,86,-82,-2,10,-12,58,-70,-18,86,40,62,76,88,68,68,4},new int[]{86,4,16,86,-66,72,-38,-40,-52,14,-60,-88,-44,-60,-64,84,-50,-78,-44,-18,78,74,-66,-64,18,26,74,98,-18,-96,-82,4,-74,-40,-50,-46,-4,94},new int[]{-70,-64,-10,-22,-88,-48,84,78,16,64,78,-48,66,-88,44,60,-10,-48,60,-40,86,-40,32,16,28,-30,32,-74,10,-34,38,-36,-30,2,14,-92,-48,88}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{84,65,61,9,50,58,19,98,63,92,42,82,5,55,81,77,1,92,74,40,13,59,48,51,18,42,34,78,41,82,13,6,92},new int[]{31,76,5,83,74,92,29,9,40,28,36,36,4,73,32,6,79,8,45,89,60,34,82,27,68,24,68,47,27,42,3,61,19},new int[]{56,19,38,73,69,25,38,90,20,50,27,8,1,84,9,44,54,64,8,74,19,52,40,9,75,66,58,8,40,46,55,54,75},new int[]{12,13,58,11,23,52,60,91,95,86,63,25,62,93,35,36,60,87,94,46,3,85,35,77,28,22,33,7,92,76,33,53,30},new int[]{2,4,55,27,47,76,45,70,34,36,5,2,50,24,32,85,81,34,5,35,56,72,21,39,58,90,49,75,74,49,76,22,30},new int[]{35,66,31,4,44,70,53,57,36,36,54,26,96,4,22,34,1,87,57,51,16,36,47,91,39,5,25,45,61,5,37,51,88},new int[]{45,98,42,35,56,86,16,75,9,32,14,92,40,25,24,29,5,1,75,13,3,8,71,79,96,33,22,13,30,20,41,84,59},new int[]{74,33,15,13,27,6,87,95,74,82,7,52,29,66,44,89,74,21,57,22,32,13,14,42,12,99,55,9,16,94,37,72,29},new int[]{64,47,16,76,77,39,94,53,65,65,80,12,25,14,6,77,66,12,37,63,78,17,32,16,22,7,40,25,8,27,32,55,39},new int[]{27,52,60,70,10,52,14,60,35,31,27,50,74,87,32,28,55,98,68,9,72,48,53,39,29,64,84,64,47,7,69,22,72},new int[]{89,58,93,44,1,12,98,64,65,97,36,4,84,47,49,77,81,11,30,3,69,73,30,68,73,10,96,40,71,57,3,81,46},new int[]{39,71,95,88,22,67,25,57,53,22,98,68,19,28,10,26,79,13,50,2,10,54,44,88,69,97,75,31,18,77,17,22,53},new int[]{85,17,87,79,24,25,49,13,15,16,36,98,41,78,77,89,31,91,20,85,51,29,55,94,69,16,85,91,83,9,66,96,16},new int[]{67,72,45,87,18,95,50,29,69,80,43,78,53,37,71,67,41,16,66,77,69,74,50,11,37,80,5,60,5,56,85,9,92},new int[]{92,36,57,21,48,29,77,51,52,74,68,1,18,60,70,47,98,75,81,17,12,74,1,52,50,21,30,24,17,56,29,65,18},new int[]{63,47,21,28,54,39,53,42,30,59,74,9,14,66,94,45,27,44,43,98,60,57,1,65,35,19,35,58,27,38,82,96,96},new int[]{29,64,7,9,34,80,65,45,40,56,95,7,32,36,9,70,83,73,92,73,20,19,65,27,87,2,88,64,48,71,20,57,11},new int[]{85,39,35,38,44,69,64,28,47,77,38,4,84,50,54,72,62,33,31,60,68,37,80,62,74,96,81,17,64,11,91,85,64},new int[]{45,96,40,46,4,53,91,75,80,53,8,29,93,10,11,48,15,96,80,13,47,23,81,23,41,59,28,37,6,16,46,49,89},new int[]{1,59,53,1,36,70,18,90,6,18,15,1,74,7,57,87,54,92,8,41,47,60,60,18,77,5,79,47,83,23,9,42,55},new int[]{45,22,54,33,86,86,2,52,34,74,17,40,78,5,77,8,52,13,8,24,27,97,9,8,28,91,74,98,99,8,18,12,85},new int[]{43,68,81,7,74,86,13,75,46,95,62,39,98,22,51,53,46,62,25,90,54,5,26,45,31,84,95,63,11,27,2,43,7},new int[]{20,68,7,65,20,49,16,59,39,68,20,43,2,37,39,14,90,45,94,31,68,94,88,72,80,95,1,88,19,93,21,71,27},new int[]{41,67,5,99,99,88,90,4,31,54,22,28,1,27,2,46,94,37,21,43,21,4,44,74,72,49,39,58,91,76,39,70,43},new int[]{23,23,33,86,60,69,14,39,49,89,1,32,65,67,62,63,16,70,59,20,53,50,8,93,52,75,77,20,16,13,92,16,18},new int[]{97,3,56,96,41,64,6,95,92,95,30,15,1,13,55,68,88,8,99,55,81,9,87,46,93,83,54,51,32,52,62,54,41},new int[]{81,13,63,13,67,97,51,72,40,49,87,12,24,92,46,46,45,38,95,67,51,51,88,62,71,66,32,57,23,27,21,13,52},new int[]{6,91,35,9,74,55,71,71,28,63,89,65,95,45,26,47,64,27,88,10,42,45,14,27,32,93,95,64,14,88,53,30,41},new int[]{55,51,89,7,37,36,89,43,26,78,33,2,21,94,58,40,95,46,68,89,38,75,97,58,78,12,6,57,18,3,96,61,17},new int[]{56,24,53,35,66,26,30,60,27,57,82,78,84,84,94,31,48,59,33,27,54,33,20,67,46,19,71,91,70,29,26,17,66},new int[]{85,48,88,33,78,98,69,3,81,70,80,66,84,61,48,17,8,25,8,29,82,59,62,1,58,71,74,86,8,94,15,22,79},new int[]{43,32,57,81,97,19,68,26,21,12,12,44,10,81,42,92,44,58,10,11,2,5,33,1,86,46,85,40,13,16,44,70,42},new int[]{31,28,33,90,54,30,46,18,1,95,73,79,87,16,87,39,92,26,85,75,42,56,11,78,50,6,63,77,46,77,45,35,83}}); param0.add(new int[][]{new int[]{-82,-82,-76,-74,-72,-70,-70,-68,-66,-56,-56,-50,-48,-44,-42,-38,-36,-32,-26,-20,-20,-18,-8,6,8,12,12,14,18,20,24,24,30,32,36,38,40,44,50,56,60,62,66,70,76,78,90,98,98},new int[]{-92,-80,-76,-70,-58,-58,-50,-48,-38,-36,-34,-32,-30,-30,-24,-20,-20,-18,-10,-10,-8,-6,-6,-6,-4,2,10,14,24,26,30,34,36,44,52,54,64,76,78,82,86,86,86,86,86,88,88,92,94},new int[]{-98,-94,-86,-82,-80,-76,-74,-74,-72,-70,-70,-68,-66,-62,-50,-50,-48,-42,-34,-24,-22,-22,2,8,8,10,12,22,22,26,26,26,30,38,44,54,56,58,68,68,72,78,80,80,84,88,92,94,98},new int[]{-92,-88,-84,-84,-82,-78,-78,-66,-60,-48,-48,-46,-42,-40,-40,-38,-36,-34,-30,-30,-26,-26,-22,-22,-20,-14,-12,6,28,36,38,44,46,46,48,50,52,52,56,58,60,70,80,80,80,86,92,96,98},new int[]{-98,-94,-80,-76,-72,-70,-70,-70,-68,-64,-64,-62,-60,-56,-54,-52,-50,-48,-46,-42,-40,-30,-28,-28,-24,-22,-6,-4,0,2,10,12,18,18,32,36,58,60,68,70,72,74,80,84,86,88,88,94,98},new int[]{-96,-96,-86,-84,-84,-72,-72,-70,-70,-66,-64,-60,-58,-58,-46,-38,-38,-28,-22,-18,-14,16,18,20,20,24,24,26,32,32,34,40,42,42,44,44,46,56,58,60,62,64,66,68,68,68,74,78,86},new int[]{-98,-92,-70,-58,-54,-50,-50,-50,-46,-40,-40,-36,-34,-24,-22,-22,-18,-8,-6,-6,-2,2,2,10,16,16,20,22,24,26,28,28,30,32,38,40,42,48,56,56,58,60,66,66,72,84,90,94,96},new int[]{-98,-90,-82,-80,-78,-78,-70,-66,-60,-54,-48,-48,-38,-28,-18,-16,-14,-12,-12,-10,-8,-4,-4,-4,-2,0,2,6,6,12,16,18,20,24,36,46,52,54,60,62,66,66,70,70,82,82,86,86,88},new int[]{-98,-90,-88,-86,-78,-76,-76,-70,-66,-60,-56,-56,-56,-54,-52,-46,-40,-28,-26,-22,-20,-20,-18,-14,-12,-8,0,18,18,28,34,36,36,36,38,46,50,54,56,56,60,66,70,72,74,74,80,80,82},new int[]{-98,-92,-90,-86,-84,-82,-78,-70,-66,-60,-58,-44,-42,-34,-32,-30,-24,-20,-16,-8,-4,8,8,14,14,14,14,20,20,32,38,42,52,62,62,66,68,70,72,72,78,78,78,78,84,96,98,98,98},new int[]{-90,-88,-82,-82,-82,-80,-74,-68,-68,-64,-58,-56,-54,-50,-42,-36,-32,-28,-20,-20,-20,-18,-16,-14,-6,-6,-2,6,8,10,20,24,26,32,38,44,46,48,56,56,58,60,64,68,74,80,88,92,96},new int[]{-96,-94,-88,-72,-72,-72,-70,-70,-64,-52,-46,-46,-44,-38,-34,-34,-28,-26,-20,-16,-14,-10,-8,-2,-2,2,6,8,10,30,34,34,36,44,52,58,60,70,72,72,74,76,76,80,90,92,92,94,98},new int[]{-98,-98,-96,-96,-84,-82,-80,-76,-62,-52,-46,-44,-44,-40,-38,-38,-36,-30,-22,-8,-4,-2,0,2,4,8,12,20,22,26,26,30,34,46,46,52,54,56,58,60,62,66,72,74,78,80,90,92,96},new int[]{-94,-94,-92,-92,-80,-80,-74,-64,-56,-54,-52,-50,-50,-42,-42,-42,-40,-36,-36,-32,-24,-16,-14,-4,0,2,4,10,12,16,22,24,26,28,28,30,40,46,48,56,58,62,62,62,80,88,88,96,98},new int[]{-96,-94,-94,-92,-84,-82,-80,-74,-70,-58,-54,-52,-52,-48,-44,-34,-34,-30,-28,-24,-14,-12,-4,-2,2,2,4,10,12,14,24,28,38,40,46,58,62,68,72,72,74,76,82,84,84,84,84,90,98},new int[]{-98,-90,-84,-82,-76,-70,-66,-62,-60,-60,-58,-56,-54,-54,-50,-50,-46,-40,-40,-38,-32,-24,-22,-22,-20,-12,-12,-8,6,6,8,8,8,22,26,40,42,50,50,50,50,56,64,86,92,92,94,94,96},new int[]{-92,-78,-74,-68,-66,-62,-62,-62,-60,-60,-54,-40,-36,-34,-34,-32,-22,-22,-18,-14,-12,-10,-6,-4,-2,0,12,14,18,28,32,32,38,44,48,50,52,52,60,64,66,66,82,86,90,90,94,94,96},new int[]{-96,-94,-92,-90,-88,-86,-84,-76,-74,-72,-72,-68,-66,-66,-58,-52,-50,-46,-42,-34,-32,-32,-30,-14,-10,-6,-6,-2,-2,10,14,20,30,30,34,36,36,38,38,42,44,50,52,64,68,82,90,90,98},new int[]{-98,-88,-82,-80,-80,-78,-76,-72,-70,-66,-66,-58,-56,-52,-52,-50,-50,-44,-42,-42,-32,-32,-30,-26,-22,-20,-20,-2,0,10,12,18,20,24,24,26,36,38,42,56,66,74,76,78,78,84,86,96,98},new int[]{-94,-94,-94,-80,-76,-74,-68,-56,-52,-50,-44,-42,-38,-36,-34,-28,-26,-24,-16,-2,0,4,8,14,16,20,22,32,34,38,46,46,48,50,52,54,62,64,66,66,72,76,78,78,80,82,82,84,94},new int[]{-98,-98,-90,-86,-80,-78,-76,-74,-74,-72,-72,-60,-58,-54,-50,-46,-32,-24,-22,-18,-18,-14,-12,-12,-10,-8,8,14,24,30,36,46,48,50,58,58,62,66,66,74,74,74,78,78,80,84,86,90,92},new int[]{-98,-94,-82,-80,-72,-64,-60,-58,-48,-46,-46,-40,-32,-26,-24,-16,-14,-12,-10,-8,-6,-4,-4,2,4,4,12,12,14,26,34,36,40,46,48,54,66,66,66,66,66,72,78,80,80,80,94,96,98},new int[]{-96,-92,-86,-72,-70,-70,-68,-68,-66,-64,-62,-56,-50,-44,-32,-30,-28,-24,-12,-4,-4,-4,2,10,16,18,18,22,32,32,36,36,40,42,46,46,50,50,50,50,52,54,64,68,70,72,74,90,96},new int[]{-98,-98,-98,-90,-86,-82,-64,-60,-58,-54,-48,-36,-36,-32,-30,-28,-18,-16,-14,-6,-2,4,6,6,10,12,14,18,24,32,34,46,48,50,52,58,66,68,70,80,80,82,84,84,86,92,94,96,98},new int[]{-98,-96,-88,-86,-86,-86,-86,-86,-84,-78,-78,-74,-72,-72,-70,-70,-70,-66,-64,-56,-42,-40,-38,-36,-34,-32,-30,-28,-26,-20,-8,-6,0,2,2,14,24,30,34,36,44,50,52,60,66,68,74,78,86},new int[]{-96,-86,-72,-72,-70,-70,-68,-68,-64,-58,-58,-58,-54,-54,-52,-48,-46,-40,-38,-28,-14,-10,-6,-4,0,10,10,12,16,18,18,20,20,22,34,34,40,40,46,46,58,58,62,66,68,68,72,84,92},new int[]{-96,-90,-88,-88,-82,-82,-76,-74,-70,-68,-62,-56,-52,-48,-46,-38,-22,-22,-16,-12,-8,0,4,8,14,20,22,24,28,34,36,38,44,46,48,58,66,68,68,76,84,84,86,86,88,88,90,92,94},new int[]{-96,-96,-96,-94,-90,-88,-88,-84,-76,-72,-72,-58,-54,-52,-52,-50,-40,-38,-32,-12,-12,-6,-4,-2,0,2,2,10,12,22,28,28,30,34,42,42,54,56,58,64,70,70,74,74,84,86,88,88,90},new int[]{-94,-92,-84,-82,-82,-70,-66,-64,-60,-60,-58,-58,-54,-52,-52,-42,-36,-32,-30,-28,-26,-24,-22,-20,-16,-12,0,4,6,8,14,20,30,32,46,54,60,62,62,64,66,68,68,70,70,72,72,76,88},new int[]{-90,-90,-90,-88,-88,-86,-78,-68,-62,-62,-60,-54,-54,-48,-48,-36,-36,-32,-28,-28,-22,-20,-6,-2,4,6,8,10,14,24,28,28,28,34,34,36,44,52,54,54,66,70,70,72,78,80,84,88,88},new int[]{-98,-94,-94,-90,-84,-76,-72,-70,-68,-68,-60,-54,-54,-48,-46,-46,-44,-34,-28,-28,-26,-12,-8,-4,2,6,6,8,14,32,32,38,38,40,44,46,46,50,50,52,54,58,60,62,70,78,86,92,92},new int[]{-98,-94,-94,-92,-90,-86,-82,-76,-74,-74,-66,-66,-66,-60,-60,-60,-56,-54,-50,-38,-30,-28,-18,-16,-16,-2,0,6,14,16,16,18,28,30,30,32,34,40,46,52,52,54,60,70,82,84,88,90,94},new int[]{-96,-88,-84,-80,-78,-78,-78,-68,-62,-60,-52,-44,-36,-36,-36,-34,-32,-32,-30,-26,-22,-14,-10,-6,-4,-4,0,0,0,10,12,14,14,16,24,34,38,44,52,54,54,56,58,60,64,66,66,92,98},new int[]{-98,-88,-80,-80,-74,-72,-70,-68,-64,-62,-62,-62,-58,-56,-52,-50,-50,-46,-34,-30,-30,-26,-18,-12,4,10,14,22,24,30,32,38,42,42,46,56,56,58,68,72,80,82,86,90,90,92,96,98,98},new int[]{-96,-92,-92,-90,-90,-90,-88,-82,-82,-82,-80,-68,-64,-60,-50,-34,-30,-16,-10,-10,-8,-4,-4,-2,0,18,20,24,24,24,30,30,36,38,38,40,42,42,44,48,52,52,56,76,84,88,92,94,98},new int[]{-98,-90,-82,-80,-74,-74,-72,-72,-72,-72,-64,-60,-56,-56,-56,-52,-40,-38,-24,-20,-18,-18,-12,-10,-6,10,18,22,24,24,26,26,30,34,40,40,44,50,58,60,62,64,70,76,80,80,86,88,96},new int[]{-96,-94,-86,-82,-72,-68,-68,-64,-62,-56,-54,-50,-50,-48,-44,-26,-20,-16,-10,-8,-6,6,8,10,10,10,16,20,28,28,32,40,42,44,44,46,46,48,58,62,72,76,80,84,86,88,92,96,98},new int[]{-96,-94,-94,-94,-92,-92,-90,-84,-82,-78,-76,-74,-74,-62,-58,-58,-58,-42,-42,-22,-20,-14,-14,-12,-4,-2,4,4,4,8,16,20,24,26,32,40,42,46,52,54,56,56,60,60,62,62,82,90,96},new int[]{-98,-96,-96,-76,-70,-66,-54,-54,-52,-50,-46,-40,-36,-34,-32,-30,-28,-28,-26,-26,-22,-20,-18,-6,6,10,20,22,28,30,30,32,32,34,38,42,46,54,58,70,76,76,84,90,94,94,98,98,98},new int[]{-90,-86,-82,-72,-70,-70,-66,-62,-60,-58,-54,-54,-40,-36,-32,-30,-28,-26,-26,-24,-16,-14,-10,-8,-8,-8,-8,4,6,8,14,16,18,18,22,26,30,58,66,82,84,92,92,94,96,96,96,96,98},new int[]{-92,-86,-80,-74,-68,-66,-64,-64,-52,-44,-36,-34,-32,-30,-26,-22,-20,-18,-14,-12,-8,2,10,10,12,16,24,32,32,44,46,48,52,52,54,66,68,70,72,74,82,84,88,90,94,94,96,96,96},new int[]{-92,-90,-80,-78,-78,-78,-74,-66,-50,-50,-46,-46,-44,-44,-40,-38,-34,-32,-32,-30,-18,-18,-16,-14,-12,4,10,10,10,18,20,20,22,24,24,26,26,46,46,48,48,52,58,62,64,72,80,96,96},new int[]{-98,-96,-94,-92,-88,-86,-84,-82,-76,-76,-60,-58,-58,-58,-56,-50,-48,-38,-34,-30,-20,-16,-16,-10,-4,-2,10,12,18,26,32,34,48,48,52,64,64,68,70,74,76,78,80,90,92,92,92,94,96},new int[]{-96,-88,-88,-82,-76,-70,-62,-58,-56,-48,-48,-38,-36,-30,-18,-18,-16,-16,-14,-12,-6,4,8,10,10,12,14,24,28,28,34,38,44,50,58,60,62,66,66,72,74,76,76,78,78,84,86,88,96},new int[]{-98,-94,-94,-94,-90,-86,-78,-74,-68,-66,-62,-58,-56,-54,-52,-52,-48,-44,-44,-44,-30,-26,-26,-12,-4,2,4,4,6,6,12,12,14,16,16,22,22,30,30,34,36,42,50,50,64,70,80,88,98},new int[]{-98,-96,-96,-94,-88,-84,-58,-56,-52,-48,-44,-30,-26,-26,-20,-18,-16,-8,-8,-8,-6,-6,-4,-4,-2,0,6,12,12,14,24,34,42,46,48,56,60,62,62,72,72,80,84,88,88,90,90,94,96},new int[]{-98,-90,-82,-78,-70,-68,-64,-62,-56,-52,-50,-44,-44,-42,-36,-26,-24,-22,-12,-10,-6,-4,0,2,6,10,18,32,32,36,38,42,48,52,54,56,62,64,66,66,66,66,70,72,74,74,78,86,92},new int[]{-96,-90,-88,-78,-74,-72,-70,-68,-66,-60,-58,-56,-56,-50,-50,-44,-36,-26,-24,-18,-16,-16,-12,-6,2,6,8,10,10,18,18,22,24,26,42,46,64,64,66,72,74,74,76,88,94,94,96,98,98},new int[]{-94,-82,-78,-78,-76,-64,-64,-58,-58,-56,-56,-52,-44,-42,-38,-36,-22,-16,-14,-6,-2,4,4,8,8,12,14,14,14,16,16,22,30,34,38,42,44,58,62,66,66,68,76,78,80,80,84,90,98}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,1,0,1,1,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,0,0,0,0,1,0,0,0,0},new int[]{0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,1,0,0,0},new int[]{0,0,1,0,0,1,1,1,0,0,1,0,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,1,1,0,0,1,0,1,0,0,1,0,0,1,0,1,1,0},new int[]{0,1,0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,1,1,1,0,1,0,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,1,0},new int[]{0,1,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0,0,0,1,1,0,1,0,1,1,0,0,0,1,1,0,1,1,0,1,1,0,1,0,1,0,0},new int[]{0,0,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,0,0,0},new int[]{1,1,0,1,0,1,1,0,0,1,1,1,1,1,1,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,0,1,1,1,1,0,1,0,1,1,0,0},new int[]{0,1,1,1,1,0,1,1,1,1,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,0,1,1,0,0,0,0,1,0,1,1,1},new int[]{1,1,1,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,1,0,0,1,1,0,0,0,1},new int[]{0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,0,0,1,1,1,1,0,0,0,0,1},new int[]{0,0,1,0,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,0,1,1,1,1,0,0,0},new int[]{1,1,1,0,1,1,1,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0},new int[]{1,0,1,0,0,1,0,0,0,1,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1,0,1,0},new int[]{0,0,1,0,0,1,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,1,1,1,0,0,1,1,0,1,0,1,0,1},new int[]{1,1,0,1,1,0,1,0,0,0,0,0,1,0,1,1,1,0,0,1,0,1,1,0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,1,1,0,0,1,1},new int[]{0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1},new int[]{1,1,1,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,1,0,1,1,1,0,1,1,0,1,0},new int[]{1,1,1,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1},new int[]{0,1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,0,0},new int[]{1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,1,0,1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,1,1,0,0,1,1,1,1,1,0},new int[]{1,1,1,1,1,0,0,1,1,1,1,1,0,0,1,1,0,1,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0,0,0,1,0,0,1,0,1,0,0,0,1,0},new int[]{1,1,0,0,1,0,0,1,1,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0},new int[]{1,0,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,1,0,1,1,1,1,0,0,0,0,0,0,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1},new int[]{1,0,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,1,0},new int[]{1,1,1,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,1,0,1,1,0},new int[]{0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,1,0},new int[]{0,1,0,1,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,1,1,0,1,1,0},new int[]{1,1,0,0,1,0,0,1,1,0,1,1,0,1,1,0,0,0,1,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,1,1,1,1,0,1,1,0},new int[]{1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,1},new int[]{1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,1,1,1,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0},new int[]{1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,0,0,1,1,0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,1,1,0,1,1,1},new int[]{0,1,1,0,1,0,1,0,0,0,1,0,0,1,1,0,1,1,1,1,0,0,1,1,1,1,1,0,0,0,1,0,0,0,0,1,1,0,1,0,1,0,0,0,0,0},new int[]{0,1,0,0,0,1,0,0,1,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,0,0,1,1,1,0,0,1,0,0,1},new int[]{1,1,0,0,0,0,0,0,1,0,1,1,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0,0,1,0,0,0,1,1},new int[]{0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,1,1,1,1,1,0,1,1,1,0,1,0,1,1,0,0,0,0,1,1,0,1,0,0,1,1,0,0,1,1,0},new int[]{0,0,0,0,0,1,0,1,1,1,1,0,1,1,0,0,0,0,0,0,1,1,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,0,0,1,1,0,0,1,0},new int[]{0,1,1,1,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1,1,0,0,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,1,0,1,1,1,1},new int[]{1,0,1,0,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,1,0,0,1,1,0,1,1,1,0,0,0,1,0,1},new int[]{1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,1},new int[]{0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,1,0,1,0,1,1,1,0,0},new int[]{1,1,0,0,1,0,1,1,0,0,1,0,1,0,0,0,1,1,0,1,0,0,0,0,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,1,0,0},new int[]{0,0,1,0,1,0,1,1,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1,0,1,1},new int[]{0,0,0,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,1,0,1},new int[]{0,1,1,1,0,0,1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,0,0,1},new int[]{0,0,0,0,0,1,0,1,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,0,0,1,1,0,0,0,1,1,0,0,1},new int[]{0,0,1,1,1,1,0,1,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,0,1,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,0,0,1}}); param0.add(new int[][]{new int[]{13,16,26,38,44,71,73},new int[]{16,28,39,47,48,59,61},new int[]{15,30,50,59,60,89,90},new int[]{24,61,63,71,72,76,83},new int[]{14,36,39,42,64,76,77},new int[]{4,6,11,24,34,36,58},new int[]{22,35,63,70,81,91,98}}); param0.add(new int[][]{new int[]{-48,-22,-52,-86,-22},new int[]{-54,-6,-16,-84,-34},new int[]{-46,-16,-80,-82,-38},new int[]{-44,98,-54,-32,-88},new int[]{42,52,38,-20,-36}}); param0.add(new int[][]{new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,1,1,1,1,1,1},new int[]{0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,1}}); param0.add(new int[][]{new int[]{62,15,2,68,63,42,57,46,37,30,1,51,47,75,50,24,48,56,93,9,50,79,58,74,81,64,63,60,49,24,46,55,89,10,49,46,17,86,24,51,69,21,16,97,66,14},new int[]{95,91,93,6,64,52,1,29,77,42,16,76,40,30,32,7,36,72,1,94,12,25,11,75,52,95,64,4,54,78,40,67,81,92,5,42,65,94,59,12,35,75,82,83,72,47},new int[]{69,96,79,34,12,8,27,58,49,56,43,17,26,87,1,19,99,48,80,25,56,40,42,63,92,27,76,55,15,2,30,81,79,4,15,52,21,94,80,27,93,33,44,20,45,34},new int[]{18,47,49,73,19,87,86,72,52,21,36,27,96,2,87,35,22,20,97,92,69,13,15,95,80,58,84,66,56,12,57,36,90,25,14,43,43,80,2,53,42,65,52,42,5,48},new int[]{85,40,51,5,9,71,80,70,2,18,87,36,78,90,57,60,27,92,15,64,47,22,99,53,87,28,97,94,28,83,64,10,10,34,30,90,17,87,31,7,29,68,29,69,47,35},new int[]{15,32,84,9,45,6,37,97,12,69,91,45,39,58,49,85,76,2,48,71,81,88,16,71,49,32,68,5,23,65,93,47,88,59,43,43,36,59,52,77,1,25,36,86,26,42},new int[]{39,15,66,15,13,29,80,10,75,3,21,65,41,19,76,82,64,55,63,46,24,94,40,75,24,20,2,86,90,24,53,70,65,90,45,70,96,98,68,60,12,31,27,57,63,17},new int[]{79,58,4,37,50,72,71,69,45,86,47,25,98,59,63,16,13,97,66,2,8,13,4,54,96,1,80,3,35,15,62,20,74,58,80,65,85,37,74,6,93,29,10,19,80,61},new int[]{53,59,23,20,92,20,65,17,71,81,41,50,37,86,75,62,21,49,59,34,56,94,41,71,70,94,44,6,25,19,37,3,13,39,86,98,19,30,52,26,35,25,65,74,9,69},new int[]{15,92,20,89,35,8,50,32,17,2,21,64,76,26,9,49,25,63,17,51,58,1,97,3,28,80,11,89,23,86,9,27,5,52,31,62,77,63,86,41,59,19,28,78,6,63},new int[]{76,97,67,74,17,13,95,60,16,63,87,95,84,66,82,69,80,44,54,32,29,37,47,62,78,79,45,10,63,11,20,53,95,72,40,75,89,81,1,37,56,15,85,93,84,9},new int[]{72,60,72,79,28,8,48,76,89,84,89,46,42,83,65,90,71,93,64,50,55,88,66,29,6,6,47,99,61,98,24,57,4,83,56,56,46,21,46,33,78,85,15,28,80,33},new int[]{49,8,68,50,35,16,35,44,22,80,94,48,98,13,43,79,28,68,15,99,5,27,62,63,85,66,55,31,44,48,73,58,71,50,94,22,19,79,76,13,97,27,91,19,47,12},new int[]{52,75,69,55,13,16,39,7,82,28,77,88,84,98,47,21,21,43,40,92,82,92,33,94,3,21,42,47,89,40,59,78,13,97,62,96,74,69,95,73,90,11,67,10,48,47},new int[]{37,21,84,6,27,11,42,18,62,58,81,7,9,71,77,38,69,12,16,61,2,44,81,71,2,99,22,38,30,51,39,11,62,73,95,74,13,87,33,17,23,8,90,45,36,73},new int[]{80,14,37,80,75,12,38,69,25,91,72,14,3,36,97,93,61,20,22,9,56,89,37,99,9,50,59,95,67,25,48,36,91,66,48,61,71,13,50,54,51,29,58,48,14,19},new int[]{64,64,97,27,3,7,54,36,57,24,82,5,83,49,78,87,87,93,70,62,68,26,40,84,82,76,98,27,41,71,23,56,3,46,85,39,62,92,73,74,16,79,40,24,91,63},new int[]{88,29,39,88,15,76,44,40,66,67,26,9,61,5,24,71,8,56,35,89,71,12,72,54,26,84,57,58,46,73,92,24,20,59,70,86,84,15,98,51,29,15,74,7,19,64},new int[]{14,46,80,84,53,57,50,32,23,48,35,83,89,10,67,51,96,63,84,18,6,41,48,79,66,17,17,45,51,7,65,79,29,34,92,17,45,36,2,36,66,30,65,4,55,61},new int[]{23,37,69,52,89,17,78,39,81,83,94,61,33,11,46,34,27,35,55,1,22,99,91,24,56,28,70,88,23,48,77,57,57,72,69,79,95,58,37,68,17,66,11,82,97,20},new int[]{24,46,12,76,76,15,6,97,22,95,83,52,69,59,17,24,54,85,60,41,2,84,71,76,71,27,36,54,79,32,66,65,27,15,39,30,38,58,6,66,73,31,73,74,64,51},new int[]{71,37,75,62,93,88,55,77,22,54,67,34,50,89,66,77,17,54,1,53,83,3,74,37,41,38,48,39,25,46,72,61,70,77,7,58,5,77,60,64,95,22,81,95,53,14},new int[]{52,25,79,20,16,26,40,49,23,82,56,61,40,89,99,58,90,17,22,20,1,14,5,99,34,63,71,7,51,56,8,3,8,39,45,90,97,24,45,77,51,57,41,59,47,15},new int[]{98,5,15,87,54,20,2,88,73,98,90,4,79,94,74,26,3,91,65,28,25,93,61,63,3,97,15,40,1,79,88,71,15,55,94,93,38,56,10,41,68,28,85,74,71,19},new int[]{10,27,56,25,36,22,54,74,28,72,53,19,66,49,49,56,94,55,24,82,54,66,1,7,37,45,49,85,34,51,91,74,64,28,87,81,39,42,93,60,43,10,85,12,7,62},new int[]{73,51,16,10,70,67,50,75,37,60,45,31,57,94,44,51,23,74,16,79,78,57,63,90,28,24,63,5,61,2,20,86,57,46,42,5,34,72,35,68,37,6,19,15,48,93},new int[]{70,43,61,32,77,46,11,98,66,70,44,73,51,53,55,69,54,3,65,25,75,37,47,44,78,78,3,98,73,71,34,54,80,69,20,35,1,27,42,18,93,96,60,9,80,57},new int[]{2,31,55,74,66,86,59,31,40,18,55,86,79,74,45,19,83,26,24,28,15,34,34,28,66,68,94,87,19,66,67,48,38,39,67,75,23,28,23,10,65,75,50,23,85,55},new int[]{91,22,56,89,33,23,8,81,56,97,2,88,94,38,61,8,56,85,68,31,99,30,75,61,23,68,10,95,53,57,55,42,48,97,23,40,61,99,30,54,18,66,83,58,6,35},new int[]{46,84,95,99,63,16,14,13,55,83,6,77,77,40,1,85,53,14,66,46,99,67,42,55,11,27,40,38,81,54,80,3,52,77,5,22,75,50,95,54,88,27,1,85,6,60},new int[]{38,32,53,70,13,71,48,20,37,38,25,23,58,93,34,66,47,71,50,64,11,60,45,49,57,25,42,75,78,97,58,31,83,60,53,72,45,71,22,43,79,1,81,8,62,39},new int[]{53,8,61,2,80,52,70,9,47,23,87,99,41,89,23,54,5,50,50,96,51,30,41,93,90,77,30,4,63,52,89,30,72,96,75,55,74,12,67,62,3,38,53,62,80,80},new int[]{88,65,51,42,27,28,91,20,8,18,46,12,36,12,41,29,31,18,27,84,84,83,96,70,2,3,40,53,1,39,16,29,8,23,38,71,89,87,92,83,83,57,3,64,62,51},new int[]{76,38,28,18,53,19,90,48,7,74,89,6,10,5,29,51,59,32,33,66,4,90,39,9,90,77,35,48,29,58,35,14,72,89,17,75,45,8,54,58,40,65,6,90,26,47},new int[]{93,31,76,38,69,20,19,44,28,53,95,64,50,11,27,64,77,18,24,1,46,8,77,72,48,14,87,28,54,9,63,68,67,59,37,20,17,74,6,30,49,65,50,80,75,77},new int[]{76,40,73,71,21,7,8,38,60,4,40,32,18,36,82,31,29,74,73,19,51,98,46,74,98,53,24,66,7,14,71,95,4,86,60,14,80,28,34,18,49,68,76,55,72,35},new int[]{66,6,48,50,62,34,10,41,14,93,60,58,8,51,31,89,42,67,29,75,90,98,58,4,87,82,29,27,38,13,70,4,40,30,81,29,57,61,90,10,82,36,9,32,45,87},new int[]{76,45,58,23,90,81,1,48,12,36,90,35,36,83,19,6,17,6,90,88,26,12,53,49,23,13,52,17,30,92,22,83,64,1,82,71,67,30,54,67,64,93,93,8,45,71},new int[]{65,37,45,41,91,59,22,56,29,22,12,44,56,7,73,87,77,98,9,38,37,62,86,66,53,64,73,86,8,20,8,3,46,51,11,53,50,57,26,93,80,41,34,70,82,82},new int[]{77,1,52,73,66,59,96,50,60,63,38,44,26,95,62,99,37,34,8,44,31,10,82,75,82,92,54,61,3,52,55,7,48,22,43,71,50,96,27,56,44,66,48,25,27,22},new int[]{5,86,67,70,46,7,43,52,7,19,85,27,99,55,1,48,16,41,2,47,59,51,21,19,80,80,8,41,51,75,74,49,54,48,73,15,69,24,96,19,97,23,28,90,60,50},new int[]{76,65,97,12,56,95,81,27,85,46,42,56,77,90,55,6,91,41,81,93,62,83,56,21,31,28,10,28,47,92,29,85,9,30,94,62,88,86,52,16,30,50,47,1,51,11},new int[]{83,14,96,9,59,84,27,94,5,20,93,58,99,71,9,5,78,38,97,97,42,88,50,51,28,64,62,32,22,50,18,57,12,61,86,72,35,53,64,42,90,32,46,84,82,65},new int[]{28,99,16,15,46,15,57,32,82,90,2,29,28,8,41,33,74,61,87,64,7,51,79,30,70,33,88,9,24,7,61,22,5,12,37,19,91,38,55,23,54,62,82,8,44,73},new int[]{30,77,76,3,41,88,95,36,78,76,33,86,54,38,92,36,65,99,67,8,72,33,71,88,8,63,43,89,57,6,20,74,52,50,61,66,52,3,3,60,28,6,90,51,60,15},new int[]{32,86,94,46,87,40,20,75,67,86,63,63,48,42,81,69,30,11,45,18,58,68,58,79,95,51,81,1,88,58,49,75,89,60,52,24,80,70,47,17,45,94,69,17,11,97}}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{31,50,50,68,69,80,87}); param1.add(new int[]{-74,-50,-90,-52,96,78,-16,14,-14,66,-50,74,-34,-88,84,80,34,18,-38,62,56,-48,-22,94,94,94,92,-46,-32,10,-48,46,20,80,32,30,88,60}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{23,36,42,49,50,88,97,51,1,27,4,72,11,61,24,49,75,29,96,16,11,65,13,22,13,23,84,23,20,63,35,76,22}); param1.add(new int[]{-96,-90,-90,-86,-86,-86,-84,-76,-76,-74,-72,-70,-52,-50,-34,-32,-26,-20,-16,-14,-10,-8,-8,-6,4,12,14,16,18,24,26,32,34,38,42,42,48,48,48,48,64,66,70,76,76,82,86,86,96}); param1.add(new int[]{0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,0,1,1,0,1,1,0,0,0}); param1.add(new int[]{3,9,32,55,78,85,90}); param1.add(new int[]{48,-68,0,-54,-80}); param1.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1}); param1.add(new int[]{19,39,31,50,61,70,43,64,45,82,49,80,21,37,96,30,42,82,96,30,22,26,42,88,57,12,59,58,83,64,66,2,37,60,5,76,20,81,10,57,70,74,65,72,15,84}); List<Integer> param2 = new ArrayList<>(); param2.add(6); param2.add(25); param2.add(28); param2.add(25); param2.add(37); param2.add(43); param2.add(5); param2.add(4); param2.add(7); param2.add(34); List<Integer> param3 = new ArrayList<>(); param3.add(5); param3.add(20); param3.add(28); param3.add(30); param3.add(38); param3.add(32); param3.add(3); param3.add(4); param3.add(10); param3.add(25); List<Integer> param4 = new ArrayList<>(); param4.add(4); param4.add(25); param4.add(32); param4.add(19); param4.add(26); param4.add(35); param4.add(3); param4.add(3); param4.add(9); param4.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([[23, 37, 54, 57, 59, 75, 97], [9, 15, 34, 39, 80, 96, 99], [15, 25, 26, 31, 43, 47, 93], [22, 31, 37, 44, 54, 62, 91], [7, 19, 32, 56, 57, 70, 81], [16, 37, 49, 77, 81, 82, 85], [44, 48, 64, 74, 79, 89, 99]],[31, 50, 50, 68, 69, 80, 87],6,5,4,), ([[-24, -34, -86, -16, -34, 14, 76, 4, 18, 60, -4, -24, 46, -26, -74, 6, 50, -34, 8, -30, -62, 56, -78, -50, 76, -98, -64, -72, -76, 46, -70, 4, -92, -18, 10, -76, 78, -26], [-34, -30, -96, -4, 76, 48, -10, 96, -88, 96, 90, 40, -24, 68, -42, -48, -30, -32, -44, -50, -98, 34, -78, -52, -88, -38, 54, -64, -94, -48, -80, -2, -90, -14, -8, 90, -78, -36], [30, -80, -58, 48, -80, -78, 40, -48, -40, -84, 2, 44, 72, 6, 78, -84, -30, -70, 32, 86, 16, 68, 40, -36, 80, -46, 66, -92, 8, 72, -56, 58, -72, 44, 40, 6, 66, -66], [16, -72, -66, -30, 66, -94, 36, -34, -78, 14, -74, -54, 48, 6, -40, -40, -24, -6, 18, -20, -88, -8, 82, -56, -96, -32, 30, -22, 70, -4, 98, -40, -72, 66, -54, -60, 52, 66], [-28, -52, 90, -52, 12, 98, 42, -52, 38, -60, -28, 94, 86, -22, -62, 68, 12, 92, -82, 18, -2, 82, -28, 72, -78, -70, 40, -54, -24, -68, -74, -40, -32, 14, 88, 94, -46, -14], [-38, -30, 62, -52, 54, 56, 12, 32, -78, 24, 38, -82, 6, -64, -96, -56, -30, 62, -94, -26, -64, -38, 96, 72, 54, -56, 56, 82, 6, -30, 94, 80, -68, 18, 84, 58, -48, -34], [82, -44, 14, -26, -14, -92, 62, -48, -52, 26, -30, -76, -26, 28, 54, -16, -60, 16, -76, -90, 20, -8, 56, -86, 66, -84, 92, -52, 90, 30, 38, -2, 90, -50, 88, 44, -66, -80], [-22, 68, 62, -84, -76, -12, 82, 70, -58, 86, 20, -66, 96, -28, 6, 60, -90, 52, -28, 8, 34, 90, 38, 24, 76, -22, 6, 16, -46, -4, 84, -6, 6, 30, 50, 26, 8, -8], [34, -62, -26, 18, -14, 42, -50, 72, 16, -62, -76, 32, -20, 82, 8, 74, 60, -60, -16, -50, -38, -88, 68, -26, 66, -14, 64, 42, 98, 40, -56, 28, -96, 36, -82, -74, 38, -26], [-66, -58, -84, 16, -42, 4, -38, -6, -32, -98, 20, -96, 60, -38, 24, -8, -74, 52, 98, 52, -10, -24, -22, 78, -20, 58, -24, -98, -76, 0, -94, 6, 28, 42, 20, -36, 68, -68], [-20, 70, -80, 68, -26, -26, -22, 88, 86, 12, -98, -80, 2, -22, -2, 2, -52, -50, 30, 12, 74, 34, -14, -54, 70, 16, -76, -56, 16, -50, -14, -4, 30, 48, -14, 84, -34, 30], [68, 68, -86, 66, -64, 60, -28, 52, 14, -40, -98, 22, -30, 28, -48, -76, 66, 94, -28, 32, 88, 86, -76, -4, 68, -56, 76, -4, 36, 16, -4, 8, -44, -84, 74, 74, 96, -22], [-14, -88, -52, -72, -60, -50, 32, 86, 14, -26, 36, -84, 38, 80, -86, -64, 14, -96, 86, -52, -48, -16, -78, -66, -10, -24, 70, 22, 90, 46, -74, 36, -74, 2, 96, 6, 4, 34], [-34, 72, -40, 34, -30, 18, 54, -50, 0, 94, -62, 80, 4, 84, 10, 98, 56, -36, -94, 88, 10, -30, 90, -52, 14, -46, 30, 82, -66, 8, -98, 86, -90, 46, -44, -92, 22, 58], [70, -44, -28, -78, -62, -78, -96, -6, -92, -86, -82, 72, -50, 26, -4, 82, -42, 58, 28, -88, 98, -98, -14, 72, -24, 58, 72, -72, 6, -78, 34, -34, 58, -62, 78, -98, 0, 50], [84, 48, -82, -32, -22, 16, -34, -28, -76, 40, 26, 30, 70, 28, -64, -90, 70, -90, 82, 60, 10, -52, 0, 50, -38, -32, -18, 2, 48, 20, -96, 4, 62, -28, 28, -12, 50, -90], [64, 58, -34, 10, -44, -72, 62, 70, 60, 84, -12, -46, -82, -12, 80, 46, 44, -58, -18, 10, 44, 50, -60, -20, 82, -10, 18, -4, 48, 22, -14, 12, -76, -32, 8, -60, -54, -6], [22, -58, 58, -24, -58, -64, 62, -38, -36, 44, -82, 46, -78, 54, 96, 24, 84, 90, -2, -98, -74, 8, 44, -94, 84, 48, -2, 66, -44, 52, -42, -36, 34, -98, -6, 54, 26, 18], [-28, 30, -66, -14, -20, -44, -62, -20, 90, -92, -38, 64, 44, -60, 90, -60, -82, 36, -46, 52, -60, 26, 12, 80, -64, 92, -22, -68, -10, 54, -96, 44, 70, 10, 4, -4, -94, 66], [-70, 54, -32, 92, -26, -66, 28, -98, -14, -20, 40, -36, -6, -60, -36, -32, 26, 90, 34, -34, 82, 48, -82, -8, -86, -74, -58, -68, -68, -16, -26, -88, -6, -76, -12, -68, -98, -94], [14, -84, 90, 88, 80, -28, -46, 4, -4, 36, -56, -44, 68, 24, 24, 70, 36, -4, 58, -78, 14, -48, -46, 58, -44, -66, 72, -36, 84, 70, -26, 72, 76, 30, -30, 92, 4, -40], [-24, -28, 0, -44, -48, 74, 76, 50, -88, 36, -24, 62, -34, 82, -20, 38, -76, 16, -70, 92, -82, 56, 72, 78, 40, 52, -52, -38, 36, -44, 92, 46, -60, -54, 58, 96, 74, -18], [70, -30, -62, -74, -88, -92, 72, -42, 34, 76, -4, -94, 22, -82, 56, 2, 44, -64, -88, -20, 96, 0, -12, -20, -40, -56, -8, 18, -8, 18, 98, 28, 50, -14, 72, 50, 4, 38], [72, -66, 16, -44, 94, 10, 60, 96, 24, 12, 92, 30, 2, 64, 4, 58, 74, -24, -96, -52, 72, 10, -2, -18, -74, -2, 70, -6, -60, 72, -32, 34, -78, -10, -2, -30, 54, 42], [80, 92, 18, 54, -42, 50, -62, 76, 94, 38, 84, 78, 44, 98, 78, -54, -36, -80, 62, 14, 24, 86, 52, 4, 78, 96, 20, 58, -64, -42, 20, -98, -90, 6, 30, 56, -66, -34], [-86, 60, -62, -32, -12, 92, -54, -2, 8, 58, 68, 42, -46, -8, 82, -28, -96, 62, 46, -12, 0, 88, 82, -26, -42, 36, 46, -46, 54, -58, -58, -62, 32, -48, -60, 86, 4, 56], [88, -36, 4, 60, 24, 6, 72, 58, 44, 14, -40, -64, 36, -92, 36, -56, -78, 86, 80, 80, -94, 64, -4, -2, 86, 26, -98, -56, 62, -56, -18, 40, 12, 26, 50, 72, -16, -58], [-88, 4, -66, 64, 42, 94, 54, -38, 8, -18, -8, 88, 46, 42, 64, -88, 94, 58, -50, 26, 38, 92, -66, 82, 8, 38, -92, -32, 50, -44, -88, -6, 34, 12, 66, 54, -52, -86], [20, -90, 2, -94, -76, -28, -76, 44, -12, -56, 50, 4, 34, -88, 46, 2, 60, 52, 22, 98, -84, 6, -26, -90, -4, 48, -66, -42, 58, -22, 30, -22, -82, -50, 42, 84, 94, 4], [-56, 4, -4, 54, 64, 82, 88, 8, 50, 66, -2, 80, -4, 12, 24, -56, -52, 80, 66, 82, -66, -92, -42, -56, 66, -92, -60, -92, -52, -54, 32, 22, -42, -46, -66, 60, 10, -62], [-44, 0, 6, -54, -98, 72, -98, -28, -4, -86, -10, -76, -64, -66, 58, 60, 24, 90, -6, -54, -22, 84, -34, 64, 36, 18, 14, -32, -88, -32, 84, -8, 60, 98, 28, -6, 14, -88], [-94, -92, 74, 96, 28, 34, 56, 74, -62, -46, -8, 10, -96, -72, 50, -98, -28, 72, 2, 46, 68, 14, -72, -78, -76, 68, 52, -30, -32, 90, 40, 50, 50, 20, 98, 2, 72, 44], [-6, 94, 16, -70, -74, -46, 22, 24, 44, -40, 52, -50, 94, -66, 84, -66, 14, -12, 48, -6, 64, -12, -44, -14, 2, -48, -22, 52, -28, -18, 8, 72, -28, 68, 44, -28, -20, 62], [12, -94, -86, -52, -92, -76, -78, 10, -8, 30, 34, 26, -80, -8, 68, 92, 66, 16, -48, 70, 30, -56, -80, -78, 58, 94, -56, -12, 56, -94, -60, -70, 0, -94, 6, 36, 48, -98], [74, 72, 20, -84, 96, -84, 40, -36, -88, -14, 60, -70, 36, -28, -18, -82, -36, 92, -86, 44, -16, -66, 28, -88, -18, -52, 66, -26, -90, -12, -16, 80, -28, 82, -92, 82, -76, -80], [40, -38, -48, 72, -30, 70, -14, 14, 90, 42, -6, 52, -94, 44, -32, -8, -74, 80, -18, -10, 74, -80, 86, -82, -2, 10, -12, 58, -70, -18, 86, 40, 62, 76, 88, 68, 68, 4], [86, 4, 16, 86, -66, 72, -38, -40, -52, 14, -60, -88, -44, -60, -64, 84, -50, -78, -44, -18, 78, 74, -66, -64, 18, 26, 74, 98, -18, -96, -82, 4, -74, -40, -50, -46, -4, 94], [-70, -64, -10, -22, -88, -48, 84, 78, 16, 64, 78, -48, 66, -88, 44, 60, -10, -48, 60, -40, 86, -40, 32, 16, 28, -30, 32, -74, 10, -34, 38, -36, -30, 2, 14, -92, -48, 88]],[-74, -50, -90, -52, 96, 78, -16, 14, -14, 66, -50, 74, -34, -88, 84, 80, 34, 18, -38, 62, 56, -48, -22, 94, 94, 94, 92, -46, -32, 10, -48, 46, 20, 80, 32, 30, 88, 60],25,20,25,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,28,32,), ([[84, 65, 61, 9, 50, 58, 19, 98, 63, 92, 42, 82, 5, 55, 81, 77, 1, 92, 74, 40, 13, 59, 48, 51, 18, 42, 34, 78, 41, 82, 13, 6, 92], [31, 76, 5, 83, 74, 92, 29, 9, 40, 28, 36, 36, 4, 73, 32, 6, 79, 8, 45, 89, 60, 34, 82, 27, 68, 24, 68, 47, 27, 42, 3, 61, 19], [56, 19, 38, 73, 69, 25, 38, 90, 20, 50, 27, 8, 1, 84, 9, 44, 54, 64, 8, 74, 19, 52, 40, 9, 75, 66, 58, 8, 40, 46, 55, 54, 75], [12, 13, 58, 11, 23, 52, 60, 91, 95, 86, 63, 25, 62, 93, 35, 36, 60, 87, 94, 46, 3, 85, 35, 77, 28, 22, 33, 7, 92, 76, 33, 53, 30], [2, 4, 55, 27, 47, 76, 45, 70, 34, 36, 5, 2, 50, 24, 32, 85, 81, 34, 5, 35, 56, 72, 21, 39, 58, 90, 49, 75, 74, 49, 76, 22, 30], [35, 66, 31, 4, 44, 70, 53, 57, 36, 36, 54, 26, 96, 4, 22, 34, 1, 87, 57, 51, 16, 36, 47, 91, 39, 5, 25, 45, 61, 5, 37, 51, 88], [45, 98, 42, 35, 56, 86, 16, 75, 9, 32, 14, 92, 40, 25, 24, 29, 5, 1, 75, 13, 3, 8, 71, 79, 96, 33, 22, 13, 30, 20, 41, 84, 59], [74, 33, 15, 13, 27, 6, 87, 95, 74, 82, 7, 52, 29, 66, 44, 89, 74, 21, 57, 22, 32, 13, 14, 42, 12, 99, 55, 9, 16, 94, 37, 72, 29], [64, 47, 16, 76, 77, 39, 94, 53, 65, 65, 80, 12, 25, 14, 6, 77, 66, 12, 37, 63, 78, 17, 32, 16, 22, 7, 40, 25, 8, 27, 32, 55, 39], [27, 52, 60, 70, 10, 52, 14, 60, 35, 31, 27, 50, 74, 87, 32, 28, 55, 98, 68, 9, 72, 48, 53, 39, 29, 64, 84, 64, 47, 7, 69, 22, 72], [89, 58, 93, 44, 1, 12, 98, 64, 65, 97, 36, 4, 84, 47, 49, 77, 81, 11, 30, 3, 69, 73, 30, 68, 73, 10, 96, 40, 71, 57, 3, 81, 46], [39, 71, 95, 88, 22, 67, 25, 57, 53, 22, 98, 68, 19, 28, 10, 26, 79, 13, 50, 2, 10, 54, 44, 88, 69, 97, 75, 31, 18, 77, 17, 22, 53], [85, 17, 87, 79, 24, 25, 49, 13, 15, 16, 36, 98, 41, 78, 77, 89, 31, 91, 20, 85, 51, 29, 55, 94, 69, 16, 85, 91, 83, 9, 66, 96, 16], [67, 72, 45, 87, 18, 95, 50, 29, 69, 80, 43, 78, 53, 37, 71, 67, 41, 16, 66, 77, 69, 74, 50, 11, 37, 80, 5, 60, 5, 56, 85, 9, 92], [92, 36, 57, 21, 48, 29, 77, 51, 52, 74, 68, 1, 18, 60, 70, 47, 98, 75, 81, 17, 12, 74, 1, 52, 50, 21, 30, 24, 17, 56, 29, 65, 18], [63, 47, 21, 28, 54, 39, 53, 42, 30, 59, 74, 9, 14, 66, 94, 45, 27, 44, 43, 98, 60, 57, 1, 65, 35, 19, 35, 58, 27, 38, 82, 96, 96], [29, 64, 7, 9, 34, 80, 65, 45, 40, 56, 95, 7, 32, 36, 9, 70, 83, 73, 92, 73, 20, 19, 65, 27, 87, 2, 88, 64, 48, 71, 20, 57, 11], [85, 39, 35, 38, 44, 69, 64, 28, 47, 77, 38, 4, 84, 50, 54, 72, 62, 33, 31, 60, 68, 37, 80, 62, 74, 96, 81, 17, 64, 11, 91, 85, 64], [45, 96, 40, 46, 4, 53, 91, 75, 80, 53, 8, 29, 93, 10, 11, 48, 15, 96, 80, 13, 47, 23, 81, 23, 41, 59, 28, 37, 6, 16, 46, 49, 89], [1, 59, 53, 1, 36, 70, 18, 90, 6, 18, 15, 1, 74, 7, 57, 87, 54, 92, 8, 41, 47, 60, 60, 18, 77, 5, 79, 47, 83, 23, 9, 42, 55], [45, 22, 54, 33, 86, 86, 2, 52, 34, 74, 17, 40, 78, 5, 77, 8, 52, 13, 8, 24, 27, 97, 9, 8, 28, 91, 74, 98, 99, 8, 18, 12, 85], [43, 68, 81, 7, 74, 86, 13, 75, 46, 95, 62, 39, 98, 22, 51, 53, 46, 62, 25, 90, 54, 5, 26, 45, 31, 84, 95, 63, 11, 27, 2, 43, 7], [20, 68, 7, 65, 20, 49, 16, 59, 39, 68, 20, 43, 2, 37, 39, 14, 90, 45, 94, 31, 68, 94, 88, 72, 80, 95, 1, 88, 19, 93, 21, 71, 27], [41, 67, 5, 99, 99, 88, 90, 4, 31, 54, 22, 28, 1, 27, 2, 46, 94, 37, 21, 43, 21, 4, 44, 74, 72, 49, 39, 58, 91, 76, 39, 70, 43], [23, 23, 33, 86, 60, 69, 14, 39, 49, 89, 1, 32, 65, 67, 62, 63, 16, 70, 59, 20, 53, 50, 8, 93, 52, 75, 77, 20, 16, 13, 92, 16, 18], [97, 3, 56, 96, 41, 64, 6, 95, 92, 95, 30, 15, 1, 13, 55, 68, 88, 8, 99, 55, 81, 9, 87, 46, 93, 83, 54, 51, 32, 52, 62, 54, 41], [81, 13, 63, 13, 67, 97, 51, 72, 40, 49, 87, 12, 24, 92, 46, 46, 45, 38, 95, 67, 51, 51, 88, 62, 71, 66, 32, 57, 23, 27, 21, 13, 52], [6, 91, 35, 9, 74, 55, 71, 71, 28, 63, 89, 65, 95, 45, 26, 47, 64, 27, 88, 10, 42, 45, 14, 27, 32, 93, 95, 64, 14, 88, 53, 30, 41], [55, 51, 89, 7, 37, 36, 89, 43, 26, 78, 33, 2, 21, 94, 58, 40, 95, 46, 68, 89, 38, 75, 97, 58, 78, 12, 6, 57, 18, 3, 96, 61, 17], [56, 24, 53, 35, 66, 26, 30, 60, 27, 57, 82, 78, 84, 84, 94, 31, 48, 59, 33, 27, 54, 33, 20, 67, 46, 19, 71, 91, 70, 29, 26, 17, 66], [85, 48, 88, 33, 78, 98, 69, 3, 81, 70, 80, 66, 84, 61, 48, 17, 8, 25, 8, 29, 82, 59, 62, 1, 58, 71, 74, 86, 8, 94, 15, 22, 79], [43, 32, 57, 81, 97, 19, 68, 26, 21, 12, 12, 44, 10, 81, 42, 92, 44, 58, 10, 11, 2, 5, 33, 1, 86, 46, 85, 40, 13, 16, 44, 70, 42], [31, 28, 33, 90, 54, 30, 46, 18, 1, 95, 73, 79, 87, 16, 87, 39, 92, 26, 85, 75, 42, 56, 11, 78, 50, 6, 63, 77, 46, 77, 45, 35, 83]],[23, 36, 42, 49, 50, 88, 97, 51, 1, 27, 4, 72, 11, 61, 24, 49, 75, 29, 96, 16, 11, 65, 13, 22, 13, 23, 84, 23, 20, 63, 35, 76, 22],25,30,19,), ([[-82, -82, -76, -74, -72, -70, -70, -68, -66, -56, -56, -50, -48, -44, -42, -38, -36, -32, -26, -20, -20, -18, -8, 6, 8, 12, 12, 14, 18, 20, 24, 24, 30, 32, 36, 38, 40, 44, 50, 56, 60, 62, 66, 70, 76, 78, 90, 98, 98], [-92, -80, -76, -70, -58, -58, -50, -48, -38, -36, -34, -32, -30, -30, -24, -20, -20, -18, -10, -10, -8, -6, -6, -6, -4, 2, 10, 14, 24, 26, 30, 34, 36, 44, 52, 54, 64, 76, 78, 82, 86, 86, 86, 86, 86, 88, 88, 92, 94], [-98, -94, -86, -82, -80, -76, -74, -74, -72, -70, -70, -68, -66, -62, -50, -50, -48, -42, -34, -24, -22, -22, 2, 8, 8, 10, 12, 22, 22, 26, 26, 26, 30, 38, 44, 54, 56, 58, 68, 68, 72, 78, 80, 80, 84, 88, 92, 94, 98], [-92, -88, -84, -84, -82, -78, -78, -66, -60, -48, -48, -46, -42, -40, -40, -38, -36, -34, -30, -30, -26, -26, -22, -22, -20, -14, -12, 6, 28, 36, 38, 44, 46, 46, 48, 50, 52, 52, 56, 58, 60, 70, 80, 80, 80, 86, 92, 96, 98], [-98, -94, -80, -76, -72, -70, -70, -70, -68, -64, -64, -62, -60, -56, -54, -52, -50, -48, -46, -42, -40, -30, -28, -28, -24, -22, -6, -4, 0, 2, 10, 12, 18, 18, 32, 36, 58, 60, 68, 70, 72, 74, 80, 84, 86, 88, 88, 94, 98], [-96, -96, -86, -84, -84, -72, -72, -70, -70, -66, -64, -60, -58, -58, -46, -38, -38, -28, -22, -18, -14, 16, 18, 20, 20, 24, 24, 26, 32, 32, 34, 40, 42, 42, 44, 44, 46, 56, 58, 60, 62, 64, 66, 68, 68, 68, 74, 78, 86], [-98, -92, -70, -58, -54, -50, -50, -50, -46, -40, -40, -36, -34, -24, -22, -22, -18, -8, -6, -6, -2, 2, 2, 10, 16, 16, 20, 22, 24, 26, 28, 28, 30, 32, 38, 40, 42, 48, 56, 56, 58, 60, 66, 66, 72, 84, 90, 94, 96], [-98, -90, -82, -80, -78, -78, -70, -66, -60, -54, -48, -48, -38, -28, -18, -16, -14, -12, -12, -10, -8, -4, -4, -4, -2, 0, 2, 6, 6, 12, 16, 18, 20, 24, 36, 46, 52, 54, 60, 62, 66, 66, 70, 70, 82, 82, 86, 86, 88], [-98, -90, -88, -86, -78, -76, -76, -70, -66, -60, -56, -56, -56, -54, -52, -46, -40, -28, -26, -22, -20, -20, -18, -14, -12, -8, 0, 18, 18, 28, 34, 36, 36, 36, 38, 46, 50, 54, 56, 56, 60, 66, 70, 72, 74, 74, 80, 80, 82], [-98, -92, -90, -86, -84, -82, -78, -70, -66, -60, -58, -44, -42, -34, -32, -30, -24, -20, -16, -8, -4, 8, 8, 14, 14, 14, 14, 20, 20, 32, 38, 42, 52, 62, 62, 66, 68, 70, 72, 72, 78, 78, 78, 78, 84, 96, 98, 98, 98], [-90, -88, -82, -82, -82, -80, -74, -68, -68, -64, -58, -56, -54, -50, -42, -36, -32, -28, -20, -20, -20, -18, -16, -14, -6, -6, -2, 6, 8, 10, 20, 24, 26, 32, 38, 44, 46, 48, 56, 56, 58, 60, 64, 68, 74, 80, 88, 92, 96], [-96, -94, -88, -72, -72, -72, -70, -70, -64, -52, -46, -46, -44, -38, -34, -34, -28, -26, -20, -16, -14, -10, -8, -2, -2, 2, 6, 8, 10, 30, 34, 34, 36, 44, 52, 58, 60, 70, 72, 72, 74, 76, 76, 80, 90, 92, 92, 94, 98], [-98, -98, -96, -96, -84, -82, -80, -76, -62, -52, -46, -44, -44, -40, -38, -38, -36, -30, -22, -8, -4, -2, 0, 2, 4, 8, 12, 20, 22, 26, 26, 30, 34, 46, 46, 52, 54, 56, 58, 60, 62, 66, 72, 74, 78, 80, 90, 92, 96], [-94, -94, -92, -92, -80, -80, -74, -64, -56, -54, -52, -50, -50, -42, -42, -42, -40, -36, -36, -32, -24, -16, -14, -4, 0, 2, 4, 10, 12, 16, 22, 24, 26, 28, 28, 30, 40, 46, 48, 56, 58, 62, 62, 62, 80, 88, 88, 96, 98], [-96, -94, -94, -92, -84, -82, -80, -74, -70, -58, -54, -52, -52, -48, -44, -34, -34, -30, -28, -24, -14, -12, -4, -2, 2, 2, 4, 10, 12, 14, 24, 28, 38, 40, 46, 58, 62, 68, 72, 72, 74, 76, 82, 84, 84, 84, 84, 90, 98], [-98, -90, -84, -82, -76, -70, -66, -62, -60, -60, -58, -56, -54, -54, -50, -50, -46, -40, -40, -38, -32, -24, -22, -22, -20, -12, -12, -8, 6, 6, 8, 8, 8, 22, 26, 40, 42, 50, 50, 50, 50, 56, 64, 86, 92, 92, 94, 94, 96], [-92, -78, -74, -68, -66, -62, -62, -62, -60, -60, -54, -40, -36, -34, -34, -32, -22, -22, -18, -14, -12, -10, -6, -4, -2, 0, 12, 14, 18, 28, 32, 32, 38, 44, 48, 50, 52, 52, 60, 64, 66, 66, 82, 86, 90, 90, 94, 94, 96], [-96, -94, -92, -90, -88, -86, -84, -76, -74, -72, -72, -68, -66, -66, -58, -52, -50, -46, -42, -34, -32, -32, -30, -14, -10, -6, -6, -2, -2, 10, 14, 20, 30, 30, 34, 36, 36, 38, 38, 42, 44, 50, 52, 64, 68, 82, 90, 90, 98], [-98, -88, -82, -80, -80, -78, -76, -72, -70, -66, -66, -58, -56, -52, -52, -50, -50, -44, -42, -42, -32, -32, -30, -26, -22, -20, -20, -2, 0, 10, 12, 18, 20, 24, 24, 26, 36, 38, 42, 56, 66, 74, 76, 78, 78, 84, 86, 96, 98], [-94, -94, -94, -80, -76, -74, -68, -56, -52, -50, -44, -42, -38, -36, -34, -28, -26, -24, -16, -2, 0, 4, 8, 14, 16, 20, 22, 32, 34, 38, 46, 46, 48, 50, 52, 54, 62, 64, 66, 66, 72, 76, 78, 78, 80, 82, 82, 84, 94], [-98, -98, -90, -86, -80, -78, -76, -74, -74, -72, -72, -60, -58, -54, -50, -46, -32, -24, -22, -18, -18, -14, -12, -12, -10, -8, 8, 14, 24, 30, 36, 46, 48, 50, 58, 58, 62, 66, 66, 74, 74, 74, 78, 78, 80, 84, 86, 90, 92], [-98, -94, -82, -80, -72, -64, -60, -58, -48, -46, -46, -40, -32, -26, -24, -16, -14, -12, -10, -8, -6, -4, -4, 2, 4, 4, 12, 12, 14, 26, 34, 36, 40, 46, 48, 54, 66, 66, 66, 66, 66, 72, 78, 80, 80, 80, 94, 96, 98], [-96, -92, -86, -72, -70, -70, -68, -68, -66, -64, -62, -56, -50, -44, -32, -30, -28, -24, -12, -4, -4, -4, 2, 10, 16, 18, 18, 22, 32, 32, 36, 36, 40, 42, 46, 46, 50, 50, 50, 50, 52, 54, 64, 68, 70, 72, 74, 90, 96], [-98, -98, -98, -90, -86, -82, -64, -60, -58, -54, -48, -36, -36, -32, -30, -28, -18, -16, -14, -6, -2, 4, 6, 6, 10, 12, 14, 18, 24, 32, 34, 46, 48, 50, 52, 58, 66, 68, 70, 80, 80, 82, 84, 84, 86, 92, 94, 96, 98], [-98, -96, -88, -86, -86, -86, -86, -86, -84, -78, -78, -74, -72, -72, -70, -70, -70, -66, -64, -56, -42, -40, -38, -36, -34, -32, -30, -28, -26, -20, -8, -6, 0, 2, 2, 14, 24, 30, 34, 36, 44, 50, 52, 60, 66, 68, 74, 78, 86], [-96, -86, -72, -72, -70, -70, -68, -68, -64, -58, -58, -58, -54, -54, -52, -48, -46, -40, -38, -28, -14, -10, -6, -4, 0, 10, 10, 12, 16, 18, 18, 20, 20, 22, 34, 34, 40, 40, 46, 46, 58, 58, 62, 66, 68, 68, 72, 84, 92], [-96, -90, -88, -88, -82, -82, -76, -74, -70, -68, -62, -56, -52, -48, -46, -38, -22, -22, -16, -12, -8, 0, 4, 8, 14, 20, 22, 24, 28, 34, 36, 38, 44, 46, 48, 58, 66, 68, 68, 76, 84, 84, 86, 86, 88, 88, 90, 92, 94], [-96, -96, -96, -94, -90, -88, -88, -84, -76, -72, -72, -58, -54, -52, -52, -50, -40, -38, -32, -12, -12, -6, -4, -2, 0, 2, 2, 10, 12, 22, 28, 28, 30, 34, 42, 42, 54, 56, 58, 64, 70, 70, 74, 74, 84, 86, 88, 88, 90], [-94, -92, -84, -82, -82, -70, -66, -64, -60, -60, -58, -58, -54, -52, -52, -42, -36, -32, -30, -28, -26, -24, -22, -20, -16, -12, 0, 4, 6, 8, 14, 20, 30, 32, 46, 54, 60, 62, 62, 64, 66, 68, 68, 70, 70, 72, 72, 76, 88], [-90, -90, -90, -88, -88, -86, -78, -68, -62, -62, -60, -54, -54, -48, -48, -36, -36, -32, -28, -28, -22, -20, -6, -2, 4, 6, 8, 10, 14, 24, 28, 28, 28, 34, 34, 36, 44, 52, 54, 54, 66, 70, 70, 72, 78, 80, 84, 88, 88], [-98, -94, -94, -90, -84, -76, -72, -70, -68, -68, -60, -54, -54, -48, -46, -46, -44, -34, -28, -28, -26, -12, -8, -4, 2, 6, 6, 8, 14, 32, 32, 38, 38, 40, 44, 46, 46, 50, 50, 52, 54, 58, 60, 62, 70, 78, 86, 92, 92], [-98, -94, -94, -92, -90, -86, -82, -76, -74, -74, -66, -66, -66, -60, -60, -60, -56, -54, -50, -38, -30, -28, -18, -16, -16, -2, 0, 6, 14, 16, 16, 18, 28, 30, 30, 32, 34, 40, 46, 52, 52, 54, 60, 70, 82, 84, 88, 90, 94], [-96, -88, -84, -80, -78, -78, -78, -68, -62, -60, -52, -44, -36, -36, -36, -34, -32, -32, -30, -26, -22, -14, -10, -6, -4, -4, 0, 0, 0, 10, 12, 14, 14, 16, 24, 34, 38, 44, 52, 54, 54, 56, 58, 60, 64, 66, 66, 92, 98], [-98, -88, -80, -80, -74, -72, -70, -68, -64, -62, -62, -62, -58, -56, -52, -50, -50, -46, -34, -30, -30, -26, -18, -12, 4, 10, 14, 22, 24, 30, 32, 38, 42, 42, 46, 56, 56, 58, 68, 72, 80, 82, 86, 90, 90, 92, 96, 98, 98], [-96, -92, -92, -90, -90, -90, -88, -82, -82, -82, -80, -68, -64, -60, -50, -34, -30, -16, -10, -10, -8, -4, -4, -2, 0, 18, 20, 24, 24, 24, 30, 30, 36, 38, 38, 40, 42, 42, 44, 48, 52, 52, 56, 76, 84, 88, 92, 94, 98], [-98, -90, -82, -80, -74, -74, -72, -72, -72, -72, -64, -60, -56, -56, -56, -52, -40, -38, -24, -20, -18, -18, -12, -10, -6, 10, 18, 22, 24, 24, 26, 26, 30, 34, 40, 40, 44, 50, 58, 60, 62, 64, 70, 76, 80, 80, 86, 88, 96], [-96, -94, -86, -82, -72, -68, -68, -64, -62, -56, -54, -50, -50, -48, -44, -26, -20, -16, -10, -8, -6, 6, 8, 10, 10, 10, 16, 20, 28, 28, 32, 40, 42, 44, 44, 46, 46, 48, 58, 62, 72, 76, 80, 84, 86, 88, 92, 96, 98], [-96, -94, -94, -94, -92, -92, -90, -84, -82, -78, -76, -74, -74, -62, -58, -58, -58, -42, -42, -22, -20, -14, -14, -12, -4, -2, 4, 4, 4, 8, 16, 20, 24, 26, 32, 40, 42, 46, 52, 54, 56, 56, 60, 60, 62, 62, 82, 90, 96], [-98, -96, -96, -76, -70, -66, -54, -54, -52, -50, -46, -40, -36, -34, -32, -30, -28, -28, -26, -26, -22, -20, -18, -6, 6, 10, 20, 22, 28, 30, 30, 32, 32, 34, 38, 42, 46, 54, 58, 70, 76, 76, 84, 90, 94, 94, 98, 98, 98], [-90, -86, -82, -72, -70, -70, -66, -62, -60, -58, -54, -54, -40, -36, -32, -30, -28, -26, -26, -24, -16, -14, -10, -8, -8, -8, -8, 4, 6, 8, 14, 16, 18, 18, 22, 26, 30, 58, 66, 82, 84, 92, 92, 94, 96, 96, 96, 96, 98], [-92, -86, -80, -74, -68, -66, -64, -64, -52, -44, -36, -34, -32, -30, -26, -22, -20, -18, -14, -12, -8, 2, 10, 10, 12, 16, 24, 32, 32, 44, 46, 48, 52, 52, 54, 66, 68, 70, 72, 74, 82, 84, 88, 90, 94, 94, 96, 96, 96], [-92, -90, -80, -78, -78, -78, -74, -66, -50, -50, -46, -46, -44, -44, -40, -38, -34, -32, -32, -30, -18, -18, -16, -14, -12, 4, 10, 10, 10, 18, 20, 20, 22, 24, 24, 26, 26, 46, 46, 48, 48, 52, 58, 62, 64, 72, 80, 96, 96], [-98, -96, -94, -92, -88, -86, -84, -82, -76, -76, -60, -58, -58, -58, -56, -50, -48, -38, -34, -30, -20, -16, -16, -10, -4, -2, 10, 12, 18, 26, 32, 34, 48, 48, 52, 64, 64, 68, 70, 74, 76, 78, 80, 90, 92, 92, 92, 94, 96], [-96, -88, -88, -82, -76, -70, -62, -58, -56, -48, -48, -38, -36, -30, -18, -18, -16, -16, -14, -12, -6, 4, 8, 10, 10, 12, 14, 24, 28, 28, 34, 38, 44, 50, 58, 60, 62, 66, 66, 72, 74, 76, 76, 78, 78, 84, 86, 88, 96], [-98, -94, -94, -94, -90, -86, -78, -74, -68, -66, -62, -58, -56, -54, -52, -52, -48, -44, -44, -44, -30, -26, -26, -12, -4, 2, 4, 4, 6, 6, 12, 12, 14, 16, 16, 22, 22, 30, 30, 34, 36, 42, 50, 50, 64, 70, 80, 88, 98], [-98, -96, -96, -94, -88, -84, -58, -56, -52, -48, -44, -30, -26, -26, -20, -18, -16, -8, -8, -8, -6, -6, -4, -4, -2, 0, 6, 12, 12, 14, 24, 34, 42, 46, 48, 56, 60, 62, 62, 72, 72, 80, 84, 88, 88, 90, 90, 94, 96], [-98, -90, -82, -78, -70, -68, -64, -62, -56, -52, -50, -44, -44, -42, -36, -26, -24, -22, -12, -10, -6, -4, 0, 2, 6, 10, 18, 32, 32, 36, 38, 42, 48, 52, 54, 56, 62, 64, 66, 66, 66, 66, 70, 72, 74, 74, 78, 86, 92], [-96, -90, -88, -78, -74, -72, -70, -68, -66, -60, -58, -56, -56, -50, -50, -44, -36, -26, -24, -18, -16, -16, -12, -6, 2, 6, 8, 10, 10, 18, 18, 22, 24, 26, 42, 46, 64, 64, 66, 72, 74, 74, 76, 88, 94, 94, 96, 98, 98], [-94, -82, -78, -78, -76, -64, -64, -58, -58, -56, -56, -52, -44, -42, -38, -36, -22, -16, -14, -6, -2, 4, 4, 8, 8, 12, 14, 14, 14, 16, 16, 22, 30, 34, 38, 42, 44, 58, 62, 66, 66, 68, 76, 78, 80, 80, 84, 90, 98]],[-96, -90, -90, -86, -86, -86, -84, -76, -76, -74, -72, -70, -52, -50, -34, -32, -26, -20, -16, -14, -10, -8, -8, -6, 4, 12, 14, 16, 18, 24, 26, 32, 34, 38, 42, 42, 48, 48, 48, 48, 64, 66, 70, 76, 76, 82, 86, 86, 96],37,38,26,), ([[0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1]],[0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0],43,32,35,), ([[13, 16, 26, 38, 44, 71, 73], [16, 28, 39, 47, 48, 59, 61], [15, 30, 50, 59, 60, 89, 90], [24, 61, 63, 71, 72, 76, 83], [14, 36, 39, 42, 64, 76, 77], [4, 6, 11, 24, 34, 36, 58], [22, 35, 63, 70, 81, 91, 98]],[3, 9, 32, 55, 78, 85, 90],5,3,3,), ([[-48, -22, -52, -86, -22], [-54, -6, -16, -84, -34], [-46, -16, -80, -82, -38], [-44, 98, -54, -32, -88], [42, 52, 38, -20, -36]],[48, -68, 0, -54, -80],4,4,3,), ([[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]],[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],7,10,9,), ([[62, 15, 2, 68, 63, 42, 57, 46, 37, 30, 1, 51, 47, 75, 50, 24, 48, 56, 93, 9, 50, 79, 58, 74, 81, 64, 63, 60, 49, 24, 46, 55, 89, 10, 49, 46, 17, 86, 24, 51, 69, 21, 16, 97, 66, 14], [95, 91, 93, 6, 64, 52, 1, 29, 77, 42, 16, 76, 40, 30, 32, 7, 36, 72, 1, 94, 12, 25, 11, 75, 52, 95, 64, 4, 54, 78, 40, 67, 81, 92, 5, 42, 65, 94, 59, 12, 35, 75, 82, 83, 72, 47], [69, 96, 79, 34, 12, 8, 27, 58, 49, 56, 43, 17, 26, 87, 1, 19, 99, 48, 80, 25, 56, 40, 42, 63, 92, 27, 76, 55, 15, 2, 30, 81, 79, 4, 15, 52, 21, 94, 80, 27, 93, 33, 44, 20, 45, 34], [18, 47, 49, 73, 19, 87, 86, 72, 52, 21, 36, 27, 96, 2, 87, 35, 22, 20, 97, 92, 69, 13, 15, 95, 80, 58, 84, 66, 56, 12, 57, 36, 90, 25, 14, 43, 43, 80, 2, 53, 42, 65, 52, 42, 5, 48], [85, 40, 51, 5, 9, 71, 80, 70, 2, 18, 87, 36, 78, 90, 57, 60, 27, 92, 15, 64, 47, 22, 99, 53, 87, 28, 97, 94, 28, 83, 64, 10, 10, 34, 30, 90, 17, 87, 31, 7, 29, 68, 29, 69, 47, 35], [15, 32, 84, 9, 45, 6, 37, 97, 12, 69, 91, 45, 39, 58, 49, 85, 76, 2, 48, 71, 81, 88, 16, 71, 49, 32, 68, 5, 23, 65, 93, 47, 88, 59, 43, 43, 36, 59, 52, 77, 1, 25, 36, 86, 26, 42], [39, 15, 66, 15, 13, 29, 80, 10, 75, 3, 21, 65, 41, 19, 76, 82, 64, 55, 63, 46, 24, 94, 40, 75, 24, 20, 2, 86, 90, 24, 53, 70, 65, 90, 45, 70, 96, 98, 68, 60, 12, 31, 27, 57, 63, 17], [79, 58, 4, 37, 50, 72, 71, 69, 45, 86, 47, 25, 98, 59, 63, 16, 13, 97, 66, 2, 8, 13, 4, 54, 96, 1, 80, 3, 35, 15, 62, 20, 74, 58, 80, 65, 85, 37, 74, 6, 93, 29, 10, 19, 80, 61], [53, 59, 23, 20, 92, 20, 65, 17, 71, 81, 41, 50, 37, 86, 75, 62, 21, 49, 59, 34, 56, 94, 41, 71, 70, 94, 44, 6, 25, 19, 37, 3, 13, 39, 86, 98, 19, 30, 52, 26, 35, 25, 65, 74, 9, 69], [15, 92, 20, 89, 35, 8, 50, 32, 17, 2, 21, 64, 76, 26, 9, 49, 25, 63, 17, 51, 58, 1, 97, 3, 28, 80, 11, 89, 23, 86, 9, 27, 5, 52, 31, 62, 77, 63, 86, 41, 59, 19, 28, 78, 6, 63], [76, 97, 67, 74, 17, 13, 95, 60, 16, 63, 87, 95, 84, 66, 82, 69, 80, 44, 54, 32, 29, 37, 47, 62, 78, 79, 45, 10, 63, 11, 20, 53, 95, 72, 40, 75, 89, 81, 1, 37, 56, 15, 85, 93, 84, 9], [72, 60, 72, 79, 28, 8, 48, 76, 89, 84, 89, 46, 42, 83, 65, 90, 71, 93, 64, 50, 55, 88, 66, 29, 6, 6, 47, 99, 61, 98, 24, 57, 4, 83, 56, 56, 46, 21, 46, 33, 78, 85, 15, 28, 80, 33], [49, 8, 68, 50, 35, 16, 35, 44, 22, 80, 94, 48, 98, 13, 43, 79, 28, 68, 15, 99, 5, 27, 62, 63, 85, 66, 55, 31, 44, 48, 73, 58, 71, 50, 94, 22, 19, 79, 76, 13, 97, 27, 91, 19, 47, 12], [52, 75, 69, 55, 13, 16, 39, 7, 82, 28, 77, 88, 84, 98, 47, 21, 21, 43, 40, 92, 82, 92, 33, 94, 3, 21, 42, 47, 89, 40, 59, 78, 13, 97, 62, 96, 74, 69, 95, 73, 90, 11, 67, 10, 48, 47], [37, 21, 84, 6, 27, 11, 42, 18, 62, 58, 81, 7, 9, 71, 77, 38, 69, 12, 16, 61, 2, 44, 81, 71, 2, 99, 22, 38, 30, 51, 39, 11, 62, 73, 95, 74, 13, 87, 33, 17, 23, 8, 90, 45, 36, 73], [80, 14, 37, 80, 75, 12, 38, 69, 25, 91, 72, 14, 3, 36, 97, 93, 61, 20, 22, 9, 56, 89, 37, 99, 9, 50, 59, 95, 67, 25, 48, 36, 91, 66, 48, 61, 71, 13, 50, 54, 51, 29, 58, 48, 14, 19], [64, 64, 97, 27, 3, 7, 54, 36, 57, 24, 82, 5, 83, 49, 78, 87, 87, 93, 70, 62, 68, 26, 40, 84, 82, 76, 98, 27, 41, 71, 23, 56, 3, 46, 85, 39, 62, 92, 73, 74, 16, 79, 40, 24, 91, 63], [88, 29, 39, 88, 15, 76, 44, 40, 66, 67, 26, 9, 61, 5, 24, 71, 8, 56, 35, 89, 71, 12, 72, 54, 26, 84, 57, 58, 46, 73, 92, 24, 20, 59, 70, 86, 84, 15, 98, 51, 29, 15, 74, 7, 19, 64], [14, 46, 80, 84, 53, 57, 50, 32, 23, 48, 35, 83, 89, 10, 67, 51, 96, 63, 84, 18, 6, 41, 48, 79, 66, 17, 17, 45, 51, 7, 65, 79, 29, 34, 92, 17, 45, 36, 2, 36, 66, 30, 65, 4, 55, 61], [23, 37, 69, 52, 89, 17, 78, 39, 81, 83, 94, 61, 33, 11, 46, 34, 27, 35, 55, 1, 22, 99, 91, 24, 56, 28, 70, 88, 23, 48, 77, 57, 57, 72, 69, 79, 95, 58, 37, 68, 17, 66, 11, 82, 97, 20], [24, 46, 12, 76, 76, 15, 6, 97, 22, 95, 83, 52, 69, 59, 17, 24, 54, 85, 60, 41, 2, 84, 71, 76, 71, 27, 36, 54, 79, 32, 66, 65, 27, 15, 39, 30, 38, 58, 6, 66, 73, 31, 73, 74, 64, 51], [71, 37, 75, 62, 93, 88, 55, 77, 22, 54, 67, 34, 50, 89, 66, 77, 17, 54, 1, 53, 83, 3, 74, 37, 41, 38, 48, 39, 25, 46, 72, 61, 70, 77, 7, 58, 5, 77, 60, 64, 95, 22, 81, 95, 53, 14], [52, 25, 79, 20, 16, 26, 40, 49, 23, 82, 56, 61, 40, 89, 99, 58, 90, 17, 22, 20, 1, 14, 5, 99, 34, 63, 71, 7, 51, 56, 8, 3, 8, 39, 45, 90, 97, 24, 45, 77, 51, 57, 41, 59, 47, 15], [98, 5, 15, 87, 54, 20, 2, 88, 73, 98, 90, 4, 79, 94, 74, 26, 3, 91, 65, 28, 25, 93, 61, 63, 3, 97, 15, 40, 1, 79, 88, 71, 15, 55, 94, 93, 38, 56, 10, 41, 68, 28, 85, 74, 71, 19], [10, 27, 56, 25, 36, 22, 54, 74, 28, 72, 53, 19, 66, 49, 49, 56, 94, 55, 24, 82, 54, 66, 1, 7, 37, 45, 49, 85, 34, 51, 91, 74, 64, 28, 87, 81, 39, 42, 93, 60, 43, 10, 85, 12, 7, 62], [73, 51, 16, 10, 70, 67, 50, 75, 37, 60, 45, 31, 57, 94, 44, 51, 23, 74, 16, 79, 78, 57, 63, 90, 28, 24, 63, 5, 61, 2, 20, 86, 57, 46, 42, 5, 34, 72, 35, 68, 37, 6, 19, 15, 48, 93], [70, 43, 61, 32, 77, 46, 11, 98, 66, 70, 44, 73, 51, 53, 55, 69, 54, 3, 65, 25, 75, 37, 47, 44, 78, 78, 3, 98, 73, 71, 34, 54, 80, 69, 20, 35, 1, 27, 42, 18, 93, 96, 60, 9, 80, 57], [2, 31, 55, 74, 66, 86, 59, 31, 40, 18, 55, 86, 79, 74, 45, 19, 83, 26, 24, 28, 15, 34, 34, 28, 66, 68, 94, 87, 19, 66, 67, 48, 38, 39, 67, 75, 23, 28, 23, 10, 65, 75, 50, 23, 85, 55], [91, 22, 56, 89, 33, 23, 8, 81, 56, 97, 2, 88, 94, 38, 61, 8, 56, 85, 68, 31, 99, 30, 75, 61, 23, 68, 10, 95, 53, 57, 55, 42, 48, 97, 23, 40, 61, 99, 30, 54, 18, 66, 83, 58, 6, 35], [46, 84, 95, 99, 63, 16, 14, 13, 55, 83, 6, 77, 77, 40, 1, 85, 53, 14, 66, 46, 99, 67, 42, 55, 11, 27, 40, 38, 81, 54, 80, 3, 52, 77, 5, 22, 75, 50, 95, 54, 88, 27, 1, 85, 6, 60], [38, 32, 53, 70, 13, 71, 48, 20, 37, 38, 25, 23, 58, 93, 34, 66, 47, 71, 50, 64, 11, 60, 45, 49, 57, 25, 42, 75, 78, 97, 58, 31, 83, 60, 53, 72, 45, 71, 22, 43, 79, 1, 81, 8, 62, 39], [53, 8, 61, 2, 80, 52, 70, 9, 47, 23, 87, 99, 41, 89, 23, 54, 5, 50, 50, 96, 51, 30, 41, 93, 90, 77, 30, 4, 63, 52, 89, 30, 72, 96, 75, 55, 74, 12, 67, 62, 3, 38, 53, 62, 80, 80], [88, 65, 51, 42, 27, 28, 91, 20, 8, 18, 46, 12, 36, 12, 41, 29, 31, 18, 27, 84, 84, 83, 96, 70, 2, 3, 40, 53, 1, 39, 16, 29, 8, 23, 38, 71, 89, 87, 92, 83, 83, 57, 3, 64, 62, 51], [76, 38, 28, 18, 53, 19, 90, 48, 7, 74, 89, 6, 10, 5, 29, 51, 59, 32, 33, 66, 4, 90, 39, 9, 90, 77, 35, 48, 29, 58, 35, 14, 72, 89, 17, 75, 45, 8, 54, 58, 40, 65, 6, 90, 26, 47], [93, 31, 76, 38, 69, 20, 19, 44, 28, 53, 95, 64, 50, 11, 27, 64, 77, 18, 24, 1, 46, 8, 77, 72, 48, 14, 87, 28, 54, 9, 63, 68, 67, 59, 37, 20, 17, 74, 6, 30, 49, 65, 50, 80, 75, 77], [76, 40, 73, 71, 21, 7, 8, 38, 60, 4, 40, 32, 18, 36, 82, 31, 29, 74, 73, 19, 51, 98, 46, 74, 98, 53, 24, 66, 7, 14, 71, 95, 4, 86, 60, 14, 80, 28, 34, 18, 49, 68, 76, 55, 72, 35], [66, 6, 48, 50, 62, 34, 10, 41, 14, 93, 60, 58, 8, 51, 31, 89, 42, 67, 29, 75, 90, 98, 58, 4, 87, 82, 29, 27, 38, 13, 70, 4, 40, 30, 81, 29, 57, 61, 90, 10, 82, 36, 9, 32, 45, 87], [76, 45, 58, 23, 90, 81, 1, 48, 12, 36, 90, 35, 36, 83, 19, 6, 17, 6, 90, 88, 26, 12, 53, 49, 23, 13, 52, 17, 30, 92, 22, 83, 64, 1, 82, 71, 67, 30, 54, 67, 64, 93, 93, 8, 45, 71], [65, 37, 45, 41, 91, 59, 22, 56, 29, 22, 12, 44, 56, 7, 73, 87, 77, 98, 9, 38, 37, 62, 86, 66, 53, 64, 73, 86, 8, 20, 8, 3, 46, 51, 11, 53, 50, 57, 26, 93, 80, 41, 34, 70, 82, 82], [77, 1, 52, 73, 66, 59, 96, 50, 60, 63, 38, 44, 26, 95, 62, 99, 37, 34, 8, 44, 31, 10, 82, 75, 82, 92, 54, 61, 3, 52, 55, 7, 48, 22, 43, 71, 50, 96, 27, 56, 44, 66, 48, 25, 27, 22], [5, 86, 67, 70, 46, 7, 43, 52, 7, 19, 85, 27, 99, 55, 1, 48, 16, 41, 2, 47, 59, 51, 21, 19, 80, 80, 8, 41, 51, 75, 74, 49, 54, 48, 73, 15, 69, 24, 96, 19, 97, 23, 28, 90, 60, 50], [76, 65, 97, 12, 56, 95, 81, 27, 85, 46, 42, 56, 77, 90, 55, 6, 91, 41, 81, 93, 62, 83, 56, 21, 31, 28, 10, 28, 47, 92, 29, 85, 9, 30, 94, 62, 88, 86, 52, 16, 30, 50, 47, 1, 51, 11], [83, 14, 96, 9, 59, 84, 27, 94, 5, 20, 93, 58, 99, 71, 9, 5, 78, 38, 97, 97, 42, 88, 50, 51, 28, 64, 62, 32, 22, 50, 18, 57, 12, 61, 86, 72, 35, 53, 64, 42, 90, 32, 46, 84, 82, 65], [28, 99, 16, 15, 46, 15, 57, 32, 82, 90, 2, 29, 28, 8, 41, 33, 74, 61, 87, 64, 7, 51, 79, 30, 70, 33, 88, 9, 24, 7, 61, 22, 5, 12, 37, 19, 91, 38, 55, 23, 54, 62, 82, 8, 44, 73], [30, 77, 76, 3, 41, 88, 95, 36, 78, 76, 33, 86, 54, 38, 92, 36, 65, 99, 67, 8, 72, 33, 71, 88, 8, 63, 43, 89, 57, 6, 20, 74, 52, 50, 61, 66, 52, 3, 3, 60, 28, 6, 90, 51, 60, 15], [32, 86, 94, 46, 87, 40, 20, 75, 67, 86, 63, 63, 48, 42, 81, 69, 30, 11, 45, 18, 58, 68, 58, 79, 95, 51, 81, 1, 88, 58, 49, 75, 89, 60, 52, 24, 80, 70, 47, 17, 45, 94, 69, 17, 11, 97]],[19, 39, 31, 50, 61, 70, 43, 64, 45, 82, 49, 80, 21, 37, 96, 30, 42, 82, 96, 30, 22, 26, 42, 88, 57, 12, 59, 58, 83, 64, 66, 2, 37, 60, 5, 76, 20, 81, 10, 57, 70, 74, 65, 72, 15, 84],34,25,32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
STEINS_ALGORITHM_FOR_FINDING_GCD
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class STEINS_ALGORITHM_FOR_FINDING_GCD{ static int f_gold ( int a , int b ) { if ( a == 0 ) return b ; if ( b == 0 ) return a ; int k ; for ( k = 0 ; ( ( a | b ) & 1 ) == 0 ; ++ k ) { a >>= 1 ; b >>= 1 ; } while ( ( a & 1 ) == 0 ) a >>= 1 ; do { while ( ( b & 1 ) == 0 ) b >>= 1 ; if ( a > b ) { int temp = a ; a = b ; b = temp ; } b = ( b - a ) ; } while ( b != 0 ) ; return a << k ; }
def f_gold ( a , b ) : if ( a == 0 ) : return b if ( b == 0 ) : return a k = 0 while ( ( ( a | b ) & 1 ) == 0 ) : a = a >> 1 b = b >> 1 k = k + 1 while ( ( a & 1 ) == 0 ) : a = a >> 1 while ( b != 0 ) : while ( ( b & 1 ) == 0 ) : b = b >> 1 if ( a > b ) : temp = a a = b b = temp b = ( b - a ) return ( a << k )
null
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(37); param0.add(58); param0.add(89); param0.add(75); param0.add(59); param0.add(84); param0.add(47); param0.add(37); param0.add(83); param0.add(28); List<Integer> param1 = new ArrayList<>(); param1.add(93); param1.add(13); param1.add(27); param1.add(14); param1.add(47); param1.add(39); param1.add(76); param1.add(75); param1.add(62); param1.add(58); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (37,93,), (58,13,), (89,27,), (75,14,), (59,47,), (84,39,), (47,76,), (37,75,), (83,62,), (28,58,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT{ static boolean f_gold ( int n ) { return 1162261467 % n == 0 ; }
def f_gold ( n ) : return 1162261467 % n == 0
using namespace std; bool f_gold ( int n ) { return 1162261467 % n == 0; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(1); param0.add(3); param0.add(27); param0.add(9); param0.add(-9); param0.add(11); param0.add(57); param0.add(21); param0.add(60); param0.add(44); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (1,), (3,), (27,), (9,), (-9,), (11,), (57,), (21,), (60,), (44,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {1,3,27,9,-9,11,57,21,60,44}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MAXIMIZE_ARRJ_ARRI_ARRL_ARRK_SUCH_THAT_I_J_K_L
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMIZE_ARRJ_ARRI_ARRL_ARRK_SUCH_THAT_I_J_K_L{ static int f_gold ( int [ ] arr , int n ) { if ( n < 4 ) { System . out . println ( "The array should have" + " atleast 4 elements" ) ; } int table1 [ ] = new int [ n + 1 ] ; int table2 [ ] = new int [ n ] ; int table3 [ ] = new int [ n - 1 ] ; int table4 [ ] = new int [ n - 2 ] ; Arrays . fill ( table1 , Integer . MIN_VALUE ) ; Arrays . fill ( table2 , Integer . MIN_VALUE ) ; Arrays . fill ( table3 , Integer . MIN_VALUE ) ; Arrays . fill ( table4 , Integer . MIN_VALUE ) ; for ( int i = n - 1 ; i >= 0 ; i -- ) { table1 [ i ] = Math . max ( table1 [ i + 1 ] , arr [ i ] ) ; } for ( int i = n - 2 ; i >= 0 ; i -- ) { table2 [ i ] = Math . max ( table2 [ i + 1 ] , table1 [ i + 1 ] - arr [ i ] ) ; } for ( int i = n - 3 ; i >= 0 ; i -- ) table3 [ i ] = Math . max ( table3 [ i + 1 ] , table2 [ i + 1 ] + arr [ i ] ) ; for ( int i = n - 4 ; i >= 0 ; i -- ) table4 [ i ] = Math . max ( table4 [ i + 1 ] , table3 [ i + 1 ] - arr [ i ] ) ; return table4 [ 0 ] ; }
null
null
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{18,27,36,51,67,70,71,72,79,85,86,89,93,94,97}); param0.add(new int[]{4,70,88,90,-34,-4,-36,-38,16,-46,-60,-50,-72,-68,-42,-96,46,32,-80,46,-4,-86,-72,16,40,-74,78,-64,-38}); param0.add(new int[]{0,0,0,0,0,0,1,1,1}); param0.add(new int[]{67,75,6,31,18,44,55,99,83,8}); param0.add(new int[]{-94,-94,-84,-82,-74,-70,-70,-70,-56,-56,-52,-50,-48,-46,-44,-38,-36,-34,-34,-28,-26,-16,-16,0,0,2,2,4,6,10,24,30,32,32,34,36,48,62,64,78,78,84,90,92}); param0.add(new int[]{0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,1,0,1,1}); param0.add(new int[]{1,6,15,20,21,23,24,25,25,40,44,46,59,61,63,68,69,69,72,76,76,79,79,87,88,89,94,94,99}); param0.add(new int[]{8,70,-66,0,-82,-72,64,-88,40,10,24,-20,88}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{15,89,48,67,30,95,8,22,41,22,12,18,23,15,33,41,50,77,71,53,11,9,53,42,61,56,25,57,28,48,14,86,95,74,54,70,12,36,1,18,42,35,94,18,54,35,1,95,53}); List<Integer> param1 = new ArrayList<>(); param1.add(9); param1.add(24); param1.add(8); param1.add(9); param1.add(36); param1.add(14); param1.add(16); param1.add(7); param1.add(28); param1.add(37); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
null
COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_MINIMUM_NUMBER_SUBSETS_SUBSEQUENCES_CONSECUTIVE_NUMBERS{ static int f_gold ( int arr [ ] , int n ) { Arrays . sort ( arr ) ; int count = 1 ; for ( int i = 0 ; i < n - 1 ; i ++ ) { if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++ ; } return count ; }
def f_gold(arr, n): x = sorted(arr) count = 1 for i in range(0, n - 1): if (x[i] + 1 != x[i + 1]): count = count + 1 return count
using namespace std; int f_gold ( int arr [ ], int n ) { sort ( arr, arr + n ); int count = 1; for ( int i = 0; i < n - 1; i ++ ) { if ( arr [ i ] + 1 != arr [ i + 1 ] ) count ++; } return count; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97}); param0.add(new int[]{-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98}); param0.add(new int[]{1,1}); param0.add(new int[]{96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86}); param0.add(new int[]{-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98}); param0.add(new int[]{0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0}); param0.add(new int[]{8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98}); param0.add(new int[]{-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44}); List<Integer> param1 = new ArrayList<>(); param1.add(42); param1.add(24); param1.add(1); param1.add(26); param1.add(42); param1.add(27); param1.add(29); param1.add(25); param1.add(21); param1.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([3, 7, 7, 11, 14, 14, 14, 16, 17, 17, 21, 22, 24, 27, 27, 27, 31, 33, 35, 36, 36, 37, 38, 43, 45, 49, 52, 54, 57, 59, 59, 60, 67, 73, 74, 74, 74, 75, 75, 79, 83, 87, 90, 93, 97], 42,), ([-28, 72, 60, 62, 40, 64, 50, -36, -24, 40, -6, 78, -80, -82, 2, -30, 70, 94, -2, -30, 92, 12, -46, 32, -96, -2, 36, -40, -42, 66, 98], 24,), ([1, 1], 1,), ([96, 89, 24, 28, 70, 78, 78, 35, 98, 65, 18, 81, 35, 91, 33, 88, 69, 52, 66, 17, 73, 79, 30, 33, 78, 60, 42, 8, 36, 6, 47, 87, 8, 98, 9, 77, 78, 24, 86, 91, 13, 79, 50, 85, 3, 7, 61, 94, 86], 26,), ([-92, -92, -90, -84, -78, -66, -60, -60, -46, -42, -38, -32, -24, -20, -18, -16, -14, -10, 0, 4, 6, 12, 24, 32, 34, 44, 48, 50, 50, 64, 66, 68, 80, 84, 86, 86, 88, 90, 90, 90, 92, 94, 96, 98, 98], 42,), ([0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0], 27,), ([8, 12, 13, 14, 16, 20, 20, 21, 23, 23, 24, 27, 29, 29, 29, 29, 35, 35, 38, 39, 40, 46, 50, 52, 60, 62, 62, 65, 65, 65, 70, 71, 72, 73, 75, 76, 80, 81, 82, 83, 85, 91, 95, 97, 98, 98], 29,), ([-84, 92, 70, -46, 26, -94, -82, -26, -90, -62, 52, 62, -58, 44, -14, -6, 58, 2, 10, 76, -34, 42, - 26, 80, 26, 32, -82, 38, 2, 72, 68, 44, 24, 84, -32, 54, -96, -8, 36, 80, -82, 32, 98, -68], 25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 21,), ([64, 10, 6, 3, 67, 95, 72, 96, 72, 30, 99, 21, 46, 23, 48, 38, 48, 50, 53, 91, 59, 58, 27, 95, 63, 20, 27, 22, 58, 3, 11, 75, 77, 64, 46, 1, 67, 79, 6, 46, 57, 79, 49, 83, 21, 36, 44], 46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{3,7,7,11,14,14,14,16,17,17,21,22,24,27,27,27,31,33,35,36,36,37,38,43,45,49,52,54,57,59,59,60,67,73,74,74,74,75,75,79,83,87,90,93,97},{-28,72,60,62,40,64,50,-36,-24,40,-6,78,-80,-82,2,-30,70,94,-2,-30,92,12,-46,32,-96,-2,36,-40,-42,66,98},{1,1},{96,89,24,28,70,78,78,35,98,65,18,81,35,91,33,88,69,52,66,17,73,79,30,33,78,60,42,8,36,6,47,87,8,98,9,77,78,24,86,91,13,79,50,85,3,7,61,94,86},{-92,-92,-90,-84,-78,-66,-60,-60,-46,-42,-38,-32,-24,-20,-18,-16,-14,-10,0,4,6,12,24,32,34,44,48,50,50,64,66,68,80,84,86,86,88,90,90,90,92,94,96,98,98},{0,1,1,0,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0},{8,12,13,14,16,20,20,21,23,23,24,27,29,29,29,29,35,35,38,39,40,46,50,52,60,62,62,65,65,65,70,71,72,73,75,76,80,81,82,83,85,91,95,97,98,98},{-84,92,70,-46,26,-94,-82,-26,-90,-62,52,62,-58,44,-14,-6,58,2,10,76,-34,42,-26,80,26,32,-82,38,2,72,68,44,24,84,-32,54,-96,-8,36,80,-82,32,98,-68},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{64,10,6,3,67,95,72,96,72,30,99,21,46,23,48,38,48,50,53,91,59,58,27,95,63,20,27,22,58,3,11,75,77,64,46,1,67,79,6,46,57,79,49,83,21,36,44}}; vector<int> param1 {42,24,1,26,42,27,29,25,21,46}; 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; }
EQUILIBRIUM_INDEX_OF_AN_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class EQUILIBRIUM_INDEX_OF_AN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int i , j ; int leftsum , rightsum ; for ( i = 0 ; i < n ; ++ i ) { leftsum = 0 ; for ( j = 0 ; j < i ; j ++ ) leftsum += arr [ j ] ; rightsum = 0 ; for ( j = i + 1 ; j < n ; j ++ ) rightsum += arr [ j ] ; if ( leftsum == rightsum ) return i ; } return - 1 ; }
null
using namespace std; int f_gold ( int arr [ ], int n ) { int i, j; int leftsum, rightsum; for ( i = 0; i < n; ++ i ) { leftsum = 0; for ( j = 0; j < i; j ++ ) leftsum += arr [ j ]; rightsum = 0; for ( j = i + 1; j < n; j ++ ) rightsum += arr [ j ]; if ( leftsum == rightsum ) return i; } return - 1; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,6,7,8,15,15,19,23,27,28,29,31,37,40,41,42,50,51,57,58,63,63,64,70,71,72,78,83,85,90,90}); param0.add(new int[]{-68,-92}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{80,74,45,81,62,88,90,54}); param0.add(new int[]{-92,-84,-84,-66,-64,-50,-50,-48,-46,-44,-36,-36,-30,-24,-22,-16,-6,-2,24,48,54,62,66,74,74,80,82,88,98,98}); param0.add(new int[]{0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,1,1}); param0.add(new int[]{2,6,11,12,14,36,45,49,52,52,58,63,70,73,74,80,82,89,89}); param0.add(new int[]{16,-58,-14,-58,-36,-70,36,-8,-14,-78,-26,42,16,18,0,-44,32,50,-78,58,78,16,-34,-54,50,0,46,-12,52,-74,78,-82,-26,-72,-86,-14,86,40,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{58,82,79,77,84,79,39,98,53,84,19,9,93,30,6,82,8,43,17,44,62,21,34,86,98,44,81,14,82,54,44,53,36,33,2,68,19,37}); List<Integer> param1 = new ArrayList<>(); param1.add(25); param1.add(1); param1.add(26); param1.add(4); param1.add(27); param1.add(43); param1.add(17); param1.add(26); param1.add(33); param1.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{4,6,7,8,15,15,19,23,27,28,29,31,37,40,41,42,50,51,57,58,63,63,64,70,71,72,78,83,85,90,90},{-68,-92},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{80,74,45,81,62,88,90,54},{-92,-84,-84,-66,-64,-50,-50,-48,-46,-44,-36,-36,-30,-24,-22,-16,-6,-2,24,48,54,62,66,74,74,80,82,88,98,98},{0,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,1,1},{2,6,11,12,14,36,45,49,52,52,58,63,70,73,74,80,82,89,89},{16,-58,-14,-58,-36,-70,36,-8,-14,-78,-26,42,16,18,0,-44,32,50,-78,58,78,16,-34,-54,50,0,46,-12,52,-74,78,-82,-26,-72,-86,-14,86,40,-8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{58,82,79,77,84,79,39,98,53,84,19,9,93,30,6,82,8,43,17,44,62,21,34,86,98,44,81,14,82,54,44,53,36,33,2,68,19,37}}; vector<int> param1 {25,1,26,4,27,43,17,26,33,22}; 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; }
LONGEST_REPEATING_SUBSEQUENCE
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_REPEATING_SUBSEQUENCE{ static int f_gold ( String str ) { int n = str . length ( ) ; int [ ] [ ] dp = new int [ n + 1 ] [ n + 1 ] ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { if ( str . charAt ( i - 1 ) == str . charAt ( j - 1 ) && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] ; else dp [ i ] [ j ] = Math . max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) ; } } return dp [ n ] [ n ] ; }
def f_gold ( str ) : n = len ( str ) dp = [ [ 0 ] * ( n + 1 ) ] * ( n + 1 ) for i in range ( 1 , n + 1 ) : for j in range ( 1 , n + 1 ) : if ( str [ i - 1 ] == str [ j - 1 ] and i != j ) : dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ] else : dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ] , dp [ i - 1 ] [ j ] ) return dp [ n ] [ n ]
using namespace std; int f_gold ( string str ) { int n = str . length ( ); int dp [ n + 1 ] [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) for ( int j = 0; j <= n; j ++ ) dp [ i ] [ j ] = 0; for ( int i = 1; i <= n; i ++ ) { for ( int j = 1; j <= n; j ++ ) { if ( str [ i - 1 ] == str [ j - 1 ] && i != j ) dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]; else dp [ i ] [ j ] = max ( dp [ i ] [ j - 1 ], dp [ i - 1 ] [ j ] ); } } return dp [ n ] [ n ]; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("JxZFz"); param0.add("7648992235770"); param0.add("11100000"); param0.add("cRN SgYjPsctJ"); param0.add("434"); param0.add("1"); param0.add("JRfZIAsbrPBZ"); param0.add("03779368305592"); param0.add("1111000"); param0.add("BkULuIi"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('JxZFz',), ('7648992235770',), ('11100000',), ('cRN SgYjPsctJ',), ('434',), ('1',), ('JRfZIAsbrPBZ',), ('03779368305592',), ('1111000',), ('BkULuIi',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"JxZFz","7648992235770","11100000","cRN SgYjPsctJ","434","1","JRfZIAsbrPBZ","03779368305592","1111000","BkULuIi"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FAST_MULTIPLICATION_METHOD_WITHOUT_USING_MULTIPLICATION_OPERATOR_RUSSIAN_PEASANTS_ALGORITHM
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FAST_MULTIPLICATION_METHOD_WITHOUT_USING_MULTIPLICATION_OPERATOR_RUSSIAN_PEASANTS_ALGORITHM{ static int f_gold ( int a , int b ) { int res = 0 ; while ( b > 0 ) { if ( ( b & 1 ) != 0 ) res = res + a ; a = a << 1 ; b = b >> 1 ; } return res ; }
def f_gold ( a , b ) : res = 0 while ( b > 0 ) : if ( b & 1 ) : res = res + a a = a << 1 b = b >> 1 return res
using namespace std; unsigned int f_gold ( unsigned int a, unsigned int b ) { int res = 0; while ( b > 0 ) { if ( b & 1 ) res = res + a; a = a << 1; b = b >> 1; } return res; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(4); param0.add(36); param0.add(65); param0.add(55); param0.add(35); param0.add(69); param0.add(84); param0.add(5); param0.add(15); param0.add(67); List<Integer> param1 = new ArrayList<>(); param1.add(33); param1.add(67); param1.add(52); param1.add(37); param1.add(76); param1.add(98); param1.add(62); param1.add(80); param1.add(36); param1.add(84); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (4,33,), (36,67,), (65,52,), (55,37,), (35,76,), (69,98,), (84,62,), (5,80,), (15,36,), (67,84,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {4,36,65,55,35,69,84,5,15,67}; vector<int> param1 {33,67,52,37,76,98,62,80,36,84}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_1{ static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > hmap = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( hmap . containsKey ( arr [ i ] ) ) { int val = hmap . get ( arr [ i ] ) ; hmap . put ( arr [ i ] , val + 1 ) ; } else hmap . put ( arr [ i ] , 1 ) ; } for ( Integer a : hmap . keySet ( ) ) { if ( hmap . get ( a ) % 2 != 0 ) return a ; } return - 1 ; }
def f_gold ( arr , size ) : Hash = dict ( ) for i in range ( size ) : Hash [ arr [ i ] ] = Hash.get ( arr [ i ] , 0 ) + 1 ; for i in Hash : if ( Hash [ i ] % 2 != 0 ) : return i return - 1
using namespace std; int f_gold ( int arr [ ], int size ) { unordered_map < int, int > hash; for ( int i = 0; i < size; i ++ ) { hash [ arr [ i ] ] ++; } for ( auto i : hash ) { if ( i . second % 2 != 0 ) { return i . first; } } return - 1; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{49,90}); param0.add(new int[]{-96,94,92,-24,48,54,-30,-86,28,-18,12,-64,-36,68,68,-78,-6,30,-84,20,52,-36,40,-62,90,-48,86,98,12,44,98,-66,52,34,36,76,-50,-20,-20,-20}); param0.add(new int[]{0,1}); param0.add(new int[]{79,55,18,99,38,93,19,49,21,74,16,76,82,52,86,17,42,9,6,63,1,40,75,59,41,81}); param0.add(new int[]{-90,-84,-82,-68,-66,-66,-60,-60,-48,-44,-36,-34,-30,-16,-14,-12,-10,-6,2,10,10,14,22,26,30,34,46,50,52,62,64,64,66,72,74,78,78,82,84,88,92}); param0.add(new int[]{1,1,0,0,1,0,1,1,0,0,1,1,1,1,0,0,1,1,1,0,1,0,0,1,0,1}); param0.add(new int[]{2,4,5,7,7,18,18,23,23,25,25,31,41,43,45,46,52,52,55,64,69,69,80,81,84,90,91,93,94,94,94,94,96,98,99}); param0.add(new int[]{86,66,-8,2,-18,-22,38,4,-38,-54,78,64,78,20,-32,84,-70,66,-46,12,-12,8,44,14,20}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{11,4,98,38,20,41,1,8}); List<Integer> param1 = new ArrayList<>(); param1.add(1); param1.add(39); param1.add(1); param1.add(23); param1.add(23); param1.add(18); param1.add(20); param1.add(20); param1.add(21); param1.add(7); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([49, 90],1,), ([-96, 94, 92, -24, 48, 54, -30, -86, 28, -18, 12, -64, -36, 68, 68, -78, -6, 30, -84, 20, 52, -36, 40, -62, 90, -48, 86, 98, 12, 44, 98, -66, 52, 34, 36, 76, -50, -20, -20, -20],39,), ([0, 1],1,), ([79, 55, 18, 99, 38, 93, 19, 49, 21, 74, 16, 76, 82, 52, 86, 17, 42, 9, 6, 63, 1, 40, 75, 59, 41, 81],23,), ([-90, -84, -82, -68, -66, -66, -60, -60, -48, -44, -36, -34, -30, -16, -14, -12, -10, -6, 2, 10, 10, 14, 22, 26, 30, 34, 46, 50, 52, 62, 64, 64, 66, 72, 74, 78, 78, 82, 84, 88, 92],23,), ([1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1],18,), ([2, 4, 5, 7, 7, 18, 18, 23, 23, 25, 25, 31, 41, 43, 45, 46, 52, 52, 55, 64, 69, 69, 80, 81, 84, 90, 91, 93, 94, 94, 94, 94, 96, 98, 99],20,), ([86, 66, -8, 2, -18, -22, 38, 4, -38, -54, 78, 64, 78, 20, -32, 84, -70, 66, -46, 12, -12, 8, 44, 14, 20],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],21,), ([11, 4, 98, 38, 20, 41, 1, 8],7,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{49,90},{-96,94,92,-24,48,54,-30,-86,28,-18,12,-64,-36,68,68,-78,-6,30,-84,20,52,-36,40,-62,90,-48,86,98,12,44,98,-66,52,34,36,76,-50,-20,-20,-20},{0,1},{79,55,18,99,38,93,19,49,21,74,16,76,82,52,86,17,42,9,6,63,1,40,75,59,41,81},{-90,-84,-82,-68,-66,-66,-60,-60,-48,-44,-36,-34,-30,-16,-14,-12,-10,-6,2,10,10,14,22,26,30,34,46,50,52,62,64,64,66,72,74,78,78,82,84,88,92},{1,1,0,0,1,0,1,1,0,0,1,1,1,1,0,0,1,1,1,0,1,0,0,1,0,1},{2,4,5,7,7,18,18,23,23,25,25,31,41,43,45,46,52,52,55,64,69,69,80,81,84,90,91,93,94,94,94,94,96,98,99},{86,66,-8,2,-18,-22,38,4,-38,-54,78,64,78,20,-32,84,-70,66,-46,12,-12,8,44,14,20},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{11,4,98,38,20,41,1,8}}; vector<int> param1 {1,39,1,23,23,18,20,20,21,7}; 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; }
SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_2{ static int f_gold ( int n ) { n -- ; n |= n >> 1 ; n |= n >> 2 ; n |= n >> 4 ; n |= n >> 8 ; n |= n >> 16 ; n ++ ; return n ; }
def f_gold ( n ) : n -= 1 n |= n >> 1 n |= n >> 2 n |= n >> 4 n |= n >> 8 n |= n >> 16 n += 1 return n
using namespace std; unsigned int f_gold ( unsigned int n ) { n --; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; n ++; return n; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(60); param0.add(20); param0.add(33); param0.add(34); param0.add(68); param0.add(79); param0.add(20); param0.add(41); param0.add(36); param0.add(17); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (60,), (20,), (33,), (34,), (68,), (79,), (20,), (41,), (36,), (17,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {60,20,33,34,68,79,20,41,36,17}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_LARGEST_D_IN_ARRAY_SUCH_THAT_A_B_C_D
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_LARGEST_D_IN_ARRAY_SUCH_THAT_A_B_C_D{ static int f_gold ( int [ ] S , int n ) { boolean found = false ; Arrays . sort ( S ) ; for ( int i = n - 1 ; i >= 0 ; i -- ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == j ) continue ; for ( int k = j + 1 ; k < n ; k ++ ) { if ( i == k ) continue ; for ( int l = k + 1 ; l < n ; l ++ ) { if ( i == l ) continue ; if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) { found = true ; return S [ i ] ; } } } } } if ( found == false ) return Integer . MAX_VALUE ; return - 1 ; }
def f_gold ( S , n ) : found = False S.sort ( ) for i in range ( n - 1 , - 1 , - 1 ) : for j in range ( 0 , n ) : if ( i == j ) : continue for k in range ( j + 1 , n ) : if ( i == k ) : continue for l in range ( k + 1 , n ) : if ( i == l ) : continue if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) : found = True return S [ i ] if ( found == False ) : return - 1
using namespace std; int f_gold ( int S [ ], int n ) { bool found = false; sort ( S, S + n ); for ( int i = n - 1; i >= 0; i -- ) { for ( int j = 0; j < n; j ++ ) { if ( i == j ) continue; for ( int k = j + 1; k < n; k ++ ) { if ( i == k ) continue; for ( int l = k + 1; l < n; l ++ ) { if ( i == l ) continue; if ( S [ i ] == S [ j ] + S [ k ] + S [ l ] ) { found = true; return S [ i ]; } } } } } if ( found == false ) return INT_MIN; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{8,12,14,15,16,20,27,28,29,30,35,41,46,51,53,55,55,58,63,64,72,73,75,75,75,82,82,86,89,91,92,94,95,95,97,97,98}); param0.add(new int[]{-62,48,-22,-44,-58,-50,-82,34,26,-2,86,-44,92,-96,42,-20,10,74,-56,-12,-28,-40}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1}); param0.add(new int[]{84,58,10,67,77,66,10,47,65,55,54}); param0.add(new int[]{-46,-28,-20,-18,4,8,18,38,90,90}); param0.add(new int[]{0,1,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0}); param0.add(new int[]{11,13,14,21,26,28,36,39,41,42,43,44,49,49,57,58,59,59,63,64,67,69,70,75,78,79,83,83,86,91,92,93,96,96,96,97}); param0.add(new int[]{74,52,-16,34,-88,62,54,46,-82,76,-48,54,50,-66,-18,78,-48,38,96,-32,-82,0,-76,46,-56,4,-30,-70,-62}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{55,74,18,4,68,66,33,61,66,92,21,9,49,14,99,87,74,6,11,25,5,58,56,20}); List<Integer> param1 = new ArrayList<>(); param1.add(24); param1.add(19); param1.add(8); param1.add(5); param1.add(6); param1.add(35); param1.add(30); param1.add(16); param1.add(17); param1.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([8, 12, 14, 15, 16, 20, 27, 28, 29, 30, 35, 41, 46, 51, 53, 55, 55, 58, 63, 64, 72, 73, 75, 75, 75, 82, 82, 86, 89, 91, 92, 94, 95, 95, 97, 97, 98],24,), ([-62, 48, -22, -44, -58, -50, -82, 34, 26, -2, 86, -44, 92, -96, 42, -20, 10, 74, -56, -12, -28, -40],19,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1],8,), ([84, 58, 10, 67, 77, 66, 10, 47, 65, 55, 54],5,), ([-46, -28, -20, -18, 4, 8, 18, 38, 90, 90],6,), ([0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0],35,), ([11, 13, 14, 21, 26, 28, 36, 39, 41, 42, 43, 44, 49, 49, 57, 58, 59, 59, 63, 64, 67, 69, 70, 75, 78, 79, 83, 83, 86, 91, 92, 93, 96, 96, 96, 97],30,), ([74, 52, -16, 34, -88, 62, 54, 46, -82, 76, -48, 54, 50, -66, -18, 78, -48, 38, 96, -32, -82, 0, -76, 46, -56, 4, -30, -70, -62],16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],17,), ([55, 74, 18, 4, 68, 66, 33, 61, 66, 92, 21, 9, 49, 14, 99, 87, 74, 6, 11, 25, 5, 58, 56, 20],23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{8,12,14,15,16,20,27,28,29,30,35,41,46,51,53,55,55,58,63,64,72,73,75,75,75,82,82,86,89,91,92,94,95,95,97,97,98},{-62,48,-22,-44,-58,-50,-82,34,26,-2,86,-44,92,-96,42,-20,10,74,-56,-12,-28,-40},{0,0,0,0,0,0,0,1,1,1},{84,58,10,67,77,66,10,47,65,55,54},{-46,-28,-20,-18,4,8,18,38,90,90},{0,1,1,1,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0},{11,13,14,21,26,28,36,39,41,42,43,44,49,49,57,58,59,59,63,64,67,69,70,75,78,79,83,83,86,91,92,93,96,96,96,97},{74,52,-16,34,-88,62,54,46,-82,76,-48,54,50,-66,-18,78,-48,38,96,-32,-82,0,-76,46,-56,4,-30,-70,-62},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{55,74,18,4,68,66,33,61,66,92,21,9,49,14,99,87,74,6,11,25,5,58,56,20}}; vector<int> param1 {24,19,8,5,6,35,30,16,17,23}; 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; }
N_TH_ROOT_NUMBER
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_ROOT_NUMBER{ static double f_gold ( int A , int N ) { double xPre = Math . random ( ) % 10 ; double eps = 0.001 ; double delX = 2147483647 ; double xK = 0.0 ; while ( delX > eps ) { xK = ( ( N - 1.0 ) * xPre + ( double ) A / Math . pow ( xPre , N - 1 ) ) / ( double ) N ; delX = Math . abs ( xK - xPre ) ; xPre = xK ; } return xK ; }
null
null
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(94); param0.add(74); param0.add(29); param0.add(29); param0.add(18); param0.add(96); param0.add(3); param0.add(35); param0.add(51); param0.add(19); List<Integer> param1 = new ArrayList<>(); param1.add(85); param1.add(1); param1.add(4); param1.add(11); param1.add(6); param1.add(92); param1.add(61); param1.add(85); param1.add(88); param1.add(54); for(int i = 0; i < param0.size(); ++i) { if(Math.abs(1 - (0.0000001 + Math.abs(f_gold(param0.get(i),param1.get(i))) )/ (Math.abs(f_filled(param0.get(i),param1.get(i))) + 0.0000001)) < 0.001) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
null
REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REPLACE_CHARACTER_C1_C2_C2_C1_STRING_S{ static String f_gold ( String s , char c1 , char c2 ) { int l = s . length ( ) ; char [ ] arr = s . toCharArray ( ) ; for ( int i = 0 ; i < l ; i ++ ) { if ( arr [ i ] == c1 ) arr [ i ] = c2 ; else if ( arr [ i ] == c2 ) arr [ i ] = c1 ; } return String . valueOf ( arr ) ; }
def f_gold ( s , c1 , c2 ) : l = len ( s ) for i in range ( l ) : if ( s [ i ] == c1 ) : s = s [ 0 : i ] + c2 + s [ i + 1 : ] elif ( s [ i ] == c2 ) : s = s [ 0 : i ] + c1 + s [ i + 1 : ] return s
using namespace std; string f_gold ( string s, char c1, char c2 ) { int l = s . length ( ); for ( int i = 0; i < l; i ++ ) { if ( s [ i ] == c1 ) s [ i ] = c2; else if ( s [ i ] == c2 ) s [ i ] = c1; } return s; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("IZTSMw j"); param0.add("7288334"); param0.add("010110000"); param0.add("b gJX"); param0.add("734"); param0.add("1"); param0.add("xCaUKdhA"); param0.add("4370992644981"); param0.add("01010"); param0.add("ZNIFGshaWA"); List<Character> param1 = new ArrayList<>(); param1.add('W'); param1.add('6'); param1.add('1'); param1.add('t'); param1.add('4'); param1.add('1'); param1.add('X'); param1.add('5'); param1.add('0'); param1.add('Q'); List<Character> param2 = new ArrayList<>(); param2.add('k'); param2.add('9'); param2.add('1'); param2.add('P'); param2.add('4'); param2.add('1'); param2.add('S'); param2.add('6'); param2.add('1'); param2.add('x'); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)).equals(f_gold(param0.get(i),param1.get(i),param2.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('IZTSMw j','W','k',), ('7288334','6','9',), ('010110000','1','1',), ('b gJX','t','P',), ('734','4','4',), ('1','1','1',), ('xCaUKdhA','X','S',), ('4370992644981','5','6',), ('01010','0','1',), ('ZNIFGshaWA','Q','x',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"IZTSMw j","7288334","010110000","b gJX","734","1","xCaUKdhA","4370992644981","01010","ZNIFGshaWA"}; vector<char> param1 {'W','6','1','t','4','1','X','5','0','Q'}; vector<char> param2 {'k','9','1','P','4','1','S','6','1','x'}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int i ; for ( i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == i ) return i ; } return - 1 ; }
def f_gold ( arr , n ) : for i in range ( n ) : if arr [ i ] is i : return i return - 1
using namespace std; int f_gold ( int arr [ ], int n ) { int i; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] == i ) return i; } return - 1; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{8,16,21,26,27,29,34,35,35,37,38,40,48,52,58,59,60,61,63,63,65,66,69,75,79,83,86,88,91,91,96}); param0.add(new int[]{22,-70,34,-44,84,54,14,-88}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{59,67,70,34,18,22,52,95,11,66,60,24,7,71,52,88,32,52,85,81,32,44,25,51,47,97,81,33,88,38,36,54,80,25,70,27,75,29,94}); param0.add(new int[]{-96,-96,-94,-88,-88,-82,-72,-72,-70,-70,-66,-64,-64,-62,-58,-54,-46,-44,-30,-26,-22,-8,-6,-2,0,26,30,30,34,42,42,48,64,76,90,96}); param0.add(new int[]{0,1,0,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,1,0,1,1}); param0.add(new int[]{2,2,4,7,10,15,16,16,23,24,27,39,42,58,60,64,72,74,78,78,78,80,80,84,85,86,88,88,90,92,93,94,95,96}); param0.add(new int[]{-68,-48,36,22,-80,-48,-74,-14,44,-46,-76,18,-16,-36,-68,0,-30,-56,42,92,82,64,-18,-6,-78,-86,26,86,36,-66,-50,18,-26,48,8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{3,76,99,1,1,29,9,12,57,12,74,22,83,77,39,84,50,60,36,90,88,62,79,58,58,40,44,99,84,63,23,21,16,98,68,8,46}); List<Integer> param1 = new ArrayList<>(); param1.add(23); param1.add(7); param1.add(31); param1.add(37); param1.add(34); param1.add(15); param1.add(22); param1.add(20); param1.add(23); param1.add(35); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([8, 16, 21, 26, 27, 29, 34, 35, 35, 37, 38, 40, 48, 52, 58, 59, 60, 61, 63, 63, 65, 66, 69, 75, 79, 83, 86, 88, 91, 91, 96],23,), ([22, -70, 34, -44, 84, 54, 14, -88],7,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,), ([59, 67, 70, 34, 18, 22, 52, 95, 11, 66, 60, 24, 7, 71, 52, 88, 32, 52, 85, 81, 32, 44, 25, 51, 47, 97, 81, 33, 88, 38, 36, 54, 80, 25, 70, 27, 75, 29, 94],37,), ([-96, -96, -94, -88, -88, -82, -72, -72, -70, -70, -66, -64, -64, -62, -58, -54, -46, -44, -30, -26, -22, -8, -6, -2, 0, 26, 30, 30, 34, 42, 42, 48, 64, 76, 90, 96],34,), ([0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1],15,), ([2, 2, 4, 7, 10, 15, 16, 16, 23, 24, 27, 39, 42, 58, 60, 64, 72, 74, 78, 78, 78, 80, 80, 84, 85, 86, 88, 88, 90, 92, 93, 94, 95, 96],22,), ([-68, -48, 36, 22, -80, -48, -74, -14, 44, -46, -76, 18, -16, -36, -68, 0, -30, -56, 42, 92, 82, 64, -18, -6, -78, -86, 26, 86, 36, -66, -50, 18, -26, 48, 8],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,), ([3, 76, 99, 1, 1, 29, 9, 12, 57, 12, 74, 22, 83, 77, 39, 84, 50, 60, 36, 90, 88, 62, 79, 58, 58, 40, 44, 99, 84, 63, 23, 21, 16, 98, 68, 8, 46],35,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{8,16,21,26,27,29,34,35,35,37,38,40,48,52,58,59,60,61,63,63,65,66,69,75,79,83,86,88,91,91,96},{22,-70,34,-44,84,54,14,-88},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{59,67,70,34,18,22,52,95,11,66,60,24,7,71,52,88,32,52,85,81,32,44,25,51,47,97,81,33,88,38,36,54,80,25,70,27,75,29,94},{-96,-96,-94,-88,-88,-82,-72,-72,-70,-70,-66,-64,-64,-62,-58,-54,-46,-44,-30,-26,-22,-8,-6,-2,0,26,30,30,34,42,42,48,64,76,90,96},{0,1,0,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,1,0,1,1,0,0,1,0,1,1},{2,2,4,7,10,15,16,16,23,24,27,39,42,58,60,64,72,74,78,78,78,80,80,84,85,86,88,88,90,92,93,94,95,96},{-68,-48,36,22,-80,-48,-74,-14,44,-46,-76,18,-16,-36,-68,0,-30,-56,42,92,82,64,-18,-6,-78,-86,26,86,36,-66,-50,18,-26,48,8},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{3,76,99,1,1,29,9,12,57,12,74,22,83,77,39,84,50,60,36,90,88,62,79,58,58,40,44,99,84,63,23,21,16,98,68,8,46}}; vector<int> param1 {23,7,31,37,34,15,22,20,23,35}; 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_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1{ static int f_gold ( int n ) { return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 ) ; }
def f_gold ( n ) : return ( 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) // 2 ) )
using namespace std; int f_gold ( int n ) { return 1 + ( n * 2 ) + ( n * ( ( n * n ) - 1 ) / 2 ); }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(55); param0.add(36); param0.add(69); param0.add(92); param0.add(73); param0.add(16); param0.add(88); param0.add(19); param0.add(66); param0.add(68); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (55,), (36,), (69,), (92,), (73,), (16,), (88,), (19,), (66,), (68,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {55,36,69,92,73,16,88,19,66,68}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_ARRAY_CONTAINS_CONTIGUOUS_INTEGERS_DUPLICATES_ALLOWED_1{ static Boolean f_gold ( int arr [ ] , int n ) { HashSet < Integer > us = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) us . add ( arr [ i ] ) ; int count = 1 ; int curr_ele = arr [ 0 ] - 1 ; while ( us . contains ( curr_ele ) == true ) { count ++ ; curr_ele -- ; } curr_ele = arr [ 0 ] + 1 ; while ( us . contains ( curr_ele ) == true ) { count ++ ; curr_ele ++ ; } return ( count == ( us . size ( ) ) ) ; }
null
using namespace std; bool f_gold ( int arr [ ], int n ) { unordered_set < int > us; for ( int i = 0; i < n; i ++ ) us . insert ( arr [ i ] ); int count = 1; int curr_ele = arr [ 0 ] - 1; while ( us . find ( curr_ele ) != us . end ( ) ) { count ++; curr_ele --; } curr_ele = arr [ 0 ] + 1; while ( us . find ( curr_ele ) != us . end ( ) ) { count ++; curr_ele ++; } return ( count == ( int ) ( us . size ( ) ) ); }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{15,19,38,59,71}); param0.add(new int[]{-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76}); param0.add(new int[]{0,0,1,1,1}); param0.add(new int[]{40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4}); param0.add(new int[]{-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72}); param0.add(new int[]{1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1}); param0.add(new int[]{7,32,54,70,79,88}); param0.add(new int[]{-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1}); param0.add(new int[]{49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,16}); List<Integer> param1 = new ArrayList<>(); param1.add(3); param1.add(26); param1.add(4); param1.add(26); param1.add(16); param1.add(38); param1.add(5); param1.add(30); param1.add(12); param1.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{15,19,38,59,71},{-20,66,-22,-56,-6,94,70,-80,24,-26,-58,-76,-20,-8,-62,18,-56,-20,42,-40,-88,-74,64,-26,-92,66,-18,-64,66,12,24,-8,78,-82,14,-76},{0,0,1,1,1},{40,38,17,50,16,35,34,23,3,12,97,53,75,36,3,73,99,11,70,9,23,3,11,9,64,44,62,94,55,69,44,59,57,99,69,12,27,42,14,83,53,4,4},{-78,-36,-28,-16,-8,-4,4,4,10,14,30,30,32,32,38,46,54,72},{1,0,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1,1},{7,32,54,70,79,88},{-38,48,-96,-84,10,70,-28,-66,40,-26,-24,-8,28,-6,6,-14,-2,-58,-6,-14,-58,-74,20,32,98,-24,-10,42,-4,-96,-56,-40,74,-98,-86,-94,12,80,10,-54,-44},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1},{49,87,18,19,56,25,64,94,43,97,74,79,13,36,72,46,10,84,2,11,41,87,55,38,89,92,65,57,62,16}}; vector<int> param1 {3,26,4,26,16,38,5,30,12,21}; 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; }
NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR{ static int f_gold ( int n ) { return n * ( n - 1 ) * ( n - 2 ) / 6 ; }
def f_gold ( n ) : return ( n * ( n - 1 ) * ( n - 2 ) // 6 )
using namespace std; int f_gold ( int n ) { return n * ( n - 1 ) * ( n - 2 ) / 6; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(67); param0.add(58); param0.add(67); param0.add(60); param0.add(4); param0.add(97); param0.add(9); param0.add(16); param0.add(83); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (67,), (58,), (67,), (60,), (4,), (97,), (9,), (16,), (83,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {67,58,67,60,4,97,9,16,83,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_SUM_EVEN_INDEX_BINOMIAL_COEFFICIENTS{ static int f_gold ( int n ) { int C [ ] [ ] = new int [ n + 1 ] [ n + 1 ] ; int i , j ; for ( i = 0 ; i <= n ; i ++ ) { for ( j = 0 ; j <= Math . min ( i , n ) ; j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1 ; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] ; } } int sum = 0 ; for ( i = 0 ; i <= n ; i += 2 ) sum += C [ n ] [ i ] ; return sum ; }
def f_gold ( n ) : C = [ [ 0 for x in range ( n + 1 ) ] for y in range ( n + 1 ) ] for i in range ( 0 , n + 1 ) : for j in range ( 0 , min ( i , n + 1 ) ) : if j == 0 or j == i : C [ i ] [ j ] = 1 else : C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ] sum = 0 ; for i in range ( 0 , n + 1 ) : if n % 2 == 0 : sum = sum + C [ n ] [ i ] return sum
using namespace std; int f_gold ( int n ) { int C [ n + 1 ] [ n + 1 ]; int i, j; for ( i = 0; i <= n; i ++ ) { for ( j = 0; j <= min ( i, n ); j ++ ) { if ( j == 0 || j == i ) C [ i ] [ j ] = 1; else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ]; } } int sum = 0; for ( int i = 0; i <= n; i += 2 ) sum += C [ n ] [ i ]; return sum; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(18); param0.add(54); param0.add(67); param0.add(17); param0.add(47); param0.add(99); param0.add(26); param0.add(93); param0.add(57); param0.add(98); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (18,), (54,), (67,), (17,), (47,), (99,), (26,), (93,), (57,), (98,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {18,54,67,17,47,99,26,93,57,98}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
DECODE_MEDIAN_STRING_ORIGINAL_STRING
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DECODE_MEDIAN_STRING_ORIGINAL_STRING{ static String f_gold ( String s ) { int l = s . length ( ) ; String s1 = "" ; boolean isEven = ( l % 2 == 0 ) ? true : false ; for ( int i = 0 ; i < l ; i += 2 ) { if ( isEven ) { s1 = s . charAt ( i ) + s1 ; s1 += s . charAt ( i + 1 ) ; } else { if ( l - i > 1 ) { s1 += s . charAt ( i ) ; s1 = s . charAt ( i + 1 ) + s1 ; } else { s1 += s . charAt ( i ) ; } } } return s1 ; }
def f_gold ( s ) : l = len ( s ) s1 = "" if ( l % 2 == 0 ) : isEven = True else : isEven = False for i in range ( 0 , l , 2 ) : if ( isEven ) : s1 = s [ i ] + s1 s1 += s [ i + 1 ] else : if ( l - i > 1 ) : s1 += s [ i ] s1 = s [ i + 1 ] + s1 else : s1 += s [ i ] return s1
using namespace std; string f_gold ( string s ) { int l = s . length ( ); string s1 = ""; bool isEven = ( l % 2 == 0 ) ? true : false; for ( int i = 0; i < l; i += 2 ) { if ( isEven ) { s1 = s [ i ] + s1; s1 += s [ i + 1 ]; } else { if ( l - i > 1 ) { s1 += s [ i ]; s1 = s [ i + 1 ] + s1; } else { s1 += s [ i ]; } } } return s1; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add(" EgvQCeqYpZtv"); param0.add("488540"); param0.add("0000101010111"); param0.add("syw"); param0.add("402355"); param0.add("0"); param0.add("wmHMlAtq"); param0.add("7962"); param0.add("111111"); param0.add("UbgRGDquop"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (' EgvQCeqYpZtv',), ('488540',), ('0000101010111',), ('syw',), ('402355',), ('0',), ('wmHMlAtq',), ('7962',), ('111111',), ('UbgRGDquop',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {" EgvQCeqYpZtv","488540","0000101010111","syw","402355","0","wmHMlAtq","7962","111111","UbgRGDquop"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LEXICOGRAPHICAL_MAXIMUM_SUBSTRING_STRING{ static String f_gold ( String str ) { String mx = "" ; for ( int i = 0 ; i < str . length ( ) ; ++ i ) { if ( mx . compareTo ( str . substring ( i ) ) <= 0 ) { mx = str . substring ( i ) ; } } return mx ; }
def f_gold ( str ) : mx = "" for i in range ( len ( str ) ) : mx = max ( mx , str [ i : ] ) return mx
using namespace std; string f_gold ( string str ) { string mx = ""; for ( int i = 0; i < str . length ( ); ++ i ) mx = max ( mx, str . substr ( i ) ); return mx; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("HCoAefoaan"); param0.add("80336005"); param0.add("01111111110"); param0.add("qIH"); param0.add("4210598472796"); param0.add("10101"); param0.add("imqmKdatcgXjs"); param0.add("950509666021"); param0.add("10111101101"); param0.add("wasqgYFvz"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('HCoAefoaan',), ('80336005',), ('01111111110',), ('qIH',), ('4210598472796',), ('10101',), ('imqmKdatcgXjs',), ('950509666021',), ('10111101101',), ('wasqgYFvz',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"HCoAefoaan","80336005","01111111110","qIH","4210598472796","10101","imqmKdatcgXjs","950509666021","10111101101","wasqgYFvz"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_LARGEST_PRIME_FACTOR_NUMBER
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_LARGEST_PRIME_FACTOR_NUMBER{ static long f_gold ( long n ) { long maxPrime = - 1 ; while ( n % 2 == 0 ) { maxPrime = 2 ; n >>= 1 ; } for ( int i = 3 ; i <= Math . sqrt ( n ) ; i += 2 ) { while ( n % i == 0 ) { maxPrime = i ; n = n / i ; } } if ( n > 2 ) maxPrime = n ; return maxPrime ; }
import math def f_gold ( n ) : maxPrime = - 1 while n % 2 == 0 : maxPrime = 2 n >>= 1 for i in range ( 3 , int ( math.sqrt ( n ) ) + 1 , 2 ) : while n % i == 0 : maxPrime = i n = n / i if n > 2 : maxPrime = n return int ( maxPrime )
using namespace std; long long f_gold ( long long n ) { long long maxPrime = - 1; while ( n % 2 == 0 ) { maxPrime = 2; n >>= 1; } for ( int i = 3; i <= sqrt ( n ); i += 2 ) { while ( n % i == 0 ) { maxPrime = i; n = n / i; } } if ( n > 2 ) maxPrime = n; return maxPrime; }
public static void main(String args[]) { int n_success = 0; List<Long> param0 = new ArrayList<>(); param0.add(98L); param0.add(8L); param0.add(78L); param0.add(65L); param0.add(55L); param0.add(10L); param0.add(10L); param0.add(37L); param0.add(39L); param0.add(15L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (98,), (8,), (78,), (65,), (55,), (10,), (10,), (37,), (39,), (15,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<long> param0 {98,8,78,65,55,10,10,37,39,15}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_EVEN_LENGTH_BINARY_SEQUENCES_WITH_SAME_SUM_OF_FIRST_AND_SECOND_HALF_BITS_1{ static int f_gold ( int n ) { int nCr = 1 , res = 1 ; for ( int r = 1 ; r <= n ; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r ; res += nCr * nCr ; } return res ; }
def f_gold ( n ) : nCr = 1 res = 1 for r in range ( 1 , n + 1 ) : nCr = ( nCr * ( n + 1 - r ) ) / r ; res += nCr * nCr ; return res ;
using namespace std; int f_gold ( int n ) { int nCr = 1, res = 1; for ( int r = 1; r <= n; r ++ ) { nCr = ( nCr * ( n + 1 - r ) ) / r; res += nCr * nCr; } return res; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(52); param0.add(75); param0.add(25); param0.add(80); param0.add(18); param0.add(17); param0.add(33); param0.add(8); param0.add(99); param0.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (52,), (75,), (25,), (80,), (18,), (17,), (33,), (8,), (99,), (8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {52,75,25,80,18,17,33,8,99,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_OF_PAIRS_SATISFYING_THE_GIVEN_CONDITION{ static int f_gold ( int a , int b ) { String s = String . valueOf ( b ) ; int i ; for ( i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) != '9' ) break ; } int result ; if ( i == s . length ( ) ) result = a * s . length ( ) ; else result = a * ( s . length ( ) - 1 ) ; return result ; }
def f_gold ( a , b ) : s = str ( b ) i = 0 while i < ( len ( s ) ) : if ( s [ i ] != '9' ) : break i += 1 result = 0 if ( i == len ( s ) ) : result = a * len ( s ) else : result = a * ( len ( s ) - 1 ) return result
using namespace std; int f_gold ( int a, int b ) { string s = to_string ( b ); int i; for ( i = 0; i < s . length ( ); i ++ ) { if ( s [ i ] != '9' ) break; } int result; if ( i == s . length ( ) ) result = a * s . length ( ); else result = a * ( s . length ( ) - 1 ); return result; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(31); param0.add(72); param0.add(23); param0.add(42); param0.add(13); param0.add(93); param0.add(33); param0.add(94); param0.add(60); param0.add(11); List<Integer> param1 = new ArrayList<>(); param1.add(91); param1.add(85); param1.add(49); param1.add(32); param1.add(7); param1.add(5); param1.add(32); param1.add(76); param1.add(60); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (31,91,), (72,85,), (23,49,), (42,32,), (13,7,), (93,5,), (33,32,), (94,76,), (60,60,), (11,26,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {31,72,23,42,13,93,33,94,60,11}; vector<int> param1 {91,85,49,32,7,5,32,76,60,26}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_REPEATED_CHARACTER_PRESENT_FIRST_STRING_1{ public static int f_gold ( String s ) { int p = - 1 , i , k ; int MAX_CHAR = 256 ; int hash [ ] = new int [ MAX_CHAR ] ; int pos [ ] = new int [ MAX_CHAR ] ; for ( i = 0 ; i < s . length ( ) ; i ++ ) { k = ( int ) s . charAt ( i ) ; if ( hash [ k ] == 0 ) { hash [ k ] ++ ; pos [ k ] = i ; } else if ( hash [ k ] == 1 ) hash [ k ] ++ ; } for ( i = 0 ; i < MAX_CHAR ; i ++ ) { if ( hash [ i ] == 2 ) { if ( p == - 1 ) p = pos [ i ] ; else if ( p > pos [ i ] ) p = pos [ i ] ; } } return p ; }
null
null
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("iwLT"); param0.add("225168787"); param0.add("00100111"); param0.add("ktdzbGbqsvQ"); param0.add("5574573212164"); param0.add("01000110101101"); param0.add("ftiv"); param0.add("48956"); param0.add("10100111001101"); param0.add("YvhEOhhz"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
null
WILDCARD_CHARACTER_MATCHING
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WILDCARD_CHARACTER_MATCHING{ static boolean f_gold ( String first , String second ) { if ( first . length ( ) == 0 && second . length ( ) == 0 ) return true ; if ( first . length ( ) > 1 && first . charAt ( 0 ) == '*' && second . length ( ) == 0 ) return false ; if ( ( first . length ( ) > 1 && first . charAt ( 0 ) == '?' ) || ( first . length ( ) != 0 && second . length ( ) != 0 && first . charAt ( 0 ) == second . charAt ( 0 ) ) ) return f_gold ( first . substring ( 1 ) , second . substring ( 1 ) ) ; if ( first . length ( ) > 0 && first . charAt ( 0 ) == '*' ) return f_gold ( first . substring ( 1 ) , second ) || f_gold ( first , second . substring ( 1 ) ) ; return false ; }
def f_gold ( first , second ) : if len ( first ) == 0 and len ( second ) == 0 : return True if len ( first ) > 1 and first [ 0 ] == '*' and len ( second ) == 0 : return False if ( len ( first ) > 1 and first [ 0 ] == '?' ) or ( len ( first ) != 0 and len ( second ) != 0 and first [ 0 ] == second [ 0 ] ) : return f_gold ( first [ 1 : ] , second [ 1 : ] ) ; if len ( first ) != 0 and first [ 0 ] == '*' : return f_gold ( first [ 1 : ] , second ) or f_gold ( first , second [ 1 : ] ) return False
null
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("g*ks"); param0.add("ge?ks*"); param0.add("g*k"); param0.add("*pqrs"); param0.add("abc*bcd"); param0.add("abc*c?d"); param0.add("*c*d"); param0.add("*?c*d"); param0.add("?*1"); param0.add("a*"); List<String> param1 = new ArrayList<>(); param1.add("geeks"); param1.add("geeksforgeeks"); param1.add("gee"); param1.add("pqrst"); param1.add("abcdhghgbcd"); param1.add("abcd"); param1.add("abcd"); param1.add("abcd"); param1.add("010111111001"); param1.add("CBzHMjUGCUJD"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('g*ks','geeks',), ('ge?ks*','geeksforgeeks',), ('g*k','gee',), ('*pqrs','pqrst',), ('abc*bcd','abcdhghgbcd',), ('abc*c?d','abcd',), ('*c*d','abcd',), ('*?c*d','abcd',), ('?*1','010111111001',), ('a*','CBzHMjUGCUJD',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
SMALLEST_ELEMENT_REPEATED_EXACTLY_K_TIMES_NOT_LIMITED_SMALL_RANGE
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SMALLEST_ELEMENT_REPEATED_EXACTLY_K_TIMES_NOT_LIMITED_SMALL_RANGE{ public static int f_gold ( int a [ ] , int n , int k ) { HashMap < Integer , Integer > m = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) if ( m . containsKey ( a [ i ] ) ) m . put ( a [ i ] , m . get ( a [ i ] ) + 1 ) ; else m . put ( a [ i ] , 1 ) ; int res = Integer . MAX_VALUE ; Set < Integer > s = m . keySet ( ) ; for ( int temp : s ) if ( m . get ( temp ) == k ) res = Math . min ( res , temp ) ; return ( res != Integer . MAX_VALUE ) ? res : - 1 ; }
null
using namespace std; int f_gold ( int a [ ], int n, int k ) { unordered_map < int, int > m; for ( int i = 0; i < n; i ++ ) m [ a [ i ] ] ++; int res = INT_MAX; for ( auto it = m . begin ( ); it != m . end ( ); ++ it ) if ( it -> second == k ) res = min ( res, it -> first ); return ( res != INT_MAX ) ? res : - 1; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,5,5,8,11,13,14,15,15,16,18,23,24,26,28,31,33,39,39,39,40,41,44,51,53,55,55,59,59,61,64,65,74,74,76,76,76,77,87,88,88,94,95,96}); param0.add(new int[]{-98,-64,-44,20,-46,96,-48,-54,-26,30,-42,94,58,-58,-54,50,6,-34,-44,-50,-66,-14,-96,74,4,-86,56,-46,-94,-24,-80,58,34,24}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{55,78,71,60,41,82,45,66,46,5,92,49,57,16,49,40,77,40,44,47,52,58,33,3,27,37,38,56,3,32,7,17,43,35,79,66,50,63,97,12,16}); param0.add(new int[]{-90,-86,-74,-68,-64,-56,-30,-24,-14,-2,0,2,8,16,18,20,24,30,32,36,42,54,62,62,62,62,76,78,90,92,94}); param0.add(new int[]{0,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,1,1}); param0.add(new int[]{4,5,5,5,10,13,17,17,20,20,22,25,28,36,40,42,49,51,57,59,65,66,66,68,72,74,78,81,87,88,94,95}); param0.add(new int[]{-12,-20,-78,-10,6,26,-94,-48,22,-2,12,-68,-90,-22,-94,-94,-10,-66,62,-20,74,-90,54,-52,90,50,60,10,56,-32,52,-12,-84,66,-82,34,24,-8,-60,-20,-94,80}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{2,57,53,3,63,29,12,99,21,26,3,35,96,84,48,61}); List<Integer> param1 = new ArrayList<>(); param1.add(27); param1.add(26); param1.add(26); param1.add(32); param1.add(22); param1.add(18); param1.add(28); param1.add(28); param1.add(29); param1.add(10); List<Integer> param2 = new ArrayList<>(); param2.add(2); param2.add(2); param2.add(1); param2.add(3); param2.add(2); param2.add(8); param2.add(7); param2.add(3); param2.add(2); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{1,5,5,8,11,13,14,15,15,16,18,23,24,26,28,31,33,39,39,39,40,41,44,51,53,55,55,59,59,61,64,65,74,74,76,76,76,77,87,88,88,94,95,96},{-98,-64,-44,20,-46,96,-48,-54,-26,30,-42,94,58,-58,-54,50,6,-34,-44,-50,-66,-14,-96,74,4,-86,56,-46,-94,-24,-80,58,34,24},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{55,78,71,60,41,82,45,66,46,5,92,49,57,16,49,40,77,40,44,47,52,58,33,3,27,37,38,56,3,32,7,17,43,35,79,66,50,63,97,12,16},{-90,-86,-74,-68,-64,-56,-30,-24,-14,-2,0,2,8,16,18,20,24,30,32,36,42,54,62,62,62,62,76,78,90,92,94},{0,1,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,1,1},{4,5,5,5,10,13,17,17,20,20,22,25,28,36,40,42,49,51,57,59,65,66,66,68,72,74,78,81,87,88,94,95},{-12,-20,-78,-10,6,26,-94,-48,22,-2,12,-68,-90,-22,-94,-94,-10,-66,62,-20,74,-90,54,-52,90,50,60,10,56,-32,52,-12,-84,66,-82,34,24,-8,-60,-20,-94,80},{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{2,57,53,3,63,29,12,99,21,26,3,35,96,84,48,61}}; vector<int> param1 {27,26,26,32,22,18,28,28,29,10}; vector<int> param2 {2,2,1,3,2,8,7,3,2,1}; 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_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DERANGEMENTS_PERMUTATION_SUCH_THAT_NO_ELEMENT_APPEARS_IN_ITS_ORIGINAL_POSITION_1{ static int f_gold ( int n ) { int der [ ] = new int [ n + 1 ] ; der [ 0 ] = 1 ; der [ 1 ] = 0 ; der [ 2 ] = 1 ; for ( int i = 3 ; i <= n ; ++ i ) der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ) ; return der [ n ] ; }
def f_gold ( n ) : der = [ 0 for i in range ( n + 1 ) ] der [ 0 ] = 1 der [ 1 ] = 0 der [ 2 ] = 1 for i in range ( 3 , n + 1 ) : der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ) return der [ n ]
using namespace std; int f_gold ( int n ) { int der [ n + 1 ]; der [ 0 ] = 1; der [ 1 ] = 0; der [ 2 ] = 1; for ( int i = 3; i <= n; ++ i ) der [ i ] = ( i - 1 ) * ( der [ i - 1 ] + der [ i - 2 ] ); return der [ n ]; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(22); param0.add(91); param0.add(33); param0.add(93); param0.add(90); param0.add(59); param0.add(88); param0.add(41); param0.add(70); param0.add(63); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (22,), (91,), (33,), (93,), (90,), (59,), (88,), (41,), (70,), (63,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {22,91,33,93,90,59,88,41,70,63}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY{ static int f_gold ( int arr [ ] , int n ) { int invcount = 0 ; for ( int i = 0 ; i < n - 2 ; i ++ ) { for ( int j = i + 1 ; j < n - 1 ; j ++ ) { if ( arr [ i ] > arr [ j ] ) { for ( int k = j + 1 ; k < n ; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++ ; } } } } return invcount ; }
null
using namespace std; int f_gold ( int arr [ ], int n ) { int invcount = 0; for ( int i = 0; i < n - 2; i ++ ) { for ( int j = i + 1; j < n - 1; j ++ ) { if ( arr [ i ] > arr [ j ] ) { for ( int k = j + 1; k < n; k ++ ) { if ( arr [ j ] > arr [ k ] ) invcount ++; } } } } return invcount; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{11,17,27,29,31,31,32,44,45,93}); param0.add(new int[]{-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86}); param0.add(new int[]{0,0,0,1,1,1,1,1,1}); param0.add(new int[]{78,82,51,92,88,95}); param0.add(new int[]{-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96}); param0.add(new int[]{1,0,0,0}); param0.add(new int[]{2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96}); param0.add(new int[]{-60,-42,20,52,-54,40,56}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56}); List<Integer> param1 = new ArrayList<>(); param1.add(5); param1.add(15); param1.add(6); param1.add(3); param1.add(47); param1.add(3); param1.add(39); param1.add(6); param1.add(37); param1.add(13); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{11,17,27,29,31,31,32,44,45,93},{-48,-10,-44,-94,50,-24,30,72,-6,56,94,-44,-96,-52,-2,68,-52,30,98,0,12,-98,-94,48,-96,-86},{0,0,0,1,1,1,1,1,1},{78,82,51,92,88,95},{-98,-96,-84,-72,-70,-62,-62,-58,-56,-54,-52,-52,-52,-50,-40,-40,-38,-36,-34,-26,-26,-22,-22,-20,-12,-8,-2,4,14,14,18,22,28,32,34,34,42,44,54,58,60,64,74,80,88,90,92,94,96},{1,0,0,0},{2,3,5,5,5,7,7,15,16,21,29,29,35,39,39,40,42,44,46,48,48,52,52,52,54,55,57,62,67,67,67,70,71,71,76,78,79,87,94,96},{-60,-42,20,52,-54,40,56},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{98,81,23,71,82,31,15,21,4,68,68,22,77,83,22,9,10,56}}; vector<int> param1 {5,15,6,3,47,3,39,6,37,13}; 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; }
BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BREAKING_NUMBER_FIRST_PART_INTEGRAL_DIVISION_SECOND_POWER_10{ static int f_gold ( String N ) { int len = N . length ( ) ; int l = ( len ) / 2 ; int count = 0 ; for ( int i = 1 ; i <= l ; i ++ ) { String s = N . substring ( 0 , i ) ; int l1 = s . length ( ) ; String t = N . substring ( i , l1 + i ) ; if ( s . charAt ( 0 ) == '0' || t . charAt ( 0 ) == '0' ) continue ; if ( s . compareTo ( t ) == 0 ) count ++ ; } return count ; }
def f_gold ( N ) : length = len ( N ) l = int ( ( length ) / 2 ) count = 0 for i in range ( l + 1 ) : s = N [ 0 : 0 + i ] l1 = len ( s ) t = N [ i : l1 + i ] try : if s [ 0 ] == '0' or t [ 0 ] == '0' : continue except : continue if s == t : count += 1 return count
using namespace std; int f_gold ( string N ) { int len = N . length ( ); int l = ( len ) / 2; int count = 0; for ( int i = 1; i <= l; i ++ ) { string s = N . substr ( 0, i ); int l1 = s . length ( ); string t = N . substr ( i, l1 ); if ( s [ 0 ] == '0' || t [ 0 ] == '0' ) continue; if ( s . compare ( t ) == 0 ) count ++; } return count; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("ZCoQhuM"); param0.add("2674377254"); param0.add("11"); param0.add("LbuGlvRyWAPBpo"); param0.add("26382426486138"); param0.add("111010111010"); param0.add("hUInqJXNdbfP"); param0.add("5191"); param0.add("1110101101"); param0.add("2202200"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('ZCoQhuM',), ('2674377254',), ('11',), ('LbuGlvRyWAPBpo',), ('26382426486138',), ('111010111010',), ('hUInqJXNdbfP',), ('5191',), ('1110101101',), ('2202200',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"ZCoQhuM","2674377254","11","LbuGlvRyWAPBpo","26382426486138","111010111010","hUInqJXNdbfP","5191","1110101101","2202200"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
DOUBLE_FACTORIAL_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DOUBLE_FACTORIAL_1{ static int f_gold ( int n ) { int res = 1 ; for ( int i = n ; i >= 0 ; i = i - 2 ) { if ( i == 0 || i == 1 ) return res ; else res *= i ; } return res ; }
def f_gold ( n ) : res = 1 ; for i in range ( n , - 1 , - 2 ) : if ( i == 0 or i == 1 ) : return res ; else : res *= i ;
using namespace std; unsigned int f_gold ( unsigned int n ) { int res = 1; for ( int i = n; i >= 0; i = i - 2 ) { if ( i == 0 || i == 1 ) return res; else res *= i; } }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(88); param0.add(24); param0.add(3); param0.add(22); param0.add(53); param0.add(2); param0.add(88); param0.add(30); param0.add(38); param0.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (88,), (24,), (3,), (22,), (53,), (2,), (88,), (30,), (38,), (2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {88,24,3,22,53,2,88,30,38,2}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_NUMBER_WAYS_REACH_GIVEN_SCORE_GAME{ static int f_gold ( int n ) { int table [ ] = new int [ n + 1 ] , i ; Arrays . fill ( table , 0 ) ; table [ 0 ] = 1 ; for ( i = 3 ; i <= n ; i ++ ) table [ i ] += table [ i - 3 ] ; for ( i = 5 ; i <= n ; i ++ ) table [ i ] += table [ i - 5 ] ; for ( i = 10 ; i <= n ; i ++ ) table [ i ] += table [ i - 10 ] ; return table [ n ] ; }
def f_gold ( n ) : table = [ 0 for i in range ( n + 1 ) ] table [ 0 ] = 1 for i in range ( 3 , n + 1 ) : table [ i ] += table [ i - 3 ] for i in range ( 5 , n + 1 ) : table [ i ] += table [ i - 5 ] for i in range ( 10 , n + 1 ) : table [ i ] += table [ i - 10 ] return table [ n ]
using namespace std; int f_gold ( int n ) { int table [ n + 1 ], i; for ( int j = 0; j < n + 1; j ++ ) table [ j ] = 0; table [ 0 ] = 1; for ( i = 3; i <= n; i ++ ) table [ i ] += table [ i - 3 ]; for ( i = 5; i <= n; i ++ ) table [ i ] += table [ i - 5 ]; for ( i = 10; i <= n; i ++ ) table [ i ] += table [ i - 10 ]; return table [ n ]; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(83); param0.add(29); param0.add(17); param0.add(12); param0.add(93); param0.add(55); param0.add(97); param0.add(75); param0.add(22); param0.add(52); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (83,), (29,), (17,), (12,), (93,), (55,), (97,), (75,), (22,), (52,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {83,29,17,12,93,55,97,75,22,52}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_FREQUENCY_K_MATRIX_SIZE_N_MATRIXI_J_IJ{ public static int f_gold ( int n , int k ) { if ( n + 1 >= k ) return ( k - 1 ) ; else return ( 2 * n + 1 - k ) ; }
def f_gold(n, k): if (n + 1 >= k): return (k - 1) else: return (2 * n + 1 - k)
using namespace std; int f_gold ( int n, int k ) { if ( n + 1 >= k ) return ( k - 1 ); else return ( 2 * n + 1 - k ); }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(90); param0.add(86); param0.add(92); param0.add(72); param0.add(25); param0.add(11); param0.add(94); param0.add(91); param0.add(66); param0.add(34); List<Integer> param1 = new ArrayList<>(); param1.add(74); param1.add(36); param1.add(38); param1.add(71); param1.add(57); param1.add(53); param1.add(80); param1.add(75); param1.add(58); param1.add(88); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (90, 74,), (86, 36,), (92, 38,), (72, 71,), (25, 57,), (11, 53,), (94, 80,), (91, 75,), (66, 58,), (34, 88,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {90,86,92,72,25,11,94,91,66,34}; vector<int> param1 {74,36,38,71,57,53,80,75,58,88}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_VALUE_OF_Y_MOD_2_RAISED_TO_POWER_X{ static long f_gold ( long y , long x ) { if ( ( Math . log ( y ) / Math . log ( 2 ) ) < x ) return y ; if ( x > 63 ) return y ; return ( y % ( 1 << ( int ) x ) ) ; }
def f_gold ( y , x ) : return ( y % pow ( 2 , x ) )
using namespace std; long long int f_gold ( long long int y, long long int x ) { if ( log2 ( y ) < x ) return y; if ( x > 63 ) return y; return ( y % ( 1 << x ) ); }
public static void main(String args[]) { int n_success = 0; List<Long> param0 = new ArrayList<>(); param0.add(57L); param0.add(80L); param0.add(84L); param0.add(35L); param0.add(3L); param0.add(42L); param0.add(7L); param0.add(99L); param0.add(13L); param0.add(44L); List<Long> param1 = new ArrayList<>(); param1.add(76L); param1.add(46L); param1.add(96L); param1.add(16L); param1.add(84L); param1.add(79L); param1.add(2L); param1.add(83L); param1.add(61L); param1.add(8L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (57,76,), (80,46,), (84,96,), (35,16,), (3,84,), (42,79,), (7,2,), (99,83,), (13,61,), (44,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<long> param0 {57,80,84,35,3,42,7,99,13,44}; vector<long> param1 {76,46,96,16,84,79,2,83,61,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WAYS_TO_WRITE_N_AS_SUM_OF_TWO_OR_MORE_POSITIVE_INTEGERS{ static int f_gold ( int n ) { int table [ ] = new int [ n + 1 ] ; Arrays . fill ( table , 0 ) ; table [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) for ( int j = i ; j <= n ; j ++ ) table [ j ] += table [ j - i ] ; return table [ n ] ; }
null
using namespace std; int f_gold ( int n ) { int table [ n + 1 ]; memset ( table, 0, sizeof ( table ) ); table [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) for ( int j = i; j <= n; j ++ ) table [ j ] += table [ j - i ]; return table [ n ]; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(66); param0.add(90); param0.add(8); param0.add(77); param0.add(44); param0.add(20); param0.add(34); param0.add(22); param0.add(50); param0.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<int> param0 {66,90,8,77,44,20,34,22,50,10}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_REMOVAL_FROM_ARRAY_WHEN_REMOVAL_TIME_WAITING_TIME{ static int f_gold ( int arr [ ] , int n ) { int count = 0 ; int cummulative_sum = 0 ; Arrays . sort ( arr ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] >= cummulative_sum ) { count ++ ; cummulative_sum += arr [ i ] ; } } return count ; }
def f_gold ( arr , n ) : count = 0 cummulative_sum = 0 arr.sort ( ) for i in range ( n ) : if arr [ i ] >= cummulative_sum : count += 1 cummulative_sum += arr [ i ] return count
using namespace std; int f_gold ( int arr [ ], int n ) { int count = 0; int cummulative_sum = 0; sort ( arr, arr + n ); for ( int i = 0; i < n; i ++ ) { if ( arr [ i ] >= cummulative_sum ) { count ++; cummulative_sum += arr [ i ]; } } return count; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{7,33,34,42,42,45,73}); param0.add(new int[]{32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14}); param0.add(new int[]{0,0,0,0,1}); param0.add(new int[]{11,85,89,71,82,44}); param0.add(new int[]{-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98}); param0.add(new int[]{0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1}); param0.add(new int[]{8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97}); param0.add(new int[]{96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,67}); List<Integer> param1 = new ArrayList<>(); param1.add(5); param1.add(16); param1.add(2); param1.add(3); param1.add(21); param1.add(16); param1.add(31); param1.add(20); param1.add(13); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([7, 33, 34, 42, 42, 45, 73],5,), ([32, -10, -64, -20, 92, -66, 6, 44, -62, -98, 4, -48, 44, 42, 12, -90, 52, 86, -30, -80, 64, 94, 14],16,), ([0, 0, 0, 0, 1],2,), ([11, 85, 89, 71, 82, 44],3,), ([-96, -92, -78, -72, -68, -58, -52, -50, -50, -48, -42, -32, -20, -18, -4, 0, 0, 2, 18, 18, 20, 24, 32, 34, 36, 38, 38, 60, 66, 68, 70, 72, 72, 74, 76, 96, 98],21,), ([0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1],16,), ([8, 9, 10, 11, 12, 15, 17, 19, 20, 21, 24, 30, 33, 35, 36, 39, 41, 41, 42, 54, 62, 63, 68, 70, 71, 72, 77, 85, 86, 86, 94, 95, 97, 97],31,), ([96, 22, -60, 4, -94, -16, 46, 10, 76, -90, 4, 70, -72, 60, 28, -24, -66, 92, -70, 72, 36],20,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],13,), ([90, 63, 16, 40, 28, 97, 20, 63, 42, 31, 57, 84, 10, 12, 59, 69, 47, 7, 53, 67],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{7,33,34,42,42,45,73},{32,-10,-64,-20,92,-66,6,44,-62,-98,4,-48,44,42,12,-90,52,86,-30,-80,64,94,14},{0,0,0,0,1},{11,85,89,71,82,44},{-96,-92,-78,-72,-68,-58,-52,-50,-50,-48,-42,-32,-20,-18,-4,0,0,2,18,18,20,24,32,34,36,38,38,60,66,68,70,72,72,74,76,96,98},{0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,0,1},{8,9,10,11,12,15,17,19,20,21,24,30,33,35,36,39,41,41,42,54,62,63,68,70,71,72,77,85,86,86,94,95,97,97},{96,22,-60,4,-94,-16,46,10,76,-90,4,70,-72,60,28,-24,-66,92,-70,72,36},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},{90,63,16,40,28,97,20,63,42,31,57,84,10,12,59,69,47,7,53,67}}; vector<int> param1 {5,16,2,3,21,16,31,20,13,10}; 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; }
MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME{ static boolean f_gold ( String s ) { int l = s . length ( ) ; for ( int i = 0 , j = l - 1 ; i <= j ; i ++ , j -- ) { if ( s . charAt ( i ) != s . charAt ( j ) ) { return false ; } } return true ; }
def f_gold ( s ) : l = len ( s ) i = 0 j = l - 1 while i <= j : if ( s [ i ] != s [ j ] ) : return False i += 1 j -= 1 return True
using namespace std; bool f_gold ( string s ) { int l = s . length ( ); int j; for ( int i = 0, j = l - 1; i <= j; i ++, j -- ) { if ( s [ i ] != s [ j ] ) return false; } return true; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("aadaa"); param0.add("2674377254"); param0.add("11"); param0.add("0011000 "); param0.add("26382426486138"); param0.add("111010111010"); param0.add("abccba"); param0.add("5191"); param0.add("1110101101"); param0.add("abcdecbe"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('aadaa',), ('2674377254',), ('11',), ('0011000 ',), ('26382426486138',), ('111010111010',), ('abccba',), ('5191',), ('1110101101',), ('abcdecbe',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"aadaa","2674377254","11","0011000","26382426486138","111010111010","abccba","5191","1110101101","abcdecbe"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
CHECK_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_STRING_CAN_OBTAINED_ROTATING_ANOTHER_STRING_2_PLACES{ static boolean f_gold ( String str1 , String str2 ) { if ( str1 . length ( ) != str2 . length ( ) ) return false ; String clock_rot = "" ; String anticlock_rot = "" ; int len = str2 . length ( ) ; anticlock_rot = anticlock_rot + str2 . substring ( len - 2 , len ) + str2 . substring ( 0 , len - 2 ) ; clock_rot = clock_rot + str2 . substring ( 2 ) + str2 . substring ( 0 , 2 ) ; return ( str1 . equals ( clock_rot ) || str1 . equals ( anticlock_rot ) ) ; }
def f_gold ( str1 , str2 ) : if ( len ( str1 ) != len ( str2 ) ) : return False clock_rot = "" anticlock_rot = "" l = len ( str2 ) anticlock_rot = ( anticlock_rot + str2 [ l - 2 : ] + str2 [ 0 : l - 2 ] ) clock_rot = clock_rot + str2 [ 2 : ] + str2 [ 0 : 2 ] return ( str1 == clock_rot or str1 == anticlock_rot )
using namespace std; bool f_gold ( string str1, string str2 ) { if ( str1 . length ( ) != str2 . length ( ) ) return false; string clock_rot = ""; string anticlock_rot = ""; int len = str2 . length ( ); anticlock_rot = anticlock_rot + str2 . substr ( len - 2, 2 ) + str2 . substr ( 0, len - 2 ); clock_rot = clock_rot + str2 . substr ( 2 ) + str2 . substr ( 0, 2 ); return ( str1 . compare ( clock_rot ) == 0 || str1 . compare ( anticlock_rot ) == 0 ); }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("amazon"); param0.add("onamaz"); param0.add("amazon"); param0.add("ab"); param0.add("737009"); param0.add("000110"); param0.add("l"); param0.add("4420318628"); param0.add("11011111000000"); param0.add(" pvFHANc"); List<String> param1 = new ArrayList<>(); param1.add("azonam"); param1.add("amazon"); param1.add("azoman"); param1.add("ab"); param1.add("239119"); param1.add("01111"); param1.add("YVo hqvnGxow"); param1.add("52856"); param1.add("10"); param1.add("xBIDFbiGb"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ("amazon","azonam",), ("onamaz","amazon",), ("amazon","azoman",), ("ab","ab",), ('737009','239119',), ('000110','01111',), ('l','YVo hqvnGxow',), ('4420318628','52856',), ('11011111000000','10',), (' pvFHANc','xBIDFbiGb',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"amazon","onamaz","amazon","ab","737009","000110","l","4420318628","11011111000000"," pvFHANc"}; vector<string> param1 {"azonam","amazon","azoman","ab","239119","01111","YVo hqvnGxow","52856","10","xBIDFbiGb"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
REQUIRED_MINIMUM_DIGITS_REMOVE_NUMBER_MAKE_PERFECT_SQUARE
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class REQUIRED_MINIMUM_DIGITS_REMOVE_NUMBER_MAKE_PERFECT_SQUARE{ static int f_gold ( String s ) { int n = s . length ( ) ; int ans = - 1 ; String num = "" ; for ( int i = 1 ; i < ( 1 << n ) ; i ++ ) { String str = "" ; for ( int j = 0 ; j < n ; j ++ ) { if ( ( ( i >> j ) & 1 ) == 1 ) { str += s . charAt ( j ) ; } } if ( str . charAt ( 0 ) != '0' ) { int temp = 0 ; for ( int j = 0 ; j < str . length ( ) ; j ++ ) temp = temp * 10 + ( int ) ( str . charAt ( j ) - '0' ) ; int k = ( int ) Math . sqrt ( temp ) ; if ( k * k == temp ) { if ( ans < ( int ) str . length ( ) ) { ans = ( int ) str . length ( ) ; num = str ; } } } } if ( ans == - 1 ) return ans ; else { System . out . print ( num + " " ) ; return n - ans ; } }
null
using namespace std; int f_gold ( string s ) { int n = s . size ( ); int ans = - 1; string num; for ( int i = 1; i < ( 1 << n ); i ++ ) { string str = ""; for ( int j = 0; j < n; j ++ ) { if ( ( i >> j ) & 1 ) { str += s [ j ]; } } if ( str [ 0 ] != '0' ) { int temp = 0; for ( int j = 0; j < str . size ( ); j ++ ) temp = temp * 10 + ( int ) ( str [ j ] - '0' ); int k = sqrt ( temp ); if ( k * k == temp ) { if ( ans < ( int ) str . size ( ) ) { ans = ( int ) str . size ( ); num = str; } } } } if ( ans == - 1 ) return ans; else { cout << num << " "; return n - ans; } }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("h"); param0.add("1391212"); param0.add("010"); param0.add("ksRFLRVL"); param0.add("5809836998"); param0.add("1111000"); param0.add("hJoDzrrBaF"); param0.add("6076"); param0.add("001010010"); param0.add("lU DBBVF"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<string> param0 {"h","1391212","010","ksRFLRVL","5809836998","1111000","hJoDzrrBaF","6076","001010010","lU DBBVF"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MINIMUM_ROTATIONS_REQUIRED_GET_STRING
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_ROTATIONS_REQUIRED_GET_STRING{ static int f_gold ( String str ) { String tmp = str + str ; int n = str . length ( ) ; for ( int i = 1 ; i <= n ; i ++ ) { String substring = tmp . substring ( i , str . length ( ) ) ; if ( str == substring ) return i ; } return n ; }
def f_gold ( str ) : tmp = str + str n = len ( str ) for i in range ( 1 , n + 1 ) : substring = tmp [ i : n ] if ( str == substring ) : return i return n
using namespace std; int f_gold ( string str ) { string tmp = str + str; int n = str . length ( ); for ( int i = 1; i <= n; i ++ ) { string substring = tmp . substr ( i, str . size ( ) ); if ( str == substring ) return i; } return n; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("vdevdNdQSopPtj"); param0.add("5"); param0.add("100010101011"); param0.add("tlDOvJHAyMllu"); param0.add("06"); param0.add("101"); param0.add("DYgtU"); param0.add("4"); param0.add("00"); param0.add("Dt"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('vdevdNdQSopPtj',), ('5',), ('100010101011',), ('tlDOvJHAyMllu',), ('06',), ('101',), ('DYgtU',), ('4',), ('00',), ('Dt',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"vdevdNdQSopPtj","5","100010101011","tlDOvJHAyMllu","06","101","DYgtU","4","00","Dt"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_1{ static int f_gold ( int arr [ ] , int n ) { int cum_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) cum_sum += arr [ i ] ; int curr_val = 0 ; for ( int i = 0 ; i < n ; i ++ ) curr_val += i * arr [ i ] ; int res = curr_val ; for ( int i = 1 ; i < n ; i ++ ) { int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ) ; curr_val = next_val ; res = Math . max ( res , next_val ) ; } return res ; }
def f_gold ( arr , n ) : cum_sum = 0 for i in range ( 0 , n ) : cum_sum += arr [ i ] curr_val = 0 for i in range ( 0 , n ) : curr_val += i * arr [ i ] res = curr_val for i in range ( 1 , n ) : next_val = ( curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ) ) curr_val = next_val res = max ( res , next_val ) return res
using namespace std; int f_gold ( int arr [ ], int n ) { int cum_sum = 0; for ( int i = 0; i < n; i ++ ) cum_sum += arr [ i ]; int curr_val = 0; for ( int i = 0; i < n; i ++ ) curr_val += i * arr [ i ]; int res = curr_val; for ( int i = 1; i < n; i ++ ) { int next_val = curr_val - ( cum_sum - arr [ i - 1 ] ) + arr [ i - 1 ] * ( n - 1 ); curr_val = next_val; res = max ( res, next_val ); } return res; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98}); param0.add(new int[]{-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34}); param0.add(new int[]{0,0,0,0,0,1,1,1,1,1,1}); param0.add(new int[]{37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24}); param0.add(new int[]{-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96}); param0.add(new int[]{1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1}); param0.add(new int[]{9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97}); param0.add(new int[]{52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,20}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9}); List<Integer> param1 = new ArrayList<>(); param1.add(13); param1.add(27); param1.add(10); param1.add(39); param1.add(11); param1.add(15); param1.add(22); param1.add(45); param1.add(33); param1.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([6, 6, 13, 14, 16, 20, 24, 24, 24, 27, 28, 36, 49, 51, 55, 56, 62, 69, 74, 74, 76, 85, 86, 90, 92, 98],13,), ([-42, 96, 68, 64, 14, -74, 76, 42, 34, -92, -20, 28, -80, -34, -22, 96, -46, 96, 10, -82, 82, 50, -24, 48, 56, 72, -40, -86, 84, 66, -62, 50, -76, 34],27,), ([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],10,), ([37, 88, 70, 86, 24, 62, 34, 44, 37, 42, 46, 34, 23, 32, 55, 2, 5, 70, 30, 46, 40, 65, 91, 4, 7, 74, 46, 12, 30, 22, 1, 91, 89, 88, 97, 6, 6, 11, 33, 14, 68, 24],39,), ([-92, -90, -70, -70, -10, 2, 10, 12, 14, 40, 44, 46, 64, 68, 68, 96],11,), ([1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1],15,), ([9, 15, 15, 17, 19, 20, 21, 23, 25, 25, 25, 32, 32, 33, 45, 51, 54, 59, 68, 71, 71, 71, 72, 75, 78, 80, 82, 82, 88, 89, 92, 93, 94, 97],22,), ([52, -78, -80, 32, -56, -98, -36, 86, 34, -36, 42, 46, 50, 0, 34, -46, -2, -18, -96, 12, -42, 62, 32, 78, 66, -8, 50, 60, 10, -18, 66, 80, -24, -98, 8, 48, 34, 44, -80, -34, 72, 0, -60, 52, 40, 20],45,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],33,), ([45, 35, 25, 7, 24, 73, 25, 86, 48, 70, 47, 91, 96, 15, 39, 9],8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{6,6,13,14,16,20,24,24,24,27,28,36,49,51,55,56,62,69,74,74,76,85,86,90,92,98},{-42,96,68,64,14,-74,76,42,34,-92,-20,28,-80,-34,-22,96,-46,96,10,-82,82,50,-24,48,56,72,-40,-86,84,66,-62,50,-76,34},{0,0,0,0,0,1,1,1,1,1,1},{37,88,70,86,24,62,34,44,37,42,46,34,23,32,55,2,5,70,30,46,40,65,91,4,7,74,46,12,30,22,1,91,89,88,97,6,6,11,33,14,68,24},{-92,-90,-70,-70,-10,2,10,12,14,40,44,46,64,68,68,96},{1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,1},{9,15,15,17,19,20,21,23,25,25,25,32,32,33,45,51,54,59,68,71,71,71,72,75,78,80,82,82,88,89,92,93,94,97},{52,-78,-80,32,-56,-98,-36,86,34,-36,42,46,50,0,34,-46,-2,-18,-96,12,-42,62,32,78,66,-8,50,60,10,-18,66,80,-24,-98,8,48,34,44,-80,-34,72,0,-60,52,40,20},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{45,35,25,7,24,73,25,86,48,70,47,91,96,15,39,9}}; vector<int> param1 {13,27,10,39,11,15,22,45,33,8}; 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; }
SQUARE_ROOT_OF_A_PERFECT_SQUARE_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SQUARE_ROOT_OF_A_PERFECT_SQUARE_1{ static long f_gold ( int n ) { int x = n ; int y = 1 ; while ( x > y ) { x = ( x + y ) / 2 ; y = n / x ; } return ( long ) x ; }
null
null
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(58); param0.add(55); param0.add(51); param0.add(42); param0.add(2); param0.add(30); param0.add(77); param0.add(82); param0.add(31); param0.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
null
MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS{ static int f_gold ( int arr [ ] , int N , int K ) { Arrays . sort ( arr ) ; int res = 2147483647 ; for ( int i = 0 ; i <= ( N - K ) ; i ++ ) { int curSeqDiff = arr [ i + K - 1 ] - arr [ i ] ; res = Math . min ( res , curSeqDiff ) ; } return res ; }
def f_gold ( arr , N , K ) : arr.sort ( ) res = 2147483647 for i in range ( ( N - K ) + 1 ) : curSeqDiff = arr [ i + K - 1 ] - arr [ i ] res = min ( res , curSeqDiff ) return res
using namespace std; int f_gold ( int arr [ ], int N, int K ) { sort ( arr, arr + N ); int res = INT_MAX; for ( int i = 0; i <= ( N - K ); i ++ ) { int curSeqDiff = arr [ i + K - 1 ] - arr [ i ]; res = min ( res, curSeqDiff ); } return res; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,1,4,18,21,35,37,39,76,81,86,92,96}); param0.add(new int[]{-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34}); param0.add(new int[]{-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92}); param0.add(new int[]{0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1}); param0.add(new int[]{6,7,9,27,30,42,54,55,57,57,59,76,84,84,84}); param0.add(new int[]{88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12}); param0.add(new int[]{0,1}); param0.add(new int[]{89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,10}); List<Integer> param1 = new ArrayList<>(); param1.add(7); param1.add(9); param1.add(16); param1.add(17); param1.add(21); param1.add(21); param1.add(13); param1.add(31); param1.add(1); param1.add(22); List<Integer> param2 = new ArrayList<>(); param2.add(6); param2.add(12); param2.add(26); param2.add(20); param2.add(12); param2.add(22); param2.add(14); param2.add(26); param2.add(1); param2.add(14); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([1, 1, 4, 18, 21, 35, 37, 39, 76, 81, 86, 92, 96],7,6,), ([-8, -6, 62, 52, -86, 2, -94, 0, -48, -38, 24, -48, 34],9,12,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],16,26,), ([23, 36, 43, 50, 74, 81, 94, 13, 30, 57, 30, 71, 10, 99, 66, 94, 83, 39, 37, 3, 89, 34],17,20,), ([-96, -94, -92, -84, -80, -72, -24, -22, -18, -14, 6, 8, 26, 28, 30, 36, 50, 58, 80, 84, 92, 92],21,12,), ([0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1],21,22,), ([6, 7, 9, 27, 30, 42, 54, 55, 57, 57, 59, 76, 84, 84, 84],13,14,), ([88, 44, -96, -72, -80, 0, -64, -64, -68, 4, 38, 4, -38, 68, -54, 92, -16, 62, 24, 54, 0, 54, 62, -70, 80, -12, 84, -16, -10, 88, -30, -56, 48, 50, -24, 94, 40, 28, -86, -12],31,26,), ([0, 1],1,1,), ([89, 18, 7, 54, 67, 93, 10, 61, 59, 59, 69, 63, 98, 8, 78, 55, 6, 1, 56, 97, 75, 88, 10],22,14,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{1,1,4,18,21,35,37,39,76,81,86,92,96},{-8,-6,62,52,-86,2,-94,0,-48,-38,24,-48,34},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},{23,36,43,50,74,81,94,13,30,57,30,71,10,99,66,94,83,39,37,3,89,34},{-96,-94,-92,-84,-80,-72,-24,-22,-18,-14,6,8,26,28,30,36,50,58,80,84,92,92},{0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,1},{6,7,9,27,30,42,54,55,57,57,59,76,84,84,84},{88,44,-96,-72,-80,0,-64,-64,-68,4,38,4,-38,68,-54,92,-16,62,24,54,0,54,62,-70,80,-12,84,-16,-10,88,-30,-56,48,50,-24,94,40,28,-86,-12},{0,1},{89,18,7,54,67,93,10,61,59,59,69,63,98,8,78,55,6,1,56,97,75,88,10}}; vector<int> param1 {7,9,16,17,21,21,13,31,1,22}; vector<int> param2 {6,12,26,20,12,22,14,26,1,14}; 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; }
SORT_ARRAY_APPLYING_GIVEN_EQUATION
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class SORT_ARRAY_APPLYING_GIVEN_EQUATION{ static void f_gold ( int arr [ ] , int n , int A , int B , int C ) { for ( int i = 0 ; i < n ; i ++ ) arr [ i ] = A * arr [ i ] * arr [ i ] + B * arr [ i ] + C ; int index = - 1 ; int maximum = - 999999 ; for ( int i = 0 ; i < n ; i ++ ) { if ( maximum < arr [ i ] ) { index = i ; maximum = arr [ i ] ; } } int i = 0 , j = n - 1 ; int [ ] new_arr = new int [ n ] ; int k = 0 ; while ( i < index && j > index ) { if ( arr [ i ] < arr [ j ] ) new_arr [ k ++ ] = arr [ i ++ ] ; else new_arr [ k ++ ] = arr [ j -- ] ; } while ( i < index ) new_arr [ k ++ ] = arr [ i ++ ] ; while ( j > index ) new_arr [ k ++ ] = arr [ j -- ] ; new_arr [ n - 1 ] = maximum ; for ( int p = 0 ; p < n ; p ++ ) arr [ p ] = new_arr [ p ] ; }
import sys def f_gold(arr, n, A, B, C): for i in range(n): arr[i] = (A * arr[i] * arr[i] + B * arr[i] + C) index = - (sys.maxsize - 1) maximum = - (sys.maxsize - 1) for i in range(n): if maximum < arr[i]: index = i maximum = arr[i] i = 0 j = n - 1 new_arr = [0] * n k = 0 while i < index and j > index: if arr[i] < arr[j]: new_arr[k] = arr[i] k += 1 i += 1 else: new_arr[k] = arr[j] k += 1 j -= 1 while i < index: new_arr[k] = arr[i] k += 1 i += 1 while j > index: new_arr[k] = arr[j] k += 1 j -= 1 new_arr[n - 1] = maximum for i in range(n): arr[i] = new_arr[i]
using namespace std; void f_gold ( int arr [ ], int n, int A, int B, int C ) { for ( int i = 0; i < n; i ++ ) arr [ i ] = A * arr [ i ] * arr [ i ] + B * arr [ i ] + C; int index, maximum = INT_MIN; for ( int i = 0; i < n; i ++ ) { if ( maximum < arr [ i ] ) { index = i; maximum = arr [ i ]; } } int i = 0, j = n - 1; int new_arr [ n ], k = 0; while ( i < index && j > index ) { if ( arr [ i ] < arr [ j ] ) new_arr [ k ++ ] = arr [ i ++ ]; else new_arr [ k ++ ] = arr [ j -- ]; } while ( i < index ) new_arr [ k ++ ] = arr [ i ++ ]; while ( j > index ) new_arr [ k ++ ] = arr [ j -- ]; new_arr [ n - 1 ] = maximum; for ( int i = 0; i < n; i ++ ) arr [ i ] = new_arr [ i ]; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{9,30,49,65,78,85,85,92}); param0.add(new int[]{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18}); param0.add(new int[]{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88}); param0.add(new int[]{0,0,0,1,1,0,1,1,1,1}); param0.add(new int[]{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95}); param0.add(new int[]{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}); List<Integer> param1 = new ArrayList<>(); param1.add(4); param1.add(18); param1.add(25); param1.add(33); param1.add(8); param1.add(7); param1.add(22); param1.add(20); param1.add(23); param1.add(28); List<Integer> param2 = new ArrayList<>(); param2.add(4); param2.add(20); param2.add(26); param2.add(42); param2.add(12); param2.add(8); param2.add(33); param2.add(16); param2.add(21); param2.add(21); List<Integer> param3 = new ArrayList<>(); param3.add(5); param3.add(20); param3.add(15); param3.add(35); param3.add(8); param3.add(6); param3.add(19); param3.add(19); param3.add(19); param3.add(23); List<Integer> param4 = new ArrayList<>(); param4.add(4); param4.add(23); param4.add(18); param4.add(41); param4.add(8); param4.add(7); param4.add(25); param4.add(16); param4.add(23); param4.add(23); List<int [ ]> filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{9,30,49,65,78,85,85,92}); filled_function_param0.add(new int[]{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18}); filled_function_param0.add(new int[]{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88}); filled_function_param0.add(new int[]{0,0,0,1,1,0,1,1,1,1}); filled_function_param0.add(new int[]{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95}); filled_function_param0.add(new int[]{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}); List<Integer> filled_function_param1 = new ArrayList<>(); filled_function_param1.add(4); filled_function_param1.add(18); filled_function_param1.add(25); filled_function_param1.add(33); filled_function_param1.add(8); filled_function_param1.add(7); filled_function_param1.add(22); filled_function_param1.add(20); filled_function_param1.add(23); filled_function_param1.add(28); List<Integer> filled_function_param2 = new ArrayList<>(); filled_function_param2.add(4); filled_function_param2.add(20); filled_function_param2.add(26); filled_function_param2.add(42); filled_function_param2.add(12); filled_function_param2.add(8); filled_function_param2.add(33); filled_function_param2.add(16); filled_function_param2.add(21); filled_function_param2.add(21); List<Integer> filled_function_param3 = new ArrayList<>(); filled_function_param3.add(5); filled_function_param3.add(20); filled_function_param3.add(15); filled_function_param3.add(35); filled_function_param3.add(8); filled_function_param3.add(6); filled_function_param3.add(19); filled_function_param3.add(19); filled_function_param3.add(19); filled_function_param3.add(23); List<Integer> filled_function_param4 = new ArrayList<>(); filled_function_param4.add(4); filled_function_param4.add(23); filled_function_param4.add(18); filled_function_param4.add(41); filled_function_param4.add(8); filled_function_param4.add(7); filled_function_param4.add(25); filled_function_param4.add(16); filled_function_param4.add(23); filled_function_param4.add(23); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i),filled_function_param3.get(i),filled_function_param4.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i) && param3.get(i) == filled_function_param3.get(i) && param4.get(i) == filled_function_param4.get(i)) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([9, 30, 49, 65, 78, 85, 85, 92], 4, 4, 5, 4,), ([-48, 89, -60, 66, 71, -37, 47, -50, 61, 41, -22, -3, 90, -57, 77, -64, 22, 8, -90, -5, -94, -43, 29, -29, 86, -79, -8, 27, -20, -44, 16], 18, 20, 20, 23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 25, 26, 15, 18,), ([87, 70, 77, 87, 73, 81, 66, 19, 83, 7, 63, 42, 42, 59, 20, 73, 17, 27, 47, 2, 63, 62, 19, 17, 69, 39, 82, 71, 81, 39, 36, 40, 45, 4, 25, 69, 30, 76, 68, 88, 29, 73, 68, 51, 24, 14, 69, 18], 33, 42, 35, 41,), ([-91, -85, -77, -73, -70, -68, -24, -21, -12, - 1, 9, 29, 48, 52, 56, 63, 88], 8, 12, 8, 8,), ([0, 0, 0, 1, 1, 0, 1, 1, 1, 1], 7, 8, 6, 7,), ([4, 5, 9, 14, 18, 20, 22, 23, 25, 28, 30, 31, 34, 35, 36, 38, 38, 39, 44, 48, 49, 51, 54, 55, 59, 64, 66, 71, 72, 72, 73, 76, 78, 82, 82, 84, 92, 93, 95], 22, 33, 19, 25,), ([40, 6, 33, 8, 78, -58, 2, 24, 40, 3, 46, 94, -26, 8, 22, -83, 96, -29, - 38, -59, 19, 62, 98, -55, -42, 79, 26, 62, -56, -85, -22], 20, 16, 19, 16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 23, 21, 19, 23,), ([3, 68, 40, 48, 54, 35, 95, 56, 89, 40, 77, 68, 46, 78, 13, 27, 6, 17, 36, 99, 81, 2, 77, 52, 66, 52, 92, 43, 90, 22, 55, 67, 99, 60, 58], 28, 21, 23, 23,) ] filled_function_param = [ ([9, 30, 49, 65, 78, 85, 85, 92], 4, 4, 5, 4,), ([-48, 89, -60, 66, 71, -37, 47, -50, 61, 41, -22, -3, 90, -57, 77, -64, 22, 8, -90, -5, -94, -43, 29, -29, 86, -79, -8, 27, -20, -44, 16], 18, 20, 20, 23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 25, 26, 15, 18,), ([87, 70, 77, 87, 73, 81, 66, 19, 83, 7, 63, 42, 42, 59, 20, 73, 17, 27, 47, 2, 63, 62, 19, 17, 69, 39, 82, 71, 81, 39, 36, 40, 45, 4, 25, 69, 30, 76, 68, 88, 29, 73, 68, 51, 24, 14, 69, 18], 33, 42, 35, 41,), ([-91, -85, -77, -73, -70, -68, -24, -21, -12, - 1, 9, 29, 48, 52, 56, 63, 88], 8, 12, 8, 8,), ([0, 0, 0, 1, 1, 0, 1, 1, 1, 1], 7, 8, 6, 7,), ([4, 5, 9, 14, 18, 20, 22, 23, 25, 28, 30, 31, 34, 35, 36, 38, 38, 39, 44, 48, 49, 51, 54, 55, 59, 64, 66, 71, 72, 72, 73, 76, 78, 82, 82, 84, 92, 93, 95], 22, 33, 19, 25,), ([40, 6, 33, 8, 78, -58, 2, 24, 40, 3, 46, 94, -26, 8, 22, -83, 96, -29, - 38, -59, 19, 62, 98, -55, -42, 79, 26, 62, -56, -85, -22], 20, 16, 19, 16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 23, 21, 19, 23,), ([3, 68, 40, 48, 54, 35, 95, 56, 89, 40, 77, 68, 46, 78, 13, 27, 6, 17, 36, 99, 81, 2, 77, 52, 66, 52, 92, 43, 90, 22, 55, 67, 99, 60, 58], 28, 21, 23, 23,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{9,30,49,65,78,85,85,92},{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18},{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88},{0,0,0,1,1,0,1,1,1,1},{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95},{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}}; vector<int> param1 {4,18,25,33,8,7,22,20,23,28}; vector<int> param2 {4,20,26,42,12,8,33,16,21,21}; vector<int> param3 {5,20,15,35,8,6,19,19,19,23}; vector<int> param4 {4,23,18,41,8,7,25,16,23,23}; vector<vector<int>> filled_function_param0 {{9,30,49,65,78,85,85,92},{-48,89,-60,66,71,-37,47,-50,61,41,-22,-3,90,-57,77,-64,22,8,-90,-5,-94,-43,29,-29,86,-79,-8,27,-20,-44,16},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{87,70,77,87,73,81,66,19,83,7,63,42,42,59,20,73,17,27,47,2,63,62,19,17,69,39,82,71,81,39,36,40,45,4,25,69,30,76,68,88,29,73,68,51,24,14,69,18},{-91,-85,-77,-73,-70,-68,-24,-21,-12,-1,9,29,48,52,56,63,88},{0,0,0,1,1,0,1,1,1,1},{4,5,9,14,18,20,22,23,25,28,30,31,34,35,36,38,38,39,44,48,49,51,54,55,59,64,66,71,72,72,73,76,78,82,82,84,92,93,95},{40,6,33,8,78,-58,2,24,40,3,46,94,-26,8,22,-83,96,-29,-38,-59,19,62,98,-55,-42,79,26,62,-56,-85,-22},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{3,68,40,48,54,35,95,56,89,40,77,68,46,78,13,27,6,17,36,99,81,2,77,52,66,52,92,43,90,22,55,67,99,60,58}}; vector<int> filled_function_param1 {4,18,25,33,8,7,22,20,23,28}; vector<int> filled_function_param2 {4,20,26,42,12,8,33,16,21,21}; vector<int> filled_function_param3 {5,20,15,35,8,6,19,19,19,23}; vector<int> filled_function_param4 {4,23,18,41,8,7,25,16,23,23}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i],filled_function_param2[i],filled_function_param3[i],filled_function_param4[i]); f_gold(&param0[i].front(),param1[i],param2[i],param3[i],param4[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_param2[i] && param3[i] == filled_function_param3[i] && param4[i] == filled_function_param4[i]) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS{ static int f_gold ( int arr [ ] , int n , int x ) { int i ; for ( i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == x ) { return i ; } } return - 1 ; }
def f_gold ( arr , n , x ) : i = 0 for i in range ( i , n ) : if ( arr [ i ] == x ) : return i return - 1
using namespace std; int f_gold ( int arr [ ], int n, int x ) { int i; for ( i = 0; i < n; i ++ ) { if ( arr [ i ] == x ) return i; } return - 1; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{4,5,5,11,13,14,15,19,22,22,23,26,29,29,36,44,48,49,65,65,67,68,70,76,79,79,81,85,88,91,91,92,92,97}); param0.add(new int[]{-24,-78,-32,-48,0,4,-42}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{38,14,75,16,91,11,98,43,67,9,21,10,82,72,32,81,48,60,2,91,10,90,12,83}); param0.add(new int[]{-92,-92,-82,-80,-76,-66,-64,-64,-56,-48,-38,-38,-34,-32,-32,-10,-8,-6,-2,0,8,10,18,20,22,22,30,34,38,38,38,44,50,52,56,64,64,66,70,76,88}); param0.add(new int[]{0,1,1,0,0,1,1,0,0,0,1,1,1,1}); param0.add(new int[]{1,4,4,4,4,8,12,13,14,14,22,25,25,27,29,33,36,38,40,40,40,41,47,47,47,48,48,50,51,52,52,52,55,56,59,59,62,64,66,77,82,84,90,91,91,93}); param0.add(new int[]{-90,-60,-58,-72,92,54,-32,-70,-94,18,64,-90,-90,-56,82,-14,-74,-96,-90,-8,-48,76,-28,10,-52,-8,-46,-32,82,46,58,92,4,48,-96,-66,60,60,62,-68}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1}); param0.add(new int[]{42,17,77,96,72,36,74,97,7,94,80,7,27,58,49,81,51,9}); List<Integer> param1 = new ArrayList<>(); param1.add(17); param1.add(4); param1.add(6); param1.add(17); param1.add(25); param1.add(11); param1.add(38); param1.add(22); param1.add(8); param1.add(16); List<Integer> param2 = new ArrayList<>(); param2.add(5); param2.add(0); param2.add(0); param2.add(75); param2.add(25); param2.add(-1); param2.add(4); param2.add(22); param2.add(8); param2.add(16); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([4, 5, 5, 11, 13, 14, 15, 19, 22, 22, 23, 26, 29, 29, 36, 44, 48, 49, 65, 65, 67, 68, 70, 76, 79, 79, 81, 85, 88, 91, 91, 92, 92, 97],17,5,), ([-24, -78, -32, -48, 0, 4, -42],4,0,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],6,0,), ([38, 14, 75, 16, 91, 11, 98, 43, 67, 9, 21, 10, 82, 72, 32, 81, 48, 60, 2, 91, 10, 90, 12, 83],17,75,), ([-92, -92, -82, -80, -76, -66, -64, -64, -56, -48, -38, -38, -34, -32, -32, -10, -8, -6, -2, 0, 8, 10, 18, 20, 22, 22, 30, 34, 38, 38, 38, 44, 50, 52, 56, 64, 64, 66, 70, 76, 88],25,25,), ([0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1],11,-1,), ([1, 4, 4, 4, 4, 8, 12, 13, 14, 14, 22, 25, 25, 27, 29, 33, 36, 38, 40, 40, 40, 41, 47, 47, 47, 48, 48, 50, 51, 52, 52, 52, 55, 56, 59, 59, 62, 64, 66, 77, 82, 84, 90, 91, 91, 93],38,4,), ([-90, -60, -58, -72, 92, 54, -32, -70, -94, 18, 64, -90, -90, -56, 82, -14, -74, -96, -90, -8, -48, 76, -28, 10, -52, -8, -46, -32, 82, 46, 58, 92, 4, 48, -96, -66, 60, 60, 62, -68],22,22,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1],8,8,), ([42, 17, 77, 96, 72, 36, 74, 97, 7, 94, 80, 7, 27, 58, 49, 81, 51, 9],16,11,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{4,5,5,11,13,14,15,19,22,22,23,26,29,29,36,44,48,49,65,65,67,68,70,76,79,79,81,85,88,91,91,92,92,97},{-24,-78,-32,-48,0,4,-42},{0,0,0,0,0,0,0,1,1,1,1},{38,14,75,16,91,11,98,43,67,9,21,10,82,72,32,81,48,60,2,91,10,90,12,83},{-92,-92,-82,-80,-76,-66,-64,-64,-56,-48,-38,-38,-34,-32,-32,-10,-8,-6,-2,0,8,10,18,20,22,22,30,34,38,38,38,44,50,52,56,64,64,66,70,76,88},{0,1,1,0,0,1,1,0,0,0,1,1,1,1},{1,4,4,4,4,8,12,13,14,14,22,25,25,27,29,33,36,38,40,40,40,41,47,47,47,48,48,50,51,52,52,52,55,56,59,59,62,64,66,77,82,84,90,91,91,93},{-90,-60,-58,-72,92,54,-32,-70,-94,18,64,-90,-90,-56,82,-14,-74,-96,-90,-8,-48,76,-28,10,-52,-8,-46,-32,82,46,58,92,4,48,-96,-66,60,60,62,-68},{0,0,0,0,0,0,1,1,1,1},{42,17,77,96,72,36,74,97,7,94,80,7,27,58,49,81,51,9}}; vector<int> param1 {17,4,6,17,25,11,38,22,8,16}; vector<int> param2 {5,0,0,75,25,-1,4,22,8,11}; 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; }
ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES{ static int f_gold ( int a [ ] , int n , int k ) { if ( k >= n - 1 ) return n ; int best = 0 , times = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] > best ) { best = a [ i ] ; if ( i == 1 ) times = 1 ; } else times += 1 ; if ( times >= k ) return best ; } return best ; }
def f_gold ( a , n , k ) : if k >= n - 1 : return n best = 0 times = 0 for i in range ( n ) : if a [ i ] > best : best = a [ i ] if i == True : times = 1 else : times += 1 if times >= k : return best return best
using namespace std; int f_gold ( int a [ ], int n, int k ) { if ( k >= n - 1 ) return n; int best = 0, times = 0; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] > best ) { best = a [ i ]; if ( i ) times = 1; } else times += 1; if ( times >= k ) return best; } return best; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98}); param0.add(new int[]{80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1}); param0.add(new int[]{90,23,43,42,7,71,79}); param0.add(new int[]{-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88}); param0.add(new int[]{1,1,1}); param0.add(new int[]{2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96}); param0.add(new int[]{-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{52,19}); List<Integer> param1 = new ArrayList<>(); param1.add(33); param1.add(14); param1.add(7); param1.add(4); param1.add(28); param1.add(1); param1.add(14); param1.add(26); param1.add(26); param1.add(1); List<Integer> param2 = new ArrayList<>(); param2.add(37); param2.add(13); param2.add(6); param2.add(4); param2.add(21); param2.add(2); param2.add(17); param2.add(31); param2.add(14); param2.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([2, 5, 5, 9, 10, 10, 11, 14, 23, 27, 31, 32, 33, 33, 33, 37, 39, 41, 41, 42, 42, 43, 47, 60, 61, 68, 73, 73, 73, 78, 80, 80, 82, 83, 86, 87, 89, 92, 94, 98],33,37,), ([80, -58, 64, 48, -16, 60, -50, -52, 62, -86, -96, 52, 26, -30, 14],14,13,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1],7,6,), ([90, 23, 43, 42, 7, 71, 79],4,4,), ([-96, -96, -90, -84, -68, -64, -56, -56, -50, -50, -48, -46, -28, -18, 0, 0, 6, 32, 32, 34, 42, 42, 46, 50, 50, 52, 64, 64, 70, 76, 84, 88],28,21,), ([1, 1, 1],1,2,), ([2, 9, 15, 19, 26, 29, 42, 45, 46, 47, 55, 60, 60, 61, 62, 64, 68, 69, 74, 79, 96],14,17,), ([-32, 12, 80, 42, 80, 8, 58, -76, -42, -98, 22, -90, -16, -4, -62, -32, 28, 12, 78, -52, -84, 78, 88, -76, -52, 68, -34, -16, -4, 2, -78, -94, -22, 34, 6, -62, 72],26,31,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,14,), ([52, 19],1,1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{2,5,5,9,10,10,11,14,23,27,31,32,33,33,33,37,39,41,41,42,42,43,47,60,61,68,73,73,73,78,80,80,82,83,86,87,89,92,94,98},{80,-58,64,48,-16,60,-50,-52,62,-86,-96,52,26,-30,14},{0,0,0,0,0,0,0,0,0,1,1},{90,23,43,42,7,71,79},{-96,-96,-90,-84,-68,-64,-56,-56,-50,-50,-48,-46,-28,-18,0,0,6,32,32,34,42,42,46,50,50,52,64,64,70,76,84,88},{1,1,1},{2,9,15,19,26,29,42,45,46,47,55,60,60,61,62,64,68,69,74,79,96},{-32,12,80,42,80,8,58,-76,-42,-98,22,-90,-16,-4,-62,-32,28,12,78,-52,-84,78,88,-76,-52,68,-34,-16,-4,2,-78,-94,-22,34,6,-62,72},{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{52,19}}; vector<int> param1 {33,14,7,4,28,1,14,26,26,1}; vector<int> param2 {37,13,6,4,21,2,17,31,14,1}; 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; }
NUMBER_DIGITS_PRODUCT_TWO_NUMBERS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NUMBER_DIGITS_PRODUCT_TWO_NUMBERS{ static int f_gold ( int a , int b ) { int count = 0 ; int p = Math . abs ( a * b ) ; if ( p == 0 ) return 1 ; while ( p > 0 ) { count ++ ; p = p / 10 ; } return count ; }
def f_gold(a, b): count = 0 p = abs(a * b) if (p == 0): return 1 while (p > 0): count = count + 1 p = p // 10 return count
using namespace std; int f_gold ( int a, int b ) { int count = 0; int p = abs ( a * b ); if ( p == 0 ) return 1; while ( p > 0 ) { count ++; p = p / 10; } return count; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(86); param0.add(81); param0.add(48); param0.add(64); param0.add(56); param0.add(5); param0.add(25); param0.add(94); param0.add(5); param0.add(46); List<Integer> param1 = new ArrayList<>(); param1.add(39); param1.add(87); param1.add(84); param1.add(80); param1.add(20); param1.add(70); param1.add(13); param1.add(83); param1.add(55); param1.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (86, 39,), (81, 87,), (48, 84,), (64, 80,), (56, 20,), (5, 70,), (25, 13,), (94, 83,), (5, 55,), (46, 46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {86,81,48,64,56,5,25,94,5,46}; vector<int> param1 {39,87,84,80,20,70,13,83,55,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FLOOR_IN_A_SORTED_ARRAY_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FLOOR_IN_A_SORTED_ARRAY_1{ static int f_gold ( int arr [ ] , int low , int high , int x ) { if ( low > high ) return - 1 ; if ( x >= arr [ high ] ) return high ; int mid = ( low + high ) / 2 ; if ( arr [ mid ] == x ) return mid ; if ( mid > 0 && arr [ mid - 1 ] <= x && x < arr [ mid ] ) return mid - 1 ; if ( x < arr [ mid ] ) return f_gold ( arr , low , mid - 1 , x ) ; return f_gold ( arr , mid + 1 , high , x ) ; }
def f_gold ( arr , low , high , x ) : if ( low > high ) : return - 1 if ( x >= arr [ high ] ) : return high mid = int ( ( low + high ) / 2 ) if ( arr [ mid ] == x ) : return mid if ( mid > 0 and arr [ mid - 1 ] <= x and x < arr [ mid ] ) : return mid - 1 if ( x < arr [ mid ] ) : return f_gold ( arr , low , mid - 1 , x ) return f_gold ( arr , mid + 1 , high , x )
using namespace std; int f_gold ( int arr [ ], int low, int high, int x ) { if ( low > high ) return - 1; if ( x >= arr [ high ] ) return high; int mid = ( low + high ) / 2; if ( arr [ mid ] == x ) return mid; if ( mid > 0 && arr [ mid - 1 ] <= x && x < arr [ mid ] ) return mid - 1; if ( x < arr [ mid ] ) return f_gold ( arr, low, mid - 1, x ); return f_gold ( arr, mid + 1, high, x ); }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{5,11,20,42,42,55,58,98,99}); param0.add(new int[]{50,-90,-38,-46,-10,-22,-66,72,-52,38,90,34,-12,-44,-6,0,-20,-38,86,26,64,-24,40,90,-26,-2,-28,12,22,-14}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{69,28,68,98,24,67,86,2,18,22,44,77,52,62,24,46}); param0.add(new int[]{-96,-94,-88,-84,-68,-60,-52,-52,-42,-34,-32,-16,-12,-6,-6,-4,-2,0,16,18,38,58,70,72,76,78,90,92,98}); param0.add(new int[]{0,1,1,0,0,1,0,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,0,0,1,0,0}); param0.add(new int[]{1,6,7,9,10,11,19,19,22,22,26,34,36,37,37,38,39,40,49,54,60,62,65,67,71,76,78,79,82,82,89,95,97}); param0.add(new int[]{76,-32,-98,-18,-80,74,-22,-82,40,-64,58,-18,-64,34,-44,-82,-46,62,-80,-76,32,44,-32,98,-26,62,16,86,-52,-72,-90,-30,6}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{81,69,15,52,49,54,18,92,33,21,91,21,5,25,77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25}); List<Integer> param1 = new ArrayList<>(); param1.add(5); param1.add(26); param1.add(11); param1.add(15); param1.add(22); param1.add(24); param1.add(22); param1.add(28); param1.add(28); param1.add(35); List<Integer> param2 = new ArrayList<>(); param2.add(7); param2.add(28); param2.add(9); param2.add(11); param2.add(27); param2.add(15); param2.add(26); param2.add(31); param2.add(29); param2.add(19); List<Integer> param3 = new ArrayList<>(); param3.add(6); param3.add(23); param3.add(18); param3.add(13); param3.add(20); param3.add(26); param3.add(25); param3.add(24); param3.add(30); param3.add(33); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([5, 11, 20, 42, 42, 55, 58, 98, 99],5,7,6,), ([50, -90, -38, -46, -10, -22, -66, 72, -52, 38, 90, 34, -12, -44, -6, 0, -20, -38, 86, 26, 64, -24, 40, 90, -26, -2, -28, 12, 22, -14],26,28,23,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,9,18,), ([69, 28, 68, 98, 24, 67, 86, 2, 18, 22, 44, 77, 52, 62, 24, 46],15,11,13,), ([-96, -94, -88, -84, -68, -60, -52, -52, -42, -34, -32, -16, -12, -6, -6, -4, -2, 0, 16, 18, 38, 58, 70, 72, 76, 78, 90, 92, 98],22,27,20,), ([0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0],24,15,26,), ([1, 6, 7, 9, 10, 11, 19, 19, 22, 22, 26, 34, 36, 37, 37, 38, 39, 40, 49, 54, 60, 62, 65, 67, 71, 76, 78, 79, 82, 82, 89, 95, 97],22,26,25,), ([76, -32, -98, -18, -80, 74, -22, -82, 40, -64, 58, -18, -64, 34, -44, -82, -46, 62, -80, -76, 32, 44, -32, 98, -26, 62, 16, 86, -52, -72, -90, -30, 6],28,31,24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,29,30,), ([81, 69, 15, 52, 49, 54, 18, 92, 33, 21, 91, 21, 5, 25, 77, 92, 26, 58, 72, 55, 76, 18, 13, 59, 9, 12, 31, 24, 36, 33, 71, 87, 55, 19, 42, 25],35,19,33,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{5,11,20,42,42,55,58,98,99},{50,-90,-38,-46,-10,-22,-66,72,-52,38,90,34,-12,-44,-6,0,-20,-38,86,26,64,-24,40,90,-26,-2,-28,12,22,-14},{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{69,28,68,98,24,67,86,2,18,22,44,77,52,62,24,46},{-96,-94,-88,-84,-68,-60,-52,-52,-42,-34,-32,-16,-12,-6,-6,-4,-2,0,16,18,38,58,70,72,76,78,90,92,98},{0,1,1,0,0,1,0,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,0,0,1,0,0},{1,6,7,9,10,11,19,19,22,22,26,34,36,37,37,38,39,40,49,54,60,62,65,67,71,76,78,79,82,82,89,95,97},{76,-32,-98,-18,-80,74,-22,-82,40,-64,58,-18,-64,34,-44,-82,-46,62,-80,-76,32,44,-32,98,-26,62,16,86,-52,-72,-90,-30,6},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{81,69,15,52,49,54,18,92,33,21,91,21,5,25,77,92,26,58,72,55,76,18,13,59,9,12,31,24,36,33,71,87,55,19,42,25}}; vector<int> param1 {5,26,11,15,22,24,22,28,28,35}; vector<int> param2 {7,28,9,11,27,15,26,31,29,19}; vector<int> param3 {6,23,18,13,20,26,25,24,30,33}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i],param2[i],param3[i]) == f_gold(&param0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class HOW_CAN_WE_SUM_THE_DIGITS_OF_A_GIVEN_NUMBER_IN_SINGLE_STATEMENT_1{ static int f_gold ( int n ) { int sum ; for ( sum = 0 ; n > 0 ; sum += n % 10 , n /= 10 ) ; return sum ; }
def f_gold ( n ) : sum = 0 while ( n > 0 ) : sum += int ( n % 10 ) n = int ( n / 10 ) return sum
null
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(50); param0.add(92); param0.add(49); param0.add(94); param0.add(7); param0.add(30); param0.add(88); param0.add(98); param0.add(94); param0.add(23); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (50,), (92,), (49,), (94,), (7,), (30,), (88,), (98,), (94,), (23,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
BREAK_NUMBER_THREE_PARTS_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BREAK_NUMBER_THREE_PARTS_1{ static long f_gold ( long n ) { long count = 0 ; count = ( n + 1 ) * ( n + 2 ) / 2 ; return count ; }
def f_gold ( n ) : count = 0 count = ( n + 1 ) * ( n + 2 ) // 2 return count
null
public static void main(String args[]) { int n_success = 0; List<Long> param0 = new ArrayList<>(); param0.add(71L); param0.add(71L); param0.add(36L); param0.add(3L); param0.add(97L); param0.add(69L); param0.add(15L); param0.add(48L); param0.add(77L); param0.add(6L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (71,), (71,), (36,), (3,), (97,), (69,), (15,), (48,), (77,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class WRITE_AN_EFFICIENT_METHOD_TO_CHECK_IF_A_NUMBER_IS_MULTIPLE_OF_3{ static int f_gold ( int n ) { int odd_count = 0 ; int even_count = 0 ; if ( n < 0 ) n = - n ; if ( n == 0 ) return 1 ; if ( n == 1 ) return 0 ; while ( n != 0 ) { if ( ( n & 1 ) != 0 ) odd_count ++ ; if ( ( n & 2 ) != 0 ) even_count ++ ; n = n >> 2 ; } return f_gold ( Math . abs ( odd_count - even_count ) ) ; }
def f_gold ( n ) : odd_count = 0 even_count = 0 if ( n < 0 ) : n = - n if ( n == 0 ) : return 1 if ( n == 1 ) : return 0 while ( n ) : if ( n & 1 ) : odd_count += 1 if ( n & 2 ) : even_count += 1 n = n >> 2 return f_gold ( abs ( odd_count - even_count ) )
using namespace std; int f_gold ( int n ) { int odd_count = 0; int even_count = 0; if ( n < 0 ) n = - n; if ( n == 0 ) return 1; if ( n == 1 ) return 0; while ( n ) { if ( n & 1 ) odd_count ++; if ( n & 2 ) even_count ++; n = n >> 2; } return f_gold ( abs ( odd_count - even_count ) ); }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(94); param0.add(94); param0.add(79); param0.add(39); param0.add(16); param0.add(90); param0.add(64); param0.add(76); param0.add(83); param0.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (94,), (94,), (79,), (39,), (16,), (90,), (64,), (76,), (83,), (47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {94,94,79,39,16,90,64,76,83,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
BINARY_REPRESENTATION_OF_NEXT_NUMBER
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BINARY_REPRESENTATION_OF_NEXT_NUMBER{ static String f_gold ( String num ) { int l = num . length ( ) ; int i ; for ( i = l - 1 ; i >= 0 ; i -- ) { if ( num . charAt ( i ) == '0' ) { num = num . substring ( 0 , i ) + '1' + num . substring ( i + 1 ) ; break ; } else { num = num . substring ( 0 , i ) + '0' + num . substring ( i + 1 ) ; } } if ( i < 0 ) { num = "1" + num ; } return num ; }
def f_gold ( num1 ) : l = len ( num1 ) ; num = list ( num1 ) ; i = l - 1 ; while ( i >= 0 ) : if ( num [ i ] == '0' ) : num [ i ] = '1' ; break ; else : num [ i ] = '0' ; i -= 1 ; num1 = ''.join ( num ) ; if ( i < 0 ) : num1 = '1' + num1 ; return num1 ;
null
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("DXh"); param0.add("48703586411816"); param0.add("0001"); param0.add("yWg WvjNKS"); param0.add("8408568459"); param0.add("01"); param0.add("DFECZ CWtN"); param0.add("37742236"); param0.add("001101"); param0.add("LDxERLmYn"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)).equals(f_gold(param0.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('DXh',), ('48703586411816',), ('0001',), ('yWg WvjNKS',), ('8408568459',), ('01',), ('DFECZ CWtN',), ('37742236',), ('001101',), ('LDxERLmYn',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class CHECK_WHETHER_GIVEN_NUMBER_EVEN_ODD{ public static boolean f_gold ( int n ) { return ( n % 2 == 0 ) ; }
def f_gold ( n ) : return ( n % 2 == 0 )
using namespace std; bool f_gold ( int n ) { return ( n % 2 == 0 ); }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(67); param0.add(90); param0.add(55); param0.add(90); param0.add(83); param0.add(32); param0.add(58); param0.add(38); param0.add(87); param0.add(87); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (67,), (90,), (55,), (90,), (83,), (32,), (58,), (38,), (87,), (87,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {67,90,55,90,83,32,58,38,87,87}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class ONE_LINE_FUNCTION_FOR_FACTORIAL_OF_A_NUMBER{ static int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ) ; }
def f_gold ( n ) : return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 ) ;
using namespace std; int f_gold ( int n ) { return ( n == 1 || n == 0 ) ? 1 : n * f_gold ( n - 1 ); }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(58); param0.add(42); param0.add(76); param0.add(16); param0.add(49); param0.add(60); param0.add(99); param0.add(45); param0.add(6); param0.add(70); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (58,), (42,), (76,), (16,), (49,), (60,), (99,), (45,), (6,), (70,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {58,42,76,16,49,60,99,45,6,70}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
UGLY_NUMBERS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class UGLY_NUMBERS{ static int f_gold ( int n ) { int ugly [ ] = new int [ n ] ; int i2 = 0 , i3 = 0 , i5 = 0 ; int next_multiple_of_2 = 2 ; int next_multiple_of_3 = 3 ; int next_multiple_of_5 = 5 ; int next_ugly_no = 1 ; ugly [ 0 ] = 1 ; for ( int i = 1 ; i < n ; i ++ ) { next_ugly_no = Math . min ( next_multiple_of_2 , Math . min ( next_multiple_of_3 , next_multiple_of_5 ) ) ; ugly [ i ] = next_ugly_no ; if ( next_ugly_no == next_multiple_of_2 ) { i2 = i2 + 1 ; next_multiple_of_2 = ugly [ i2 ] * 2 ; } if ( next_ugly_no == next_multiple_of_3 ) { i3 = i3 + 1 ; next_multiple_of_3 = ugly [ i3 ] * 3 ; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1 ; next_multiple_of_5 = ugly [ i5 ] * 5 ; } } return next_ugly_no ; }
def f_gold ( n ) : ugly = [ 0 ] * n ugly [ 0 ] = 1 i2 = i3 = i5 = 0 next_multiple_of_2 = 2 next_multiple_of_3 = 3 next_multiple_of_5 = 5 for l in range ( 1 , n ) : ugly [ l ] = min ( next_multiple_of_2 , next_multiple_of_3 , next_multiple_of_5 ) if ugly [ l ] == next_multiple_of_2 : i2 += 1 next_multiple_of_2 = ugly [ i2 ] * 2 if ugly [ l ] == next_multiple_of_3 : i3 += 1 next_multiple_of_3 = ugly [ i3 ] * 3 if ugly [ l ] == next_multiple_of_5 : i5 += 1 next_multiple_of_5 = ugly [ i5 ] * 5 return ugly [ - 1 ]
using namespace std; unsigned f_gold ( unsigned n ) { unsigned ugly [ n ]; unsigned i2 = 0, i3 = 0, i5 = 0; unsigned next_multiple_of_2 = 2; unsigned next_multiple_of_3 = 3; unsigned next_multiple_of_5 = 5; unsigned next_ugly_no = 1; ugly [ 0 ] = 1; for ( int i = 1; i < n; i ++ ) { next_ugly_no = min ( next_multiple_of_2, min ( next_multiple_of_3, next_multiple_of_5 ) ); ugly [ i ] = next_ugly_no; if ( next_ugly_no == next_multiple_of_2 ) { i2 = i2 + 1; next_multiple_of_2 = ugly [ i2 ] * 2; } if ( next_ugly_no == next_multiple_of_3 ) { i3 = i3 + 1; next_multiple_of_3 = ugly [ i3 ] * 3; } if ( next_ugly_no == next_multiple_of_5 ) { i5 = i5 + 1; next_multiple_of_5 = ugly [ i5 ] * 5; } } return next_ugly_no; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(27); param0.add(64); param0.add(93); param0.add(90); param0.add(85); param0.add(86); param0.add(72); param0.add(86); param0.add(32); param0.add(1); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (27,), (64,), (93,), (90,), (85,), (86,), (72,), (86,), (32,), (1,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {27,64,93,90,85,86,72,86,32,1}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
UNIQUE_CELLS_BINARY_MATRIX
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class UNIQUE_CELLS_BINARY_MATRIX{ static int f_gold ( int mat [ ] [ ] , int n , int m ) { int [ ] rowsum = new int [ n ] ; int [ ] colsum = new int [ m ] ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < m ; j ++ ) if ( mat [ i ] [ j ] != 0 ) { rowsum [ i ] ++ ; colsum [ j ] ++ ; } int uniquecount = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = 0 ; j < m ; j ++ ) if ( mat [ i ] [ j ] != 0 && rowsum [ i ] == 1 && colsum [ j ] == 1 ) uniquecount ++ ; return uniquecount ; }
def f_gold ( mat , n , m ) : rowsum = [ 0 ] * n ; colsum = [ 0 ] * m ; for i in range ( n ) : for j in range ( m ) : if ( mat [ i ] [ j ] != 0 ) : rowsum [ i ] += 1 ; colsum [ j ] += 1 ; uniquecount = 0 ; for i in range ( n ) : for j in range ( m ) : if ( mat [ i ] [ j ] != 0 and rowsum [ i ] == 1 and colsum [ j ] == 1 ) : uniquecount += 1 ; return uniquecount ;
null
public static void main(String args[]) { int n_success = 0; List<int [ ] [ ]> param0 = new ArrayList<>(); param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 0}, new int[] {1, 0, 0, 1}}); param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 1}, new int[] {1, 0, 1, 1}}); param0.add(new int[][]{ new int[] {0, 1, 0, 0}, new int[] {0, 0, 1, 0}, new int[] {1, 1, 0, 1}}); param0.add(new int[][]{ new int[] {1, 1, 1, 1}, new int[] {0, 0, 1, 0}, new int[] {1, 0, 0, 1}}); param0.add(new int[][]{ new int[] {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36}, new int[]{7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49}, new int[]{69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33}, new int[]{63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24}, new int[]{41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94}, new int[]{66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65}, new int[]{6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86}, new int[]{54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98}, new int[]{46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46}, new int[]{70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11}, new int[]{92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12}, new int[]{55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3}, new int[]{21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25}, new int[]{77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88}, new int[]{13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79}, new int[]{8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51}, new int[]{97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46}, new int[]{10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72}, new int[]{46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73}, new int[]{30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34}, new int[]{26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27}, new int[]{39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32}, new int[]{99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22}, new int[]{81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81}, new int[]{21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73}, new int[]{90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78}, new int[]{9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88}, new int[]{12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96}, new int[]{9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65}, new int[]{35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25}}); param0.add(new int[][]{ new int[] {0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3}, new int[]{63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79}, new int[]{35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69}, new int[]{43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96}, new int[]{46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46}, new int[]{56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15}, new int[]{18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86}, new int[]{99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76}, new int[]{88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49}, new int[]{92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39}, new int[]{30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60}, new int[]{35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34}, new int[]{19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46}, new int[]{54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97}, new int[]{5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81}, new int[]{54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96}, new int[]{84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3}, new int[]{60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70}, new int[]{54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29}, new int[]{71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52}, new int[]{37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99}, new int[]{98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18}, new int[]{81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3}, new int[]{29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72}, new int[]{24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11}, new int[]{41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32}, new int[]{55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86}, new int[]{44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33}, new int[]{36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24}, new int[]{7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69}, new int[]{88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47}, new int[]{28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48}, new int[]{55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88}, new int[]{38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45}, new int[]{26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44}, new int[]{91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66}, new int[]{12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42}, new int[]{17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27}, new int[]{46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7}, new int[]{95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27}, new int[]{22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33}, new int[]{2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53}, new int[]{54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55}, new int[]{13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25}, new int[]{74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51}, new int[]{94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61}, new int[]{58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35}, new int[]{57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74}}); param0.add(new int[][]{ new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, new int[]{69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20}, new int[]{31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40}, new int[]{24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67}, new int[]{4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37}, new int[]{14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51}, new int[]{99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82}, new int[]{28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44}, new int[]{25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55}, new int[]{64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48}, new int[]{35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83}, new int[]{64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36}, new int[]{10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71}, new int[]{14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64}, new int[]{6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39}, new int[]{36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99}, new int[]{22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69}, new int[]{24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18}}); param0.add(new int[][]{ new int[] {0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56}, new int[]{21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45}, new int[]{18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94}, new int[]{86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23}, new int[]{40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5}, new int[]{6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93}, new int[]{77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57}, new int[]{10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78}, new int[]{37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3}, new int[]{76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28}, new int[]{25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18}, new int[]{8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60}, new int[]{59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62}, new int[]{89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54}, new int[]{46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20}, new int[]{15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56}, new int[]{33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1}, new int[]{57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78}, new int[]{1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16}, new int[]{56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32}, new int[]{52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61}, new int[]{46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35}, new int[]{51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33}, new int[]{20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47}, new int[]{17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47}}); param0.add(new int[][]{ new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74}, new int[]{4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82}, new int[]{10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3}, new int[]{93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41}, new int[]{15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97}, new int[]{90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92}, new int[]{2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36}, new int[]{41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12}, new int[]{19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50}, new int[]{13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10}, new int[]{37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28}, new int[]{97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73}, new int[]{27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66}, new int[]{9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56}, new int[]{31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74}, new int[]{81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68}, new int[]{96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20}, new int[]{94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26}, new int[]{38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84}, new int[]{50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51}, new int[]{45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10}, new int[]{53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35}, new int[]{43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76}}); List<Integer> param1 = new ArrayList<>(); param1.add(3); param1.add(2); param1.add(3); param1.add(3); param1.add(3); param1.add(1); param1.add(1); param1.add(10); param1.add(15); param1.add(17); List<Integer> param2 = new ArrayList<>(); param2.add(4); param2.add(2); param2.add(4); param2.add(4); param2.add(3); param2.add(28); param2.add(32); param2.add(12); param2.add(17); param2.add(22); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]] ,3,4,), ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1]] ,2,2,), ([[0, 1, 0, 0], [0, 0, 1, 1], [1, 0, 1, 1]] ,3,4,), ([[0, 1, 0, 0], [0, 0, 1, 0], [1, 1, 0, 1]] ,3,4,), ([[1, 1, 1, 1], [0, 0, 1, 0], [1, 0, 0, 1]] ,3,3,), ([[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 33, 13, 43, 21, 83, 34, 30, 20, 82, 85, 36], [7, 69, 9, 45, 18, 47, 1, 78, 72, 53, 37, 20, 95, 71, 58, 41, 38, 44, 15, 35, 81, 27, 21, 40, 44, 90, 44, 5, 97, 49], [69, 92, 21, 8, 66, 37, 14, 34, 60, 61, 46, 21, 91, 18, 61, 69, 34, 82, 54, 99, 90, 29, 41, 92, 70, 90, 58, 82, 30, 33], [63, 96, 90, 86, 34, 49, 12, 22, 85, 24, 56, 25, 66, 1, 74, 34, 5, 17, 1, 78, 21, 6, 75, 39, 59, 20, 84, 85, 64, 24], [41, 90, 67, 38, 38, 28, 10, 24, 62, 52, 71, 87, 87, 24, 95, 50, 86, 91, 38, 69, 18, 72, 99, 49, 17, 76, 86, 53, 6, 94], [66, 5, 2, 62, 99, 5, 31, 81, 63, 91, 95, 74, 76, 18, 77, 57, 72, 99, 62, 4, 62, 46, 71, 21, 60, 45, 79, 98, 22, 65], [6, 65, 83, 27, 10, 55, 78, 34, 41, 32, 67, 51, 80, 39, 97, 5, 58, 99, 17, 23, 90, 46, 7, 62, 7, 15, 30, 20, 67, 86], [54, 50, 71, 95, 49, 50, 3, 64, 46, 81, 22, 52, 37, 60, 67, 48, 30, 88, 97, 43, 10, 71, 80, 96, 2, 72, 79, 67, 84, 98], [46, 41, 4, 87, 8, 10, 5, 74, 90, 80, 59, 58, 23, 61, 17, 28, 18, 52, 58, 41, 75, 98, 79, 1, 97, 73, 17, 79, 4, 46], [70, 6, 83, 23, 94, 1, 73, 61, 22, 65, 57, 36, 25, 16, 26, 92, 5, 22, 14, 73, 78, 80, 94, 96, 70, 17, 1, 18, 75, 11], [92, 12, 34, 80, 74, 8, 90, 42, 14, 51, 9, 83, 98, 38, 29, 29, 28, 88, 92, 76, 83, 6, 2, 53, 31, 37, 56, 93, 40, 12], [55, 97, 57, 45, 25, 42, 18, 30, 18, 7, 79, 30, 5, 69, 33, 6, 48, 4, 13, 26, 49, 20, 32, 96, 65, 89, 89, 53, 65, 3], [21, 43, 25, 85, 67, 93, 35, 86, 23, 13, 98, 23, 63, 99, 83, 15, 79, 26, 67, 81, 94, 61, 28, 34, 16, 43, 11, 24, 87, 25], [77, 19, 34, 66, 72, 5, 75, 66, 54, 96, 24, 76, 80, 51, 24, 50, 54, 17, 96, 84, 35, 30, 47, 42, 22, 31, 51, 37, 88, 88], [13, 89, 31, 14, 84, 39, 92, 89, 38, 75, 18, 39, 83, 67, 41, 46, 49, 27, 23, 35, 13, 26, 78, 35, 41, 6, 72, 52, 53, 79], [8, 47, 80, 93, 64, 34, 29, 35, 48, 74, 65, 69, 67, 14, 46, 27, 46, 29, 1, 82, 3, 26, 21, 24, 45, 84, 29, 18, 3, 51], [97, 18, 37, 63, 85, 19, 23, 84, 55, 24, 83, 26, 97, 96, 54, 99, 89, 33, 88, 57, 9, 64, 75, 85, 59, 81, 16, 5, 44, 46], [10, 77, 58, 70, 64, 80, 70, 93, 60, 25, 87, 11, 93, 85, 63, 26, 41, 53, 75, 24, 81, 73, 72, 94, 7, 87, 73, 83, 64, 72], [46, 78, 51, 92, 99, 71, 6, 30, 16, 57, 65, 61, 17, 63, 7, 35, 69, 91, 30, 44, 99, 80, 6, 80, 56, 8, 84, 95, 20, 73], [30, 62, 77, 26, 66, 61, 61, 45, 46, 24, 77, 16, 82, 16, 66, 1, 74, 25, 14, 81, 82, 7, 21, 93, 91, 49, 4, 12, 22, 34], [26, 28, 19, 31, 14, 87, 81, 23, 81, 8, 38, 10, 30, 7, 2, 22, 5, 67, 73, 69, 56, 20, 93, 70, 68, 57, 21, 17, 79, 27], [39, 83, 67, 92, 86, 70, 95, 69, 13, 98, 50, 10, 56, 44, 28, 85, 37, 36, 56, 92, 77, 57, 36, 1, 43, 9, 84, 81, 67, 32], [99, 70, 58, 52, 70, 89, 28, 65, 40, 80, 20, 88, 79, 10, 76, 62, 37, 99, 60, 91, 77, 94, 67, 52, 35, 62, 12, 29, 30, 22], [81, 53, 91, 22, 60, 49, 49, 7, 46, 11, 16, 54, 57, 36, 51, 22, 37, 3, 35, 38, 55, 41, 38, 88, 34, 99, 11, 79, 14, 81], [21, 28, 86, 60, 34, 65, 87, 96, 4, 56, 70, 80, 10, 35, 88, 10, 76, 63, 97, 91, 25, 74, 89, 32, 56, 26, 68, 73, 27, 73], [90, 11, 53, 32, 59, 30, 9, 11, 87, 17, 96, 11, 57, 86, 50, 96, 73, 81, 53, 89, 80, 97, 66, 43, 39, 42, 76, 34, 25, 78], [9, 94, 12, 10, 88, 34, 76, 26, 96, 35, 77, 83, 56, 77, 56, 86, 48, 23, 65, 8, 98, 13, 49, 10, 3, 28, 27, 85, 11, 88], [12, 7, 42, 96, 10, 61, 64, 28, 26, 93, 91, 52, 74, 4, 22, 10, 4, 7, 63, 87, 67, 88, 30, 76, 21, 48, 17, 67, 79, 96], [9, 40, 86, 96, 59, 69, 41, 68, 48, 61, 5, 7, 75, 6, 29, 51, 81, 28, 57, 63, 38, 83, 49, 12, 45, 83, 97, 45, 5, 65], [35, 35, 31, 36, 40, 99, 40, 61, 12, 82, 92, 13, 30, 40, 17, 73, 22, 56, 62, 57, 15, 93, 54, 16, 84, 89, 24, 80, 80, 25]],1,28,), ([[0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 45, 59, 40, 83, 46, 59, 89, 37, 82, 68, 65, 97, 28, 41, 83, 97, 15, 87, 93, 39, 78, 94, 66, 77, 28, 31, 12, 13, 3], [63, 29, 64, 94, 76, 85, 66, 50, 80, 96, 92, 73, 17, 56, 83, 7, 36, 40, 1, 42, 36, 39, 1, 88, 63, 74, 75, 86, 56, 31, 1, 41, 11, 6, 51, 64, 81, 78, 96, 20, 4, 39, 47, 22, 93, 42, 77, 79], [35, 25, 3, 51, 12, 14, 40, 32, 50, 68, 29, 31, 96, 24, 11, 30, 19, 36, 6, 2, 19, 46, 40, 18, 36, 46, 56, 52, 54, 56, 20, 1, 23, 38, 20, 4, 69, 6, 63, 90, 1, 63, 79, 80, 87, 86, 54, 69], [43, 5, 70, 66, 10, 36, 35, 45, 23, 62, 47, 16, 37, 42, 35, 40, 16, 69, 11, 51, 93, 75, 80, 89, 50, 67, 67, 65, 12, 7, 43, 46, 96, 22, 76, 6, 38, 39, 60, 85, 62, 92, 96, 27, 49, 15, 33, 96], [46, 98, 71, 13, 53, 39, 50, 70, 60, 9, 4, 94, 92, 21, 12, 77, 50, 13, 52, 91, 92, 82, 80, 21, 55, 10, 78, 92, 29, 11, 30, 40, 91, 49, 3, 1, 32, 39, 85, 2, 74, 31, 18, 7, 5, 29, 68, 46], [56, 3, 13, 67, 72, 50, 4, 42, 99, 76, 24, 19, 99, 82, 40, 34, 89, 7, 75, 38, 19, 99, 45, 20, 91, 95, 89, 2, 93, 37, 31, 42, 6, 85, 97, 9, 74, 86, 95, 53, 11, 83, 76, 16, 13, 38, 13, 15], [18, 16, 41, 50, 69, 91, 66, 41, 27, 59, 65, 14, 35, 23, 22, 27, 50, 25, 98, 54, 49, 91, 99, 85, 3, 25, 68, 57, 15, 67, 11, 92, 3, 18, 53, 9, 79, 72, 40, 56, 14, 61, 13, 47, 74, 94, 5, 86], [99, 5, 12, 35, 85, 26, 1, 10, 38, 24, 95, 47, 87, 85, 2, 95, 2, 30, 25, 83, 62, 1, 92, 63, 84, 59, 54, 69, 55, 94, 87, 42, 91, 53, 65, 9, 71, 51, 90, 16, 53, 70, 62, 37, 61, 57, 45, 76], [88, 17, 2, 95, 37, 54, 42, 29, 65, 78, 40, 11, 58, 96, 20, 66, 31, 5, 96, 50, 9, 41, 10, 53, 49, 26, 67, 36, 23, 94, 39, 59, 23, 23, 43, 25, 84, 60, 33, 33, 65, 47, 33, 38, 24, 73, 95, 49], [92, 87, 30, 82, 58, 90, 97, 59, 16, 93, 16, 33, 39, 46, 38, 23, 26, 49, 81, 24, 83, 42, 27, 2, 8, 79, 41, 13, 91, 22, 47, 47, 65, 69, 29, 79, 30, 46, 6, 6, 87, 52, 5, 86, 41, 20, 20, 39], [30, 48, 81, 60, 23, 60, 50, 13, 74, 38, 39, 68, 19, 52, 41, 92, 27, 23, 19, 80, 35, 5, 88, 5, 93, 6, 41, 41, 54, 44, 48, 37, 93, 56, 33, 91, 35, 6, 46, 74, 36, 44, 7, 7, 29, 80, 65, 60], [35, 57, 29, 38, 77, 12, 87, 80, 58, 78, 80, 6, 36, 52, 88, 27, 25, 40, 36, 60, 29, 95, 3, 13, 68, 11, 48, 79, 60, 2, 79, 70, 13, 35, 51, 56, 40, 77, 59, 12, 16, 53, 41, 20, 40, 61, 77, 34], [19, 45, 91, 29, 19, 56, 27, 2, 40, 65, 78, 8, 27, 97, 95, 30, 25, 49, 56, 65, 31, 99, 60, 85, 34, 17, 73, 29, 72, 83, 6, 88, 6, 3, 95, 31, 76, 52, 8, 90, 26, 15, 77, 56, 86, 62, 13, 46], [54, 9, 88, 3, 23, 12, 41, 44, 58, 11, 19, 59, 73, 37, 10, 73, 33, 77, 20, 44, 75, 93, 13, 63, 14, 73, 54, 42, 38, 83, 72, 82, 98, 36, 9, 80, 5, 15, 24, 64, 48, 43, 39, 25, 80, 86, 80, 97], [5, 60, 7, 18, 6, 12, 33, 98, 21, 58, 82, 78, 42, 94, 46, 3, 57, 53, 62, 13, 51, 19, 59, 62, 37, 77, 15, 90, 70, 91, 12, 89, 50, 47, 16, 16, 67, 34, 88, 46, 87, 64, 94, 49, 21, 53, 62, 81], [54, 82, 3, 53, 12, 80, 38, 78, 91, 18, 84, 35, 81, 84, 70, 90, 71, 76, 17, 21, 70, 47, 37, 89, 54, 15, 11, 9, 68, 3, 13, 96, 6, 1, 5, 66, 86, 96, 41, 50, 7, 21, 81, 53, 20, 65, 32, 96], [84, 74, 6, 41, 33, 74, 25, 24, 95, 93, 12, 37, 50, 9, 93, 67, 4, 54, 85, 6, 66, 37, 84, 45, 97, 14, 84, 43, 66, 7, 55, 37, 76, 16, 17, 95, 71, 90, 1, 2, 95, 84, 33, 13, 65, 51, 33, 3], [60, 83, 44, 96, 5, 47, 43, 47, 6, 60, 36, 37, 77, 76, 6, 30, 92, 10, 28, 6, 73, 24, 52, 82, 68, 45, 87, 27, 68, 13, 75, 75, 19, 33, 78, 13, 7, 33, 32, 45, 56, 72, 46, 98, 19, 34, 63, 70], [54, 55, 50, 65, 45, 30, 79, 73, 61, 93, 59, 2, 30, 46, 68, 19, 84, 5, 73, 84, 57, 63, 52, 59, 60, 80, 84, 20, 90, 33, 12, 21, 56, 23, 20, 87, 49, 47, 70, 45, 76, 35, 72, 27, 80, 47, 32, 29], [71, 80, 53, 93, 56, 89, 43, 4, 64, 91, 87, 23, 60, 30, 43, 88, 48, 80, 7, 87, 31, 19, 52, 68, 6, 83, 60, 91, 93, 12, 38, 13, 28, 5, 46, 46, 81, 27, 26, 62, 68, 72, 90, 97, 12, 77, 85, 52], [37, 25, 39, 67, 19, 71, 81, 77, 24, 51, 45, 8, 72, 45, 2, 30, 67, 45, 26, 17, 38, 67, 57, 33, 94, 79, 72, 94, 64, 23, 12, 8, 73, 72, 38, 33, 48, 97, 45, 75, 23, 43, 25, 15, 10, 20, 16, 99], [98, 85, 57, 46, 1, 25, 56, 46, 59, 62, 78, 61, 83, 8, 41, 15, 44, 82, 1, 97, 65, 34, 4, 81, 2, 39, 54, 10, 42, 45, 26, 27, 39, 25, 29, 82, 22, 90, 60, 90, 52, 85, 21, 8, 66, 98, 76, 18], [81, 15, 3, 85, 83, 59, 55, 32, 11, 82, 53, 29, 67, 4, 92, 9, 57, 38, 7, 65, 35, 47, 34, 63, 9, 90, 72, 19, 26, 46, 56, 10, 43, 30, 40, 55, 58, 31, 72, 47, 77, 37, 94, 57, 79, 57, 99, 3], [29, 88, 45, 87, 73, 2, 15, 96, 18, 29, 40, 3, 97, 58, 71, 94, 91, 38, 29, 31, 65, 43, 27, 27, 93, 69, 3, 29, 13, 97, 60, 84, 67, 70, 81, 47, 68, 97, 33, 6, 64, 78, 71, 70, 51, 67, 22, 72], [24, 77, 77, 65, 53, 41, 32, 69, 71, 45, 32, 28, 97, 14, 13, 93, 50, 40, 1, 47, 91, 30, 34, 46, 1, 34, 59, 7, 65, 42, 82, 99, 19, 13, 23, 66, 3, 86, 36, 49, 72, 87, 72, 57, 89, 99, 64, 11], [41, 6, 45, 81, 57, 82, 33, 61, 18, 7, 29, 69, 16, 95, 69, 74, 29, 29, 16, 4, 65, 72, 92, 1, 92, 3, 64, 66, 89, 57, 75, 18, 39, 84, 81, 7, 55, 17, 68, 36, 94, 1, 35, 76, 17, 80, 28, 32], [55, 35, 19, 93, 93, 80, 4, 21, 44, 62, 1, 83, 51, 90, 76, 17, 37, 92, 36, 29, 69, 3, 15, 67, 77, 69, 21, 23, 47, 86, 34, 41, 90, 47, 31, 35, 7, 45, 57, 96, 22, 70, 21, 49, 47, 27, 10, 86], [44, 51, 18, 68, 99, 38, 36, 60, 68, 74, 96, 74, 45, 74, 75, 9, 13, 57, 82, 57, 37, 47, 11, 28, 6, 33, 14, 47, 29, 15, 56, 69, 86, 31, 19, 18, 58, 70, 73, 30, 95, 35, 17, 16, 97, 68, 95, 33], [36, 11, 60, 4, 63, 5, 64, 85, 77, 4, 35, 26, 26, 19, 37, 11, 66, 31, 18, 75, 44, 16, 58, 2, 59, 96, 48, 86, 36, 8, 36, 25, 40, 95, 4, 43, 74, 27, 38, 81, 38, 64, 89, 17, 13, 85, 79, 24], [7, 64, 63, 22, 53, 74, 97, 12, 72, 22, 39, 47, 64, 44, 16, 59, 34, 46, 80, 78, 70, 55, 74, 24, 27, 73, 16, 2, 31, 63, 47, 19, 56, 11, 86, 93, 95, 8, 74, 6, 31, 99, 50, 29, 21, 41, 69, 69], [88, 79, 56, 28, 34, 56, 77, 55, 44, 32, 86, 29, 3, 69, 11, 48, 53, 56, 53, 26, 9, 75, 65, 56, 28, 23, 31, 66, 61, 82, 16, 59, 81, 48, 17, 35, 95, 99, 59, 88, 41, 37, 30, 82, 91, 16, 84, 47], [28, 21, 41, 45, 97, 73, 64, 88, 13, 94, 43, 97, 58, 88, 20, 63, 1, 23, 33, 57, 81, 54, 66, 95, 31, 54, 16, 37, 7, 1, 94, 18, 42, 39, 26, 75, 65, 57, 69, 86, 77, 17, 7, 71, 12, 38, 87, 48], [55, 54, 72, 15, 30, 55, 73, 21, 60, 78, 8, 47, 36, 73, 26, 84, 70, 34, 60, 23, 97, 85, 41, 90, 69, 55, 73, 45, 61, 33, 89, 52, 81, 19, 75, 8, 70, 6, 72, 57, 88, 60, 19, 52, 41, 91, 84, 88], [38, 69, 16, 39, 97, 74, 51, 5, 83, 62, 41, 85, 67, 59, 92, 19, 80, 62, 53, 66, 8, 46, 12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45], [26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45, 26, 60, 69, 68, 86, 70, 31, 69, 7, 69, 4, 91, 73, 37, 2, 49, 83, 17, 17, 40, 51, 88, 77, 28, 46, 78, 87, 87, 74, 49, 17, 27, 62, 11, 83, 44], [91, 36, 16, 60, 87, 97, 52, 22, 78, 77, 86, 71, 38, 65, 51, 97, 86, 23, 15, 79, 31, 28, 67, 42, 25, 33, 97, 23, 92, 53, 16, 37, 5, 11, 12, 21, 18, 14, 33, 21, 26, 89, 25, 35, 63, 20, 63, 66], [12, 32, 97, 48, 95, 97, 59, 20, 37, 40, 61, 56, 14, 36, 76, 90, 34, 6, 46, 77, 22, 99, 83, 23, 64, 96, 44, 11, 68, 61, 76, 56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44, 67, 2, 58, 6, 42], [17, 37, 44, 23, 40, 85, 44, 31, 76, 93, 13, 90, 97, 98, 20, 47, 10, 65, 52, 63, 29, 54, 86, 50, 65, 44, 8, 9, 23, 84, 34, 16, 86, 62, 87, 65, 78, 52, 23, 38, 40, 8, 32, 40, 66, 48, 13, 27], [46, 71, 3, 85, 61, 72, 65, 17, 26, 29, 72, 38, 51, 43, 72, 8, 25, 55, 45, 91, 86, 67, 57, 49, 54, 47, 64, 24, 62, 33, 99, 40, 29, 8, 75, 16, 33, 64, 11, 29, 49, 88, 66, 5, 88, 53, 44, 7], [95, 94, 70, 69, 79, 27, 99, 54, 73, 23, 58, 17, 87, 46, 47, 93, 59, 45, 62, 54, 75, 13, 12, 2, 42, 54, 11, 78, 22, 85, 49, 37, 36, 89, 49, 58, 3, 66, 91, 33, 18, 48, 75, 71, 37, 50, 36, 27], [22, 31, 40, 54, 64, 70, 53, 54, 54, 97, 71, 6, 64, 54, 65, 46, 42, 93, 75, 92, 56, 40, 15, 30, 23, 12, 92, 95, 30, 16, 30, 68, 33, 57, 97, 28, 85, 79, 26, 14, 57, 15, 66, 16, 37, 11, 11, 33], [2, 33, 63, 3, 84, 33, 26, 34, 78, 52, 93, 66, 72, 27, 72, 71, 75, 94, 49, 47, 21, 21, 71, 84, 61, 14, 20, 5, 31, 62, 12, 56, 56, 12, 66, 26, 68, 30, 98, 20, 66, 35, 79, 51, 14, 55, 36, 53], [54, 63, 94, 58, 27, 2, 85, 78, 91, 85, 23, 35, 62, 72, 59, 76, 64, 92, 41, 33, 97, 9, 79, 74, 49, 2, 3, 23, 74, 19, 18, 35, 54, 60, 9, 95, 94, 52, 50, 12, 17, 91, 85, 49, 48, 27, 14, 55], [13, 3, 64, 88, 96, 72, 99, 23, 80, 73, 39, 58, 18, 54, 31, 64, 42, 37, 98, 70, 78, 88, 97, 42, 83, 29, 70, 3, 18, 85, 29, 52, 42, 52, 36, 95, 8, 96, 80, 86, 2, 51, 15, 17, 13, 54, 99, 25], [74, 75, 33, 78, 98, 22, 44, 4, 26, 1, 10, 2, 29, 25, 87, 94, 60, 89, 13, 40, 34, 35, 79, 39, 42, 84, 86, 25, 14, 83, 86, 87, 1, 39, 30, 5, 94, 71, 62, 77, 31, 7, 29, 51, 89, 77, 79, 51], [94, 71, 69, 14, 94, 23, 80, 88, 43, 56, 21, 30, 76, 40, 94, 22, 2, 23, 87, 86, 62, 30, 27, 98, 75, 93, 37, 70, 16, 20, 74, 46, 74, 25, 59, 86, 32, 17, 90, 80, 10, 17, 2, 66, 29, 4, 30, 61], [58, 76, 34, 78, 24, 88, 82, 25, 89, 25, 92, 30, 55, 89, 24, 39, 77, 2, 34, 16, 48, 24, 50, 2, 93, 39, 81, 59, 23, 12, 77, 69, 15, 60, 64, 2, 70, 64, 36, 87, 13, 2, 5, 40, 80, 64, 39, 35], [57, 41, 45, 34, 19, 90, 42, 17, 35, 76, 35, 6, 52, 74, 43, 23, 83, 43, 53, 72, 73, 67, 97, 66, 34, 35, 82, 27, 27, 64, 39, 60, 81, 73, 96, 23, 78, 11, 4, 51, 38, 51, 48, 80, 36, 25, 5, 74]],1,32,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [69, 62, 79, 46, 48, 38, 61, 81, 17, 48, 33, 18, 36, 54, 3, 89, 99, 20], [31, 21, 34, 57, 37, 1, 57, 55, 31, 23, 75, 48, 20, 7, 99, 2, 97, 40], [24, 74, 9, 43, 97, 51, 85, 78, 50, 87, 76, 22, 92, 91, 10, 82, 88, 67], [4, 30, 85, 22, 92, 73, 41, 16, 56, 69, 14, 52, 14, 47, 16, 43, 68, 37], [14, 41, 87, 73, 24, 75, 92, 19, 83, 12, 47, 98, 12, 3, 30, 58, 46, 51], [99, 15, 43, 22, 9, 92, 93, 39, 81, 68, 57, 68, 7, 2, 54, 37, 74, 82], [28, 59, 46, 63, 35, 99, 94, 85, 58, 89, 13, 71, 6, 84, 45, 5, 38, 44], [25, 82, 88, 15, 72, 77, 39, 48, 52, 60, 89, 23, 69, 52, 86, 22, 25, 55], [64, 65, 4, 52, 32, 53, 26, 79, 35, 91, 14, 34, 60, 25, 54, 27, 21, 48], [35, 52, 70, 99, 26, 15, 5, 90, 33, 25, 81, 52, 44, 20, 56, 66, 8, 83], [64, 29, 48, 19, 9, 72, 15, 98, 68, 63, 91, 38, 47, 13, 96, 99, 46, 36], [10, 55, 23, 23, 68, 44, 5, 4, 30, 52, 97, 13, 18, 32, 33, 58, 62, 71], [14, 14, 10, 59, 39, 46, 18, 19, 37, 3, 55, 7, 71, 52, 54, 38, 63, 64], [6, 74, 52, 44, 36, 37, 64, 48, 27, 65, 1, 48, 85, 37, 92, 49, 55, 39], [36, 66, 66, 68, 2, 65, 18, 41, 98, 91, 39, 26, 75, 3, 49, 28, 16, 99], [22, 80, 97, 77, 49, 28, 16, 64, 60, 66, 26, 42, 92, 3, 21, 32, 70, 69], [24, 65, 23, 80, 8, 45, 89, 11, 57, 12, 72, 10, 63, 35, 38, 21, 51, 18]],10,12,), ([[0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 93, 66, 82, 36, 56], [21, 97, 63, 2, 74, 15, 62, 12, 3, 4, 9, 46, 42, 74, 31, 37, 11, 61, 27, 46, 70, 94, 43, 99, 45], [18, 50, 6, 13, 12, 7, 14, 73, 99, 47, 7, 39, 56, 85, 19, 27, 61, 66, 52, 56, 14, 33, 12, 85, 94], [86, 66, 93, 24, 96, 45, 76, 55, 71, 53, 66, 19, 51, 82, 98, 66, 45, 40, 83, 6, 51, 41, 47, 17, 23], [40, 73, 37, 85, 58, 21, 27, 11, 39, 94, 63, 28, 84, 47, 47, 4, 61, 18, 50, 93, 36, 91, 1, 35, 5], [6, 60, 5, 32, 39, 95, 40, 42, 74, 95, 8, 91, 29, 60, 78, 23, 4, 34, 38, 61, 27, 83, 31, 3, 93], [77, 27, 43, 60, 96, 46, 37, 67, 6, 59, 3, 77, 11, 27, 2, 64, 44, 76, 55, 40, 76, 23, 64, 95, 57], [10, 35, 6, 89, 95, 54, 94, 79, 67, 82, 56, 81, 60, 14, 46, 16, 27, 37, 97, 61, 20, 25, 50, 58, 78], [37, 5, 54, 37, 74, 10, 9, 78, 33, 93, 24, 70, 57, 26, 39, 44, 64, 48, 67, 48, 40, 46, 96, 90, 3], [76, 14, 83, 4, 12, 99, 23, 3, 3, 42, 80, 77, 19, 28, 38, 9, 56, 17, 7, 72, 76, 54, 28, 66, 28], [25, 91, 99, 79, 49, 48, 99, 47, 62, 33, 42, 87, 27, 8, 62, 38, 4, 54, 48, 69, 16, 61, 18, 45, 18], [8, 29, 21, 54, 91, 47, 66, 68, 48, 76, 80, 89, 23, 17, 61, 52, 42, 51, 1, 21, 57, 36, 2, 23, 60], [59, 66, 43, 59, 74, 73, 93, 90, 36, 60, 93, 4, 21, 97, 95, 92, 97, 4, 4, 33, 14, 9, 88, 64, 62], [89, 7, 92, 5, 13, 2, 84, 12, 91, 7, 34, 21, 60, 82, 10, 38, 58, 56, 44, 85, 80, 64, 20, 50, 54], [46, 40, 24, 85, 58, 31, 50, 10, 84, 14, 19, 30, 57, 16, 22, 54, 84, 70, 43, 97, 19, 5, 71, 98, 20], [15, 38, 1, 5, 98, 54, 85, 61, 78, 17, 76, 27, 70, 25, 91, 45, 2, 22, 96, 54, 17, 61, 66, 26, 56], [33, 1, 40, 43, 44, 62, 36, 56, 39, 89, 13, 39, 12, 21, 87, 18, 13, 19, 35, 46, 57, 34, 62, 56, 1], [57, 86, 28, 4, 71, 75, 76, 40, 53, 39, 35, 98, 82, 10, 51, 64, 79, 59, 26, 3, 77, 98, 17, 65, 78], [1, 88, 57, 11, 67, 77, 55, 86, 41, 59, 30, 25, 71, 64, 89, 25, 66, 34, 55, 58, 86, 54, 1, 18, 16], [56, 74, 31, 48, 77, 34, 34, 60, 76, 37, 40, 17, 41, 56, 54, 79, 13, 46, 72, 17, 11, 40, 46, 65, 32], [52, 10, 59, 15, 3, 9, 8, 74, 8, 16, 11, 23, 56, 56, 22, 18, 39, 3, 8, 5, 91, 5, 19, 81, 61], [46, 18, 61, 60, 2, 50, 63, 71, 49, 80, 71, 18, 90, 93, 16, 46, 94, 25, 8, 64, 14, 22, 78, 91, 35], [51, 76, 43, 85, 75, 3, 73, 55, 19, 42, 61, 23, 80, 4, 96, 65, 4, 59, 90, 91, 80, 30, 33, 80, 33], [20, 95, 48, 27, 32, 86, 27, 25, 66, 87, 12, 46, 48, 85, 75, 85, 37, 4, 90, 84, 61, 71, 47, 91, 47], [17, 32, 10, 50, 75, 59, 18, 66, 35, 6, 3, 71, 35, 77, 66, 66, 51, 72, 73, 34, 39, 95, 93, 49, 47]],15,17,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 83, 85, 49, 74], [4, 62, 18, 60, 64, 20, 52, 36, 62, 48, 96, 57, 57, 91, 41, 88, 93, 53, 88, 62, 29, 39, 82], [10, 61, 56, 9, 50, 75, 12, 2, 90, 73, 17, 35, 46, 67, 70, 87, 35, 79, 72, 96, 34, 11, 3], [93, 10, 82, 82, 12, 91, 51, 83, 97, 89, 59, 2, 2, 5, 22, 33, 69, 28, 58, 14, 50, 74, 41], [15, 74, 68, 43, 55, 49, 18, 81, 95, 97, 25, 12, 55, 47, 85, 81, 84, 93, 67, 71, 64, 60, 97], [90, 84, 43, 37, 32, 99, 85, 52, 53, 56, 72, 2, 48, 16, 91, 36, 10, 92, 81, 89, 79, 18, 92], [2, 40, 42, 95, 95, 25, 1, 82, 16, 42, 37, 37, 71, 6, 78, 22, 95, 74, 46, 40, 54, 46, 36], [41, 98, 67, 23, 43, 61, 17, 93, 65, 3, 78, 75, 30, 21, 16, 62, 60, 9, 66, 26, 67, 15, 12], [19, 14, 15, 87, 11, 63, 43, 67, 43, 1, 4, 85, 25, 84, 74, 82, 97, 53, 35, 25, 3, 51, 50], [13, 35, 89, 55, 18, 51, 30, 40, 30, 58, 88, 90, 65, 97, 72, 12, 8, 75, 78, 18, 65, 85, 10], [37, 29, 46, 88, 44, 36, 18, 79, 32, 20, 34, 73, 41, 98, 35, 57, 27, 18, 21, 18, 27, 95, 28], [97, 15, 45, 47, 36, 19, 99, 96, 45, 57, 76, 29, 98, 16, 22, 72, 55, 12, 98, 16, 55, 47, 73], [27, 99, 11, 83, 95, 15, 53, 91, 33, 71, 87, 22, 65, 58, 27, 75, 12, 60, 85, 72, 77, 33, 66], [9, 77, 26, 45, 55, 52, 9, 79, 7, 57, 57, 37, 73, 78, 30, 51, 47, 84, 54, 23, 79, 58, 56], [31, 68, 89, 62, 83, 60, 37, 34, 1, 41, 95, 44, 35, 27, 21, 72, 82, 23, 41, 93, 80, 50, 74], [81, 22, 40, 2, 42, 30, 44, 83, 10, 84, 63, 24, 6, 45, 18, 16, 40, 16, 79, 70, 97, 13, 68], [96, 50, 29, 58, 7, 97, 5, 40, 4, 7, 80, 37, 75, 59, 50, 69, 29, 55, 89, 67, 96, 30, 20], [94, 67, 61, 44, 56, 79, 60, 41, 78, 40, 50, 10, 17, 15, 93, 53, 98, 99, 73, 51, 81, 66, 26], [38, 92, 30, 55, 9, 92, 16, 24, 86, 20, 62, 52, 78, 52, 43, 96, 10, 66, 71, 65, 15, 75, 84], [50, 41, 60, 33, 52, 38, 84, 64, 10, 96, 50, 63, 59, 12, 58, 89, 9, 49, 61, 81, 78, 88, 51], [45, 67, 80, 18, 61, 50, 14, 10, 74, 6, 3, 86, 2, 76, 1, 52, 13, 32, 25, 38, 5, 18, 10], [53, 83, 34, 30, 32, 11, 86, 30, 1, 6, 78, 56, 67, 58, 79, 95, 19, 61, 62, 86, 71, 91, 35], [43, 5, 46, 35, 87, 36, 4, 61, 2, 35, 46, 4, 60, 48, 4, 70, 51, 17, 4, 86, 57, 85, 76]],17,22,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_SEQUENCE_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_POSSIBLE_DECODINGS_GIVEN_DIGIT_SEQUENCE_1{ static int f_gold ( char digits [ ] , int n ) { int count [ ] = new int [ n + 1 ] ; count [ 0 ] = 1 ; count [ 1 ] = 1 ; if ( digits [ 0 ] == '0' ) return 0 ; for ( int i = 2 ; i <= n ; i ++ ) { count [ i ] = 0 ; if ( digits [ i - 1 ] > '0' ) count [ i ] = count [ i - 1 ] ; if ( digits [ i - 2 ] == '1' || ( digits [ i - 2 ] == '2' && digits [ i - 1 ] < '7' ) ) count [ i ] += count [ i - 2 ] ; } return count [ n ] ; }
def f_gold ( digits , n ) : count = [ 0 ] * ( n + 1 ) ; count [ 0 ] = 1 ; count [ 1 ] = 1 ; for i in range ( 2 , n + 1 ) : count [ i ] = 0 ; if ( digits [ i - 1 ] > '0' ) : count [ i ] = count [ i - 1 ] ; if ( digits [ i - 2 ] == '1' or ( digits [ i - 2 ] == '2' and digits [ i - 1 ] < '7' ) ) : count [ i ] += count [ i - 2 ] ; return count [ n ] ;
null
public static void main(String args[]) { int n_success = 0; List<char [ ]> param0 = new ArrayList<>(); param0.add(new char[]{'B','C','E','E','F','F','G','J','K','K','L','L','M','O','O','P','Q','R','V','X','Z','a','a','a','c','c','c','d','e','g','g','k','k','k','l','m','m','n','p','t','y','z'}); param0.add(new char[]{'0','9','5','0','2','6','5','4','4','5','2','6','8','2','0','3','1','9','0','1','5'}); param0.add(new char[]{'0','0','0','0','0','0','0','0','0','0','0','0','1','1','1','1','1','1','1','1','1','1','1','1','1','1'}); param0.add(new char[]{'x','a','R','O','S','r','g','e','Y','Z','t'}); param0.add(new char[]{'0','1','1','1','2','2','2','2','2','2','2','3','3','4','4','5','5','5','5','5','6','6','7','7','7','7','8','8'}); param0.add(new char[]{'1','1','1','1','1','1'}); param0.add(new char[]{' ',' ',' ','B','B','C','D','F','H','I','J','K','L','O','P','V','W','W','Z','Z','a','c','h','i','q','s','x'}); param0.add(new char[]{'0','9','1','5','2','4','9','3'}); param0.add(new char[]{'0','0','0','1','1','1'}); param0.add(new char[]{'w','t','U','R','a','c','G'}); List<Integer> param1 = new ArrayList<>(); param1.add(31); param1.add(13); param1.add(19); param1.add(5); param1.add(21); param1.add(4); param1.add(26); param1.add(5); param1.add(4); param1.add(5); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (['B', 'C', 'E', 'E', 'F', 'F', 'G', 'J', 'K', 'K', 'L', 'L', 'M', 'O', 'O', 'P', 'Q', 'R', 'V', 'X', 'Z', 'a', 'a', 'a', 'c', 'c', 'c', 'd', 'e', 'g', 'g', 'k', 'k', 'k', 'l', 'm', 'm', 'n', 'p', 't', 'y', 'z'],31,), (['0', '9', '5', '0', '2', '6', '5', '4', '4', '5', '2', '6', '8', '2', '0', '3', '1', '9', '0', '1', '5'],13,), (['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],19,), (['x', 'a', 'R', 'O', 'S', 'r', 'g', 'e', 'Y', 'Z', 't'],5,), (['0', '1', '1', '1', '2', '2', '2', '2', '2', '2', '2', '3', '3', '4', '4', '5', '5', '5', '5', '5', '6', '6', '7', '7', '7', '7', '8', '8'],21,), (['1', '1', '1', '1', '1', '1'],4,), ([' ', ' ', ' ', 'B', 'B', 'C', 'D', 'F', 'H', 'I', 'J', 'K', 'L', 'O', 'P', 'V', 'W', 'W', 'Z', 'Z', 'a', 'c', 'h', 'i', 'q', 's', 'x'],26,), (['0', '9', '1', '5', '2', '4', '9', '3'],5,), (['0', '0', '0', '1', '1', '1'],4,), (['w', 't', 'U', 'R', 'a', 'c', 'G'],5,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
PERFECT_REVERSIBLE_STRING
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PERFECT_REVERSIBLE_STRING{ static boolean f_gold ( String str ) { int i = 0 , j = str . length ( ) - 1 ; while ( i < j ) { if ( str . charAt ( i ) != str . charAt ( j ) ) return false ; i ++ ; j -- ; } return true ; }
def f_gold ( str ) : i = 0 ; j = len ( str ) - 1 ; while ( i < j ) : if ( str [ i ] != str [ j ] ) : return False ; i += 1 ; j -= 1 ; return True ;
using namespace std; bool f_gold ( string str ) { int i = 0, j = str . length ( ) - 1; while ( i < j ) { if ( str [ i ] != str [ j ] ) return false; i ++; j --; } return true; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("ab"); param0.add("303"); param0.add("11110000"); param0.add("aba"); param0.add("404"); param0.add("10101"); param0.add("abab"); param0.add("6366"); param0.add("001"); param0.add(""); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('ab',), ('303',), ('11110000',), ('aba',), ('404',), ('10101',), ('abab',), ('6366',), ('001',), ('',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"ab","303","11110000","aba","404","10101","abab","6366","001",""}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2{ static boolean f_gold ( int n ) { return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ( n & 0xAAAAAAAA ) == 0 ; }
def f_gold ( n ) : return ( n != 0 and ( ( n & ( n - 1 ) ) == 0 ) and not ( n & 0xAAAAAAAA ) ) ;
using namespace std; bool f_gold ( unsigned int n ) { return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) && ! ( n & 0xAAAAAAAA ); }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(1); param0.add(4); param0.add(64); param0.add(-64); param0.add(128); param0.add(1024); param0.add(97); param0.add(86); param0.add(14); param0.add(99); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (1,), (4,), (64,), (-64,), (128,), (1024,), (97,), (86,), (14,), (99,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {1,4,64,-64,128,1024,97,86,14,99}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE{ static int f_gold ( int arr [ ] , int n ) { int brr [ ] = new int [ 2 * n + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) brr [ i ] = arr [ i ] ; for ( int i = 0 ; i < n ; i ++ ) brr [ n + i ] = arr [ i ] ; int maxHam = 0 ; for ( int i = 1 ; i < n ; i ++ ) { int currHam = 0 ; for ( int j = i , k = 0 ; j < ( i + n ) ; j ++ , k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++ ; if ( currHam == n ) return n ; maxHam = Math . max ( maxHam , currHam ) ; } return maxHam ; }
def f_gold ( arr , n ) : brr = [ 0 ] * ( 2 * n + 1 ) for i in range ( n ) : brr [ i ] = arr [ i ] for i in range ( n ) : brr [ n + i ] = arr [ i ] maxHam = 0 for i in range ( 1 , n ) : currHam = 0 k = 0 for j in range ( i , i + n ) : if brr [ j ] != arr [ k ] : currHam += 1 k = k + 1 if currHam == n : return n maxHam = max ( maxHam , currHam ) return maxHam
using namespace std; int f_gold ( int arr [ ], int n ) { int brr [ 2 * n + 1 ]; for ( int i = 0; i < n; i ++ ) brr [ i ] = arr [ i ]; for ( int i = 0; i < n; i ++ ) brr [ n + i ] = arr [ i ]; int maxHam = 0; for ( int i = 1; i < n; i ++ ) { int currHam = 0; for ( int j = i, k = 0; j < ( i + n ); j ++, k ++ ) if ( brr [ j ] != arr [ k ] ) currHam ++; if ( currHam == n ) return n; maxHam = max ( maxHam, currHam ); } return maxHam; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96}); param0.add(new int[]{52,-28}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{24}); param0.add(new int[]{-68,14,36,62}); param0.add(new int[]{1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0}); param0.add(new int[]{7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99}); param0.add(new int[]{-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70}); param0.add(new int[]{0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{61,89,8}); List<Integer> param1 = new ArrayList<>(); param1.add(12); param1.add(1); param1.add(21); param1.add(0); param1.add(2); param1.add(12); param1.add(15); param1.add(14); param1.add(8); param1.add(2); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([1, 4, 18, 22, 28, 34, 35, 39, 44, 45, 67, 73, 75, 79, 81, 83, 89, 93, 96],12,), ([52, -28],1,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],21,), ([24],0,), ([-68, 14, 36, 62],2,), ([1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0],12,), ([7, 10, 19, 22, 24, 28, 29, 39, 46, 55, 62, 66, 68, 73, 74, 76, 83, 84, 85, 99],15,), ([-38, 56, 86, 12, 24, -90, -20, -46, 38, 92, -44, -74, 54, 50, 46, 50, -94, 64, 32, -84, 70],14,), ([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],8,), ([61, 89, 8],2,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{1,4,18,22,28,34,35,39,44,45,67,73,75,79,81,83,89,93,96},{52,-28},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{24},{-68,14,36,62},{1,0,1,1,1,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0},{7,10,19,22,24,28,29,39,46,55,62,66,68,73,74,76,83,84,85,99},{-38,56,86,12,24,-90,-20,-46,38,92,-44,-74,54,50,46,50,-94,64,32,-84,70},{0,0,0,0,0,0,1,1,1,1,1,1,1},{61,89,8}}; vector<int> param1 {12,1,21,0,2,12,15,14,8,2}; 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; }
STOOGE_SORT
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; class STOOGE_SORT{ static void f_gold ( int arr [ ] , int l , int h ) { if ( l >= h ) return ; if ( arr [ l ] > arr [ h ] ) { int t = arr [ l ] ; arr [ l ] = arr [ h ] ; arr [ h ] = t ; } if ( h - l + 1 > 2 ) { int t = ( h - l + 1 ) / 3 ; f_gold ( arr , l , h - t ) ; f_gold ( arr , l + t , h ) ; f_gold ( arr , l , h - t ) ; } }
def f_gold ( arr , l , h ) : if l >= h : return if arr [ l ] > arr [ h ] : t = arr [ l ] arr [ l ] = arr [ h ] arr [ h ] = t if h - l + 1 > 2 : t = ( int ) ( ( h - l + 1 ) / 3 ) f_gold ( arr , l , ( h - t ) ) f_gold ( arr , l + t , ( h ) ) f_gold ( arr , l , ( h - t ) )
using namespace std; void f_gold ( int arr [ ], int l, int h ) { if ( l >= h ) return; if ( arr [ l ] > arr [ h ] ) swap ( arr [ l ], arr [ h ] ); if ( h - l + 1 > 2 ) { int t = ( h - l + 1 ) / 3; f_gold ( arr, l, h - t ); f_gold ( arr, l + t, h ); f_gold ( arr, l, h - t ); } }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{6,25,42,52,53,54,58,66,67,70}); param0.add(new int[]{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{7,49,26,33,48,79,2,71,32,4,20,36}); param0.add(new int[]{88}); param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0}); param0.add(new int[]{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99}); param0.add(new int[]{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34}); param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}); List<Integer> param1 = new ArrayList<>(); param1.add(6); param1.add(16); param1.add(28); param1.add(9); param1.add(0); param1.add(20); param1.add(28); param1.add(15); param1.add(12); param1.add(27); List<Integer> param2 = new ArrayList<>(); param2.add(6); param2.add(14); param2.add(24); param2.add(10); param2.add(0); param2.add(28); param2.add(29); param2.add(11); param2.add(17); param2.add(20); List<int [ ]> filled_function_param0 = new ArrayList<>(); filled_function_param0.add(new int[]{6,25,42,52,53,54,58,66,67,70}); filled_function_param0.add(new int[]{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{7,49,26,33,48,79,2,71,32,4,20,36}); filled_function_param0.add(new int[]{88}); filled_function_param0.add(new int[]{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0}); filled_function_param0.add(new int[]{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99}); filled_function_param0.add(new int[]{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34}); filled_function_param0.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); filled_function_param0.add(new int[]{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}); List<Integer> filled_function_param1 = new ArrayList<>(); filled_function_param1.add(6); filled_function_param1.add(16); filled_function_param1.add(28); filled_function_param1.add(9); filled_function_param1.add(0); filled_function_param1.add(20); filled_function_param1.add(28); filled_function_param1.add(15); filled_function_param1.add(12); filled_function_param1.add(27); List<Integer> filled_function_param2 = new ArrayList<>(); filled_function_param2.add(6); filled_function_param2.add(14); filled_function_param2.add(24); filled_function_param2.add(10); filled_function_param2.add(0); filled_function_param2.add(28); filled_function_param2.add(29); filled_function_param2.add(11); filled_function_param2.add(17); filled_function_param2.add(20); for(int i = 0; i < param0.size(); ++i) { f_filled(filled_function_param0.get(i),filled_function_param1.get(i),filled_function_param2.get(i)); f_gold(param0.get(i),param1.get(i),param2.get(i)); if(Arrays.equals(param0.get(i), filled_function_param0.get(i)) && param1.get(i) == filled_function_param1.get(i) && param2.get(i) == filled_function_param2.get(i)) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([6, 25, 42, 52, 53, 54, 58, 66, 67, 70],6,6,), ([-13, -98, 50, -63, 48, 3, -76, 12, -35, 93, 29, 17, 16, 5, -97, -54, -45, -25],16,14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,24,), ([7, 49, 26, 33, 48, 79, 2, 71, 32, 4, 20, 36],9,10,), ([88],0,0,), ([1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],20,28,), ([2, 2, 4, 5, 7, 12, 12, 14, 14, 16, 17, 29, 29, 31, 32, 39, 41, 47, 48, 49, 51, 54, 58, 58, 59, 60, 73, 78, 80, 81, 82, 83, 84, 85, 90, 95, 97, 99, 99],28,29,), ([-31, -55, 6, 37, 77, 61, 0, 46, -91, -38, 85, -71, 25, 14, 53, 43, 34],15,11,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,17,), ([77, 68, 78, 97, 92, 52, 37, 8, 44, 98, 5, 69, 31, 45, 9, 32, 33, 67, 30, 76, 29, 3, 90, 57, 30, 9, 26, 2, 62, 3, 46, 68, 25, 51, 13, 44, 35, 55],27,20,) ] filled_function_param = [ ([6, 25, 42, 52, 53, 54, 58, 66, 67, 70],6,6,), ([-13, -98, 50, -63, 48, 3, -76, 12, -35, 93, 29, 17, 16, 5, -97, -54, -45, -25],16,14,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],28,24,), ([7, 49, 26, 33, 48, 79, 2, 71, 32, 4, 20, 36],9,10,), ([88],0,0,), ([1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],20,28,), ([2, 2, 4, 5, 7, 12, 12, 14, 14, 16, 17, 29, 29, 31, 32, 39, 41, 47, 48, 49, 51, 54, 58, 58, 59, 60, 73, 78, 80, 81, 82, 83, 84, 85, 90, 95, 97, 99, 99],28,29,), ([-31, -55, 6, 37, 77, 61, 0, 46, -91, -38, 85, -71, 25, 14, 53, 43, 34],15,11,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],12,17,), ([77, 68, 78, 97, 92, 52, 37, 8, 44, 98, 5, 69, 31, 45, 9, 32, 33, 67, 30, 76, 29, 3, 90, 57, 30, 9, 26, 2, 62, 3, 46, 68, 25, 51, 13, 44, 35, 55],27,20,) ] n_success = 0 for i, parameters_set in enumerate(param): f_filled(*(filled_function_param[i])) f_gold(*parameters_set) if parameters_set == filled_function_param[i]: n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{6,25,42,52,53,54,58,66,67,70},{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{7,49,26,33,48,79,2,71,32,4,20,36},{88},{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0},{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99},{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}}; vector<int> param1 {6,16,28,9,0,20,28,15,12,27}; vector<int> param2 {6,14,24,10,0,28,29,11,17,20}; vector<vector<int>> filled_function_param0 {{6,25,42,52,53,54,58,66,67,70},{-13,-98,50,-63,48,3,-76,12,-35,93,29,17,16,5,-97,-54,-45,-25},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{7,49,26,33,48,79,2,71,32,4,20,36},{88},{1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,0},{2,2,4,5,7,12,12,14,14,16,17,29,29,31,32,39,41,47,48,49,51,54,58,58,59,60,73,78,80,81,82,83,84,85,90,95,97,99,99},{-31,-55,6,37,77,61,0,46,-91,-38,85,-71,25,14,53,43,34},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{77,68,78,97,92,52,37,8,44,98,5,69,31,45,9,32,33,67,30,76,29,3,90,57,30,9,26,2,62,3,46,68,25,51,13,44,35,55}}; vector<int> filled_function_param1 {6,16,28,9,0,20,28,15,12,27}; vector<int> filled_function_param2 {6,14,24,10,0,28,29,11,17,20}; for(int i = 0; i < param0.size(); ++i) { f_filled(&filled_function_param0[i].front(),filled_function_param1[i],filled_function_param2[i]); f_gold(&param0[i].front(),param1[i],param2[i]); if(equal(begin(param0[i]), end(param0[i]), begin(filled_function_param0[i])) && param1[i] == filled_function_param1[i] && param2[i] == filled_function_param2[i]) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_DIGITS_FACTORIAL_SET_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_DIGITS_FACTORIAL_SET_1{ static int f_gold ( int n ) { if ( n < 0 ) return 0 ; if ( n <= 1 ) return 1 ; double digits = 0 ; for ( int i = 2 ; i <= n ; i ++ ) digits += Math . log10 ( i ) ; return ( int ) ( Math . floor ( digits ) ) + 1 ; }
import math def f_gold ( n ) : if ( n < 0 ) : return 0 ; if ( n <= 1 ) : return 1 ; digits = 0 ; for i in range ( 2 , n + 1 ) : digits += math.log10 ( i ) ; return math.floor ( digits ) + 1 ;
using namespace std; int f_gold ( int n ) { if ( n < 0 ) return 0; if ( n <= 1 ) return 1; double digits = 0; for ( int i = 2; i <= n; i ++ ) digits += log10 ( i ); return floor ( digits ) + 1; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(66); param0.add(7); param0.add(55); param0.add(37); param0.add(76); param0.add(16); param0.add(17); param0.add(95); param0.add(71); param0.add(90); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (66,), (7,), (55,), (37,), (76,), (16,), (17,), (95,), (71,), (90,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {66,7,55,37,76,16,17,95,71,90}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE{ static int f_gold ( int a ) { return 4 * a ; }
def f_gold ( a ) : return ( 4 * a )
using namespace std; int f_gold ( int a ) { return 4 * a; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(98); param0.add(9); param0.add(18); param0.add(38); param0.add(84); param0.add(8); param0.add(39); param0.add(6); param0.add(60); param0.add(47); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (98,), (9,), (18,), (38,), (84,), (8,), (39,), (6,), (60,), (47,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {98,9,18,38,84,8,39,6,60,47}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
SPACE_OPTIMIZED_SOLUTION_LCS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SPACE_OPTIMIZED_SOLUTION_LCS{ public static int f_gold ( String X , String Y ) { int m = X . length ( ) , n = Y . length ( ) ; int L [ ] [ ] = new int [ 2 ] [ n + 1 ] ; int bi = 0 ; for ( int i = 0 ; i <= m ; i ++ ) { bi = i & 1 ; for ( int j = 0 ; j <= n ; j ++ ) { if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0 ; else if ( X . charAt ( i - 1 ) == Y . charAt ( j - 1 ) ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1 ; else L [ bi ] [ j ] = Math . max ( L [ 1 - bi ] [ j ] , L [ bi ] [ j - 1 ] ) ; } } return L [ bi ] [ n ] ; }
def f_gold ( X , Y ) : m = len ( X ) n = len ( Y ) L = [ [ 0 for i in range ( n + 1 ) ] for j in range ( 2 ) ] bi = bool for i in range ( m ) : bi = i & 1 for j in range ( n + 1 ) : if ( i == 0 or j == 0 ) : L [ bi ] [ j ] = 0 elif ( X [ i ] == Y [ j - 1 ] ) : L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1 else : L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ] , L [ bi ] [ j - 1 ] ) return L [ bi ] [ n ]
using namespace std; int f_gold ( string & X, string & Y ) { int m = X . length ( ), n = Y . length ( ); int L [ 2 ] [ n + 1 ]; bool bi; for ( int i = 0; i <= m; i ++ ) { bi = i & 1; for ( int j = 0; j <= n; j ++ ) { if ( i == 0 || j == 0 ) L [ bi ] [ j ] = 0; else if ( X [ i - 1 ] == Y [ j - 1 ] ) L [ bi ] [ j ] = L [ 1 - bi ] [ j - 1 ] + 1; else L [ bi ] [ j ] = max ( L [ 1 - bi ] [ j ], L [ bi ] [ j - 1 ] ); } } return L [ bi ] [ n ]; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("YNpjSv"); param0.add("736519"); param0.add("11010000100010"); param0.add("v "); param0.add("8311172"); param0.add("100011101011"); param0.add("u"); param0.add("3943042"); param0.add("101"); param0.add("MpbfF OsizevaM"); List<String> param1 = new ArrayList<>(); param1.add("qtUkJn"); param1.add("07592"); param1.add("0"); param1.add("qGBQT"); param1.add("157219329531"); param1.add("1000001111"); param1.add("YzkubTqLhP"); param1.add("3859"); param1.add("00010000101010"); param1.add("WgsFGaQwtp"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('YNpjSv','qtUkJn',), ('736519','07592',), ('11010000100010','0',), ('v ','qGBQT',), ('8311172','157219329531',), ('100011101011','1000001111',), ('u','YzkubTqLhP',), ('3943042','3859',), ('101','00010000101010',), ('MpbfF OsizevaM','WgsFGaQwtp',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"YNpjSv","736519","11010000100010","v ","8311172","100011101011","u","3943042","101","MpbfF OsizevaM"}; vector<string> param1 {"qtUkJn","07592","0","qGBQT","157219329531","1000001111","YzkubTqLhP","3859","00010000101010","WgsFGaQwtp"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
SUM_PAIRWISE_PRODUCTS_2
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_PAIRWISE_PRODUCTS_2{ static int f_gold ( int n ) { return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24 ; }
def f_gold ( n ) : return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24
using namespace std; long long int f_gold ( int n ) { return n * ( n + 1 ) * ( n + 2 ) * ( 3 * n + 1 ) / 24; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(57); param0.add(18); param0.add(97); param0.add(9); param0.add(42); param0.add(67); param0.add(71); param0.add(66); param0.add(69); param0.add(18); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (57,), (18,), (97,), (9,), (42,), (67,), (71,), (66,), (69,), (18,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {57,18,97,9,42,67,71,66,69,18}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_1{ public static int f_gold ( int n ) { int count = 0 ; for ( int curr = 19 ; ; curr += 9 ) { int sum = 0 ; for ( int x = curr ; x > 0 ; x = x / 10 ) sum = sum + x % 10 ; if ( sum == 10 ) count ++ ; if ( count == n ) return curr ; } }
def f_gold ( n ) : count = 0 ; curr = 19 ; while ( True ) : sum = 0 ; x = curr ; while ( x > 0 ) : sum = sum + x % 10 ; x = int ( x / 10 ) ; if ( sum == 10 ) : count += 1 ; if ( count == n ) : return curr ; curr += 9 ; return - 1 ;
using namespace std; int f_gold ( int n ) { int count = 0; for ( int curr = 19; ; curr += 9 ) { int sum = 0; for ( int x = curr; x > 0; x = x / 10 ) sum = sum + x % 10; if ( sum == 10 ) count ++; if ( count == n ) return curr; } return - 1; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(93); param0.add(10); param0.add(55); param0.add(94); param0.add(2); param0.add(5); param0.add(37); param0.add(4); param0.add(11); param0.add(46); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (93,), (10,), (55,), (94,), (2,), (5,), (37,), (4,), (11,), (46,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {93,10,55,94,2,5,37,4,11,46}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MINIMUM_OPERATION_MAKE_ELEMENTS_EQUAL_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MINIMUM_OPERATION_MAKE_ELEMENTS_EQUAL_ARRAY{ public static int f_gold ( int arr [ ] , int n ) { HashMap < Integer , Integer > hash = new HashMap < Integer , Integer > ( ) ; for ( int i = 0 ; i < n ; i ++ ) if ( hash . containsKey ( arr [ i ] ) ) hash . put ( arr [ i ] , hash . get ( arr [ i ] ) + 1 ) ; else hash . put ( arr [ i ] , 1 ) ; int max_count = 0 ; Set < Integer > s = hash . keySet ( ) ; for ( int i : s ) if ( max_count < hash . get ( i ) ) max_count = hash . get ( i ) ; return ( n - max_count ) ; }
null
using namespace std; int f_gold ( int arr [ ], int n ) { unordered_map < int, int > hash; for ( int i = 0; i < n; i ++ ) hash [ arr [ i ] ] ++; int max_count = 0; for ( auto i : hash ) if ( max_count < i . second ) max_count = i . second; return ( n - max_count ); }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98}); param0.add(new int[]{-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94}); param0.add(new int[]{0,1,1}); param0.add(new int[]{68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27}); param0.add(new int[]{-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94}); param0.add(new int[]{0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0}); param0.add(new int[]{3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97}); param0.add(new int[]{40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88}); param0.add(new int[]{0,0,1,1,1,1,1}); param0.add(new int[]{87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10}); List<Integer> param1 = new ArrayList<>(); param1.add(33); param1.add(11); param1.add(1); param1.add(36); param1.add(18); param1.add(21); param1.add(23); param1.add(36); param1.add(4); param1.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{2,4,6,8,17,25,29,33,33,33,38,42,43,49,55,60,62,63,68,69,70,75,77,79,79,85,87,87,90,90,90,90,94,98},{-66,-44,72,-82,46,66,-78,-62,32,86,62,56,22,-58,46,-6,94},{0,1,1},{68,78,2,48,1,10,18,67,97,31,72,12,25,39,51,12,29,46,93,66,28,29,5,86,97,59,7,94,64,13,42,48,25,33,10,1,5,32,14,27},{-98,-96,-78,-72,-64,-62,-56,-40,-36,-14,-8,4,18,22,28,32,52,56,58,60,78,88,94},{0,0,1,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0},{3,3,7,9,14,15,15,25,25,26,28,31,37,37,47,51,53,58,58,60,63,65,68,70,70,71,77,79,81,88,89,97},{40,-64,-62,74,-10,48,-56,70,-60,54,-6,74,-8,-54,-20,-50,40,-22,-54,-76,-92,-76,36,16,-42,58,-74,-90,-54,-32,-38,-50,74,26,52,38,24,-32,78,68,82,36,64,56,86,-28,-44,48,88},{0,0,1,1,1,1,1},{87,77,76,1,59,15,98,45,62,10,87,59,13,50,58,10}}; vector<int> param1 {33,11,1,36,18,21,23,36,4,9}; 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; }
SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_LARGEST_PRIME_FACTOR_NUMBER_LESS_EQUAL_N{ static int f_gold ( int n ) { int prime [ ] = new int [ n + 1 ] , sum = 0 ; Arrays . fill ( prime , 0 ) ; int max = n / 2 ; for ( int p = 2 ; p <= max ; p ++ ) { if ( prime [ p ] == 0 ) { for ( int i = p * 2 ; i <= n ; i += p ) prime [ i ] = p ; } } for ( int p = 2 ; p <= n ; p ++ ) { if ( prime [ p ] != 0 ) sum += prime [ p ] ; else sum += p ; } return sum ; }
def f_gold(n): prime = [0] * (n + 1) sum = 0 max = int(n / 2) for p in range(2, max + 1): if prime[p] == 0: for i in range(p * 2, n + 1, p): prime[i] = p for p in range(2, n + 1): if prime[p]: sum += prime[p] else: sum += p return sum
using namespace std; int f_gold ( int n ) { int prime [ n + 1 ], sum = 0; memset ( prime, 0, sizeof ( prime ) ); int max = n / 2; for ( int p = 2; p <= max; p ++ ) { if ( prime [ p ] == 0 ) { for ( int i = p * 2; i <= n; i += p ) prime [ i ] = p; } } for ( int p = 2; p <= n; p ++ ) { if ( prime [ p ] ) sum += prime [ p ]; else sum += p; } return sum; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(6); param0.add(35); param0.add(87); param0.add(91); param0.add(63); param0.add(11); param0.add(66); param0.add(17); param0.add(92); param0.add(81); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (6,), (35,), (87,), (91,), (63,), (11,), (66,), (17,), (92,), (81,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {6,35,87,91,63,11,66,17,92,81}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_1{ static int f_gold ( int arr1 [ ] , int arr2 [ ] , int m , int n , int x ) { int count = 0 ; HashSet < Integer > us = new HashSet < Integer > ( ) ; for ( int i = 0 ; i < m ; i ++ ) us . add ( arr1 [ i ] ) ; for ( int j = 0 ; j < n ; j ++ ) if ( us . contains ( x - arr2 [ j ] ) ) count ++ ; return count ; }
def f_gold ( arr1 , arr2 , m , n , x ) : count = 0 us = set ( ) for i in range ( m ) : us.add ( arr1 [ i ] ) for j in range ( n ) : if x - arr2 [ j ] in us : count += 1 return count
using namespace std; int f_gold ( int arr1 [ ], int arr2 [ ], int m, int n, int x ) { int count = 0; unordered_set < int > us; for ( int i = 0; i < m; i ++ ) us . insert ( arr1 [ i ] ); for ( int j = 0; j < n; j ++ ) if ( us . find ( x - arr2 [ j ] ) != us . end ( ) ) count ++; return count; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{1,2,5,5,9,11,12,14,16,18,35,36,39,44,50,52,52,59,69,81,82,84,85,87,87,87,88,88,89,90,90,92,97}); param0.add(new int[]{52,28,-38,78,-86,78,-48,-70,-80,28,-8,60,-28,90,6,76,32,-54,30,30,-32,-24,-36,62,36,-66,56,92,-20,90,32}); param0.add(new int[]{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1}); param0.add(new int[]{91,95,13,13,76,18,36,86,26,13,17,68,58,42,38,9,42,90,14,74,38,64,15}); param0.add(new int[]{-96,-94,-94,-92,-74,-70,-66,-54,-48,-20,-18,-10,-6,-2,2,18,36,48,52,58,68,74,88,90,94}); param0.add(new int[]{1,1,1,0,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1,1,0}); param0.add(new int[]{7,18,19,20,24,25,25,27,30,35,39,42,58,59,63,64,64,66,66,68,69,77,86,93}); param0.add(new int[]{86,44,10,80,12,52,-92,2,42,-32,-14,2,-42,40,96,22,58,-90,-20,22,96,10,-92,-28,-28,80,36,72,-2,32,-46,62,-58,20,22,32,-98,-2,-42,-90,10,70,54,-32}); param0.add(new int[]{0,0,1,1,1,1}); param0.add(new int[]{43,2,4,99,45,80,27,8,64,77,57,55,71,67,51,42,58,70,5,62,55,20,61,47,66,80,70,24,56,22,58,63,61,41,20,97,47}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{5,5,8,20,20,24,25,29,34,37,43,45,48,49,59,60,68,70,70,72,72,75,76,77,79,81,84,85,86,88,95,96,96}); param1.add(new int[]{-88,-32,30,32,-46,62,-92,-90,-18,-18,10,16,60,-40,32,-88,60,-82,76,50,86,-82,-48,-68,-42,34,4,0,98,92,-78}); param1.add(new int[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1}); param1.add(new int[]{16,96,8,35,12,27,81,21,32,82,95,81,53,76,72,16,9,16,61,1,36,71,28}); param1.add(new int[]{-92,-72,-72,-64,-58,-52,-30,-28,-24,-24,-16,-10,-2,4,12,22,30,38,44,62,64,68,86,88,90}); param1.add(new int[]{1,0,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0}); param1.add(new int[]{2,2,18,20,22,22,31,35,36,40,41,41,41,42,42,43,45,61,79,83,87,91,95,96}); param1.add(new int[]{-4,-76,-98,14,30,-10,-10,62,88,-94,-74,-82,84,44,58,8,-42,-66,-18,68,-78,42,-32,38,-98,38,-78,42,86,-38,-6,-72,-44,8,-6,-48,-62,82,94,-92,-56,28,-54,34}); param1.add(new int[]{0,0,1,1,1,1}); param1.add(new int[]{11,66,41,17,93,25,24,17,12,33,62,86,48,68,36,36,39,82,7,66,5,48,27,9,56,6,61,91,98,74,61,63,98,96,57,63,85}); List<Integer> param2 = new ArrayList<>(); param2.add(17); param2.add(30); param2.add(13); param2.add(11); param2.add(19); param2.add(18); param2.add(22); param2.add(26); param2.add(5); param2.add(24); List<Integer> param3 = new ArrayList<>(); param3.add(29); param3.add(27); param3.add(11); param3.add(12); param3.add(14); param3.add(19); param3.add(18); param3.add(36); param3.add(3); param3.add(29); List<Integer> param4 = new ArrayList<>(); param4.add(32); param4.add(17); param4.add(8); param4.add(15); param4.add(21); param4.add(29); param4.add(18); param4.add(31); param4.add(5); param4.add(21); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i),param4.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([1, 2, 5, 5, 9, 11, 12, 14, 16, 18, 35, 36, 39, 44, 50, 52, 52, 59, 69, 81, 82, 84, 85, 87, 87, 87, 88, 88, 89, 90, 90, 92, 97],[5, 5, 8, 20, 20, 24, 25, 29, 34, 37, 43, 45, 48, 49, 59, 60, 68, 70, 70, 72, 72, 75, 76, 77, 79, 81, 84, 85, 86, 88, 95, 96, 96],17,29,32,), ([52, 28, -38, 78, -86, 78, -48, -70, -80, 28, -8, 60, -28, 90, 6, 76, 32, -54, 30, 30, -32, -24, -36, 62, 36, -66, 56, 92, -20, 90, 32],[-88, -32, 30, 32, -46, 62, -92, -90, -18, -18, 10, 16, 60, -40, 32, -88, 60, -82, 76, 50, 86, -82, -48, -68, -42, 34, 4, 0, 98, 92, -78],30,27,17,), ([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],13,11,8,), ([91, 95, 13, 13, 76, 18, 36, 86, 26, 13, 17, 68, 58, 42, 38, 9, 42, 90, 14, 74, 38, 64, 15],[16, 96, 8, 35, 12, 27, 81, 21, 32, 82, 95, 81, 53, 76, 72, 16, 9, 16, 61, 1, 36, 71, 28],11,12,15,), ([-96, -94, -94, -92, -74, -70, -66, -54, -48, -20, -18, -10, -6, -2, 2, 18, 36, 48, 52, 58, 68, 74, 88, 90, 94],[-92, -72, -72, -64, -58, -52, -30, -28, -24, -24, -16, -10, -2, 4, 12, 22, 30, 38, 44, 62, 64, 68, 86, 88, 90],19,14,21,), ([1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0],[1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0],18,19,29,), ([7, 18, 19, 20, 24, 25, 25, 27, 30, 35, 39, 42, 58, 59, 63, 64, 64, 66, 66, 68, 69, 77, 86, 93],[2, 2, 18, 20, 22, 22, 31, 35, 36, 40, 41, 41, 41, 42, 42, 43, 45, 61, 79, 83, 87, 91, 95, 96],22,18,18,), ([86, 44, 10, 80, 12, 52, -92, 2, 42, -32, -14, 2, -42, 40, 96, 22, 58, -90, -20, 22, 96, 10, -92, -28, -28, 80, 36, 72, -2, 32, -46, 62, -58, 20, 22, 32, -98, -2, -42, -90, 10, 70, 54, -32],[-4, -76, -98, 14, 30, -10, -10, 62, 88, -94, -74, -82, 84, 44, 58, 8, -42, -66, -18, 68, -78, 42, -32, 38, -98, 38, -78, 42, 86, -38, -6, -72, -44, 8, -6, -48, -62, 82, 94, -92, -56, 28, -54, 34],26,36,31,), ([0, 0, 1, 1, 1, 1],[0, 0, 1, 1, 1, 1],5,3,5,), ([43, 2, 4, 99, 45, 80, 27, 8, 64, 77, 57, 55, 71, 67, 51, 42, 58, 70, 5, 62, 55, 20, 61, 47, 66, 80, 70, 24, 56, 22, 58, 63, 61, 41, 20, 97, 47],[11, 66, 41, 17, 93, 25, 24, 17, 12, 33, 62, 86, 48, 68, 36, 36, 39, 82, 7, 66, 5, 48, 27, 9, 56, 6, 61, 91, 98, 74, 61, 63, 98, 96, 57, 63, 85],24,29,21,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{1,2,5,5,9,11,12,14,16,18,35,36,39,44,50,52,52,59,69,81,82,84,85,87,87,87,88,88,89,90,90,92,97},{52,28,-38,78,-86,78,-48,-70,-80,28,-8,60,-28,90,6,76,32,-54,30,30,-32,-24,-36,62,36,-66,56,92,-20,90,32},{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},{91,95,13,13,76,18,36,86,26,13,17,68,58,42,38,9,42,90,14,74,38,64,15},{-96,-94,-94,-92,-74,-70,-66,-54,-48,-20,-18,-10,-6,-2,2,18,36,48,52,58,68,74,88,90,94},{1,1,1,0,0,0,1,1,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,1,0,1,1,0},{7,18,19,20,24,25,25,27,30,35,39,42,58,59,63,64,64,66,66,68,69,77,86,93},{86,44,10,80,12,52,-92,2,42,-32,-14,2,-42,40,96,22,58,-90,-20,22,96,10,-92,-28,-28,80,36,72,-2,32,-46,62,-58,20,22,32,-98,-2,-42,-90,10,70,54,-32},{0,0,1,1,1,1},{43,2,4,99,45,80,27,8,64,77,57,55,71,67,51,42,58,70,5,62,55,20,61,47,66,80,70,24,56,22,58,63,61,41,20,97,47}}; vector<vector<int>> param1 {{5,5,8,20,20,24,25,29,34,37,43,45,48,49,59,60,68,70,70,72,72,75,76,77,79,81,84,85,86,88,95,96,96},{-88,-32,30,32,-46,62,-92,-90,-18,-18,10,16,60,-40,32,-88,60,-82,76,50,86,-82,-48,-68,-42,34,4,0,98,92,-78},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},{16,96,8,35,12,27,81,21,32,82,95,81,53,76,72,16,9,16,61,1,36,71,28},{-92,-72,-72,-64,-58,-52,-30,-28,-24,-24,-16,-10,-2,4,12,22,30,38,44,62,64,68,86,88,90},{1,0,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0},{2,2,18,20,22,22,31,35,36,40,41,41,41,42,42,43,45,61,79,83,87,91,95,96},{-4,-76,-98,14,30,-10,-10,62,88,-94,-74,-82,84,44,58,8,-42,-66,-18,68,-78,42,-32,38,-98,38,-78,42,86,-38,-6,-72,-44,8,-6,-48,-62,82,94,-92,-56,28,-54,34},{0,0,1,1,1,1},{11,66,41,17,93,25,24,17,12,33,62,86,48,68,36,36,39,82,7,66,5,48,27,9,56,6,61,91,98,74,61,63,98,96,57,63,85}}; vector<int> param2 {17,30,13,11,19,18,22,26,5,24}; vector<int> param3 {29,27,11,12,14,19,18,36,3,29}; vector<int> param4 {32,17,8,15,21,29,18,31,5,21}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),&param1[i].front(),param2[i],param3[i],param4[i]) == f_gold(&param0[i].front(),&param1[i].front(),param2[i],param3[i],param4[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PERMUTE_TWO_ARRAYS_SUM_EVERY_PAIR_GREATER_EQUAL_K{ static boolean f_gold ( Integer a [ ] , int b [ ] , int n , int k ) { Arrays . sort ( a , Collections . reverseOrder ( ) ) ; Arrays . sort ( b ) ; for ( int i = 0 ; i < n ; i ++ ) if ( a [ i ] + b [ i ] < k ) return false ; return true ; }
def f_gold ( a , b , n , k ) : a.sort ( reverse = True ) b.sort ( ) for i in range ( n ) : if ( a [ i ] + b [ i ] < k ) : return False return True
using namespace std; bool f_gold ( int a [ ], int b [ ], int n, int k ) { sort ( a, a + n ); sort ( b, b + n, greater < int > ( ) ); for ( int i = 0; i < n; i ++ ) if ( a [ i ] + b [ i ] < k ) return false; return true; }
public static void main(String args[]) { int n_success = 0; List<Integer [ ]> param0 = new ArrayList<>(); param0.add(new Integer[]{9,12,16,25,27,40,43,52,52,70,87,88,90,97,99}); param0.add(new Integer[]{-96,-90,-80,10,-84,-96,-28,-42,30,-92,-44,-14,18,-68,-94,6,-76,72,-90,42,70,-78,56,-26,8,74,12,-74,20,-86,-74,-90,-98,92,30,94,14,92,88,-98,42,-48}); param0.add(new Integer[]{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new Integer[]{13,35,6,69,42,55,11,97,15,65,70,77,51,16,3,26,47,72,15,71,2,31,18,59,75,48}); param0.add(new Integer[]{-72,-70,-66,-64,-52,-52,-52,-48,-46,-42,-40,-34,-20,-4,-4,-2,2,4,16,16,18,18,32,36,52,54,56,56,58,68,72,74,84,84,90,90,92,94}); param0.add(new Integer[]{1,0,0,1,0,1,1,0,1,0,1,1,1,0,0,1,0,1,0}); param0.add(new Integer[]{8,17,18,21,23,32,34,37,44,48,53,58,64,66,66,72,72,79,80,80,80,82,87,92,93,94,96,96,98}); param0.add(new Integer[]{-20,-22,-16,-80,-88,22,-78,-82,-50,32,28,-8,-48,80,62,-14,14,10,-78,78,52,94,-66,14,50,18,-38,-98,24,18,-28,24,10,-88,-14}); param0.add(new Integer[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new Integer[]{75,31,58,10,92,65,45,72,53,91,39,33,10,13,67,85}); List<int [ ]> param1 = new ArrayList<>(); param1.add(new int[]{4,7,11,20,34,35,36,44,46,71,72,78,85,85,91}); param1.add(new int[]{-48,84,16,-72,96,-78,-76,-84,-76,-32,-50,62,-22,24,-32,94,8,-14,-20,44,-80,68,-44,60,94,-42,-44,-74,-98,-86,16,62,-80,18,-18,70,30,40,-56,76,-32,50}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1}); param1.add(new int[]{88,15,44,36,38,98,89,81,73,51,37,4,79,60,11,62,48,45,12,21,65,14,78,20,12,46}); param1.add(new int[]{-94,-76,-74,-56,-54,-50,-46,-38,-26,-24,-24,-22,-16,-10,-6,-4,-4,0,0,6,12,12,18,20,38,50,52,52,54,64,64,72,72,72,76,90,96,96}); param1.add(new int[]{1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1}); param1.add(new int[]{11,15,17,19,23,23,26,27,36,43,46,47,55,59,63,66,77,79,79,82,85,86,86,91,91,94,94,97,99}); param1.add(new int[]{6,-54,90,98,-30,88,36,88,38,12,46,-66,-80,32,42,-96,62,-44,-80,-14,20,2,70,-46,96,-40,52,56,96,-82,24,98,-16,90,66}); param1.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param1.add(new int[]{41,91,78,28,40,71,74,69,71,12,7,21,92,19,39,34}); List<Integer> param2 = new ArrayList<>(); param2.add(10); param2.add(40); param2.add(11); param2.add(25); param2.add(26); param2.add(13); param2.add(20); param2.add(31); param2.add(31); param2.add(14); List<Integer> param3 = new ArrayList<>(); param3.add(7); param3.add(38); param3.add(15); param3.add(16); param3.add(30); param3.add(13); param3.add(14); param3.add(24); param3.add(30); param3.add(8); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([9, 12, 16, 25, 27, 40, 43, 52, 52, 70, 87, 88, 90, 97, 99],[4, 7, 11, 20, 34, 35, 36, 44, 46, 71, 72, 78, 85, 85, 91],10,7,), ([-96, -90, -80, 10, -84, -96, -28, -42, 30, -92, -44, -14, 18, -68, -94, 6, -76, 72, -90, 42, 70, -78, 56, -26, 8, 74, 12, -74, 20, -86, -74, -90, -98, 92, 30, 94, 14, 92, 88, -98, 42, -48],[-48, 84, 16, -72, 96, -78, -76, -84, -76, -32, -50, 62, -22, 24, -32, 94, 8, -14, -20, 44, -80, 68, -44, 60, 94, -42, -44, -74, -98, -86, 16, 62, -80, 18, -18, 70, 30, 40, -56, 76, -32, 50],40,38,), ([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],11,15,), ([13, 35, 6, 69, 42, 55, 11, 97, 15, 65, 70, 77, 51, 16, 3, 26, 47, 72, 15, 71, 2, 31, 18, 59, 75, 48],[88, 15, 44, 36, 38, 98, 89, 81, 73, 51, 37, 4, 79, 60, 11, 62, 48, 45, 12, 21, 65, 14, 78, 20, 12, 46],25,16,), ([-72, -70, -66, -64, -52, -52, -52, -48, -46, -42, -40, -34, -20, -4, -4, -2, 2, 4, 16, 16, 18, 18, 32, 36, 52, 54, 56, 56, 58, 68, 72, 74, 84, 84, 90, 90, 92, 94],[-94, -76, -74, -56, -54, -50, -46, -38, -26, -24, -24, -22, -16, -10, -6, -4, -4, 0, 0, 6, 12, 12, 18, 20, 38, 50, 52, 52, 54, 64, 64, 72, 72, 72, 76, 90, 96, 96],26,30,), ([1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0],[1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1],13,13,), ([8, 17, 18, 21, 23, 32, 34, 37, 44, 48, 53, 58, 64, 66, 66, 72, 72, 79, 80, 80, 80, 82, 87, 92, 93, 94, 96, 96, 98],[11, 15, 17, 19, 23, 23, 26, 27, 36, 43, 46, 47, 55, 59, 63, 66, 77, 79, 79, 82, 85, 86, 86, 91, 91, 94, 94, 97, 99],20,14,), ([-20, -22, -16, -80, -88, 22, -78, -82, -50, 32, 28, -8, -48, 80, 62, -14, 14, 10, -78, 78, 52, 94, -66, 14, 50, 18, -38, -98, 24, 18, -28, 24, 10, -88, -14],[6, -54, 90, 98, -30, 88, 36, 88, 38, 12, 46, -66, -80, 32, 42, -96, 62, -44, -80, -14, 20, 2, 70, -46, 96, -40, 52, 56, 96, -82, 24, 98, -16, 90, 66],31,24,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],31,30,), ([75, 31, 58, 10, 92, 65, 45, 72, 53, 91, 39, 33, 10, 13, 67, 85],[41, 91, 78, 28, 40, 71, 74, 69, 71, 12, 7, 21, 92, 19, 39, 34],14,8,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{9,12,16,25,27,40,43,52,52,70,87,88,90,97,99},{-96,-90,-80,10,-84,-96,-28,-42,30,-92,-44,-14,18,-68,-94,6,-76,72,-90,42,70,-78,56,-26,8,74,12,-74,20,-86,-74,-90,-98,92,30,94,14,92,88,-98,42,-48},{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{13,35,6,69,42,55,11,97,15,65,70,77,51,16,3,26,47,72,15,71,2,31,18,59,75,48},{-72,-70,-66,-64,-52,-52,-52,-48,-46,-42,-40,-34,-20,-4,-4,-2,2,4,16,16,18,18,32,36,52,54,56,56,58,68,72,74,84,84,90,90,92,94},{1,0,0,1,0,1,1,0,1,0,1,1,1,0,0,1,0,1,0},{8,17,18,21,23,32,34,37,44,48,53,58,64,66,66,72,72,79,80,80,80,82,87,92,93,94,96,96,98},{-20,-22,-16,-80,-88,22,-78,-82,-50,32,28,-8,-48,80,62,-14,14,10,-78,78,52,94,-66,14,50,18,-38,-98,24,18,-28,24,10,-88,-14},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{75,31,58,10,92,65,45,72,53,91,39,33,10,13,67,85}}; vector<vector<int>> param1 {{4,7,11,20,34,35,36,44,46,71,72,78,85,85,91},{-48,84,16,-72,96,-78,-76,-84,-76,-32,-50,62,-22,24,-32,94,8,-14,-20,44,-80,68,-44,60,94,-42,-44,-74,-98,-86,16,62,-80,18,-18,70,30,40,-56,76,-32,50},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1},{88,15,44,36,38,98,89,81,73,51,37,4,79,60,11,62,48,45,12,21,65,14,78,20,12,46},{-94,-76,-74,-56,-54,-50,-46,-38,-26,-24,-24,-22,-16,-10,-6,-4,-4,0,0,6,12,12,18,20,38,50,52,52,54,64,64,72,72,72,76,90,96,96},{1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1},{11,15,17,19,23,23,26,27,36,43,46,47,55,59,63,66,77,79,79,82,85,86,86,91,91,94,94,97,99},{6,-54,90,98,-30,88,36,88,38,12,46,-66,-80,32,42,-96,62,-44,-80,-14,20,2,70,-46,96,-40,52,56,96,-82,24,98,-16,90,66},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{41,91,78,28,40,71,74,69,71,12,7,21,92,19,39,34}}; vector<int> param2 {10,40,11,25,26,13,20,31,31,14}; vector<int> param3 {7,38,15,16,30,13,14,24,30,8}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),&param1[i].front(),param2[i],param3[i]) == f_gold(&param0[i].front(),&param1[i].front(),param2[i],param3[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
SUM_TWO_LARGE_NUMBERS_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_TWO_LARGE_NUMBERS_1{ static String f_gold ( String str1 , String str2 ) { if ( str1 . length ( ) > str2 . length ( ) ) { String t = str1 ; str1 = str2 ; str2 = t ; } String str = "" ; int n1 = str1 . length ( ) , n2 = str2 . length ( ) ; int diff = n2 - n1 ; int carry = 0 ; for ( int i = n1 - 1 ; i >= 0 ; i -- ) { int sum = ( ( int ) ( str1 . charAt ( i ) - '0' ) + ( int ) ( str2 . charAt ( i + diff ) - '0' ) + carry ) ; str += ( char ) ( sum % 10 + '0' ) ; carry = sum / 10 ; } for ( int i = n2 - n1 - 1 ; i >= 0 ; i -- ) { int sum = ( ( int ) ( str2 . charAt ( i ) - '0' ) + carry ) ; str += ( char ) ( sum % 10 + '0' ) ; carry = sum / 10 ; } if ( carry > 0 ) str += ( char ) ( carry + '0' ) ; return new StringBuilder ( str ) . reverse ( ) . toString ( ) ; }
null
using namespace std; string f_gold ( string str1, string str2 ) { if ( str1 . length ( ) > str2 . length ( ) ) swap ( str1, str2 ); string str = ""; int n1 = str1 . length ( ), n2 = str2 . length ( ); int diff = n2 - n1; int carry = 0; for ( int i = n1 - 1; i >= 0; i -- ) { int sum = ( ( str1 [ i ] - '0' ) + ( str2 [ i + diff ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } for ( int i = n2 - n1 - 1; i >= 0; i -- ) { int sum = ( ( str2 [ i ] - '0' ) + carry ); str . push_back ( sum % 10 + '0' ); carry = sum / 10; } if ( carry ) str . push_back ( carry + '0' ); reverse ( str . begin ( ), str . end ( ) ); return str; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("G"); param0.add("48578"); param0.add("010"); param0.add("KkGp"); param0.add("48928969618416"); param0.add("0101011010"); param0.add("X"); param0.add("10073867"); param0.add("01110000000"); param0.add("k "); List<String> param1 = new ArrayList<>(); param1.add("FcAiuKhw"); param1.add("5117561223135"); param1.add("00000"); param1.add("nSE"); param1.add("88497275"); param1.add("11"); param1.add("MomtbuxLRR"); param1.add("28"); param1.add("0110"); param1.add("aSSlhOYp"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<string> param0 {"G","48578","010","KkGp","48928969618416","0101011010","X","10073867","01110000000","k "}; vector<string> param1 {"FcAiuKhw","5117561223135","00000","nSE","88497275","11","MomtbuxLRR","28","0110","aSSlhOYp"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
BREAK_NUMBER_THREE_PARTS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BREAK_NUMBER_THREE_PARTS{ static long f_gold ( long n ) { long count = 0 ; for ( int i = 0 ; i <= n ; i ++ ) for ( int j = 0 ; j <= n ; j ++ ) for ( int k = 0 ; k <= n ; k ++ ) if ( i + j + k == n ) count ++ ; return count ; }
def f_gold ( n ) : count = 0 for i in range ( 0 , n + 1 ) : for j in range ( 0 , n + 1 ) : for k in range ( 0 , n + 1 ) : if ( i + j + k == n ) : count = count + 1 return count
null
public static void main(String args[]) { int n_success = 0; List<Long> param0 = new ArrayList<>(); param0.add(52L); param0.add(47L); param0.add(75L); param0.add(36L); param0.add(68L); param0.add(16L); param0.add(99L); param0.add(38L); param0.add(84L); param0.add(45L); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (52,), (47,), (75,), (36,), (68,), (16,), (99,), (38,), (84,), (45,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET{ static int f_gold ( int n ) { int [ ] [ ] bell = new int [ n + 1 ] [ n + 1 ] ; bell [ 0 ] [ 0 ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) { bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ] ; for ( int j = 1 ; j <= i ; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ] ; } return bell [ n ] [ 0 ] ; }
def f_gold ( n ) : bell = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ] bell [ 0 ] [ 0 ] = 1 for i in range ( 1 , n + 1 ) : bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ] for j in range ( 1 , i + 1 ) : bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ] return bell [ n ] [ 0 ]
using namespace std; int f_gold ( int n ) { int bell [ n + 1 ] [ n + 1 ]; bell [ 0 ] [ 0 ] = 1; for ( int i = 1; i <= n; i ++ ) { bell [ i ] [ 0 ] = bell [ i - 1 ] [ i - 1 ]; for ( int j = 1; j <= i; j ++ ) bell [ i ] [ j ] = bell [ i - 1 ] [ j - 1 ] + bell [ i ] [ j - 1 ]; } return bell [ n ] [ 0 ]; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(84); param0.add(78); param0.add(9); param0.add(73); param0.add(4); param0.add(53); param0.add(85); param0.add(38); param0.add(39); param0.add(6); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (84,), (78,), (9,), (73,), (4,), (53,), (85,), (38,), (39,), (6,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<int> param0 {84,78,9,73,4,53,85,38,39,6}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_ONE_EXTRA_CHARACTER_STRING_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_ONE_EXTRA_CHARACTER_STRING_1{ static char f_gold ( String strA , String strB ) { int res = 0 , i ; for ( i = 0 ; i < strA . length ( ) ; i ++ ) { res ^= strA . charAt ( i ) ; } for ( i = 0 ; i < strB . length ( ) ; i ++ ) { res ^= strB . charAt ( i ) ; } return ( ( char ) ( res ) ) ; }
def f_gold ( strA , strB ) : res = 0 for i in range ( 0 , len ( strA ) ) : res = res ^ ( ord ) ( strA [ i ] ) for i in range ( 0 , len ( strB ) ) : res = res ^ ( ord ) ( strB [ i ] ) return ( ( chr ) ( res ) ) ;
using namespace std; char f_gold ( string strA, string strB ) { int res = 0, i; for ( i = 0; i < strA . length ( ); i ++ ) { res ^= strA [ i ]; } for ( i = 0; i < strB . length ( ); i ++ ) { res ^= strB [ i ]; } return ( ( char ) ( res ) ); }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("obfLA mmMYvghH"); param0.add("2941"); param0.add("0111111"); param0.add("oWvbFstI"); param0.add("4937516500"); param0.add("101110100"); param0.add("hYZscJQFBE"); param0.add("58443"); param0.add("1100"); param0.add("ZUdYuIBVNaeeb"); List<String> param1 = new ArrayList<>(); param1.add("obfLA mmMYvghH"); param1.add("2941"); param1.add("0111111"); param1.add("oWvbFstI"); param1.add("4937516500"); param1.add("101110100"); param1.add("hYZscJQFBE"); param1.add("58443"); param1.add("1100"); param1.add("ZUdYuIBVNaeeb"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('obfLA mmMYvghH','obfLA mmMYvghH',), ('2941','2941',), ('0111111','0111111',), ('oWvbFstI','oWvbFstI',), ('4937516500','4937516500',), ('101110100','101110100',), ('hYZscJQFBE','hYZscJQFBE',), ('58443','58443',), ('1100','1100',), ('ZUdYuIBVNaeeb','ZUdYuIBVNaeeb',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"obfLA mmMYvghH","2941","0111111","oWvbFstI","4937516500","101110100","hYZscJQFBE","58443","1100","ZUdYuIBVNaeeb"}; vector<string> param1 {"obfLA mmMYvghH","23941","01011111","oWvsbFstI","49376516500","1011210100","hYZscJQQFBE","584443","11000","ZUdYVuIBVNaeeb"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MULTIPLY_LARGE_NUMBERS_REPRESENTED_AS_STRINGS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MULTIPLY_LARGE_NUMBERS_REPRESENTED_AS_STRINGS{ static String f_gold ( String num1 , String num2 ) { int len1 = num1 . length ( ) ; int len2 = num2 . length ( ) ; if ( len1 == 0 || len2 == 0 ) return "0" ; int result [ ] = new int [ len1 + len2 ] ; int i_n1 = 0 ; int i_n2 = 0 ; for ( int i = len1 - 1 ; i >= 0 ; i -- ) { int carry = 0 ; int n1 = num1 . charAt ( i ) - '0' ; i_n2 = 0 ; for ( int j = len2 - 1 ; j >= 0 ; j -- ) { int n2 = num2 . charAt ( j ) - '0' ; int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry ; carry = sum / 10 ; result [ i_n1 + i_n2 ] = sum % 10 ; i_n2 ++ ; } if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry ; i_n1 ++ ; } int i = result . length - 1 ; while ( i >= 0 && result [ i ] == 0 ) i -- ; if ( i == - 1 ) return "0" ; String s = "" ; while ( i >= 0 ) s += ( result [ i -- ] ) ; return s ; }
def f_gold ( num1 , num2 ) : len1 = len ( num1 ) len2 = len ( num2 ) if len1 == 0 or len2 == 0 : return "0" result = [ 0 ] * ( len1 + len2 ) i_n1 = 0 i_n2 = 0 for i in range ( len1 - 1 , - 1 , - 1 ) : carry = 0 n1 = ord ( num1 [ i ] ) - 48 i_n2 = 0 for j in range ( len2 - 1 , - 1 , - 1 ) : n2 = ord ( num2 [ j ] ) - 48 summ = n1 * n2 + result [ i_n1 + i_n2 ] + carry carry = summ // 10 result [ i_n1 + i_n2 ] = summ % 10 i_n2 += 1 if ( carry > 0 ) : result [ i_n1 + i_n2 ] += carry i_n1 += 1 i = len ( result ) - 1 while ( i >= 0 and result [ i ] == 0 ) : i -= 1 if ( i == - 1 ) : return "0" s = "" while ( i >= 0 ) : s += chr ( result [ i ] + 48 ) i -= 1 return s
using namespace std; string f_gold ( string num1, string num2 ) { int len1 = num1 . size ( ); int len2 = num2 . size ( ); if ( len1 == 0 || len2 == 0 ) return "0"; vector < int > result ( len1 + len2, 0 ); int i_n1 = 0; int i_n2 = 0; for ( int i = len1 - 1; i >= 0; i -- ) { int carry = 0; int n1 = num1 [ i ] - '0'; i_n2 = 0; for ( int j = len2 - 1; j >= 0; j -- ) { int n2 = num2 [ j ] - '0'; int sum = n1 * n2 + result [ i_n1 + i_n2 ] + carry; carry = sum / 10; result [ i_n1 + i_n2 ] = sum % 10; i_n2 ++; } if ( carry > 0 ) result [ i_n1 + i_n2 ] += carry; i_n1 ++; } int i = result . size ( ) - 1; while ( i >= 0 && result [ i ] == 0 ) i --; if ( i == - 1 ) return "0"; string s = ""; while ( i >= 0 ) s += std :: to_string ( result [ i -- ] ); return s; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("OaITtzE"); param0.add("88111031"); param0.add("1100111"); param0.add("eiWPbMrFx"); param0.add("43701248"); param0.add("100001111110"); param0.add("jVgOapMp"); param0.add("68337672"); param0.add("00110101"); param0.add("JqSh"); List<String> param1 = new ArrayList<>(); param1.add("RnYlJUqzk"); param1.add("558471"); param1.add("11111110111101"); param1.add("tBAJaI"); param1.add("4027"); param1.add("11"); param1.add("Xm"); param1.add("56939"); param1.add("1"); param1.add("iAfjQRwuVyost"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)).equals(f_gold(param0.get(i),param1.get(i)))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('OaITtzE','RnYlJUqzk',), ('88111031','558471',), ('1100111','11111110111101',), ('eiWPbMrFx','tBAJaI',), ('43701248','4027',), ('100001111110','11',), ('jVgOapMp','Xm',), ('68337672','56939',), ('00110101','1',), ('JqSh','iAfjQRwuVyost',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"OaITtzE","88111031","1100111","eiWPbMrFx","43701248","100001111110","jVgOapMp","68337672","00110101","JqSh"}; vector<string> param1 {"RnYlJUqzk","558471","11111110111101","tBAJaI","4027","11","Xm","56939","1","iAfjQRwuVyost"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
MAXIMUM_PRODUCT_SUBSET_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class MAXIMUM_PRODUCT_SUBSET_ARRAY{ static int f_gold ( int a [ ] , int n ) { if ( n == 1 ) { return a [ 0 ] ; } int max_neg = Integer . MIN_VALUE ; int count_neg = 0 , count_zero = 0 ; int prod = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == 0 ) { count_zero ++ ; continue ; } if ( a [ i ] < 0 ) { count_neg ++ ; max_neg = Math . max ( max_neg , a [ i ] ) ; } prod = prod * a [ i ] ; } if ( count_zero == n ) { return 0 ; } if ( count_neg % 2 == 1 ) { if ( count_neg == 1 && count_zero > 0 && count_zero + count_neg == n ) { return 0 ; } prod = prod / max_neg ; } return prod ; }
def f_gold ( a , n ) : if n == 1 : return a [ 0 ] max_neg = - 999999999999 count_neg = 0 count_zero = 0 prod = 1 for i in range ( n ) : if a [ i ] == 0 : count_zero += 1 continue if a [ i ] < 0 : count_neg += 1 max_neg = max ( max_neg , a [ i ] ) prod = prod * a [ i ] if count_zero == n : return 0 if count_neg & 1 : if ( count_neg == 1 and count_zero > 0 and count_zero + count_neg == n ) : return 0 prod = int ( prod / max_neg ) return prod
using namespace std; int f_gold ( int a [ ], int n ) { if ( n == 1 ) return a [ 0 ]; int max_neg = INT_MIN; int count_neg = 0, count_zero = 0; int prod = 1; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] == 0 ) { count_zero ++; continue; } if ( a [ i ] < 0 ) { count_neg ++; max_neg = max ( max_neg, a [ i ] ); } prod = prod * a [ i ]; } if ( count_zero == n ) return 0; if ( count_neg & 1 ) { if ( count_neg == 1 && count_zero > 0 && count_zero + count_neg == n ) return 0; prod = prod / max_neg; } return prod; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{22,62,97}); param0.add(new int[]{-96,30,34,16,82,12,68,6,-2,-78,-74,-52,38,62,20,4,-32,44,-34,12,-44,-66,-94,24,-86,56,-20,-62,90,-16,-2,54,80,-16,-56,-98,20,84,30,-44,-78,66,-62,18}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{9,1,90,53,67,14,42,52,55,52,86,99,43,74,48,71,55,85,87,73,41,55,52}); param0.add(new int[]{-92,-78,-74,-72,-70,-66,-46,-44,-42,-34,-32,-30,-10,18,30,34,56,64,66}); param0.add(new int[]{0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0}); param0.add(new int[]{1,2,3,18,20,33,38,53,55,56,67,80,83,87,90,97,98}); param0.add(new int[]{-78,-14,20,70,-40,-96,78,70,-36,-30,24,-36,86,42,24,86,-52,-34,72,-58,-36,-24,-10,-68,-20,-64,34,42,-2,-8}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{1,6,32,4,63,85,48,64,11,29,77,59,1,99,17,17,38,49,78,82,50,87,75,18,75,73,98,17,27,51,4,98,96,6,74,5}); List<Integer> param1 = new ArrayList<>(); param1.add(2); param1.add(41); param1.add(43); param1.add(20); param1.add(10); param1.add(16); param1.add(9); param1.add(16); param1.add(11); param1.add(32); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([22, 62, 97],2,), ([-96, 30, 34, 16, 82, 12, 68, 6, -2, -78, -74, -52, 38, 62, 20, 4, -32, 44, -34, 12, -44, -66, -94, 24, -86, 56, -20, -62, 90, -16, -2, 54, 80, -16, -56, -98, 20, 84, 30, -44, -78, 66, -62, 18],41,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],43,), ([9, 1, 90, 53, 67, 14, 42, 52, 55, 52, 86, 99, 43, 74, 48, 71, 55, 85, 87, 73, 41, 55, 52],20,), ([-92, -78, -74, -72, -70, -66, -46, -44, -42, -34, -32, -30, -10, 18, 30, 34, 56, 64, 66],10,), ([0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0],16,), ([1, 2, 3, 18, 20, 33, 38, 53, 55, 56, 67, 80, 83, 87, 90, 97, 98],9,), ([-78, -14, 20, 70, -40, -96, 78, 70, -36, -30, 24, -36, 86, 42, 24, 86, -52, -34, 72, -58, -36, -24, -10, -68, -20, -64, 34, 42, -2, -8],16,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],11,), ([1, 6, 32, 4, 63, 85, 48, 64, 11, 29, 77, 59, 1, 99, 17, 17, 38, 49, 78, 82, 50, 87, 75, 18, 75, 73, 98, 17, 27, 51, 4, 98, 96, 6, 74, 5],32,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{22,62,97},{-96,30,34,16,82,12,68,6,-2,-78,-74,-52,38,62,20,4,-32,44,-34,12,-44,-66,-94,24,-86,56,-20,-62,90,-16,-2,54,80,-16,-56,-98,20,84,30,-44,-78,66,-62,18},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{9,1,90,53,67,14,42,52,55,52,86,99,43,74,48,71,55,85,87,73,41,55,52},{-92,-78,-74,-72,-70,-66,-46,-44,-42,-34,-32,-30,-10,18,30,34,56,64,66},{0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0},{1,2,3,18,20,33,38,53,55,56,67,80,83,87,90,97,98},{-78,-14,20,70,-40,-96,78,70,-36,-30,24,-36,86,42,24,86,-52,-34,72,-58,-36,-24,-10,-68,-20,-64,34,42,-2,-8},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},{1,6,32,4,63,85,48,64,11,29,77,59,1,99,17,17,38,49,78,82,50,87,75,18,75,73,98,17,27,51,4,98,96,6,74,5}}; vector<int> param1 {2,41,43,20,10,16,9,16,11,32}; 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; }
SCHEDULE_ELEVATOR_TO_REDUCE_THE_TOTAL_TIME_TAKEN
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SCHEDULE_ELEVATOR_TO_REDUCE_THE_TOTAL_TIME_TAKEN{ static int f_gold ( int n , int k , int a [ ] ) { int temp ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) { if ( a [ i ] < a [ j ] ) { temp = a [ i ] ; a [ i ] = a [ j ] ; a [ j ] = temp ; } } } int f_gold = 0 ; for ( int i = 0 ; i < n ; i += k ) f_gold += ( 2 * a [ i ] ) ; return f_gold ; }
null
using namespace std; int f_gold ( int n, int k, int a [ ] ) { sort ( a, a + n, greater < int > ( ) ); int f_gold = 0; for ( int i = 0; i < n; i += k ) f_gold += ( 2 * a [ i ] ); return f_gold; }
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(17); param0.add(2); param0.add(0); param0.add(16); param0.add(31); param0.add(28); param0.add(9); param0.add(32); param0.add(17); param0.add(19); List<Integer> param1 = new ArrayList<>(); param1.add(15); param1.add(2); param1.add(0); param1.add(27); param1.add(23); param1.add(33); param1.add(10); param1.add(26); param1.add(22); param1.add(15); List<int [ ]> param2 = new ArrayList<>(); param2.add(new int[]{1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99}); param2.add(new int[]{-8,70,-90,-74}); param2.add(new int[]{0}); param2.add(new int[]{3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50}); param2.add(new int[]{-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96}); param2.add(new int[]{0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1}); param2.add(new int[]{8,13,17,19,24,33,43,54,63,74,79,83}); param2.add(new int[]{0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92}); param2.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1}); param2.add(new int[]{97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32}); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<int> param0 {17,2,0,16,31,28,9,32,17,19}; vector<int> param1 {15,2,0,27,23,33,10,26,22,15}; vector<vector<int>> param2 {{1,4,8,18,24,34,38,38,39,39,41,53,56,57,63,72,73,77,79,99},{-8,70,-90,-74},{0},{3,66,11,21,82,75,19,39,1,55,7,26,10,87,11,94,91,76,21,91,83,18,44,29,47,84,6,10,83,74,26,50},{-96,-84,-80,-72,-60,-60,-58,-58,-52,-46,-36,-34,-32,-26,-22,-22,-20,-18,-14,-14,-6,-2,-2,0,2,4,18,22,24,38,42,46,50,58,72,78,82,84,90,96,96,96},{0,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1},{8,13,17,19,24,33,43,54,63,74,79,83},{0,52,20,40,-2,74,12,10,-56,68,-52,36,8,34,82,-64,-78,-22,-24,74,-54,62,-70,-76,-80,8,-24,84,-84,-74,-90,6,22,58,62,24,-74,50,92},{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},{97,4,69,27,23,97,26,67,72,26,15,67,66,73,27,68,27,60,53,80,20,59,96,9,94,66,5,32}}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i],param1[i],&param2[i].front()) == f_gold(param0[i],param1[i],&param2[i].front())) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY{ static int f_gold ( int arr [ ] , int l , int h , int key ) { if ( l > h ) return - 1 ; int mid = ( l + h ) / 2 ; if ( arr [ mid ] == key ) return mid ; if ( arr [ l ] <= arr [ mid ] ) { if ( key >= arr [ l ] && key <= arr [ mid ] ) return f_gold ( arr , l , mid - 1 , key ) ; return f_gold ( arr , mid + 1 , h , key ) ; } if ( key >= arr [ mid ] && key <= arr [ h ] ) return f_gold ( arr , mid + 1 , h , key ) ; return f_gold ( arr , l , mid - 1 , key ) ; }
def f_gold(arr, l, h, key): if l > h: return - 1 mid = (l + h) // 2 if arr[mid] == key: return mid if arr[l] <= arr[mid]: if key >= arr[l] and key <= arr[mid]: return f_gold(arr, l, mid - 1, key) return f_gold(arr, mid + 1, h, key) if key >= arr[mid] and key <= arr[h]: return f_gold(a, mid + 1, h, key) return f_gold(arr, l, mid - 1, key)
using namespace std; int f_gold ( int arr [ ], int l, int h, int key ) { if ( l > h ) return - 1; int mid = ( l + h ) / 2; if ( arr [ mid ] == key ) return mid; if ( arr [ l ] <= arr [ mid ] ) { if ( key >= arr [ l ] && key <= arr [ mid ] ) return f_gold ( arr, l, mid - 1, key ); return f_gold ( arr, mid + 1, h, key ); } if ( key >= arr [ mid ] && key <= arr [ h ] ) return f_gold ( arr, mid + 1, h, key ); return f_gold ( arr, l, mid - 1, key ); }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{5, 6, 7, 8, 9, 10, 1, 2, 3}); param0.add(new int[]{{30, 40, 50, 10, 20}); param0.add(new int[]{40,50,55,67,70,4,5,6,7}); param0.add(new int[]{14,41,38,67,99,11,96,52,4,29,22,57,3,45,14,76,70,38,93,5,74,50,18,17,20,34,51,69,86,73}); param0.add(new int[]{-90,-88,-88,-82,-62,-44,-38,-38,-36,-34,-34,-32,-30,-28,-28,-26,-24,-20,-16,-16,-16,-6,-6,2,6,8,10,14,18,18,46,50,50,54,56,58,58,60,62,70,70,74,82,84,88,94,96}); param0.add(new int[]{1,1,1,1,0,0,1,1,1,1,1,1,1,0}); param0.add(new int[]{4,7,9,10,10,11,14,16,17,21,25,27,31,34,34,34,38,41,42,42,52,56,56,58,60,66,67,68,68,70,72,74,76,82,88,88,88,89,91,93,94,95,95}); param0.add(new int[]{92,60,-60,64,18,70,56,34,58,14,28,-72,-22,-74,-46,-28,64,88,18,-50,-14,-20,64,6,-4,-98,60,98,84,-58,-98,66,80,68,-42,-58,82,90,-72,34,34,80,88,-64,66,-20,-26}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{33,18,98,47,76,58,29,68,62,78,12,95,20,88,39,12,43,45,5,45,96,64,38,28,70,25,65,79,39}); List<Integer> param1 = new ArrayList<>(); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); param1.add(0); List<Integer> param2 = new ArrayList<>(); param2.add(8); param2.add(4); param2.add(9); param2.add(16); param2.add(24); param2.add(10); param2.add(23); param2.add(25); param2.add(40); param2.add(16); List<Integer> param3 = new ArrayList<>(); param3.add(3); param3.add(40); param3.add(67); param3.add(15); param3.add(24); param3.add(10); param3.add(39); param3.add(25); param3.add(29); param3.add(28); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i),param3.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i),param3.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([5, 6, 7, 8, 9, 10, 1, 2, 3], 0, 8, 3,), ([30, 40, 50, 10, 20], 0, 4, 40,), ([40, 50, 55, 67, 70, 4, 5, 6, 7], 0, 9, 67,), ([14, 41, 38, 67, 99, 11, 96, 52, 4, 29, 22, 57, 3, 45, 14, 76, 70, 38, 93, 5, 74, 50, 18, 17, 20, 34, 51, 69, 86, 73], 0, 16, 15,), ([-90, -88, -88, -82, -62, -44, -38, -38, -36, -34, -34, -32, -30, -28, -28, -26, -24, -20, -16, -16, -16, - 6, -6, 2, 6, 8, 10, 14, 18, 18, 46, 50, 50, 54, 56, 58, 58, 60, 62, 70, 70, 74, 82, 84, 88, 94, 96], 0, 24, 24,), ([1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0], 0, 10, 10,), ([4, 7, 9, 10, 10, 11, 14, 16, 17, 21, 25, 27, 31, 34, 34, 34, 38, 41, 42, 42, 52, 56, 56, 58, 60, 66, 67, 68, 68, 70, 72, 74, 76, 82, 88, 88, 88, 89, 91, 93, 94, 95, 95], 0, 23, 39,), ([92, 60, -60, 64, 18, 70, 56, 34, 58, 14, 28, -72, -22, -74, -46, -28, 64, 88, 18, -50, -14, -20, 64, 6, -4, - 98, 60, 98, 84, -58, -98, 66, 80, 68, -42, -58, 82, 90, -72, 34, 34, 80, 88, -64, 66, -20, -26], 0, 25, 25,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 0, 40, 29,), ([33, 18, 98, 47, 76, 58, 29, 68, 62, 78, 12, 95, 20, 88, 39, 12, 43, 45, 5, 45, 96, 64, 38, 28, 70, 25, 65, 79, 39], 0, 16, 28,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{5, 6, 7, 8, 9, 10, 1, 2, 3},{30, 40, 50, 10, 20},{40,50,55,67,70,4,5,6,7},{14,41,38,67,99,11,96,52,4,29,22,57,3,45,14,76,70,38,93,5,74,50,18,17,20,34,51,69,86,73},{-90,-88,-88,-82,-62,-44,-38,-38,-36,-34,-34,-32,-30,-28,-28,-26,-24,-20,-16,-16,-16,-6,-6,2,6,8,10,14,18,18,46,50,50,54,56,58,58,60,62,70,70,74,82,84,88,94,96},{1,1,1,1,0,0,1,1,1,1,1,1,1,0},{4,7,9,10,10,11,14,16,17,21,25,27,31,34,34,34,38,41,42,42,52,56,56,58,60,66,67,68,68,70,72,74,76,82,88,88,88,89,91,93,94,95,95},{92,60,-60,64,18,70,56,34,58,14,28,-72,-22,-74,-46,-28,64,88,18,-50,-14,-20,64,6,-4,-98,60,98,84,-58,-98,66,80,68,-42,-58,82,90,-72,34,34,80,88,-64,66,-20,-26},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{33,18,98,47,76,58,29,68,62,78,12,95,20,88,39,12,43,45,5,45,96,64,38,28,70,25,65,79,39}}; vector<int> param1 {0,0,0,0,0,0,0,0,0,0}; vector<int> param2 {8,4,9,16,24,10,23,25,40,16}; vector<int> param3 {3,40,67,15,24,10,39,25,29,28}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(&param0[i].front(),param1[i],param2[i],param3[i]) == f_gold(&param0[i].front(),param1[i],param2[i],param3[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT{ static boolean f_gold ( String bin ) { int n = bin . length ( ) ; if ( bin . charAt ( n - 1 ) == '1' ) return false ; int sum = 0 ; for ( int i = n - 2 ; i >= 0 ; i -- ) { if ( bin . charAt ( i ) == '1' ) { int posFromRight = n - i - 1 ; if ( posFromRight % 4 == 1 ) sum = sum + 2 ; else if ( posFromRight % 4 == 2 ) sum = sum + 4 ; else if ( posFromRight % 4 == 3 ) sum = sum + 8 ; else if ( posFromRight % 4 == 0 ) sum = sum + 6 ; } } if ( sum % 10 == 0 ) return true ; return false ; }
def f_gold ( bin ) : n = len ( bin ) if ( bin [ n - 1 ] == '1' ) : return False sum = 0 i = n - 2 while i >= 0 : if ( bin [ i ] == '1' ) : posFromRight = n - i - 1 if ( posFromRight % 4 == 1 ) : sum = sum + 2 elif ( posFromRight % 4 == 2 ) : sum = sum + 4 elif ( posFromRight % 4 == 3 ) : sum = sum + 8 elif ( posFromRight % 4 == 0 ) : sum = sum + 6 i = i - 1 if ( sum % 10 == 0 ) : return True return False
using namespace std; bool f_gold ( string bin ) { int n = bin . size ( ); if ( bin [ n - 1 ] == '1' ) return false; int sum = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( bin [ i ] == '1' ) { int posFromRight = n - i - 1; if ( posFromRight % 4 == 1 ) sum = sum + 2; else if ( posFromRight % 4 == 2 ) sum = sum + 4; else if ( posFromRight % 4 == 3 ) sum = sum + 8; else if ( posFromRight % 4 == 0 ) sum = sum + 6; } } if ( sum % 10 == 0 ) return true; return false; }
public static void main(String args[]) { int n_success = 0; List<String> param0 = new ArrayList<>(); param0.add("101000"); param0.add("39613456759141"); param0.add("11"); param0.add("PoiHjo"); param0.add("2"); param0.add("0000101"); param0.add("T s dZKeDX gK"); param0.add("3944713969"); param0.add("1000"); param0.add("ifYUgdpmt"); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i)) == f_gold(param0.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ('101000',), ('39613456759141',), ('11',), ('PoiHjo',), ('2',), ('0000101',), ('T s dZKeDX gK',), ('3944713969',), ('1000',), ('ifYUgdpmt',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<string> param0 {"101000","39613456759141","11","PoiHjo","2","0000101","T s dZKeDX gK","3944713969","1000","ifYUgdpmt"}; for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } cout << "#Results:" << " " << n_success << ", " << param0.size(); return 0; }
FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class FIND_DIFFERENCE_BETWEEN_SUMS_OF_TWO_DIAGONALS{ public static int f_gold ( int arr [ ] [ ] , int n ) { int d1 = 0 , d2 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == j ) d1 += arr [ i ] [ j ] ; if ( i == n - j - 1 ) d2 += arr [ i ] [ j ] ; } } return Math . abs ( d1 - d2 ) ; }
def f_gold ( arr , n ) : d1 = 0 d2 = 0 for i in range ( 0 , n ) : for j in range ( 0 , n ) : if ( i == j ) : d1 += arr [ i ] [ j ] if ( i == n - j - 1 ) : d2 += arr [ i ] [ j ] return abs ( d1 - d2 ) ;
null
public static void main(String args[]) { int n_success = 0; List<int [ ] [ ]> param0 = new ArrayList<>(); param0.add(new int[][]{new int[]{1,7,17,19,22,25,27,29,41,60,67,73,79,85,94},new int[]{2,6,16,21,30,42,43,48,50,52,60,61,68,92,95},new int[]{4,8,10,14,15,20,22,23,23,39,40,63,70,75,87},new int[]{7,21,24,36,39,43,50,58,58,67,70,89,94,98,99},new int[]{4,13,17,20,21,24,30,45,57,58,59,65,66,91,97},new int[]{15,15,18,33,38,43,51,57,64,68,70,75,85,94,97},new int[]{2,5,6,6,12,41,43,44,48,48,53,53,60,69,99},new int[]{1,13,14,24,24,25,35,36,40,67,74,75,87,88,96},new int[]{6,13,23,28,29,39,40,50,50,63,63,81,85,88,96},new int[]{4,13,26,27,36,40,42,42,46,48,57,62,67,67,70},new int[]{20,25,29,61,69,70,73,75,78,80,84,85,88,95,97},new int[]{2,2,6,11,11,31,39,48,50,52,54,64,77,89,97},new int[]{1,14,25,26,29,41,46,55,67,68,77,77,83,84,88},new int[]{6,9,11,25,29,33,36,44,63,65,67,68,78,89,91},new int[]{12,13,13,15,43,45,50,60,62,62,64,86,91,96,96}}); param0.add(new int[][]{new int[]{74,-94,42,56,-64,-46,-34,54,-2,-92,0,-38,-76,-16,42,20,-58,36,66,-88,6,-82,46,2,2,-62,-76,-10,-26,-44,-38,70,46,16,12,84,4,-72,-84,66,-6,-92,46,-94,-46,74,64},new int[]{20,-22,-40,-22,-40,56,0,-84,-96,32,-36,-16,56,36,-24,20,50,28,52,-44,-36,-18,14,42,28,24,-88,90,76,-72,-80,-80,48,56,-28,-18,-56,32,-72,30,-46,-60,8,-90,52,-10,86},new int[]{-82,60,60,72,-68,2,40,-56,-38,-80,10,54,-22,34,62,-78,10,28,-8,28,-22,-34,12,14,-18,38,88,-10,-70,44,-70,10,70,-58,36,-70,-32,-60,-98,32,32,6,58,-78,-58,-66,74},new int[]{58,-16,66,-26,18,46,92,14,62,-8,62,12,72,8,36,22,-24,-2,80,88,-16,46,16,-70,22,-58,-46,-66,4,86,54,-86,-6,-36,-54,14,-38,16,-12,-68,-18,96,54,70,-22,78,40},new int[]{-38,-50,-20,-58,80,-42,-64,-12,64,-56,50,36,18,58,12,12,12,-22,-72,-44,28,48,-2,34,-78,-36,-60,-34,28,8,30,-98,4,0,6,70,-90,-4,38,-88,-84,86,24,-18,96,-72,76},new int[]{-78,18,-82,-18,32,-26,-54,-18,84,68,-94,42,26,88,34,18,-22,20,44,-60,54,-60,14,86,18,10,-48,96,-36,-98,96,-6,-96,-2,-92,-78,-24,40,-82,-74,0,18,0,28,16,78,-76},new int[]{32,46,-30,98,-92,24,42,-2,-92,12,-24,84,80,-74,-80,-48,54,30,-4,28,0,-56,78,76,-96,-32,-52,82,-78,46,-92,-16,58,78,-14,-82,78,-44,-34,34,2,76,72,-34,-80,88,20},new int[]{-66,6,70,82,-86,-16,38,22,42,76,58,2,-12,0,14,-8,-8,62,46,-38,-90,8,36,-68,56,26,40,-36,76,-54,44,88,46,-62,34,-26,90,-94,52,40,24,-86,36,28,-12,-48,6},new int[]{-12,14,-96,-4,-96,-18,-60,-52,86,22,-44,-22,-68,66,-66,72,-42,-14,-98,56,82,-52,-84,82,98,-36,-14,20,-48,90,-20,80,-18,6,-82,-4,88,88,82,78,88,-34,22,6,-16,4,32},new int[]{18,24,52,-50,-82,-66,58,42,-60,66,86,82,-66,-72,-6,80,78,68,-30,-76,-64,98,-62,80,-96,32,60,-52,-26,-66,52,-8,42,74,-72,94,-94,-56,-14,74,72,-82,-86,-80,-4,-64,-52},new int[]{-82,2,-16,56,-14,70,-60,16,82,62,-52,12,-74,-22,50,-82,-14,-48,-88,52,-12,92,-40,16,-66,-92,30,-80,-10,48,-4,16,50,66,44,-40,-52,48,18,-16,-56,58,28,-42,-80,22,-58},new int[]{42,38,28,30,16,66,-92,36,-40,28,12,2,-50,-42,-96,-56,6,-16,10,96,-62,64,-8,82,46,94,6,30,84,64,-58,88,42,88,0,16,-30,48,-10,30,94,-42,56,-82,-60,-84,-34},new int[]{60,-50,-90,24,-8,40,-92,-28,28,84,-36,-62,-24,-54,98,-90,50,-26,-18,8,-74,-20,54,-22,-44,-84,64,66,-20,56,96,54,94,-60,96,-46,-66,66,-48,2,-90,-94,-86,-80,-36,-66,36},new int[]{82,-38,10,18,8,-12,-92,-96,-50,-34,18,-54,8,-36,56,-32,80,-84,96,76,6,72,62,24,58,20,-56,-94,-92,16,22,-68,-18,-26,-56,80,-52,50,56,78,-6,54,-58,16,78,52,80},new int[]{-34,-56,-86,42,26,-78,8,92,2,10,-56,-14,84,-20,14,-76,2,82,90,28,18,16,94,-96,-40,22,-52,-90,-28,-64,38,-68,-62,-94,76,-78,-48,70,-60,-98,84,-38,-12,-20,8,84,-52},new int[]{-74,-94,42,80,12,56,-90,58,4,-58,20,14,80,-88,22,94,-18,-96,76,88,72,-98,-80,88,-8,6,-10,50,-78,16,-40,28,14,-98,-90,-4,30,56,28,56,32,12,68,2,2,18,96},new int[]{70,24,-78,-52,-10,-54,-4,22,-96,-60,-16,90,70,64,78,90,-74,98,80,84,-84,-22,58,-12,-84,-2,-72,24,-96,52,-62,58,72,-24,-54,-38,-12,34,42,-50,-14,-16,62,-72,14,-34,50},new int[]{76,48,-66,12,-92,36,64,-86,-18,2,16,2,88,70,-8,4,-62,-34,-6,54,10,-8,-54,32,12,94,-12,-68,74,84,-38,-4,-32,20,14,-8,82,-66,48,-26,-74,10,-20,-74,-46,78,-96},new int[]{28,24,16,40,12,-68,-42,94,18,98,68,-56,2,-92,-10,-54,-2,-82,86,-64,-38,-12,48,-32,16,30,-36,-94,84,-74,-30,-54,62,-38,-74,-6,70,-64,-26,-58,30,2,96,64,-86,-24,-12},new int[]{-30,-78,84,58,20,2,10,-24,62,-56,-80,76,-40,-20,-66,-2,-62,48,-74,-48,-82,88,64,-72,74,-42,30,-60,-88,-46,-72,36,-98,70,-84,-52,68,-18,-90,-20,44,-40,-92,20,-98,-80,-84},new int[]{-90,44,-30,84,-10,36,28,46,-96,-42,-60,2,-14,78,80,44,-54,-10,-12,-30,80,-80,94,72,50,-98,74,14,-28,-84,60,62,-72,-90,-46,-90,56,-36,98,64,-26,64,-68,-58,-10,-12,-18},new int[]{84,-86,90,-90,-42,38,6,8,-90,-6,-52,18,-62,96,42,-26,-86,-24,54,10,94,-66,58,-82,84,-42,-6,48,72,54,94,-36,-56,-66,0,28,80,-22,92,44,64,-86,-96,6,56,-62,-88},new int[]{32,-90,68,72,-74,-70,-4,58,-78,-18,-50,-10,-84,26,38,-84,72,44,-52,44,-26,42,-84,2,-42,76,-16,-46,0,-46,-26,-28,-10,56,-84,-92,84,32,-80,-46,-10,-30,52,-78,-50,56,-22},new int[]{-78,12,-90,-90,-74,48,-46,32,4,24,-6,40,80,-26,-68,-20,70,86,60,-60,84,30,34,-60,-42,50,38,64,30,-18,-50,-48,66,-2,-20,86,26,-96,96,-68,38,64,-40,-94,-52,74,52},new int[]{-40,88,72,-56,-26,-48,-48,-20,46,88,14,86,4,46,6,-54,-86,34,58,-72,92,-18,-88,8,0,-28,-78,-4,40,0,28,-38,-60,-28,-44,48,-56,-52,2,20,72,-98,6,22,64,36,-60},new int[]{90,-8,0,-42,-58,-96,80,52,-78,24,-24,-92,-70,42,-46,96,-10,-32,-18,22,24,86,-4,-86,-70,-70,-96,-98,-34,0,16,-84,28,-70,94,-72,-52,-78,62,-56,-12,-88,76,74,12,12,-28},new int[]{-42,-94,96,74,70,-40,50,-40,-26,2,-76,-88,-54,80,66,38,-8,42,94,-12,-88,38,-44,-26,-98,80,-56,-40,48,-48,-8,50,6,74,94,-50,-70,-30,70,-2,60,-92,38,-28,-64,-62,-54},new int[]{-40,70,-60,-38,-70,6,24,-72,22,-58,-2,70,58,28,90,-68,-12,18,-66,-56,66,32,4,98,64,-34,10,-78,-88,-38,36,-76,-96,94,-38,-18,-40,94,-18,-66,-34,66,82,-94,76,-38,14},new int[]{-98,-72,14,10,-30,56,-56,30,20,60,52,46,-16,-60,60,0,-70,50,-64,90,-62,-10,-94,74,-92,98,86,42,-18,-66,34,40,36,-44,-44,-86,-22,-50,50,-28,-34,-40,-30,44,-54,74,54},new int[]{16,-12,-44,82,-60,36,-24,-12,78,-74,-82,66,-48,74,-2,-4,-4,10,-4,18,8,-84,-56,64,66,-46,-56,-60,-60,-72,92,-82,44,28,30,84,68,34,-36,-58,60,-26,10,74,50,-70,-40},new int[]{-94,-12,-34,-82,-22,22,-14,-66,76,-42,-94,24,40,10,-24,60,80,-52,62,76,96,92,46,-44,-20,-92,-36,-6,-90,-64,-64,44,54,-60,-30,80,32,32,-76,-10,48,88,-84,-32,-94,-50,80},new int[]{86,56,-50,-48,74,36,2,6,-64,24,86,58,-92,-66,-32,-4,-74,-94,16,-18,10,-66,82,-96,-96,56,18,78,-12,32,48,70,42,20,0,-80,78,-28,80,0,-94,-56,-28,48,-30,-50,-20},new int[]{46,-94,-6,60,-94,-18,80,-58,-62,-70,-20,-8,-60,92,32,78,4,-26,-32,98,40,98,-92,-96,2,-96,42,30,2,-4,20,-84,-8,-40,42,8,92,32,-12,44,-60,32,14,-56,-68,-72,-18},new int[]{2,50,48,44,-24,68,16,88,-66,-48,-82,-50,-24,-50,-56,40,30,-58,38,24,44,42,52,18,-86,26,-4,-64,70,-12,6,-90,78,12,-82,52,70,32,74,66,-98,-62,76,20,74,-48,-46},new int[]{90,66,-62,86,76,-54,78,98,66,-16,16,32,48,-42,50,16,-86,66,12,88,-92,-78,-84,74,10,0,-86,-34,14,-74,-88,86,-48,-34,44,-58,26,-48,-70,-96,-26,84,82,-90,-14,30,-20},new int[]{-26,58,-32,22,-82,50,-50,42,14,60,-28,-12,34,94,-68,-48,-6,-98,66,94,-60,26,72,10,-58,-66,-50,-92,-34,66,36,44,94,-34,-76,22,-94,14,56,-2,38,42,16,20,-90,-36,-34},new int[]{-90,98,34,26,58,70,-86,46,-40,70,94,40,-36,2,-82,0,-4,-18,70,40,92,-38,-46,-74,-82,-54,44,-34,24,-46,60,-36,-86,92,-32,-38,76,46,-42,-56,-42,-8,48,-64,88,-50,24},new int[]{70,-26,-72,-18,-88,-58,76,-96,62,-12,-56,74,62,68,-86,82,34,-98,-52,22,-16,-48,-14,-8,-56,10,48,98,-70,82,2,-86,76,72,-70,-6,58,-18,-48,52,-48,-76,68,-64,-34,-56,-88},new int[]{34,-80,-50,74,-26,2,40,-66,-16,56,22,10,-72,86,54,34,30,38,-86,-22,-38,-28,-86,28,96,6,-86,54,4,-84,34,-58,-6,40,54,-60,-22,84,74,-92,-58,-86,-76,-66,-36,90,-30},new int[]{26,74,84,-60,52,-14,98,-74,24,16,-96,-86,18,-82,-34,-82,-56,-86,-8,-50,-32,-44,8,50,-12,82,-10,80,-28,-28,2,-34,-88,28,-44,-94,-42,2,-48,54,90,16,-38,14,82,42,58},new int[]{-22,14,26,-60,-18,-38,-60,54,-48,60,50,-70,24,-50,18,48,98,42,-52,-68,24,94,60,74,76,6,-76,-70,-86,-22,76,16,-4,48,20,-60,82,38,32,36,-56,-58,40,12,46,18,-96},new int[]{-92,44,94,-42,-84,-78,-72,-62,-32,4,-12,-42,4,12,20,-12,6,38,-92,-64,64,92,-62,64,54,-60,-42,-54,-14,-28,26,-6,-14,0,80,10,-64,-54,2,82,-8,98,-20,72,-94,-78,-64},new int[]{50,44,-64,-36,60,-44,64,-64,40,-66,60,-44,6,-8,-80,36,2,30,-26,82,-82,26,-92,-40,-66,-62,76,-34,-46,-36,36,-92,36,-74,-78,50,-80,16,-88,92,-50,-80,12,-92,8,-18,-84},new int[]{20,-24,94,-62,40,-16,-24,-36,62,-88,98,-28,-80,96,-96,18,60,-92,22,96,98,-48,-82,62,-28,-74,-84,-56,88,-82,38,42,-82,-76,-16,-12,46,-46,48,96,12,66,74,-58,-2,-84,16},new int[]{-4,18,-28,22,70,-70,-70,66,46,-68,72,-60,-54,2,-82,60,86,-92,36,-44,98,88,-88,86,24,88,-80,-12,-18,-8,0,-26,2,56,94,90,30,-96,32,48,2,-72,-36,10,-52,0,98},new int[]{46,-62,-78,-50,98,26,42,6,26,-28,-56,60,-36,-54,-84,90,68,94,-28,60,52,54,28,12,58,-42,86,-74,-84,-88,54,-18,54,38,-96,84,-78,-26,50,86,58,24,-2,-78,40,-68,6},new int[]{2,26,-82,-84,46,46,0,18,90,-92,24,-34,-70,-84,18,32,-36,-84,-36,20,26,-72,-12,36,72,42,58,-34,30,40,-6,-18,-52,20,-52,4,-64,-64,-2,36,64,-86,-70,-38,-50,-34,60}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{49,76,85,2,48,20},new int[]{13,2,84,21,44,17},new int[]{70,85,58,75,89,16},new int[]{86,45,19,97,95,63},new int[]{62,44,26,75,73,95},new int[]{93,35,62,88,6,33}}); param0.add(new int[][]{new int[]{-80,-72,-68,-62,-56,-40,-28,4,22,24,34,58,60,60,78},new int[]{-88,-68,-48,-28,-24,-4,0,2,12,30,42,48,52,64,68},new int[]{-92,-86,-82,-44,-38,-20,-18,-16,2,4,12,32,42,54,96},new int[]{-82,-74,-64,-48,-30,-10,16,20,28,46,46,54,60,74,96},new int[]{-84,-78,-70,-30,-28,-18,-10,-2,2,14,30,44,50,92,98},new int[]{-92,-74,-64,-48,-46,-8,20,22,28,30,30,32,46,62,84},new int[]{-92,-82,-82,-66,-64,-60,-40,-2,2,40,44,46,66,68,74},new int[]{-70,-58,-54,-46,-34,-18,14,20,22,32,48,62,84,86,90},new int[]{-92,-62,-58,-48,-30,-28,0,8,16,20,26,38,70,92,98},new int[]{-90,-80,-46,0,14,36,42,48,48,50,50,50,52,76,98},new int[]{-80,-78,-58,-58,-54,-44,-42,6,20,24,28,34,40,58,78},new int[]{-90,-80,-60,-40,4,6,10,26,28,34,36,38,42,44,56},new int[]{-96,-96,-72,-58,-54,-40,-34,-34,-28,-26,-22,-18,-2,18,54},new int[]{-98,-90,-76,-64,-62,-58,-54,-30,-16,14,36,54,54,72,92},new int[]{-86,-70,-58,-48,-46,-38,-32,2,20,44,54,56,66,82,84}}); param0.add(new int[][]{new int[]{0,1,0,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,0,1,1,1,0,0},new int[]{0,1,1,1,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,1,1,1,1,1,1,0},new int[]{0,0,1,1,0,0,0,1,0,1,0,0,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,1,1,0},new int[]{0,0,1,0,1,0,1,0,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0},new int[]{0,1,0,0,0,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,0,1,1,0,1,0,1,0,0,0,0,1,1},new int[]{1,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0},new int[]{1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,1,0},new int[]{1,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,0,1,0,0,1,1,0},new int[]{0,0,1,0,0,0,1,1,0,1,0,0,1,0,1,0,1,1,1,1,0,0,0,0,0,1,0,1,1,1,0,1,1,0,1,1},new int[]{1,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,0,1,1,1},new int[]{1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,1,1,0,0,1,0,1,0,0},new int[]{0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,1,1,0,1},new int[]{0,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,0,0,0,0,1,1,1,0,0},new int[]{1,1,0,0,1,1,0,1,0,1,1,0,0,0,1,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,1,1,1,1},new int[]{1,1,1,0,1,1,1,1,0,0,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1},new int[]{1,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,1,0,1,1,1},new int[]{0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,1,1,0,0,1},new int[]{1,0,0,1,0,1,0,1,1,1,1,0,0,1,1,1,0,1,1,1,1,1,0,0,1,0,0,1,0,1,1,1,1,1,1,0},new int[]{0,1,1,1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,0,1},new int[]{1,0,0,0,0,1,1,0,1,0,0,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1},new int[]{1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,1,0,1,1,1,1},new int[]{1,1,0,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,1,1,1},new int[]{0,0,1,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0},new int[]{0,1,0,0,0,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,0,1,0,0,0},new int[]{0,0,1,0,0,0,0,1,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0,0,1,0,1,0,1,1,1,1,0,1,0,1},new int[]{0,1,1,0,1,1,1,1,1,1,0,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,0,1,0},new int[]{1,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0},new int[]{0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,1,1,1,1,1,0,1,1,1,1,0,0,1,0},new int[]{1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0},new int[]{1,1,0,0,1,1,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,1,0,1,1,0,1,1,1,1,1,0,0,0},new int[]{0,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,0,1,1,0,0},new int[]{0,0,0,1,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0,0,1,1,1,0,0,0,1,0,0,1,1,1,1},new int[]{0,1,1,1,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,1,0,0,1,0,0,0,1,1,1,1,1,1,1,0,0,1},new int[]{0,1,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0},new int[]{0,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,0},new int[]{0,1,0,0,0,1,0,1,1,0,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,1,1,1,1,0,1,0}}); param0.add(new int[][]{new int[]{1,2,2,2,3,3,10,11,11,19,27,30,31,36,38,51,55,64,64,68,72,78,79,83,87,98},new int[]{1,3,5,6,19,25,31,32,39,40,51,51,52,54,57,58,64,65,66,73,76,83,87,90,92,97},new int[]{1,6,7,26,29,33,35,42,44,46,47,50,61,64,65,67,73,75,81,81,86,87,88,88,95,95},new int[]{1,3,6,19,19,21,29,34,36,36,43,44,52,53,53,63,64,67,68,75,75,75,76,78,81,83},new int[]{9,10,18,18,20,22,28,31,35,42,47,48,48,62,63,65,65,70,73,75,75,82,92,95,95,97},new int[]{10,14,16,17,27,30,33,36,37,37,39,47,48,48,56,57,62,74,78,81,82,84,87,88,95,95},new int[]{2,16,16,18,21,21,25,26,33,38,51,51,57,59,66,68,68,69,70,74,74,74,84,86,96,98},new int[]{3,5,14,14,17,23,26,26,27,31,33,36,37,51,63,64,70,70,72,75,79,86,90,90,97,97},new int[]{15,15,16,19,23,29,31,33,35,35,37,38,44,49,56,68,73,74,75,76,80,84,87,89,95,99},new int[]{2,3,7,13,14,16,19,19,21,28,32,39,43,47,58,64,66,80,80,82,83,84,91,91,95,98},new int[]{2,3,11,21,22,24,26,34,39,41,41,47,49,50,50,59,61,67,78,79,80,85,87,87,90,96},new int[]{6,9,11,15,20,27,27,27,28,42,47,47,58,61,67,70,70,71,76,77,78,80,83,91,97,98},new int[]{4,8,12,13,14,14,15,20,21,22,24,25,29,51,51,57,60,68,73,76,76,81,92,93,94,98},new int[]{1,8,23,26,26,26,31,40,41,45,46,49,50,53,55,58,62,65,66,68,71,77,87,87,97,98},new int[]{3,9,11,17,26,28,31,32,32,33,35,41,41,41,44,48,48,63,72,74,82,84,85,91,92,94},new int[]{3,5,6,8,10,17,36,41,42,45,50,51,52,53,56,58,63,64,69,72,73,74,78,87,90,92},new int[]{2,6,12,19,20,25,27,30,35,38,42,45,45,50,53,54,56,59,62,62,66,74,78,81,91,94},new int[]{6,8,9,15,18,20,23,23,29,30,39,41,49,62,65,69,76,79,83,84,85,86,90,94,98,98},new int[]{5,6,7,11,12,16,19,19,20,20,26,44,46,53,56,60,61,74,75,75,76,80,93,95,96,99},new int[]{7,15,19,22,23,24,31,34,35,37,40,42,44,52,57,67,73,74,76,77,78,83,84,95,96,97},new int[]{2,4,15,16,16,23,26,32,34,39,40,41,46,52,56,61,62,65,76,80,81,82,84,85,86,87},new int[]{9,13,22,41,42,42,42,45,48,49,51,51,54,58,59,60,73,74,75,83,83,86,91,94,98,98},new int[]{5,9,9,16,21,21,22,27,28,31,31,32,38,38,49,51,61,62,65,69,73,75,85,91,91,96},new int[]{4,4,7,7,7,9,11,21,31,36,43,43,57,58,63,63,64,66,70,71,73,77,82,83,92,97},new int[]{1,6,9,9,12,14,15,16,20,24,25,29,30,37,43,44,45,53,58,63,69,70,72,78,83,88},new int[]{1,15,16,17,19,24,25,35,43,44,44,46,48,49,50,53,54,61,61,67,70,74,74,83,87,88}}); param0.add(new int[][]{new int[]{-62,-26,-90,-96,66,8,88,98,26,-4,-62,38,24,18,-88,-78,22,-80,80,8,62,22,-20,42,78,-96,38,22,44,18,-98,4,66,-58,50,-98,42,48,-52,98,-72,72,60,-66,-78,-92},new int[]{24,94,24,64,78,-82,12,-96,-80,32,-18,-8,-98,-32,-8,-40,-98,-52,-86,-50,-16,-36,6,6,70,-78,10,-34,-98,24,-62,4,-8,-86,60,-52,-48,-44,82,68,98,30,6,-58,94,-52},new int[]{-20,84,-82,42,42,86,38,64,84,88,46,-48,-8,-60,-94,-74,-72,-74,-52,-96,46,68,84,-64,22,-44,78,-62,64,14,-80,90,-26,84,92,-82,36,-56,-46,28,86,-58,50,-78,-36,-50},new int[]{-26,-94,-38,-38,-10,58,-42,36,12,22,52,48,40,22,84,-56,-76,48,-42,-58,50,98,-46,-30,16,30,66,-2,68,44,-60,-4,40,16,68,-40,96,-40,-6,60,62,90,90,-20,98,94},new int[]{80,36,26,86,76,38,88,80,-90,-60,-52,92,48,-32,-18,4,-44,52,14,2,92,2,-70,-16,92,12,-66,62,52,-92,-98,-80,-46,-50,72,98,64,-32,52,-10,20,-20,-54,-12,64,-64},new int[]{38,94,60,44,-26,-46,92,60,-18,-10,-60,-78,-96,54,-88,-20,60,66,-62,40,98,-50,86,-56,-52,-60,52,26,62,62,-4,54,-60,52,-50,-2,92,-38,-98,-66,60,70,76,64,-80,-88},new int[]{94,84,38,-60,-72,50,-42,-52,-4,16,-40,90,-18,-20,34,-28,-4,-66,-82,-30,-36,94,-38,-56,-22,62,-2,30,-58,70,-80,0,-98,14,40,-28,76,30,18,6,-72,-28,24,26,66,-56},new int[]{38,52,34,-60,78,64,2,64,-50,14,-66,-2,-10,10,98,36,96,96,-76,-58,-52,22,40,-28,18,-34,-72,-98,-54,82,30,90,0,-22,6,-36,-34,44,-60,-40,70,-26,14,14,-72,98},new int[]{38,-88,26,34,32,-78,38,12,-16,-76,28,-74,6,-54,96,8,-34,72,84,-70,-26,16,-86,-14,46,-24,-24,-96,-82,-66,78,20,-94,-76,-76,90,-32,-24,-36,-62,-88,-26,-36,0,-92,40},new int[]{0,66,60,82,-14,92,88,30,60,36,80,-54,28,-10,-96,-4,-68,46,98,42,38,30,-74,-2,30,6,-78,74,-56,-6,-48,32,88,-40,18,36,-34,-28,30,-54,-82,98,34,-56,50,40},new int[]{18,-96,54,-6,94,-68,-28,-18,-90,-64,-88,60,60,-72,82,48,6,-44,-22,-82,62,52,-32,0,2,-12,-78,92,22,2,84,-64,50,-6,-2,90,76,-48,-28,22,-30,14,68,26,80,20},new int[]{-94,-26,-52,4,-44,12,74,-26,28,64,84,-62,-10,-12,74,68,94,-80,32,-26,80,44,-80,-74,-82,-86,98,-12,30,60,90,16,-58,-28,18,14,-86,-46,-62,-88,-84,74,-48,-8,-26,60},new int[]{10,64,58,-92,-48,38,-30,-64,-58,-68,-26,-68,52,48,-72,96,32,-48,-60,54,-6,-72,-22,74,4,14,80,52,-50,22,74,-14,-92,-96,54,-90,-18,18,-16,-82,26,98,-68,8,-78,-48},new int[]{-78,12,70,-42,34,-52,86,64,-32,-96,-22,-8,84,36,-38,-80,84,72,58,34,-86,-84,30,-40,-90,10,0,-74,14,76,-22,-2,86,86,-60,32,-62,-34,4,14,68,-38,86,94,18,30},new int[]{66,16,82,-70,-24,-90,-70,82,32,-42,-82,74,-24,-16,68,-92,32,-58,-58,-14,-34,68,-24,20,68,54,78,-72,-14,-46,74,-90,-98,-64,-2,-58,-6,-20,54,-70,-46,-56,50,-62,0,-14},new int[]{4,50,66,84,-44,50,-22,36,20,94,-2,66,-16,-82,-90,-74,88,42,16,42,-76,0,28,-42,-44,48,-12,78,-40,54,34,-86,-26,-46,78,-68,-80,-94,-2,-48,-42,62,48,-24,-20,60},new int[]{-16,20,16,-10,-96,-32,42,-52,-72,2,-66,-40,32,86,96,-46,88,64,90,68,-22,0,-18,82,22,62,-82,-44,76,-62,-26,8,82,84,96,8,76,66,-56,96,96,-54,-70,66,60,40},new int[]{64,-58,-76,94,-4,-48,-40,96,46,-16,2,-52,42,-80,-44,10,-60,28,-52,-54,-88,72,-40,-2,78,86,-26,-86,-90,-4,-14,46,-84,-36,-88,4,-4,-92,-42,36,-94,-10,-38,-82,-50,4},new int[]{-72,22,-40,24,10,26,72,14,-90,-66,-88,-30,40,40,-80,-56,-4,-88,32,-98,22,10,58,62,-10,24,-80,-90,28,-64,-26,30,-32,-44,90,-12,16,-48,98,88,-58,-54,-10,48,-12,-40},new int[]{70,-36,-30,-26,-48,86,-12,-78,62,-8,-80,-14,-48,52,-38,38,-54,-40,-24,-80,-94,-50,-46,64,12,62,-8,12,-22,24,-30,20,-8,-76,-18,-76,52,-74,38,-26,-98,58,76,38,44,-14},new int[]{32,-62,24,-58,-50,32,-84,0,-62,-12,28,72,0,42,82,32,-20,-96,-20,92,-32,86,-70,74,-76,64,48,66,94,52,48,6,-78,-88,24,74,32,38,38,92,50,24,34,46,-14,18},new int[]{-42,86,-48,-96,-72,52,-28,8,-92,-28,-56,-16,-48,-88,90,42,30,62,-50,78,-20,26,10,-14,-40,22,-34,-98,-48,-56,54,0,-54,-68,52,70,78,-20,60,-88,-26,40,-80,-6,66,-86},new int[]{18,-68,-46,24,-62,-8,14,-46,-60,-48,0,-46,50,98,-86,2,92,-94,66,-90,-74,-34,-80,14,-42,-72,-54,36,70,38,-92,64,-86,-64,6,-22,92,-60,38,94,-74,46,96,-32,-10,22},new int[]{2,44,44,-16,-96,26,-32,-66,-22,30,68,-12,-94,32,-48,16,-80,-94,2,-4,-56,-22,-22,36,16,50,-2,46,56,-68,-72,-34,-54,-76,-84,74,22,-38,26,36,30,-56,-82,54,92,-50},new int[]{-12,2,-28,98,-94,-52,18,-30,-50,36,46,-22,-54,-70,64,-30,32,-14,38,-56,-34,84,24,10,26,32,52,-16,-48,4,-24,-70,-94,-10,-76,-36,46,88,18,48,-64,-12,-8,-70,-4,-80},new int[]{90,-8,30,-44,-64,42,8,-14,-6,-70,-42,-98,-48,34,-88,-22,48,-98,0,-16,32,-36,78,84,60,80,90,58,-72,80,-96,-98,-96,58,-62,86,-6,-14,-50,-96,8,18,-84,-34,-72,-18},new int[]{-42,36,86,26,10,-20,-22,46,28,88,-34,-84,60,8,-22,38,-40,-36,18,-76,40,-22,14,86,22,24,98,88,-90,58,-58,30,70,84,-32,2,20,80,28,-44,-98,-6,-64,90,42,-92},new int[]{0,-38,82,46,-24,34,34,-82,2,-86,-30,64,16,-6,22,-88,-26,-88,-74,-20,82,94,-16,64,26,76,58,-92,28,-16,44,56,20,40,20,78,-96,-86,-54,-46,54,-76,82,-50,-54,-40},new int[]{-66,-18,2,98,6,70,32,-6,66,4,88,64,20,-24,68,2,-86,66,-46,18,70,-90,6,-44,-28,-86,16,-38,-34,2,96,80,80,34,-34,-66,68,-20,32,36,8,-40,-34,8,80,-94},new int[]{54,-28,-22,-26,96,-34,96,-92,20,-24,26,24,18,96,14,96,48,-96,38,86,88,-66,26,-22,54,72,42,0,-10,-42,-54,78,-42,-2,-30,-60,-20,-84,-14,98,24,96,-62,-28,-52,34},new int[]{-96,78,-66,-94,2,36,-62,-14,70,-22,-92,-58,-58,-2,40,80,86,-84,-98,-66,-44,-58,56,-90,88,34,76,82,-2,38,-26,92,-94,62,-56,-10,14,-50,-92,80,8,-36,-96,-10,42,-84},new int[]{50,-14,12,78,50,-54,-22,-34,-70,-58,-18,38,8,-88,-88,-86,58,-42,-28,-42,-26,26,90,14,-40,98,94,58,68,14,36,20,58,14,-22,-34,-48,-64,38,-12,-12,30,24,6,38,50},new int[]{-48,6,82,94,30,58,-30,-54,-26,-32,48,40,20,-68,-28,-50,-4,88,-58,-46,-70,48,-30,76,-58,-96,-56,36,10,56,14,-6,38,12,-52,-78,-56,-36,48,-56,-78,98,-56,-92,-50,46},new int[]{-30,-64,-90,-38,-28,74,70,-44,56,-38,64,98,62,-50,-68,82,-6,36,-16,-60,-44,-34,92,-56,12,12,88,30,-72,98,-86,-64,82,-56,58,28,24,-72,-98,-68,-54,-52,50,8,44,18},new int[]{-92,-86,-68,-18,56,26,68,-84,60,-68,20,-2,-86,-76,-92,-86,-96,50,84,-44,62,24,-20,88,-94,-66,32,50,-32,-96,18,56,48,18,-40,50,-18,-10,84,-48,8,-50,86,88,90,-70},new int[]{60,46,46,96,44,-38,-66,-56,12,-28,-36,-32,-98,50,16,-8,58,-94,20,-94,88,82,30,-32,-6,-50,6,44,-98,-16,-96,-68,54,0,68,44,58,-72,-96,-84,-70,-14,-12,-52,-78,-76},new int[]{-8,72,32,-90,-68,60,-10,-34,-38,-88,22,82,-46,-76,96,54,0,-52,94,-66,34,28,-50,-32,-80,0,98,18,96,28,72,64,-52,98,14,28,46,48,34,-34,-96,-24,-48,-86,-26,-74},new int[]{36,26,22,18,4,78,72,28,-24,-64,28,2,-4,46,82,-70,36,66,22,-32,-48,24,-20,66,80,-22,88,26,68,22,84,-44,-28,76,-10,90,-46,-40,-94,22,14,96,-66,66,-4,40},new int[]{-44,-22,52,30,70,22,22,74,56,-14,66,-34,34,-2,-96,-90,-38,32,-4,-74,16,-34,-6,14,38,-66,68,-2,-28,-66,-8,-22,80,-70,-62,-66,-18,-84,82,-8,34,-42,16,10,-64,34},new int[]{-10,92,-78,-80,18,54,8,16,-98,14,8,14,-6,-72,-30,68,-76,40,92,-94,20,90,68,28,38,-8,-94,50,56,-92,-46,-54,-12,-48,18,76,10,58,24,-32,6,94,64,66,96,90},new int[]{88,62,-84,24,76,-24,-22,26,42,-56,-56,-26,-40,88,74,32,54,-96,-24,-44,90,66,56,-68,34,18,44,-38,82,-12,-8,80,70,92,6,-50,40,-62,60,-98,54,36,-4,84,48,84},new int[]{86,-98,-60,26,-58,-26,92,-80,-56,-30,60,-10,96,92,-76,-28,88,4,-88,-82,-22,96,-18,-8,-88,16,12,-30,-66,-26,38,-76,68,-22,-78,56,-70,-42,76,92,8,-76,0,70,-70,32},new int[]{42,-88,-52,-12,-58,78,4,98,-92,96,70,96,96,86,-6,-58,-14,-92,-6,16,-28,88,28,14,-14,22,-46,-30,-6,-34,-12,-70,82,68,34,58,20,90,-58,-66,-12,-20,-76,-86,56,32},new int[]{-62,-58,-60,26,38,68,-18,26,-42,30,-52,-28,-98,-58,-2,86,-38,-58,-58,-82,-52,80,42,-4,-92,32,-90,60,70,-96,96,-36,-16,40,-24,44,-34,48,-54,80,-86,14,34,52,50,38},new int[]{68,-46,-50,64,-32,-94,14,-66,90,-54,60,20,52,36,-26,-92,38,10,84,-18,-38,-98,92,-50,-58,40,-56,-44,-46,-50,-2,52,22,-80,-20,86,8,64,48,-8,14,-86,-56,-26,-6,28},new int[]{-58,-40,-82,8,26,-46,-14,-62,-28,-28,90,76,62,-18,-34,18,-78,14,24,2,62,62,-88,-84,-54,66,96,44,-46,-18,-44,32,-12,-94,-54,-18,62,12,4,8,-66,72,12,-32,48,68}}); param0.add(new int[][]{new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},new int[]{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1}}); param0.add(new int[][]{new int[]{94,55,14,44,30,47,19,87,68,17,34,15,93,98,10,27,43,51,83,24,19,45,91,59,84,82,80,51},new int[]{4,37,73,13,56,1,10,52,62,6,71,18,21,24,48,82,41,86,45,79,74,42,49,92,73,40,57,28},new int[]{63,27,3,18,66,35,77,76,77,17,69,56,34,48,83,96,57,6,7,20,41,11,14,78,10,10,24,76},new int[]{75,75,93,9,27,21,26,88,55,93,73,46,37,14,94,15,87,91,66,76,90,95,6,14,33,22,69,34},new int[]{32,11,56,49,83,82,15,80,85,68,22,87,8,33,50,87,59,82,73,34,31,39,77,30,51,44,57,92},new int[]{66,57,78,33,72,1,88,46,15,89,96,67,28,91,99,7,69,13,18,26,36,48,20,39,66,57,25,66},new int[]{40,41,73,88,44,60,53,70,38,51,3,35,25,34,30,56,58,66,67,63,7,64,48,46,43,21,33,67},new int[]{41,71,98,92,82,99,88,68,7,52,92,75,25,95,54,39,46,30,71,69,53,51,73,65,2,63,60,95},new int[]{19,56,87,21,61,51,78,34,40,23,65,80,94,90,70,98,32,89,65,82,35,91,83,18,46,89,47,10},new int[]{69,26,55,42,59,37,59,88,16,97,11,51,67,3,84,50,39,44,92,36,36,88,44,29,73,92,93,48},new int[]{86,59,11,78,91,40,93,61,6,20,70,18,98,14,25,89,49,26,32,79,1,76,30,47,22,81,28,9},new int[]{96,52,64,21,57,31,23,75,71,69,40,67,54,18,64,52,99,77,20,52,59,16,47,26,49,83,53,86},new int[]{27,61,59,50,90,15,24,36,40,96,35,46,52,45,97,77,15,67,59,18,86,6,21,40,29,89,94,21},new int[]{97,78,48,95,78,24,11,45,29,18,41,68,88,66,20,13,75,14,90,17,40,76,91,40,62,21,19,55},new int[]{92,89,85,12,93,53,47,60,39,14,63,87,82,98,49,59,34,64,57,85,49,27,87,67,94,62,89,68},new int[]{98,25,36,88,5,79,87,67,70,88,2,33,46,81,38,43,11,10,38,32,40,94,63,52,77,32,52,39},new int[]{25,2,1,7,56,64,59,37,56,32,37,58,28,67,45,61,95,69,96,96,16,86,18,8,8,89,8,46},new int[]{41,21,95,76,6,55,40,59,96,50,38,15,82,58,76,3,80,21,63,97,17,20,8,50,22,75,46,30},new int[]{72,75,28,67,4,83,57,98,8,24,9,39,3,97,49,32,91,36,68,1,76,98,67,68,34,38,43,96},new int[]{84,29,46,41,1,42,79,84,49,95,25,18,22,61,39,90,51,11,57,28,35,68,51,77,46,72,19,54},new int[]{72,65,70,48,89,7,92,78,95,27,41,85,20,54,54,33,19,28,84,35,29,35,97,63,57,2,29,28},new int[]{26,65,73,34,38,95,83,73,23,67,42,19,79,13,13,63,1,53,52,71,40,40,45,42,13,50,30,39},new int[]{9,56,62,34,18,82,94,2,12,45,40,38,35,20,95,13,21,90,68,20,59,1,6,89,24,96,40,68},new int[]{27,44,44,50,10,72,77,69,49,66,94,32,3,48,67,77,49,71,46,76,91,5,69,46,61,90,14,74},new int[]{88,44,35,20,13,82,8,38,67,85,88,93,16,96,4,43,67,24,44,66,57,26,26,32,85,1,91,88},new int[]{74,52,93,80,26,34,69,46,61,3,45,82,17,45,90,67,36,39,9,56,76,79,34,94,53,87,80,71},new int[]{81,47,80,21,34,27,67,38,92,35,37,74,17,91,36,91,49,18,92,1,55,46,55,48,19,36,25,26},new int[]{30,49,79,30,21,84,33,48,65,43,62,63,52,43,5,88,75,27,54,95,83,42,41,18,62,99,77,68}}); List<Integer> param1 = new ArrayList<>(); param1.add(10); param1.add(44); param1.add(16); param1.add(4); param1.add(9); param1.add(27); param1.add(24); param1.add(43); param1.add(19); param1.add(20); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([[1, 7, 17, 19, 22, 25, 27, 29, 41, 60, 67, 73, 79, 85, 94], [2, 6, 16, 21, 30, 42, 43, 48, 50, 52, 60, 61, 68, 92, 95], [4, 8, 10, 14, 15, 20, 22, 23, 23, 39, 40, 63, 70, 75, 87], [7, 21, 24, 36, 39, 43, 50, 58, 58, 67, 70, 89, 94, 98, 99], [4, 13, 17, 20, 21, 24, 30, 45, 57, 58, 59, 65, 66, 91, 97], [15, 15, 18, 33, 38, 43, 51, 57, 64, 68, 70, 75, 85, 94, 97], [2, 5, 6, 6, 12, 41, 43, 44, 48, 48, 53, 53, 60, 69, 99], [1, 13, 14, 24, 24, 25, 35, 36, 40, 67, 74, 75, 87, 88, 96], [6, 13, 23, 28, 29, 39, 40, 50, 50, 63, 63, 81, 85, 88, 96], [4, 13, 26, 27, 36, 40, 42, 42, 46, 48, 57, 62, 67, 67, 70], [20, 25, 29, 61, 69, 70, 73, 75, 78, 80, 84, 85, 88, 95, 97], [2, 2, 6, 11, 11, 31, 39, 48, 50, 52, 54, 64, 77, 89, 97], [1, 14, 25, 26, 29, 41, 46, 55, 67, 68, 77, 77, 83, 84, 88], [6, 9, 11, 25, 29, 33, 36, 44, 63, 65, 67, 68, 78, 89, 91], [12, 13, 13, 15, 43, 45, 50, 60, 62, 62, 64, 86, 91, 96, 96]],10,), ([[74, -94, 42, 56, -64, -46, -34, 54, -2, -92, 0, -38, -76, -16, 42, 20, -58, 36, 66, -88, 6, -82, 46, 2, 2, -62, -76, -10, -26, -44, -38, 70, 46, 16, 12, 84, 4, -72, -84, 66, -6, -92, 46, -94, -46, 74, 64], [20, -22, -40, -22, -40, 56, 0, -84, -96, 32, -36, -16, 56, 36, -24, 20, 50, 28, 52, -44, -36, -18, 14, 42, 28, 24, -88, 90, 76, -72, -80, -80, 48, 56, -28, -18, -56, 32, -72, 30, -46, -60, 8, -90, 52, -10, 86], [-82, 60, 60, 72, -68, 2, 40, -56, -38, -80, 10, 54, -22, 34, 62, -78, 10, 28, -8, 28, -22, -34, 12, 14, -18, 38, 88, -10, -70, 44, -70, 10, 70, -58, 36, -70, -32, -60, -98, 32, 32, 6, 58, -78, -58, -66, 74], [58, -16, 66, -26, 18, 46, 92, 14, 62, -8, 62, 12, 72, 8, 36, 22, -24, -2, 80, 88, -16, 46, 16, -70, 22, -58, -46, -66, 4, 86, 54, -86, -6, -36, -54, 14, -38, 16, -12, -68, -18, 96, 54, 70, -22, 78, 40], [-38, -50, -20, -58, 80, -42, -64, -12, 64, -56, 50, 36, 18, 58, 12, 12, 12, -22, -72, -44, 28, 48, -2, 34, -78, -36, -60, -34, 28, 8, 30, -98, 4, 0, 6, 70, -90, -4, 38, -88, -84, 86, 24, -18, 96, -72, 76], [-78, 18, -82, -18, 32, -26, -54, -18, 84, 68, -94, 42, 26, 88, 34, 18, -22, 20, 44, -60, 54, -60, 14, 86, 18, 10, -48, 96, -36, -98, 96, -6, -96, -2, -92, -78, -24, 40, -82, -74, 0, 18, 0, 28, 16, 78, -76], [32, 46, -30, 98, -92, 24, 42, -2, -92, 12, -24, 84, 80, -74, -80, -48, 54, 30, -4, 28, 0, -56, 78, 76, -96, -32, -52, 82, -78, 46, -92, -16, 58, 78, -14, -82, 78, -44, -34, 34, 2, 76, 72, -34, -80, 88, 20], [-66, 6, 70, 82, -86, -16, 38, 22, 42, 76, 58, 2, -12, 0, 14, -8, -8, 62, 46, -38, -90, 8, 36, -68, 56, 26, 40, -36, 76, -54, 44, 88, 46, -62, 34, -26, 90, -94, 52, 40, 24, -86, 36, 28, -12, -48, 6], [-12, 14, -96, -4, -96, -18, -60, -52, 86, 22, -44, -22, -68, 66, -66, 72, -42, -14, -98, 56, 82, -52, -84, 82, 98, -36, -14, 20, -48, 90, -20, 80, -18, 6, -82, -4, 88, 88, 82, 78, 88, -34, 22, 6, -16, 4, 32], [18, 24, 52, -50, -82, -66, 58, 42, -60, 66, 86, 82, -66, -72, -6, 80, 78, 68, -30, -76, -64, 98, -62, 80, -96, 32, 60, -52, -26, -66, 52, -8, 42, 74, -72, 94, -94, -56, -14, 74, 72, -82, -86, -80, -4, -64, -52], [-82, 2, -16, 56, -14, 70, -60, 16, 82, 62, -52, 12, -74, -22, 50, -82, -14, -48, -88, 52, -12, 92, -40, 16, -66, -92, 30, -80, -10, 48, -4, 16, 50, 66, 44, -40, -52, 48, 18, -16, -56, 58, 28, -42, -80, 22, -58], [42, 38, 28, 30, 16, 66, -92, 36, -40, 28, 12, 2, -50, -42, -96, -56, 6, -16, 10, 96, -62, 64, -8, 82, 46, 94, 6, 30, 84, 64, -58, 88, 42, 88, 0, 16, -30, 48, -10, 30, 94, -42, 56, -82, -60, -84, -34], [60, -50, -90, 24, -8, 40, -92, -28, 28, 84, -36, -62, -24, -54, 98, -90, 50, -26, -18, 8, -74, -20, 54, -22, -44, -84, 64, 66, -20, 56, 96, 54, 94, -60, 96, -46, -66, 66, -48, 2, -90, -94, -86, -80, -36, -66, 36], [82, -38, 10, 18, 8, -12, -92, -96, -50, -34, 18, -54, 8, -36, 56, -32, 80, -84, 96, 76, 6, 72, 62, 24, 58, 20, -56, -94, -92, 16, 22, -68, -18, -26, -56, 80, -52, 50, 56, 78, -6, 54, -58, 16, 78, 52, 80], [-34, -56, -86, 42, 26, -78, 8, 92, 2, 10, -56, -14, 84, -20, 14, -76, 2, 82, 90, 28, 18, 16, 94, -96, -40, 22, -52, -90, -28, -64, 38, -68, -62, -94, 76, -78, -48, 70, -60, -98, 84, -38, -12, -20, 8, 84, -52], [-74, -94, 42, 80, 12, 56, -90, 58, 4, -58, 20, 14, 80, -88, 22, 94, -18, -96, 76, 88, 72, -98, -80, 88, -8, 6, -10, 50, -78, 16, -40, 28, 14, -98, -90, -4, 30, 56, 28, 56, 32, 12, 68, 2, 2, 18, 96], [70, 24, -78, -52, -10, -54, -4, 22, -96, -60, -16, 90, 70, 64, 78, 90, -74, 98, 80, 84, -84, -22, 58, -12, -84, -2, -72, 24, -96, 52, -62, 58, 72, -24, -54, -38, -12, 34, 42, -50, -14, -16, 62, -72, 14, -34, 50], [76, 48, -66, 12, -92, 36, 64, -86, -18, 2, 16, 2, 88, 70, -8, 4, -62, -34, -6, 54, 10, -8, -54, 32, 12, 94, -12, -68, 74, 84, -38, -4, -32, 20, 14, -8, 82, -66, 48, -26, -74, 10, -20, -74, -46, 78, -96], [28, 24, 16, 40, 12, -68, -42, 94, 18, 98, 68, -56, 2, -92, -10, -54, -2, -82, 86, -64, -38, -12, 48, -32, 16, 30, -36, -94, 84, -74, -30, -54, 62, -38, -74, -6, 70, -64, -26, -58, 30, 2, 96, 64, -86, -24, -12], [-30, -78, 84, 58, 20, 2, 10, -24, 62, -56, -80, 76, -40, -20, -66, -2, -62, 48, -74, -48, -82, 88, 64, -72, 74, -42, 30, -60, -88, -46, -72, 36, -98, 70, -84, -52, 68, -18, -90, -20, 44, -40, -92, 20, -98, -80, -84], [-90, 44, -30, 84, -10, 36, 28, 46, -96, -42, -60, 2, -14, 78, 80, 44, -54, -10, -12, -30, 80, -80, 94, 72, 50, -98, 74, 14, -28, -84, 60, 62, -72, -90, -46, -90, 56, -36, 98, 64, -26, 64, -68, -58, -10, -12, -18], [84, -86, 90, -90, -42, 38, 6, 8, -90, -6, -52, 18, -62, 96, 42, -26, -86, -24, 54, 10, 94, -66, 58, -82, 84, -42, -6, 48, 72, 54, 94, -36, -56, -66, 0, 28, 80, -22, 92, 44, 64, -86, -96, 6, 56, -62, -88], [32, -90, 68, 72, -74, -70, -4, 58, -78, -18, -50, -10, -84, 26, 38, -84, 72, 44, -52, 44, -26, 42, -84, 2, -42, 76, -16, -46, 0, -46, -26, -28, -10, 56, -84, -92, 84, 32, -80, -46, -10, -30, 52, -78, -50, 56, -22], [-78, 12, -90, -90, -74, 48, -46, 32, 4, 24, -6, 40, 80, -26, -68, -20, 70, 86, 60, -60, 84, 30, 34, -60, -42, 50, 38, 64, 30, -18, -50, -48, 66, -2, -20, 86, 26, -96, 96, -68, 38, 64, -40, -94, -52, 74, 52], [-40, 88, 72, -56, -26, -48, -48, -20, 46, 88, 14, 86, 4, 46, 6, -54, -86, 34, 58, -72, 92, -18, -88, 8, 0, -28, -78, -4, 40, 0, 28, -38, -60, -28, -44, 48, -56, -52, 2, 20, 72, -98, 6, 22, 64, 36, -60], [90, -8, 0, -42, -58, -96, 80, 52, -78, 24, -24, -92, -70, 42, -46, 96, -10, -32, -18, 22, 24, 86, -4, -86, -70, -70, -96, -98, -34, 0, 16, -84, 28, -70, 94, -72, -52, -78, 62, -56, -12, -88, 76, 74, 12, 12, -28], [-42, -94, 96, 74, 70, -40, 50, -40, -26, 2, -76, -88, -54, 80, 66, 38, -8, 42, 94, -12, -88, 38, -44, -26, -98, 80, -56, -40, 48, -48, -8, 50, 6, 74, 94, -50, -70, -30, 70, -2, 60, -92, 38, -28, -64, -62, -54], [-40, 70, -60, -38, -70, 6, 24, -72, 22, -58, -2, 70, 58, 28, 90, -68, -12, 18, -66, -56, 66, 32, 4, 98, 64, -34, 10, -78, -88, -38, 36, -76, -96, 94, -38, -18, -40, 94, -18, -66, -34, 66, 82, -94, 76, -38, 14], [-98, -72, 14, 10, -30, 56, -56, 30, 20, 60, 52, 46, -16, -60, 60, 0, -70, 50, -64, 90, -62, -10, -94, 74, -92, 98, 86, 42, -18, -66, 34, 40, 36, -44, -44, -86, -22, -50, 50, -28, -34, -40, -30, 44, -54, 74, 54], [16, -12, -44, 82, -60, 36, -24, -12, 78, -74, -82, 66, -48, 74, -2, -4, -4, 10, -4, 18, 8, -84, -56, 64, 66, -46, -56, -60, -60, -72, 92, -82, 44, 28, 30, 84, 68, 34, -36, -58, 60, -26, 10, 74, 50, -70, -40], [-94, -12, -34, -82, -22, 22, -14, -66, 76, -42, -94, 24, 40, 10, -24, 60, 80, -52, 62, 76, 96, 92, 46, -44, -20, -92, -36, -6, -90, -64, -64, 44, 54, -60, -30, 80, 32, 32, -76, -10, 48, 88, -84, -32, -94, -50, 80], [86, 56, -50, -48, 74, 36, 2, 6, -64, 24, 86, 58, -92, -66, -32, -4, -74, -94, 16, -18, 10, -66, 82, -96, -96, 56, 18, 78, -12, 32, 48, 70, 42, 20, 0, -80, 78, -28, 80, 0, -94, -56, -28, 48, -30, -50, -20], [46, -94, -6, 60, -94, -18, 80, -58, -62, -70, -20, -8, -60, 92, 32, 78, 4, -26, -32, 98, 40, 98, -92, -96, 2, -96, 42, 30, 2, -4, 20, -84, -8, -40, 42, 8, 92, 32, -12, 44, -60, 32, 14, -56, -68, -72, -18], [2, 50, 48, 44, -24, 68, 16, 88, -66, -48, -82, -50, -24, -50, -56, 40, 30, -58, 38, 24, 44, 42, 52, 18, -86, 26, -4, -64, 70, -12, 6, -90, 78, 12, -82, 52, 70, 32, 74, 66, -98, -62, 76, 20, 74, -48, -46], [90, 66, -62, 86, 76, -54, 78, 98, 66, -16, 16, 32, 48, -42, 50, 16, -86, 66, 12, 88, -92, -78, -84, 74, 10, 0, -86, -34, 14, -74, -88, 86, -48, -34, 44, -58, 26, -48, -70, -96, -26, 84, 82, -90, -14, 30, -20], [-26, 58, -32, 22, -82, 50, -50, 42, 14, 60, -28, -12, 34, 94, -68, -48, -6, -98, 66, 94, -60, 26, 72, 10, -58, -66, -50, -92, -34, 66, 36, 44, 94, -34, -76, 22, -94, 14, 56, -2, 38, 42, 16, 20, -90, -36, -34], [-90, 98, 34, 26, 58, 70, -86, 46, -40, 70, 94, 40, -36, 2, -82, 0, -4, -18, 70, 40, 92, -38, -46, -74, -82, -54, 44, -34, 24, -46, 60, -36, -86, 92, -32, -38, 76, 46, -42, -56, -42, -8, 48, -64, 88, -50, 24], [70, -26, -72, -18, -88, -58, 76, -96, 62, -12, -56, 74, 62, 68, -86, 82, 34, -98, -52, 22, -16, -48, -14, -8, -56, 10, 48, 98, -70, 82, 2, -86, 76, 72, -70, -6, 58, -18, -48, 52, -48, -76, 68, -64, -34, -56, -88], [34, -80, -50, 74, -26, 2, 40, -66, -16, 56, 22, 10, -72, 86, 54, 34, 30, 38, -86, -22, -38, -28, -86, 28, 96, 6, -86, 54, 4, -84, 34, -58, -6, 40, 54, -60, -22, 84, 74, -92, -58, -86, -76, -66, -36, 90, -30], [26, 74, 84, -60, 52, -14, 98, -74, 24, 16, -96, -86, 18, -82, -34, -82, -56, -86, -8, -50, -32, -44, 8, 50, -12, 82, -10, 80, -28, -28, 2, -34, -88, 28, -44, -94, -42, 2, -48, 54, 90, 16, -38, 14, 82, 42, 58], [-22, 14, 26, -60, -18, -38, -60, 54, -48, 60, 50, -70, 24, -50, 18, 48, 98, 42, -52, -68, 24, 94, 60, 74, 76, 6, -76, -70, -86, -22, 76, 16, -4, 48, 20, -60, 82, 38, 32, 36, -56, -58, 40, 12, 46, 18, -96], [-92, 44, 94, -42, -84, -78, -72, -62, -32, 4, -12, -42, 4, 12, 20, -12, 6, 38, -92, -64, 64, 92, -62, 64, 54, -60, -42, -54, -14, -28, 26, -6, -14, 0, 80, 10, -64, -54, 2, 82, -8, 98, -20, 72, -94, -78, -64], [50, 44, -64, -36, 60, -44, 64, -64, 40, -66, 60, -44, 6, -8, -80, 36, 2, 30, -26, 82, -82, 26, -92, -40, -66, -62, 76, -34, -46, -36, 36, -92, 36, -74, -78, 50, -80, 16, -88, 92, -50, -80, 12, -92, 8, -18, -84], [20, -24, 94, -62, 40, -16, -24, -36, 62, -88, 98, -28, -80, 96, -96, 18, 60, -92, 22, 96, 98, -48, -82, 62, -28, -74, -84, -56, 88, -82, 38, 42, -82, -76, -16, -12, 46, -46, 48, 96, 12, 66, 74, -58, -2, -84, 16], [-4, 18, -28, 22, 70, -70, -70, 66, 46, -68, 72, -60, -54, 2, -82, 60, 86, -92, 36, -44, 98, 88, -88, 86, 24, 88, -80, -12, -18, -8, 0, -26, 2, 56, 94, 90, 30, -96, 32, 48, 2, -72, -36, 10, -52, 0, 98], [46, -62, -78, -50, 98, 26, 42, 6, 26, -28, -56, 60, -36, -54, -84, 90, 68, 94, -28, 60, 52, 54, 28, 12, 58, -42, 86, -74, -84, -88, 54, -18, 54, 38, -96, 84, -78, -26, 50, 86, 58, 24, -2, -78, 40, -68, 6], [2, 26, -82, -84, 46, 46, 0, 18, 90, -92, 24, -34, -70, -84, 18, 32, -36, -84, -36, 20, 26, -72, -12, 36, 72, 42, 58, -34, 30, 40, -6, -18, -52, 20, -52, 4, -64, -64, -2, 36, 64, -86, -70, -38, -50, -34, 60]],44,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],16,), ([[49, 76, 85, 2, 48, 20], [13, 2, 84, 21, 44, 17], [70, 85, 58, 75, 89, 16], [86, 45, 19, 97, 95, 63], [62, 44, 26, 75, 73, 95], [93, 35, 62, 88, 6, 33]],4,), ([[-80, -72, -68, -62, -56, -40, -28, 4, 22, 24, 34, 58, 60, 60, 78], [-88, -68, -48, -28, -24, -4, 0, 2, 12, 30, 42, 48, 52, 64, 68], [-92, -86, -82, -44, -38, -20, -18, -16, 2, 4, 12, 32, 42, 54, 96], [-82, -74, -64, -48, -30, -10, 16, 20, 28, 46, 46, 54, 60, 74, 96], [-84, -78, -70, -30, -28, -18, -10, -2, 2, 14, 30, 44, 50, 92, 98], [-92, -74, -64, -48, -46, -8, 20, 22, 28, 30, 30, 32, 46, 62, 84], [-92, -82, -82, -66, -64, -60, -40, -2, 2, 40, 44, 46, 66, 68, 74], [-70, -58, -54, -46, -34, -18, 14, 20, 22, 32, 48, 62, 84, 86, 90], [-92, -62, -58, -48, -30, -28, 0, 8, 16, 20, 26, 38, 70, 92, 98], [-90, -80, -46, 0, 14, 36, 42, 48, 48, 50, 50, 50, 52, 76, 98], [-80, -78, -58, -58, -54, -44, -42, 6, 20, 24, 28, 34, 40, 58, 78], [-90, -80, -60, -40, 4, 6, 10, 26, 28, 34, 36, 38, 42, 44, 56], [-96, -96, -72, -58, -54, -40, -34, -34, -28, -26, -22, -18, -2, 18, 54], [-98, -90, -76, -64, -62, -58, -54, -30, -16, 14, 36, 54, 54, 72, 92], [-86, -70, -58, -48, -46, -38, -32, 2, 20, 44, 54, 56, 66, 82, 84]],9,), ([[0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0]],27,), ([[1, 2, 2, 2, 3, 3, 10, 11, 11, 19, 27, 30, 31, 36, 38, 51, 55, 64, 64, 68, 72, 78, 79, 83, 87, 98], [1, 3, 5, 6, 19, 25, 31, 32, 39, 40, 51, 51, 52, 54, 57, 58, 64, 65, 66, 73, 76, 83, 87, 90, 92, 97], [1, 6, 7, 26, 29, 33, 35, 42, 44, 46, 47, 50, 61, 64, 65, 67, 73, 75, 81, 81, 86, 87, 88, 88, 95, 95], [1, 3, 6, 19, 19, 21, 29, 34, 36, 36, 43, 44, 52, 53, 53, 63, 64, 67, 68, 75, 75, 75, 76, 78, 81, 83], [9, 10, 18, 18, 20, 22, 28, 31, 35, 42, 47, 48, 48, 62, 63, 65, 65, 70, 73, 75, 75, 82, 92, 95, 95, 97], [10, 14, 16, 17, 27, 30, 33, 36, 37, 37, 39, 47, 48, 48, 56, 57, 62, 74, 78, 81, 82, 84, 87, 88, 95, 95], [2, 16, 16, 18, 21, 21, 25, 26, 33, 38, 51, 51, 57, 59, 66, 68, 68, 69, 70, 74, 74, 74, 84, 86, 96, 98], [3, 5, 14, 14, 17, 23, 26, 26, 27, 31, 33, 36, 37, 51, 63, 64, 70, 70, 72, 75, 79, 86, 90, 90, 97, 97], [15, 15, 16, 19, 23, 29, 31, 33, 35, 35, 37, 38, 44, 49, 56, 68, 73, 74, 75, 76, 80, 84, 87, 89, 95, 99], [2, 3, 7, 13, 14, 16, 19, 19, 21, 28, 32, 39, 43, 47, 58, 64, 66, 80, 80, 82, 83, 84, 91, 91, 95, 98], [2, 3, 11, 21, 22, 24, 26, 34, 39, 41, 41, 47, 49, 50, 50, 59, 61, 67, 78, 79, 80, 85, 87, 87, 90, 96], [6, 9, 11, 15, 20, 27, 27, 27, 28, 42, 47, 47, 58, 61, 67, 70, 70, 71, 76, 77, 78, 80, 83, 91, 97, 98], [4, 8, 12, 13, 14, 14, 15, 20, 21, 22, 24, 25, 29, 51, 51, 57, 60, 68, 73, 76, 76, 81, 92, 93, 94, 98], [1, 8, 23, 26, 26, 26, 31, 40, 41, 45, 46, 49, 50, 53, 55, 58, 62, 65, 66, 68, 71, 77, 87, 87, 97, 98], [3, 9, 11, 17, 26, 28, 31, 32, 32, 33, 35, 41, 41, 41, 44, 48, 48, 63, 72, 74, 82, 84, 85, 91, 92, 94], [3, 5, 6, 8, 10, 17, 36, 41, 42, 45, 50, 51, 52, 53, 56, 58, 63, 64, 69, 72, 73, 74, 78, 87, 90, 92], [2, 6, 12, 19, 20, 25, 27, 30, 35, 38, 42, 45, 45, 50, 53, 54, 56, 59, 62, 62, 66, 74, 78, 81, 91, 94], [6, 8, 9, 15, 18, 20, 23, 23, 29, 30, 39, 41, 49, 62, 65, 69, 76, 79, 83, 84, 85, 86, 90, 94, 98, 98], [5, 6, 7, 11, 12, 16, 19, 19, 20, 20, 26, 44, 46, 53, 56, 60, 61, 74, 75, 75, 76, 80, 93, 95, 96, 99], [7, 15, 19, 22, 23, 24, 31, 34, 35, 37, 40, 42, 44, 52, 57, 67, 73, 74, 76, 77, 78, 83, 84, 95, 96, 97], [2, 4, 15, 16, 16, 23, 26, 32, 34, 39, 40, 41, 46, 52, 56, 61, 62, 65, 76, 80, 81, 82, 84, 85, 86, 87], [9, 13, 22, 41, 42, 42, 42, 45, 48, 49, 51, 51, 54, 58, 59, 60, 73, 74, 75, 83, 83, 86, 91, 94, 98, 98], [5, 9, 9, 16, 21, 21, 22, 27, 28, 31, 31, 32, 38, 38, 49, 51, 61, 62, 65, 69, 73, 75, 85, 91, 91, 96], [4, 4, 7, 7, 7, 9, 11, 21, 31, 36, 43, 43, 57, 58, 63, 63, 64, 66, 70, 71, 73, 77, 82, 83, 92, 97], [1, 6, 9, 9, 12, 14, 15, 16, 20, 24, 25, 29, 30, 37, 43, 44, 45, 53, 58, 63, 69, 70, 72, 78, 83, 88], [1, 15, 16, 17, 19, 24, 25, 35, 43, 44, 44, 46, 48, 49, 50, 53, 54, 61, 61, 67, 70, 74, 74, 83, 87, 88]],24,), ([[-62, -26, -90, -96, 66, 8, 88, 98, 26, -4, -62, 38, 24, 18, -88, -78, 22, -80, 80, 8, 62, 22, -20, 42, 78, -96, 38, 22, 44, 18, -98, 4, 66, -58, 50, -98, 42, 48, -52, 98, -72, 72, 60, -66, -78, -92], [24, 94, 24, 64, 78, -82, 12, -96, -80, 32, -18, -8, -98, -32, -8, -40, -98, -52, -86, -50, -16, -36, 6, 6, 70, -78, 10, -34, -98, 24, -62, 4, -8, -86, 60, -52, -48, -44, 82, 68, 98, 30, 6, -58, 94, -52], [-20, 84, -82, 42, 42, 86, 38, 64, 84, 88, 46, -48, -8, -60, -94, -74, -72, -74, -52, -96, 46, 68, 84, -64, 22, -44, 78, -62, 64, 14, -80, 90, -26, 84, 92, -82, 36, -56, -46, 28, 86, -58, 50, -78, -36, -50], [-26, -94, -38, -38, -10, 58, -42, 36, 12, 22, 52, 48, 40, 22, 84, -56, -76, 48, -42, -58, 50, 98, -46, -30, 16, 30, 66, -2, 68, 44, -60, -4, 40, 16, 68, -40, 96, -40, -6, 60, 62, 90, 90, -20, 98, 94], [80, 36, 26, 86, 76, 38, 88, 80, -90, -60, -52, 92, 48, -32, -18, 4, -44, 52, 14, 2, 92, 2, -70, -16, 92, 12, -66, 62, 52, -92, -98, -80, -46, -50, 72, 98, 64, -32, 52, -10, 20, -20, -54, -12, 64, -64], [38, 94, 60, 44, -26, -46, 92, 60, -18, -10, -60, -78, -96, 54, -88, -20, 60, 66, -62, 40, 98, -50, 86, -56, -52, -60, 52, 26, 62, 62, -4, 54, -60, 52, -50, -2, 92, -38, -98, -66, 60, 70, 76, 64, -80, -88], [94, 84, 38, -60, -72, 50, -42, -52, -4, 16, -40, 90, -18, -20, 34, -28, -4, -66, -82, -30, -36, 94, -38, -56, -22, 62, -2, 30, -58, 70, -80, 0, -98, 14, 40, -28, 76, 30, 18, 6, -72, -28, 24, 26, 66, -56], [38, 52, 34, -60, 78, 64, 2, 64, -50, 14, -66, -2, -10, 10, 98, 36, 96, 96, -76, -58, -52, 22, 40, -28, 18, -34, -72, -98, -54, 82, 30, 90, 0, -22, 6, -36, -34, 44, -60, -40, 70, -26, 14, 14, -72, 98], [38, -88, 26, 34, 32, -78, 38, 12, -16, -76, 28, -74, 6, -54, 96, 8, -34, 72, 84, -70, -26, 16, -86, -14, 46, -24, -24, -96, -82, -66, 78, 20, -94, -76, -76, 90, -32, -24, -36, -62, -88, -26, -36, 0, -92, 40], [0, 66, 60, 82, -14, 92, 88, 30, 60, 36, 80, -54, 28, -10, -96, -4, -68, 46, 98, 42, 38, 30, -74, -2, 30, 6, -78, 74, -56, -6, -48, 32, 88, -40, 18, 36, -34, -28, 30, -54, -82, 98, 34, -56, 50, 40], [18, -96, 54, -6, 94, -68, -28, -18, -90, -64, -88, 60, 60, -72, 82, 48, 6, -44, -22, -82, 62, 52, -32, 0, 2, -12, -78, 92, 22, 2, 84, -64, 50, -6, -2, 90, 76, -48, -28, 22, -30, 14, 68, 26, 80, 20], [-94, -26, -52, 4, -44, 12, 74, -26, 28, 64, 84, -62, -10, -12, 74, 68, 94, -80, 32, -26, 80, 44, -80, -74, -82, -86, 98, -12, 30, 60, 90, 16, -58, -28, 18, 14, -86, -46, -62, -88, -84, 74, -48, -8, -26, 60], [10, 64, 58, -92, -48, 38, -30, -64, -58, -68, -26, -68, 52, 48, -72, 96, 32, -48, -60, 54, -6, -72, -22, 74, 4, 14, 80, 52, -50, 22, 74, -14, -92, -96, 54, -90, -18, 18, -16, -82, 26, 98, -68, 8, -78, -48], [-78, 12, 70, -42, 34, -52, 86, 64, -32, -96, -22, -8, 84, 36, -38, -80, 84, 72, 58, 34, -86, -84, 30, -40, -90, 10, 0, -74, 14, 76, -22, -2, 86, 86, -60, 32, -62, -34, 4, 14, 68, -38, 86, 94, 18, 30], [66, 16, 82, -70, -24, -90, -70, 82, 32, -42, -82, 74, -24, -16, 68, -92, 32, -58, -58, -14, -34, 68, -24, 20, 68, 54, 78, -72, -14, -46, 74, -90, -98, -64, -2, -58, -6, -20, 54, -70, -46, -56, 50, -62, 0, -14], [4, 50, 66, 84, -44, 50, -22, 36, 20, 94, -2, 66, -16, -82, -90, -74, 88, 42, 16, 42, -76, 0, 28, -42, -44, 48, -12, 78, -40, 54, 34, -86, -26, -46, 78, -68, -80, -94, -2, -48, -42, 62, 48, -24, -20, 60], [-16, 20, 16, -10, -96, -32, 42, -52, -72, 2, -66, -40, 32, 86, 96, -46, 88, 64, 90, 68, -22, 0, -18, 82, 22, 62, -82, -44, 76, -62, -26, 8, 82, 84, 96, 8, 76, 66, -56, 96, 96, -54, -70, 66, 60, 40], [64, -58, -76, 94, -4, -48, -40, 96, 46, -16, 2, -52, 42, -80, -44, 10, -60, 28, -52, -54, -88, 72, -40, -2, 78, 86, -26, -86, -90, -4, -14, 46, -84, -36, -88, 4, -4, -92, -42, 36, -94, -10, -38, -82, -50, 4], [-72, 22, -40, 24, 10, 26, 72, 14, -90, -66, -88, -30, 40, 40, -80, -56, -4, -88, 32, -98, 22, 10, 58, 62, -10, 24, -80, -90, 28, -64, -26, 30, -32, -44, 90, -12, 16, -48, 98, 88, -58, -54, -10, 48, -12, -40], [70, -36, -30, -26, -48, 86, -12, -78, 62, -8, -80, -14, -48, 52, -38, 38, -54, -40, -24, -80, -94, -50, -46, 64, 12, 62, -8, 12, -22, 24, -30, 20, -8, -76, -18, -76, 52, -74, 38, -26, -98, 58, 76, 38, 44, -14], [32, -62, 24, -58, -50, 32, -84, 0, -62, -12, 28, 72, 0, 42, 82, 32, -20, -96, -20, 92, -32, 86, -70, 74, -76, 64, 48, 66, 94, 52, 48, 6, -78, -88, 24, 74, 32, 38, 38, 92, 50, 24, 34, 46, -14, 18], [-42, 86, -48, -96, -72, 52, -28, 8, -92, -28, -56, -16, -48, -88, 90, 42, 30, 62, -50, 78, -20, 26, 10, -14, -40, 22, -34, -98, -48, -56, 54, 0, -54, -68, 52, 70, 78, -20, 60, -88, -26, 40, -80, -6, 66, -86], [18, -68, -46, 24, -62, -8, 14, -46, -60, -48, 0, -46, 50, 98, -86, 2, 92, -94, 66, -90, -74, -34, -80, 14, -42, -72, -54, 36, 70, 38, -92, 64, -86, -64, 6, -22, 92, -60, 38, 94, -74, 46, 96, -32, -10, 22], [2, 44, 44, -16, -96, 26, -32, -66, -22, 30, 68, -12, -94, 32, -48, 16, -80, -94, 2, -4, -56, -22, -22, 36, 16, 50, -2, 46, 56, -68, -72, -34, -54, -76, -84, 74, 22, -38, 26, 36, 30, -56, -82, 54, 92, -50], [-12, 2, -28, 98, -94, -52, 18, -30, -50, 36, 46, -22, -54, -70, 64, -30, 32, -14, 38, -56, -34, 84, 24, 10, 26, 32, 52, -16, -48, 4, -24, -70, -94, -10, -76, -36, 46, 88, 18, 48, -64, -12, -8, -70, -4, -80], [90, -8, 30, -44, -64, 42, 8, -14, -6, -70, -42, -98, -48, 34, -88, -22, 48, -98, 0, -16, 32, -36, 78, 84, 60, 80, 90, 58, -72, 80, -96, -98, -96, 58, -62, 86, -6, -14, -50, -96, 8, 18, -84, -34, -72, -18], [-42, 36, 86, 26, 10, -20, -22, 46, 28, 88, -34, -84, 60, 8, -22, 38, -40, -36, 18, -76, 40, -22, 14, 86, 22, 24, 98, 88, -90, 58, -58, 30, 70, 84, -32, 2, 20, 80, 28, -44, -98, -6, -64, 90, 42, -92], [0, -38, 82, 46, -24, 34, 34, -82, 2, -86, -30, 64, 16, -6, 22, -88, -26, -88, -74, -20, 82, 94, -16, 64, 26, 76, 58, -92, 28, -16, 44, 56, 20, 40, 20, 78, -96, -86, -54, -46, 54, -76, 82, -50, -54, -40], [-66, -18, 2, 98, 6, 70, 32, -6, 66, 4, 88, 64, 20, -24, 68, 2, -86, 66, -46, 18, 70, -90, 6, -44, -28, -86, 16, -38, -34, 2, 96, 80, 80, 34, -34, -66, 68, -20, 32, 36, 8, -40, -34, 8, 80, -94], [54, -28, -22, -26, 96, -34, 96, -92, 20, -24, 26, 24, 18, 96, 14, 96, 48, -96, 38, 86, 88, -66, 26, -22, 54, 72, 42, 0, -10, -42, -54, 78, -42, -2, -30, -60, -20, -84, -14, 98, 24, 96, -62, -28, -52, 34], [-96, 78, -66, -94, 2, 36, -62, -14, 70, -22, -92, -58, -58, -2, 40, 80, 86, -84, -98, -66, -44, -58, 56, -90, 88, 34, 76, 82, -2, 38, -26, 92, -94, 62, -56, -10, 14, -50, -92, 80, 8, -36, -96, -10, 42, -84], [50, -14, 12, 78, 50, -54, -22, -34, -70, -58, -18, 38, 8, -88, -88, -86, 58, -42, -28, -42, -26, 26, 90, 14, -40, 98, 94, 58, 68, 14, 36, 20, 58, 14, -22, -34, -48, -64, 38, -12, -12, 30, 24, 6, 38, 50], [-48, 6, 82, 94, 30, 58, -30, -54, -26, -32, 48, 40, 20, -68, -28, -50, -4, 88, -58, -46, -70, 48, -30, 76, -58, -96, -56, 36, 10, 56, 14, -6, 38, 12, -52, -78, -56, -36, 48, -56, -78, 98, -56, -92, -50, 46], [-30, -64, -90, -38, -28, 74, 70, -44, 56, -38, 64, 98, 62, -50, -68, 82, -6, 36, -16, -60, -44, -34, 92, -56, 12, 12, 88, 30, -72, 98, -86, -64, 82, -56, 58, 28, 24, -72, -98, -68, -54, -52, 50, 8, 44, 18], [-92, -86, -68, -18, 56, 26, 68, -84, 60, -68, 20, -2, -86, -76, -92, -86, -96, 50, 84, -44, 62, 24, -20, 88, -94, -66, 32, 50, -32, -96, 18, 56, 48, 18, -40, 50, -18, -10, 84, -48, 8, -50, 86, 88, 90, -70], [60, 46, 46, 96, 44, -38, -66, -56, 12, -28, -36, -32, -98, 50, 16, -8, 58, -94, 20, -94, 88, 82, 30, -32, -6, -50, 6, 44, -98, -16, -96, -68, 54, 0, 68, 44, 58, -72, -96, -84, -70, -14, -12, -52, -78, -76], [-8, 72, 32, -90, -68, 60, -10, -34, -38, -88, 22, 82, -46, -76, 96, 54, 0, -52, 94, -66, 34, 28, -50, -32, -80, 0, 98, 18, 96, 28, 72, 64, -52, 98, 14, 28, 46, 48, 34, -34, -96, -24, -48, -86, -26, -74], [36, 26, 22, 18, 4, 78, 72, 28, -24, -64, 28, 2, -4, 46, 82, -70, 36, 66, 22, -32, -48, 24, -20, 66, 80, -22, 88, 26, 68, 22, 84, -44, -28, 76, -10, 90, -46, -40, -94, 22, 14, 96, -66, 66, -4, 40], [-44, -22, 52, 30, 70, 22, 22, 74, 56, -14, 66, -34, 34, -2, -96, -90, -38, 32, -4, -74, 16, -34, -6, 14, 38, -66, 68, -2, -28, -66, -8, -22, 80, -70, -62, -66, -18, -84, 82, -8, 34, -42, 16, 10, -64, 34], [-10, 92, -78, -80, 18, 54, 8, 16, -98, 14, 8, 14, -6, -72, -30, 68, -76, 40, 92, -94, 20, 90, 68, 28, 38, -8, -94, 50, 56, -92, -46, -54, -12, -48, 18, 76, 10, 58, 24, -32, 6, 94, 64, 66, 96, 90], [88, 62, -84, 24, 76, -24, -22, 26, 42, -56, -56, -26, -40, 88, 74, 32, 54, -96, -24, -44, 90, 66, 56, -68, 34, 18, 44, -38, 82, -12, -8, 80, 70, 92, 6, -50, 40, -62, 60, -98, 54, 36, -4, 84, 48, 84], [86, -98, -60, 26, -58, -26, 92, -80, -56, -30, 60, -10, 96, 92, -76, -28, 88, 4, -88, -82, -22, 96, -18, -8, -88, 16, 12, -30, -66, -26, 38, -76, 68, -22, -78, 56, -70, -42, 76, 92, 8, -76, 0, 70, -70, 32], [42, -88, -52, -12, -58, 78, 4, 98, -92, 96, 70, 96, 96, 86, -6, -58, -14, -92, -6, 16, -28, 88, 28, 14, -14, 22, -46, -30, -6, -34, -12, -70, 82, 68, 34, 58, 20, 90, -58, -66, -12, -20, -76, -86, 56, 32], [-62, -58, -60, 26, 38, 68, -18, 26, -42, 30, -52, -28, -98, -58, -2, 86, -38, -58, -58, -82, -52, 80, 42, -4, -92, 32, -90, 60, 70, -96, 96, -36, -16, 40, -24, 44, -34, 48, -54, 80, -86, 14, 34, 52, 50, 38], [68, -46, -50, 64, -32, -94, 14, -66, 90, -54, 60, 20, 52, 36, -26, -92, 38, 10, 84, -18, -38, -98, 92, -50, -58, 40, -56, -44, -46, -50, -2, 52, 22, -80, -20, 86, 8, 64, 48, -8, 14, -86, -56, -26, -6, 28], [-58, -40, -82, 8, 26, -46, -14, -62, -28, -28, 90, 76, 62, -18, -34, 18, -78, 14, 24, 2, 62, 62, -88, -84, -54, 66, 96, 44, -46, -18, -44, 32, -12, -94, -54, -18, 62, 12, 4, 8, -66, 72, 12, -32, 48, 68]],43,), ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],19,), ([[94, 55, 14, 44, 30, 47, 19, 87, 68, 17, 34, 15, 93, 98, 10, 27, 43, 51, 83, 24, 19, 45, 91, 59, 84, 82, 80, 51], [4, 37, 73, 13, 56, 1, 10, 52, 62, 6, 71, 18, 21, 24, 48, 82, 41, 86, 45, 79, 74, 42, 49, 92, 73, 40, 57, 28], [63, 27, 3, 18, 66, 35, 77, 76, 77, 17, 69, 56, 34, 48, 83, 96, 57, 6, 7, 20, 41, 11, 14, 78, 10, 10, 24, 76], [75, 75, 93, 9, 27, 21, 26, 88, 55, 93, 73, 46, 37, 14, 94, 15, 87, 91, 66, 76, 90, 95, 6, 14, 33, 22, 69, 34], [32, 11, 56, 49, 83, 82, 15, 80, 85, 68, 22, 87, 8, 33, 50, 87, 59, 82, 73, 34, 31, 39, 77, 30, 51, 44, 57, 92], [66, 57, 78, 33, 72, 1, 88, 46, 15, 89, 96, 67, 28, 91, 99, 7, 69, 13, 18, 26, 36, 48, 20, 39, 66, 57, 25, 66], [40, 41, 73, 88, 44, 60, 53, 70, 38, 51, 3, 35, 25, 34, 30, 56, 58, 66, 67, 63, 7, 64, 48, 46, 43, 21, 33, 67], [41, 71, 98, 92, 82, 99, 88, 68, 7, 52, 92, 75, 25, 95, 54, 39, 46, 30, 71, 69, 53, 51, 73, 65, 2, 63, 60, 95], [19, 56, 87, 21, 61, 51, 78, 34, 40, 23, 65, 80, 94, 90, 70, 98, 32, 89, 65, 82, 35, 91, 83, 18, 46, 89, 47, 10], [69, 26, 55, 42, 59, 37, 59, 88, 16, 97, 11, 51, 67, 3, 84, 50, 39, 44, 92, 36, 36, 88, 44, 29, 73, 92, 93, 48], [86, 59, 11, 78, 91, 40, 93, 61, 6, 20, 70, 18, 98, 14, 25, 89, 49, 26, 32, 79, 1, 76, 30, 47, 22, 81, 28, 9], [96, 52, 64, 21, 57, 31, 23, 75, 71, 69, 40, 67, 54, 18, 64, 52, 99, 77, 20, 52, 59, 16, 47, 26, 49, 83, 53, 86], [27, 61, 59, 50, 90, 15, 24, 36, 40, 96, 35, 46, 52, 45, 97, 77, 15, 67, 59, 18, 86, 6, 21, 40, 29, 89, 94, 21], [97, 78, 48, 95, 78, 24, 11, 45, 29, 18, 41, 68, 88, 66, 20, 13, 75, 14, 90, 17, 40, 76, 91, 40, 62, 21, 19, 55], [92, 89, 85, 12, 93, 53, 47, 60, 39, 14, 63, 87, 82, 98, 49, 59, 34, 64, 57, 85, 49, 27, 87, 67, 94, 62, 89, 68], [98, 25, 36, 88, 5, 79, 87, 67, 70, 88, 2, 33, 46, 81, 38, 43, 11, 10, 38, 32, 40, 94, 63, 52, 77, 32, 52, 39], [25, 2, 1, 7, 56, 64, 59, 37, 56, 32, 37, 58, 28, 67, 45, 61, 95, 69, 96, 96, 16, 86, 18, 8, 8, 89, 8, 46], [41, 21, 95, 76, 6, 55, 40, 59, 96, 50, 38, 15, 82, 58, 76, 3, 80, 21, 63, 97, 17, 20, 8, 50, 22, 75, 46, 30], [72, 75, 28, 67, 4, 83, 57, 98, 8, 24, 9, 39, 3, 97, 49, 32, 91, 36, 68, 1, 76, 98, 67, 68, 34, 38, 43, 96], [84, 29, 46, 41, 1, 42, 79, 84, 49, 95, 25, 18, 22, 61, 39, 90, 51, 11, 57, 28, 35, 68, 51, 77, 46, 72, 19, 54], [72, 65, 70, 48, 89, 7, 92, 78, 95, 27, 41, 85, 20, 54, 54, 33, 19, 28, 84, 35, 29, 35, 97, 63, 57, 2, 29, 28], [26, 65, 73, 34, 38, 95, 83, 73, 23, 67, 42, 19, 79, 13, 13, 63, 1, 53, 52, 71, 40, 40, 45, 42, 13, 50, 30, 39], [9, 56, 62, 34, 18, 82, 94, 2, 12, 45, 40, 38, 35, 20, 95, 13, 21, 90, 68, 20, 59, 1, 6, 89, 24, 96, 40, 68], [27, 44, 44, 50, 10, 72, 77, 69, 49, 66, 94, 32, 3, 48, 67, 77, 49, 71, 46, 76, 91, 5, 69, 46, 61, 90, 14, 74], [88, 44, 35, 20, 13, 82, 8, 38, 67, 85, 88, 93, 16, 96, 4, 43, 67, 24, 44, 66, 57, 26, 26, 32, 85, 1, 91, 88], [74, 52, 93, 80, 26, 34, 69, 46, 61, 3, 45, 82, 17, 45, 90, 67, 36, 39, 9, 56, 76, 79, 34, 94, 53, 87, 80, 71], [81, 47, 80, 21, 34, 27, 67, 38, 92, 35, 37, 74, 17, 91, 36, 91, 49, 18, 92, 1, 55, 46, 55, 48, 19, 36, 25, 26], [30, 49, 79, 30, 21, 84, 33, 48, 65, 43, 62, 63, 52, 43, 5, 88, 75, 27, 54, 95, 83, 42, 41, 18, 62, 99, 77, 68]],20,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
null
NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class NTH_MULTIPLE_NUMBER_FIBONACCI_SERIES{ public static int f_gold ( int k , int n ) { long f1 = 0 , f2 = 1 , f3 ; int i = 2 ; while ( i != 0 ) { f3 = f1 + f2 ; f1 = f2 ; f2 = f3 ; if ( f2 % k == 0 ) { return n * i ; } i ++ ; } return 0 ; }
def f_gold(k, n): f1 = 0 f2 = 1 i = 2 while i != 0: f3 = f1 + f2 f1 = f2 f2 = f3 if f2 % k == 0: return n * i i += 1 return
null
public static void main(String args[]) { int n_success = 0; List<Integer> param0 = new ArrayList<>(); param0.add(50); param0.add(52); param0.add(42); param0.add(2); param0.add(37); param0.add(48); param0.add(31); param0.add(9); param0.add(78); param0.add(64); List<Integer> param1 = new ArrayList<>(); param1.add(60); param1.add(45); param1.add(17); param1.add(68); param1.add(43); param1.add(46); param1.add(4); param1.add(64); param1.add(14); param1.add(80); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ (50, 60,), (52, 45,), (42, 17,), (2, 68,), (37, 43,), (48, 46,), (31, 4,), (9, 64,), (78, 14,), (64, 80,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success += 1 print("#Results: %i, %i" % (n_success, len(param)))
null
PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1{ static boolean f_gold ( int arr [ ] , int n ) { if ( n == 0 || n == 1 ) return true ; for ( int i = 1 ; i < n ; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false ; return true ; }
def f_gold ( arr , n ) : if ( n == 0 or n == 1 ) : return True for i in range ( 1 , n ) : if ( arr [ i - 1 ] > arr [ i ] ) : return False return True
using namespace std; bool f_gold ( int arr [ ], int n ) { if ( n == 0 || n == 1 ) return true; for ( int i = 1; i < n; i ++ ) if ( arr [ i - 1 ] > arr [ i ] ) return false; return true; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97}); param0.add(new int[]{2,-90,66,24,-18,70,34,18,84,-62}); param0.add(new int[]{1,1}); param0.add(new int[]{12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45}); param0.add(new int[]{-38,38,40,72}); param0.add(new int[]{1,0,0,0,1}); param0.add(new int[]{11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97}); param0.add(new int[]{-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{56,51,63,30,10,88,23,1,48,4,28,44}); List<Integer> param1 = new ArrayList<>(); param1.add(22); param1.add(9); param1.add(1); param1.add(23); param1.add(2); param1.add(3); param1.add(44); param1.add(9); param1.add(23); param1.add(10); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
if __name__ == '__main__': param = [ ([6, 8, 8, 16, 19, 19, 21, 23, 26, 33, 34, 36, 38, 39, 41, 41, 45, 47, 52, 52, 55, 57, 60, 60, 60, 61, 69, 69, 70, 70, 72, 73, 73, 75, 78, 81, 84, 84, 85, 88, 88, 89, 90, 91, 97],22,), ([2, -90, 66, 24, -18, 70, 34, 18, 84, -62],9,), ([1, 1],1,), ([12, 88, 65, 82, 23, 39, 60, 27, 57, 44, 70, 28, 23, 34, 25, 11, 48, 65, 10, 73, 26, 10, 18, 60, 73, 45, 26, 9, 36, 15, 24, 40, 2, 4, 95, 20, 39, 45],23,), ([-38, 38, 40, 72],2,), ([1, 0, 0, 0, 1],3,), ([11, 15, 16, 17, 17, 17, 22, 23, 23, 25, 27, 28, 28, 31, 33, 36, 38, 40, 42, 44, 46, 49, 51, 51, 52, 60, 62, 65, 67, 71, 74, 77, 77, 78, 78, 79, 83, 83, 86, 86, 87, 87, 87, 88, 91, 92, 97, 97, 97],44,), ([-26, -90, -78, -76, -58, -64, -72, -34, -58, -48, 78, -50, -30, 26, -60, 26],9,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],23,), ([56, 51, 63, 30, 10, 88, 23, 1, 48, 4, 28, 44],10,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
int main() { int n_success = 0; vector<vector<int>> param0 {{6,8,8,16,19,19,21,23,26,33,34,36,38,39,41,41,45,47,52,52,55,57,60,60,60,61,69,69,70,70,72,73,73,75,78,81,84,84,85,88,88,89,90,91,97},{2,-90,66,24,-18,70,34,18,84,-62},{1,1},{12,88,65,82,23,39,60,27,57,44,70,28,23,34,25,11,48,65,10,73,26,10,18,60,73,45,26,9,36,15,24,40,2,4,95,20,39,45},{-38,38,40,72},{1,0,0,0,1},{11,15,16,17,17,17,22,23,23,25,27,28,28,31,33,36,38,40,42,44,46,49,51,51,52,60,62,65,67,71,74,77,77,78,78,79,83,83,86,86,87,87,87,88,91,92,97,97,97},{-26,-90,-78,-76,-58,-64,-72,-34,-58,-48,78,-50,-30,26,-60,26},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{56,51,63,30,10,88,23,1,48,4,28,44}}; vector<int> param1 {22,9,1,23,2,3,44,9,23,10}; 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; }
LONGEST_SUBARRAY_SUM_DIVISIBLE_K
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class LONGEST_SUBARRAY_SUM_DIVISIBLE_K{ static int f_gold ( int arr [ ] , int n , int k ) { HashMap < Integer , Integer > um = new HashMap < Integer , Integer > ( ) ; int mod_arr [ ] = new int [ n ] ; int max = 0 ; int curr_sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { curr_sum += arr [ i ] ; mod_arr [ i ] = ( ( curr_sum % k ) + k ) % k ; } for ( int i = 0 ; i < n ; i ++ ) { if ( mod_arr [ i ] == 0 ) max = i + 1 ; else if ( um . containsKey ( mod_arr [ i ] ) == false ) um . put ( mod_arr [ i ] , i ) ; else if ( max < ( i - um . get ( mod_arr [ i ] ) ) ) max = i - um . get ( mod_arr [ i ] ) ; } return max ; }
null
using namespace std; int f_gold ( int arr [ ], int n, int k ) { unordered_map < int, int > um; int mod_arr [ n ], max = 0; int curr_sum = 0; for ( int i = 0; i < n; i ++ ) { curr_sum += arr [ i ]; mod_arr [ i ] = ( ( curr_sum % k ) + k ) % k; } for ( int i = 0; i < n; i ++ ) { if ( mod_arr [ i ] == 0 ) max = i + 1; else if ( um . find ( mod_arr [ i ] ) == um . end ( ) ) um [ mod_arr [ i ] ] = i; else if ( max < ( i - um [ mod_arr [ i ] ] ) ) max = i - um [ mod_arr [ i ] ]; } return max; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{14,16,17,17,31,32,34,35,37,38,39,46,47,52,57,58,60,61,69,75,76,77,81,88,97}); param0.add(new int[]{-16,64,-62,-86,10,-40,52,50,-42,34,-32,-32,90,72,-96,-46,-6,92,14,98,-66,96,-48,-80,-22,-82,-50,-60,-70,82,-78,-68,88,-56,24,-52}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{33,1,92,27,17,46,79,78,95,34,3,56,12,26,24,60,58,63,98,8,76,73,26,58,38,49,43,59,83,21,13,99,3,89,32,21,14,95,8,7,99,83,59,2,69,44,66}); param0.add(new int[]{-92,-76,-58,-56,-54,-20,-18,-16,-14,8,20,52,72,82,82,84}); param0.add(new int[]{1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0}); param0.add(new int[]{7,7,8,9,13,14,16,18,19,20,24,24,30,32,32,45,49,55,62,62,84,90,90,93,95,98}); param0.add(new int[]{-28,-52,-84,-98,48,74,48,-34,-38,54}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{30,44,9,92,82,11,66,22,87,20}); List<Integer> param1 = new ArrayList<>(); param1.add(23); param1.add(35); param1.add(13); param1.add(40); param1.add(15); param1.add(34); param1.add(22); param1.add(7); param1.add(28); param1.add(9); List<Integer> param2 = new ArrayList<>(); param2.add(23); param2.add(21); param2.add(13); param2.add(37); param2.add(15); param2.add(26); param2.add(14); param2.add(8); param2.add(37); param2.add(9); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i),param2.get(i)) == f_gold(param0.get(i),param1.get(i),param2.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{14,16,17,17,31,32,34,35,37,38,39,46,47,52,57,58,60,61,69,75,76,77,81,88,97},{-16,64,-62,-86,10,-40,52,50,-42,34,-32,-32,90,72,-96,-46,-6,92,14,98,-66,96,-48,-80,-22,-82,-50,-60,-70,82,-78,-68,88,-56,24,-52},{0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1},{33,1,92,27,17,46,79,78,95,34,3,56,12,26,24,60,58,63,98,8,76,73,26,58,38,49,43,59,83,21,13,99,3,89,32,21,14,95,8,7,99,83,59,2,69,44,66},{-92,-76,-58,-56,-54,-20,-18,-16,-14,8,20,52,72,82,82,84},{1,0,1,1,0,0,1,0,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0},{7,7,8,9,13,14,16,18,19,20,24,24,30,32,32,45,49,55,62,62,84,90,90,93,95,98},{-28,-52,-84,-98,48,74,48,-34,-38,54},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{30,44,9,92,82,11,66,22,87,20}}; vector<int> param1 {23,35,13,40,15,34,22,7,28,9}; vector<int> param2 {23,21,13,37,15,26,14,8,37,9}; 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; }
SUM_AREA_RECTANGLES_POSSIBLE_ARRAY
import java.util. *; import java.util.stream.*; import java.lang.*; import javafx.util.Pair; public class SUM_AREA_RECTANGLES_POSSIBLE_ARRAY{ static int f_gold ( int [ ] a , int n ) { Arrays . sort ( a ) ; int sum = 0 ; boolean flag = false ; int len = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ! flag ) { flag = true ; len = a [ i + 1 ] ; i ++ ; } else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) { sum = sum + a [ i + 1 ] * len ; flag = false ; i ++ ; } } return sum ; }
null
using namespace std; int f_gold ( int a [ ], int n ) { sort ( a, a + n, greater < int > ( ) ); int sum = 0; bool flag = false; int len; for ( int i = 0; i < n; i ++ ) { if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( ! flag ) ) { flag = true; len = a [ i + 1 ]; i ++; } else if ( ( a [ i ] == a [ i + 1 ] || a [ i ] - a [ i + 1 ] == 1 ) && ( flag ) ) { sum = sum + a [ i + 1 ] * len; flag = false; i ++; } } return sum; }
public static void main(String args[]) { int n_success = 0; List<int [ ]> param0 = new ArrayList<>(); param0.add(new int[]{3,11,14,15,22,33,64,81,82,95}); param0.add(new int[]{-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-4}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1}); param0.add(new int[]{-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86}); param0.add(new int[]{1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1}); param0.add(new int[]{19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93}); param0.add(new int[]{-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34}); param0.add(new int[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}); param0.add(new int[]{40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12}); List<Integer> param1 = new ArrayList<>(); param1.add(9); param1.add(22); param1.add(22); param1.add(32); param1.add(21); param1.add(38); param1.add(10); param1.add(33); param1.add(24); param1.add(26); for(int i = 0; i < param0.size(); ++i) { if(f_filled(param0.get(i),param1.get(i)) == f_gold(param0.get(i),param1.get(i))) { n_success+=1; } } System.out.println("#Results:" + n_success + ", " + param0.size()); } }
null
int main() { int n_success = 0; vector<vector<int>> param0 {{3,11,14,15,22,33,64,81,82,95},{-42,2,84,18,60,84,-12,64,46,60,40,52,-62,-48,60,64,76,50,88,92,42,-82,44,-98,-4},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{50,6,43,82,99,1,20,7,52,18,52,18,45,75,58,48,49,70,69,19,49,35,45,14,52,33,9,31,86,70,77,70,91,56,76,69,68,31,21,72,78,83,76,1},{-92,-76,-70,-62,-46,-36,-36,-32,-26,-8,-2,4,8,14,14,26,34,48,58,68,74,78,84,86},{1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,0,1},{19,20,23,25,26,26,34,43,43,46,49,56,59,59,68,73,93,93},{-82,-80,-68,-98,34,96,-72,22,-30,-92,74,-68,48,92,-26,-32,-8,72,84,-10,60,74,-98,78,-32,84,64,-56,94,24,72,40,-44,2,-18,34},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},{40,32,38,69,56,28,79,29,63,72,4,46,25,32,12,83,59,59,32,1,56,15,62,3,6,85,29,45,88,84,52,62,89,33,48,23,85,54,46,78,7,12}}; vector<int> param1 {9,22,22,32,21,38,10,33,24,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; }