F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A22992 | A21767 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.util.*;
public class Dancers {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int times = sc.nextInt();
for (int c = 1; c <= times; c++) {
int players = sc.nextInt();
int surprises = sc.nextInt();
int best = sc.nextInt();
int count = 0;
int[] score... |
A21396 | A22599 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package com.Qualification_2012;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DancingWithGooglers {
private static int S = 0;
public static void main(String[] args) {
try {
Scanner sc = new Scanner(new ... |
A13029 | A13153 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.StringTokenizer;
public class B {
static String inner = "input.in";
static Scanner scan;
public static void main (String[]args) throws IOException
{
... |
A22360 | A21339 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class Dancers {
public static void main(String[] args) throws Exception {
PrintWriter out = new Pri... |
B10149 | B10337 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... |
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author megaterik
*/
public cl... |
A20934 | A23005 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.StringTokenizer;
public class B {
static String inner = "input.in";
static Scanner scan;
public static void main (String[]args) throws IOException
{
... |
A21396 | A20055 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google.code.jam.dancing.with.the.googlers;
import java.util.ArrayList;
/**
*
* @author Lucas
*/
public class BestResultFinder {
public ArrayList<Integer> findBestResult(ArrayList<ArrayList> list) {
... |
B21270 | B22020 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | package com.afarok.google.codejam2012.qualificationround;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class CRecycledNumber {
public static void main(String[] ags) {
//System.setIn(new FileInputStream("src/com/afarok/goog... |
B12115 | B11858 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | /*************************************************************************
* Compilation: javac In.java
* Execution: java In
*
* Reads in data of various types from: stdin, file, URL.
*
* % java In
*
* Remarks
* -------
* - isEmpty() returns true if there is no more input or
* it is all whi... |
A22360 | A22262 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... |
import java.io.*;
import java.util.*;
/**
*
* @author Hilos
*/
public class ProblemB {
public static BufferedWriter bw;
public static BufferedReader br;
public static void main(String[] args) {
try {
String filename = "B-large";
br = new BufferedReader(new FileReader("... |
A22191 | A22350 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | import java.io.*;
import javax.swing.*;
import java.util.*;
import java.awt.event.*;
import java.awt.*;
import java.math.*;
import java.text.*;
public class Gjam{
static int _pow(int num, int power)
{
int product=1;
for(int i=0;i<power;i++)
product *= num;
return product;
}
public static void main... |
A22360 | A22870 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... |
package googleCodeJam;
import java.io.*;
import java.util.*;
public class ThirdExercise {
/**
* @param args
*/
public static void main(String[] args) {
try{
FileInputStream fstream = new FileInputStream("B-large.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new Buffer... |
B20023 | B20145 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.io.*;
import java.util.Scanner;
public class RecycledNumbers{
public static void main(String[] args){
//read filename from user
Scanner request = new Scanner(System.in);
System.out.println("Enter file name");
String fileName = request.nextLine();
try{
//create a f... |
B21752 | B20293 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | /*
Problem
Do you ever become frustrated with television because you keep seeing the same things, recycled over and over again? Well I personally don't care about television, but I do sometimes feel that way about numbers.
Let's say a pair of distinct positive integers (n, m) is recycled if you can obtain m by moving... |
A20261 | A20094 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | package codejam2012.qualification;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class B {
//static File inFile ... |
A20261 | A22529 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Dancing {
public static void main(String[] args) throws NumberFormatException, IOException {
Scanner read = new Scanner(new InputStreamReader(System.in));
int cases = Integer.parseInt(read.next());
int counte... |
A11201 | A11443 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
public class B {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(... |
A20382 | A20055 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google.code.jam.dancing.with.the.googlers;
import java.util.ArrayList;
/**
*
* @author Lucas
*/
public class BestResultFinder {
public ArrayList<Integer> findBestResult(ArrayList<ArrayList> list) {
... |
A12273 | A10508 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
import java.io.FileWriter;
import java.util.*;
public class B
{
public B( String fn)
{
try{
BufferedReader r = new BufferedReader( new FileReader( fn + ".in"));
PrintWriter w = new PrintWriter( new FileWriter( fn + ".out")... |
A12460 | A10038 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class DancingWithGooglers1 extends Thread{
//private static int rating[] = {0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10};
pr... |
A21396 | A22162 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
public class DancingWithTheGooglers {
public static BufferedReader BR;
public static String readLine() {
try {
return BR.readLine();
} catch(Exception E) {
System.err.println(E.toString());
... |
B11696 | B11699 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... |
public class testCase {
public testCase(int n){
T = n;
cases = new String[T];
count=0;
}
public void addCase(String s){
if(count > T-1){
System.out.println("STOP ! too many test cases !!");
return;
}
cases[count++] = s;
}
int count;
int T;
String[] cases;
}
|
B21207 | B20960 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.S... |
A12570 | A10391 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | package qualification2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class B {
private final String f = "src\\qualification2012\\B-small-attempt0";
private BufferedReader in... |
A20490 | A20626 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | /*
GCJ2012-Q
*/
import java.io.*;
import java.util.*;
import java.math.*;
public class GCJ2012QB {
static BufferedReader fin;
static PrintWriter fout;
// change numefile
static String file="qbl";
static String infile=file+".in";
static String outfile=file+".out";
//
// write result to ou... |
B12762 | B10441 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.io.*;
import java.util.*;
class GoogleRecycle
{
public static void main(String[] args)
{
Integer a,b,m,n;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Scanner sc=new Scanner(new InputStreamReader(System.in));
int t=sc.nextInt();
String ans[]=new String[t];
for(int i=... |
B12762 | B11011 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.util.*;
import java.io.*;
public class C{
static ArrayList< ArrayList<Integer> > mem = new ArrayList< ArrayList<Integer> >();
static int lenAB = -1;
static boolean udah[] = new boolean[2000005];
public static void compute(int x){
int div = 10, gen, mul = 1;
for (int i = 0 ; i < lenAB-1 ; i ++)mu... |
B10155 | B10513 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.util.*;
import java.io.*;
public class C {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(System.in);
System.setOut(new PrintStream(new File("C.out")));
int T = sc.nextInt();
for(int ca = 1; ca <= T; ca++) {
int A = sc.nextInt();
int B = sc.nex... |
B12762 | B13208 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package probs;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class Problem3 {
public static void main(String[] args) {
try {
String filePath = "in-small-3.txt";
... |
A20490 | A22853 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | package qualification.common;
import java.io.*;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 17:21
* To change this template use File | Settings | File Templates.
*/
public class InputReader {
public static String[] getInputLines(String filename){
String[] input = null;... |
A12211 | A12479 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Dancing {
public static void main(String[] ar... |
A20382 | A22162 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
public class DancingWithTheGooglers {
public static BufferedReader BR;
public static String readLine() {
try {
return BR.readLine();
} catch(Exception E) {
System.err.println(E.toString());
... |
B12941 | B12607 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | package com.monochromeiguana.codejam;
import com.google.common.collect.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
/**
* Hello world!
*
*/
public class Main {
static... |
A12544 | A11787 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.text.*;
import java.io.*;
import java.util.*;
import java.lang.Math;
public class B
{
public static void main(String[] args) throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
for(int t = 1; t <= T; t++) {
... |
B10858 | B11707 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| import java.util.*;
class Recycle
{
public static int[] combi = {0,0,1,3,6,10,16,21};
public static boolean[] bool;
public static int howMany(int x, int least, int greatest)
{
int rotate = x;
int pair = 1;
int i;
int j;
int dummy;
ArrayList<Integer> digit = new ArrayList<Integer>();
bool[rotate]=... |
B11696 | B13057 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | package codejam20120413;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
public class C {
int digits(int in) {
int count=0;
for (;(in=in/10)>0; count++);
return count;
}
int shift(int in, int mag)... |
B21968 | B21237 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | package com.google.code;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.TreeMap;
public class C extends GCJ {
public C() throws IOException {
super();
}
@Override
protected void code(int count) throws IOException {
readLine();
int n = getIntInput(0);
i... |
B20006 | B20749 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | package fixjava;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Get the index of the given key if this key has been assigned an index before, and if not, allocate a new index for it by
* incrementing a counter that starts at zero, and return the new index.
*/
public class UniqueIndexAllocator<T> {
p... |
A22771 | A20902 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | /**
*
*/
package com.sathish.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
/**
* @author satselva
*
*/
public class Dancers
{
pu... |
B12074 | B10009 | 0 | 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... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Recycled {
private static final String fileInName = "file.in";
private static final String... |
A11277 | A10721 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/*
* Author: Lloyd Mckenzie
* Google code jam
* 04/13/12
* dancing problem: take in input of a series of numbers, find set of
* a series of 3 numbers that one series of numbers adds up to a given number
* and the set contains t... |
A11502 | A11253 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class Dance {
public static int[][] JudgedScores(int a){
int div=a/3;
int[][] Demo=new int[1][3];
if(a==0) { Demo[0][0]=0; Demo[0][1]=0; Demo[0][2]=0;
}
else {... |
B12074 | B12320 | 0 | 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... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
public class C {
PrintWriter out;
public void read() throws IOException {
BufferedReader br = new BufferedReader(new FileRe... |
B12074 | B12470 | 0 | 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... | import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;
import java.io.*;
public class Rec {
public static void main(String args[]) throws IOException {
//Scanner in = new Scanner(System.in);
//int n = in.nextInt();
//in.nextLine();
Buffe... |
B20291 | B20216 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | package qualifs;
import gcj.Gcj;
import java.util.HashSet;
import java.util.Set;
public class C {
final private String file;
C (String f) {
file = f;
}
public void run() {
Gcj gcj = new Gcj(file);
gcj.readLine();
int ncase = gcj.iToken();
for (int cas=1 ; cas <= ncase ; cas++) {
gcj... |
A10699 | A10989 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.UUID;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
DancingWithTheGooglers speakingInTougues = n... |
B12669 | B13185 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigInteger;
import java.util.Scanner;
public class C {
static String inner = "input.in";
static Scanner scan;
public static void main (String[]args) throws IOException
{
File f = new File (inner);
File out = new Fi... |
B12115 | B12578 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Round0;
import custom.Output;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util... |
A11201 | A13105 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | package codejam.contest;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.Vector;
public class ProblemB
{
public static void main(String[]arg)
{
try
{
FileInputStream fInputStream = new FileInputStream(arg[0]);
... |
B12570 | B12752 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | package qualifiers;
import java.io.*;
import java.util.*;
import java.util.concurrent.*;
public class QualifierC {
class Task implements Runnable {
private int num;
private String line;
public Task(int num, String line) {
this.num = num;
this.line = line;
}
@Override
public void run() {
String... |
B10149 | B11022 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package org.moriraaca.codejam.recyclednumbers;
import java.io.InputStream;
import org.moriraaca.codejam.GeneralDataParser;
public class RecycledNumberDataParser extends GeneralDataParser {
public RecycledNumberDataParser(InputStream input) {
super(input);
}
@Override
protected void doParse() {
for (int i =... |
A22078 | A21774 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
public class Utils {
public static ArrayList<String> readFile(String filename){
//replace local file with remote file from peerInfo address
ArrayList<String> ret= new ArrayList<String... |
A21010 | A21278 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.util.*;
import java.io.*;
import java.nio.*;
import java.nio.file.*;
import java.nio.charset.*;
public class danzig
{
//arrays store each Googler's score info
private static int[] total;
private static int[] max;
private static int[] modulo;
private static int[] results;
public static void main(S... |
A22078 | A21542 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Dancing_With_Googlers {
public static void main(String[] args) {
try {
// Initialize
InputStreamReader converter = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(converter);
String curLine = in.readLi... |
B21270 | B20203 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
String msg = "";
BufferedReader br = ... |
B12762 | B10863 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author PRATIK
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int test=args.length/2;
... |
B21790 | B21434 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | 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... |
B12762 | B11304 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam;
import com.isotopeent.codejam.lib.SolverBase;
import com.isotopeent.codejam.lib.Utils;
import com.isotopeent.codejam.lib.converters.IntArrayLine;
public class Solver extends SolverBase<int[]> {
private static final ... |
B10231 | B12216 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | package hk.polyu.cslhu.codejam;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import hk.polyu.cslhu.codejam.lib.FileStream;
import hk.polyu.cslhu.codejam.lib.ResultCollector;
import hk.polyu.cslhu.codejam.solution.Solution;
import hk.polyu.cslhu.codejam.solution.impl.StoreCredit;... |
B20856 | B21145 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | import java.util.*;
import java.io.*;
import java.math.BigInteger;
import static java.lang.Math.*;
public class B implements Runnable {
final String fileName = "C-large";
private void solution() throws IOException {
if (!fileName.isEmpty()) {
in = new Scanner(new FileReader(fileName + ".in"));
out = new Pri... |
B20734 | B20628 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.y12.round0;
import utils.Jam;
import utils.JamCase;
/**
*
* @author fabien
*/
public class RecycledNumbers extends Jam {
public RecycledNumbers(String filename) {
super(filename);
}
@Over... |
B12669 | B10148 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
public class Recycled_Num {
public static void main(String[] args) {
//long currentTime = System.currentTimeMillis();
Scanner input_file = new Scanner(new InputStreamReader(System.in));
String input_line = null;
String[] nu... |
B12082 | B10302 | 0 | 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... |
import java.io.*;
import java.util.ArrayList;
import java.util.List;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author home
*/
public class RecycledNumbers {
public static void main(String args[])throws IOException{
FileReader reader ... |
A12273 | A12380 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.*;
import java.util.*;
import static java.lang.System.*;
public class ProblemB {
public class Case {
int numSurprising;
int bestResultThreshold;
ArrayList<Integer> points = new ArrayList<Integer>();
ArrayList<ArrayList<Integer>> findTriples(int sum, int maxDiff) {
int floor = sum / 3;
... |
A22360 | A21184 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib.converters;
import com.isotopeent.codejam.lib.InputConverter;
public class StringLine implements InputConverter<String> {
private String input;
@Override
public boolean readLine(String data) {
input = data;... |
A20490 | A22968 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
public class QBGoogleDance {
public static void solve(BufferedReader reader, BufferedWriter writer) throws IOException... |
B21790 | B20436 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... |
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author andy
*/
public class RecycledNumbers {
/**
* @param args the command line arguments
*/
public static void main(St... |
B21752 | B21692 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
class Input {
int a;
int b;
public Input(String line) {
String [] arr = line.split(" ");
a = Integer.parseInt(arr[0]);
b = Integer.parseInt(arr[1]);
}
public String Rotate(String str) {... |
A12273 | A11604 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.*;
public class Test2 {
final static String INPUT_FILE_NAME = "input2";
int T = 0;
int q = 0;
public static void main(String args[]) {
try {
Test2 tst = new Test2();
tst.getInput();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void getInput() throws Exception {
F... |
A12113 | A11145 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class DancingWithTheGooglers {
public static void readInput(String pFil... |
B10149 | B11763 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package de.johanneslauber.codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import de.johanneslauber.codejam.model.ICase;
import de.johanneslauber.code... |
B21752 | B20688 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.util.*;
import java.io.*;
public class C{
static ArrayList< ArrayList<Integer> > mem = new ArrayList< ArrayList<Integer> >();
static int lenAB = -1;
static boolean udah[] = new boolean[2000005];
public static void compute(int x){
int div = 10, gen, mul = 1;
for (int i = 0 ; i < lenAB-1 ; i ++)mu... |
A22992 | A22249 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package qualification;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
*
* @author anvarik
*/
public class dancers {
public static void main(String[] args) throws Fi... |
B10361 | B12847 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... |
A11502 | A12847 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Dancing
{
static int n;
static int[] score;
static int solve( int surp, i... |
A12846 | A10536 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package one.codejam.b;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Dancing... |
B21049 | B20708 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Scanner a = new Scanner(new File("/Users/anurag/Dev/Java/workspace/CodeJam/src/input"));
FileWriter w = new FileWriter(new File("/Users/a... |
B21207 | B21521 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.io.*;
import java.util.*;
public class C
{
BufferedReader read;
BufferedWriter write;
public static void main(String args[])
{
try {
new C().init("C-large");
} catch (Exception ex) {
System.out.println("error occured "+ex);
// Logger.... |
B11327 | B11227 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| package codezam.util;
import java.io.File;
import java.io.FileReader;
import java.io.LineNumberReader;
public class InputFile {
private File file;
FileReader freader;
LineNumberReader lnreader;
public void setFile(String filename) {
try {
file = new File(filename);
freader = new FileReader(file);
... |
A20934 | A20266 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | package codejam2012.qualification;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class ProblemB {
public static void... |
A12846 | A12811 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | package ru.guredd.codejam;
import java.util.StringTokenizer;
public class Qualification2012B {
public void solve() {
int count = Integer.valueOf(Main.inputData.get(0));
for (int i = 0; i < count; i++) {
int result = 0;
String data = Main.inputData.get(i + 1);
... |
A12544 | A12840 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | package br.com.luan;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class B {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));... |
A21557 | A21855 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | import java.io.*;
import java.util.*;
import java.awt.Point;
import java.lang.Math;
class Case{
int num0,num1,num2,num3;
String result="";
public Case(File aFile) {
try{
StringBuilder contents = new StringBuilder();
BufferedReader input = new BufferedReader(new FileReader(aFile));
String line = input... |
B20734 | B20035 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
/**
* template class for code jam Contest
*
* @author Tudor
*
*/
public ... |
A12570 | A12855 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
*
*/
/**
* @author Shweta
*
*/
public class DancingGoogler {
/**
* @param list
* @param minimumScore
* @param numberOfSurprisingResults
*... |
A20261 | A22874 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | package com.google.codejam.googlers;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
/**
*
* Class to generate Test Report.
* @author Sushant Deshpande
*/
public class OutputRecorder {
/**
* Method for generating Test Report.
* @param te... |
B10155 | B12927 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
/**
*
* @author Luis Sergio Curay
*/
public class c {
public c() {
Scann... |
B11318 | B11571 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
public class C {
public static void main(String[] args) {
try {
BufferedReader input = new BufferedReader(new FileReader("/home/ramzy/Desktop/codejam/C-small.in"));
Pr... |
B11421 | B13174 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package recycle;
import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Recycle {
public static void main(String[] args) throws Exception {
FileInputStream fr=new FileInputStream("/home/priyankle/Desktop/recycle.txt");
StreamTokenizer st=new StreamTokenizer... |
A21010 | A20958 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package codejam2012;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Scanner;
/**
* Created by IntelliJ IDEA.
* User: Jimmy
* Date: 4/14/12
* Time: 10:17 PM
*/
public class DancingWithTheGooglers implements Runnable {
Scanner ... |
B12085 | B10872 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | package de.at.codejam.problem3;
public class Problem3Case {
private String numberA;
private String numberB;
public String getNumberA() {
return numberA;
}
public void setNumberA(String numberA) {
this.numberA = numberA;
}
public String getNumberB() {
return numberB;
}
public void setNumberB(String ... |
B10361 | B10632 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | package assignments;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import base.Assignment;
public class AssignmentC implements Assignment {
private int min;
private int max;
@Override
public String solve() {
int total = 0;
int length = (int) Math.log10(min) + 1;
for (int i ... |
A21396 | A20485 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package gcj2012.qualification;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GooglerDance {
public static void main(String[] args) throws Exception {
GooglerDance main = new GooglerDance(args[0]);
main.solve();
... |
A20382 | A21782 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | package qualificationround;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class ProblemBDancingGooglers {
public ProblemBDancingGooglers() {
try {
FileReader fr = new FileReader("B-large.in");
BufferedReader br = new BufferedReader... |
B10485 | B13196 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... |
B10245 | B10943 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Vector;
public class Task3
{
public static void main(String[] args)
{
try
{
readSolveAndWrite("C-small-attempt1... |
B12762 | B10651 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package tp;
import java.io.*;
public class Numbers
{
String input[];
int n,m,g;
int no;
int ans[];
int count=0;
int j,t_c;
int a,b;
DataInputStream dis=new DataInputStream(System.in);
FileReader fr;
BufferedReader br;
Numbers() throws IOException
{
fr= new Fil... |
A11917 | A10189 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | import java.io.*;
import java.util.*;
public class surprise
{
public static StringTokenizer st;
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("B-small-attempt0.in")));
PrintWriter pw = new PrintWriter(new FileWriter("outpu... |
A10996 | A11051 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj.b;
import java.util.Scanner;
/**
*
* @author S_Malindi
*/
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt(... |
B11318 | B10409 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | package qualification2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class C {
private final String f = "src\\qualification2012\\C-small-attempt0";
private BufferedReader in;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.