F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B21790 | B20910 | 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... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
public class SolutionWriter extends PrintWriter {
private static final String FORMAT = "Case #%1$s: %2$s%n";
private String... |
B11318 | B10441 | 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.*;
import java.util.*;
class GoogleRecycle
{
public static void main(String[] args)
{
Integer a,b,m,n;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Scanner sc=new Scanner(new InputStreamReader(System.in));
int t=sc.nextInt();
String ans[]=new String[t];
for(int i=... |
A21396 | A21783 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.io.BufferedReader;
import java.io.FileReader;
import java.util.StringTokenizer;
/**
*
* @author Sreesasanka G
*/
public class Dancers {
public static void main(String args[])throws Exception
{
BufferedReader in = new BufferedReader(new FileReader("B_Small.in"));
int cases = Integ... |
A10793 | A12485 | 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 inam.qual;
import java.io.File;
import java.io.FileInputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
public void go() {
Scanner in = new Scanner(System.in);
int cc = in.nextInt();
for (int c = 1; c <= cc; c++) {
int val = 0;
... |
B10245 | B10413 | 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 com.google.codjam.utils;
import java.util.ArrayList;
public class FileDataAndSettings {
private Integer nCases;
private ArrayList<ArrayList> inputCase;
private String tokenSep;
public FileDataAndSettings()
{
inputCase = new ArrayList<ArrayList>(0);
}
public void... |
B12082 | B12802 | 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.*;
import java.util.*;
public class PairList{
public ArrayList<Pair> pairs;
public PairList(){
pairs= new ArrayList();
}
public void addP(int i, Pair pair){
pairs.add(i,pair);
}
public int Find (Pair pair,int big){
int ena=pair.first;
int dyo=pair.second;
int length=pairs.size();
... |
B10149 | B10456 | 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 Parser;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
public class MyWriter {
Writer out;
public MyWriter(String fileName) {
// TODO Auto-gene... |
A11277 | A10155 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.... |
A12846 | A12813 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... |
import java.io.*;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Ankur
*/
public class DacingWithTheGooglers {
public static void main(String[] args) {
try
{
FileWriter fout = new FileWriter("out");
... |
B10155 | B10062 | 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... | import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int cases = scan.nextInt();
scan.nextLine();
String phrase;
int i = 1;
while (scan.hasNextLine()) {
int n1 = scan.nextInt();
int n2 = scan.nextIn... |
B11327 | B12957 | 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 google.contest.B;
import google.loader.Challenge;
import google.problems.AbstractChallenge;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class BChallenge extends AbstractChallenge implements Challenge {
private int numberOfGooglers;
private int numberOfSurprise;
pri... |
A10699 | A10742 | 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.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
class GoogleCo... |
B10155 | B11745 | 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 codejam;
import java.io.*;
import java.util.HashSet;
import java.util.Set;
/**
* @author Dmitry Korolev
*/
public class Task3 {
public static void main(String[] args) throws IOException {
Reader inputReader = new FileReader("C-small-attempt0.in");
Writer outputWriter = new FileWriter("C... |
B10485 | B10722 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.util.Scanner;
import java.io.*;
public class Pair {
public static int a, b, l;
public static boolean inr(String x) {
int t = Integer.parseInt(x);
if ((t + "").length() != l) return false;
if (t <= b && t >= a) {
return true;
}
else return false;
}
public static String t... |
A20382 | A21783 | 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.FileReader;
import java.util.StringTokenizer;
/**
*
* @author Sreesasanka G
*/
public class Dancers {
public static void main(String args[])throws Exception
{
BufferedReader in = new BufferedReader(new FileReader("B_Small.in"));
int cases = Integ... |
A22078 | A22577 | 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 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... |
B12570 | B10130 | 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.FileReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
class Pair {
int a;
int b;
Pair(int a, int b) {
this.a = a;
this.b = b;
}
@Override
public int hashCode() {
... |
B20006 | B20628 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.y12.round0;
import utils.Jam;
import utils.JamCase;
/**
*
* @author fabien
*/
public class RecycledNumbers extends Jam {
public RecycledNumbers(String filename) {
super(filename);
}
@Over... |
A11502 | A10705 | 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.util.*;
public class probB
{
public static void main (String[] args)
{
Scanner scan = new Scanner (System.in) ;
int T = scan.nextInt();
int A[], S,p;
for (int t=0 ; t<T ; t++)
{
A = new int[scan.nextInt()];
S = scan.nextInt();
p = scan.nextInt();
//System.out.printf("s:%d p:%d... |
A10793 | A12298 | 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.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.lang.Math;
import java.util.Arrays;
public class DancingWithTheGooglers {
public static int testSi... |
B10702 | B10545 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.*;
import java.util.*;
public class Q3{
public static void main(String args[]){
try {
BufferedReader is = new BufferedReader(
new InputStreamReader(new FileInputStream(new File("C-small-attempt0.in"))));
BufferedWriter os = new BufferedWriter(
new OutputStreamWriter(new ... |
B12115 | B12582 | 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.google.codejam.practice2012.qualificationRound;
import com.google.codejam.abs.Problem;
import com.google.codejam.utils.files.ManejoArchivos;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class RecycledNumbers extends Problem {
... |
B12074 | B11540 | 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 template;
//standard libraries potentially used:
//Apache commons http://http://commons.apache.org/
//Google Guava http://code.google.com/p/guava-libraries/
import java.util.ArrayList;
public class Template {
public static void main(String[] args) {
//test();
//Utils.die("Done testing"... |
B20856 | B22215 | 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.*;
import java.util.*;
public class CodeJam2012_Q_C {
public int calc(int A, int B) {
boolean[] checked = new boolean[B-A+1];
int cnt = 0;
int D = String.valueOf(A).length();
int unit =1;
for(int i=1; i<D; i++) unit*=10;
for(int i=A; i<=B; i++) {
if(!checked[i-A]) {
checked[i-A]... |
B10361 | B12851 | 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.PrintWriter;
import java.io.Reader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Main
{
public static HashMap<Character,Character> mapp = new... |
B13196 | B11094 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | import java.io.*;
import java.util.*;
public class C {
BufferedReader ins;
PrintStream outs;
static String INPUT = "C-small-attempt0.in";
static String OUTPUT;
static {
OUTPUT = "C.out";
}
Map<String, Set<String>> map = new HashMap<String, Set<String>>();
public C(Buffer... |
B10231 | B10760 | 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 codeJam;
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> numeros= new ArrayList();
StringBuffer num, copia;
String aux;
int test= sc.nextInt(), min, ma... |
B10155 | B12951 | 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 google.problems;
import google.loader.Challenge;
import google.loader.ChallengeReader;
import java.util.ArrayList;
import java.util.List;
public abstract class AbstractReader implements ChallengeReader {
private String[] lines;
private List<Challenge> challenges;
private int actualLine;
public Abstrac... |
B11421 | B12394 | 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 com.amyth.gc2012;
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.text.BreakIterator;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class Probl... |
B10702 | B10740 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class problem3
{
void main()
{
solve();
}
public void solve()
{
... |
A21396 | A22371 | 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++){
... | public class Dancing {
public static int atLeast;
public static Googler[] googlers;
public static void main(String[] args) {
doProblems("100\n" +
"6 2 8 29 20 8 18 18 21\n" +
"70 70 7 20 6 28 3 3 27 25 22 18 24 20 2 17 9 27 27 28 2 8 4 10 26 28 3 9 24 28 8 18 3 23 14... |
B10155 | B11971 | 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... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class Small_C {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
File inf;
File outf;
try{
inf= new Fi... |
A12460 | A11572 | 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.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class GoogleDancers {
public static void main(String args[]) throws IOException{
Scanner scan = new Scanner(System.in);
PrintWriter print = new PrintWriter(new FileWriter("GoogleDancers.out"));
... |
A22078 | A20487 | 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.*;
/**
* Created by IntelliJ IDEA.
* User: YC14RP1
* Date: 4/14/12
* Time: 12:29 AM
* To change this template use File | Settings | File Templates.
*/
public class Test2 {
public static void main(String[] args) throws FileNotFoundException {
String path = "C:\\Users\\YC14rp1\\Download... |
A11201 | A10830 | 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.... | package codejam;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.LinkedList;
import java.util.Queue;
public class GooglersDance {
public static void main(String[] args) throws IOException {
String fileName = "B-small-attemp... |
B11327 | B11268 | 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 org.code.jam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import ... |
B11327 | B11379 | 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 codejam2012.qualification;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* @author Jaffar Ramay
*
*/
public class RecycledNumbers {
public static void solve() throws IOEx... |
A10699 | A12513 | 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) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancingwithgoogler;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* @author WC
*/
public class CodeJamFileManager {
private final static String problemIntro = "Prob... |
B20734 | B21150 | 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.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.PrintStream;
import java.util.HashMap;
/*
* To change this template, choose Tools | Templates
* an... |
B10149 | B12461 | 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.*;
import java.util.*;
public class test3
{
public static void main(String[] args) throws Exception
{
new test3().run();
}
PrintWriter out = null;
int getCount(int d, int max)
{
String s = Integer.toString(d);
int n = s.length();
HashSet<Integer> hs = new HashSet<Integer>();
for (int... |
A11277 | A10726 | 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.*;
public class googlers {
public static void main(String[] args){
int t;
Scanner s = new Scanner(System.in);
t=s.nextInt();
for(int k=0;k<t;k++){
int n,p,S;
n=s.nextInt();
S=s.nextInt();
p=s.nextInt();
int[] totals = new int[n];
int count=0;
for(int i=0;i<n;i++){
tota... |
B10231 | B12806 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class C {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(new File("d:\\cc.small.in"));// new Scanner(ne... |
A20382 | A22371 | 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... | public class Dancing {
public static int atLeast;
public static Googler[] googlers;
public static void main(String[] args) {
doProblems("100\n" +
"6 2 8 29 20 8 18 18 21\n" +
"70 70 7 20 6 28 3 3 27 25 22 18 24 20 2 17 9 27 27 28 2 8 4 10 26 28 3 9 24 28 8 18 3 23 14... |
B12082 | B13230 | 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 problemc;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
public class ProblemC {
public static void main(String args[]){
List<String> inputs = readInput();
String n;
String m;
int count = 0;
for(Str... |
B11318 | B12195 | 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.*;
import java.util.*;
public class C
{
BufferedReader read;
BufferedWriter write;
public static void main(String args[])
{
try {
new C().init("C-small-attempt2");
} catch (Exception ex) {
System.out.println("error occured "+ex);
//... |
B13196 | B11482 | 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.util.*;
public class Recycled {
public static void main(String[] args) {
Scanner p = new Scanner(System.in);
int tests = p.nextInt();
for(int i = 0; i<tests; i++) {
int count = 0;
boolean[] used = new boolean [1001];
Integer a = p.nextInt();
Integer b = p.nextInt();
if( b == 100... |
A20119 | A20417 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
public class Dancing {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new FileReader("dancing.in"));
PrintWriter out = new PrintWriter(new FileWriter... |
A21396 | A20511 | 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++){
... | /*
Problem
You're watching a show where Googlers (employees of Google) dance, and then each dancer is given a triplet of scores by three judges. Each triplet of scores consists of three integer scores from 0 to 10 inclusive. The judges have very similar standards, so it's surprising if a triplet of scores contains two... |
A12544 | A12771 | 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 Qualification_Round_2012;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class B {
public static void main(String[] args) throws FileNotFoundException, IOExcep... |
A11502 | A12428 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.*;
import java.util.*;
import java.util.regex.*;
public class jam02 {
/**
* @param args
*/
public static void main1(){
// scalar product problem
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int number_test;
Scanner sc = new Scanner(System.in);
nu... |
A10699 | A10889 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package utils;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.uti... |
B21968 | B21399 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | package codejam2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintStream;
public class ProblemC
{
public static void main(String[] args) throws Exception
{
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintStream out = System.out;
out = new PrintStream("ou... |
B20291 | B21296 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | package recycling;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static int lint(int n){
if(n == 0)
return 0;
return 1 + lint(n / 10);
}
public static void permut(int[] tab){
int l = tab.length;
int temp = ta... |
B12669 | B11532 | 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 com.google.jam.eaque.qualif.c;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import com.google.jam.eaque.stub.InputFileManager;
import com.google.jam.eaque.stub.Stub;
import com.google.jam.eaque.stub.Util;
public class StubImpl extends Stub {
@Override
public String... |
A11201 | A12333 | 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.... | package qr2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
St... |
B10155 | B10398 | 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 R0;
import java.io.*;
import java.util.*;
public class C {
private static final int res[] = new int[8];
private static long check(int A, int B, int m, int c) {
long ret = 0;
for (int i = A; i < B; i++) {
int x = i;
for (int k = 0; k < c; k++) {
res[k] = x = x / 10 + m * (x % 10);
if ( x... |
B21752 | B21410 | 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.util.*;
import java.io.*;
import java.math.*;
public class Recycle {
public static void main(String args[]) throws Exception
{
BufferedReader in = new BufferedReader(new FileReader(new File("recycle.in")));
FileWriter out = new FileWriter(new File("recycle.out"));
int n = Integer.parseInt(in.re... |
B10361 | B12513 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | package codejam.qual_2012;
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;
public class MainC {
static boolean[] seen;
public static void main(String[] args) throws Exception {
String f = "/home/floris/dev/java/Test/src/codejam/qual_2012/C-small-attempt0.in";
Scanner sc... |
B10361 | B10396 | 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 rotatematrix;
import java.io.*;
/**
*
* @author FARHAN
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws FileNotFoundExc... |
B12762 | B10997 | 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.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class gcj_c {
public static void main(String[] args) {
try{
BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
... |
A10699 | A12945 | 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) ... | /**
* Copyright Carma Systems, Inc. All rights reserved.
*/
package com.jessehutton.codejam.util;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
/**
* @author Jesse Hutton <jess... |
B21752 | B20708 | 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.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Scanner a = new Scanner(new File("/Users/anurag/Dev/Java/workspace/CodeJam/src/input"));
FileWriter w = new FileWriter(new File("/Users/a... |
B12941 | B10439 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Scanner;
public class EjercicioA {
public static boolean prueba = false;
public static void main(String args[]){
try {
FileOutputStream fos = new FileOutputStream(new File("solucion.txt"));
OutputS... |
B20734 | B21086 | 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 gcj2012;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) th... |
A11917 | A11959 | 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.*;
import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class ProblemB {
int[][] resultset = new int[3][3];
int googlersCount = 3;
int surprising = 1;
int winners=0;
int count = 0;
int p = 0;
FileWriter fstream;
... |
A12460 | A11838 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class BDanceWithGooglers {
public static void solve() throws IOException {
File f = new File("E:\\downloa... |
A20490 | A21134 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | import java.io.*;
import java.util.*;
public class B {
public static int a [];
public static void main(String[] args) throws Exception{
int N = 100;
a = new int[N];
File f = new File("B-large.in");
Scanner sc = new Scanner(f);
int t = sc.nextInt();
BufferedWriter bw = new BufferedWriter(new FileWriter("ou... |
A21557 | A20166 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | package qualification;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class DancingWithTheGooglers {
static int T;
static int[] result;
public static void main(String[] args) throws IOException {
read();
write();
}
st... |
A21396 | A22635 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.io.File;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.Scanner;
public class B {
final static String PREFIX = "C:\\codejam\\B";
// final static String FILE_NAME = PREFIX + "-test";
// final static String FILE_NAME = PREFIX + "-small-attempt0";
final static String FILE_NAME = PR... |
B12085 | B11734 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test3;
import java.io.*;
import java.util.LinkedList;
import java.util.Scanner;
/**
*
* @author Student
*/
public class Test3 {
public static int rotations(int number, int max) {
int l = 0;
... |
A11201 | A12970 | 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.... | package mgg.utils;
public class Triplet {
public int first;
public int second;
public int third;
public Triplet(int first, int second, int third){
this.first = Math.max(Math.max(first, second), third);
if (first == this.first){
this.second = Math.max(second, third);
this.third = Math.min(second, third)... |
A22378 | A21077 | 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 GCJ2012QR2012;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.*;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.Iterator;
import java.util.ArrayList;
import java.lang.Math;
import java.util.LinkedList;
import java.util.Map;
import java.util.Co... |
A20490 | A20273 | 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 qual1;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
public class B {
public static void main(String[] args) throws IOException {
for (int i=0; i<=10; i++) {
System.out.println(Math.max((i-2)+(i-2)+i,i));
}
//... |
B10361 | B12807 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | package com.evolve.codejam2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
class Pair {
private... |
B20424 | B20238 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
public class RecycledNumbers {
public static void main(String args[]) throws IOException{
String inputFile = args[0];
String outputFile = args[1];
BufferedReader input = new BufferedReader(new File... |
B10245 | B11314 | 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... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
public class SolutionWriter extends PrintWriter {
private static final String FORMAT = "Case #%1$s: %2$s%n";
private String... |
A12460 | A10903 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class qb {
public static void main(String [] args)
{
String fileName = "B-small-attempt4.in";
try{
FileReader fr = new FileReader(fileName);
BufferedReader br = new BufferedReader... |
A10699 | A10198 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package gcj2012.qual;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import common.AbstractRunner;
import common.AbstractRunner.SIZE;
public class B extends AbstractRunner {
public void handleCase(int caseNumber) throws Exception {
int n = scanner.nextInt();
int s = scanner.nextI... |
B10485 | B12454 | 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.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader bfr = new BufferedReader(
new InputStreamReader(System.in));
PrintWriter pr = new PrintWriter(System.out);
int n = Integer.parseInt(bfr.readLine());
for (int i = 1; i <= n; i++) {
... |
B22190 | B21193 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.util.Scanner;
public class QuestionB extends Question{
private int N;
private int S;
private int p;
private int[] dancers;
public QuestionB(Result result, Counter counter)
{
super(result, counter);
}
@Override
public void readInput(Scanner scanner) {
N = scanner.nextInt();
S = scanner.n... |
B10245 | B11731 | 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... | /*
* SpeakingView.java
*/
package speaking;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import j... |
B20566 | B21033 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class C {
private void solve() throws IOException {
int T = nextInt();
while (T-- > 0) {
int A = nextInt(... |
A20382 | A22635 | 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.File;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.Scanner;
public class B {
final static String PREFIX = "C:\\codejam\\B";
// final static String FILE_NAME = PREFIX + "-test";
// final static String FILE_NAME = PREFIX + "-small-attempt0";
final static String FILE_NAME = PR... |
B11421 | B11020 | 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 org.moriraaca.codejam.recyclednumbers;
import org.moriraaca.codejam.TestCase;
public class RecycledNumbersTestCase implements TestCase {
public int A;
public int B;
}
|
B21207 | B20425 | 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 google.code.jam;
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.HashMap;
import java.util.List;
import java.util.ListIterator;
public class RecycledNumbers {
final st... |
A22771 | A22029 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.*;
public class Dance {
public static void main(String args[]){
Dance t=new Dance();
Scanner sc;
int N;
int S;
int P;
int T;
List A;
int div;
int rem;
int goo;
i... |
A12273 | A11634 | 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.... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam12;
import java.io.*;
import java.util.StringTokenizer;
/**
*
* @author Mohamed Ibrahim (MIM)
*/
public class Problem_B {
public static void main(String[] args) throws IOException {
... |
A20934 | A21393 | 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 de.hg.codejam.tasks.io;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public abstract class Reader {
public static String[] readFile(String path) {
String[] input = null;
try (BufferedReader reader = new BufferedReader(new FileReader(path))) {
int inputSize = ... |
B12941 | B12468 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import static java.util.Arrays.deepToString;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.Callable;
import java.util.concurrent.... |
A22771 | A20924 | 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 b;
import java.io.*;
import java.lang.Math.*;
import java.util.HashMap;
public class B {
public static void main(String[] args) {
try {
BufferedReader input = new BufferedReader(new FileReader("C:/CodeJam/B-small-attempt2.in"));
BufferedWriter output = new BufferedWriter(new FileWriter("C:/CodeJam/... |
A22378 | A20545 | 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 dancingwiththegooglers;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
*
* @author Masilo
*/
public class DancingWithTheGooglers {
public static void main(String[] args) {
Scanner inputStream = null;
PrintWrite... |
B11327 | B10630 | 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 base;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import assignments.AssignmentC;
public class Solver {
public static void main(Strin... |
B10485 | B12011 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... |
import java.util.*;
public class C
{
public static void main(String[] args)
{
new C(new Scanner(System.in));
}
ArrayList<Integer> makeNice(int v)
{
ArrayList<Integer> vs = new ArrayList<Integer>();
while (v > 0)
{
vs.add(v%10);
v = v/10;
}
return ... |
B10149 | B11669 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.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;
import java.util.List;
import java.util.Set;
public clas... |
A10793 | A12266 | 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.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.StringTokenizer;
public class GoogleDancers{
public static void main(String[] args) throws Exception{
FileReader fr = new FileReader("C:\\Projects\\Learning\\src\\B-small-attempt1.in");
BufferedReader br = new B... |
A13029 | A10803 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | package qualification.Dancing;
import java.io.*;
import qualification.Tongues.Tongues;
/**
*
* @author farshid
*/
public class Interface {
public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException, IOException {
String inPath, outPath;
IO.println("Ente... |
B20006 | B20023 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | import java.io.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... |
A12846 | A12025 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | package codejam;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Gedion Moyo
*/
public class dance {
/**
* @param args the command line arguments
*/
s... |
B12115 | B12580 | 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.google.codejam.abs;
import com.google.codejam.practice2010.round1A.Rotate;
import com.google.codejam.utils.files.ManejoArchivos;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;
public abstract class Problem {
public Problem(String name) throws FileNotFoundExc... |
A12273 | A11698 | 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 google.codejam.commons;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Utils {
public static String[] readFromFile(String fileName... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.