F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B21968 | B21069 | 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.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Scanner;
// Qualification Round 2012
// Problem C
public class RecycledNumbers {
public static void main(String[] args) {
Scanner sc = null;
try {
sc =... |
A20119 | A20000 | 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,... | import java.io.*;
class goodance
{
static int wc;
static int best;
public static void main(String args[])
throws IOException
{
FileReader fin=new FileReader("B-large.in");
BufferedReader bin=new BufferedReader(fin);
FileWriter fout=new FileWriter("Output.txt");
BufferedWriter bout=new BufferedWriter(fout);
PrintWr... |
A10568 | A13077 | 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... | public class Googlers {
public static int google(int N, int S, int P, int[] googler) {
int counter = 0;
for (int j = 0; j < googler.length; j++) {
if (googler[j] % 3 == 0 && P >= 0) {
if (googler[j] != 0) {
if (googler[j] / 3 >= P) {
counter++;
} else if (googler[j] / 3 + 1 >= P && S != 0) {... |
A12846 | A11926 | 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 google.code.jam;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Bogatinovi
*/
public cla... |
B21790 | B20602 | 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.*;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;
public class GCJ2012QualC {
static final int MAXB = 2000000;
int[] minR = new int[MAXB+1];
int[] count = new int[MAXB+1];
public void run() throws IOException {
for (int a = 1; a <= MAXB; a *=... |
B21049 | B20360 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.TreeMap;
/**
* Created with IntelliJ IDEA.
* User: akim
* Date: 4/14/12
* Time: 7:45 PM
* To change this template use File | Settings | File... |
A11502 | A12350 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.*;
import java.util.*;
/**
*
* @author jgao
*/
public class CodeJam {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
... |
B21968 | B20676 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Scanner;
public class QC_Large2012 {
public static void main(String[] args) th... |
A21010 | A22263 | 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 blacky.codejam.qualifications;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class DancingGoogler {
public static void main(String args[]) throws NumberFormatException, IOException {
File file = new File(... |
A10568 | A10842 | 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.IOException;
import java.io.InputStreamReader;
public class Dancing {
public static void main(String[] args) {
int numTestCases;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
try {
numTestCases = Integer.parseInt(in.readLine());
... |
B11327 | B11905 | 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.*;
public class C
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int test = 1, cases = sc.nextInt();
int a, b, curr, count;
String aStr, bStr, num, shift;
while(test <= cases)
{
count = 0;
a = sc.nextInt();
b = sc.nextInt();
aStr = Integer.t... |
A10699 | A12510 | 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) ... | package main;
import java.io.*;
import java.util.Scanner;
class Solver {
public void createSolution(Scanner input, BufferedWriter outWriter) throws IOException {
int numCases = input.nextInt();
for (int i = 0; i < numCases; i++) {
int solution = 0;
int possibilities = 0;
int numDancers = input.nextInt(... |
A22078 | A21987 | 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.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Dancing {
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(new File("dancing.in"));
System.setOut(new Pr... |
B11696 | B10990 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
public class QC2012 {
public static void main(String[] args) throws Exception {
new QC2012... |
A12846 | A10331 | 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 sample;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class SampleMain {
public static void main(String[] args) throws Exception {
String linesFile = //args[0];
"lines.txt";... |
B12082 | B13233 | 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.util.Arrays;
import java.util.Scanner;
/**
* @author Dmitry Levshunov (levshunov.d@gmail.com)
*/
public class TaskC {
private static boolean[] used = new boolean[2000001];
private static int length;
private static int pow;
public static void main(String[] args) throws Exception {
... |
A12846 | A11295 | 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 codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintWriter;
public class CodeJamRunner {
private PrintWriter pw = null;
/**
* Override this to do the real stuff.
* @param inputLine
*/
protected void process( int lineNr, String inputLine )
{
... |
B20856 | B21035 | 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.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Main
{
public static HashMap<Character,Character> mapp = new HashMap<Character,Character>();
public static void mai... |
A22771 | A22237 | 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.*;
import java.util.*;
/**
* @author: Ignat Alexeyenko
* Date: 4/14/12
*/
public class DancingWithGooglersMain {
public static final int MAX_LENGTH = 1024;
public static void main(String[] args) {
DancingWithGooglersMain main = new DancingWithGooglersMain();
main.runConsoleA... |
B20424 | B22260 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | package info.stephenn.codejam2012.qualify;
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Scanner;
public class C {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();... |
A20119 | A20804 | 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 be.mokarea.gcj.common;
public abstract class TestCase {
private final int caseNumber;
protected TestCase(int caseNumber) {
this.caseNumber = caseNumber;
}
public int getCaseNumber() {
return caseNumber;
}
}
|
A10793 | A11970 | 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) {
... | import java.util.*;
import java.io.*;
public class B {
public static void main(String []args){
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
int []result = new int[cases];
//input.nextLine();
for(int i = 0; i < cases ;i++){
int n = input.nextInt();
int s = input.nextInt();
... |
A21010 | A20974 | 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 probb;
import codejam.CodeJam;
public class Main extends CodeJam {
public static void main(String[] args) {
new Main() {
// Override the input file with the following: e.g. if the value is "large", then read "A-large.in" instead of the default
//@SuppressWarnings("unused")
//public static final S... |
B21790 | B22119 | 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 com.google.codejam.recycle;
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 tes... |
A10996 | A10713 | 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.util.*;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.text.DecimalFormat;
/**
*
*
*/
public class B {
public static void main(String[] args) {
try {
Scanner scanner = (new Scanner(new File("c:/input.txt")));
int N = s... |
B12082 | B11816 | 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... | /**
* Google CodeJam 2012
* Qualification round - Problem C
* Recycled Numbers
*
* Solved by Üllar Soon <positivew@gmail.com>
*/
package eu.positivew.codejam.recycled;
import java.io.BufferedReader;
import java.io.IOException;
import eu.positivew.codejam.framework.CodeJamInputCase;
import eu.positivew.codejam.... |
A21010 | A20183 | 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 codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
/*
import lib.tuple.Pair;
import lib.tuple.Tuple;
import lib.util.StringUtil;
*/
public class CodeJam2012RQB {
static final String fileIn = "/Users/jhorwitz/Documents/workspace/... |
B21752 | B20848 | 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 codezam.exercise.WR1C2012;
import java.util.HashMap;
import java.util.Map;
public class PairNumbers {
Map pairNumberMap = new HashMap();
public void put(String numberA, String numberB) {
String key = getKey(numberA, numberB);
pairNumberMap.put(key, new PairNumber(new Long(numberA).longValue(), new... |
B12074 | B11690 | 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.File;
import java.io.FileNotFoundException;
import java.util.Formatter;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers {
private static String solve(int A, int B) {
int count = 0;
final HashSet<Integer> seen = new HashSet<Integer>(10);
for (int n = A; n < B; n++... |
A10568 | A11041 | 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... | package fixjava;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Set;
/**
* Simple multimap class. <code>
MultiMap<String, String> map = MultiMapKeyToList.make();
map.put("a",... |
B21207 | B21529 | 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) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;
/**
*
* @author ÐиÑилл и Ðапа
*/
public class RecycledNumbers {
/**
* @param args the comma... |
A12113 | A10952 | 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.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ProblemOne {
public static void main(String[] args) throws Exception{
Reader reader = new Reader("A-small-attempt0.in");
Writer writer = new Writer("output.txt");
reader.open();
writer.open();
S... |
A20730 | A22703 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("B-large.in"));
String li;
int tcn = Integer... |
A12846 | A11742 | 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.google.code;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public abstract class GCJ {
private BufferedReader input;
private BufferedWriter output;
String inputLine;
String[] brokenU... |
B11421 | B10507 | 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 br.com.google.codejam.one.small;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class RecNumber {
public static void main(String[] args) {
try {
read... |
A22360 | A20955 | 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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int tc=Integ... |
A21557 | A21621 | 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) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test2;
import java.util.LinkedList;
/**
*
* @author Student
*/
public class Best {
public static LinkedList<Score> scores(int som) {
LinkedList<Score> res = new LinkedList<Score>();
int ... |
B10899 | B11829 | 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.Arrays;
import java.util.Scanner;
//Recycle
public class Main
{
public static void main(String[] args)
{
Main main = new Main();
main.run();
//main.checkRecycle(123, 233);
}
public void run()
{
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
f... |
A22191 | A22327 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Dancing_Googlers {
public static void main(String args[]) throws Exception
{
FileWriter ofstream = new FileWriter(... |
A21396 | A22630 | 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.io.*;
import java.util.*;
public class GoogleCount{
public GoogleCount(String line, int i, BufferedWriter out){
int count=0;
try {
// ArrayList<Goods> gooda = new ArrayList();
// TreeSet<Integer> goods = new TreeSet();
StringTokenizer token = new StringTokenizer(line);
out.write("Case #"+I... |
A20261 | A20506 | 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.*;
class Q2
{
public static void main(String str[])throws IOException
{
// FileReader fr=new FileReader("B-small-attempt0.in");
FileReader fr=new FileReader("B-large.in");
BufferedReader br=new BufferedReader(fr);
FileWriter fw=new FileWriter("ou... |
B13196 | B12984 | 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.io.Writer;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class ProblemC {
public static void main(String[] args) throws IOException {
new ProblemC();
}
private int numOfTest;
private static... |
B21227 | B21573 | 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 cj2012.qual;
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.TreeSet;
public class C {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(new File("in/C-large.in"));
int T = scan.nextInt();
PrintWriter out = new PrintWriter(n... |
A10996 | A10698 | 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);
... | package wwu.quals2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lib.tuple.Pair;
impor... |
B10485 | B12356 | 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.util.HashSet;
import java.util.Scanner;
/**
* @author Anil Kishore, India
*/
public class Qual_C
{
static int get(int x, int A, int B)
{
int r = 0;
String s =""+x;
HashSet<Integer> set = new HashSet<Integer>();
for(int i=1;i<s.length();i++)
if(s.charA... |
B21270 | B22173 | 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.nbarraille.gcj;
import java.io.IOException;
public class GCJ extends GCJHelper {
protected static final String TEST_CASE = "C-large"; // CHANGE THIS WHEN CHANGING PROBLEM
protected static final boolean RUN_ALL_CASES = true;
protected static final boolean DEBUG = true;
// DO WHATEVER TO SOLVE THE CAS... |
A22378 | A20971 | 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 dancing;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
File file = new File("B-large.in");
FileReader fr = new FileReader(file);
BufferedReader in = new Buffered... |
A10996 | A12937 | 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.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Dance {
private static final int[] maxBestResult = { 0, 1, 2 };
private static final int[] maxBestResultSurprise ... |
A20382 | A22630 | 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.*;
import java.util.*;
public class GoogleCount{
public GoogleCount(String line, int i, BufferedWriter out){
int count=0;
try {
// ArrayList<Goods> gooda = new ArrayList();
// TreeSet<Integer> goods = new TreeSet();
StringTokenizer token = new StringTokenizer(line);
out.write("Case #"+I... |
B10149 | B11081 | 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 fixjava;
public class ConcurrentCounter {
private int count = 0;
public synchronized int getAndIncrement() {
return count++;
}
} |
A22360 | A20623 | 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 static java.util.Arrays.deepToString;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class QB {
public static void main(String[] args) throws Exception
{
... |
B20006 | B21456 | 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.util.HashSet;
import java.util.Set;
/**
* Created with IntelliJ IDEA.
* User: Frederick
* Date: 4/14/12
* Time: 9:40 AM
* To change this template use File | Settings | File Templates.
*/
public class RecycledNumbers {
private static int solve(int a, int b) {
int count =... |
B10361 | B13220 | 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.Scanner;
public class NumberRecycling {
public static void main( String args[] ) {
new NumberRecycling();
}
public NumberRecycling() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for( int j=1; j<=T; j++ ) {
System.out.println( "Case #"+ j + ": " + doCase(sc) );
}
}... |
A21396 | A20190 | 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.*;
public class ProbB {
public static void main(String[] args) {
Scanner s = new Scanner(System.in).useDelimiter("\n");
int t = s.nextInt();
String[] lines = new String[t];
for(int i = 0; i < t; i++) {
lines[i] = s.next();
}
s.close();
for(int i = 0; i < t; i++) {
//... |
A22191 | A20683 | 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... | /*
* Google Code Challenge Java
*
* Code written for the Google Code Challenge by Greg Dougherty
* Created: May 7, 2011
*
* Copyright 2011 by Greg Dougherty
*/
package com.google.GregTD.CodeJam2012Quals.Dancing;
import java.io.*;
/**
* @author Greg Dougherty
*
*/
public class Dancing
{
private static ... |
A22992 | A21716 | 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.ArrayList;
import java.util.List;
import java.util.Scanner;
public class DancingWithTheGooglers {
private int calc(){
return 0;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int total = in.nextInt();
int totGooglers = 0;
int totStriplets = 0;
int... |
B10858 | B12851 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Main
{
public static HashMap<Character,Character> mapp = new... |
A22642 | A23025 | 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... |
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author dave
*/
public class Main {
public static void main(String g[]) {
char map[] = new char[300];
Scanner sc = new Scanner(System.in);
int t = Inte... |
A21557 | A22970 | 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.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author joshuahm
*/
public class codejamB {
public static void main(String[] args) throws FileNotFoundException, IOException {
FileReader inFile = ne... |
B20856 | B21700 | 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;
//... | package com.paupicas.year2012.codejam.qr;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class C {
public static void main(String[] args) throws Exception {
String filename = "C-large";
BufferedReader inputFile = new BufferedReader(new FileR... |
B10485 | B11281 | 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... | package com.google.codejam;
public class RecycledNumbers {
public int solve(int[] n){
int res = 0;
int len = getLen(n[0]);
int[] sh = new int[len-1];
for (int i = n[0]; i <= n[1]; i++) {
for (int j = 1; j < len; j++) {
int ni = shift(i, j, len);
sh[j-1] = ni;
if(ni > i && ni <= n[1]) {
bo... |
A10793 | A10881 | 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) {
... | import java.io.*;
public class ProblemB {
static int[] cycles;
public static void main(String [] args) throws Exception {
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().split(" ");... |
B12570 | B12063 | 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.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 ... |
A20382 | A20190 | 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.*;
public class ProbB {
public static void main(String[] args) {
Scanner s = new Scanner(System.in).useDelimiter("\n");
int t = s.nextInt();
String[] lines = new String[t];
for(int i = 0; i < t; i++) {
lines[i] = s.next();
}
s.close();
for(int i = 0; i < t; i++) {
//... |
B21968 | B21819 | 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.util.*;
public class Recycle {
public static void main(String[] args) {
Scanner br=new Scanner(System.in);
int test=br.nextInt();
int i,j,k,total=0,start,end,temp;
String s,t;
ArrayList<Integer> a=new ArrayList<Integer>();
for(i=0;i<test;i++)
{
start=br.nextInt();
end=br.nextIn... |
B20424 | B21678 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.util.Scanner;
import java.io.*;
public class Tobi
{
static String out="",output="";
public static void main(String[] args)
{
try
{
Scanner in = new Scanner(new File("file.in"));
int n = in.nextInt();
int count = 1;
String out =... |
B21968 | B22262 | 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.IOException;
class Round1C {
private int Case;
public Round1C(int Case, int A, int B) {
this.Case = Case;
int result = this.Computer(A, B);
this.outPut(result);
}
/*
* N±qA¨ìB
* §â¨CӼƦrN§@±ÛÂà«áªºµ²ªG¡A
* §PÂ_¡A¬O§_¤j©óN¥B¤p©óµ¥©óB
* ¬Oresult++
*
* */
private int Computer(in... |
B21270 | B21826 | 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.HashSet;
import java.util.Scanner;
import java.util.Set;
public class P03 {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
int t = inp.nextInt();
inp.nextLine();
int i = 1;
while (t > 0) {
int a = inp.nextInt();
int b = inp.nextInt();
System.out.pr... |
B20006 | B21084 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Vector;
public class Recycled {
public static void main(String[] args) throws FileNotFoundException {
Scanner in = new Scanner(new FileReader(new File("C-lar... |
B21790 | B20052 | 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.util.*;
import java.io.*;
import static java.lang.Math.*;
public class ProblemC {
static int numLength(int x)
{
int ans = 0;
while (x > 0)
{
ans ++;
x /= 10;
}
return ans;
}
public static void main(String[] args) throws FileNotFoundException {
Scanner fin = new Scanner(new File("C.... |
A11917 | A12537 | 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... | package googlecodejam;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
public class GoogleCodeJam {
public static int calcGooglers(int p, int s, int[] g) {
int avg = p*3;
int n = g.length;
int cont = 0;
for (int i = 0... |
A11277 | A11334 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import java.util.Vector;
public class Dancers {
private static final int P_MIN = 0;
... |
A11201 | A10378 | 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.... | /*
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... |
B10361 | B11428 | 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 codejam;
/**
*
* @author Suarabh Agarwal
*/
import java.io.*;
import java.util.Scanner;
public class Main3
{
public static void main(String args[])
{
try{
Scanner scan1 = new Scanner(new FileReader("... |
B21968 | B22204 | 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.irabin.google.codejam.problem3;
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 RecycledNumber {
private Scanner scanner;
private PrintWriter writer;
publ... |
B12570 | B11663 | 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 recycled;
import java.io.*;
import java.util.StringTokenizer;
import java.util.HashSet;
class Solucionar{
int buscar(String base, String techo){
int ret = 0;
HashSet<Integer> cjto = new HashSet<Integer>();
if ((base.length() == techo.length())||(base.length()==1)){
... |
B10361 | B10419 | 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.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class MainClass {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Scanner sc = new Scanner(new File("C-small-attempt0.in"));
Pri... |
B10485 | B11517 | 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... | /**
* Recycled Numbers
*/
package com.google.jam.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import j... |
B12115 | B12196 | 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();
... | package qualification;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class C {
private static abstract class Solver {
public abstract String solveCase(String input);
}
public static voi... |
A20490 | A20230 | 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.*;
import java.util.*;
import java.text.*;
public class Main implements Runnable{
/**
* @param args
*/
private StringTokenizer stReader;
private BufferedReader bufReader;
private PrintWriter out;
public static void main(String[] args) {
// TODO Auto-generated method stub
(new Main()).run()... |
B13196 | B12992 | 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 ... | package mgg.utils;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* @author manolo
* @date 13/04/12
*/
public class FileUtil {
FileReader reader;
FileWriter writer;
public FileUtil(String input, String output) {
try {
reader = ... |
A10699 | A11444 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Dancers {
public static void main(String[] args) throws FileNotFoundException
{
FileInputStream file = new FileInputStream... |
B10858 | B12513 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package codejam.qual_2012;
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;
public class MainC {
static boolean[] seen;
public static void main(String[] args) throws Exception {
String f = "/home/floris/dev/java/Test/src/codejam/qual_2012/C-small-attempt0.in";
Scanner sc... |
B22190 | B20512 | 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.HashSet;
import java.util.Scanner;
public class recycled {
public static void main(String[] args){
int t;
Scanner s = new Scanner(System.in);
t=s.nextInt();
for(int k=1;k<=t;k++){
int a,b;
a=s.nextInt();
b=s.nextInt();
int al=a/10,d=1;
while(al>0){
d++;
al/=10;
}
... |
B10858 | B10396 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package rotatematrix;
import java.io.*;
/**
*
* @author FARHAN
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws FileNotFoundExc... |
B12115 | B13077 | 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();
... | import java.io.*;
import java.util.*;
public class RecyledNumbers {
public static void main(String args[]) throws IOException{
Scanner scan=new Scanner(new File("C-small-attempt0.in"));
PrintWriter pw=new PrintWriter(new File("result.txt"));
int caseNum=Integer.parseInt(scan.nextLine());
for(... |
B20023 | B20325 | 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.*;
public class recycled
{
public static void main(String[] args)
{
try
{
FileReader fread = new FileReader(new File("C-large.in"));
BufferedReader br = new BufferedReader(fread);
FileWriter fwrite = new FileWriter(new File("output.txt"));
PrintWriter pw = new Prin... |
A22378 | A22295 | 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... | /*
* Program Name :- B.java
* Author :- Happy Mittal
* Created on 14 April, 2012
*
*
*/
package googlecodejam11;
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.... |
B12082 | B11241 | 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.util.List;
import java.util.Vector;
public class DataModel extends Thread {
class Data {
private int no;
private List<Integer> pairs;
public Data(int no) {
this.no = no;
pairs = new Vector<Integer>();
}
public void addToList(int no) {
pairs.add(no);
}
public int getPairs() {
... |
B11327 | B12055 | 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 com.google.codejam2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashMap;
import ja... |
A22191 | A20718 | 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.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T, N, S, p, t, y;
int[] min = new int[31];
int[] max = new int[31];
min[0] = max[0] = 0;
max[1] = 1;
int cont = 1;
for (int i = 1; i < 28; i+= 3) {
min[i] = min[i + 1] = min[... |
B13196 | B12355 | 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 ... | package com.wonyoung.codejam.qualificationround;
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 RecycledNumbers {
private Integer testCasesT;
private Recy... |
A22078 | A20693 | 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... |
/*
ID: codeKNIGHT
LANG: JAVA
TASK:
*/
import java.util.*;
import java.math.*;
import java.io.*;
class dancingWithGooglers
{
public static void main(String args[])throws IOException
{
//Scanner in=new Scanner(System.in);
Scanner in=new Scanner(new FileReader("C:\\Users\\Lokesh\\Desktop\\B-large... |
B21207 | B20737 | 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) ... | package fixjava;
public class IntegerMutable {
int value;
public IntegerMutable(int value) {
this.value = value;
}
public IntegerMutable() {
this(0);
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
/** Inc and return new value (threadsafe) */
p... |
B20291 | B21987 | 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.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author edemairy
*/
public class Main {
private final static Logger logger = Logger.getLogger(Main.class.getName());
pri... |
A12544 | A12942 | 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... | public class P {
public static void main(String[] arg) {
//greedyPossibleTuple(new int[] {29,20,8,18, 18,21},8,2);
//greedyPossibleTuple(new int[] {8,0}, 1,1);
//greedyPossibleTuple(new int[] {23, 22, 21, 20, 29}, 8, 0);
//System.out.println(parseLine("6 2 8 29 20 8 18 18 21"));
jav... |
A11277 | A10608 | 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 ... |
///REMOVE ALL OUTPUT AND USE STRINGTOKENIZER!
/*
ID: mfranzs1
LANG: JAVA
TASK: DancingWithTheGooglers
*/
import java.io.*;
import java.util.*;
public class DancingWithTheGooglers {
static BufferedReader f;
public static void main (String [] args) throws IOException {
long unixTime = System.currentTimeMillis();... |
B10858 | B12807 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package com.evolve.codejam2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
class Pair {
private... |
A22378 | A22370 | 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.Scanner;
public class Dance
{
public static void main(String[] args)
throws IOException
{
//new FileReader("dancing.in")
Scanner input = new Scanner(System.in);
int next = Integer.parseInt(input.nextLine());
// PrintWriter output = new PrintWriter(new Buffered... |
B20006 | B20440 | 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 {
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package a2012;
import java.util.*;
import java.io.*;
/**
*
* @author G
*/
public class C {
static int[] pot10=new int[]{1,10,100,1000,10000,100000,1000000,10000000};
static File home=new File("F:/Documents/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.