F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A20119 | A20023 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class InputReader {
private BufferedReader br = null;
public InputReader(String fileName) {
try {
br = new BufferedReader(new FileReader(fileName));
}... |
A20382 | A20213 | 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... | // no.of users
// no. of sets
// minimum best
// scores
import java.io.*;
import java.util.Scanner;
public class abc
{
public static void main(String args[])
{
try{
FileWriter fstream = new FileWriter("outB.out");
FileInputStream fstream1=new FileInputStream("B-large.in");
DataInputStream in=new DataInputStream(fs... |
A20119 | A22760 | 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 main;
import java.util.Vector;
import java.io.*;
public class Googlers {
/**
* 2012 Qualif B
*/
static int numberOfElementForEachTest = 0;
static int numberOfLinesPerTest = 0;
public static void main(String[] args) {
Vector<Integer> elements = new Vector<Integer>();
numberOfElementForEachTest =... |
A22771 | A21874 | 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.*;
import java.util.*;
public class Main {
private static IO io;
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
io = new IO(System.getProperty("ONLINE_JUDGE")!=null);//false->files; true->console
... |
A22191 | A22267 | 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.*;
import java.math.*;
public class DancingWithTheGooglers {
public static void main (String args[]) throws Exception {
Scanner scan = new Scanner(System.in);
int T = scan.nextInt();
for (int i = 1; i <= T; i++){
int N = scan.nextInt();
int S = scan.nextInt();
... |
B10361 | B12883 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.Scanner;
class MyPair
{
public int one = 0;
public int two = 0;
};
public class ProblemC
{
public static boolean has(int one, int two, LinkedList<MyPair> list)
{
for (int i =... |
B12082 | B11280 | 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 com.google.codejam;
public class CodeJamTest {
public static void main(String[] args){
Utils.run(RecycledNumbers.class);
}
}
|
B20023 | B22152 | 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... | import java.util.HashSet;
import java.util.Scanner;
public class RN {
static int A,B;
static int[] chuso = new int[11];
static int result = 0;
// 2121
public static void RN(int n, int B)
{
HashSet<Integer> hs = new HashSet<Integer>();
String ns = Integer.toString(n);
int nl = ns.length();
for (int i =... |
A11201 | A11731 | 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 de.johanneslauber.codejam.model.impl;
import de.johanneslauber.codejam.model.BaseProblem;
import de.johanneslauber.codejam.model.ICase;
import de.johanneslauber.codejam.model.IProblem;
/**
*
* @author Johannes Lauber - joh.lauber@googlemail.com
*
*/
public class DancingGooglersProblem extends BaseProble... |
A10699 | A10255 | 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.util.Scanner;
/**
* Google Code Jam 2012
*
* @author 7henick
*/
public class ProblemB {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
sc.nextLine();
for (int i = 0; i < T; i++) {
in... |
A20934 | A21051 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... |
import java.io.*;
import java.util.StringTokenizer;
public class Solution {
public static void main(String args[]){
try{
FileInputStream fin=new FileInputStream("C:\\Program lang\\Google Code Jam\\input00.txt");
DataInputStream datain=new DataInputStream(fin);
BufferedReader br=new BufferedReader(new InputSt... |
A21010 | A21579 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.common;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
/**
*
* @author jim
*/
public class Output {
private final S... |
B12762 | B11441 | 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.gcj;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
public class HallOfMirrors {
public static Integer mirrors(String ... |
B21207 | B20570 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | package problemC;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.StringTokenizer;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedR... |
A12113 | A11287 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class QualB
{
public void run()throws IOException
{
Scanner in = new Scanner(new File("b.in"));
PrintWriter out = new PrintWriter("b.out");
int nt = in.nextInt();
in.nextLine();
for(int it = 1;... |
B12115 | B12173 | 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();
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012pa;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
*
* @author Fred
*/
public class CodeJam2012PA
{
/**
* type entrada.txt | j... |
B21270 | B20043 | 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.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Recycle2 {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Scanner in = new Sc... |
B21790 | B21483 | 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.HashSet;
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner oku = new Scanner(System.in);
int test = oku.nextInt(), A = oku.nextInt(), B = oku.nextInt(), dijit = Integer.toString(A).length(), sayimiz = 0;
HashSet<Integer> eleme;
for (int i = 0; ... |
B11327 | B12930 | 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 qual2012;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.HashSet;
public class C {
public static void main(String[] args) throws FileNotFoundException {
Kattio io;
// io = new Kattio(System.in, System.out);
// io = new Kattio(new F... |
B22190 | B20229 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.io.BufferedReader;
import java.io.FileReader;
public class C {
private static final String head = "Case #";
public static void main(String[] args) {
try{
FileReader f = new FileReader(args[0]);
BufferedReader b = new BufferedReader(f);
String s;
... |
B10155 | B10131 | 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.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class main2 {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws Numb... |
B10231 | B11492 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
public class RecycledNumbers {
/**
* @param args
* @throws IOException
*/
pub... |
B12941 | B11959 | 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.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.InputMismatchException;
import java.math.BigInteger;
public class Recycled {
static... |
A22642 | A20136 | 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 taskB {
PrintWriter out;
BufferedReader br;
StringTokenizer st;
String nextToken() throws IOException {
while ((st == null) || (!st.hasMoreTokens()))
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int nextInt() throws IOExcept... |
A11277 | A12715 | 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 com.dagova.dancingWithTheGooglers;
public class DancingWithTheGooglersSolver
{
private int solution;
private int bestScore;
private int surprisedTriplets;
private int numberOfGooglers;
public DancingWithTheGooglersSolver()
{
solution = 0;
}
private void checkTotalPoints(int googlerTotalPoints... |
A11135 | A10018 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class R1P2 {
/**
* @param args
*/
public static void main(String[] args) throws Exception{
BufferedReader in = new BufferedReader(new FileReader("B-small-attempt0.in"));
BufferedWrite... |
B12570 | B10571 | 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 CodeJam;
import java.io.*;
import java.util.Scanner;
public class C_2012 {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("test.out")));
int c = in.nextInt();
for(int cases=0;c... |
B21227 | B20240 | 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.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
/**
*
*/
/**
* @author Bageshwar
*
*/
public class Recycle {
/**
* @param args
* @throws IOException
*/
public static void main(Strin... |
B12669 | B12614 | 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 util.graph;
public abstract class State implements Comparable{
}
|
A10699 | A11055 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class PB {
public static void main(String[] args) throws FileNotFoundException {
if (args.length != 1) {
System.exit(1);
}
File inFile = new File(args[0]);
... |
B10702 | B10984 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
public class RecycledPair {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new FileReader("input.txt")... |
B11361 | B12067 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | package com.ivantod.codejam2012;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Numbers {
private void process() throws Exception {
Scanner s=new Scanner(System.in);
int numCases=s.nextInt();
s.nextLine();
for (int ca=1; ca<=numCases; ca++) {
int A=s.nextInt()... |
A21557 | A22441 | 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) ... | /*
* Abstract class that reads either the standard input, a named file, or prompts at the terminal.
* Implement "process" for each CodeJam problem.
* Reads input through a ReadWrapper, wrapping a BufferedReader.
*/
import java.io.*;
import java.util.StringTokenizer;
import java.text.*;
public abstract class CodeJ... |
B20291 | B21297 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | package com.gdacarv.codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class ProblemC {
public static void main(String [ ] args){
try{
FileInputStream fstream = new FileInputStream("input_problemC.in");
DataInputSt... |
A11502 | A13033 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers {
public static void main(String args[]) throws IOException{
Scanner scan=new Scanner(new File("B-small-attempt2.in"));
PrintWriter pw=new PrintWriter(new File("result.txt"));
int caseNum=Integer.parseInt(scan.nextLine());
f... |
B10231 | B12591 | 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.*;
import java.util.*;
public class Init {
/**
* @param args
*/
public static void main(String[] args) {
try {
// ----------------------------------------------------- //
BufferedReader br = new BufferedReader(new FileReader("C:\\input.in"));
BufferedWriter bw = new BufferedWriter(n... |
B22190 | B21192 | 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 interface ICounterZeroEvent {
public void fireEvent();
}
|
B20023 | B21066 | 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... | 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.HashSet;
public class Main {
/**
* @param arg... |
A10699 | A12593 | 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.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt(); in.nextLine();
//build auxiliary arrays
int[] without = new int[31];
int[] with = new int[31];
for (int i = 0; i <= 30; i++)
{
without[i] = (int)... |
B20006 | B20857 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package 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... |
B20856 | B21054 | 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.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
public class reycle {
public static void main(String[] args) throws Exception {
BufferedReader in = new Buffe... |
A12113 | A11971 | 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 QualificationB;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Arrays;
public class ProblemB {
public static void main(String args[]) throws Exception{
FileReader fr = new FileReader(args[0]);
BufferedReader br = new BufferedReader(fr);
... |
B10702 | B12920 | 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 third;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.u... |
B10245 | B11273 | 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 google.jam.code;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* @author walir
*
*/
public class RecycledNumbers {
private BufferedReader bufferedReade... |
B21049 | B20311 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | package codejam;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Set;
public class C {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new File... |
A11135 | A11596 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | package quals;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
BufferedReader reader =... |
B10155 | B13082 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | package qualification;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
static final int MAX = 3000;
static Set<Integer> dic[] = new HashSet[MAX];
public static void main(String[] args) {
for (int i = 1; i < MAX; i++) {
dic[i] = new HashSet<Integer>();
String s = ... |
A20119 | A23061 | 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,... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlecodejam;
/**
*
* @author Bhanu
*/
import java.util.*;
public class DancingGooglers {
public static void main(String arg[]) throws Exception
{
int s1[] = {0,1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,... |
B20856 | B21528 | 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.*;
class Recycled
{
public static void main(String args[])throws IOException
{
BufferedReader x=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(x.readLine());
long c[]=new long[t];
for(int i=0;i<t;i++)
{
c[i]=0;
long a=0,b=0;
String q=x.readLine();
for(int j=0;j<q.length();j+... |
A12460 | A12594 | 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.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner s = new Scanner(new File("input"));
BufferedWriter w = new BufferedWriter(new FileWriter(new File("output")));
int cases = ... |
A22378 | A20335 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | package codejam;
import java.util.*;
import java.io.*;
public class DancingWithTheGooglers {
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.readL... |
A20119 | A20527 | 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 practice;
import java.util.*;
public class GoogleDance {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine());
for(int i = 0; i<cases; i++){
//Case starts here
int caseCounter = i+1;
String caseLine = sc.nextLine();
String[... |
B12115 | B10258 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | package com.numbers.recycle.io;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.List;
public class FileOutputWriter {
private FileWriter writer;
private BufferedWriter bWriter;
public void writeToFile(List<String> outputFileContents) {
File file = new File("C:/... |
B21207 | B22035 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | package 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... |
B20023 | B22096 | 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 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 ... |
B10245 | B12904 | 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.brianghig.gcj.recyclednumbers;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.... |
A12846 | A10486 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class dancing {
static int surprising;
/**
* @param args
*/
public static final int regexOccur(String text, String regex) {
Matcher matcher = Pattern.compile(regex).matcher(text);
int occur = 0;
while(ma... |
A12570 | A10057 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google.code.jam.dancing.with.the.googlers;
/**
*
* @author Lucas
*/
public class GoogleCodeJamDancingWithTheGooglers {
/**
* @param args the command line arguments
*/
public static void mai... |
A12113 | A11380 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
public class GCJ2012QA
{
public static void main(String[] args) throws Exception
{
Scanner sc = new Scanner(new FileReader("A-input.txt"));
PrintWriter pw = new PrintWriter(new FileWrit... |
A22360 | A20701 | 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 G2 {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new FileReader("d:\\B-large.in"));
int n = Integer.parseInt(in.readLine());
int cnt;
int surprize;
int min;
int[] points;
Buf... |
B10155 | B12683 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
RecycledNumbers r = new RecycledNumbers();
r.run("C-small.in", "C-small.out... |
B12082 | B12223 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.util.*;
public class QC {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[][] ROT = new int[2000001][7];
for(int i=1; i<=2000000; i++) {
int A = i;
int pow10 = 1;
while(A > 0) { pow10*=10; A/=10; }
pow10 /= 10;
A = i;
int ix = 0;
do {
if(A <... |
B21049 | B21762 | 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.util.HashSet;
import java.util.Scanner;
public class qualifier3 {
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int numcases = sc.nextInt();
sc.nextLine();
for(int curcase = 1;curcase <=numcases;curcase++)
{
int min = sc.nextInt();
int max = sc.nextInt();
int ... |
A10793 | A10996 | 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.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);
... |
A11502 | A11867 | 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.math.*;
import java.util.*;
class Main{
static BufferedReader br;
static PrintWriter pw;
static File in;
static File out;
static String name="B-small-attempt0";
public static void main(String[] args){
try{
in=new File(name+".in");
out=new File(name+".out");
br=new Bu... |
B12115 | B11343 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Recycle {
/**
* @param args
*/
static int t =0;
//static ArrayList<ArrayList<String>> table = new ArrayList<ArrayList<String>>();
public static void... |
B12669 | B10844 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class RecylcedNumbers {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(new File("input.in"));
BufferedWriter bfr... |
A11201 | A13186 | 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 qualification.b;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Core {
public static void main(String[] args) {
int t, n, s, p;
try {
Scanner scan = new Scanner(new File(args[0]));
... |
A12570 | A11114 | 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 com.googlecode.codejam.contest.gcj2012.round_q;
import java.util.Arrays;
import java.util.Iterator;
import java.util.concurrent.Callable;
import com.googlecode.codejam.model.JamCaseResolver;
import com.googlecode.codejam.model.JamCaseResolverFactory;
import com.googlecode.codejam.model.JamResolver;
public cl... |
B11327 | B10055 | 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 code_jam_2012_qualification_round;
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.StringTokenizer;
public class C {
public static void main(String[] args) throws IOE... |
A11201 | A11926 | 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.... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google.code.jam;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Bogatinovi
*/
public cla... |
A13029 | A12385 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Solution2 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// System.out.... |
B21207 | B21875 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.util.Scanner;
public class Shift {
public static void main(String[] args) {
int a,b,c,d=10,e=0,x,T,j;
int inf,sup,res=0;
Scanner l = new Scanner(System.in);
T=l.nextInt();
for(j=0;j<T;j++){
inf=l.nextInt();
sup=l.nextInt();
res=0;
for(int k=inf;k<=sup;k++){
x=k;
int vixi=k;... |
A10699 | A13205 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package com.codejam;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashMap;
public class DancingWithTheGooglers {
public static void main(String[] args) {
try {
FileInputStream fstream =... |
A12273 | A12072 | 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 com.renoux.gael.codejam.utils;
import java.util.ArrayList;
import java.util.List;
/**
* Pour tests unitaires
*
* @author renouxg
*/
public final class ListUtils {
public static List<Integer> parseInts(List<String> strings) {
ArrayList<Integer> list = new ArrayList<Integer>();
for (... |
B10245 | B10203 | 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.bakes;
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 B {
public static void main(String[] args) {
B park = new B();
park.calculate();
}
private void c... |
A12570 | A12226 | 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... | public class DancingWithGooglers {
public static int[] numbers(int given, boolean check, int p) {
int[] solution = new int[3];
int []answer= new int[2];
int num = given / 3;
int mod = given % 3;
solution[0] = num;
int remain = given - num;
int newN = remain / 2;
solution[1] = newN;
solution[2] = rem... |
A11201 | A10331 | 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 sample;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class SampleMain {
public static void main(String[] args) throws Exception {
String linesFile = //args[0];
"lines.txt";... |
A11201 | A11295 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | package codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintWriter;
public class CodeJamRunner {
private PrintWriter pw = null;
/**
* Override this to do the real stuff.
* @param inputLine
*/
protected void process( int lineNr, String inputLine )
{
... |
A10793 | A10044 | 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.util.Scanner;
import java.util.ArrayList;
public class dancing {
public static void main(String [] args){
Scanner Keyboard = new Scanner(System.in);
int testCases;
ArrayList<String> input = new ArrayList<String>();
ArrayList<Integer> totalPoints = new ArrayList<Integer>();
int whitespaceNumber =... |
B12074 | B11634 | 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.*;
import java.io.*;
public class qualC
{
public static void main(String[] args) throws IOException
{
Scanner sin = new Scanner(new File("/Users/G/Documents/Programming/Java/CodeJam2012/C-small-attempt0.in"));
int t = sin.nextInt(), a, b;
for(int i = 1; i <= t; ++i)
{
a = sin.nextInt()... |
B10231 | B12871 | 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 jpt.codejam;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Codejam2012 {
static void solve_Qual_B() throws Exception {
Scanner in = new Scanner(System.in);
PrintStream out = System.out;
int cases = in.nextInt();
for (int nCase = ... |
B12570 | B11037 | 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.*;
import java.util.*;
class Recycling {
static Scanner sc;
static ArrayList<Integer> found;
static void run()
{
int A = sc.nextInt();
int B = sc.nextInt();
found = new ArrayList<Integer>();
int total = 0;
for (int n = A; n < B; n++) {... |
A22642 | A21748 | 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.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new File("B-large.in"));
FileWriter fw = new FileWriter("B-large.out");
int T = in.nextInt();
for... |
B11696 | B12120 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
public class RecycledNumbers {
public static ... |
A20934 | A22414 | 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;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;
public class Dancing
{
public static void main(String[] args) throws FileNotFoundException, IOException
{
IO.changeGoogleIO('B', 1);
Scanner input = new Scanner(System.in);
... |
A22078 | A21379 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Main
{
public static HashMap<Chara... |
A22191 | A22715 | 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.util.*;
/**
* Google Code Jam 2012 Qualification Round Problem B: Dancing With the Googlers
*
* @author Wayne Roswell
* @version (4/14/2012 3:20PM EST)
*/
public class Dancing
{
public static void main(String[] args)
{
Scanner a = new Scanner(System.in);
String b = a.n... |
A20490 | A20930 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | import java.awt.List;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Vector;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class ... |
A21010 | A21246 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package google_code_jam;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) th... |
B11327 | B12737 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class Main {
public Scanner sc;
public Map<Character, Character> mapping = new HashMap<Character, Character>();
public static void main(String[] args) {
Main m = new Main();
m.start(... |
A21010 | A20367 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package B;
import java.io.*;
public class B {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new FileReader("B.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("B.out")));
int n = Integer.parseInt(in.readLine());
for (int i = 0;... |
A10793 | A11064 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Dancer {
public static void main (String [] args) throws Exception {
FileInputSt... |
A11201 | A11742 | 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 com.google.code;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public abstract class GCJ {
private BufferedReader input;
private BufferedWriter output;
String inputLine;
String[] brokenU... |
B10231 | B12261 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
private static final String fname = "C-small-attempt0.in";
public static void main(String[] args) throws Exception {
ne... |
B12082 | B11817 | 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... | /**
* Google CodeJam 2012
* General framework that takes care of the similar and repetitive tasks for all the problems.
* E.g. managing case input and output.
*
* By Üllar Soon <positivew@gmail.com>
*/
package eu.positivew.codejam.framework;
import java.io.BufferedReader;
/**
* CodeJam IO input interface.
*... |
A12211 | A10988 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int tc=Integ... |
B12082 | B11512 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.io.*;
import java.util.*;
public class Recycled {
public static void main(String[] args) {
BufferedReader input = null;
BufferedWriter output = null;
try {
input = new BufferedReader(new FileReader("C:\\Users\\cerebrus\\eclipse-workspace\\QualiC-Recycled\\src\\C-small-attempt0.in"));
output =... |
A11502 | A12027 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.util.Scanner;
public class Dancing {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int numberOfLines = Integer.parseInt(in.nextLine());
for(int lineNum = 1; lineNum <= numberOfLines; lineNum++){
int totalDancers = in.nextInt();
int lifeLines = in.nextInt();
... |
A20119 | A20431 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithTheGooglers {
public static int count(int N, int S, int p, int[] num){
int sureCount = 0;
int possibleCount = 0;
for(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.