F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A21010 | A20803 | 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 be.mokarea.gcj.common;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.Writer;
public abstract class GoogleCodeJamBase<T extends TestCase> {
protected abstract Transformation<T> createTransformation(TestCaseReader<T> testCaseReader, PrintWriter outputWriter) throws Exception;
protecte... |
A22771 | A22625 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlecodejam;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
*
*... |
B21207 | B22192 | 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 gcj;
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.*;
public class Main {
public static void main(String[] args) {
String filenamein = "C-large.in... |
B12074 | B11294 | 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 Solution {
public void doMain() throws Exception {
Scanner sc = new Scanner(new FileReader("/home/vivek/workspace/codejam2012problem2/src/input.txt"));
PrintWriter pw = new PrintWriter(new FileWriter("/home/vivek/workspace/codejam2012problem2/src/output.txt"));
... |
B12074 | B13184 | 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;
import java.io.*;
import java.lang.*;
class recycle
{
static int attempts;
public static void main(String args[]) throws IOException
{ int a[]=new int[50],b[]=new int[50],x;
recycle obj=new recycle();
int i,m,n,result[]=new int[50];
Scanner cin=new Scanner(System.in);
int k=cin.nextInt();
fo... |
A22191 | A20264 | 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 problemB;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.Writer;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
Writer write = new FileWriter(new File("out.txt"));
Writer writer ... |
A22191 | A22609 | 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 main;
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 TestClass {
public static void main (String[] args) throws IOException, InterruptedException {
... |
A11277 | A12377 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Main {
private static String fileDirectory = "files/";
/**
* @param args
*/
public static void main(String[] args) {
... |
A20934 | A21952 | 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 qr1;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import static junit.framework.Assert.assertEquals;
/**
* Created with IntelliJ IDEA.
* User: shtratos
* Date: 14/04/12
* Time: 04:28
*/
public class DancingGooglers {
publi... |
A13029 | A10111 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | package org.alaoui.googledance;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class App {
public static void main(String[] args) throws NumberFormatException,
IOException {
InputStream is = App.class
.getResourceAsStream("/org... |
A12544 | A10014 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | package com.codejam.solution;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
public class GoogleDance {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader ... |
B21270 | B20534 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.ObjectInputStream.GetField;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.math.BigInteger;
public class C {
private static char[] alph;
p... |
B12115 | B11281 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | package com.google.codejam;
public class RecycledNumbers {
public int solve(int[] n){
int res = 0;
int len = getLen(n[0]);
int[] sh = new int[len-1];
for (int i = n[0]; i <= n[1]; i++) {
for (int j = 1; j < len; j++) {
int ni = shift(i, j, len);
sh[j-1] = ni;
if(ni > i && ni <= n[1]) {
bo... |
B12082 | B10356 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author Calido
*/
class myobj
{
long n;
long m... |
A20119 | A22556 | 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.theblind.problem;
import java.util.ArrayList;
import java.util.Scanner;
import com.theblind.utility.FileUtility;
public class DancingWiththeGooglers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
String ... |
B20006 | B22202 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
public class RecycledNumber {
private void solve(BufferedReader f, PrintWriter out) throws IOException {
int T = re... |
B21227 | B20461 | 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 static java.util.Arrays.deepToString;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
public class QC {
public static void main(String[] args... |
B21207 | B21211 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.util.*;
import java.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;... |
A22642 | A20081 | 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 qualificationRound;
public class Dancing {
/**
*
* @param N
* Number of Googlers
* @param S
* number of surprising triplets of scores
* @param P
*
* @param Ti
* the total points of the Googlers
*
* @return what is the maximum number of Googlers that c... |
B10231 | B11769 | 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 de.johanneslauber.codejam.model;
/**
*
* @author Johannes Lauber - joh.lauber@googlemail.com
*
*/
public interface ICase {
public void setLine(int lineNumber, String lineValue);
public int getNumberOfAttributes();
}
|
B11361 | B10919 | 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 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)... |
B20566 | B21134 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | package gcj2012.qual;
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Character.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.math.BigInteger.*;
public class C {
static final char PROB = C.class.getSim... |
B10858 | B10751 | 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.HashSet;
import java.util.Scanner;
public class recycled {
public static void main(String[] args){
int t;
Scanner s = new Scanner(System.in);
t=s.nextInt();
for(int k=1;k<=t;k++){
int a,b;
a=s.nextInt();
b=s.nextInt();
int al=a/10,d=1;
while(al>0){
d++;
al/=10;
}
... |
A11277 | A12644 | 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 jp.ne.sakura.yuki2006.CodeJam;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class CodeJam {
private FileWriter file;
static int caseNumber = 0;
private Scanner stdIn;
private void write(String data) {
caseNumber++;
try {
file.append("Case #");
file.ap... |
B12115 | B11517 | 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();
... | /**
* Recycled Numbers
*/
package com.google.jam.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import j... |
A13029 | A10120 | 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 com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream;
import sun.tools.tree.ReturnStatement;
import javax.swing.*;
import java.io.*;
import java.util.ArrayList;
/**
* Date: 14/4/12
* Time: 9:19 AM
*/
public class GoogleFileStream {
public static ArrayList<String> getInput() throws IOE... |
B20734 | B20141 | 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.util.Scanner;
import java.util.TreeSet;
public class C {
static TreeSet<Integer> s;
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner kb = new Scanner(System.in);
int t = kb.nextInt();
int c = 1;
int cnt, a, b;
while(t-- > 0)
{
... |
A10996 | A11542 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
/**
* @param args
* @throws IOException
*/
public... |
A12211 | A13037 | 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... | package dance;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Arrays;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void mai... |
A22378 | A22605 | 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 gcj2012.qr;
import java.io.*;
import java.util.StringTokenizer;
/**
*
* @author Scott DellaTorre
*/
public class B {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("src/gcj2012/qr/in"));
PrintWriter out = new PrintWrit... |
A11502 | A11611 | 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 com.jp.common;
import java.util.HashMap;
import com.codejam.two12.GooglerDance.GDSmallProblem;
import com.codejam.two12.GooglerDance.GooglerDance;
import com.codejam.two12.RecyledNumbers.RecycledNumbers;
import com.codejam.two12.tongue.SpeakingTongues;
import com.jp.storeCredit.StoreCredit;
public class Puzz... |
A21010 | A21571 | 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 me.mevrad.codejam;
import java.util.ArrayList;
public class DataTemplate {
public int numberOfGooglers;
public int surprisingScores;
int p;
public ArrayList<Integer> scores;
public DataTemplate(){
scores = new ArrayList<Integer>();
}
}
|
B11421 | B11608 | 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.File;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.io.FileReader;
public class C {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
BufferedReader reader = null;
String fileName = "C-small-attempt2.in";
... |
B20023 | B21072 | 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 template;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.util.ArrayList;
public class TestCaseIO {
public static ArrayList<TestCase> loadFromFile(String infile) {
//inc checks on #lines, length of splits, etc.
BufferedReader br = Utils.newBufferedReader(infile);... |
A22378 | A23050 | 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.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Dancing {
Scanner in;
PrintWriter out;
int N;
int P, S;
public void solve() throws IOException {
int tn = in.nextInt();
in.... |
A22771 | A22473 | 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.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)... |
B10231 | B12356 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... |
import java.util.HashSet;
import java.util.Scanner;
/**
* @author Anil Kishore, India
*/
public class Qual_C
{
static int get(int x, int A, int B)
{
int r = 0;
String s =""+x;
HashSet<Integer> set = new HashSet<Integer>();
for(int i=1;i<s.length();i++)
if(s.charA... |
A12544 | A12011 | 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.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main {
/**
* @param args
*/
public static void main(String[]... |
B11318 | B11152 | 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 main;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
impor... |
A22191 | A20540 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.*;
public class B {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("B.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("... |
B10702 | B11827 | 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 main;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class main {
public static void main(String[] args) throws IOException{
String text = "";
int lineCounter = 0;
int totalLength = 2;
int outputTot... |
A21010 | A20699 | 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 code;
/**
*
* @author Yogendra
*/
import java.io.*;
import java.util.Scanner;
public class second {
static int x,y,z;
public static void main(String[] args) throws IOException {
... |
A11917 | A10106 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | package my.codejam;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author "Dzianis Siarheyeu" <denser.by@gmail.com>
* ... |
B12570 | B12850 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class RecycledNumbersSmall {
/**
*... |
B13196 | B10271 | 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 ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlejam2012qrc;
import java.io.*;
/**
*
* @author Vincent
*/
public class GoogleJam2012QRC {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
... |
B10149 | B12019 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.io.*;
import java.util.Scanner;
public class recycle {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Scanner scanner = new Scanner(new File("G:\\C-small-attempt0.in"));
int num = scanner.... |
A22992 | A22872 | 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 googlejam;
import java.util.Scanner;
public class ProblemB {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numberOfCases = sc.nextInt();
for (int i = 0; i <= numberOfCases; i++) {
int googlers = sc.nextInt();
int suprisingTriplets = sc.nextInt();
int p = sc.... |
A20261 | A20828 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.List;
public class Googlers {
public static void main(String[] args) throws Exception {
String srcFile = "C:" + File.separator + "Doc... |
B11696 | B10270 | 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.util.*;
public class C {
public static void main(String[] args) {
new C();
}
private Set<Integer> NUMSET;
public C() {
Scanner scan = new Scanner(System.in);
int NCASES = scan.nextInt();
for (int ZZ = 1; ZZ <= NCASES; ZZ++) {
int A = scan.nextInt();
int B = s... |
B21207 | B20724 | 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.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... |
B12074 | B10064 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class RecyclingNumber
{
public static void main(String[] args)
{
... |
B10149 | B13062 | 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 com.google.codejam.recycle;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: sushant
* Date: 14 Apr, 2012
* Time: 11:13:34 AM
* To change this template use File | Settings | File Templates.
*/
public class RecycledNumbers {
/**
* Main method from where application start execution.... |
A10699 | A11468 | 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.*;
public class Dancing {
public static void main (String[] args) throws IOException {
BufferedReader input = new BufferedReader(new FileReader (args[0]));
FileWriter output = new FileWriter("dancingOutput.txt");
int numTests = Integer.parseInt(input.readLine());
for... |
B11318 | B12489 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class RecycledNumbers {
public static void main(String[] args) {
RecycledNumbers recycled = new RecycledNumbers();
recycled.read_input_file();
/*if(recycled.che... |
A10996 | A12907 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.util.Scanner;
public class QualB
{
public static void main(String args[])
{
Scanner kb = new Scanner(System.in);
int ntc = kb.nextInt();
for(int tc=0;tc<ntc;tc++)
{
int n = kb.nextInt();
int s = kb.nextInt();
int p = kb.nextInt();
int ti;
int sc = 0;
int y = 0;
for(int t=... |
A20490 | A21259 | 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.util.ArrayList;
import java.util.Collections;
public class Solver {
int S;
int p;
ArrayList<Integer> scores;
Solver(int S, int p, ArrayList<Integer> scores) {
this.S = S;
this.p = p;
this.scores = scores;
}
static int getMaxScoreNoSuprise(int n) {
int base = n / 3 - 1;
if (base < 0)
ba... |
A21010 | A22239 | 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... | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class B {
public static void main(String args[]) {
try {
String fileName = "C:\\Users... |
B12762 | B11564 | 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 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... |
A12113 | A11973 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... |
import java.util.*;
import java.io.*;
import java.lang.*;
public class RQQ2 {
public static void main(String[] args)
{
try
{
HashMap<Character,Character> map = new HashMap<Character,Character>();
Scanner s = new Scanner(new File("B-small-attempt0.in"));
FileWriter o = new FileWriter(new File("out.txt... |
A22360 | A22755 | 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.util.*;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
//SRM525
public class ggcjblarge {
static int counter = 0;
static int dp[][] = new int[100][3];
public static int store(int t, int p){
int divided = t/3;
int a = divided,b = divided,c = divided;
int r... |
B12941 | B10453 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | package MyAllgoritmicLib;
public class Hungary {
int INF = 1000*1000*1000;
int n;
int[][] a;
int[] xy, yx;
boolean[] vx, vy;
int[] minrow, mincol;
public Hungary(int[][] a) {
// TODO Auto-generated constructor stub
this.a = a.clone();
}
private boolean dotry (int i) {
if (vx[i]) return false;
vx... |
A10996 | A10461 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithTheGooglers {
static int surprise;
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new FileRe... |
B10361 | B11710 | 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.*;
import java.math.*;
import java.text.*;
public class C {
public static void pl(Object O) {System.out.println(O);}
public static void pl() {System.out.println();}
public static void pr(Object O) {System.out.print(O);}
public static void p(Object O) {System.out.print(O);}
publi... |
A22642 | A21550 | 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 Googlers {
public static int surprise = 0;
public static int beatTarget = 0;
public static boolean bestScore(int totalScore, int targetScore) {
int bestNoSurprise = (int) Math.ceil(totalScore/3.0);
// If this googler beat the target score
if(bestNoSu... |
B10245 | B10431 | 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 codejam;
import java.io.*;
public class FileWrite {
String fileName;
BufferedWriter bw;
FileWriter fw;
FileWrite(String fileName){
this.fileName=fileName;
File f=new File("K:\\CodeJam\\Results\\"+fileName);
try{
fw=new FileWriter(f);
bw=new BufferedWriter(fw);
}catch(Exception e... |
A22078 | A20959 | 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 qual2012;
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
//PrintWriter out = new PrintWriter(System.out);
PrintWriter out = new PrintWriter(new File("B.out"));
... |
A12544 | A10871 | 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... | /**
* Created by IntelliJ IDEA.
* User: Manish
* Date: 4/14/12
* Time: 9:30 PM
* To change this template use File | Settings | File Templates.
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
public class CodeJamProblemB {
public static void main(String args[]) throws Exception {
... |
A21010 | A20347 | 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... | import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;
import static java.lang.Math.*;
public class Solution implements Runnable {
int sum1 []; // diff < 2
int sum2 []; // diff == 2
public void solve () throws Exception {
int tt = nextInt();
sum1 = new int [31];
sum2 = new i... |
B10858 | B10159 | 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.*;
import java.io.*;
public class CodeJam {
public static void main (String[] args){
try{
//recycleLarge(1000000, 2000000);
// read
FileInputStream instream = new FileInputStream("A-small.in");
DataInputStream in = new DataInputStream(instream);
Buffer... |
B21270 | B21628 | 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.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class RecycledNumbers {
static final String input_path = "data/input.c.txt";
private static Set<String> ans = new HashSet... |
A12113 | A10521 | 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.*;
public class dwtg
{
public void dwtg()throws IOException
{
FileInputStream fstream = new FileInputStream("C:/Users/m.l/Desktop/B-small-attempt0.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
... |
B11421 | B12229 | 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.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws IOException {
String filename = "C:\\Users\\irene\\Desktop\\input.txt";
List<String> inputLines... |
B11696 | B12125 | 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.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(new File("recycle... |
B12570 | B13240 | 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 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.ArrayList;
public class RecycledNumbers {
private static int lowRange = 0, highRange = 0;
private static ArrayList<Integer>... |
B10485 | B10192 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... |
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;
public class C {
public static HashMap<Integer, ArrayList<Integer>> recycle... |
B11318 | B11373 | 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... | // Recycled Numbers
import java.io.*;
import java.util.*;
public class RecycledNumbers {
public static void main(String[] args) throws Exception {
String inputPath = args[args.length-2];
String outputPath = args[args.length-1];
BufferedReader br = new BufferedReader(new FileReader(inputPath));
int numberO... |
B10485 | B11026 | 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... | package org.moriraaca.codejam;
public enum OutputDestination {
STDOUT, FILE;
}
|
A11502 | A12850 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cj2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
/**
*
* @author agraa1
*/
public class Dance {
... |
B11421 | B12515 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(new File("input.txt"));
int tt = sc.nextInt();
int cc = 0;
for(int t = 0; t < tt; ++t) {
int A = sc.nextInt(... |
B20566 | B21954 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | import java.util.Scanner;
public class RecycledSmall {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int cases = scan.nextInt();
for (int trial = 1; trial <= cases; trial++) {
System.out.print("Case #" + trial + ": ");
int a = scan.nextInt();
int b = scan.nextInt();
... |
B10149 | B11007 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... |
import java.io.*;
import java.util.*;
public class RecycledNumbers {
static class InputReader {
BufferedReader bin;
StringTokenizer tokenizer;
public InputReader(InputStream in) {
bin = new BufferedReader(new InputStreamReader(in));
tokenizer = null;
}
public InputReader(String fname) {
tr... |
A12460 | A12388 | 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 the2012;
import java.io.*;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(new BufferedInputStream(new FileInputStream("/Users/taobo2/Downloads/B-small-attempt0.in.txt")));
Writer outp... |
A21010 | A21705 | 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... | import java.text.*;
import java.io.*;
import java.util.*;
import java.lang.Math;
public class B
{
public static void main(String[] args) throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
for(int t = 1; t <= T; t++) {
... |
A20490 | A22532 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class googler {
/**
* @param args
*/
static Scanner kb ;
public static void main(String[] args) throws FileNotFoundException {
// TODO Auto-generated method stub
PrintWriter out = new PrintWriter("answergoogle... |
B12941 | B11406 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | package codejam;
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.util.ArrayList;
/**
* ´ÓÎı¾¶ÁÈ¡ÊäÈë
* @author Administrator
*
*/
public class InOutTool extends ArrayList<String... |
A11201 | A11102 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | import java.io.*;
import java.util.*;
public class ProblemB {
/*
* Takes an input file and output file as inputs.
*/
public static void main(String file[]) throws IOException{
BufferedReader in;
BufferedWriter out;
int numCases, numGooglers, numSurp, p, score;
Integer result;
... |
B12115 | B11846 | 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 info.m3o.gcj2012.recyclednumber;
import java.util.HashMap;
public class MyNumberStringPair implements Comparable<MyNumberStringPair> {
protected String s1;
protected String s2;
public MyNumberStringPair(String str1, String str2){
/* assert (str1.compareTo(str2) != 0) : "Identical Strings cannot be pai... |
A22992 | A21214 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.util.Scanner;
public class Solution {
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
int size = s.nextInt();
for (int count = 1; count <= size; count++){
int dancerNum = s.nextInt();
int surpNum = s.nextInt();
int score = s.nextInt();
int[] dancerScore =... |
A11135 | A11007 | 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... | /*
ID: t.lam1
LANG: JAVA
TASK: codejam
*/
import java.io.*;
import java.util.*;
import java.text.*;
import static java.lang.System.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import static java.lang.Character.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
import st... |
A12113 | A10657 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
class Dancing
{
public static void main(String... args)
{
Scanner sc = new Scanner(System.in);
int tests = sc.nextInt();
for (int test = 1; test <= tests; test++)
{
int n = sc.nextInt();
int s = sc.nextInt();
... |
B20023 | B21056 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problem.c.recycled.numbers;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;
/**
*
* @author Park
*/
public class ProblemCRecycledNumbers {
/**
... |
A12273 | A12737 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class BMain {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws IOExc... |
A11135 | A10084 | 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.File;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class googler {
private static File f = new File("C:/Users/Cybermask/Desktop/myfile.txt");
private static File outfile = new File("C:/Users/Cyberm... |
A22992 | A21126 | 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.codejam.qualification.b;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.FileUtils;
public class DancingWithGooglers {
private Map<String, String> language = new HashMap<Strin... |
A22642 | A20176 | 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 codejam;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class fileHandler {
FileInputStream input;
FileOutputStream output;
BufferedReader buf;
public... |
A20934 | A21740 | 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.util.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class Main {
//ArrayList<Integer> lis = new ArrayList<Integer>();
//ArrayList<String> lis = new ArrayList<String>();
//ArrayList<test> lis = ... |
B12115 | B12286 | 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 qC;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import qB.B.Pair;
//Letfs say a pair of distinct positive integers (n, m) is recycled
//if you can obtain m by moving some digits from the back of n to the
//front without changing their order. For example, (12345, 34... |
A10996 | A10679 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.util.List;
public class QB {
public static void main( String args[])
{
LeerArchivo leer = new LeerArchivo();
leer.abrirArchivo("B-small-attempt1.txt");
EscribirArchivo escribir = new EscribirArchivo();
escribir.abrirArchivo("respuesta.txt");
List<String> lineasArchivo = leer.leer();
... |
A20261 | A22005 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | package qualif.problem2;
import java.util.Scanner;
public class DancingWithTheGooglers {
public int testCaseNb = 0;
private Scanner casesScanner;
public DancingWithTheGooglers(Scanner input){
try{
String nextLine = input.nextLine();
testCaseNb = new Integer(nextLine);
} finally{
}
this.casesSca... |
A12460 | A10309 | 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 org.cb.projectb.dancingwiththegooglers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Contest {
public static void main(String[] args) throws FileNotFoundException {
Fi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.