This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class Question4611907 { | |
final static int k = 52; | |
final static int n = 10; | |
final static int m = 1 << n; | |
final static Random random = new Random(); | |
static int count; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Question4618350a { | |
final static int ntrials = 1000000000; | |
public static void main(String [] args) { | |
int count = 0; | |
outer: | |
for (int n = 0;n < ntrials;n++) { | |
int [] p = Permutations.getRandomPermutation(54); | |
for (int square = 0;square < 6;square++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigInteger; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.function.BiConsumer; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
public class Question4618350 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Question4613898 { | |
final static int w = 6; | |
final static int h = 6; | |
static int x,y; | |
static boolean [] [] used = new boolean [w] [h]; | |
static int count; | |
static int deadEnds; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.BitSet; | |
public class Question4605602 { | |
static BitSet used = new BitSet(); | |
public static void main(String [] args) { | |
System.out.println(value(1)); | |
} | |
static boolean value(int move) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Question4395079 { | |
public static void main (String [] args) { | |
int sum = 0; | |
outer: | |
for (int i = 1;i <= 99999;i++) { | |
int bits = 0; | |
for (char c : String.valueOf(i).toCharArray()) { | |
int mask = 1 << (c - '0'); | |
if ((bits & mask) != 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class Question4393372 { | |
public static void main(String [] args) { | |
Set<String> combinations = new HashSet<>(); | |
for (int i = 1000;i < 3000;i++) { | |
char [] c = String.valueOf(i).toCharArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class Question4390194b { | |
final static Random random = new Random(); | |
final static int ntrials = 100000000; | |
final static int [] [] families = { | |
{2,4,6}, | |
{2,3,5}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
public class Question4390194a { | |
final static Random random = new Random(); | |
final static int ntrials = 100000000; | |
final static int [] [] families = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class Question4390194 { | |
final static Random random = new Random(); | |
final static int ntrials = 100000000; | |
final static int [] [] families = { | |
{2,4,6}, | |
{2,3,5}, |