F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A11277 | A12318 | 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.atama.google.jam.dancing;
public class ScoreCalculator {
private final Show show;
public ScoreCalculator(int numSurprises, int scoreThreshold,
int[] totalScores) {
Context.INSTANCE.setNumSurprises(numSurprises);
Context.INSTANCE.setThreshold(scoreThreshold);
show = new Show(totalScores);
... |
B10361 | B11243 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package 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;
//... |
A20382 | A21436 | 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 com.google.jam.eaque.stub;
public class Util {
private Util() {
}
public static long[] stringsToLongs(String[] strings)
{
long[] res = new long[strings.length];
for (int i = 0; i < strings.length; i++) {
res[i] = Long.parseLong(strings[i]);
}
return res;
}
}
|
B10245 | B11315 | 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.util.Scanner;
public class code13 {
public static boolean recheck(int n, int m){
int length= String.valueOf(m).length();
boolean answer=false;
for(int j=0;j<length;j++){ int r=(int)Math.pow(10,j);
int e=(int) Math.pow(10,length-j); int p=n/r; int k=n%r;
int x= k*e; int y=... |
B10485 | B13161 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | package org.weiwei.recyclenumber;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Created with IntelliJ IDEA.
* User: ding
* Date: 12-4-14
* Time: ä¸å1:57
* To change this template use File | Settings | File Templates.
*/
public class Fi... |
B12082 | B10045 | 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... |
package codejam;
import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
/**
*
* @author Ronak
*/
public class C {
public static void main(String[] args) throws FileNotFoundException, IOException {
File f = new File("C-small-attempt1.in");
Fi... |
B13196 | B11279 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package com.google.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
public class Utils {
static final Strin... |
A11917 | A12997 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | package qualification.common;
import java.io.*;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 17:21
* To change this template use File | Settings | File Templates.
*/
public class InputReader {
public static String[] getInputLines(String filename){
String[] input = null;... |
B12570 | B12176 | 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... | /**
*
* @author Tag
*/
/*
* Given integers A and B with the same number of digits and no leading zeros, how many distinct recycled pairs (n, m) are there with A ⤠n < m ⤠B?
* Input
* The first line of the input gives the number of test cases, T. T test cases follow. Each test case consists of a single line ... |
A11917 | A11198 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | import java.io.File;
import java.util.*;
public class ProblemB {
public static void main(String[] args) throws Exception {
// Scanner sc = new Scanner(new File("C:\\B-small-attempt0.in"));
Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine().trim());
for (int i = 0; i < cases; i++... |
A10568 | A12699 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package GoogleDance;
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.Arrays;
import java.util.Scanner;
public class GoogleDance {
/**
* @param args
*/
public static void... |
A12460 | A11669 | 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... |
public class testCase {
public testCase(int n){
T = n;
cases = new String[T];
count=0;
}
public void addCase(String s){
if(count > T-1){
System.out.println("STOP ! too many test cases !!");
return;
}
cases[count++] = s;
}
int count;
int T;
String[] cases;
}
|
A20934 | A20588 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | import java.io.File;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.util.Scanner;
public final class GoogleDanceJudge {
public static enum TripletType {
INVALID,
USUAL,
SURPRISING
};
public static TripletType findResultType (final int resultsSum, final int bestResult) {
... |
A22771 | A20521 | 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.util.*;
import java.io.*;
public class DancingGooglers {
private static int numTest;
private static Scanner input;
private static PrintWriter output;
public static void main(String[] args) throws FileNotFoundException, IOException {
// Initialization of Input/Output streams
input = new Scanner... |
A13029 | A11105 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class GoogleDancers {
public Triplet findAddFactors(int n) {
int m = n / 3;
if (m==0)
return new... |
B12669 | B12264 | 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.*;
import java.util.*;
class ProblemC
{
public static void main(String[] args)
{
try{
// Open the file that is the first
// command line parameter
FileInputStream fstream = new FileInputStream("input.txt");
BufferedWriter out = new BufferedWriter(new FileWriter("output.txt"));
// G... |
B11318 | B12238 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlerecyclenum;
import java.util.*;
import java.io.*;
/**
*
* @author Aaron
*/
public class GoogleRecycleNum {
/**
* @param args the command line arguments
*/
public static void main(Str... |
B10858 | B10240 | 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.*;
public class RecycledNumbers {
public static void main(String[] args) {
BufferedReader reader = null;
PrintWriter writer = null;
try {
reader = new BufferedReader(new FileReader(new File("src/C-small-attempt0.in")));
writer = new PrintWriter(new B... |
B20566 | B21250 | 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 + "";
... | import java.util.*;
import java.io.*;
import java.text.*;
public class Q {
private static long solve(int from, int to) {
int[] flag = new int[2000001];
long res = 0;
int t=from/10, b = 1;
while (t>0) {
b*=10;t/=10;
}
for (int i = from; i < to; ++i) {
t = i;
do {
t = (t /10) + (t%10 * b);
... |
A11277 | A11671 | 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 qualifiers12.b;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public clas... |
A12846 | A10119 | 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.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
/**
* Date: 14/4/12
* Time: 10:43 AM
*/
public class ProblemB {
public static void main(String[] args) throws IOException {
ArrayList<String> al = GoogleFileStream.get... |
A20261 | A21086 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | package _2012.QualificationRound.B;
import java.util.ArrayList;
import Utils.InputFile;
import Utils.OutputFile;
public class B {
private static void solve(InputFile inputFile, OutputFile outputFile){
int nbCases = Integer.parseInt(inputFile.getNextLine());
for(int caseNumber = 0; caseNumber < nb... |
B12085 | B11106 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.util.TreeSet;
public class SolveThread implements Runnable{
private TreeSet<Integer> nbs;
int pairs = 0, casenb;
private ThreadDispatcher td;
private int A, B;
public SolveThread(int A, int B, int casenb, ThreadDispatcher td){
nbs = new TreeSet<Integer>();
this.A = A;
this.B = B;
for(int ... |
B22190 | B20404 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
public class RecycledNumbers {
public static void main(String[] args) throws Exception {
int i,j,k;
int A, B;
int L;
String first, second, secondNoLeadingZeros;
... |
B21968 | B20813 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
public class C {
public static void main(String[] args... |
A11135 | A11991 | 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.*;
import java.io.*;
public class Main {
final static String FNAME = "A-small-practice";
public BufferedReader in;
public PrintWriter out;
static char[][] map = new char[2][26];
void open() throws IOException {
in = new BufferedReader( new FileReader( new File( FNAME + ".in" ) ) );
ou... |
A11277 | A12105 | 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 Googlers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.LinkedList;
import java.util.Scanner;
import exoD.Ray;
public class googlers {
static void print(int nbCases, int N, int S, int P, int[] T) {
System.out.print(N + " ");
System.out.print(S + " ");
System.out.print(P)... |
A11502 | A13039 | 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... | /*
* Patrick Bonnell
* Google Code Jam 2012
* Qualification Round
* Dancing With the Googlers
*/
import java.io.*;
import java.util.*;
public class DancingSolution
{
String filename;
Case[] cases;
private class Case
{
int s, p;
int totals[];
public Case(int n, int s, int p)
{
totals = new i... |
A20119 | A21143 | 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.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
int caseNum = 0;
while(caseNum++<T){
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt();
int[] t = new int[n];
for(int i=0; i<n; i+... |
A11201 | A10362 | 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.util.*;
import java.io.*;
import java.math.*;
import java.awt.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Double.parseDouble;
import static java.lang.Long.parseLong;
import static java.lang.System.*;
import static java.util.Arrays.*;
import static jav... |
B12085 | B10484 | 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... | /*
ID: yourID
LANG: JAVA
TASK: Recycled_Numbers
*/
import java.io.*;
import java.math.*;
import java.util.*;
/*public class Recycled_Numbers {
}
*/
public class Recycled_Numbers implements Runnable {
// based on Petr's template
boolean localDebug = false;
private void solve() throws IOException {
int a = this.n... |
A12273 | A11143 | 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.... | // Problem B
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.Scanner;
public class B {
private void processInput() throws IOException {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for (int testCase = 1; testCase <= T;... |
A12846 | A12854 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication3;
import java.io.*;
import java.math.*;
import java.util.*;
public class Dance {
public static final String INPUT = "dance";
@SuppressWarnings("unchecked")
private static void solv... |
B11318 | B13068 | 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.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Parser {
private Scanner sc;
private int ncases;
private int curcase;
public Parser(String inputFile) t... |
B21968 | B20715 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.util.Scanner;
class recycled{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
int t,i,n,m,a,b,o,f=0,c=0,ca=1;
t=s.nextInt();
for(i=1;i<=t;i++)
{
a=s.nextInt();
b=s.nextInt();
for(n=a;n<b;n++)
{
String str=Integer.toString(n);
int l=str.length();
f=rep(str,l,b);
if(f==1)
c--;
for(o... |
B20734 | B22039 | 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 lt.kasrud.gcj.ex3;
import lt.kasrud.gcj.common.IO;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class Main {
public static void main(String[] args) throws IOException {
IO.Data data = IO.readFile("C-large.in");
... |
A10568 | A12189 | 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.util.StringTokenizer;
public class DancingWithTheGooglers {
public static int Solve(String q) {
StringTokenizer st = new StringTokenizer(q, " ");
int n = Integer.parseInt(st.nextToken());
int s = Integer.parseInt(st.nextToken());
int p = Integer.parseInt(st.nextToken());
int t;
int d;
int r... |
B11318 | B12725 | 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.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class CodeJamQ3 {
public static String[] read(final String name) throws IOException {
final InputStreamReader reader = new FileReader(new Fil... |
A11917 | A10960 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | package main;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader... |
A20934 | A20493 | 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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class Dance {
private int[][] inputFin;
private int Ar... |
B22190 | B20527 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | package com.codejam.twelve;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
public class ProbC {
public static void main(String[] args) throws IOException {
FileReader... |
A10996 | A10413 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | package codjam;
import java.util.*;
public class DancingWithTheGooglers {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for (int k = 1; k <= T; k++) {
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int c = 0... |
A22771 | A20028 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | package uk.ac.cam.rio22.problemB;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
public class ProblemB {
public static void main (String[] args) throws NumberFormatException, IO... |
B10858 | B11220 | 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.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.*;
public class jam3 {
/**
* @param args
*/
static int chuli(String s)
{
in... |
A10699 | A11978 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new FileReader("B-small-attempt0.in"));
PrintWriter out = new PrintWriter(new FileWriter("DancingWithTheGooglers-Small.out"));
DancingWithTheGoogle... |
A12846 | A11765 | 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.IOException;
import java.io.InputStreamReader;
public class Shell {
private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
private static final String ERROR = "Error!";
private static final String ERROR_INVALID_INT =
... |
B10485 | B13153 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
public class RecycledNumbers {
int A;
int B;
int count = 0;
List pairs = new ArrayList<String>();
public static void main(String[] args) {
int T;
Buffer... |
B11318 | B12592 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | package googlers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Mainclass {
String line[];
int bv=1;
Mainclass(){
line=new String[50];
F... |
B21207 | B21442 | 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 jp.funnything.competition.util;
import java.util.Arrays;
import java.util.Iterator;
/**
* Do NOT change the element in iteration
*/
public class Permutation implements Iterable< int[] > , Iterator< int[] > {
public static int[] fromNumber( long value , final int n ) {
final int[] data = new int[... |
A20261 | A22650 | 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.text.Format;
import java.util.Formatter;
import java.util.List;
import java.util.Set;
import java.util.HashSet;
import java.util.ArrayList;
import java.math.*;
public class Dancing {
static public String getContents(File aFile) {
//...checks on aFile are elided
Stri... |
B12082 | B11204 | 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... |
package gcj;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.HashMap;
import java.util.Scanner;
/**
*
* @author Mervin.Lavin
*/
public class Gcj
{
public static void main
(String[] args)
throws Exception
{
doProb3( "C-small-attempt1... |
A22078 | A21978 | 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 qual;
import java.util.Arrays;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) {
new DancingWithTheGooglers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int testcase = 0; testcase < T; testca... |
B10702 | B12918 | 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 com.google.code.p_c;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Main {
private static final String fromFile = "D:\\hobbies & work\\programing\\CodeJamT... |
A12273 | A11326 | 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 codejam2012.r0;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
/**
* @author julian
*/
public class B {
public static final void main(String[] args) throws IOException {
(ne... |
B10361 | B10979 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
public class recycled {
public static void main(String[] args) throws IOException
{
BufferedReader in = new BufferedRe... |
A20934 | A23054 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;
public class DancingGooglers {
/**
* @param arg... |
B10361 | B13209 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
public class RecycledNumbers {
private static int lowRange = 0, highRange = 0;
private static ArrayList<Integer> list = null;
private ... |
B12762 | B10999 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.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... |
B12669 | B10960 | 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.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class Recycle {
public static void main(String[] args) throws FileNotFoundException {
Scann... |
A22378 | A21550 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.io.*;
import java.util.*;
public class Googlers {
public static int surprise = 0;
public static int beatTarget = 0;
public static boolean bestScore(int totalScore, int targetScore) {
int bestNoSurprise = (int) Math.ceil(totalScore/3.0);
// If this googler beat the target score
if(bestNoSu... |
B11327 | B12098 | 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 util;
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 MyUtil {
public static BufferedReader getReader(String filename){
try {
return new BufferedReader(ne... |
A20934 | A22382 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithTheGooglers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws... |
A22642 | A21351 | 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.PrintWriter;
import java.util.Scanner;
public class Codejam {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner inFile = null;
PrintWriter outFile = null;
inFile = FileUtils.ScannerOpen("zin");
outFile = FileUtils.PrintWri... |
A22191 | A20602 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static File input;
public static FileR... |
A11201 | A12663 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
public class B {
/**
* @param args
*/
public static String rest(ArrayList<String> list)
{
String n = list.get(0);
list.remove(0);
retu... |
A12273 | A12433 | 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.dancingwiththegooglers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import codejam.common.AbstractProblemSolver;
public class DancingScoresProblemSolver extends
AbstractProblemSolver<DancingScores, Integer> {
@Override
public Dan... |
B12941 | B10884 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | package de.at.codejam.util;
public interface StatusListener {
public static final int LOGLEVEL_TRACE = 4;
public static final int LOGLEVEL_INFO = 3;
public static final int LOGLEVEL_WARN = 2;
public static final int LOGLEVEL_ERROR = 1;
void updateStatus(TaskStatus taskStatus);
void log(int logLevel, String me... |
B12570 | B11096 | 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.IOException;
import java.util.Scanner;
public class Recycle {
public static void main (String[] args) {
int s, t;
Scanner scanner;
try {
scanner = new Scanner(new File("C:\\a.in"));
if(scanner.hasNextLine()) {
scanner.nextLine();
}
int testCase = 1;
... |
B11421 | B10674 | 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.*;
public class RecycledNumber {
int digits;
Collection<String> set = new HashSet<String>();
public int countInInterval(int a, int b)
{
int count = 0, rotation;
String temp = ""+ a;
this.digits = temp.length();
for(int i = a; i<b; i++)
{
for(int j = 1; j<digits;j++)
{
ro... |
B10231 | B12381 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.util.*;
public class RecycledNums
{
static Scanner cin = new Scanner(System.in);
public static void main(String[] args)
{
String out = "";
System.out.println("GO");
int repeat = cin.nextInt();
cin.nextLine();
int ans=0;
for(int i = 0; i < repe... |
A12113 | A11885 | 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.*;
import java.util.*;
class GooglersDance {
public static void main(String[] args)
throws Exception {
new GooglersDance().start();
}
void start()
throws Exception {
InputStreamReader is =
new InputStreamReader(
new FileInputStream("Input"... |
B10149 | B10951 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static void readFile() throws FileNotFoundException {
File f = new File("C-small.in");
Scanner in = new Scanner(f);
PrintWrite... |
B12115 | B12205 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.HashSet;
import java.util.... |
B12762 | B11333 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.util.*;
import java.io.*;
import java.lang.*;
import static java.lang.System.*;
public class RecycledNumbers{
static HashSet<Integer> set;
static int ctr, low, high;
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(in));
int ii = I... |
B20734 | B21683 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.io.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: ";
... |
B12074 | B10839 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintStream;
import java.util.HashSet;
/**
*
* @author peterboyen
*/
public class RecycledNumbers {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("/Users/peterboye... |
B20566 | B21606 | 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 + "";
... | import java.io.*;
import java.util.*;
public class Java{
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new FileReader("C-large.in"));
int cases = Integer.parseInt(in.readLine());
for (int i = 1; i <= cases; i ++){
String[] temp = (in.readLine()).split(" ");
... |
B10155 | B12700 | 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 commons;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
public class FileUtilities {
public static void writeFile(List<String> strings, File file)
th... |
B12074 | B12946 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... |
import java.util.*;
class Main {
public static void main( String[ ] args ) {
Scanner in=new Scanner(System.in);
int cin=in.nextInt();
for (int ci=1;ci<=cin;ci++){
int a=in.nextInt(),b=in.nextInt();
int ans=0;
for (int i=a;i<b;i++){
HashSet<Integer> la=new HashSet<Intege... |
B11327 | B12937 | 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 static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.util.*;
public class C {
Scanner sc = new Scanner(System.in);
int A, B;
void read() {
A = sc.nextInt();
B = sc.nextInt();
}
void solve() {
long res = 0;
for (int i = A; i <= B; i++) {
int t = i;
int... |
B20424 | B22174 | 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.*;
class Recycled
{
static boolean[] check = new boolean[2000001];
public static void main (String [] args) throws IOException
{
BufferedReader in = new BufferedReader(new FileReader("C-large.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("C-large... |
A11277 | A12773 | 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.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner r = new Scanner(System.in);
int T = r.nextInt();
int caseNumber = 1;
while(T-- > 0){
int N = r.nextInt();
int S = r.nextInt();
int P = r.nextInt();
int[] a = new int[N];
... |
A12544 | A12459 | 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 qualifier;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Map;
import java.util.Scanner;
public class TB {
private Map<Character, Character> translate = null;
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
PrintWr... |
A12113 | A13193 | 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 classes;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class Dancing
{
public static void main(String[] args)
{
try
{
FileInputStream fstream = new FileInputStream("/Users/jleibsly2002/B-small-attempt0.in");
... |
A20730 | A22083 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static int Solve(String q) {
StringTokenizer st = new StringTokenizer(q, " ");
int n = Integer.parseInt(st.nextToken());
int s = Integer.parseInt(st.nextToken());
int p = Integer.parseInt(st.nextToken());
int t;
int d;
int r... |
B20734 | B20588 | 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 practice.GC2012;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Se... |
A12846 | A10402 | 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.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
public static void main(String ... args) throws Exception{
Scanner in = new Scanner(new File("B-small-attempt0.in"));
PrintStream out = new PrintStream(new File("B-small-attempt0.out"));
... |
A12460 | A11894 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class testC {
public static void main(String args[]){
int arrayInt[];
String str="";
int numbersOfGooglers=0;
int S=0;
int P=0;
int index=0;
int count=0;
... |
B21227 | B22193 | 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.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author joshuahm
*/
public class codejamC {
public static void main(String[] args) throws FileNotFoundE... |
B10245 | B12390 | 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.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;
public class C {
private void work() throws IOException {
Scanner sc = new Scanner(new FileReader("C-small-attempt0.in"));
Print... |
B21227 | B21134 | 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 gcj2012.qual;
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Character.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.math.BigInteger.*;
public class C {
static final char PROB = C.class.getSim... |
B11361 | B12846 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | package gcj2012.qr;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
public static int count(int a, int b) {
int r = 0, len, m;
String sn, sm;
Set<Integer> used = new HashSet<Integer>();
for ... |
A22378 | A20176 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | package 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... |
B12082 | B11688 | 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... | package codejam;
import java.io.File;
import java.util.Scanner;
import java.io.FileWriter;
import java.util.Arrays;
/**
*
* @author Abiosoft
*/
public class Recycler {
public static void main(String[] a) throws Exception {
process("Recycler.in");
}
public static void process(String filename) ... |
B21049 | B21724 | 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 qualifier;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class TC {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
PrintWrit... |
A21557 | A22687 | 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.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Googlers {
public static void main(String args[])throws IOException{
Scanner scan = new Scanner(new File(System.getProperty("user.dir")+"/input.in"));
FileWriter file = new FileWriter("output.out");... |
A12273 | A11806 | 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 org.mikeyin;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
/**
* @author yincrash
*
*/
public class DancingWithGooglers
{
/**
* @param args
*/
public static void main(String[] args)
{
... |
B20856 | B22225 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | import java.io.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 ProblemC {
static Scanner kb = null;
static FileWriter fw = null;
public static void main(String []... |
A11917 | A10130 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class Main {
class Pair {
int a;
int b;
Pair(int a, int b) {
this.a = a;
this.b = b;
}
@Override
public int hashCode() {
... |
A21396 | A22972 | 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 org.weiwei.googlejam;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: ding
* Date: 12-4-14
* Time: ä¸å11:37
* To change this template use File | Settings | File Templates.
*/
public class Dancing {
List<Integer> scores;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.