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.HashMap; | |
import java.util.Map; | |
public class Question769362 { | |
final static String from = "cat"; | |
final static String to = "abc"; | |
final static int n = 26; | |
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 Question1347966 { | |
final static int nmoves = 6; | |
final static int horizon = 100; | |
public static void main (String [] args) { | |
// second innings | |
Rational [] r = new Rational [horizon + nmoves]; | |
Rational [] value1 = new Rational [horizon]; | |
Rational [] [] p1 = new Rational [horizon] [nmoves]; |
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.Arrays; | |
import java.util.Collection; | |
import java.util.List; | |
import algebra.Matrix; | |
public class Question1341400 { | |
static List<Integer> getEquivalenceClasses (int n) { | |
List<Integer> result = new ArrayList<Integer> (); |
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.Arrays; | |
import java.util.List; | |
public class Question1351246 { | |
public static void main (String [] args) { | |
outer: | |
for (int n = 2;;n++) { | |
int n2 = n + n; |
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.Arrays; | |
import java.util.List; | |
public class Question1357327 { | |
public static void main (String [] args) { | |
for (long s = 2;;s++) | |
try { | |
List<Long> factors = factor (s); |
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.Arrays; | |
import java.util.List; | |
public class Question1357327 { | |
final static int n = 0x40000000; // highest number to test | |
static boolean [] prime = new boolean [n / 2]; // prime [i] : is 2i + 1 prime? | |
public static void main (String [] args) { |
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; | |
public class Question1341929 { | |
public static void main (String [] args) { | |
for (int n = 2;;n++) { | |
int nslots = 2 * n - 1; | |
int [] p = new int [nslots]; | |
int max = 0; | |
int [] best = null; | |
for (int bits = (1 << (nslots - 2));bits < 1 << (nslots - 1);bits += 2) { |
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.HashSet; | |
import java.util.Set; | |
public class Question1341929Dynamic { | |
final static int maxn = 1000; | |
final static int maxslots = 2 * maxn + 1; | |
static class Record { | |
BigInteger left; |
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; | |
public class Question1364438 { | |
final static int PERMUTATIONS = 0; | |
final static int DERANGEMENTS = 1; | |
final static int n = 630; | |
static { | |
init (n); |
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 Question1013798 { | |
final static int cycleSize = 3; | |
static int mask (int i,int j) { | |
return 1 << shift (i,j); | |
} | |
// i > j | |
static int shift (int i,int j) { | |
return (i * (i - 1)) / 2 + j; |
OlderNewer