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 DiceBuilder { | |
private final boolean[][] dat = new boolean[6][4]; | |
private final boolean[] visited = new boolean[6]; | |
private static final String[] map = { "4...", "0123", "5..." }; | |
private int si = 1, sj = 0; | |
public boolean[][] build(boolean[][] in) { | |
dfs(new DiceState(), si, sj, in); | |
return dat; | |
} |
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.HashMap; | |
import java.util.Map; | |
import java.util.Scanner; | |
public class Main { | |
private static final char[] nums = "0123456789".toCharArray(); | |
private static final char[] opes = "+-*&^|".toCharArray(); | |
private static final Map<String, Long> cache = new HashMap<>(); |
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 Evaluator { | |
private static final int RADIX = 10; | |
private final Tokenizer tokenizer; | |
public Evaluator(String s) { | |
this.tokenizer = new Tokenizer(s); | |
} | |
public long evaluate() { | |
try { |
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.*; | |
public class Main { | |
private static final Scanner sc = new Scanner(System.in); | |
public static void main(String... args) throws Exception { | |
while (sc.hasNext()) { | |
final int n = sc.nextInt(); | |
final int m = sc.nextInt(); |
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.io.*; | |
import java.util.*; | |
import java.awt.*; | |
import java.awt.image.*; | |
import javax.imageio.ImageIO; | |
public class Visualizer { | |
private static final int SCALE = 8; | |
private static final Scanner sc = new Scanner(System.in); |
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.*; | |
import static java.lang.Math.*; | |
public class Main { | |
private static final int n = 3; // future work n != 3 | |
public static void main(String... args) { | |
final Scanner sc = new Scanner(System.in); | |
while (sc.hasNext()) { | |
final int l = sc.nextInt(); |
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.*; | |
public class Main { | |
private static final Scanner sc = new Scanner(System.in); | |
public static void main(String... args) { | |
while (sc.hasNext()) { | |
final int N = sc.nextInt(); | |
if (N == 0) | |
break; |
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.*; | |
import static java.lang.Math.*; | |
public class Main { | |
int n, m, l; | |
char[][] words; | |
boolean[][] map; | |
V[][][] vs; | |
public void run() { |
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.io.*; | |
import java.util.*; | |
public class Main { | |
static final int L = 50; | |
public void run() { | |
Scanner sc = new Scanner(System.in); | |
while (sc.hasNext()) { |
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.*; | |
public class Main { | |
public static void main(String...args) { | |
Scanner sc = new Scanner(System.in); | |
int q = sc.nextInt(); | |
long d = 0; | |
for (int i = 0; i < q; i++) { | |
sc.next(); | |
if (sc.next().charAt(0) == '(') | |
d += sc.nextInt(); |
OlderNewer