F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B12669 | B11000 | 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.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Recycle {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int i = 1; i <= T; i++) {
int A = sc.nextInt();
int B = sc.nextInt();
int... |
A22992 | A22527 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012;
import java.util.Scanner;
/**
*
* @author Matt
*/
public class ProbB {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
Integer cases = scan.nex... |
B12074 | B12478 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class C {
static final int MAX_N = 2000000;
static int[][] precalc;
static {
precalc = new int[MAX_N + 1][];
List<Intege... |
B12669 | B11732 | 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.util.*;
import java.io.*;
public class RecycledNums
{
static LinkedList<String[]> output = new LinkedList<String[]>();
static int numberOfLines;
//Main Method
public static void main (String[] args)
{
//Read in the file
parseFile( output );
... |
B10858 | B12053 | 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.*;
public class Recycled {
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int cases=in.nextInt();
for(int i=1; i<=cases; i++)
{
int a=in.nextInt(), b=in.nextInt();
long ans=0;
for(int x=a; x<=b; x++)
{
for(int y=x+1; y<=b; y++)
{
String on... |
B11318 | B11220 | 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.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.*;
public class jam3 {
/**
* @param args
*/
static int chuli(String s)
{
in... |
A11917 | A12844 | 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 codejam.common;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author chenling
*/
public... |
B12570 | B11545 | 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.HashSet;
import java.util.Scanner;
public class Numbers {
public static void main(String[] args) throws IOException {
Numbers numbers = new Numbers();
numbers.findNumbers();
}
public void findNumbers() throws IOException {
Scanner sc = new Scann... |
B10702 | B13168 | 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.ArrayList;
import java.util.Arrays;
import java.util.List;
class IOSystem {
private String filePath;
private List<String> inputList = new ArrayList<String>... |
B10245 | B10393 | 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 hasnaer.puzzles.codejam;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
/**
*
* @author hasnae rehi... |
A20382 | A21443 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.LinkedList;
import java.util.List;
public class Dancing implements Runnable {
private BufferedReader in;
private BufferedWriter out;
private static String inputFile = "";
private s... |
A20934 | A21619 | 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.*;
public class Main {
public static void main(String args[]) {
(new Main()).solve();
}
void solve() {
Scanner cin = new Scanner(System.in);
int T = cin.nextInt();
for(int C=1; C<=T; ++C) {
int N = cin.nextInt();
int S = cin.nextInt();
int P = cin.nextInt()... |
A12570 | A10970 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public class googlers {
private static String[] casos;
private static String[] respuestas;
pri... |
A22078 | A22162 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
public class DancingWithTheGooglers {
public static BufferedReader BR;
public static String readLine() {
try {
return BR.readLine();
} catch(Exception E) {
System.err.println(E.toString());
... |
A13029 | A10330 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class B {
public final String INPUT_FILE_NAME = "b_in";
p... |
A20261 | A20704 | 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 dancingWithTheGooglers;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
import java.util.Arrays;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static String processa... |
B12074 | B12666 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | package C;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) throws FileNotFoundException{
Scanner in = new Scanner(new File("c:\\c.in")... |
A20490 | A22450 | 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... | 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... |
A13029 | A11121 | 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 code_jam_quali;
import java.util.Scanner;
/**
*
* @author sansarun
*/
public class Dancing {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int caseNum = sc.nextInt();
for (int currentCase = 1; currentCase <= caseNum; currentCase++) {
... |
A12273 | A10943 | 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.InputStreamReader;
import java.util.LinkedList;
public class Dancers {
static LinkedList<Integer> scores;
static int googlers = 0;
static int surprising = 0;
static int p;
public static void main(String[] args) {
String text = "";
int tests = 0;
int test_i... |
B12085 | B11250 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.*;
import java.util.*;
public class C {
public static int a;
public static int b;
public static void main(String[] args) throws Exception{
File f = new File("C-small-attempt0.in");
Scanner sc = new Scanner(f);
BufferedWriter bw = new BufferedWriter(new FileWriter("output.txt"));
int n = sc.nex... |
A10793 | A10166 | 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.File;
import java.util.Scanner;
class B{
public static void main(String[] args) {
if(args.length==0){
System.out.println("Error :: Please provide input file name as first command line argument");
System.out.println("Usage :: java Main <file_name>");
System.out.println("Example :: java Main ... |
B10155 | B13104 | 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... | /*
round 1
*/
package cj.qr;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
import java.math.BigInteger;
public class recy extends codejam {
public static void main(String[] av) throws Exception {
recy t = new recy();
t.solve(av, false);
... |
B10149 | B10228 | 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.*;
class yo
{
public static void main(String args[])
throws IOException
{
try
{
FileWriter fs=new FileWriter("o1.out");
FileInputStream f1=new FileInputStream("C-small-attempt3 (1).in");
DataInputStream d=new DataInputStream(f1);
BufferedReader br=new BufferedReader(new InputStreamReader(d));
BufferedWri... |
B12762 | B12434 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
public class RecycledPairs
{
static String line="Code Jam";
static int noOfTCs;
static long lowerLimit,upperLimit;
static ArrayList<String> pairs = new ArrayList<String>(... |
B11327 | B10408 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.*;
import java.util.*;
public class Main {
Scanner in;
PrintWriter out;
static final String problemName = "C";
static void asserT(boolean e) {
if (!e) {
throw new Error();
}
}
int solveOne(int a, int b) {
int count = 0;
int nDigits = ("" + a).length();
int maxDivisor = 1;
f... |
B12570 | B11312 | 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... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class InputReader<T> extends BufferedReader {
private fina... |
A11277 | A12057 | 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.*;
import java.util.*;
public class Run
{
private static class GooglerRating {
int total;
int r1, r2, r3;
int r1s, r2s, r3s;
public GooglerRating ( int totalRating ) {
total = totalRating;
int mod = totalRating % 3;
switch ( mod )
{
case 0 :
r3 = r2 = r1 = totalRati... |
A20119 | A20555 | 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 codejam2012.qualification.b;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactor... |
A20490 | A22082 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancingwiththegooglers;
import java.io.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;
/**
*
* @author ÐиÑилл и Ðапа
*/
public class DancingWithTheGooglers ... |
A11917 | A11583 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Integer;
import java.util.ArrayList;
class jam1a {
public static void main(String[] args) {
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
try {
String s = ... |
B10858 | B11729 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package speaking;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.LinkedList;
/**
*
* @author Marisol
*/
public class clsArchivo{
private LinkedList<String> li... |
B10899 | B11424 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class RecycledNumbers {
public static String input = "easy.txt";
public s... |
A21010 | A22664 | 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.FileOutputStream;
import java.io.FileReader;
import java.io.PrintWriter;
public class Googlers {
public static void main(String[] args) throws Exception {
BufferedReader input = new BufferedReader(new FileReader("B-large.in"));
PrintWriter output = new PrintWriter(new... |
B12941 | B11408 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class RecycledNumbers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Scanner in;
in = new S... |
A12273 | A11260 | 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.*;
public class Dancing{
public static void main(String args[]){
try{
FileInputStream fstream = new FileInputStream(args[0]);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
PrintWriter out = new PrintWrite... |
A12113 | A11720 | 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.util.Arrays;
public class QrB {
private CodeJamTextInputReader input = null;
private CodeJamTextOutputWriter output = null;
public static void main(String args[]) {
// CodeJamUtils.initLineEndings();
try {
QrB qrA = new QrB();
qrA.run(new File(... |
A11135 | A11970 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.util.*;
import java.io.*;
public class B {
public static void main(String []args){
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
int []result = new int[cases];
//input.nextLine();
for(int i = 0; i < cases ;i++){
int n = input.nextInt();
int s = input.nextInt();
... |
B11421 | B10093 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package codeJam2012_Qualification;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.Map;
import java.util.NavigableMap;
import java.util.Scanner;
import java.util.TreeMap;
public class RecycledNumbers {
private... |
A22642 | A21017 | 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 bchang;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
/**
* Created with IntelliJ IDEA.
* User: bchang
* Date: 4/14/12
* Time: 9:08 PM
* To change this template use File | S... |
B11327 | B10909 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
public class CRecycledNumbers {
static int recycle(int a, int b) {
System.out.println("-------------------------");
System.out.println(a + " " + b);... |
B10155 | B12140 | 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 Recycled;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
public class recycled {
static void print(int nbCases, int N, int S, int P, int[] T) {
System.out.print(N + " ");
System.out.print(S + " ");
System.out.print(P);
for (int j = 0; j ... |
A11502 | A12816 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.*;
import java.util.*;
public class dancing {
public static void main(String[] args)throws Exception{
Scanner f = new Scanner(new File(args[0]));
int count=0;//# tuples >= limit
int res=0; //mult result
int rem=0; //remainder
int N=0; //# tuples
int S=0; //# surprising tuples (t%r==2)
int... |
B21227 | B21390 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | package QualificationC;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Arrays;
import java.util.HashSet;
public class ProblemC {
public static void main(String args[]) throws Exception{
// System.out.println(args[0]);
FileReader fr = new FileReader(args[0]);
BufferedReader br = new... |
B10899 | B10232 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | import java.io.*;
import java.util.*;
/**
* Write a description of class Googlerese here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class RecycledNumbers
{
public static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
private int x;
private... |
A10699 | A10204 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... |
import java.io.*;
import java.util.*;
public class DG {
private static String fileName = DG.class.getSimpleName().replaceFirst("_.*", "");
private static String inputFileName = "D:\\cj12\\"+fileName + ".in";
private static String outputFileName = "D:\\cj12\\"+fileName + ".out";
private static Scanner in;
priva... |
B12085 | B11202 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... |
import java.io.File;
import java.io.FileNotFoundException;
import java.lang.Integer;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.TreeSet;
public class RecycledNumbers {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(new File("inpu... |
A12460 | A10339 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.File;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeMap;
/**
*
* @author Ben
*/
public class Main {
public static Scann... |
A20934 | A21035 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;
public class Dance {
private String strLine;
priva... |
B12762 | B10730 | 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.google.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
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.OutputStreamWriter;
import j... |
B10702 | B13067 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
new A().run();
}
private void run() {
Scanner s;
try {
s = new Scanner(new File("A.in"));
int t = s.n... |
B12074 | B11723 | 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.lang.*;
import java.io.*;
import java.util.*;
public class Solution {
public static BufferedReader br;
public static PrintWriter out;
public static StringTokenizer stk;
// ///////////////// TO CHANGE ///////////////////////////
public static boolean isServer = false;
// ///////////////// TO CHANGE ... |
A21010 | A21220 | 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 qualification;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class b {
public static void main(String[] args){
if(args.length<1){
System.out.println("Usage: <fnIn>");
}
String fn = args[0];
St... |
B12669 | B11511 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... |
import java.io.BufferedReader;
import java.io.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... |
A11502 | A10856 | 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 twentytwelve.qualification.b;
import java.util.Scanner;
public final class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();
for (int no = 1; no <= cases; no++) {
System.out.print("Ca... |
A22771 | A20032 | 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 GoogleDancing {
public static void main(String[] args) throws IOException {
BufferedReader read = new BufferedReader(new FileReader("B-large.in.txt"));
int T = Integer.parseInt(read.readLine());
for(int i = 1; i <= T; i++){
StringTokenizer st = new StringToke... |
B10702 | B11672 | 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.util.ArrayList;
import java.util.Scanner;
public class RecycleNumber {
/**
* @param args
*/
int NoOfTestCase = 0;
int A = 0;
int B = 0;
ArrayList<Integer> knownList = new ArrayList<Integer>();
public static void main(String[] args) {
// TODO Auto-generated method stub
RecycleNumber rn = ne... |
B12074 | B12190 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | package luis.miguel.serrano.utilities;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import luis.miguel.serrano.settings.GlobalSettings;
/**
* Data class for processing input and generating output
* @author Luis Miguel Se... |
B12762 | B11877 | 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 gcj2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
public class RecycledNumber {
public String count(int A, int B, int caseNr)
{
StringBuffer sb = new StringBuffer("");
sb.append("Case #");
sb.append(caseNr);
sb.append(... |
A12544 | A10525 | 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.*;
import java.util.*;
class Q2
{
public static void main(String str[])throws IOException
{
FileReader fr=new FileReader("B-small-attempt0.in");
// FileReader fr=new FileReader("B-large.in");
BufferedReader br=new BufferedReader(fr);
FileWriter fw=new FileWriter("ou... |
A21557 | A21980 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | import java.util.*;
class B{
public static void main(String... arg){
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();
for(int caseNo = 1; caseNo <= cases; caseNo++ ){
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt();
int[] t = new int[N];
int n = 0;
for(... |
B21207 | B21180 | 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) ... |
public class kickClass {
public static void main(String[] args){
//testGraph.run();
//testCollection.run();
solutionRunner t1 = new solutionRunner();
}
}
|
A21010 | A21824 | 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.util.Scanner;
public class Problem2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int lineNo = scan.nextInt();
for(int i = 0 ; i < lineNo ; i++) {
int googlerNo = scan.nextInt();
int surpriseNo = scan.nextInt();
int point = scan.nextInt();
// ... |
A12113 | A10701 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | package com.spelchec.codejam.project2;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main (String[] args) throws IOException {
final String outputTemplate = "Case #%d: %d\n";
BufferedReader br = new ... |
A22771 | A20632 | 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;
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();
... |
B21752 | B20984 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
/**
* @author Jelle Prins
*/
public class RecycledNumbers {
public static void main(String[] args) {
String input = "input.txt";
String output = "output.txt";
... |
B10702 | B11568 | 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.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.BitSet;
public class ProbC {
public static long solve(int A, int B) {
int[] basePower = new int[8];
basePower[0] =1;
for(int i=1; i<8; i++)
basePower[i] = basePower[i-1] * 10;
... |
A10568 | A12997 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package qualification.common;
import java.io.*;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 17:21
* To change this template use File | Settings | File Templates.
*/
public class InputReader {
public static String[] getInputLines(String filename){
String[] input = null;... |
A10568 | A11198 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.File;
import java.util.*;
public class ProblemB {
public static void main(String[] args) throws Exception {
// Scanner sc = new Scanner(new File("C:\\B-small-attempt0.in"));
Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine().trim());
for (int i = 0; i < cases; i++... |
A12544 | A12104 | 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.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class DancingWithTheGooglers {
public static void main(String[] args) {
try {
... |
B11696 | B10346 | 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... | package QR_2012;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import Utils.IOStreams;
public class C_Recycled_Numbers {
public static void main(String[] args) throws IOException {
IOStreams streams = new IOStreams(args[0]);... |
A13029 | A11605 | 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 com.cuteants.problems.codejam.y2012.qualification;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc = new Scanner("100\n" +
"3 1 5 15 13 11\n" +
"3 0 8 23 22 21\n... |
B21227 | B20707 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | package codejam;
import java.io.*;
import java.util.HashSet;
public class Numb {
public static void main(String[] args)throws IOException{
HashSet<Integer> hs;
BufferedReader cin=new BufferedReader(new FileReader("C-large.in"));
PrintWriter cout=new PrintWriter(new BufferedWriter(new FileWr... |
B10899 | B10755 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | import java.util.*;
import java.io.*;
public class CodeJamQualC
{
public static void main(String[] args)
{
try{
BufferedReader fin = new BufferedReader(new FileReader("input.txt"));
FileWriter fstream = new FileWriter("output.txt");
BufferedWriter out... |
A11502 | A10398 | 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 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... |
A22378 | A20453 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
scan.nextLine();
int c = 1;
while(scan.hasNextLine()) {
Scanner ls = new Scanner(scan.nextLine());
ls.nextInt();
int s = ls.nextInt();
int p = ls.nextInt();
... |
A12211 | A12317 | 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 br.com.atama.google.jam;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import br.com.atama.google.jam.dancing.ScoreCalculator;
public class Solver {
public static void main(String[] args) throws IOException {
FileReader reader = new FileReader("src/input-small.txt"... |
B10149 | B10874 | 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 de.at.codejam.problem3.util;
import java.io.File;
import de.at.codejam.problem3.Problem3Case;
import de.at.codejam.util.AbstractOutputFileWriter;
public class Problem3OutputFileWriter extends
AbstractOutputFileWriter<Problem3Case> {
public Problem3OutputFileWriter(File outputFile) {
super(outputFile);
... |
B12074 | B10834 | 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.ArrayList;
import java.util.Scanner;
public class CodeJam3 {
public static void main(String[] args) {
Scanner kb=new Scanner(System.in);
int cases=kb.nextInt();
for(int i=0;i<cases;i++)
{
long count=0;
long value1=kb.nextInt();
long value2=kb.nextInt();
ArrayList<String> al=new ... |
B20566 | B20046 | 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 + "";
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejamc;
import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.*;
/**
*
* @author usuario
*/
public class CodejamC {
/**
* @param args the command line... |
A20934 | A20928 | 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 br.com;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class ProblemaB {
static String caminho = "/home/mateus/";
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File(caminho + "entrada.txt"));
FileWrit... |
B21049 | B20594 | 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 be.mokarea.gcj.recyclednumbers;
import java.io.PrintWriter;
import java.util.HashSet;
import be.mokarea.gcj.common.TestCaseReader;
import be.mokarea.gcj.common.Transformation;
public class RecycledNumbersTransformation extends
Transformation<RecycledNumbersTestCase> {
public RecycledNumbersTransformation... |
A11135 | A10881 | 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.*;
public class ProblemB {
static int[] cycles;
public static void main(String [] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
for(int i = 0; i < T; i++){
String[] input = br.readLine().split(" ");... |
A22078 | A20485 | 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 gcj2012.qualification;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GooglerDance {
public static void main(String[] args) throws Exception {
GooglerDance main = new GooglerDance(args[0]);
main.solve();
... |
A12211 | A10147 | 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.FileInputStream;
import java.util.Scanner;
// Dancing With the Googlers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p1
public class B {
private static String process(Scanner in) {
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int notsurp = 0;
int surp ... |
B12762 | B10240 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) {
BufferedReader reader = null;
PrintWriter writer = null;
try {
reader = new BufferedReader(new FileReader(new File("src/C-small-attempt0.in")));
writer = new PrintWriter(new B... |
A10568 | A10960 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package main;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader... |
B11327 | B11555 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
public class MainC {
final static String FNAME = "C-small-attempt0";
public BufferedReader in;
public PrintWriter out;
void open() throws IOExceptio... |
A10793 | A11532 | 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.File;
public class dancing
{
Scanner in;
int p;
int s;
int[] scores;
int minScore;
int minSurpScore;
public dancing()
{
try
{
in = new Scanner(new File("input.txt"));
in.nextLine();
int count = 1;
while(i... |
B12085 | B12411 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.*;
public class ProCOpt
{
public static void main(String args[])
{
try
{
BufferedReader br = new BufferedReader(new FileReader("E:\\test.txt"));
int n;
n= Integer.parseInt(br.readLine());
int casen=0,i,j;
in... |
B12082 | B10656 | 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 br.com.app;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.util.Scanner;
public class RecycledNumbers {
private static int totCasos, contCasos, contador, totNumerosMovidos, indice;
private static long a, b, n, m;
private... |
B20856 | B22238 | 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.*;
import java.text.*;
import java.math.*;
import java.util.*;
public class J12QC implements Runnable {
Scanner in;
PrintWriter out;
static String taskname = ".\\src\\C-large";
int test, testn, i, j, k;
public static void main(String[] args) {
new Thread(new J12QC()).start();
}
public void s... |
A22191 | A21977 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | package com.renoux.gael.codejam.fwk;
import com.renoux.gael.codejam.utils.Input;
import com.renoux.gael.codejam.utils.Output;
public class Model extends Solver {
public static void main(String... args) throws Exception {
new Model().run();
}
@Override
protected void solveCase(Input in, Outp... |
A20261 | A22025 | 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.util.Scanner;
public class Main {
public static void main(String [] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int x=0; x<T; x++) {
int N = in.nextInt(); //googlers
int S = in.nextInt(); //surprising
int p = in.nextInt(); //score to beat
int direct = 0;
... |
B12074 | B12794 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlecodejam;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.S... |
A20490 | A21611 | 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.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class Counter {
private int T;
private Lock lock;
private ICounterZeroEvent e;
public Counter(int T, ICounterZeroEvent e)
{
this.T = T;
this.e = e;
lock = new ReentrantLock();
}
public void increase() ... |
A10793 | A11254 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
public class round1 {
/**
* @param args
*/
static BufferedReader openRead(String fileName){
BufferedReader in = null;
try {
... |
B12085 | B12279 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | package cj2012.qual;
import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.TreeSet;
public class C {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(new File("in/C-small-attempt0.in"));
int T = scan.nextInt();
PrintWriter out = new Prin... |
B10899 | B10598 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | package codejam;
import java.io.*;
import java.util.*;
public class RecycledNumbers {
public static void RecycledNumbersProcess() throws Exception
{
int t_cases= getT();
for(int i = 1; i<=t_cases;i++)
{
String line = getG();
long A, B;
String[] charNUMBERS = line.split(" ");
A = Long.... |
B11696 | B12076 | 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... | package jp.funnything.competition.util;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import org.apache.commons.io.IOUtils;
public class AnswerWriter {
private static final String DEFAULT_FORMAT = "Case #%d: %s\n";
private final BufferedWriter _wr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.