F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B10231 | B11368 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class recycled {
static HashMap<Long, HashMap<Long, Integer>> found;
static Set<Long> touched;
public static int calc(long a, long b){
int comp... |
A22992 | A20482 | 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 gcj2012qr;
import java.io.*;
import java.util.*;
import java.util.concurrent.*;
import com.google.*;
/**
* @author Roman Kosenko <madkite@gmail.com>
*/
public class DancingWithTheGooglers extends SingleThreadSolution<Object> {
public static void main(String[] args) throws Exception {
solve(new SolutionF... |
A11277 | A11667 | 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 ... |
public class kickClass {
public static void main(String[] args){
//testGraph.run();
//testCollection.run();
solutionRunner t1 = new solutionRunner();
}
}
|
B11361 | B11125 | 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 package03;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class... |
B12570 | B10330 | 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.awt.Point;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
public class q3 {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static String... |
B11421 | B12896 | 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.IOException;
import java.io.InputStreamReader;
import java.util.Hashtable;
public class Recycled_Numbers {
public static void main(String[] args) throws IOException {
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
String x=reader.readLine();... |
B11421 | B13216 | 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.util.*;
import java.io.*;
import java.math.*;
import static java.lang.System.*;
import static java.lang.Math.*;
import static java.lang.Integer.*;
public class C {
public static void main(String args[]) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(in));
int t = parse... |
A11277 | A12095 | 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 ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cjam;
import java.io.*;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Administrator
*/
public class Cjam {
/**
* @param args the command l... |
A11277 | A13180 | 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.util.*;
public class reverse {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int m=sc.nextInt();
int i;
int j;
for(i=1;i<=m;i++) {
int n=sc.nextInt();
int s=sc.nextInt();
int p=sc.nextInt();
... |
A22191 | A22636 | 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 b;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.text.AttributedCharacterIterator;
import java.util.Ar... |
A22992 | A22685 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Googlers {
static int judgeGooglersNum(String input) {
int result = 0;
String[] s = input.split(" ");
int N = Integer.parseInt(s[0]);
int S = Integer.p... |
B13196 | B10512 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | import java.io.*;
public class recycled {
/**
* @param args
*/
public static int solve(BufferedReader reader) throws IOException {
int cpt = 0;
String[] entiers = new String[2];
entiers = reader.readLine().split(" ");
if(Integer.parseInt(entiers[0]) < 10) return 0;
else {
for(int... |
A22191 | A21650 | 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 de.johanneslauber.codejam;
import java.io.IOException;
/**
*
* @author Johannes Lauber - joh.lauber@googlemail.com
*
*/
public class Main {
/**
* @author Johannes Lauber - joh.lauber@googlemail.com
* @param Args
*/
public static void main(String[] Args) {
// solveProblem("input/A-small-practi... |
B20006 | B20986 | 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 {
... | /**
* Written By Kylin
* Last modified: 2012-4-15
* State: Pending
*/
package me.kylin.gcj.c2012Q;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class RecycledNumbers {
String file;
Scanner sc;
PrintWri... |
B21207 | B20468 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Arrays;
/**
* Created by IntelliJ IDEA.
* User: Abhishek
* Date: 4/14/12
* Time: 1:09 PM
* To change this template use File | Settings | File Templates.
... |
B12115 | B11564 | 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 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... |
A22771 | A21211 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Scanner;
public class DancingWiththeGooglers {
final static String FILENAME = "B-large";
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new FileReader("/home/workshop/Documents... |
A21010 | A20514 | 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 com.googlerese.file;
import java.io.*;
import java.util.Map;
public class FileWrite {
private static FileWrite fileWrite = new FileWrite();
private FileWrite() {
}
public static FileWrite getInstance() {
return fileWrite;
}
public final void write( final String fileName, fi... |
A21396 | A23073 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.io.*;
import java.util.Scanner;
public class SurprisingDancers {
public static void main(String[] args) {
BufferedReader br;
BufferedWriter bw;
int count;
try
{
br = new BufferedReader(new FileReader(args[0]));
bw = new BufferedWriter(new FileWriter(new File("output.txt")));
count = n... |
B12941 | B10342 | 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.recycled_numbers;
import java.io.IOException;
import java.util.ArrayList;
import codejam.filestuff.FileStuff;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
FileStuff fs = new FileStuff("C-small-attempt0.in","C-small.out","recycled_numbers");
ArrayLis... |
A10568 | A10401 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Scanner;
public class GoogleCodeB {
public static void main(String args[]) throws Exception {
FileReader fr = new FileReader("C:/Users/moez/Desktop/B-small-attempt1.in");
BufferedR... |
A10793 | A12619 | 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.IOException;
import java.io.InputStreamReader;
public class Dancing {
static int[] max_surprising = new int[31];
static int[] max_no_surprising = new int[31];
public static void main(String[] args) throws IOException {
max_surprising[0] = 0;
... |
A20119 | A20423 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class ProblemBB {
static class State {
boolean surprising, not;
int max;
State(boolean S, boolean n, int m... |
A22378 | A23027 | 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.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithGooglers {
/**
* @param args
*/
private final static String WRITE_DEST = "... |
A21396 | A20746 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
public class DacingScore... |
A11502 | A11714 | 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 codejam;
import java.io.*;
import java.util.Arrays;
/**
* @author Dmitry Korolev
*/
public class Task2 {
public static void main(String[] args) throws IOException {
Reader inputReader = /*new InputStreamReader(System.in);*/ new FileReader("B-small-attempt0.in");
Writer outputWriter = /*... |
A20490 | A21577 | 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 uk.co.epii.codejam.common;
import java.io.IOException;
/**
*
* @author jim
*/
public class AbstractMain {
public static void main(String[] args, AbstractProcessor p) {
FileLoader fileLoa... |
B11327 | B13177 | 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.FileInputStream;
import java.io.InputStreamReader;
public class RecycledNumbers {
public static void main(String[] args) {
try {
// int T = 4;
// int[][] testcases = new int[T][];
// testcases[0] = new int[]{1,9};
// testcases[1] = new int[]{10,40};
// ... |
A20382 | A23073 | 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.*;
import java.util.Scanner;
public class SurprisingDancers {
public static void main(String[] args) {
BufferedReader br;
BufferedWriter bw;
int count;
try
{
br = new BufferedReader(new FileReader(args[0]));
bw = new BufferedWriter(new FileWriter(new File("output.txt")));
count = n... |
A20261 | A22663 | 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 birgit.vera.schmidt.googlecodejam2012.qual;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
public class B {
public static void main(String[] args) {
try {
String filename = "B-l... |
B10245 | B11234 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.util.*;
public class RecycledNumbers {
public static void main(String[] args) {
System.out.println("Enter case input:");
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
sc.nextLine();
int[][] numbers = new int[T][2];
for (int t = 0; t < T; t++) {
numbers[t][0] = sc.next... |
B12115 | B11206 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
public class RecycledNumbers2 {
public static int analizar(String first, String second ){
ArrayList<String> dupList=new ArrayList<String>();
int ... |
A20382 | A20746 | 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.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
public class DacingScore... |
B10702 | B10388 | 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.HashSet;
import java.util.Scanner;
import java.util.Set;
/**
* Created by IntelliJ IDEA.
* User: nickg
* Date: 4/13/12
* Time: 9:57 PM
* To change this template use File | Settings | File Templates.
*/
public class CodeJamThree {
public static int numNumbers(int a, int b){
int digits... |
A11135 | A11759 | 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.*;
import java.util.*;
public class Problem2
{
static ArrayList<Integer> scores;
public static void main(String args[])
{
try
{
FileInputStream fstream = new FileInputStream("B-small-attempt0.in");
DataInputStream in = new DataInputStream(fstream);
... |
B13196 | B12360 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package codejam.qualification;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new File("input.txt"));
FileWriter out = new FileWriter("output.txt");
... |
A20261 | A20140 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/*
* Google Code Jam 2012
* Qualification 2012
* raguenets@gmail.com
* Usage : java DancingWi... |
B10149 | B11491 | 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 Recycling {
public static void main(String[] args) throws FileNotFoundException, IOException
{
FileInputStream file = new FileInputStream("C:\\Users\\Taghi\\Downloads\\C-small-attempt1.in");
DataInputStream in2 = new DataInputStrea... |
B10155 | B12228 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.io.*;
import java.util.*;
public class test {
public static void main(String[] args) throws IOException {
// Location of file to read
functions aa = new functions();
File file = new File("input.txt");
Writer output = new BufferedWriter(new FileWriter("output.txt"));
int i = 1;
... |
A10793 | A11192 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
private static Map<Character,Character> mapa;
/**
* @param args
* @throws IOException
*/
public static void... |
A10699 | A11910 | 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.Arrays;
public class GoogleCodeJam2
{
public static void main(String[] args) throws IOException
{
FileInputStream fstreami = new FileInputStream("input.txt");
DataInputStream in = new DataInputStream(fstreami);
FileWriter fstreamo = new FileWriter("ou... |
B20566 | B21607 | 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 com.google.codejam;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class DancingWithGooglers {
private int limit(long min, long max){
if (min>max)
return 0;
int count = 0;
for (long i = min; i <= max; i++) {
int loopCount = 1;
long start = i;
l... |
A12273 | A11061 | 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.... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.kaka.codejam.qualification;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
/**
*
* @author Karthik
*/
public class ProblemB {
public static void main(Strin... |
B12762 | B10688 | 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 utils;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
public class Numbers {
public static void main(String[] args) {
lecture("/Users/valentinbonneaud/Downloads/C-small-attempt0.in");
}
public static void lecture(String name){
Sca... |
A21396 | A21276 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
public class Util {
public int testcases;
BufferedReader br;
public Util(String ... |
A21010 | A21927 | 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 Dancing {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int numberOfLines = Integer.parseInt(in.nextLine());
for(int lineNum = 1; lineNum <= numberOfLines; lineNum++){
int totalDancers = in.nextInt();
int lifeLines = in.nextInt();
... |
B10899 | B11629 | 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.File;
import java.io.PrintWriter;
import java.util.Scanner;
public class RecNumbers {
static Scanner in;
static PrintWriter out;
public static boolean isRecycled(int n, int m){
boolean recycled = false;
String first = Integer.toString(n);
String second = Integer.toString(m);
int len = f... |
B20856 | B21591 | 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;
//... | /**
*
*/
package GoogleCodeJam2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* @author MArunkumar
*
*/
public class RecycledNumbers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOE... |
B10899 | B10756 | 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.*;
/**
* @author Ivan Romanov
*/
public class C {
private String solve() throws IOException {
int a = nextInt();
int b = nextInt();
int ans = 0;
for (int i = a; i < b; i++) {
if (recycle.containsKey(i)) {
for (int j :... |
A22378 | A22641 | 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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class DancingGooglers {
public static void main(String[] args) throws IOException {
BufferedReader fInput = new Buf... |
A10699 | A12119 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.File;
import java.util.List;
import java.util.ArrayList;
public class GCJ_qr_b {
public static void main(String[] args) {
GCJReader in = new GCJReader(args[0]);
GCJWriter out = ne... |
B12762 | B11243 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package 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;
//... |
A22078 | A22793 | 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 Dancing;
import java.io.*;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: kevin
* Date: 4/13/12
* Time: 8:00 PM
* To change this template use File | Settings | File Templates.
*/
public class Dancing {
public static Iterator<Danc... |
B10858 | B12529 | 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.ArrayList;
/**
* Created with IntelliJ IDEA.
* User: student
* Date: 4/14/12
* Time: 6:40 PM
* To change this template use File | Settings | File Templates.
*/
public class Recycled {
private static ArrayList<String> validNumbers;
private static int lower;
private static int upper;
... |
B12082 | B11025 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | package org.moriraaca.codejam;
public enum DebugOutputLevel {
SOLUTION, IMPORTANT, ALL;
}
|
A20382 | A21276 | 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... | package codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
public class Util {
public int testcases;
BufferedReader br;
public Util(String ... |
B12074 | B12915 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.util.LinkedList;
import java.util.Scanner;
/**
*
* @author Venkatesh
*/
public class reversal {
public static void main(String args[])
{
Scanner s=new Scanner(Syste... |
B20856 | B22180 | 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.util.HashSet;
import java.util.Scanner;
public class c {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new c().go();
}
private void go() {
Scanner in=new Scanner(System.in);
int numc=in.nextInt();
for(int cnum=1;cnum<=numc;cnum++){
... |
B10231 | B11564 | 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 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... |
B20023 | B22093 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.awt.Polygon;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
... |
A20119 | A22946 | 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.B;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
/**
*
* @author Rymbu VV
*/
public class DancingWithGooglers {
private Scanner sc;
private PrintWriter pw;
private int CASES;
public static void main(String[] args) {
... |
B21049 | B21043 | 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 de.hg.codejam.tasks.io;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public abstract class Reader {
public static String[] readFile(String path) {
String[] input = null;
try (BufferedReader reader = new BufferedReader(new FileReader(path))) {
int inputSize = ... |
A10996 | A11319 | 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.util.HashMap;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author Anuj
*/
public class DanceWithGoogle {
int cases;
... |
B22190 | B21061 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | package duyonggang;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
public class RecycledNumbers {
public static int pass(int n, int a, int b)
{
if(n < 10)
return 0;
int counter = 0;
String s = Integer.toString(n);
int ... |
B10155 | B12846 | 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 gcj2012.qr;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
public static int count(int a, int b) {
int r = 0, len, m;
String sn, sm;
Set<Integer> used = new HashSet<Integer>();
for ... |
B11696 | B12932 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google_code_jam;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.HashSet;
import java.util.Lin... |
B21049 | B20124 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.File;
import java.util.Scanner;
import java.util.Vector;
class C {
static int count=0;
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 ::... |
B20424 | B20678 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.util.*;
import java.io.*;
class Node implements Comparable{
int x, y;
public Node(){}
public Node(int a, int b){
x = a; y = b;
}
public boolean equals(Object key){
Node tmp = (Node)key;
if(x==tmp.x && y==tmp.y) return true;
else return false;
}
public int compareTo(Object key){
Node tm... |
A12211 | A12610 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.... |
A21010 | A22293 | 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.*;
public class DancingWithTheGooglers {
public static void main(String[] args)throws IOException {
BufferedReader bfr = new BufferedReader(
new InputStreamReader(System.in));
PrintWriter pr = new PrintWriter(System.out);
int n = Integer.parseInt(bfr.readLine());
for (int i = 1 ;i<=n;i++){
... |
B11361 | B11870 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... |
import java.io.*;
import java.util.*;
class ProblemC
{
public static void main(String[] args) throws IOException
{
FileReader fr = new FileReader(args[0]);
BufferedReader br = new BufferedReader(fr);
String[] splittArray;
int[] points;
int A,B,res;
int T = Integer.parseInt(br.readLine());
//System.out... |
B21790 | B20380 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | import java.io.*;
public class RecycledNumbers
{
public void RecycledNumbers()throws IOException
{
FileInputStream fstream = new FileInputStream("C:/Users/m.l/Desktop/C-large.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(ne... |
B20006 | B20277 | 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.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class Recycled {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String li... |
B10245 | B10919 | 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.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)... |
B11318 | B11427 | 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 static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import java.io.*;
import java.math.*;
import java.util.*;
@SuppressWarnings("unused")
public class C_RecycledNumbers {
public static void main(String[] args) throws Exception {
// Scanner in = new Scanner(System... |
B20006 | B21761 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | import java.util.*;
public class Recycle {
public static int deg(int x) {
int i = 0;
while(x > 0) {x = x / 10; i++;}
return i;
}
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t = 1; t <= T; t++) {
int A = sc.nextInt(), B ... |
A13029 | A11755 | 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.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Ex2 {
public static void mai... |
A20730 | A23007 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | package proba;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class ProblemB {
/**
* @param args
* @throws FileNotFoundException
*/
... |
B13196 | B12391 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | import java.io.*;
import java.util.*;
/**
* @author: Ignat Alexeyenko
* Date: 4/14/12
*/
public class RecycledNumbersMain {
public static final int MAX_LENGTH = 80;
public static void main(String[] args) {
RecycledNumbersMain main = new RecycledNumbersMain();
main.runConsoleApp(System.in, ... |
B12941 | B12232 | 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 qualification;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class C {
String solve(Scanner in) throws IOException {
int A = in.nextInt(), B = in.nextInt(), pow = 1, pairs = 0;
while(... |
B12115 | B10977 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Recycled {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatException,
IOException {
/... |
B12074 | B12499 | 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.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* @author OleGG
*/
public class QualTaskC {
public static void main(String[] args) throws Throwable {
Scanner sc = new Scanner(new FileReader("C-small-attempt0.in.txt"));
PrintWriter pw... |
A21010 | A23021 | 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 probs;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Problem2 {
public static void main(String[] args) {
try {
String filePath = "in-large-2.txt";
... |
A12273 | A11048 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | package codejam;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.PrintWriter... |
B10702 | B10925 | 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 utils;
/**
*
* @author Fabien Renaud
*/
public class StopWatch {
private long startTime = -1;
private long stopTime = -1;
private boolean running = false;
public StopWatch start() {
startTime = System.currentTimeMillis();
running = true;
return this;
}
public StopWatch stop() {
... |
A10568 | A10524 | 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.*;
import java.math.BigInteger;
import java.util.InputMismatchException;
/**
* @author Malvino Juwono (malvino.juwono@gmail.com)
*
*/
public class ProblemB implements Runnable {
private InputReader in;
private PrintWriter out;
public static void main(String[] args) {
new Thread(new ProblemB())... |
A10699 | A12019 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;
public class CodeJamB {
public static int[][] matrix;
public static boolean[][] had;
... |
A12846 | A11102 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | import java.io.*;
import java.util.*;
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;
... |
B12941 | B12671 | 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.*;
import java.util.*;
public class rec {
public static void main (String [] args) throws Exception {
BufferedReader f = new BufferedReader(new FileReader("rec.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("rec.out")));
int N = Integ... |
A12273 | A11128 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | package test;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
PrintWriter out = null;
BufferedReader... |
A12211 | A10728 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class googler {
public static void main(String args[]) throws FileNotFoundException
{
Scanner in=new Scanner(new FileReader("input.in"));
PrintWriter pw=new PrintWriter("ans.txt");... |
B10361 | B12250 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Read {
int noOfTestCases;
int []nums;
public void Read(String name) {
File file = new File(name);
try {
Scanner scanner ... |
B12762 | B13209 | 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.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> list = null;
private ... |
A12544 | A13001 | 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 qualification.q2;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 18:47
* To change this template use File | Settings | File Templates.
*/
public class Q2Solver {
public int solve(int n,int s,int p, int[] sums){
int res = 0;
int surprisesLeft = s;
... |
A22078 | A22381 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.TreeMap;
public class DancingWithGooglers {
public static int isPossible(int score, int pointUnderConsideration,
... |
B11327 | B10964 | 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.math.BigInteger;
import java.util.Locale;
import java.util.StringTokenizer;
/**
* User: Igor Kirov
* Date: 14.04.12
*/
public class C implements Runnable {
private int recycle(int t, int multiplier) {
int cc = t % 10;
while (cc == 0) {
t = t / 10;
... |
A11502 | A12629 | 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... |
public class triplet {
int judgea;
int judgeb;
int judgec;
String status;
//0 invalid
//1 not surprising
//2 surprising
public triplet(int a, int b, int c){
int minab, maxab;
minab = Math.min(a, b);
maxab = Math.max(a, b);
//Reorganize judgea to have min
judgea = Math.min(minab, c);
judgeb ... |
A11135 | A11115 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | package com.googlecode.codejam.model;
import java.util.Iterator;
import java.util.concurrent.Callable;
public abstract class JamCaseResolverFactory {
public abstract Callable<String> newJamCaseResolver(int caseNumber, Iterator<String> lineIterator);
}
|
A13029 | A11406 | 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.util.*;
import java.io.*;
public class Qual2012 {
public static void lame() {
try {
FileReader fr = new FileReader("input.txt");
BufferedReader reader = new BufferedReader(fr);
PrintWriter writer = new PrintWriter("output.txt");
HashMap<String,String> dictionary = new HashMap<String,St... |
B21049 | B21977 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Scanner;
public class C {
private Scanner in;
pri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.