F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A22771 | A21597 | 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.text.*;
import java.util.*;
import java.lang.*;
public class solutionRunner {
public solutionRunner(){
run();
}
private void run(){
int numberOfLines = 1;
inpOutHandler io1 = new inpOutHandler();
testCase TC = io1.readInput("a1.txt", numberOfLines);
String result="";int _i=1;
for(Strin... |
B21968 | B21770 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.io.BufferedReader;
import java.io.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... |
A12846 | A11831 | 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 googlers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static int calcWIS(int n){
if(n - 2 < 0)
return 0;
return ((n - 2) / 3) + 2;
}
public static int calcWOS(int n){
if(n - 1 < 0)
return 0;
return ((n - 1) / 3) + 1;
}
... |
A10996 | A13117 | 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.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author joshuahm
*/
public class codejamB {
public static void main(String[] args) throws FileNotFoundException, IOException {
FileReader inFile = ne... |
B13196 | B13031 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package qualification.common;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 17:31
* To change this template use File | Settings | File Templates.
*/
public class OutputWriter {
public static void ... |
A21557 | A22371 | 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) ... | 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... |
B20023 | B20719 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | package com.clausewitz.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public abstract class Solver {
protected BufferedReader fileIn = null;
protected String outFilename = "output.out";
protected int numOfTe... |
B12669 | B12013 | 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 QualificationC;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Arrays;
import java.util.HashSet;
public class ProblemC {
public static void main(String args[]) throws Exception{
System.out.println(args[0]);
FileReader fr = new FileReader(args[0]);
BufferedReader br = new B... |
B12570 | B13165 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
public class C implements Runnable{
BufferedReader in;
BufferedWriter out;
static String inputFile="";
static String outputFile="";
static {
inputFile=C.class.getName... |
A10699 | A12060 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.*;
import java.math.*;
public class Dance {
public void cal(String filename) throws NumberFormatException, IOException
{
BufferedReader in = new BufferedReader(new FileReader(filename));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("bar.txt")));
int count = 1;
String s =... |
B21270 | B21538 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | import java.util.*;
public class RecycledNumbers {
private final int A;
private final int B;
private final boolean[] allNumbers;
public RecycledNumbers(int A, int B) {
this.A = A;
this.B = B;
//numbers are A + i, where i is the array index
allNumbers = new boolean[B - A... |
A11201 | A12110 | 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 qualif.problem2;
import java.util.Scanner;
public class DancingWithTheGooglers {
public int testCaseNb = 0;
private Scanner casesScanner;
public DancingWithTheGooglers(Scanner input){
try{
String nextLine = input.nextLine();
testCaseNb = new Integer(nextLine);
} finally{
}
this.casesSca... |
A11135 | A11719 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class CodeJamTextOutputWriter {
private final BufferedWriter writer;
CodeJamTextOutputWriter(File outputFile) throws IOException {
writer = new BufferedWriter(new FileWriter(outputFile));
}
publ... |
B10485 | B10535 | 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 RecycledNum
{
private static int testCase;
public static void main( String[] args )
{
Scanner s = new Scanner( System.in );
RecycledNum r = new RecycledNum();
r.setTestCase(Integer.parseInt(s.nextLine()));
for( int i = 0; i < testCase; i++ )
{
int A ... |
B12941 | B10464 | 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 ulohy;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class codejam_3 {
static byte cases;
static int A, B;
static List<... |
B10702 | B11753 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.File;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class QrC {
private CodeJamTextInputReader input = null;
private CodeJamTextOutputWriter output = null;
public static void main(String args[]) {
// CodeJamUtils.initLineEndings();
try {
QrC qrA = new QrC(... |
B21752 | B20027 | 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.BufferedInputStream;
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.io.Unsuppo... |
B10149 | B12523 | 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.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;
/**
*
* @author leonardo
*/
public class RecyclingNumbers {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner scanner = new Scanner... |
A12460 | A12132 | 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.*;
/**
* Auto Generated Java Class.
*/
public class Problem_b {
public static void main(String[] args) {
String [] nums=getWords("B-small-attempt0.in");
int t=Integer.parseInt(nums[0]);
for(int i=1;i<nums.length;i++){
String [] tempstr=nums[i].split(" ");
... |
A22078 | A20661 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class ProblemB {
public static void main(String[] args) throws FileNotFoundException {
PrintStream out = new PrintStream(new FileOutputStream(new File(
"b-larg... |
A21557 | A20511 | 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) ... | /*
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... |
B11421 | B11958 | 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.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class RecycledNumbers {
public static boolean isRecycledPair(int n, int m) {
int digits = 1 + (int)Math.floor(Math.log10(n));
int t = n;... |
A13029 | A11445 | 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 my.codejam.y12.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Stack;
public class ProblemB {
static void runIt()... |
B11327 | B10920 | 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 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... |
A11917 | A10454 | 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.FileReader;
public class DG {
public static void main (String[] args) throws Exception
{
BufferedReader sr = new BufferedReader(new FileReader("c:\\Projects\\DG.txt"));
int total = Integer.parseInt(sr.readLine());
for (int i=0; i<total; i++)
... |
B13196 | B11807 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class RecycledNumbers
{
private static final String INPUT_FILE = "input.txt";
private static final String OUTPUT_FILE = "output.txt";
public int countSiblings(Str... |
A20119 | A22598 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... |
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chamika
*/
public class GDance {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int cases = s.nextInt();
... |
B10899 | B13181 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | /**
* @(#)Googlerese.java
*
*
* @author Evan Forbes
* @version 1.00 2012/4/13
*/
import java.util.Scanner;
import java.io.FileReader;
import java.io.IOException;
public class Recycle {
static int caseNum=0;
static int numCases;
public static void main(String[] args)
{
try{
Scanner in=new S... |
A10996 | A11650 | 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.IOException;
/**
*
* @author jim
*/
public class AbstractMain {
public static void main(String[] args, AbstractProcessor p) {
FileLoader fileLoa... |
A11917 | A12031 | 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 jp.funnything.competition.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.io.FileUtils;
import org.apache.... |
B12762 | B11559 | 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.*;
import java.lang.*;
import java.util.*;
public class Recycle{
public static void main(String args []){
try{
FileInputStream fstream = new FileInputStream("C-small-attempt0.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new B... |
A22771 | A20146 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.Scanner;
public class DancingWiththeGooglers {
enum Type{
A{
@Override
public int getNoSurpiseHigh(int value) {
// TODO Auto-generated method stub
return (value+1)/3;
}
@Override
public... |
A11201 | A10858 | 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.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class letDance {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
... |
A12273 | A13199 | 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 dancing;
import java.io.BufferedReader;
import java.io.FileReader;
public class MaxScoreDetector {
/**
* @param args
*/
public static void main(String[] args) {
String fileName = null;
if(args.length == 1){
fileName = args[0];
}else{
System.err.println("Requires a command line argument: fil... |
B11696 | B12253 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.io.*;
import java.util.HashSet;
import java.util.Scanner;
/**
* Created by IntelliJ IDEA.
* User: singh
* Date: 14/4/12
* Time: 4:46 AM
* To change this template use File | Settings | File Templates.
*/
public class RecycleNumbers {
public static void main(String[] args) throws IOException {
// ... |
A12570 | A11758 | 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... | package test.com;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Stack;
public class Qual2012B {
public static void main(String[] args) throws Exception {
FileInputStream fos = new FileInputStream("c:/sanker/workspace/in... |
B10245 | B11718 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.util.Scanner;
public abstract class Question extends Thread{
protected Result result;
protected Counter counter;
public Question(Result result, Counter counter)
{
super();
this.result = result;
this.counter = counter;
}
public abstract void readInput(Scanner scanner);
public void solve... |
B21227 | B21059 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | package qualificationround;
import java.io.*;
import java.util.*;
public class ProblemC {
public static Set<Integer> h;
/**
* @param args
*/
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(new FileReader("C.in"));
PrintWriter out = new PrintWriter(new FileWriter("C.out... |
A11277 | A10912 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class Main {
public static void main(String args[]) throws NumberFormatException, IOException {
BufferedReader in = new Buff... |
B20856 | B20834 | 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.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) throws Exception {
Recycled object = new Recycled();
object.solve(object.getCl... |
A21557 | A22635 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | import java.io.File;
import java.io.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... |
A11277 | A10006 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class DancingWithGooglers {
public int max(int s, int q, int[] score){
int pass = 0, fail = 0, pos = 0;
for(int sc : score){
if(sc == 0){
if(q == 0)
pass++;
else fail++;
}
else if(sc == 1){
if(q... |
A12273 | A10627 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | package codejam;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Problem2 {
private static int [] MAX_NO_SURPRISE;
private static int [] MAX_WITH_SURPRISE;
public static void main(String[] args) throws IOException {
... |
A22992 | A21517 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Googlers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader read=new... |
B12762 | B12797 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package com.problemC;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class RecycledNumber {
private static int A = 1111;
private static int B = 2222;
public static int count = 0;
public static void main(String[] args) {
String[] s... |
B12669 | B11752 | 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.... | public class CodeJamLineParser {
private final String[] tokens;
private int position;
public CodeJamLineParser(String line) {
tokens = line.split("\\s");
position = 0;
}
public boolean hasNextField() {
return hasNextFields(1);
}
public int remainingFields() {
return tokens.length - position;
}
... |
B12082 | B13221 | 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.HashSet;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader bf = new BufferedReader(new FileReader(new File("C-small-attempt1.in")));
BufferedWriter bw = new BufferedWriter(new FileWriter(new File("C-small-attempt1.out")));
int T = In... |
B12115 | B13083 | 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.*;
import java.io.*;
public class C
{
public static void main( String args[] )throws Exception
{
ArrayList<String> arr = new ArrayList<String>();
Scanner in = new Scanner( System.in );
String nStr, pref, suff;
int i, j, a, b, count, test, lengthN, temp, lengthTemp;
test = in.nextInt();
... |
A10568 | A11252 | 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.IOException;
import java.util.Scanner;
public class code12 {
public static int nosurprise(int n){
int p= (n/3);
if(n%3==0){return p;}else{return (p+1);}}
public static int surprise(int n){
int p=(n/3);
if(n%3==2){return (p+2);}else{
if(n%3==1){return (p+1);}
el... |
B12570 | B11683 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.recyclednumbers;
import java.util.TreeSet;
import uk.co.epii.codejam.common.AbstractProcessor;
/**
*
* @author jim
*/
public class RecycledNumbersProcessor extends AbstractProcessor {
... |
B10245 | B10273 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
public class RecycleNumbers
{
@SuppressWarnings("deprecation")
private static void solveProblem()
{
// Stream to read file
FileInputStream fin;
// Str... |
A10568 | A11395 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws Exception {
FileReader in = new FileReader("F:\\download\\B-small-attempt0.in");
BufferedReader ... |
B12762 | B10594 | 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 ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.StringTokenizer... |
B10155 | B13150 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Recycling {
public static void main(String[] args) {
try{
//Input
FileInputStream fstream = new FileInpu... |
A22642 | A22217 | 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.*;
public class ProblemB
{
public static void main(String[] args)
{
try { System.setIn(new FileInputStream("B-large.in")); } catch (Exception e) { }
try { System.setOut(new PrintStream("B-large-out.txt")); } catch (Exception e) { }
Scanner sc = new Scanner(System.in);
i... |
B12082 | B11028 | 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 org.moriraaca.codejam;
import java.io.InputStream;
public abstract class GeneralDataParser extends AbstractDataParser {
public GeneralDataParser(InputStream input) {
super(input);
}
@Override
protected void parse() {
testCases = new TestCase[scanner.nextInt()];
super.parse();
}
}
|
B12074 | B10665 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... |
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
/**
*
* @author yilianz
*/
public class RecycleNumber{
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception{
// Read file
Scanner inFile = new Scanner(new... |
B12085 | B11363 | 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.ArrayList;
import java.util.Scanner;
public class Recycle2 {
private static int solve(int L, int H) {
class Slice {
int L,H,mul,dig;
Slice(int LL,int HH,int Mull,int digg) {
L=LL; H=HH; mul=Mull; dig=digg;
}
public String toString() { return String.format("%d-%d, %d(%d)", L,H,mu... |
A10996 | A10920 | 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.util.Arrays;
import java.util.Scanner;
public class DancingGoogler {
public static void main (String [] args) {
Scanner sc = new Scanner (System.in);
int x = sc.nextInt();
for (int i = 0; i < x; i++) {
int num = sc.nextInt();
int lim = sc.nextInt();
int goal = sc.nextInt();
int [] list = ... |
B10231 | B11571 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
public class C {
public static void main(String[] args) {
try {
BufferedReader input = new BufferedReader(new FileReader("/home/ramzy/Desktop/codejam/C-small.in"));
Pr... |
A21557 | A22599 | 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 com.Qualification_2012;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DancingWithGooglers {
private static int S = 0;
public static void main(String[] args) {
try {
Scanner sc = new Scanner(new ... |
B10245 | B12244 | 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.lily.acm.googleCodeJam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
public class RecycledNumbers
{
public static int getRecyleCount(int n,int ... |
B21790 | B21049 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | package 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... |
B11318 | B10993 | 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.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class Recycled {
public static String shift(String x){
return (x.substring(x.length() - 1) + x.substring(0, x.length() - 1));
}
public static void main(String[] args) {
int t, x = 1;
String a, b, s;
Scanner scan = ... |
A21557 | A20055 | 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) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google.code.jam.dancing.with.the.googlers;
import java.util.ArrayList;
/**
*
* @author Lucas
*/
public class BestResultFinder {
public ArrayList<Integer> findBestResult(ArrayList<ArrayList> list) {
... |
A11277 | A12479 | 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.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Dancing {
public static void main(String[] ar... |
B12085 | B11424 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class RecycledNumbers {
public static String input = "easy.txt";
public s... |
A20261 | A22858 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
if(args.length < 1)
return;
String inputFileName = args... |
A12273 | A12286 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
//1
//3 1 5 15 13 11
//
public class DancingWiththeGooglersCodeJam2012Q {
public int solves(int N,int S,int P,int scores[]){
int i = 0 ;
int sol = 0 ;
Arrays.sort(scores);
int TT = scores.l... |
A12846 | A11682 | 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... |
public interface ICounterZeroEvent {
public void fireEvent();
}
|
B12082 | B11260 | 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.File;
import java.util.*;
public class ProblemC {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("C:\\C-small-attempt0.in"));
//Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine().trim());
for(int i = 0; i < cases; i+... |
B11696 | B10069 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
*
*/
/**
* @author Abhimanyu
*
*/
public class C {
/**
* @param args
*/
public static void main(String[] args) {
try {
Scanner sc = new Scanner(System.in);
int caseNo = sc.nextInt(... |
A20730 | A22084 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | package 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;
... |
B11318 | B12757 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class TestGoogle3 {
public TestGoogle3() {
try {
// Open the file that is the first
// command line parameter
FileInputStream fstream = new Fi... |
B20856 | B21332 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
/**
* Apr 14, 2012Â
* @author parisel
* GGJ - Qualification Round
*/
public class C {
private static final int T... |
B21049 | B22138 | 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.*;
public class RecycledNo
{
public static void main (String arg[]) throws Exception
{
BufferedReader ob=new BufferedReader (new FileReader("C-large.in"));
PrintWriter pw=new PrintWriter ("output.txt");
String temp="";
temp=ob.readLine();
int t=Integer.parseInt(temp);
int a=0,b=0;
for(int l=1;l<=t;l++... |
A22360 | A21997 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | import java.io.*;
public class B
{
public static void main(String args[]) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
String[] line;
int N,S,p;
int[][] tuple = new int[1000][3];
int[][] stuple = new int[1000][3];... |
B10702 | B13173 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | package gcj;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) throws Exception
{
BufferedRea... |
A21557 | A22162 | 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.*;
import java.io.*;
import java.text.*;
import java.math.*;
public class DancingWithTheGooglers {
public static BufferedReader BR;
public static String readLine() {
try {
return BR.readLine();
} catch(Exception E) {
System.err.println(E.toString());
... |
A22360 | A22479 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
try{
int no, i, valuemax, surprise, p, n, j, temp;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
B10485 | B12342 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author harit
*/
public class Main {
public static void m... |
B11696 | B10341 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Saransh
*/
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
public class Main {
static int pts[];
static int n,s,p;
static int memo[][];
static boolean ... |
B10702 | B10186 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | package jwalinpandya;
import java.io.*;
import java.util.*;
/**
* @author Jwalin Pandya
*/
public class RecycledNumbers {
public static void main(String[] args) {
try {
String inputFilename = System.getProperty("user.dir")
+ System.getProperty("file.separator") + "C-small-attempt0.in";
String output... |
B13196 | B11469 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package com.codejam.googlearse;
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.HashSet;
public class Problem3 {
public static void main(String arg[])
{
... |
B10858 | B10987 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
|
import java.io.*;
import java.util.*;
public class trie
{
public static void main(String[] args)throws IOException
{
int i,j,a,b,n,ans;
String s1="",p1="";
solver h1=new solver();
Scanner fin=new Scanner(new File("A.txt"));
s1=fin.nextLine();
n=Integer.parseInt(s1);... |
B12085 | B10232 | 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.*;
import java.util.*;
/**
* Write a description of class Googlerese here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class RecycledNumbers
{
public static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
private int x;
private... |
A11502 | A11629 | 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.*;
public class B {
public final static String FILE_IN = "B-small-attempt0.in";
public final static String FILE_OUT = "B-small-attempt0.out";
public static class Case {
public int n, s, p;
public int[] t;
public String toString() {
re... |
B10702 | B10276 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author Mody
*/
public class c {
public static void main(String[] args) throws File... |
B21790 | B20754 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | package 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 = MultiMapKeyToList.make();
map.put("a",... |
B21968 | B20722 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
RecycledNumbers rec = new RecycledNumbers();
File file = new File("C:\\Users\\aadi\\Desktop\\Re... |
A21396 | A22919 | 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.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
int T = -1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)... |
B12570 | B11006 | 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 contests.GoogleCodejam.GCJ2012.qualification;
import contests.GoogleCodeJam.practice.GCJ2010.qualification.ProblemA;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
* Created with IntelliJ IDEA.
* User: vas... |
B10231 | B12241 | 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 com.google.codejam;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class RecycledNumberSolver {
public static int countRecycledNumber(int start, int end) {
int count = 0;
int numOfDigits = Strin... |
B21227 | B20621 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package utils;
/**
*
* @author Fabien Renaud
*/
public interface JamParser {
public JamCase getJamCase(int number);
} |
A11201 | A12578 | 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.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SpeakingTongues extends JamProblem {
Map<Character, Character> map = new HashMap<>();
public static void main(String[] args) throws IOException {
SpeakingTongues p = new SpeakingTongues();... |
A22378 | A22770 | 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 com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.OutputEntry;
public class BOutputEntry implements OutputEntry {
private int maximumGooglersNumber;
public void setMaximumGooglersNumber(int maximumGooglersNumber) {
this.maximumGooglersNumber = maximumGooglersNumber;
}
@Ove... |
A20934 | A22780 | 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 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... |
A22360 | A22928 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | package com.vp.iface;
public interface Problem{
public static int SPEAKGOOGLERESE = 1;
public static int DANCINGWITHGOOGLERS = 2;
public String solve(String dataset[]);
} |
A13029 | A11225 | 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... | /**
*
* @author jenny
*/
public class DancingGooglers extends javax.swing.JFrame {
int lineas = 0;
String entrada;
String salida = "";
/**
* Creates new form DancingGooglers
*/
public DancingGooglers() {
initComponents();
}
public void parsear(){
int im... |
A10568 | A12430 | 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.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class DancingWithGooglers {
static String max(String line, int index){
String[] array = line.split(" ");
int ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.