F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B10899 | B11965 | 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.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
BufferedReader in;
StringTokenizer st;
PrintWriter out;
private String inFilename = "in.txt";
private String outFilename = "out.txt";
boolean can(int a, int b) {
String s1 = String.valueOf(a);
String s2 = String.val... |
B10155 | B11879 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | package recycling;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static int lint(int n){
if(n == 0)
return 0;
return 1 + lint(n / 10);
}
public static void permut(int[] tab){
int l = tab.length;
int temp = tab[l - 1];
for(int i = l ... |
B10245 | B10528 | 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... | package Practice;
import java.util.ArrayList;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int t = 1;
int a, b;
ArrayList<Integer>[] v = new ArrayList[2000010];
for (int i = 0; i < v.length; i++)
v[i] = ... |
B21207 | B21252 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Shell {
private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
private static final String ERROR = "Error!";
private static final ... |
A20490 | A20504 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Scanner;
public class Dancing {
public static void main(String[] args) throws IOException
{
String text = "";
String fileName = "/users/bestja/desktop/abc.txt";
... |
A20934 | A21146 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package competition;
/**
*
* @author Sriram
*/
import java.util.Scanner;
import java.io.FileInputStream;
import java.io.PrintStream;
public class DancingWithGooglers_GCJ_2012 {
public static void main(Stri... |
A20119 | A20713 | 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.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
class GoogleCo... |
B10245 | B11601 | 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.*;
import java.lang.*;
import java.util.*;
public class C {
public static void main(String[] args) {
C prob = new C();
prob.run(args[0]);
}
public void run(String fileName) {
try {
Scanner fin = new Scanner(new File(fileName));
PrintWriter fout = new PrintWriter(new File(f... |
B12085 | B10817 | 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 com.elbr.codejam2012.qualification.C;
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.net.URL;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
public c... |
B20291 | B22187 | 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.*;
import java.math.BigInteger;
import java.util.*;
public class GC {
String s = null;
String[] sp = null;
public void run() throws Exception{
BufferedReader br = new BufferedReader(new FileReader("C-large.in"));
BufferedWriter bw = new BufferedWriter(new FileWriter("OUTPUT.txt"));
... |
A10996 | A12839 | 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.util.Arrays;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("B-small-attempt0.in"));
String li;
int tcn ... |
A21010 | A20825 | 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 twentytwelve.qualification.b;
import java.util.Scanner;
public final class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();
for (int no = 1; no <= cases; no++) {
System.out.print("Ca... |
A21396 | A22877 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package com.google.codejam.googlers;
import java.util.List;
/**
* Main class used for DancingWithGooglers.
* @author Sushant
*/
public class DancingWithGooglers {
/**
* Main method from where application start execution.
*
* @param args String []
*/
public static void main(final String[... |
B10702 | B13157 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* Problem
Do you ever become frustrated with television because you keep seeing the same things, recycled over and over again? Well I personally don... |
B12115 | B11119 | 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 gcj2012;
import java.io.FileInputStream;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class C {
public static void main(String[] args) throws Exception {
new C().run();
}
void run() throws Exception {
Scanner in = new Scanner(System.in);... |
B12570 | B10733 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
public class Q3 {
private static void run(int CASE) throws Exception {
HashSet<String> countedSet = new HashSet<St... |
A21396 | A22545 | 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 dance {
public static void main(String[] args) throws IOException {
String filename="sample.txt";
FileInputStream fstream = new FileInputStream(filename);
DataInputStream in = new DataInputStream(fstream);
... |
A11502 | A11593 | 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 dancingwithgooglers;
import java.io.*;
/**
*
* @author Intellitech
*/
public class Main {
/**
* @param args the command line arguments
*/
public static int isGreat(long S, long total_scor... |
B21968 | B20020 | 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 problemC;
import java.io.IOException;
import java.util.HashSet;
import java.util.LinkedList;
import utils.InputReader;
public class SolverC {
public static void main(String[] args) throws IOException {
LinkedList<String> input = InputReader.read("C:/Users/Danielle/Desktop/C-small-attempt0.in");
int num ... |
B13196 | B12566 | 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 google;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;
public class Recycled
{
public static void main(String[] args) throws FileNotFoundException, IOException
{
IO.changeGoogleIO('C', 0);
Scanner input = new Scanner(System.in);
... |
B10149 | B13172 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
public class RecycledNumber {
private void solve(BufferedReader f, PrintWriter out) throws IOException {
int T = re... |
A12273 | A11836 | 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.... | public class QualBDancingWithTheGooglers
{
static boolean debug = false;
public static void main(String[] args)
{
Utils.openInFile("B-small-attempt0.in");
Utils.openOutFile("out.txt", debug);
String input = Utils.readFromFile();
int lineCount = Integer.parseInt(input);
//while (... |
B10858 | B11993 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class C {
C() {
Scanner in=new Scanner(System.in);
for (int T=in.nextInt(),TC=1; T-->0; ++TC) {
int A=in.nextInt(),B=in.nextInt();
int cnt=0;
for (int m=2; m<=B; ++m)
cnt+=count(A,m);
System.out.printf("Case #%d: %... |
A10568 | A12213 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancewithgoogle;
import java.util.*;
import java.io.*;
/**
*
* @author Aaron
*/
public class DanceWithGoogle {
/**
* @param args the command line arguments
*/
public static void main(Stri... |
B20424 | B20776 | 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 com.lewis.codeJamInJava;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.StringTokenizer;
/**
* @author patrick
*
*/
public class RecycledNumers {
/**
* @param args
*/
public static void main(S... |
A11135 | A10058 | 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.*;
public class Main {
public static void main(String[] args) throws Exception{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int cases=Integer.parseInt(in.readLine());
for(int i=1;i<=cases;i++)
{
String line = in.readLine();
String parts[] = line.split(" ");
... |
A20382 | A22545 | 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 dance {
public static void main(String[] args) throws IOException {
String filename="sample.txt";
FileInputStream fstream = new FileInputStream(filename);
DataInputStream in = new DataInputStream(fstream);
... |
B11327 | B10429 | 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 codejam;
import java.util.Hashtable;
public class RecycledNumbers {
@SuppressWarnings("unchecked")
Hashtable h1;
@SuppressWarnings("unchecked")
RecycledNumbers(){
h1 = new Hashtable();
}
@SuppressWarnings("unchecked")
long noOfPairs(long min, long max, long num){
String sMin = ""+min;
String sMax ... |
B12085 | B12780 | 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 gcj2012.Pre;
import java.util.*;
public class C {
static Scanner sc = new Scanner(System.in);
public static void main(String[] f){
long numCases = Long.parseLong(sc.nextLine());
for(long kase = 0 ; kase < numCases ; kase++){
String[] ss = sc.nextLine().split(" ");
int a = Integer.parseInt(ss[... |
A20934 | A21848 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | package dancingWithGooglers;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
public class OutputFile
{
public void writeFile(ArrayList<String> data) throws Exception
{
File file = new File("C:\\Users\\Nikhil\\Desktop\\googleCodeJam\\output.txt");
Bu... |
A22771 | A21801 | 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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.StringTokenizer;
public class Dancers {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new FileReader(new File(... |
A20261 | A21281 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public class DancingGooglers {
public DancingGooglers() {
Integer maxInputs;
String line;
Integer output;
Integer N, S, p;
try {
BufferedReader... |
A20261 | A20659 | 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 Main{
String inputFile = "B-large.in";
PrintStream output;
Scanner fileScanner;
int outputLine = 0;
double start = System.currentTimeMillis();
public Main(){
newCodeJam();
fileScanner.nextLine();
while (fileScanner.ha... |
B20566 | B21658 | 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 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... |
B10361 | B11364 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | package com.jagsaund.codejam.qualifcation;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
public class RecycledNumbers {
public RecycledNumbers() {
}
public String run(String line) {
int m;
... |
A12211 | A12637 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class jam {
public static void main(String args[])
{
ArrayList<String> inp=read_fil("D:\\googl... |
A22992 | A20841 | 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.*;
import static java.lang.Math.*;
public class Bsmall {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
//````````````````````````````````````````````````````````````````````
// Read in how many cases there will be, and print a new line
int T = input.nextInt(... |
A20490 | A21293 | 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... |
public class DeTerminator {
public DeTerminator(){ }
public int determine(String[] inputArray){
int numGooglers = Integer.parseInt(inputArray[0]);
int allowableSurprising = Integer.parseInt(inputArray[1]);
int bestScore = Integer.parseInt(inputArray[2]);
int surprising = 0;
int notSurprising = 0;
int ... |
A22360 | A22280 | 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 ... |
public class possible {
int Anom;
int High;
int count = 0;
possible(int anom, int high){
Anom = anom;
High = high;
}
public void canDo(int score){
int Score = score;
if(High > 0 && Score - High - (2 * (High- 1 )) >= 0){
++count;
}else if( Anom > 0 && High > 1 && Score - High - (2 * (High-... |
B11421 | B11476 | 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... | import java.util.Scanner;
import java.io.*;
public class Google2 {
public static void main(String[] args) throws IOException {
Scanner kb = new Scanner(new File("c:/A-small-attempt0.in"));
// Scanner kb = new Scanner(System.in);
int num = kb.nextInt();
for (int i = 0; i < num; i++) {
int a = kb.... |
A22992 | A22777 | 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 lt.kasrud.gcj.ex2;
import lt.kasrud.gcj.common.io.Reader;
import lt.kasrud.gcj.common.io.Writer;
import java.io.IOException;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
List<String> iData = Reader.readFile("B-large.in");
Writer.writeFile("out2... |
B10899 | B11640 | 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;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) throws IOException
{
Scanner scan... |
B12115 | B11039 | 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 qual2012;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
//PrintWriter out = new PrintWriter(System.out);
Pr... |
A22078 | A21038 | 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... | package qualification;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class ProblemB {
/**
* @param args
*/
public static String input = "B-large.in";
public static void main(String[] args) throws IOException {
/... |
A22771 | A22619 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class B {
public void func(){
Scanner in=null;
try {
in = new Scanner(new File("input.txt"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
int no = in.nextInt();
for(int i=0;i<no;++i){... |
A22992 | A22128 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
public class R1Q2 {
public static HashMap<String, String> wor... |
B10149 | B11484 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class C {
private void solve() throws IOException {
int T = nextInt();
while (T-- > 0) {
int A = nextInt()... |
B10149 | B11991 | 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 =... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googleJamCode2;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.*;
/**
*
* @author gollum1er
*/
public class Permutation {
... |
B21790 | B20647 | 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 codejam;
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.io.PrintWriter;
public abstract class Task {
private String inputFileName;
private BufferedReader in;
private PrintWrit... |
A10699 | A10936 | 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) ... |
public class ProblemB {
public static int[] generateTriplet(int totalScore)
{
int third = totalScore/3;
int[] triplet = new int[3];
int total = 0;
int i = 0;
triplet[0] = third;
triplet[1] = third;
triplet[2] = third;
total = third*3;
while(total < totalScore)
{
triplet[i] += 1;
... |
A12113 | A12852 | 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"... | package com.techy.rajeev;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingGame2 {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Buffe... |
A22191 | A22703 | 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.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... |
A12113 | A12589 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.StringTokenizer;
import java.util.Hashtable;
import java.util.Arrays;
class Triplet {
public int first;
public int second;
public int third;
public Triplet(int one, int two, int three) {
first = one;
second... |
A21010 | A21486 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class dancers {
public static void main(String[] args) throws FileNotFoundException {
File myFile = new File ("E:/GoogleIn.txt");
Scanner inFile = new Scanner (myFile);
... |
A22771 | A21118 | 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.*;
public class BSmall {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new File("B-Large.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("B-Large.out")));
int T = Integer.parseInt(in.nextLine());
for (int... |
B12115 | B12965 | 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 com.code.jam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
imp... |
A22771 | A20785 | 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.FileReader;
import java.io.PrintStream;
/**
*
* @author peterboyen
*/
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("/Users/peterboyen/Downloads/B-large... |
B10245 | B12115 | 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... | 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();
... |
B12082 | B11243 | 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 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;
//... |
A20119 | A21859 | 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 gs.taral.gcj2012;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
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 Dancing {
public static void main(String[] args)... |
B10702 | B12474 | 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 codejam.common;
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 AbstractProblemSolver<P, S> {
public void solve(File input, File output) {
try (BufferedReader reader =... |
A11502 | A11152 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
*
* @author ZIYAN
*/
public class Codejam2 {
/**
* @param args the command line arguments
*/
public static void main(Stri... |
A22360 | A22987 | 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.FileInputStream;
import java.io.InputStreamReader;
public class DancingWithTheGooglers {
public static void main(String[] args) {
try {
//int T = 4;
//int[][] testcases = new int[T][];
// testcases[0] = new int[]{3,1,5,15,13,11};
// testcases[1] = new... |
A10699 | A13128 | 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 dancingwiththegooglers.codejam;
import java.util.Scanner;
public class Case {
String str;
int n, s, p;
int[] t;
Case(Scanner in){
n = in.nextInt();
s = in.nextInt();
p = in.nextInt();
t = new int[n];
for (int i=0; i<n;i++){
t[i] = in.nextInt();
}
}
public String solve(){
int y = 0;
... |
A20382 | A20490 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | /**
*
*/
package 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... |
B21790 | B20535 | 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 br.com.softctrl.code.c;
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.Reader;
import java.io.Writer;
/**
* @author timoshenko... |
B10361 | B11163 | 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;
import java.util.TreeSet;
public class RecycledNumbers {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int numCases = s.nextInt();
s.nextLine();
for (int i = 0; i < numCases; i++) {
TreeSet<Integer> found = new TreeSet<>();
int count = 0;
in... |
B12074 | B10331 | 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 ProblemC;
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 Common {
static String filename="C:\\eclipse-jee-indigo-SR2-win32\\eclipse\\projects\\goole... |
B12570 | B11329 | 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 recycledNumbers;
import java.util.ArrayList;
public class test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int a = 1111;
int b = 2222;
int result = 0;
for(int i=a;i<b+1;i++){
ArrayList<Integer> number = new ArrayList<Integer>();
Ar... |
B12570 | B11464 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
/*********************************************************************
* FileUtils class of static constants and basic file checking routines.
* This is the header file of constants and methods that might... |
A21010 | A20833 | 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 qualification;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Scanner;
public class Task2 {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(new FileInputStream("task21.txt"));
int T = scanner.nextInt();
for (... |
B21968 | B21731 | 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 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-large.in";
Scanner sc = new Sc... |
B11421 | B12070 | 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 jp.funnything.prototype;
import java.io.File;
import java.io.IOException;
import java.util.Set;
import jp.funnything.competition.util.CompetitionIO;
import jp.funnything.competition.util.Packer;
import org.apache.commons.io.FileUtils;
import com.google.common.collect.Sets;
public class Runner {
public ... |
B11327 | B10832 | 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.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.Collections;
import java.util.LinkedHashSet;
import java.util.List;
public class ProblemB {
private static List<Integer> digits100(i... |
A12113 | A11364 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class qualB {
public static void main(String[] args) {
String prblm="B"; boolean fl=!true;
String filein=prblm+"-"+((fl)?"large":"small")+".in.txt";
String fileout=prblm+"-"+((fl)?"large":"... |
A21396 | A20895 | 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.Scanner;
import java.util.StringTokenizer;
public class DancingWiththeGooglers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in =new Scanner(System.in);
int cases=Integer.parseInt(in.nextLine())+1;
for(int tt=1;tt<cases;tt++)... |
B21049 | B21584 | 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... | package com.gnooo;
import java.util.HashMap;
import java.util.Scanner;
public class Solution {
static final boolean DBG = false;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
long dStart = System.currentTimeMillis();
StringBuilder sb = new StringBuild... |
A12211 | A11692 | 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... | package dg.gcj.bdancing;
import java.util.ArrayList;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: Dmitry
* Date: 14.04.12
* Time: 23:30
* To change this template use File | Settings | File Templates.
*/
public class Solver {
private PossibleCombinations possibleCombinations = new Possible... |
A12544 | A11965 | 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 cj2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class CJ2012QB {
public static void main(String[] args) {
BufferedReader bf = null;
BufferedWriter bw = nul... |
B10245 | B11599 | 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... | package codeJam;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class RecycledNumbers {
private static int inputLength = 1;
/**
* @param args the command ... |
A11201 | A11514 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class jammo {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-genera... |
A22078 | A21520 | 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... | package ru.sidorkevich.google.jam.qualification.b;
import java.util.List;
public class Task {
int n;
int s;
int p;
List<Integer> t;
public Task(int n, int s, int p, List<Integer> t) {
this.n = n;
this.s = s;
this.p = p;
this.t = t;
}
public int getN() {
... |
A20730 | A22107 | 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... | package com.google.codejam;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class GooglerDanceSolver {
public static int getMaximumPassCount(int passScore, int surpriseCount, List<Integer> scores) {
int passCount = 0;
int lowerBound = (passScore > 1) ? 3 * passScore - 4 : pa... |
B10149 | B11720 | 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 codejam.network172.com;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.LinkedList;
public class CodeJam {
public static void main(String[] args) {
try {
B... |
B21207 | B21864 | 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 gcj12;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class C {
void solve() {
Scanner scan = new Scanner(System.in);
int tCase = scan.nextInt();
for (int i = 1; i <= tCase; i++) {
int res = 0;
int a = scan.nextInt();
... |
B20006 | B22261 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | package com.eevoskos.codejam;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
private static final boolean DEBUG = false;
public static void main(String... args) {
RecycledNumbers instance = new RecycledNumbers();
... |
A20382 | A20895 | 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.Scanner;
import java.util.StringTokenizer;
public class DancingWiththeGooglers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in =new Scanner(System.in);
int cases=Integer.parseInt(in.nextLine())+1;
for(int tt=1;tt<cases;tt++)... |
B12669 | B11847 | 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.... | package info.m3o.gcj2012.recyclednumber;
import java.util.ArrayList;
import java.util.List;
public class RawInputLines_NotUsed {
protected List<String> rawInputLines;
public List<String> getRawInputLines() {
if (rawInputLines == null) {
rawInputLines = new ArrayList<String>();
}
... |
A11502 | A11647 | 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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
public class B {
private static CodeJamIO io = new CodeJamIO();
/**
* @param args
*/
public static void main(Strin... |
B12762 | B11370 | 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.*;
public class C {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int T;
T = Integer.parseInt(reader.readLine());
for (int i = 1; i <= T; i++) {
String[] input = reader.rea... |
B20424 | B21922 | 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.io.*;
import java.util.*;
import java.math.*;
/** @author Samuel Ahn */
public class C {
public static void main(String args[]) throws Exception {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for (int i = 1; i <= T; i++) {
int A = in.nextInt();
int B = in.nextInt();
int sum... |
A12846 | A12155 | 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.*;
import java.util.*;
import java.lang.*;
public class problemB
{
public static void main(String args[])throws Exception
{
Scanner cin=new Scanner(System.in);
int numcases = cin.nextInt();
int N,S,P,T;
double avg,s;
int v;
for(int i=0;i<numcases;i+... |
B10899 | B12635 | 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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
public class Pairs {
public static void main(String[] args) throws Exception {
BufferedReader fis = new BufferedReader(new FileReader(
new File("input")));
String numCasesStr = fis.readLine();
int nu... |
A10793 | A10799 | 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.Scanner;
import java.io.*;
public class B{
public static int calculate(String str){
String[] numbers = str.split(" ");
int googlers = Integer.parseInt(numbers[0]);
int surprising = Integer.parseInt(numbers[1]);
int p = Integer.parseInt(numbers[2]);
int loc = 3;
int ret = 0;
for(int i ... |
A12273 | A10895 | 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 codejam;
import codejam.y11.round0.CandySplitting;
import codejam.y12.round0.DancingGooglers;
import codejam.y12.round0.SpeakingInTongues;
import utils.Jam;
/**
*
* @author Fabien Renaud
*/
public class MainEntryPoint {
public static void main(String[] args) {
Jam j = new DancingGooglers("/home/fabie... |
A22771 | A21161 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Buffe... |
A13029 | A11394 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... |
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;
import javax.imageio.IIOException;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author abood
*/
public class proba {
public static void main(String[] args) throws IIOEx... |
B10231 | B11956 | 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.text.NumberFormat;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;
public class Problem3 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int lineNo = scan.nextInt();
for(int i = 0 ... |
B12085 | B10503 | 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 year2012.RecycledNumbers;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
final class RecycledNumbers {
/**
* @param args
* @throws IOException
*/
static int solve(i... |
B11327 | B12054 | 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]);
}
}
}
| /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.*;
/**
*
* @author Nah-Abiah
*/
public class recycledNumbers {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
try{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.