F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A20382 | A22919 | 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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
int T = -1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)... |
A10996 | A10035 | 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);
... | import java.io.*;
/**
* Write a description of class Main here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Main
{
private static int count = 1;
public static void main()
{
try{
FileInputStream fstream = new FileInputStream("B-small-attempt2.in"... |
A22078 | A20096 | 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.util.*;
import java.io.*;
public class Dancing {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
new Dancing().run();
}
Integer[] best = new Integer[31];
int best(int x) {
if (best[x] != null)
return best[x];
for (int l = 0; l <= Math.min(x, 8); l++) {
... |
A12544 | A10855 | 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 Aufgabe2;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
private Scanner scanner;
private PrintWriter writer;
public M... |
B20006 | B20063 | 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 {
... | import java.io.*;
import java.lang.*;
class RotateNumber {
public static long RotateNumber(long number, long A, long B)
{
long start = number;
long sum = 0;
int numdigits = (int) Math.log10((double)number); // would return numdigits - 1
int multiplier = (int) Math.pow(10.0, (double)numdigits);
while(tr... |
B10899 | B11033 | 0 | 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.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | 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... |
A12460 | A10319 | 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.IOException;
public class TestTwoSolver extends SolverModule {
public StringBuilder process(BufferedReader in, StringBuilder builder)
throws IOException {
in.readLine();
String line = in.readLine();
int count = 1;
while (line != null) {
line = processline(l... |
B12085 | B10469 | 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... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class Qual1c {
public static void main(String[] args) {
try {
FileWriter fstream = new FileWriter("outcsmall0.txt");
BufferedWriter out = new BufferedWriter(fstream);
Scanner scanner = new Scann... |
A13029 | A10894 | 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... | package utils;
/**
*
* @author Fabien Renaud
*/
public class StopWatch {
private long startTime = -1;
private long stopTime = -1;
private boolean running = false;
public StopWatch start() {
startTime = System.currentTimeMillis();
running = true;
return this;
}
public StopWatch stop() {
... |
A12846 | A10906 | 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 com.khajochi.codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class DancingWithTheGooglers
{
/**
* @param args
*/
public static void main(String[] args)
... |
A20119 | A21771 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | package googleJam;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class GoogleDancers
{
public static void main(String[] args)
{
Scanner scan = null;
try
{
scan = new Scanner(new File(args[0]));
}
catch (FileNotFoundException e)
{
System.err.println(... |
B20566 | B20880 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | package Jam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
public class ProblemC {
/**
* @param args
*/
public static void main(String[] args) ... |
B21270 | B22022 | 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.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class rec {
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int c = 1; c <= t; c++)
{
System.out.println("Case #" + c + ": " + solve(sc));
}... |
B12085 | B10755 | 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... | import java.util.*;
import java.io.*;
public class CodeJamQualC
{
public static void main(String[] args)
{
try{
BufferedReader fin = new BufferedReader(new FileReader("input.txt"));
FileWriter fstream = new FileWriter("output.txt");
BufferedWriter out... |
B12570 | B10280 | 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 files;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Hashtable;
public class Recycle2 {
public static void main(String[] args)
{
try
{
String line;
String data="";
File ff = new File("Ou... |
A21010 | A22417 | 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.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.ArrayList;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author JOSE
*... |
B10231 | B13037 | 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... | public class Recycle extends CodeJam{
public Recycle() {
super("C-small-attempt0");
}
public static void main(String[] args) {
//long t = System.currentTimeMillis();
new Recycle().run();
//System.out.println(System.currentTimeMillis() - t);
}
private int[][] nm... |
A22642 | A22080 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | //Edwin Lunando template for online algorithm contest
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;
public class Main {
// class node implements Comparable<node> {
//
// public... |
A20261 | A22495 | 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.*;
import java.util.*;
public class DanceGooglers {
static String name = "B-large";
public static void main(String args[]) throws IOException {
BufferedReader in = new BufferedReader(new FileReader(name + ".in"));
PrintWriter out = new PrintWriter(name + ".out");
int t = Integer.parseInt(in.rea... |
B21049 | B20027 | 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.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Unsuppo... |
B21790 | B20018 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class InputReader {
private BufferedReader br = null;
public InputReader(String fileName) {
try {
br = new BufferedReader(new FileReader(fileName));
}... |
A20490 | A22695 | 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 google.codejam;
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;
public class Main {
private static boolean debug = false;
public static void mai... |
B12570 | B10460 | 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... |
public class codejam {
public static void main(String argv[]) throws Exception{
RecycledNumbers recycledNumbers=new RecycledNumbers();
recycledNumbers.start();
}
}
|
A11135 | A12813 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... |
import java.io.*;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Ankur
*/
public class DacingWithTheGooglers {
public static void main(String[] args) {
try
{
FileWriter fout = new FileWriter("out");
... |
B21968 | B21351 | 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... | import java.io.*;
public class C {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(in.readLine());
for (int c = 1; c <= t; c++)
{
String[] line = ... |
B12082 | B10647 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.*;
/**
*
* @author wijebandara
*/
public class RecycledNumbers {
public static void main(String[] args) throws FileNotFoundException, IOException {
//java.io.BufferedRead... |
B12941 | B10208 | 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... |
import java.io.*;
import java.util.*;
public class RN {
private static String fileName = RN.class.getSimpleName().replaceFirst("_.*", "");
private static String inputFileName = "D:\\santosh\\cj12\\"+fileName + ".in";
private static String outputFileName = "D:\\santosh\\cj12\\"+fileName + ".out";
private static Sc... |
B10361 | B12720 | 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());... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package atta.codejam.qualification;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamRea... |
A11502 | A11668 | 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.*;
import java.util.ArrayList;
public class inpOutHandler {
public testCase readInput(String fname, int linesInTestCase){
testCase allCases;
ArrayList<String> lineList = new ArrayList<String>();
BufferedReader rd = null;
try {
rd = new BufferedReader(new FileReader(fname));
while (tr... |
A13029 | A12024 | 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.awt.geom.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
public class Main {
public Main() throws IOException {
String input;
int t;
input = br.readLine();
t = Integer.valueOf(input);
for (int i = 0; i < t; i++) {
if (i ... |
B10245 | B10588 | 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.IOException;
import java.io.InputStreamReader;
public class Number {
public static void main(String[] args) throws IOException {
BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(s.readLine());
for (int i = 1; i <= t; ... |
B12762 | B10211 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Arrays;
public class RecyclingNumbers {
private boolean[] m_numArray;
private int[] chooseArray = {0, 0, 1, 3, 6, 10, 15, 21, 28};
private int m_low;
private int m_high;
Recyclin... |
A22771 | A22733 | 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... | import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
public class GCJ2 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
GCJ2 g = new GCJ2();
// int... |
A22992 | A20886 | 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... | //package dancing_with_googler;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.util.Scanner;
public class Solution {
/**
* @param args
*/
public void doit() throws Exception{
BufferedWriter out = new BufferedW... |
B10702 | B10942 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)throws IOException
{
new Main().start();
}
public void start()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
int test=Integer.parseInt(br.readLin... |
A10996 | A12386 | 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);
... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.Vector;
public class dance {
static Vector <String>surprise = new Vector<String>();
static Vector <String>notS... |
B12085 | B10598 | 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 codejam;
import java.io.*;
import java.util.*;
public class RecycledNumbers {
public static void RecycledNumbersProcess() throws Exception
{
int t_cases= getT();
for(int i = 1; i<=t_cases;i++)
{
String line = getG();
long A, B;
String[] charNUMBERS = line.split(" ");
A = Long.... |
A10568 | A10970 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public class googlers {
private static String[] casos;
private static String[] respuestas;
pri... |
B10858 | B10938 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package GoogleCodeJam2012;
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;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;... |
A22992 | A21163 | 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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
ArrayList<String> input = new ArrayList<String>();
BufferedReader br = null;
int go... |
A22378 | A22840 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.io.*;
import java.util.*;
public class DancingWithTheGooglers {
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private static StringTokenizer st;
public static void main ( String [] args ) throws IOException
{
int T = Integer.parseInt(br.read... |
B12762 | B11621 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class RecycledNumbers {
private static boolean isRecycled(long f,long s){
String str1 = String.valueOf(f);
String str2 = String.valueOf(s);
if(str1.length()!=str2.length()){
return f... |
B21227 | B21344 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.*;
/**
* @author Seitaro Sakoda
*
*/
public class RecycledNumbers {
private static final HashMap<Long, Integer> cache = new HashMap<Long, Integer>();
private static final ArrayLis... |
B12669 | B13020 | 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.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static int numShift(int A, int digit){
int num = 0, div;
num = A %10;
div = A /10;
for(int i=1; i < digit ; i++)
{
num = num*10;
}
... |
A10568 | A10606 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.*;
import java.util.*;
public class GoogleQual2012B
{ public static void main(String[] args) throws Throwable
{ new GoogleQual2012B();
}
public GoogleQual2012B() throws Throwable
{ Scanner in = new Scanner(new File("B-small-attempt2.in"));
PrintWriter out = new PrintWr... |
A22378 | A22776 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | package lt.kasrud.gcj.common.io;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Reader {
public static List<String> readFile(String filename) throws IOException {
List<String> results... |
B12074 | B10602 | 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... | package CodeJam;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
public class Recycled_Numbers {
/**
* @param args
*/
String rotation(String A, int nRot) {
String rotA = A.substring(0, nRot);
A = A.substri... |
A12544 | A10633 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
*
* @author sarwar
*/
public class problemB {
static... |
A12846 | A12582 | 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... | import util.CombinationGenerator;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class SetUtil {
public static long getOne(int n) {
return 1<<n;
}
public static List<Integer> getList(long set, int n) {
ArrayList<Integer> integers = new ArrayList<>();
... |
A21557 | A20485 | 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) ... | 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();
... |
B11327 | B10506 | 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]);
}
}
}
| import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Hossam Yasseen
*/
public class ProblemC {
/**
* @param args
*/
static Integer startEdge , endEdge ;
public static void main(String[] args) {
int numberOfRecycledNumbers = 0;
String[] res... |
B21752 | B20175 | 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.FileReader;
import java.util.ArrayList;
public class prob2 {
public static void main(String[] args) {
BufferedReader inputStream = null;
try {
inputStream = new BufferedReader(new FileReader(
"C:/Users/vpamarty.SYMPHONY/Downloads/C-large.in"));
String lineR... |
A12570 | A11694 | 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 dg.gcj.bdancing;
import java.util.*;
/**
* Created by IntelliJ IDEA.
* User: Dmitry
* Date: 14.04.12
* Time: 23:50
* To change this template use File | Settings | File Templates.
*/
public class PossibleCombinations {
private final Map<Integer,List<Triplet>> totalScoreToTriplets = new HashMap<Integ... |
A10793 | A12388 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | package the2012;
import java.io.*;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(new BufferedInputStream(new FileInputStream("/Users/taobo2/Downloads/B-small-attempt0.in.txt")));
Writer outp... |
B10899 | B12421 | 0 | 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.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... |
import java.io.*;
import java.util.*;
/**
*
* @author Hilos
*/
public class ProblemC {
public static BufferedWriter bw;
public static BufferedReader br;
public static void main(String[] args) {
try {
String filename = "C-small-attempt0";
br = new BufferedReader(new Fil... |
B21049 | B20863 | 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.*;
import java.util.*;
class CodejamC {
public static int power[];
public static void main (String [] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("E:/C-large.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("E:/outC.t... |
B20291 | B21076 | 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[]... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.TreeMap;
public class Recycler {
public static void main(String[] args) {
// TODO Auto-generated method stub
String input;
BufferedReader br;
HashSet<String> set;
try{
b... |
B20566 | B22099 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | package qualification.q1;
import java.util.HashMap;
import java.util.Map;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 17:10
* To change this template use File | Settings | File Templates.
*/
public class Q1Solver {
private Map<Character,Character> mapping;
public Q1So... |
A12544 | A12122 | 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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Main {
/**
* @param args
*/
public static void main(String[] args)
{
try{
// Open the file that is the ... |
B10702 | B12023 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.util.Arrays.fill;
import java.io.*;
import java.math.BigInteger;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
pu... |
A22992 | A22923 | 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... | package com.vp.impl;
import java.util.ResourceBundle;
import com.vp.iface.Problem;
public class SpeakGooglerese implements Problem {
@Override
public String solve(String[] dataset) {
ResourceBundle rb = ResourceBundle.getBundle("Mapping");
String strReturnValue = "";
//System.out.println("Translated Text... |
A11201 | A11052 | 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.*;
import java.util.*;
public class B {
BufferedReader ins;
PrintStream outs;
static String INPUT = "B-small-attempt0.in";
static String OUTPUT;
static {
OUTPUT = "B.out";
}
public B(BufferedReader ins, PrintStream outs) {
this.ins = ins;
this.outs ... |
A21010 | A21294 | 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.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class Driver {
public static void main(String[] args) {
DeTerminator testBed = new DeTerminator();
try{
FileInputStream filestream = new FileInputStream("test.txt");
Dat... |
A22360 | A22526 | 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 net.mauhiz.contest.codejam.qual2012;
import java.io.IOException;
import net.mauhiz.contest.codejam.CodejamLineChunkSolver;
public class DancingGoogler extends CodejamLineChunkSolver {
public static void main(String... args) throws IOException {
new DancingGoogler().run(args);
}
@Override
protected St... |
B13196 | B11253 | 0 | 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 ... | import java.io.*;
import java.util.*;
class CodejamC {
public static int power[];
public static void main (String [] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("E:/C-small-attempt0.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("... |
A12846 | A11760 | 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... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
/**
*
*/
/**
* @author kishor
*
*/
public class Dance {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
File f = new File("/tmp/dance.txt");
BufferedRe... |
A21010 | A21389 | 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 de.hg.codejam.tasks.dance.controller;
import de.hg.codejam.tasks.dance.domain.Case;
import de.hg.codejam.tasks.dance.help.Converter;
import de.hg.codejam.tasks.dance.service.Calculator;
import de.hg.codejam.tasks.io.Reader;
import de.hg.codejam.tasks.io.Writer;
public class Test {
public static void main(St... |
B21227 | B20618 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | package codejam.qualification;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Recycled {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
String file = "input3big";
Scanner in = new Scanner(new File(file));... |
B13196 | B13253 | 0 | 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 ... | import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
class Algorithm{
int A;
int B;
int half;
ArrayList<Key> map;
int counter;
public Algorithm(String line){
Scanner scan = new Scanner(line);
A = scan.ne... |
A10996 | A12744 | 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);
... | import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Parser {
File instance;
Scanner sc;
public Parser(String f){
instance = new File(f);
}
public List<List<List<String>>> parse(int nbLinePerCase) throws FileNotFoundException{
sc = new Scanner(insta... |
B10858 | B10264 | 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.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.Reader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.nio.CharBuffer;
import java.util.ArrayList;
import java.u... |
A22378 | A21944 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class qualb{
public static void main(String[] args){
qualb.solve();
}
private static void solve(){
String fileName = "B-large.in";
String outputFileName = fileNam... |
B10702 | B12966 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | package qualification.recycled.numbers;
public class RecycledPair {
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + m;
result = prime * result + n;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (o... |
A10793 | A10309 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | package org.cb.projectb.dancingwiththegooglers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Contest {
public static void main(String[] args) throws FileNotFoundException {
Fi... |
B10231 | B11894 | 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... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
public class gcj2012PBS {
public String recycle(String num, int cycle) {
if (cycle == 0) {
return num;
}
String s = String.valueOf(num);
int len = s.length();
String temp = s.substring(len-1,len);
Strin... |
B11361 | B12695 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | import java.util.*;
public class Recycle {
static boolean[][] recycled = new boolean[10000][10000];
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int T = scan.nextInt();
for (int i = 0; i < T; i++) {
int min = scan.nextInt();
int max = scan.nextInt();
int count = 0... |
B10231 | B10079 | 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... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.StringTokenizer;
public class G2
{
private Scanner reader;
private FileWriter fstream;
private BufferedWriter out;
String nextline;
int noLines;
int intA;
... |
A22078 | A22158 | 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.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;
public class Solution {
static final boolean DBG = false;
// x x x s= 3x
// x x x+1 s= 3x +1
// x x x-1 s= 3x -1
// x x+1 x+1 s= 3x +2
// x x-1 x-1 s= 3x-2
public static void main(String[] args) {
... |
B22190 | B21575 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.util.*;
import static java.lang.Math.*;
import java.io.*;
public class C {
public static void main(String[] args) throws IOException {
/*BufferedReader in = new BufferedReader(new FileReader("C:/Users/Disha/Desktop/codejam/C-small.in"));
FileWriter fw = new FileWriter("C:/Users/Disha/Desktop/codejam... |
A12460 | A10378 | 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... | /*
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. Each triplet of scores consists of three integer scores from 0 to 10 inclusive. The judges have very similar standards, so it's surprising if a triplet of scores contains two... |
A12544 | A12096 | 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.io.*;
import java.util.*;
public class Pilot {
public static void main(String[] args) {
Pilot my = new Pilot();
Calendar cal1 = Calendar.getInstance();
my.doAll();
Calendar cal2 = Calendar.getInstance();
// System.out.println("\nseconds : " + (cal2.getTimeInMillis() -
// cal1.getTimeInMillis... |
B10899 | B10333 | 0 | 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.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | package codejam.qual2012;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Set;
public class C {
public int count(int start, int end) {
int count = 0;
for (int... |
B10899 | B11278 | 0 | 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.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | package Numbers;
import java.util.Scanner;
public class CountRecycle {
public static void main(String[] args)
{
Scanner r = new Scanner(System.in);
int n = r.nextInt();
for(int i = 1; i <= n; i++)
{
int x = r.nextInt();
int y = r.nextInt();
int f = getAmt(x, y);
System.out.println("Case #" + ... |
A22992 | A22042 | 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 codejam;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
/**
*
* @author Aymen
*/
public class main {
... |
B12570 | B12663 | 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... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Recycled{
public static void main(String[] args) throws java.io.IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
for(int i=0;i<t;i++){
String[] input = br.readLine... |
B10361 | B11961 | 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.io.*;
import java.util.*;
/**
* */
public class Main {
/**
* */
public class TestCase{
public Integer a, b;
public Integer[] rNumbers;
public Integer iResult=0;
public Set<String> setPairs=Collections.synchronizedSet( new HashSet<String>());
/**
* @param a
* @param b
* */
... |
B13196 | B10655 | 0 | 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 ... |
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeSet;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author Charles
*/
public class Recycled... |
A11502 | A13041 | 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... | package qualification;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
try {
Scanner scanner = new Scanner(System.in);
int lp = scanner.nextInt();
int c = 0;
for (int loop = 0; loop < lp; loop++) {
int N = scanner.nextInt();
int S = scanner.nextInt();
in... |
B21752 | B20370 | 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 ... | /**
*
*/
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... |
A22360 | A21288 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class DancingWithGooglers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Scanner in;
in = ... |
B11696 | B12784 | 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... | import java.io.*;
import java.util.*;
public class Solve {
public static void main ( String args[] ) throws FileNotFoundException, IOException {
BufferedReader in = new BufferedReader( new FileReader ( args[0] ) );
BufferedWriter out = new BufferedWriter( new FileWriter ( "outfile.txt" ) );
int cases = Intege... |
A12273 | A12325 | 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.... | package gcj.cases.competition.qualification_round_2012;
import gcj.main.Case;
import java.io.BufferedReader;
import java.io.BufferedWriter;
public class CaseB implements Case{
private int caseNum;
private int googlersCount;
private int surpCount;
private int s;
private int[] points;
private int solution;
... |
B10899 | B11535 | 0 | 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.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | package com.google.jam.eaque.stub;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import com.google.jam.eaque.qualif.c.StubImpl;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
if (args.length != 2) {
System.out.println("args lengt... |
A12211 | A12367 | 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.util.*;
public class QualB12 {
/**
* @param args
*/
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 g = 0;
for (int j = 1; ... |
B20291 | B21658 | 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 ggpackage;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class GgClass {
private static String[] txt;
private static String newtxt="";
private stati... |
A11502 | A10824 | 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.InputStreamReader;
public class R0_2_2012 {
public static void main(String[] args) {
try {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(bf.readLine());
for (int i=0; i<T; i++) {
Str... |
B10899 | B12035 | 0 | 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.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | import java.util.*;
public class RecycledPair {
public static boolean canRecycle(int a, int b)
{
String as ="" + a;
for(int i = 0; i < as.length(); i++)
{
if(b == Integer.parseInt(as.substring(i) + as.substring(0, i)))
{
return true;
}
}
return false;
}
public static void main(String arg... |
B11696 | B11867 | 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 es.uam.eps.abk.qualification2012;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;
/**
*
* Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the same
* things, recycled over and over again? Well I pe... |
A12211 | A11133 | 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.*;
import java.util.*;
class Source3
{
public static void main(String[] args) throws IOException
{
String s,word,buffer;
FileReader input = new FileReader("B-small.in");
BufferedReader in = new BufferedReader(input);
File file = new File("B-small.out");
BufferedWriter out = new BufferedWri... |
B12570 | B12335 | 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... | import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<String> lstLinesOutput = new ArrayList<String>();
int iNbAnswers;
List<String> lstLinesInput = FileReaderHandler.openFile("/home/guillaume/Bureau/input");
for(int n=1;n< Integer.parseInt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.