F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A21557 | A20190 | 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.util.*;
public class ProbB {
public static void main(String[] args) {
Scanner s = new Scanner(System.in).useDelimiter("\n");
int t = s.nextInt();
String[] lines = new String[t];
for(int i = 0; i < t; i++) {
lines[i] = s.next();
}
s.close();
for(int i = 0; i < t; i++) {
//... |
B11327 | B10908 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
|
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
class Main
{
static int p[] =
{
1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000... |
B13196 | B11694 | 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.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
Scanner inputFile = new Scanner(new InputStreamReader(System.in));
String inputLine = null;
String[] numberArray;
int testCaseCount = 0;
int startNum... |
A13029 | A11254 | 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.io.PrintStream;
public class round1 {
/**
* @param args
*/
static BufferedReader openRead(String fileName){
BufferedReader in = null;
try {
... |
A20934 | A21550 | 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.*;
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... |
A12570 | A12128 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | import java.io.*;
import java.text.*;
import java.util.*;
public class DancingWithGooglers {
static BufferedReader stdin;
static StringTokenizer st;
static String LINE() throws Exception { return stdin.readLine(); }
static String TOKEN() throws Exception {
while (st == null || !st.hasMoreTokens())st = new Str... |
B21049 | B20885 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.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;
import java.util.StringTokenizer;
public class Recycled {
/**
* @param args
* @throws IOException
*/
public static... |
B21752 | B20559 | 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.BufferedReader;
import java.io.FileReader;
import java.util.Arrays;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) throws Throwable {
long init = System.currentTimeMillis();
int MAX = 2000001;
//int MAX = 201;
int arr[][] = new int[MAX][];
{
for (int ... |
A22642 | A21051 | 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.*;
import java.util.StringTokenizer;
public class Solution {
public static void main(String args[]){
try{
FileInputStream fin=new FileInputStream("C:\\Program lang\\Google Code Jam\\input00.txt");
DataInputStream datain=new DataInputStream(fin);
BufferedReader br=new BufferedReader(new InputSt... |
A21396 | A21770 | 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.ArrayList;
public class Run2
{
public static void main(String[] args)
{
String path = "files/B-large.in";
int T = 0;
ArrayList<ArrayList<Integer>> googlers = new ArrayList<ArrayList<Integer>>();
ArrayList<Integer> surprisings = ne... |
B11327 | B13251 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
|
package com.google.codejam;
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.IOException;
import java.io.InputStreamReader;
public class RecycledNumbers {
/**
* @param args
... |
B12115 | B12642 | 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.util.*;
class Main {
static Scanner in = new Scanner(System.in);
static Set<String> set = new HashSet<String>();
public static void serie(int n, int m){
for(int i=n;i<=m;i++){
String a = i+"";
int len = a.length()-1;
for(int k=len;k>=1;k--){
String res = a.substring(k, len+1) + a.substr... |
A10699 | A11282 | 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 com.jam.contest2012;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing {
public static int foo(final List<Integer> list, final int surprise,
final int p) {
return find_ma... |
A20119 | A20304 | 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.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class G_2 {
static int n, s, p;
static int[] tt;
public static void main(String[] args) throws IOException {
PrintWriter bw = new PrintWriter(new File... |
A11201 | A11007 | 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.... | /*
ID: t.lam1
LANG: JAVA
TASK: codejam
*/
import java.io.*;
import java.util.*;
import java.text.*;
import static java.lang.System.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import static java.lang.Character.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
import st... |
A12846 | A10221 | 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.InputStreamReader;
import java.util.StringTokenizer;
class process implements Runnable {
Thread t;
int c=0,n=0,s=0,p=0;
int[] sc;
int res=0;
String a="";
process(int i,int a,int b,int e,int[] d) {
c=(i+1);
n=a;
s=b;
p=e;
sc=d;
t = new Thread(this);
t.run... |
A22378 | A21912 | 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.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 Main {
/**
* @param args
*/
public static void main(String[]... |
A22191 | A22249 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package qualification;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
*
* @author anvarik
*/
public class dancers {
public static void main(String[] args) throws Fi... |
A11135 | A11097 | 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... | package QualificationRound;
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.Dictionary;
import java.util.regex.Pattern;
public class B
{
public B()
{
}
public ... |
A10996 | A12282 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.*;
import java.util.*;
public class Prob2 {
public static PrintStream out;
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(new File("in.txt"));
out = new PrintStream(new File("out.txt"));
int numCases = Integer.parseInt(sc.nextLine());
int caseNum = 1;
whi... |
A11201 | A10084 | 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.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class googler {
private static File f = new File("C:/Users/Cybermask/Desktop/myfile.txt");
private static File outfile = new File("C:/Users/Cyberm... |
A10568 | A11548 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.*;
import java.util.Scanner;
import java.util.ArrayList;
public class googler{
public static void main(String[] args) throws IOException{
Scanner fileScan = new Scanner(new File("infile.in"));
Writer out = new OutputStreamWriter(new FileOutputStream("output.txt"));... |
B10231 | B12949 | 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 google.solver;
public interface ChallengeConstants {
public static final String DELIMITER = "\\";
public static final String CHALLENGE_DEFINITION = "challengeDefinition";
public static final String BASE_DIR= "D:\\Development\\Workspaces\\test1\\googleChallanges\\src\\google\\contest";
public static final... |
A12460 | A11170 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... | package codezam.exercise.WR1B2012;
public class Triplet {
long numberA;
long numberB;
long numberC;
boolean isSurprising = false;
long numberMax;
public Triplet(long numberA, long numberB, long numberC) {
this.numberA = numberA;
this.numberB = numberB;
this.numberC = numberC;
//Valid ÇÏ°Ô µé¾î¿Â´Ù°í... |
B21207 | B21394 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;
public class C {
void start() {
Scanner sc=new Scanner(System.in);
int nt=sc.nextInt();
for (int tc=1; tc<=nt; tc++) {
int a=sc.nextInt(), b=sc.nextInt(), re=0;
if (a<b && a>9) {
int p=1;
while (p*10<b)
p*... |
B20424 | B20677 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | package c;
import java.io.*;
import java.lang.Math.*;
import java.util.Arrays;
public class C {
public static void main(String[] args) {
try {
BufferedReader input = new BufferedReader(new FileReader("C:/CodeJam/C-large.in"));
BufferedWriter output = new BufferedWriter(new FileWriter("C:/CodeJam/C-large.ou... |
A21396 | A22140 | 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 year2012.qualification.b;
import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception{
/... |
A12211 | A12990 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
String filename = "B-small-attempt3";
String inname = filename + ".in";
String outname = filename + ".out... |
B11327 | B13206 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.util.*;
public class ProblemC {
public static void main(String... args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t=1; t<=T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
int digit = String.valueOf(A).length();
... |
B20023 | B21553 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codajam2012;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Vector;
/**
*
* @author dectroo
*/
public class Recycled {
public sta... |
B12941 | B12921 | 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.FileReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.Locale;
public class NumberPairs {
public static void main(String[] args) throws IOException {
Scanner s = null;
try {
s = new Scanner(new BufferedReader(new FileReader("NumberPairs... |
A12113 | A10243 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
int t = console.nextInt();
for (int i = 0; i < t; i++) {
System.out.print("Case #" + (i + 1) + ": ");
int n = console.nextInt();
int s = console.nextInt();
int p = consol... |
B10149 | B10013 | 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.util.*;
import java.io.*;
public class C {
public static void main(String[] args) throws Exception {
String inputfilename = args[0];
String outputfilename = args[1];
BufferedReader br = new BufferedReader(new FileReader(inputfilename));
BufferedWriter bw = new BufferedWriter(new FileWriter(outputf... |
A20934 | A20176 | 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 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... |
B12570 | B12954 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | package google.contest.A;
import google.loader.Challenge;
import google.problems.AbstractChallenge;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AChallenge extends AbstractChallenge implements Challenge {
private Strin... |
A20730 | A20000 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | import java.io.*;
class goodance
{
static int wc;
static int best;
public static void main(String args[])
throws IOException
{
FileReader fin=new FileReader("B-large.in");
BufferedReader bin=new BufferedReader(fin);
FileWriter fout=new FileWriter("Output.txt");
BufferedWriter bout=new BufferedWriter(fout);
PrintWr... |
A20382 | A22140 | 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 year2012.qualification.b;
import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception{
/... |
B11327 | B11029 | 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.moriraaca.codejam;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface SolverConfiguration {
OutputDestination outputDestination() default OutputDestination.STDOUT;
String inputFileName() default "sample.in";
DebugO... |
A22992 | A21841 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | package com.sam.googlecodejam.speakingtoungue;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import com.sam.googlecodejam.helper.InputReader;
/**
* This class generates the mapping based on the samples that have been provided.
* @author Saifuddin Merchant
*
... |
B20856 | B20680 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | package br.com.problema.c;
import java.util.HashSet;
public class Numero {
int num;
public Numero(int num) {
this.num = num;
}
public HashSet<Integer> numRecycled(int B) {
String s = num + "";
HashSet<Integer> recycleds = new HashSet<Integer>();
int numeroCasas = s.length();
// System.out.print(num +... |
B10149 | B11374 | 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.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;
class Pair{
int x;
int y;
Pair(int x,int y){
this.x = x;
this.y = y;
}
public boolean equals(Pair p){
return this.x == p.x && this... |
A12460 | A10242 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... | package com.googlecode.contest.dancing;
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.ArrayList;
import java.util.List;
import java... |
B21752 | B20481 | 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.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.HashSet;
public class ProblemB {
static int A;
static int B;
static HashSet<Integer> set;
... |
B12570 | B12139 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | package Recycled;
public class Couple {
public Couple(int x, int y) {
super();
this.x = x;
this.y = y;
}
int x, y;
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + x;
result = prime * result + y;
return result;
}
@Override
... |
B12085 | B10046 | 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.List;
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.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
p... |
B21968 | B20709 | 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 ch.socaciu.andrei.codejam;
import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author Andrei Socaciu
*/
public class Recycled {
public static void main(String[] args) throws Exception {
String in = "data/Recycled-large.in.t... |
A11917 | A12190 | 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 codejam2012;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Scanner;
class ProbB{
public static void main(String[] args) throws FileNotFoundException{
File in;
File out;
... |
B10245 | B10237 | 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 codejam2;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Date;
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public a... |
A11917 | A13066 | 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.util.Scanner;
public class DWtG {
static int T,N,S,P;
static int[] t = new int[1000];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = Integer.parseInt(sc.nextLine());
for (int k = 0; k<T; k++)
{
int result = 0;
N = sc.nextInt();
S = sc.nextInt()... |
A22992 | A20411 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | package MyAllgoritmicLib;
import java.util.ArrayList;
public class Dejkstra {
// ---------------------------------------------------------------------------
// Àëãîðèòì Äåéêñòðû.ïîèñêà êðàò÷àéøåãî ïóòè
int v;
int infinity=Integer.MAX_VALUE; // Áåñêîíå÷íîñòü
int p= 6; // Êîëè÷åñòâ... |
A12846 | A10412 | 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.*;
class GoogleDance
{
public static void main(String[] args)
{
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=0;i<t;i++)
{
in... |
A12460 | A10054 | 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;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Sol {
BufferedReader br;
StringTokenizer st;
PrintWriter out;
public int AAA(int x,int p){
if (x%3==0){
if (x/3+1>=p){
return(1);
}
}
if ... |
B12085 | B10579 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) throws IOException {
ArrayList<Pair> al = new ArrayList<Pair>... |
B12115 | B12590 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.*;
import java.util.*;
public class RecycledNumbersSmall {
public static void main(String[] args) {
try {
FileWriter output = new FileWriter(new File("output.txt"));
Scanner s = new Scanner(new File("input.txt"));
int trials = s.nextInt();
s.nextLine();
for (int i = 0; i < trials; i++)... |
B11421 | B11922 | 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... | /**
* Created by IntelliJ IDEA.
* User: ashevenkov
* Date: 14.04.12
* Time: 11:17
*/
package codejam.codejam2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* @author ashevenkov
*/
public clas... |
B12762 | B11508 | 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.Scanner;
import java.util.TreeMap;
public class RecycledNumbers {
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
//Read in the T int -- Test Cases
int T = Integer.parseInt(sc.nextLine());
for (int t = 1; t <= T; t++) {
int num = 0;
//START OF CODE
int a ... |
B10231 | B12163 | 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.*;
import java.io.*;
import static java.lang.Math.*;
public class C {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("C-small-attempt1.in"));
FileWriter fw = new FileWriter("C-small.out");
/*BufferedReader in = new BufferedReade... |
A11917 | A10310 | 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
public class CodeJam2
{
private class Data
{
private int... |
A10996 | A11425 | 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 qualification.B;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
int totalCase = 0;
int supriseCaseNo = 0;
int googlerNo = 0;
int p = 0;
FileInputStream is = null;
... |
B21752 | B21688 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.LinkedList;
import java.util.Scanner;
public class RecycledNumbers {
public static int[] getM(int n) {
String s = n + "";
LinkedList<Integer> M = new LinkedList<Integer>();
for ... |
A12460 | A11241 | 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... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam;
import com.isotopeent.codejam.lib.SolverBase;
import com.isotopeent.codejam.lib.Utils;
import com.isotopeent.codejam.lib.converters.IntArrayLine;
public class Solver extends SolverBase<int[]> {
private static final ... |
B22190 | B20133 | 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.*;
import java.io.*;
class Recycled_Numbers
{
public static void main(String arg [])
{
int check =-456;
String m="";
int counter =0;
int calculate =0;
String sub="";
int mi =0;
int ma=0;
String path;
String first,second;
int numberOfLoops=0;
Scanner ... |
B12082 | B10372 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package solution;
import com.sun.xml.internal.ws.server.InvokerTube;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Vector;
/**
*
* @author Aditya
*/
import j... |
A12846 | A11322 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
Scanner scann... |
A21396 | A22831 | 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 mgg.problems;
import java.util.List;
import mgg.utils.CorrespondenceUtils;
import mgg.utils.FileUtil;
import mgg.utils.StringUtils;
/**
* @author manolo
* @date 14/04/12
*/
public class ProblemA {
public final static String EXAMPLE_IN = "A-example.in";
public final static String EXAMPLE_OUT = "A-exampl... |
B12941 | B11070 | 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 fixjava;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Set;
/**
* Simple multimap class. <code>
MultiMap<String, String> map = MultiMapKeyToSet.make();
map.put("a", ... |
A11917 | A11833 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.Reader;
public class ProB {
/**
* @param args
*/
public static void main(String[] args) {
/... |
A22642 | A22867 | 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... | 100
6 2 8 29 20 8 18 18 21
48 25 0 29 19 2 6 4 19 19 14 24 22 2 16 4 23 26 2 30 3 16 23 28 30 20 2 4 16 9 6 4 12 12 19 8 28 26 23 30 28 22 27 15 30 8 16 22 30 6 25
38 7 6 0 3 9 17 28 19 12 1 7 6 17 23 6 19 19 6 23 24 13 29 2 23 1 1 19 4 4 4 7 19 20 7 10 13 11 16 5 15
72 28 9 25 11 21 23 24 23 17 1 21 20 23 23 12 28 4 5... |
A12846 | A12174 | 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 hk.polyu.cslhu.codejam.solution.impl;
import hk.polyu.cslhu.codejam.solution.Solution;
import java.util.ArrayList;
import java.util.List;
public class StoreCredit extends Solution {
private int amountOfCredits, numOfItems;
private List<Integer> priceList;
@Override
public void setProblem(List<String> t... |
A10568 | A11113 | 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.*;
import java.lang.*;
import java.io.*;
class googler
{
public static void main(String args[])
{
try
{
PrintWriter pw=new PrintWriter("out.txt");
//creating file reader instance and reading first line
BufferedReader br=new BufferedReader(new FileReader(args[0]));
String... |
A20934 | A21698 | 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.*;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Queue;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.Vector;
public class Solution {... |
B12669 | B10804 | 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.FileReader;
import java.io.IOException;
import java.io.PrintStream;
public class RecycledNumbers {
public static String SMALL_IN_FILE_NAME = "./input.txt";
static PrintStream out = null;
/**
* @param args
* @throws IOException
*/
public s... |
A20382 | A22831 | 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 mgg.problems;
import java.util.List;
import mgg.utils.CorrespondenceUtils;
import mgg.utils.FileUtil;
import mgg.utils.StringUtils;
/**
* @author manolo
* @date 14/04/12
*/
public class ProblemA {
public final static String EXAMPLE_IN = "A-example.in";
public final static String EXAMPLE_OUT = "A-exampl... |
A13029 | A11794 | 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... | /*
Sam1rm
Google Code Jam
*/
import java.io.*;
import java.util.*;
class ProblemB
{
public static void main (String [] args) throws IOException
{
String filename = args[0];
BufferedReader f = new BufferedReader(new FileReader(filename + ".in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new Fi... |
A11917 | A10532 | 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 com.googlerese.file;
public class GooglersBean {
private int numGooglers;
private int surprising;
private int result;
private int[] scores = new int[100];
public int getNumGooglers() {
return numGooglers;
}
public int getSurprising() {
return surprising;
}
... |
A22771 | A20283 | 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 google2012;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;
public class QRound_B {
static public void... |
A12113 | A10741 | 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 dancing;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public cl... |
B10361 | B11330 | 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 recycledNumbers;
public class Solution {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
InputData inputdata = Flow.Readin("src//recycledNumbers//C-small-attempt0.in");
OutputData outputdata = Algorithms.getOutput(inputdata);
Flow.Writeou... |
A22078 | A22353 | 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.util.Scanner;
import java.util.Arrays;
import java.io.File;
public class Dancing {
public static void main (String[] args) {
Scanner sc = null;
try {
sc = new Scanner(new File("input.txt"));
} catch (Exception e) {}
int N, S, p, result;
int[] t;
String out;
int T = sc.nextInt();
sc.next... |
A10996 | A11652 | 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);
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.common;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
/**
*
* @author jim
*/
public class Output {
private final S... |
A22191 | A22110 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
public class Dancing_with_the_Googlers {
public static void main(String[] args) throws IOException
{
FileInputStream fis;
try {
fis = ... |
B10245 | B11131 | 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.codegem.zaidansari;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class ProblemA {
public static Map<Character, Character> mappedCharacters = new... |
B10245 | B12285 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... |
import java.io.*;
import java.util.*;
public class ProblemB {
public static void main(String[] args) throws Exception {
String filename = "C-small-attempt0.in";
Scanner sc = new Scanner(new File(filename) );
System.setOut(new PrintStream(new FileOutputS... |
B11318 | B10706 | 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.util.Scanner;
import java.util.ArrayList;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String st = in.nextLine();
int n = Integer.parseInt(st);
int a[][] = new int[n][2];
int ans[] = new int[n];
for(... |
A12211 | A10666 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.PrintWriter;
import java.util.Scanner;
public class ProblemB {
public static void main(String[] args) {
final Scanner in = new Scanner(System.in);
final PrintWriter out = new PrintWriter(System.out);
final int t = in.nextInt();
for (int tt = 0; tt < t; tt++) {
final int n = in.nextInt();
... |
A11135 | A10331 | 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... | package sample;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class SampleMain {
public static void main(String[] args) throws Exception {
String linesFile = //args[0];
"lines.txt";... |
B20566 | B20920 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | package recycledNumbers;
import java.util.ArrayList;
public class Algorithms {
public static OutputData getOutput(InputData inputdata) {
// TODO Auto-generated method stub
int [] Results = new int[inputdata.getTest_Number()];
for(int i=0;i<Results.length;i++){
Results[i] = getSingleResult(inputdata.getA... |
A11135 | A11295 | 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... | package codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintWriter;
public class CodeJamRunner {
private PrintWriter pw = null;
/**
* Override this to do the real stuff.
* @param inputLine
*/
protected void process( int lineNr, String inputLine )
{
... |
B13196 | B11931 | 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.*;
import java.io.*;
public class C {
public static void main(String[] args) {
int n = 0;
int[] a = null;
int[] b = null;
try {
File file = new File(args[0]);
Scanner sc = new Scanner(file);
n = sc.nextInt();
a = new int[n];
b = new int[n];
for (int i=0;i<n;i++) {
a[i] =... |
A22642 | A22414 | 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... | package google;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;
public class Dancing
{
public static void main(String[] args) throws FileNotFoundException, IOException
{
IO.changeGoogleIO('B', 1);
Scanner input = new Scanner(System.in);
... |
B21968 | B21999 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;
public class RecycledNumbers {
static int[] p10 = {1,10,100,1000,10000,100000,1000000,10000000};
public static int perm(int x, in... |
B10149 | B10195 | 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 =... | // usage: java c infile > outfile
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Set;
import java.util.HashSet;
public class c
{
public static void main(String[] args) throws Exception
{
String infile = args[0];
BufferedReader reader = new BufferedReader(new FileReader(infile));
... |
B11421 | B10511 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class codejam_C_small {
public static void main(String[] args) throws IOException {
FileUtil.Timer.start();
Scanner scanner = new Scanner(System.in);
int numOfTest = scanner.nextInt();
scanner.nextLin... |
B13196 | B10950 | 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.IOException;
import java.util.InputMismatchException;
import java.util.Set;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.Writer;
import java.math.BigInteger;
import java.util.HashSet;
import java.io.InputStream;
... |
A12846 | A12992 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Dancing {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(new FileReader("dancing.in"));
PrintWriter out = new PrintWriter(new ... |
B12082 | B11693 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int numTestCases = Integer.valueOf(scanner.nextLine());
for ( int i =0; i < numTestCases; i++ ) {
String theCase = scanner.nextLine();
//Error checki... |
B21049 | B20559 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Arrays;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) throws Throwable {
long init = System.currentTimeMillis();
int MAX = 2000001;
//int MAX = 201;
int arr[][] = new int[MAX][];
{
for (int ... |
A22642 | A22705 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Wilmer
*/
public class main {
int numeroCasos;
... |
A12460 | A11084 | 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.*;
import java.util.*;
public class Dancing {
public static void main(String [] args) throws IOException
{
BufferedReader br = new BufferedReader(new FileReader("B-small-attempt0.in"));
BufferedWriter brw = new BufferedWriter(new FileWriter("output"));
int t = Integer.pa... |
B12085 | B11629 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
public class RecNumbers {
static Scanner in;
static PrintWriter out;
public static boolean isRecycled(int n, int m){
boolean recycled = false;
String first = Integer.toString(n);
String second = Integer.toString(m);
int len = f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.