F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A12273 | A10999 | 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.... |
public class Code2DataStructure {
private int noOfGooglers;
private int surprisingTrplets;
private int p;
private int[] marks;
private int result;
public int getNoOfGooglers() {
return noOfGooglers;
}
public void setNoOfGooglers(int noOfGooglers) {
this.noOfGooglers = noOfGooglers;
}
public int getSurp... |
A10996 | A11148 | 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.File;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
/**
* User: Sasha
* Date: 09.04.12
* Time: 19:13
*/
public class Main {
private Scanner sc;
private PrintWriter wr;
private HashSet<String> set;
private void prepare() throws Exception {
s... |
B11696 | B12142 | 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 qualif.problem3;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class LaunchProblemC {
private static String pathToFile = "src/qualif/problem3/";
pr... |
A13029 | A10739 | 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 compete;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
public class B {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("B-small-attempt1.in... |
B12762 | B11199 | 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.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RecycledNumbers {
... |
B12762 | B12375 | 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 qualif3;
import java.io.File;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Qualif3 {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(new File("input"));
int num = Integer.parseInt(scan.nextLine());
for (int i = 1;... |
B10149 | B12517 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Recycled_Numbers {
/**
* @param args
*/
public static void main(String[] args) {
try {
Scanner sc = new Scanner(new File("C-small-attempt0.in"));
int caseN... |
B10149 | B11499 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Vector;
public class C {
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException
{
Scanner scan = new Scanner(n... |
A12273 | A11952 | 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 gs.taral.gcj2012;
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.ArrayList;
import java.util.List;
public class Dancing {
public static void main(String[] args)... |
B10155 | B12461 | 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 test3
{
public static void main(String[] args) throws Exception
{
new test3().run();
}
PrintWriter out = null;
int getCount(int d, int max)
{
String s = Integer.toString(d);
int n = s.length();
HashSet<Integer> hs = new HashSet<Integer>();
for (int... |
B11696 | B12505 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.util.*;
import java.math.*;
public class C{
public static int func(int x, int M){
int tmp,d=0,i;
int a[] = new int[10];
d = 0;
tmp = x;
while(tmp > 0){
a[d] = tmp % 10;
tmp /= 10;
d++;
}
int ten = 1;
for(i=0;i<d-1;i++) ten *= 10;
int y[] = new int[d];
tmp = x;
for(... |
B21790 | B20201 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... |
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
public class C {
static int countBiggerRotated(int n, int B) {
int count = 0;
LinkedList<Integer> l = new LinkedList<Integer>();
int t = n;
while(t > 0) {
l.addFirst(t%10);
t/=10;
}
HashSe... |
A12273 | A13038 | 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.util.*;
import java.io.*;
public class b {
public static void main (String[] args){
//settingup input and output
Scanner in = null;
PrintWriter out = null;
try{
in = new Scanner(new File("bsmall.txt"));
out = new PrintWriter(new FileOutputStream("bsmallout.txt"), true)... |
A10793 | A12335 | 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) {
... | /**
* Program : Test for google code jam
* Author : jenogg
* Since : 2012.04.14
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class Subject0102 {
/** Mapping map */
private Map<String, String> mapper;
... |
A21010 | A21859 | 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 gs.taral.gcj2012;
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.ArrayList;
import java.util.List;
public class Dancing {
public static void main(String[] args)... |
B11421 | B11462 | 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.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Solver {
Scanner inFile=null;
PrintWriter outFile=null;
int caseNo;
public Solver(int caseNo){
this.caseNo=caseNo;
}
public void processInput(Scanner inFile,PrintWriter outFile){
this.inFile=inFile;
this.outFile... |
B10485 | B10502 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.io.*;
import java.util.*;
public class Q3
{
public static boolean isPermut (int a, int b)
{
String str = String.valueOf (a);
for (int i = 1; i < str.length(); i++)
{
str = str.charAt (str.length() - 1) + str.substring (0, str.length() - 1);
if (Integer.parseInt (str) == b)
{
return tru... |
B10245 | B10131 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class main2 {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws Numb... |
B20734 | B20335 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... |
B20566 | B20364 | 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 dom.zar.jam.qualifications;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int inputLines = in.nextInt();
for (int i = 0; i < inputLines;) {
int a = in.nextInt();
int b = in.nextInt();
System.out.pri... |
A12211 | A11713 | 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.*;
import java.util.Scanner;
/**
* Created by IntelliJ IDEA.
* User: tanin
* Date: 4/14/12
* Time: 9:22 AM
* To change this template use File | Settings | File Templates.
*/
public class Dancing {
public static void main(String[] args) throws Exception {
String filename = "dancing";... |
B20734 | B20181 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int ti = 0; ti < t; ti++) {
int a = sc.nextInt(), b = sc.nextInt();
int sum = 0;
for (int i = a; i <= b; i++) {
int numOfDigits, power;
if (i < ... |
B10155 | B12440 | 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 com.jam.google;
import java.util.List;
public class RecycledNumbers {
public int count(int a, int b) {
int pairCount = 0;
for (int i = a; i <= b; i++) {
int candidate = i;
int j = 1;
while( (candidate = recycle(i,j++) ) != i) {
if (candidate > i && candidate <=b)
... |
B12074 | B12798 | 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.*;
import java.util.*;
public class C {
final static boolean DEBUG = true;
public Object solve () throws IOException {
int A = sc.nextInt();
int B = sc.nextInt();
long cnt = 0;
for (int n = A; n <= B; ++n) {
Set<Integer> M = new HashSet<Integer>();
String s = "" + n;
int L = s... |
B21227 | B21766 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcjqual;
import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author g... |
A12113 | A10836 | 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 be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
|
B10149 | B12344 | 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.*;
public class recycled {
private boolean compare(String s1, String s2){
String s3 = s2+s2;
boolean result = s3.contains(s1);
return result;
}
private void go() throws Exception {
File infile = new File("C-small-attempt1.in");
BufferedReader br = new BufferedReader(new InputStreamReader(
... |
A20119 | A22153 | 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.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import static java.lang.Math.*;
public class Solution implements Runnable {
public static void main(String[] a... |
A20261 | A22550 | 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 Triple;
public class Triple
{
private int X;
private int Y;
private int Z;
public Triple()
{
this.X = 0;
this.Y = 0;
this.Z = 0;
}
public Triple(int x, int y, int z)
{
this.X = x;
this.Y = y;
this.Z = z;
}
public Triple(int total)
{
this.X = total / 3;
this.Y = (total - this.X) / ... |
B22190 | B20629 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
public class ProbB {
/**
*... |
A21010 | A21485 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class B {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
FileInputStream fstream = new FileInputStream("... |
A22078 | A20221 | 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 codejam2;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Date;
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public a... |
A21396 | A22644 | 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.util.ArrayList;
public class Logic {
public static void solve() {
//First input line
//Texter.readLine();
int noOfCases = Integer.valueOf(Texter.readLine());
//Texter.writeText("Output");
for (int i = 1; i <= noOfCases; i++) {
int caseNo = i;
String nextLine = Texter.readL... |
B12669 | B10913 | 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.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T=in.nextInt();
for(int t=1; t<=T; t++) {
int N=0;
int A=in.nextInt(), B=in.nextInt();
int num = (int) Math.log10(B);
for(int n=A; n<B; n++) {
int p=10;
in... |
B21049 | B20067 | 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 com.gcj.recyclednumbers;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @original Apr 14, 2012 12:08:21 PM
* @author lewisju
... |
B12941 | B10589 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Scanner;
public class RecycledNumbers {
static ArrayList<intMapping> included;
... |
B20023 | B20246 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Scanner;
public class G_3 {
static int a, b;
static HashMap<String, Integer> map;
static String change(int n) {
String s = "" + n;
int ... |
B12762 | B10936 | 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;
public class qc {
public static void main(String [] args)
{
String fileName = "C-small-attempt0.in";
try{
FileReader fr = new FileReader(fileName);
BufferedReader br = new BufferedReader(fr... |
B20023 | B21803 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | package util.graph;
public abstract class Edge implements Cloneable{
public abstract State travel(State current);
public Node target;
public void connect(Node start, Node end) {
try {
Edge clone = (Edge) this.clone();
start.edges.add(clone);
clone.target=end;
... |
A11201 | A12982 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | package com.unitedcoders.examples.codejam;
import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class DancingWithGooglers {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(new F... |
A22191 | A21835 | 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.my;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Main {
public static void main(String[] args) {
Dancing d = new Dancing();
d.danc();
}
}
class Dancing {
public void... |
A21557 | A20882 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | package google.codejam;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
public class Stark_B {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
Scanner sc = new Scanner(new FileReade... |
A11502 | A10628 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @a... |
A22378 | A21785 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
/**
*
* @author Mahmoud
*/
public class CodeJam2 {
/**
* @param args th... |
B10231 | B12889 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.HashSet;
import java.util.Set;
/**
*
*/
/**
* @author Kamlesh Saran Dev
*
*/
public class RecycledPair {
int a;
int b;
/**
* @param i
* @param j
*/
public RecycledPair(int a, int b) {
this.a = a;
thi... |
A12544 | A10485 | 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.IOException;
import java.util.Scanner;
public class codejam_B_small {
public static void main(String[] args) throws IOException {
FileUtil.Timer.start();
Scanner scanner = new Scanner(System.in);
int numOfTest = scanner.nextInt();
scanner.nextLine();
String[] testCases = new String[numOfTes... |
A20261 | A22096 | 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.*;
class Programa
{
static boolean alcanza2(int a,int b)
{
int j1=0,j2=0,j3=0;
for (int i=0;i<=30;i++)
{
if (i+(i+2)+(i+2)==a)
{
j1=i;
j2=i+2;
j3=i+2;
}
if (i+i+(i+2)==a)
{
j1=i;
j2=i+2;
j3=i;
}
if (i+(i+1)+(i+2)==a)
... |
B10149 | B11060 | 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 fixjava;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.Map.Entry;
public class HashMapDualKey<K1, K2, V> extends HashMap<K1, HashMap<K2, V>> {
private static final long serialVersionUID = 1L;
/** Returns whether the dual map contains ... |
A11277 | A11852 | 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.File;
import java.io.FileReader;
import java.io.IOException;
public class FileIn {
private StringBuilder sb = new StringBuilder("");
/**
* ã³ã³ã¹ãã©ã¯ã¿.
* @param filename èªã¿è¾¼ããã¡ã¤ã«å
*/
public FileIn(String filename) {
File f = new File(filename);
FileReader fr... |
A11135 | A13135 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class DancingWithTheGooglers {
public static void main(String[] args) {
try {
//int T = 4;
//int[][] testcases = new int[T][];
// testcases[0] = new int[]{3,1,5,15,13,11};
// testcases[1] = new... |
B10858 | B10997 | 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.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class gcj_c {
public static void main(String[] args) {
try{
BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
... |
B20856 | B20899 | 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.util.*;
public class q3{
public static int fact(int t){
int result = 1;
if(t < 1)
return 0;
for(int i = 1; i <= t; i++){
result *= i;
}
return result;
}
public static int choose(int n, int m){
if(m > n)
return 0;
if(m == n)
return 1;
... |
A21396 | A22137 | 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 asem.googe.codejam.qround;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
/**
* @author A.Alathwari
*
* Problem A :
*
*/
public class ProblemA implements Runnable {
asem.core.util.InputReader fin;
java.io.PrintWri... |
A13029 | A11659 | 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... |
/**
* Write a description of class dancing here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.io.*;
public class dancing
{
public static void main(String args[]) throws IOException
{
int tcase,ng,sur,max;
int i, j, m, x, y=0,s,flag=0,sum,best,counter;
... |
A22191 | A20863 | 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 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() {
... |
B20006 | B20662 | 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 {
... | package gcj2012;
import java.io.File;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Scanner;
public class C {
static String BASEPATH = "x:\\gcj\\";
static boolean LARGE = true;
static String INPATH = BASEPATH + C.class.getSimpleName()... |
B12082 | B12772 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.io.*;
import java.util.*;
public class Tres {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("tres.txt"));
int T = Integer.parseInt(in.readLine());
for(int t = 0; t < T; t++) {
String[] temp = in.read... |
A10996 | A12402 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.util.*;
import java.io.*;
public class problem2
{
private final Scanner sc;
private static final boolean debug = true;
static void debug(Object ... objects)
{
if(debug)
System.err.println(Arrays.toString(objects));
}
problem2()
{
sc = new S... |
B12085 | B11226 | 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 codezam.util;
import java.math.BigDecimal;
public class MathUtil {
public static BigDecimal pow(int a, int b) {
BigDecimal result = new BigDecimal(a);
BigDecimal number = new BigDecimal(a);
if (b==0) {
result = new BigDecimal(1);
} else {
for (int i=1; i<b; i++) {
result = resul... |
B10702 | B12776 | 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.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class CMain {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[... |
A22642 | A20956 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.UUID;
public class DancingWithTheGooglers {
public static void main(String[] args) throws Exception {
DancingWithTheGooglers speakingInTougues = n... |
B12762 | B11014 | 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.*;
import java.util.LinkedList;
import java.util.StringTokenizer;
public class RecycledNumbers
{
public static void main(String[] args)
{
StringTokenizer st;
BufferedReader br = null;
try {
FileWriter fstream = new FileWriter("output.out");
... |
A20382 | A22137 | 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 asem.googe.codejam.qround;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
/**
* @author A.Alathwari
*
* Problem A :
*
*/
public class ProblemA implements Runnable {
asem.core.util.InputReader fin;
java.io.PrintWri... |
A12460 | A11873 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... | import java.io.BufferedReader;
import java.io.FileReader;
import java.util.StringTokenizer;
/**
*
* @author Sreesasanka G
*/
public class Dancers {
public static void main(String args[])throws Exception
{
BufferedReader in = new BufferedReader(new FileReader("B_Small.in"));
int cases = Integ... |
A22360 | A22456 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | import java.io.IOException;
import java.util.List;
public class ReverseWords extends JamProblem {
public static void main(String[] args) throws IOException {
ReverseWords p = new ReverseWords();
p.go();
}
@Override
String solveCase(JamCase jamCase) {
StringBuilder builder = new ... |
A22360 | A20111 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | import java.util.*;
class Main
{
public static void main(String[] arg)
{
Scanner in = new Scanner(System.in);
int trials = in.nextInt();
int tt = 0;
while(tt < trials)
{
int N = in.nextInt();
int S = in.nextInt();
int P = in.nextInt();
int ret = 0;
for(int i=0; i<N; ++i)
{
i... |
B10155 | B10337 | 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.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author megaterik
*/
public cl... |
A21396 | A20650 | 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.util.Arrays;
import java.util.Scanner;
public class Dancing {
/**
* @param args
*/
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
int T = reader.nextInt();
for(int tc = 1 ; tc <= T ; tc++ ) {
int N = reader.nextInt();
int S = reader.nextInt();
int p... |
A22992 | A20401 | 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 qualification.taskA;
import java.util.HashMap;
import java.util.Map;
import Parser.MyReader;
import Parser.MyWriter;
public class Main {
public static void main(String[] args) {
MyReader myReader = new MyReader(
"/Users/shami13/Downloads/A-small-attempt0.in");
MyWriter myWriter = new MyWriter("/User... |
B10361 | B11028 | 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());... | package org.moriraaca.codejam;
import java.io.InputStream;
public abstract class GeneralDataParser extends AbstractDataParser {
public GeneralDataParser(InputStream input) {
super(input);
}
@Override
protected void parse() {
testCases = new TestCase[scanner.nextInt()];
super.parse();
}
}
|
A22642 | A20048 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
* template class for code jam Contest
*
* @author Tudor
*
*/
public class Main
{
public static final String INPUT_FILE = "src/in.txt... |
A20934 | A22000 | 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 Googlers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class googlers {
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 < N; j++)
{
System.o... |
A21396 | A22620 | 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++){
... | /**
*
* @author slerig
*
*/
import java.io.*;
import java.util.*;
public class ScoreChecker {
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException {
File inFile = new File("B-large.in");
PrintWriter outFile = new PrintWriter("B-lar... |
B10245 | B12683 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
RecycledNumbers r = new RecycledNumbers();
r.run("C-small.in", "C-small.out... |
A22078 | A22504 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
try {
// so eclipse can read file from system in
System.setIn(new FileInputStream(new File("large.in")));
} catch (IOException e) {
e.pri... |
A11201 | A11553 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... |
import java.util.Scanner;
public class B_DancingWithGooglers
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int cases=1; cases<=t; cases++)
{
int players = sc.nextInt();
int surprising = sc.nextInt();
int limit = sc.nextInt();
... |
A21557 | A21438 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | package template;
import java.io.*;
import java.util.ArrayList;
import java.util.Random;
public class Utils {
static String logfile = "";
public static BufferedWriter newBufferedWriter(String filename, boolean append) {
BufferedWriter bw = null;
try {
bw = new BufferedWriter(new ... |
A13029 | A11020 | 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 fixjava;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* A work queue that allo... |
A13029 | A13106 | 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.qualification;
import com.qualification.ScoreCombo.Score;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class Three {
public static void main(String[] args) throws FileNotFoundException, IOException {
FileReader fr = new FileReader("/Users/minerva/Desktop/input.tx... |
A22360 | A20865 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.y12.round0;
import utils.Jam;
import utils.JamCase;
/**
*
* @author fabien
*/
public class DancingGooglers extends Jam {
public DancingGooglers(String filename) {
super(filename);
}
@Over... |
B12074 | B10171 | 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.PrintWriter;
import java.util.Scanner;
public class RecycledNumbers {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("C-small-attempt0.in"));
PrintWriter pw = new PrintWriter("C-smal... |
B11327 | B11972 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.util.*;
public class CodeJamC {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
for (int i = 1; i <= t; i++) {
int n = 0;
int a = scan.nextInt();
int b = scan.nextInt();
for (int j = a; j <= b; j++) {
int x = j;
int m = 1... |
A20382 | A22620 | 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... | /**
*
* @author slerig
*
*/
import java.io.*;
import java.util.*;
public class ScoreChecker {
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException {
File inFile = new File("B-large.in");
PrintWriter outFile = new PrintWriter("B-lar... |
B20291 | B21138 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | package contest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.Set;
import java.util.HashSet;
public class RecycledNumb... |
A21557 | A22465 | 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.io.IOException;
import java.util.List;
public class StoreCredit extends JamProblem {
public static void main(String[] args) throws IOException {
StoreCredit problem= new StoreCredit();
problem.go();
}
@Override
String solveCase(JamCase jamCase) {
StoreCreditCase cas... |
B10361 | B11260 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | import java.io.File;
import java.util.*;
public class ProblemC {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("C:\\C-small-attempt0.in"));
//Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine().trim());
for(int i = 0; i < cases; i+... |
A12846 | A12614 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | package qualifications2012;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.Scanner;
public class GoogleDancers {
public static void main(String[] args) throws FileNotFoundException {
Scanner in = new Scanner(new File("input.txt... |
B10231 | B12985 | 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 qualification_2012;
import java.io.File;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public void run() {
try {
Scanner in = new Scanner(new File("C.in"));
PrintWriter out = new PrintWriter(new File("C.txt"));
int T = in.nextInt();
for ... |
A20261 | A20479 | 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 B;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
PrintStream out = new PrintStream(new File("/output.txt"));
Scanner in = new Scanner(new File("/B-large.i... |
B11327 | B10864 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class ProblemC {
private String line = "";
private String fileContents = "";
private String delim = "\r\n";
private ... |
B10485 | B12674 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.Scanner;
public class RecycledNumbersSmall {
public static void main(String[] args) {
File file = new File("/Users/NoK/Desktop/C-small-attempt0.in");
int... |
A20934 | A21546 | 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 com.jp.common;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;
import java.util.Scanner;
public class InputOutputProcessor {
private int numberOfCases;
private boolean doesInputHaveDataSetLines;
private int indexOfDataSetLine;
p... |
A21557 | A22105 | 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.io.*;
import java.util.*;
public class QualiB
{
static void sop(String str)
{
System.out.println(str);
}
static void sop1(String str)
{
System.out.print(str);
}
public static void main(String args[])
{
long tstart = System.currentTimeMillis();
if(args.length < 1)
... |
B20006 | B20925 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ProblemSample implements Problem {
private int solution;
private int A;
@Override
public void solve() {
int resultat = 0;
for (int n = A; n <= B; n++) {
// o... |
A20261 | A22701 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Formatter;
import java.util.Locale;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author edemairy
*/
public class Main {
... |
B20566 | B20630 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Vector;
public class Main {
public static int recycled (int A,int B)
{
if(B<10)return 0;
String N,M;
int taille=1,Nbr=0;
for(int i=10;i<=B;i*=10)taille++;
for(int i=A;i<=B;i... |
B12669 | B11089 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | package codejam;
public class DirConsts {
public static final String //
INPUT_DIR = "/home/luke/Downloads", //
OUTPUT_DIR = "/home/luke/Downloads/CodeJam";
}
|
B11327 | B10584 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| package qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringWriter;
public class RecycledNumber {
public static void main(String[] args) throws IOException{
Bu... |
A12544 | A12833 | 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 static java.lang.Double.parseDouble;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
... |
B10485 | B10792 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
public abstract class TestCase {
public abstract void readInput(BufferedReader in) throws IOException, MalformedInputFileException;
public abstract void solve();
public abstract void writeOutput(PrintWriter out);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.