F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A12273 | A10949 | 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.... |
/**
* Write a description of class solver here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class solver
{
public int solve(int nog,int nos,int p,int t[])
{
int[] aux=new int[2*nog];
int i=0,count=0;
for(i=0;i<nog;i++)
{
if(t[i]==... |
A22078 | A21855 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.*;
import java.util.*;
import java.awt.Point;
import java.lang.Math;
class Case{
int num0,num1,num2,num3;
String result="";
public Case(File aFile) {
try{
StringBuilder contents = new StringBuilder();
BufferedReader input = new BufferedReader(new FileReader(aFile));
String line = input... |
B11318 | B13235 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
public class recyclednumbers {
public static void main(String [] args) throws Exception
{
BufferedReader reader = new BufferedReader (new FileReader("C:\\inputFile.txt"));
int number_of_TestCases = (int) Integer.parseInt(... |
B12669 | B12907 | 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 codejam;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Codejam {
static final Scanner keyboard = new Scanner(System.in);
public static void main(String[] args) {
int casos = Integer.parseInt(keyboard.nextLine());
for(int x=1; x<=casos;x++)
{
Stri... |
B11696 | B11716 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | public class Result {
public String output;
public int i;
public Result(int i) {
this.i = i;
}
@Override
public String toString() {
return "Case #"+i+": " + output;
}
}
|
A11277 | A11544 | 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 ... | package br.com.codejam.qualification;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class DancingWithGooglers {
public static void main(String[] args) throws IOException {
String file = "B-small-attempt3";
Scanner sc... |
B10155 | B12301 | 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 com.phonescreen;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
public class RecycledNumber {
private static int count;
public static void main(String[] args) {
try {
DataInputStream br = new DataInputStream(new BufferedInputSt... |
B12115 | B12740 | 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 es.saspelo.codejam.recyclednumbers;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import jav... |
B12074 | B13241 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | package codejam;
import java.io.*;
import java.util.Scanner;
public final class ReadWriteTextFile {
/** Constructor. */
ReadWriteTextFile(){
try {
out =new BufferedWriter(new FileWriter("output.in"));
scanner = new Scanner(new FileInputStre... |
B10245 | B13248 | 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.util.*;
public class C {
public static BufferedReader in;
public static StringTokenizer st;
public static void main(String[] args) throws IOException{
in = new BufferedReader(new FileReader("C.in"));
PrintWriter out = new PrintWriter(new FileWriter("C.out"));
int test = rea... |
B12074 | B11219 | 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.*;
import java.util.*;
public class ProblemC {
public static int recycles(int a, int min, int max) {
HashSet<Integer> history = new HashSet<Integer>();
int count = 0;
int size = ("" + a).length();
int power = (int)Math.pow(10, size - 1);
int value = a;
history.add(a);
for (int i = 0; i < siz... |
A12544 | A10737 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.util.*;
import java.io.*;
public class b{
public static int[] nums;
public static int[][] memo;
public static int p;
public static void main(String[] args) throws IOException{
Scanner br = new Scanner(new File("b.in"));
PrintWriter out = new PrintWriter(new File("b.out"));
int cases = br.nextInt()... |
A12846 | A10366 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithTheGooglers {
/**
* @param args
* @throws IOException
*/
public static void main(... |
B11421 | B10705 | 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 test.googlejam.year2012.jam;
import java.io.IOException;
import org.apache.commons.lang.StringUtils;
import test.googlejam.base.ProblemProcessor;
import test.googlejam.base.ValueReader;
public class RecycledNumbers extends ProblemProcessor
{
static java.util.Map<Integer, Integer> mapping = new java.util.T... |
B21752 | B21943 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.*;
class recycle
{
public static void main(String args[])throws Exception
{
FileReader R=new FileReader("input.txt");
PrintWriter W=new PrintWriter(new FileWriter("output.txt"));
BufferedReader ds=new BufferedReader(R);
long n=Long.parseLong(ds.readLine());
for(long j=1;j<=n;j++)
{
long ... |
A13029 | A11089 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.falidae;
import java.util.*;
import java.io.*;
/**
*
* @author LittleRock
*/
public class DancingWithTheGooglers {
public DancingWithTheGooglers() {
}
public void init() {
}
public... |
A22992 | A20184 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | package com.webcumo.tasks.b;
/**
* @author Cumo
*/
public class Worker {
public static String translateFromGooglereseToEnglish(String googlersString) {
int count;
int surprises;
int p;
String[] items = googlersString.split(" ");
count = Integer.parseInt(items[0]);
... |
B12082 | B12047 | 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.Scanner;
//"c:\Program Files\Java\jdk1.6.0_25\bin\javac.exe" a.java
//"c:\Program Files\Java\jdk1.6.0_25\bin\java.exe" a <test.in >test.out
public class C {
public static String meth1 (String s){
String res = "";
res=res+s;
return res;
}
//"c:\Program Files\Java\jdk1.6.0_25\bin\javac.... |
A22191 | A20982 | 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... | package fixjava;
import java.util.ArrayList;
import java.util.List;
public class Take<T> {
/** Return at most n items from the beginning of the Iterable. */
public static <T> ArrayList<T> head(Iterable<T> collection, int n) {
ArrayList<T> head = new ArrayList<T>();
int count = n;
if (n > 0)
for (T item : ... |
B11696 | B11828 | 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.text.*;
import java.io.*;
import java.util.*;
import java.lang.Math;
public class C
{
public static void main(String[] args) throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
int T = Integer.parseInt(br.readLine());
for(int t = 1; t <= ... |
A11201 | A10058 | 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.*;
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(" ");
... |
B11327 | B12425 | 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 hipotenusas;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<String> aparecidos= new ArrayList();
StringBuffer aux1;
StringBuffer aux2;
String aux;
int test= s... |
A12113 | A13077 | 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"... | 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) {... |
A13029 | A11857 | 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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
public class GCJB {
public static void main(String[] args) {
try {
FileReader in = new FileReader("./B-small-attempt1.in");
BufferedReader br = new Bu... |
B10858 | B13157 | 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.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... |
A12570 | A10354 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
impo... |
A20490 | A22470 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | package qualifier;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
public static void main(String args[]) throws IOException {
Scanner in = new Scanner(new File("B-large.in"));
PrintStream out = new PrintStream(new File("B-large.out"));
i... |
B11696 | B10034 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | package com.google.cj;
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;
import org.apache.log4j.Logger;
public class IOHandler {
private static Logger logger = Logger.get... |
B21790 | B20110 | 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.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
public class Recycled_Num {
public static void main(String[] args) {
//long currentTime = System.currentTimeMillis();
Scanner input_file = new Scanner(new InputStreamReader(System.in));
String input_line = null;
String[] nu... |
A10568 | A11899 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.*;
import java.util.*;
public class B{
public static ArrayList<Case> cases = new ArrayList<Case>();
public static void main (String [] args){
parseFile();
for(int i=0; i<cases.size(); i++){
//System.out.print(cases.get(i).n +" ");
//System.out.print(cases.get(i).s +" ");
//System.out.p... |
A12460 | A12913 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... | package com.menzus.gcj._2012.qualification.b;
import java.util.Iterator;
import com.menzus.gcj.common.InputBlockParser;
public class BInputBlockParser implements InputBlockParser<BInput> {
@Override
public BInput parseLineIterator(Iterator<String> lineIterator) {
String[] inputLineParts = lineIterator.next(... |
B10245 | B10202 | 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 gcj2012.qual;
import java.util.Arrays;
import common.AbstractRunner;
import common.AbstractRunner.SIZE;
public class C extends AbstractRunner {
@Override
public void handleCase(int caseNumber) throws Exception {
int A = scanner.nextInt();
int B = scanner.nextInt();
int pow = 1;
int n = 0;
... |
B11421 | B11459 | 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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
public class MainImpl {
public static int numberOfLine... |
B10899 | B10872 | 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 de.at.codejam.problem3;
public class Problem3Case {
private String numberA;
private String numberB;
public String getNumberA() {
return numberA;
}
public void setNumberA(String numberA) {
this.numberA = numberA;
}
public String getNumberB() {
return numberB;
}
public void setNumberB(String ... |
A11502 | A11710 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Googlers_Dance {
FileWriter fstream;
BufferedWriter out;
Googlers_Dance()
{
try
{
fstream = new FileWri... |
B21790 | B21169 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.common;
import java.util.ArrayList;
/**
*
* @author jim
*/
public class Input {
private final String[] header;
private final String[] data;
public Input(ArrayList<String>... |
B12085 | B12161 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Vector;
public class problemC {
Vector<String> lines = new Vector<String>();
public static void main(String[] arg) {
problemC pc = new problemC();
pc.lines = pc.readfile("C:... |
B10231 | B10354 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.File;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeMap;
/**
*
* @author Ben
*/
public class Main {
public static Scann... |
B10231 | B11293 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | package codejam2012;
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;
public class RecycledNumbers {
private boolean[] data;
private int min;
private int max;
private int digits;
private int mask;
public RecycledNumbers(int min, int max) {
this... |
B20734 | B22234 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.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) );
}
}... |
A22642 | A23055 | 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.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Googler implements Runnable {
int[] isSuprisingMaxScore = new int[31];
int[] isNotSuprisingMaxScore = ne... |
B10858 | B12639 | 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;
/**
*
* @author Yasura
*/
public class C {
public static void main(String[] args) {
Scanner scanInt = new Scanner(System.in);
int noOfCases = scanInt.nextInt();
int count, length, A, B, tmp, base, invBase;
for (int i = 0; i < noOfCases; i++) {
... |
A12544 | A10183 | 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 codejam;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class fileHandler {
FileInputStream input;
FileOutputStream output;
BufferedReader buf;
public... |
B10149 | B12562 | 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 gcjqual;
import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author g... |
A22078 | A21435 | 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 com.google.jam.eaque.stub;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import com.google.jam.eaque.qualif.b.Small;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
if (args.length != 2) {
System.out.println("args length :... |
B21227 | B21100 | 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 recyclednumbers;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class SimpleReader {
private BufferedReader br;
private int line = 0;
public SimpleReader() {
String filename = prompt();
setReader(filename);
}
public ... |
A11135 | A12290 | 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.util.*;
class QB{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int kase = sc.nextInt();
for(int k = 1; k<=kase; k++){
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt();
int[] tots = new int[N];
for(int i = 0; i<N; i++)tots[i] = sc.nextIn... |
A22360 | A21374 | 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.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class B {
static class State {
boolean surprising, not;
int max;
State(boolean S, boolean n, int mx) {
... |
B12085 | B12170 | 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 recycled;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
int[] count = new int[t];
for (int i = 0; i < t; i++) {
int a = scanner.nextInt();
... |
A10793 | A12421 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | package codejam2012;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import reusable.CodeJamBase;
public class DancingWithTheGooglers {
public static void main(String[] args) {
new CodeJamBase("B-small-attempt0") {
@Override
protected String solution() {
int[] input = ... |
A12273 | A12000 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... |
import codejam.StoreCredit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author java
*/
public class DancingGooglers {
static BufferedReader in;
private static void open() {
i... |
B10245 | B12015 | 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.util.*;
import java.math.*;
import java.text.*;
public class RecycledNumbers {
static final int INF = 1 << 28, MAX = 1000;
static final double EPS = 1E-9;
static int digits(int x) {
int d;
for (d = 0; x > 0; d++)
x /= 10;
return d;
}
static boolean recycled(int n, int ... |
B10361 | B10387 | 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.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Prob3 {
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException {
Scanner scan = new Sc... |
B13196 | B12708 | 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.FileNotFoundException;
import java.io.FileReader;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
public class RecycledNumbers {
public static int recycle(int source, int digits) {
int pow = (int) Math.pow(10, digits - 1);
int mod = source % 10;
... |
B21752 | B21904 | 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 com.dagova.recycledNumbers;
import java.util.TreeSet;
public class RecycledNumbersSolver
{
private static int solution;
private static int aNumber;
private static int bNumber;
public static int solve(String line)
{
solution = 0;
String[] splittedLine = line.split(" ");
aNumber = Integer.parse... |
B12669 | B12386 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.IOException;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
import java.util.Hashtable;
public class codejamb {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws Exception {
RandomAccessFile r = new RandomA... |
A10996 | A12535 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.*;
import java.util.*;
public class Googlers{
public static int t;
public int T;
public int S;
public int P;
public int [] ti;
public int y = 0;
public int [] v = new int[3];
public int check = 0;
public int checkS = 0;
public static void main(String[] args){
String [] parse = new String[... |
B10899 | B11987 | 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.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class RecycledPair{
public static ArrayList<String> pairsList;
public static void main(String[] args) throws Except... |
A22191 | A22700 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancing;
/**
*
* @author Serban
*/
public class Dancing {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic her... |
B21270 | B21886 | 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 codejam;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args ) throws Exception
{
String input = FileUtils.readFileToString(new File("/Users/adilme... |
B12085 | B10875 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | package de.at.codejam.problem3.util;
import de.at.codejam.problem3.Problem3Case;
import de.at.codejam.util.AbstractCaseSolver;
import de.at.codejam.util.TaskStatus;
public class Problem3CaseSolver extends AbstractCaseSolver<Problem3Case> {
@Override
public String solveCase(TaskStatus taskStatus, Problem3Case caseT... |
A22992 | A22636 | 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 b;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.text.AttributedCharacterIterator;
import java.util.Ar... |
B10245 | B10814 | 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.util.*;
class JamC
{
public static void main(String args[])throws Exception
{
FileReader fr = new FileReader("C-small-attempt0.in");
BufferedReader br = new BufferedReader(fr);
FileWriter fw= new FileWriter("out.txt");
BufferedWriter bw=new BufferedWriter(fw);
PrintWriter pw= new P... |
B10702 | B12742 | 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.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.TreeSet;
public class CJ_2012_Q_C {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new File("cj_files/in"));
FileWriter w = new FileWriter(new File("cj_fi... |
A22992 | A21650 | 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 de.johanneslauber.codejam;
import java.io.IOException;
/**
*
* @author Johannes Lauber - joh.lauber@googlemail.com
*
*/
public class Main {
/**
* @author Johannes Lauber - joh.lauber@googlemail.com
* @param Args
*/
public static void main(String[] Args) {
// solveProblem("input/A-small-practi... |
B20023 | B21455 | 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... | package codejam2012.qualification;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class RecycledNumbers {
// general part
private static final String INPUT = "src/main/resources";
private static final String OUTPUT = "target/output";
private static final String ROUND = "cod... |
A20730 | A23075 | 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.first;
public class MainClass {
/**
* @Author Nimitz
*/
public static void main(String[] args) {
// CodeJamSolution solution = new CodeJamSolution();
// ASpeakingInTongues solution = new ASpeakingInTongues();
BDancingWiththeGooglers solution = new BDancingWiththeGooglers();
}
}
|
A22360 | A22196 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import static java.lang.Math.abs;
public class B {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new FileReader("input.in"));
BufferedW... |
A12211 | A10165 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
/**
* @author Paul LaMotte
*
*/
public class GooglerDance {
public static void main(String[] args) {
Scanner in;
try {
System.setOut(new PrintStream(new File("qua... |
A22360 | A22689 | 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.IOException;
import java.util.ArrayList;
import java.util.List;
public class Second {
int surprises;
boolean isSurprisesLeft = false;
int min;
int[] scores;
int result;
public Second(String[] input) {
scores = new int[Integer.valueOf(input[0])];
surprises = Integer.valueOf(input[1]);
if... |
A22360 | A22114 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class DancingWithTheGooglers {
private static final String COMIENZO = "Case #";
private static final char ESPACIO = ' ';
public stati... |
B11696 | B10522 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
*
* @author Sagar
*/
public class Recycled_Numbers
{
Map m;
int no_of_test_cases = 0;
StringBuffer [] s... |
B12082 | B12445 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.io.BufferedInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void solve() throws Exception{
int T = in.readInt(),t = 0;
String format = "Case #%d: ";
... |
B20006 | B22158 | 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.vp.impl;
import java.util.HashSet;
import java.util.Set;
import com.vp.iface.Problem;
public class RecycledNumbers implements Problem {
private static int iUpperLimit;
private static int iLowerLimit;
private static int[] iVisited;
private static Set <String> removeDuplicates;
@Override
public St... |
A20934 | A21059 | 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 code.jam.y2012.quali;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class ProblemB {
private static String PATH = "F:\\dev\\projects\\code-jam-2012\\src\\code\\jam\\y2012\\quali";
File inputFile = new File(PATH, "B-large.in");
File outp... |
A20934 | A22501 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class B {
private static final String PROBLEM_NAME = "B-large";
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReade... |
A13029 | A12313 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
/**
* @author Andrey Zarubin
*/
public class Dancing {
public static void main(String... args) throws IOException {
String fileName = args[0... |
A20261 | A21413 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Observable;
import java.io.FileNotFoundException;
import java.io.IOExcep... |
B12115 | B10224 | 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.util.*;
import java.io.*;
public class C {
private static boolean checkRecycling2( String n, String m ){
String last;
String first;
int status = 0;
for( int pos=n.length()-1; pos>0; pos-- ){
last = n.substring(pos);
first = n.substring(0, pos);
//System.o... |
A11277 | A10471 | 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.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
scan.nextLine();
int c = 1;
while(scan.hasNextLine()) {
Scanner ls = new Scanner(scan.nextLine());
ls.nextInt();
int s = ls.nextInt();
int p = ls.nextInt();
... |
A11277 | A11648 | 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.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
public class LaDanceGoogler {
public static void main(String[] args) throws IOException {
Path input = Paths.get("/Users/mdymczyk/google-codejam/To... |
A13029 | A11427 | 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.util.Scanner;
public class B {
public static void main(String args[]){
Scanner scanner = new Scanner(System.in);
int testCount = scanner.nextInt();
for (int test = 1; test <= testCount; test++){
int numGooglers = scanner.nextInt();
int numSurprise = scann... |
B12074 | B11378 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.S... |
B12074 | B12960 | 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 google.loader;
public interface Challenge {
String getResult();
}
|
A22078 | A20104 | 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 my.codejam;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author "Dzianis Siarheyeu" <denser.by@gmail.com>
* ... |
B10231 | B11814 | 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... | /**
* Google CodeJam 2012
* Qualification round - Problem C
* Recycled Numbers
*
* Solved by Üllar Soon <positivew@gmail.com>
*/
package eu.positivew.codejam.recycled;
import java.io.File;
import java.util.ArrayList;
import eu.positivew.codejam.framework.CodeJamIO;
/**
* Recycled Numbers main class.
*
* ... |
B12762 | B11496 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package de.hg.codejam.tasks.io;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public abstract class Writer {
public static String generateOutputPath(String inputPath) {
return inputPath.substring(0, inputPath.lastIndexOf('.') + 1) + "out";
}
public static void print(Stri... |
A21557 | A21814 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Pb2 {
public static void main(String[] args) {
try {
PrintWriter writer = new PrintWriter("B-large.out");
BufferedReader reader = new BufferedReader(new File... |
B12762 | B10937 | 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 ... |
/**
* Name: Shivam99
* email: shivthedestroyer99@gmail.com
*/
import java.io.*;
public class ProblemC
{
public static void main(String[] args) throws IOException{
FileReader fr=new FileReader(args[0]);
BufferedReader br=new BufferedReader(fr);
String str=br.readLine();
int t=In... |
B20023 | B20584 | 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.ArrayList;
import java.util.List;
public class Problem_C {
public static void main(String[] args) throws IOException
{
String fileName = "C-large.in";
FileReader reader = new FileReader(fileName);
LineNumberReader lnrea... |
A10793 | A10583 | 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.File;
import java.io.FileReader;
import java.util.Scanner;
/**
*
* @author Gershom
*/
public class DancingWithGooglers {
public static void main(String[] args0) {
try {
File f = new File("example");
Scanner s = new Scanner(new FileReader(f));
int num... |
A12113 | A12642 | 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 jp.ne.sakura.yuki2006.CodeJam;
import java.util.Scanner;
public interface ITestCase {
public String testCase(Scanner stdIn);
}
|
B20734 | B21751 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | package qualification.p3;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
public class RecycledNumbers
{
private static void calculate( String testCase, BufferedWriter bw, int n ) throws Exception
{
... |
B12115 | B13113 | 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.vp.common;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;
import java.util.Scanner;
public class InputOutputProcessor {
private int numberOfCases;
private boolean doesInputHaveDataSetLines;
private int indexOfDataSetLine;
p... |
A11277 | A10344 | 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 ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package b;
import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;
/**
*
* @author Leo
*/
public class B {
public static void main(String[] args) throws Fi... |
B21227 | B20681 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class TestB {
private final static String DAT_PATH = "/Users/ttsurumi/Downloads/";
// private final static String dat = "A-sample-practice.in";
// private final stati... |
B10361 | B12137 | 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.*;
public class C
{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
String[] line;
for(int i=1;i<=T;i++)
{
line = br.readLine().split("\\W+");
int a = Inte... |
A11135 | A10996 | 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.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);
... |
A20382 | A20156 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
public class crazysolution {
/**
... |
B10149 | B11091 | 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;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.