F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B12941 | B12450 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public static HashSet<Integer> used;
public static void main(String[] args) throws IOException {
PrintWriter out = new PrintWriter(new File(... |
A22378 | A20948 | 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 org.moriraaca.codejam;
public interface TestCase {
}
|
B10702 | B11188 | 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.FileNotFoundException;
import java.util.Scanner;
public class Recycling {
public static void main(String[] args) throws FileNotFoundException {
File file = new File("C-small-attempt0.in");
Scanner in = new Scanner(file);
int cases = in.nextInt();
for (int i = 0; i < ... |
A22078 | A20778 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | package problemB;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;
public class DancingwithTheGooglers {
public static void main(String[] args) throws IOException... |
B10702 | B11368 | 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.FileNotFoundException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class recycled {
static HashMap<Long, HashMap<Long, Integer>> found;
static Set<Long> touched;
public static int calc(long a, long b){
int comp... |
A12460 | A12305 | 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.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-small-attempt0.in");
int ca... |
A22191 | A22748 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | package com.google.code.p_b;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Main {
private static final String fromFile = "D:\\hobbies & work\\programing\\CodeJamT... |
A22191 | A22058 | 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.*;
import java.util.*;
public class BDancingGooglers {
public static void main(String[] args) throws IOException {
// parsing file
Scanner scanner = new Scanner(new File("B-large.in"));
int cases = Integer.parseInt(scanner.nextLine());
int[][] lineArray = new int[cases][];
int index = 0;
wh... |
A11502 | A11199 | 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.FileReader;
import java.util.Scanner;
public class Scores {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
try {
scan = new Scanner(new FileReader("B-small-attempt0.in"));
} catch (Exception e) {
System.out.println("poop");
}
int inputSize = Integer.par... |
B10231 | B11044 | 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.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Code3 {
private BufferedReader reader = null;
PrintStream out = null;
public static void m... |
A20119 | A20260 | 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,... | package com.gcj.parser;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;
public class Parser {
private String inputFileDest;
private FileInputStream fileInputStream;
public Parser(String inputFileDest) {
super();
... |
A10699 | A10466 | 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 codejam.suraj.quals2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public abstract class CodeJamSkeleton {
// To Read Input file
private BufferedReader fileReader = null;
private BufferedWriter fileWriter ... |
A22360 | A21714 | 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 ex2;
import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
for(int i = 0; i < n; i++) {
int g = in.nextInt(); // participants
int su = in.nextInt(); // anomalies
int s = in.nextInt(); // note maximu... |
B12762 | B11157 | 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 code.jam.y2012.quali;
import java.io.*;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class ProblemC {
private static String PATH = "F:\\dev\\projects\\code-jam-2012\\src\\code\\jam\\y2012\\quali";
File inputFile = new File(PATH, "C-small-attempt0.in");
... |
B20006 | B21234 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | import java.util.ArrayList;
import java.util.List;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
List<String> inputList = FileIO.readFile("C-large.in");
List<String> outputList = new ArrayList<String>();
int caseNo = 1 ;
int testCaseCount = Integer.par... |
B12074 | B12955 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | package google.contest.A;
import google.loader.Challenge;
import google.problems.AbstractReader;
public class AReader extends AbstractReader {
@Override
protected Challenge createChallenge(int number) {
int theLine = getActualLine();
String[] lines = getLines();
AChallenge chal = new AChallenge(theLine,lines... |
B22190 | B21914 | 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... | public class ProblemC extends FileWrapper {
private int A[] = null;
private int B[] = null;
private int digt[] = null;
public ProblemC(String fileName) {
this.processInput(fileName);
this.calculate();
this.processOutput(OUTPUT);
}
@Override
protected void processInput(String fileName) {
try {
this... |
B20734 | B20731 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | package fixjava;
/**
* Convenience class for declaring a method inside a method, so as to avoid code duplication without having to declare a new method
* in the class. This also keeps functions closer to where they are applied. It's butt-ugly but it's about the best you can do in
* Java.
*/
public interface Lambd... |
B12762 | B11837 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.List;
public class Numbers {
public static FileReader fr;
public static BufferedReader br;
public static FileWriter fw;
public static BufferedWriter b... |
A12460 | A11452 | 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 de.hg.codejam.tasks.io;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public abstract class Writer {
public static String generateOutputPath(String inputPath) {
return inputPath.substring(0, inputPath.lastIndexOf('.') + 1) + "out";
}
public static void print(Stri... |
A22078 | A20638 | 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.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Dancers {
public static void main(String args[]) throws IOException {
Scanner s = new Scanner(new File("D:\\input2.txt"));
FileWriter fo = new FileWriter(new File("D:\\workspace\\GC12\\src\\output... |
B20734 | B21343 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.io.*;
import java.util.*;
public class C {
BufferedReader br;
PrintWriter out;
StringTokenizer st;
boolean eof;
enum InputType {
SAMPLE, SMALL, LARGE;
}
static final InputType currentInputType = InputType.LARGE;
static final int attemptNumber = 0; // for small inputs only
int pow10;
v... |
A22771 | A21985 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class DancingWiththeGooglers
{
public static void main(String[] args) throws IOExceptio... |
A12273 | A10276 | 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 qualifs;
import gcj.Gcj;
import java.util.List;
public class B {
final String file;
B (String f) {
file = f;
}
public void run() {
Gcj gcj = new Gcj(file);
gcj.readLine();
int ncase = gcj.iToken();
for (int cas=1 ; cas <= ncase ; cas++) {
gcj.readLine();
int N = gcj.iToke... |
A21557 | A21470 | 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 googlecodejam2012;
import java.io.FileNotFoundException;
/**
*
* @author Pavlos
*/
public class ProblemB {
public static void main(String[] args) throws FileNotFoundException {
Read.OpenFi... |
A11917 | A11258 | 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.FileInputStream;
import java.io.InputStreamReader;
public class DancingWiththeGooglers {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
System.setIn(new FileInputStream("d... |
B12115 | B12667 | 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.*;
public class C {
static int[] ten;
static {
ten = new int[10];
ten[0] = 1;
for (int i = 1; i < ten.length; ++i) {
ten[i] = ten[i - 1] * 10;
}
}
static int max(int x) {
int n = 0;
while (ten[n + 1] <= x) {
++n;... |
A12570 | A12956 | 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.util.*;
public class b {
public static void main(String[] args) {
Scanner fin = new Scanner(System.in);
int numCases = fin.nextInt();
for (int loop=1; loop<=numCases; loop++) {
int numPeople = fin.nextInt();
int numSurprise = fin.nextInt();
int threshold = fin.nextInt... |
A12113 | A11005 | 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 com.clausewitz.codejam;
import com.clausewitz.codejam.qr2012.Dancing;
public class CodeJam {
/**
* @param args
*/
public static void main(String[] args) {
//Solver s = new Googlerese();
//s.solve("res/qr2012/A-small-attempt.in");
Solver s = new Dancing();
s.solve("res/qr2012/B-small-attempt2.... |
B21270 | B21901 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | package codejam03;
import java.io.*;
import java.util.StringTokenizer;
public class CodeJam03
{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T,A,B;
String temp1,temp2;
int output,n;
... |
A12570 | A12116 | 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.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author Prabu
*/
public class Main {
publi... |
B12941 | B12638 | 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.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanne... |
A10699 | A10260 | 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 files;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class Googler3 {
public static void main(String[] args) {
try
{
//BufferedReader br = new BufferedReader(new FileReader("/Users/Sush/Documents/works... |
B21207 | B20092 | 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.io.BufferedInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.FileWriter;
class Start{
BufferedInputStream bis=new BufferedInputStream(System.in);
PrintWriter out=new PrintWriter(System.out, true);
int i,j,k,l,m,n,o,p,q,r,s,t,w,x,y,z,ry,rz,rs;
long a,b,c;
double d,e,f,... |
B10361 | B10423 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | import java.io.*;
import java.util.*;
public class RecycledNumbers {
public static void main(String[] args){
try{
Scanner scan = new Scanner(new File("C:/personal/InterviewResource/GoogleCode2012/recycled/C-small-attempt0.in"));
BufferedWriter output = new BufferedWriter(new FileWriter(new File("C:/personal/In... |
B11327 | B11244 | 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]);
}
}
}
| /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
/**
*
* @author Madhav
*/
public class Recycl... |
A10699 | A10233 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
public class Dancing
{
public int specials = 0;
public int p = 0;
public static void main(String[] args) throws NumberFormatException, IOException
{
BufferedReader stdin = new BufferedRea... |
A22191 | A22277 | 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.File;
import java.util.Scanner;
public class Googlers {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("resource/B-large.in"));
int T = sc.nextInt();
int i = 1;
while (i<=T) {
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt()... |
B12762 | B13114 | 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.vp.common;
public class CommonUtility {
public static int[] convertStringArraytoIntArray(String[] sarray) {
if (sarray != null) {
int intarray[] = new int[sarray.length];
for (int i = 0; i < sarray.length; i++) {
intarray[i] = Integer.parseInt(sarray[i]);
}
return intarray;
}
retu... |
B12762 | B13119 | 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 ... | /**
*
*/
/**
* @author Mostafa
*
*/
public class RecycledNumbers {
public static String traverse(String x) {
char[] m = x.toCharArray();
m[0] = x.charAt(1);
m[1] = x.charAt(0);
String t = new String(m);
return t;
}
public static String traverse1(String x) {
char[] m = x.toCharArray();
m[0] =... |
B21270 | B20847 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | package codezam.exercise.WR1C2012;
public class PairNumber {
long numberA;
long numberB;
public PairNumber(long numberA, long numberB) {
super();
this.numberA = numberA;
this.numberB = numberB;
}
public long getNumberA() {
return numberA;
}
public void setNumberA(long numberA) {
this.numberA = num... |
B10149 | B11234 | 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.*;
public class RecycledNumbers {
public static void main(String[] args) {
System.out.println("Enter case input:");
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
sc.nextLine();
int[][] numbers = new int[T][2];
for (int t = 0; t < T; t++) {
numbers[t][0] = sc.next... |
A10699 | A10595 | 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 CaseSolvers;
import Controller.IO;
public class GooglereseCase extends CaseSolver {
static Character[] opa;
static {
opa = new Character[26];
opa['a' - 97] = 'y';
opa['b' - 97] = 'h';
opa['c' - 97] = 'e';
opa['d' - 97] = 's';
opa['e' - 97] = 'o';
opa['f' - 97] = 'c';
opa['g' - 97] = 'v';
... |
A11135 | A11703 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test2;
/**
*
* @author Student
*/
public class Score {
private int i;
private int j;
private int k;
private boolean surp;
public Score(int i, int j, int k,boolean surp) {
this.i ... |
A22360 | A21321 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... |
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.Writer;
import java.util.Scanner;
public class IOHelper{
Scanner sc=null;
Writer output=null;
public IOHelper(String input,String ouptPut){
try{
sc=new Scanner(new File(input));
output=new BufferedWriter(new Fil... |
A10793 | A10714 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class B {
static BufferedReader br;
static PrintWriter pw;
static StringTokenizer st;
static int k, ch, v = 0;
static int... |
B10858 | B11829 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| import java.util.Arrays;
import java.util.Scanner;
//Recycle
public class Main
{
public static void main(String[] args)
{
Main main = new Main();
main.run();
//main.checkRecycle(123, 233);
}
public void run()
{
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
f... |
B10899 | B12055 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | package com.google.codejam2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashMap;
import ja... |
B10245 | B11949 | 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 codejam2012.qualification;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class ProblemC {
public static void main(String[] args) throws Exception {
System.setIn(new File... |
B10155 | B11757 | 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.File;
import java.io.FileInputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
try {
File output = new File("output.txt");
if (output.exists()) {
output.delete();
}
... |
B12074 | B10978 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.*;
/**
*
* @author vichugof
*/
public class CodeJam {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code a... |
B20023 | B20905 | 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... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib.converters;
import com.isotopeent.codejam.lib.InputConverter;
public class DynamicMultiLineConverter implements InputConverter<Object[]> {
private static final int MAX_PARAM_COUNT = 10;
private IntArrayLine par... |
A12544 | A12499 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.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... |
A20934 | A22136 | 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 asem.googe.codejam.qround;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
/**
* @author A.Alathwari
*
* Problem C :
*
*/
public class ProblemC implements Runnable {
asem.core.util.InputReader fin;
java.io.PrintWri... |
B21227 | B21211 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | import java.util.*;
import java.io.*;
public class Solution {
FastScanner in;
PrintWriter out;
int doFromStr(String s, int k) {
int ans = 0;
for (int i = k; i < s.length(); i++) {
ans = ans * 10 + s.charAt(i) - '0';
}
for (int i = 0; i < k; i++) {
ans = ans * 10 + s.charAt(i) - '0';
}
return ans;... |
B20424 | B22014 | 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 er.dream.codejam.helpers;
import java.io.File;
import java.util.List;
public abstract class ProblemSolver {
protected FileHandler fileHandler = new FileHandler();
protected abstract List<String> handleInput();
public void execute(){
File[] files = fileHandler.listFiles();
for(File f : files){
... |
B11361 | B10545 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | import java.io.*;
import java.util.*;
public class Q3{
public static void main(String args[]){
try {
BufferedReader is = new BufferedReader(
new InputStreamReader(new FileInputStream(new File("C-small-attempt0.in"))));
BufferedWriter os = new BufferedWriter(
new OutputStreamWriter(new ... |
A12273 | A10768 | 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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Dancing {
private static Map<String, Str... |
A12570 | A12241 | 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.File;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
public static void main(String args[]) throws Exception {
final String PATH = "/home/goalboy/software installation/codejam-commandline-1.0-beta4/source/";
final String FILE = "B-sm... |
B10702 | B11564 | 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 codejam.is;
/**
* Created with IntelliJ IDEA.
* User: ofer
* Date: 4/13/12
* Time: 8:49 PM
* To change this template use File | Settings | File Templates.
*/
public abstract class TestAbstract implements Test {
private final static String newline = System.getProperty("line.separator");
@Overrid... |
A22642 | A20043 | 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 Qual2012;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Qual2012B {
public static void main(String args[]){
// String filePath = "X:\\GCJ\\2012B-small-attempt0.in";
String filePath = ... |
A22771 | A20483 | 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 dom.zar.jam.qualifications;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int inputLines = in.nextInt();
for (int i = 0; i < inputLines;) {
int googlers... |
B13196 | B10921 | 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 utils;
/**
*
* @author Fabien Renaud
*/
public abstract class Jam implements Runnable, JamParser {
protected final String[] lines;
protected final JamCase[] cases;
protected final int t;
private final String filenameInput;
private final String filenameOutput;
private final String[] output;
pr... |
B22190 | B21484 | 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 gcj2{
public static void main(String[] args) throws IOException{
BufferedReader inp = new BufferedReader(new FileReader("inp.txt"));
BufferedWriter out = new BufferedWriter(new FileWriter("out.txt"));
int test = Integer.parseInt(inp.readLine());
int p = 1;
while(t... |
A20119 | A21138 | 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,... | package com.gzroger.codejam2012;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class QB {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new FileReade... |
B20856 | B20833 | 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.File;
import java.io.FileNotFoundException;
import java.lang.Integer;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.TreeSet;
public class RecycledNumbers {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(new File("inpu... |
A21396 | A21902 | 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.*;
public class dancing {
static int N;
static int S;
static int p;
static int[] t;
public static boolean normal(int tot){
int max = tot%3==0?tot/3:tot/3+1;
return max>=p;
}
public static boolean surprising(int tot){
int max = tot==0?0:(tot+1)/3+1;
return max>=p;
}
public s... |
B12074 | B12736 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.util.Scanner;
public class C_RecycledNumbers {
static int[] bases = {0, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
static int digits(int value) {
int i = 0;
for (; i < bases.length && value >= bases[i]; i++);
return i;
}
static int shift(int value, int len) {
i... |
B11361 | B10740 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class problem3
{
void main()
{
solve();
}
public void solve()
{
... |
A22992 | A22367 | 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.blah;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
cl... |
A10996 | A13162 | 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 tr0llhoehle.cakemix.utility.googleCodeJam;
import java.text.ParseException;
/**
* This class is a base class for all concrete problems. It is used to define
* some methods necessary for the IOManager to work. It is crucial that the
* addValue-Method gets extended and called (super.addValue(o)) by the exten... |
A10568 | A13032 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package b;
import java.util.Arrays;
import java.util.Scanner;
public class B {
public B() {
Scanner s = new Scanner (System.in);
int t = s.nextInt();
for(int i =0; i < t; i++)
{
int n = s.nextInt();
int ss = s.nextInt();
int p = s.nextInt();
int[] vals = new int[n];
for(int j... |
A20382 | A21902 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.io.*;
public class dancing {
static int N;
static int S;
static int p;
static int[] t;
public static boolean normal(int tot){
int max = tot%3==0?tot/3:tot/3+1;
return max>=p;
}
public static boolean surprising(int tot){
int max = tot==0?0:(tot+1)/3+1;
return max>=p;
}
public s... |
A22360 | A20363 | 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 bsmall;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Vector;
public class Bsmall {
/**
* @param args
*/
public static void main(... |
B10245 | B13229 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashMap;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
... |
B11421 | B10153 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
public class CodeJam
{
private static BufferedReader reader;
private static BufferedWriter writer;
public stati... |
B10899 | B10769 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.Vector;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Str... |
A10568 | A11818 | 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.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class DancingGooglers
{
static BufferedReader br;
static PrintWriter pw;
public static void main(Stri... |
B21790 | B20260 | 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 codejam.recycle;
import java.util.HashSet;
import java.util.Set;
public class Recycle {
public String solve(String s) {
String[] ss = s.split(" ");
int a = Integer.parseInt(ss[0]);
int b = Integer.parseInt(ss[1]);
int n = ("" + a).length();
int m = 0;
for (int i = a; i <= b; i++) {
int[] d... |
A12846 | A12498 | 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 com.google.codejam;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class DancingWithGooglers {
public static void main(String argsp[]) throws NumberFormatException, IOException{
BufferedReader br = new BufferedReader(new I... |
B11318 | B13124 | 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.HashSet;
import java.util.Scanner;
public class RecycledNumbers
{
public static void main(String[] args) {
Scanner mark = new Scanner(System.in);
int t = mark.nextInt();
int A, B, counter;
mark.nextLine();
for (int i = 0; i < t; i++)
{
A = mark.nextInt();
B = mark.ne... |
B21790 | B20058 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | import java.io.*;
import java.util.*;
/**
* @author Chris Dziemborowicz <chris@dziemborowicz.com>
* @version 2012.0414
*/
public class RecycledNumbers
{
public static void main(String[] args)
throws Exception
{
// Get input files
File dir = new File("/Users/Chris/Documents/UniSVN... |
A11277 | A11081 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | package codejam;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Second {
public static void main(String[] args) throws FileNotFoundException {
String path = ClassLoader.getSystemClassLoader().getResource("codejam/").getPath();... |
B12085 | B13018 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package question3;
/**
*
* @author karim
*/
public class Pair {
private Integer int1;
private Integer int2;
public Pair() {
}
public Pair(int int1) {
this.int1 = int1;
}
public... |
B12669 | B11503 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | package com.prob1;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class ClassB {
public static void main(String args[]){
try{
... |
A11502 | A10832 | 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... | package practice.GC2012;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Dancers {
public static void main(String args[]) throws ... |
B10485 | B12894 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] argv) {
int lineCount,counter,mHold;
int n,m,recycledNumbers;
Scanner input = null;
try { input = new Scanner(System.in); }
catch (Exception e) { System.err.println("FileNotFoundException: " + e... |
B10149 | B10919 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package codejam.qualification;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Recycled {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
String file = "input3small";
Scanner in = new Scanner(new File(file)... |
B21227 | B20724 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class CodeJam {
public static void main(String [] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int num = Integer.parseInt(b... |
A10793 | A10138 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | package dancingwiththegooglers;
import java.util.Arrays;
import template.Template;
public class DancingWithTheGooglers extends Template {
public static void main(String[] args) throws Exception {
init("src/dancingwiththegooglers/B-small-attempt3");
int lines = readInt();
for (int i = 1; i <= lines; i++) {
... |
A21396 | A21195 | 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.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.StringTokenizer;
public class Solution implements Runnable {
private BufferedReader in;
private StringTokenizer st;
private PrintW... |
B12085 | B11754 | 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.File;
import java.io.FileReader;
import java.io.IOException;
public class CodeJamTextInputReader {
private final BufferedReader reader;
private final int numberOfTestCases;
private int lastReadTestCase = 0;
public CodeJamTextInputReader(File inputFile) throws IOExce... |
A21557 | A23013 | 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 tr0llhoehle.cakemix.utility.googleCodeJam;
public interface Solver<T extends Problem> {
public String solve(T p);
}
|
B21752 | B21413 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | package RecycledNumbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.u... |
A11135 | A12409 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.util.*;
import java.io.*;
public class Googlers {
public static void main(String[] args)throws IOException {
Scanner sc = new Scanner(new File("input2.txt"));
int loop = sc.nextInt();
int num;
int s = 0;
int p;
int n;
int count = 0;
int check;
ArrayList<Integer> a... |
A12460 | A12950 | 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.util.Scanner;
public class Dancing {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int i=0; i<T; i++)
{
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt();
// int [] score = new int[N];
int numPass = 0;
f... |
A20934 | A22406 | 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.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.FileWriter;
import java.io.PrintWriter;
import ... |
B11318 | B13063 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | package com.google.codejam.recycle;
/**
* Class to hold the result of given test case.
* @author Sushant Deshpande
*/
public class TestResult {
/**
* variable to represent testOutput.
*/
private int testOutput;
/**
* Constructor to create TestResult with testOutput.
* @param testO... |
B21790 | B20600 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | import java.util.*;
import static java.lang.System.*;
class C{
static public void main(String[] args){
Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine());
for(int c = 1; c<=cases; c++){
String[] s = sc.nextLine().split(" ");
int a = Integer.parseInt(s[0]);
int b = I... |
A21557 | A22445 | 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 B {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int cases = s.nextInt();
for (int i=1; i<=cases; i++) {
int n = s.nextInt();
int surprising = s.nextInt();
int p = s.nextInt();
int number = 0;
for (int j=0; j<n; j++) {
int t = s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.