f1
stringlengths
6
6
f2
stringlengths
6
6
content_f1
stringlengths
149
20.2k
content_f2
stringlengths
149
20.2k
flag
int64
0
1
__index_level_0__
int64
0
3.83k
C20047
C20022
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package template; //standard libraries potentially used: //Apache commons http://http://commons.apache.org/ //Google Guava http://code.google.com/p/guava-libraries/ import java.util.ArrayList; public class Template { public static void main(String[] args) { //test(); //Utils.die("Done testing"...
0
3,200
C20047
C20016
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
// Author: Alejandro Sotelo Arevalo package qualification; import java.awt.*; import java.awt.geom.*; import java.io.*; import java.util.*; public class D_HallOfMirrors { //-------------------------------------------------------------------------------- private static String ID="D"; private static String NAME="...
0
3,201
C20047
C20072
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
/* * CodeJamTester1A.java * * Created on 28.07.2008, 14:20:39 * * To change this template, choose Tools | Templates * and open the template in the editor. */ package qualification; import java.util.*; import java.io.*; import java.math.*; /** * * @author Besitzer */ public class CodeJamQuali { int tes...
0
3,202
C20047
C20037
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; /** * * @author jim */ public class FractionPoint { public final Fraction x; public final Fraction y; public FractionPoint(Fraction x, Fraction y) { ...
0
3,203
C20047
C20054
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.io.IOUtils; public class QuestionReader { pr...
0
3,204
C20047
C20080
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import static java.lang.Double.parseDouble; import static java.lang.Integer.parseInt; import static java.lang.Integer.signum; import static java.lang.Long.parseLong; import static java.lang.Math.abs; import static java.lang.System.exit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStr...
0
3,205
C20047
C20084
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package google.codejam2012.qualification; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; import static java.lang.Math.*; final class BinaryMatrix { private int[] data; public BinaryMatrix(int height, int width) { data = new int[height]; } public void se...
0
3,206
C20047
C20027
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; import java.util.ArrayList; import uk.co.epii.codejam.common.DatumConverter; /** * * @author jim */ public class HallFactory implements DatumConverter...
0
3,207
C20047
C20009
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package com.forthgo.google.g2012r0; import com.forthgo.math.Helper; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Scanner; /** * Created by Xan Gregg. * Date: 4/14/12 */ public class ProblemD { private static final int SELF = 2; pr...
0
3,208
C20047
C20060
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.math.BigInteger; /** * Utility for BigInteger */ public class BI { public static BigInteger ZERO = BigInteger.ZERO; public static BigInteger ONE = BigInteger.ONE; public static BigInteger add( final BigInteger x , final BigInteger y ) { return...
0
3,209
C20047
C20004
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.util.*; public class D { public static boolean wall[][]; public static int X; public static int Y; public static int[] dxs; public static int[] dys; public static void main(String[] args) { Scanner in = new Scanner(System.in); int T = in.nextInt(); for(int c = 1; c <= ...
0
3,210
C20047
C20005
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package gcj; import com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler; import java.util.*; import java.io.*; public class HallOfMirrors { final static String PROBLEM_NAME = "mirrors"; final static String WORK_DIR = "D:\\Gcj\\" + PROBLEM_NAME + "\\"; int H, W, D; double stX, s...
0
3,211
C20047
C20065
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.prototype; import static java.lang.Math.abs; import java.io.File; import java.io.IOException; import jp.funnything.competition.util.CompetitionIO; import jp.funnything.competition.util.Packer; import org.apache.commons.io.FileUtils; import org.apache.commons.math.fraction.Fraction; import org....
0
3,212
C20047
C20006
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package problemD; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class ProblemD { static Rational posX = null; static Rational posY = null; static Rational tarX = null; static Rational tarY = null; static boolean[][] array = null; public static void main(String[] ...
0
3,213
C20047
C20067
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.io.*; import java.util.*; public class Solution { private StringTokenizer st; private BufferedReader in; private PrintWriter out; final String file = "D-large"; public void solve() throws IOException { int tests = nextInt(); for (int test = 0; test < tests; ++test) { int n = nextInt(); ...
0
3,214
C20047
C20008
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; public class SimpleMirrors { public static void ma...
0
3,215
C20047
C20063
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.commons.io.IOUtils; public class AnswerWriter { private static final String DEFAULT_FORMAT = "Case #%d: %s\n"; private final BufferedWriter _wr...
0
3,216
C20047
C20015
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package qualification; import java.io.*; import java.util.Scanner; /** * @author Roman Elizarov */ public class D { public static void main(String[] args) throws IOException { new D().go(); } Scanner in; PrintWriter out; private void go() throws IOException { in = new Scanner(new File("src\\qualificatio...
0
3,217
C20047
C20050
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; public enum Direction { UP , DOWN , LEFT , RIGHT; public int dx() { switch ( this ) { case UP: case DOWN: return 0; case LEFT: return -1; case RIGHT: return 1; default: throw...
0
3,218
C20047
C20085
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.util.Scanner; import java.io.IOException; import java.util.Arrays; import java.util.ArrayList; import java.io.PrintStream; import java.io.OutputStream; import java.io.FileOutputStream; import java.io.PrintWriter; import java.io.FileInputStream; import java.io.InputStream; /** * Built using CHelper plug-in...
0
3,219
C20047
C20020
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package template; import java.io.*; import java.util.ArrayList; import java.util.Random; public class Utils { static String logfile = ""; public static BufferedWriter newBufferedWriter(String filename, boolean append) { BufferedWriter bw = null; try { bw = new BufferedWriter(new ...
0
3,220
C20047
C20062
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; public enum Direction { UP , DOWN , LEFT , RIGHT; public int dx() { switch ( this ) { case UP: case DOWN: return 0; case LEFT: return -1; case RIGHT: return 1; default: throw...
0
3,221
C20047
C20059
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.io.FileUtils; public class CompetitionIO { private final QuestionReader _reader; private final AnswerWriter _writer; /** * Default constructor. Use latest...
0
3,222
C20047
C20064
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
1
3,223
C20047
C20076
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.io.*; import java.math.*; import java.util.*; public class D { final static boolean DEBUG = true; class S implements Comparable<S> { int a; int [] b; public int compareTo(S s) { if (a != s.a) return a - s.a; else return b[0] - s.b[0]; } boolean merge(S s) { if (a == s.a...
0
3,224
C20047
C20026
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.io.*; import java.util.*; import java.math.*; class D { private static final boolean DEBUG_ON = true; private static final boolean ECHO_ON = true; private static BufferedReader input; private static BufferedWriter output; private static final int INF = Integer.MAX_VALUE / 2; private static final in...
0
3,225
C20047
C20078
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.awt.Point; public class FracVec { public final Frac row, col; public FracVec(Frac row, Frac col) { this.row = row; this.col = col; } public FracVec(Point pos) { row = new Frac(pos.y); col = new Frac(pos.x); } public FracVec flipHoriz() { return new FracVec(row, col.neg()); } public Fr...
0
3,226
C20047
C20057
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.util.Arrays; import java.util.List; import com.google.common.collect.Lists; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; public class Prime { public static class PrimeData { public int[] list; public boole...
0
3,227
C20047
C20030
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; /** * * @author jim */ public class RayVector { public final int x; public final int y; public RayVector(int x, int y) { this.x = x; this.y ...
0
3,228
C20047
C20002
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
import java.util.*; import java.io.*; import java.math.*; import java.awt.*; import static java.lang.Math.*; import static java.lang.Integer.parseInt; import static java.lang.Double.parseDouble; import static java.lang.Long.parseLong; import static java.lang.System.*; import static java.util.Arrays.*; import static jav...
0
3,229
C20047
C20056
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.math.BigDecimal; /** * Utility for BigDeciaml */ public class BD { public static BigDecimal ZERO = BigDecimal.ZERO; public static BigDecimal ONE = BigDecimal.ONE; public static BigDecimal add( final BigDecimal x , final BigDecimal y ) { return...
0
3,230
C20047
C20018
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package template; import java.util.Objects; public class Pair<T1, T2> implements Comparable<Pair<T1, T2>>{ private T1 o1; private T2 o2; public Pair(T1 o1, T2 o2) { this.o1 = o1; this.o2 = o2; } @Override public boolean equals(Object other) { if (!(other instanceof P...
0
3,231
C20047
C20051
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
package jp.funnything.competition.util; import java.util.List; import com.google.common.collect.Lists; public class Lists2 { public static < T > List< T > newArrayListAsArray( final int length ) { final List< T > list = Lists.newArrayListWithCapacity( length ); for ( int index = 0 ; index < leng...
0
3,232
C20007
C20028
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
0
3,233
C20007
C20022
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package template; //standard libraries potentially used: //Apache commons http://http://commons.apache.org/ //Google Guava http://code.google.com/p/guava-libraries/ import java.util.ArrayList; public class Template { public static void main(String[] args) { //test(); //Utils.die("Done testing"...
0
3,234
C20007
C20016
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
// Author: Alejandro Sotelo Arevalo package qualification; import java.awt.*; import java.awt.geom.*; import java.io.*; import java.util.*; public class D_HallOfMirrors { //-------------------------------------------------------------------------------- private static String ID="D"; private static String NAME="...
0
3,235
C20007
C20072
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
/* * CodeJamTester1A.java * * Created on 28.07.2008, 14:20:39 * * To change this template, choose Tools | Templates * and open the template in the editor. */ package qualification; import java.util.*; import java.io.*; import java.math.*; /** * * @author Besitzer */ public class CodeJamQuali { int tes...
0
3,236
C20007
C20037
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; /** * * @author jim */ public class FractionPoint { public final Fraction x; public final Fraction y; public FractionPoint(Fraction x, Fraction y) { ...
0
3,237
C20007
C20054
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.io.IOUtils; public class QuestionReader { pr...
0
3,238
C20007
C20080
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import static java.lang.Double.parseDouble; import static java.lang.Integer.parseInt; import static java.lang.Integer.signum; import static java.lang.Long.parseLong; import static java.lang.Math.abs; import static java.lang.System.exit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStr...
0
3,239
C20007
C20084
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package google.codejam2012.qualification; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; import static java.lang.Math.*; final class BinaryMatrix { private int[] data; public BinaryMatrix(int height, int width) { data = new int[height]; } public void se...
0
3,240
C20007
C20027
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; import java.util.ArrayList; import uk.co.epii.codejam.common.DatumConverter; /** * * @author jim */ public class HallFactory implements DatumConverter...
0
3,241
C20007
C20009
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package com.forthgo.google.g2012r0; import com.forthgo.math.Helper; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Scanner; /** * Created by Xan Gregg. * Date: 4/14/12 */ public class ProblemD { private static final int SELF = 2; pr...
0
3,242
C20007
C20060
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.math.BigInteger; /** * Utility for BigInteger */ public class BI { public static BigInteger ZERO = BigInteger.ZERO; public static BigInteger ONE = BigInteger.ONE; public static BigInteger add( final BigInteger x , final BigInteger y ) { return...
0
3,243
C20007
C20004
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.util.*; public class D { public static boolean wall[][]; public static int X; public static int Y; public static int[] dxs; public static int[] dys; public static void main(String[] args) { Scanner in = new Scanner(System.in); int T = in.nextInt(); for(int c = 1; c <= ...
0
3,244
C20007
C20005
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package gcj; import com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler; import java.util.*; import java.io.*; public class HallOfMirrors { final static String PROBLEM_NAME = "mirrors"; final static String WORK_DIR = "D:\\Gcj\\" + PROBLEM_NAME + "\\"; int H, W, D; double stX, s...
0
3,245
C20007
C20065
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.prototype; import static java.lang.Math.abs; import java.io.File; import java.io.IOException; import jp.funnything.competition.util.CompetitionIO; import jp.funnything.competition.util.Packer; import org.apache.commons.io.FileUtils; import org.apache.commons.math.fraction.Fraction; import org....
0
3,246
C20007
C20006
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package problemD; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class ProblemD { static Rational posX = null; static Rational posY = null; static Rational tarX = null; static Rational tarY = null; static boolean[][] array = null; public static void main(String[] ...
0
3,247
C20007
C20067
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.io.*; import java.util.*; public class Solution { private StringTokenizer st; private BufferedReader in; private PrintWriter out; final String file = "D-large"; public void solve() throws IOException { int tests = nextInt(); for (int test = 0; test < tests; ++test) { int n = nextInt(); ...
0
3,248
C20007
C20008
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; public class SimpleMirrors { public static void ma...
0
3,249
C20007
C20063
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.commons.io.IOUtils; public class AnswerWriter { private static final String DEFAULT_FORMAT = "Case #%d: %s\n"; private final BufferedWriter _wr...
0
3,250
C20007
C20015
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package qualification; import java.io.*; import java.util.Scanner; /** * @author Roman Elizarov */ public class D { public static void main(String[] args) throws IOException { new D().go(); } Scanner in; PrintWriter out; private void go() throws IOException { in = new Scanner(new File("src\\qualificatio...
0
3,251
C20007
C20050
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; public enum Direction { UP , DOWN , LEFT , RIGHT; public int dx() { switch ( this ) { case UP: case DOWN: return 0; case LEFT: return -1; case RIGHT: return 1; default: throw...
0
3,252
C20007
C20085
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.util.Scanner; import java.io.IOException; import java.util.Arrays; import java.util.ArrayList; import java.io.PrintStream; import java.io.OutputStream; import java.io.FileOutputStream; import java.io.PrintWriter; import java.io.FileInputStream; import java.io.InputStream; /** * Built using CHelper plug-in...
0
3,253
C20007
C20020
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package template; import java.io.*; import java.util.ArrayList; import java.util.Random; public class Utils { static String logfile = ""; public static BufferedWriter newBufferedWriter(String filename, boolean append) { BufferedWriter bw = null; try { bw = new BufferedWriter(new ...
0
3,254
C20007
C20062
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; public enum Direction { UP , DOWN , LEFT , RIGHT; public int dx() { switch ( this ) { case UP: case DOWN: return 0; case LEFT: return -1; case RIGHT: return 1; default: throw...
0
3,255
C20007
C20059
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.io.FileUtils; public class CompetitionIO { private final QuestionReader _reader; private final AnswerWriter _writer; /** * Default constructor. Use latest...
0
3,256
C20007
C20064
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
0
3,257
C20007
C20076
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.io.*; import java.math.*; import java.util.*; public class D { final static boolean DEBUG = true; class S implements Comparable<S> { int a; int [] b; public int compareTo(S s) { if (a != s.a) return a - s.a; else return b[0] - s.b[0]; } boolean merge(S s) { if (a == s.a...
0
3,258
C20007
C20026
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.io.*; import java.util.*; import java.math.*; class D { private static final boolean DEBUG_ON = true; private static final boolean ECHO_ON = true; private static BufferedReader input; private static BufferedWriter output; private static final int INF = Integer.MAX_VALUE / 2; private static final in...
0
3,259
C20007
C20078
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.awt.Point; public class FracVec { public final Frac row, col; public FracVec(Frac row, Frac col) { this.row = row; this.col = col; } public FracVec(Point pos) { row = new Frac(pos.y); col = new Frac(pos.x); } public FracVec flipHoriz() { return new FracVec(row, col.neg()); } public Fr...
0
3,260
C20007
C20057
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.util.Arrays; import java.util.List; import com.google.common.collect.Lists; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; public class Prime { public static class PrimeData { public int[] list; public boole...
0
3,261
C20007
C20030
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; /** * * @author jim */ public class RayVector { public final int x; public final int y; public RayVector(int x, int y) { this.x = x; this.y ...
0
3,262
C20007
C20002
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
import java.util.*; import java.io.*; import java.math.*; import java.awt.*; import static java.lang.Math.*; import static java.lang.Integer.parseInt; import static java.lang.Double.parseDouble; import static java.lang.Long.parseLong; import static java.lang.System.*; import static java.util.Arrays.*; import static jav...
0
3,263
C20007
C20056
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.math.BigDecimal; /** * Utility for BigDeciaml */ public class BD { public static BigDecimal ZERO = BigDecimal.ZERO; public static BigDecimal ONE = BigDecimal.ONE; public static BigDecimal add( final BigDecimal x , final BigDecimal y ) { return...
0
3,264
C20007
C20018
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package template; import java.util.Objects; public class Pair<T1, T2> implements Comparable<Pair<T1, T2>>{ private T1 o1; private T2 o2; public Pair(T1 o1, T2 o2) { this.o1 = o1; this.o2 = o2; } @Override public boolean equals(Object other) { if (!(other instanceof P...
0
3,265
C20007
C20051
package qualificationRound; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class P4 { public static String[] map; public static int x = 0, y = 0; public static int calGCD(int n, int m) { if (m == 0) return n; if (n == 0) return m; ...
package jp.funnything.competition.util; import java.util.List; import com.google.common.collect.Lists; public class Lists2 { public static < T > List< T > newArrayListAsArray( final int length ) { final List< T > list = Lists.newArrayListWithCapacity( length ); for ( int index = 0 ; index < leng...
0
3,266
C20028
C20022
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package template; //standard libraries potentially used: //Apache commons http://http://commons.apache.org/ //Google Guava http://code.google.com/p/guava-libraries/ import java.util.ArrayList; public class Template { public static void main(String[] args) { //test(); //Utils.die("Done testing"...
0
3,267
C20028
C20016
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
// Author: Alejandro Sotelo Arevalo package qualification; import java.awt.*; import java.awt.geom.*; import java.io.*; import java.util.*; public class D_HallOfMirrors { //-------------------------------------------------------------------------------- private static String ID="D"; private static String NAME="...
0
3,268
C20028
C20072
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
/* * CodeJamTester1A.java * * Created on 28.07.2008, 14:20:39 * * To change this template, choose Tools | Templates * and open the template in the editor. */ package qualification; import java.util.*; import java.io.*; import java.math.*; /** * * @author Besitzer */ public class CodeJamQuali { int tes...
0
3,269
C20028
C20037
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; /** * * @author jim */ public class FractionPoint { public final Fraction x; public final Fraction y; public FractionPoint(Fraction x, Fraction y) { ...
0
3,270
C20028
C20054
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.io.IOUtils; public class QuestionReader { pr...
0
3,271
C20028
C20080
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import static java.lang.Double.parseDouble; import static java.lang.Integer.parseInt; import static java.lang.Integer.signum; import static java.lang.Long.parseLong; import static java.lang.Math.abs; import static java.lang.System.exit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStr...
0
3,272
C20028
C20084
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package google.codejam2012.qualification; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; import static java.lang.Math.*; final class BinaryMatrix { private int[] data; public BinaryMatrix(int height, int width) { data = new int[height]; } public void se...
0
3,273
C20028
C20027
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; import java.util.ArrayList; import uk.co.epii.codejam.common.DatumConverter; /** * * @author jim */ public class HallFactory implements DatumConverter...
0
3,274
C20028
C20009
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package com.forthgo.google.g2012r0; import com.forthgo.math.Helper; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Scanner; /** * Created by Xan Gregg. * Date: 4/14/12 */ public class ProblemD { private static final int SELF = 2; pr...
0
3,275
C20028
C20060
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.math.BigInteger; /** * Utility for BigInteger */ public class BI { public static BigInteger ZERO = BigInteger.ZERO; public static BigInteger ONE = BigInteger.ONE; public static BigInteger add( final BigInteger x , final BigInteger y ) { return...
0
3,276
C20028
C20004
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.util.*; public class D { public static boolean wall[][]; public static int X; public static int Y; public static int[] dxs; public static int[] dys; public static void main(String[] args) { Scanner in = new Scanner(System.in); int T = in.nextInt(); for(int c = 1; c <= ...
0
3,277
C20028
C20005
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package gcj; import com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler; import java.util.*; import java.io.*; public class HallOfMirrors { final static String PROBLEM_NAME = "mirrors"; final static String WORK_DIR = "D:\\Gcj\\" + PROBLEM_NAME + "\\"; int H, W, D; double stX, s...
0
3,278
C20028
C20065
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.prototype; import static java.lang.Math.abs; import java.io.File; import java.io.IOException; import jp.funnything.competition.util.CompetitionIO; import jp.funnything.competition.util.Packer; import org.apache.commons.io.FileUtils; import org.apache.commons.math.fraction.Fraction; import org....
0
3,279
C20028
C20006
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package problemD; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class ProblemD { static Rational posX = null; static Rational posY = null; static Rational tarX = null; static Rational tarY = null; static boolean[][] array = null; public static void main(String[] ...
0
3,280
C20028
C20067
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.io.*; import java.util.*; public class Solution { private StringTokenizer st; private BufferedReader in; private PrintWriter out; final String file = "D-large"; public void solve() throws IOException { int tests = nextInt(); for (int test = 0; test < tests; ++test) { int n = nextInt(); ...
0
3,281
C20028
C20008
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; public class SimpleMirrors { public static void ma...
0
3,282
C20028
C20063
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.commons.io.IOUtils; public class AnswerWriter { private static final String DEFAULT_FORMAT = "Case #%d: %s\n"; private final BufferedWriter _wr...
0
3,283
C20028
C20015
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package qualification; import java.io.*; import java.util.Scanner; /** * @author Roman Elizarov */ public class D { public static void main(String[] args) throws IOException { new D().go(); } Scanner in; PrintWriter out; private void go() throws IOException { in = new Scanner(new File("src\\qualificatio...
0
3,284
C20028
C20050
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; public enum Direction { UP , DOWN , LEFT , RIGHT; public int dx() { switch ( this ) { case UP: case DOWN: return 0; case LEFT: return -1; case RIGHT: return 1; default: throw...
0
3,285
C20028
C20085
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.util.Scanner; import java.io.IOException; import java.util.Arrays; import java.util.ArrayList; import java.io.PrintStream; import java.io.OutputStream; import java.io.FileOutputStream; import java.io.PrintWriter; import java.io.FileInputStream; import java.io.InputStream; /** * Built using CHelper plug-in...
0
3,286
C20028
C20020
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package template; import java.io.*; import java.util.ArrayList; import java.util.Random; public class Utils { static String logfile = ""; public static BufferedWriter newBufferedWriter(String filename, boolean append) { BufferedWriter bw = null; try { bw = new BufferedWriter(new ...
0
3,287
C20028
C20062
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; public enum Direction { UP , DOWN , LEFT , RIGHT; public int dx() { switch ( this ) { case UP: case DOWN: return 0; case LEFT: return -1; case RIGHT: return 1; default: throw...
0
3,288
C20028
C20059
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.io.FileUtils; public class CompetitionIO { private final QuestionReader _reader; private final AnswerWriter _writer; /** * Default constructor. Use latest...
0
3,289
C20028
C20064
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; public class Prof { private long _start; public Prof() { reset(); } private long calcAndReset() { final long ret = System.currentTimeMillis() - _start; reset(); return ret; } private void reset() { _start = Sys...
0
3,290
C20028
C20076
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.io.*; import java.math.*; import java.util.*; public class D { final static boolean DEBUG = true; class S implements Comparable<S> { int a; int [] b; public int compareTo(S s) { if (a != s.a) return a - s.a; else return b[0] - s.b[0]; } boolean merge(S s) { if (a == s.a...
0
3,291
C20028
C20026
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.io.*; import java.util.*; import java.math.*; class D { private static final boolean DEBUG_ON = true; private static final boolean ECHO_ON = true; private static BufferedReader input; private static BufferedWriter output; private static final int INF = Integer.MAX_VALUE / 2; private static final in...
0
3,292
C20028
C20078
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.awt.Point; public class FracVec { public final Frac row, col; public FracVec(Frac row, Frac col) { this.row = row; this.col = col; } public FracVec(Point pos) { row = new Frac(pos.y); col = new Frac(pos.x); } public FracVec flipHoriz() { return new FracVec(row, col.neg()); } public Fr...
0
3,293
C20028
C20057
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.util.Arrays; import java.util.List; import com.google.common.collect.Lists; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; public class Prime { public static class PrimeData { public int[] list; public boole...
0
3,294
C20028
C20030
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; /** * * @author jim */ public class RayVector { public final int x; public final int y; public RayVector(int x, int y) { this.x = x; this.y ...
0
3,295
C20028
C20002
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
import java.util.*; import java.io.*; import java.math.*; import java.awt.*; import static java.lang.Math.*; import static java.lang.Integer.parseInt; import static java.lang.Double.parseDouble; import static java.lang.Long.parseLong; import static java.lang.System.*; import static java.util.Arrays.*; import static jav...
0
3,296
C20028
C20056
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.math.BigDecimal; /** * Utility for BigDeciaml */ public class BD { public static BigDecimal ZERO = BigDecimal.ZERO; public static BigDecimal ONE = BigDecimal.ONE; public static BigDecimal add( final BigDecimal x , final BigDecimal y ) { return...
0
3,297
C20028
C20018
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package template; import java.util.Objects; public class Pair<T1, T2> implements Comparable<Pair<T1, T2>>{ private T1 o1; private T2 o2; public Pair(T1 o1, T2 o2) { this.o1 = o1; this.o2 = o2; } @Override public boolean equals(Object other) { if (!(other instanceof P...
0
3,298
C20028
C20051
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package uk.co.epii.codejam.hallofmirrors; import java.awt.Point; /** * * @author jim */ public class Hall { public final int H; public final int W; public final int D; public final FractionPoint meLo...
package jp.funnything.competition.util; import java.util.List; import com.google.common.collect.Lists; public class Lists2 { public static < T > List< T > newArrayListAsArray( final int length ) { final List< T > list = Lists.newArrayListWithCapacity( length ); for ( int index = 0 ; index < leng...
0
3,299