F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A20730 | A20619 | 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... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class Googlers implements Runnable {
final Scanner in;
final PrintWriter out;
public Goog... |
A22992 | A22859 | 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 codejam;
public class Dancer extends CodeJam{
public Dancer() {
super("B-large");
}
public static void main(String[] args) {
new Dancer().run();
}
@Override
protected String solve() {
int n = scanner.nextInt();
int s = scanner.nextInt();
int p ... |
A22771 | A21858 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.util.Arrays;
import java.util.Scanner;
public class B {
int N;
int S;
int p;
int[] A = new int[100];
int[][] memo = new int[100][100];
boolean[][] normal = new boolean[11][31];
boolean[][] surprise = new boolean[11][31];
B() {
for (int a=0; a<=10; ++a) {
for (int b=a; b<=10 && b<=a+2; ... |
B11318 | B10139 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.*;
import java.util.*;
public class ProblemC {
public static void main(String[]args) {
Scanner f = new Scanner(System.in);
int T = f.nextInt();
for(int set=0;set<T;set++) {
int A = f.nextInt();
int B = f.nextInt();
int b = B;
int leadingMult = 1;
while(b >= 10) {
... |
B21270 | B20561 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class RecycledNumbers {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFor... |
A11917 | A12108 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | package qualif.problem2;
import qualif.problem1.ReadWrite;
public class Main2 {
private static String pathToFile = "src/qualif/problem2/";
private static String fileName = "B-small";
private static String outputName = "output";
private static String filePath = pathToFile + fileName + ".txt";
private static St... |
B11421 | B12875 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package qualification;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) throws FileNotFoundException {
List<Pair> list = new ArrayList<Pair>();
Scanner s = new Sca... |
A20934 | A21129 | 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()... | public class DataModel extends Thread {
private int googlersNo;
private int suprScore;
private int minScore;
private int[] googScore;
private int caseNo;
private int output;
private boolean stateCalc;
public DataModel(String input, int caseNo) {
this.caseNo = caseNo;
String[] temp = input.sp... |
B10149 | B12726 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package com.develog;
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.StringTokenizer;
public class C {
final int A = 0;
final int B = 1;
BufferedReader reader;
BufferedWri... |
A22642 | A21053 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | package QualificationRound;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.regex.Pattern;
public class B
{
public B()
{
}
public ... |
B11327 | B10699 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.*;
import java.util.*;
import java.math.*;
public class Main implements Runnable {
static int power = 1;
private static String filename;
public static void main(String[] args) {
if (args.length>0 && args[0].equals("f")) filename = "input.txt";
else filename = "";
new Thread(new Main()).s... |
A21557 | A22637 | 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.File;
import java.io.PrintWriter;
import java.util.Scanner;
public class QualB {
/**
* @param args
*/
public static void main(String[] args)throws Exception {
Scanner sc = new Scanner(new File("E:/inp.txt"));
PrintWriter pr = new PrintWriter(new File("E:/out.txt"));
int tc=sc.nextInt();
... |
B10231 | B11148 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.io.*;
import java.util.*;
public class Solution {
public static void main(String args[]){
try{
FileInputStream fin=new FileInputStream("C:\\Program lang\\Google Code Jam\\input01.txt");
DataInputStream datain=new DataInputStream(fin);
BufferedReader br=new BufferedReader(new InputStreamReader(d... |
B20424 | B22042 | 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... | package google.solver;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
public class ProblemPackageCreator implements ChallengeConstants{
private final String packageName;
private String directoryName;
private String challengeDef;
private String readerName;
private String challeng... |
A12846 | A10471 | 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.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
scan.nextLine();
int c = 1;
while(scan.hasNextLine()) {
Scanner ls = new Scanner(scan.nextLine());
ls.nextInt();
int s = ls.nextInt();
int p = ls.nextInt();
... |
A12846 | A11648 | 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.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
public class LaDanceGoogler {
public static void main(String[] args) throws IOException {
Path input = Paths.get("/Users/mdymczyk/google-codejam/To... |
B20566 | B22092 | 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.*;
class qu3{
public static void main(String arg[])throws Exception
{
File f=new File("/Users/rishabhsonthalia/Downloads/C-large.in.txt");
FileInputStream fin=new FileInputStream(f);
File fo=new File("opt.txt");
FileOutputStream fout=new FileOutputStream(fo);
BufferedWriter bwr=new BufferedWriter(new Ou... |
B10155 | B10898 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Ayyoob
*/
public class Recyc... |
B21270 | B21789 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
public class RecycledNumbers {
public static void main(String[] args) {
try {
File dataFile = new File(ar... |
B12762 | B12265 | 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.File;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public static void main(String args[]) throws Exception {
final String PATH = "/home/goalboy/software installation/codejam-commandline-1.0-beta4/source/";
final String FILE = "C-s... |
A22642 | A22370 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | import java.io.*;
import java.util.Scanner;
public class Dance
{
public static void main(String[] args)
throws IOException
{
//new FileReader("dancing.in")
Scanner input = new Scanner(System.in);
int next = Integer.parseInt(input.nextLine());
// PrintWriter output = new PrintWriter(new Buffered... |
B10245 | B10398 | 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 R0;
import java.io.*;
import java.util.*;
public class C {
private static final int res[] = new int[8];
private static long check(int A, int B, int m, int c) {
long ret = 0;
for (int i = A; i < B; i++) {
int x = i;
for (int k = 0; k < c; k++) {
res[k] = x = x / 10 + m * (x % 10);
if ( x... |
B21752 | B20347 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.*;
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... |
B11327 | B11246 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class cyclic {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int in = Integer.parseInt(sc.nextLine());
int i = 1;
while (i <= in) {
int A = sc.nextInt();
int B = Integer.parseIn... |
A20730 | A20099 | 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... | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
Integer numCases = Integer.parseInt(in.nextLine());
for (int i = 0; i < numCases; i++)
{
int num = in.nextInt();
int[] dancers = new int[num];
int surp = in.nextIn... |
A20490 | A20376 | 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 gcj2012.qual;
import gcj2010.round2.*;
import gcj2009.*;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
... |
B21049 | B20598 | 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 student;
import java.io.*;
import java.util.*;
public class test {
public static int getShift(String t, int pos)
{
int len = t.length()/2;
return Integer.parseInt(t.substring(pos,pos+len));
}
public static void main(String[] args) throws IOException
{
Scanner fin = new Scanner(new File("C-la... |
A22360 | A22001 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class GoogleDance {
public static void main(String[] args) {
File inputFile = new File("input.txt");
Scanner s;
try {
s = new Scanner(inputFile);
int lineCount = s.... |
B10149 | B13080 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
public class Recycled {
public static boolean isRot(String a, String b){
if(a.length()!=b.length())
return false;
if(!a.equals(b)){
String c = b;
for(int i=0;i<a.le... |
A20261 | A20794 | 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.*;
import java.util.*;
public class GCJ_Q_B
{
// public static String
// public static int
// ArrayList list = new ArrayList();
// HashMap map = new HashMap();
// HashSet set = new HashSet();
// for(int i=0;i<;i++)
// for(int j=0;j<;j++)
// for(int k=0;k<;k++)
// System.out.println();
// Syste... |
A12846 | A10344 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package b;
import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;
/**
*
* @author Leo
*/
public class B {
public static void main(String[] args) throws Fi... |
A20382 | A21217 | 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.util.Scanner;
public class B {
public static void main(String args[]) {
new B();
}
public B() {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int t=1; t<=T; t++) {
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int y = 0;
for(int n=0; n<N; n+... |
A10568 | A10435 | 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.InputStreamReader;
public class DancingWiththeGooglers {
BufferedReader reader;
char [] charInput;
String [] inputArray;
int index;
DancingWiththeGooglers()throws Exception{
String input=null;
reader = new BufferedReader(new InputStreamReader(System.in));
while(... |
B11421 | B11064 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package 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... |
A20119 | A20101 | 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.File;
import java.io.FileReader;
public class Second {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new FileReader(new File(
"/Users/narok119/Desktop/B-large.in")));
String txt = reader.readLine();
int ca... |
A22992 | A20948 | 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 org.moriraaca.codejam;
public interface TestCase {
}
|
B12570 | B10705 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | package test.googlejam.year2012.jam;
import java.io.IOException;
import org.apache.commons.lang.StringUtils;
import test.googlejam.base.ProblemProcessor;
import test.googlejam.base.ValueReader;
public class RecycledNumbers extends ProblemProcessor
{
static java.util.Map<Integer, Integer> mapping = new java.util.T... |
B10245 | B12801 | 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.*;
import java.util.*;
public class Pair{
public int first;
public int second;
public Pair(){
first=0;
second=0;
}
}
|
A11135 | A11181 | 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.codejam.qualification.b;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.FileUtils;
public class DancingWithGooglers {
private Map<String, String> language = new HashMap<Strin... |
B20291 | B21848 | 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[]... | import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class RecycledNumbers {
public static void main(String[] args) {
try {
System.setOut(new PrintStream(new FileOutputStream("output.txt")));
Scanner ... |
A21396 | A21996 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class dancing {
public static void main(String[] args) {
dancing dance = new dancing();
dance.readFile("test.txt");
}
... |
B20734 | B21438 | 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... | package jp.funnything.competition.util;
import java.util.List;
import com.google.common.collect.Lists;
public class Lists2 {
public static < T > List< T > newArrayListAsArray( final int length ) {
final List< T > list = Lists.newArrayListWithCapacity( length );
for ( int index = 0 ; index < leng... |
A22378 | A22652 | 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.InputStreamReader;
import org.junit.Assert;
public class DancingWithTheGooglers {
public static void main( final String[] args ) throws Exception {
final BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );
final int T = Integer.parseInt( br... |
B10702 | B12640 | 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.sql.Types;
public class Recycled {
/**
* @param args
* @throws IOException
*/
public static int calc(int a,int b) {
int result = 0;
int[] numbers = new int[b-a+1];
int ncircle = 0;
int type=1;... |
A12211 | A10156 | 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.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Collection;
public class Main {
public static void main( String[] args ) {
try {
BufferedReader reader = new BufferedReader( new FileReader( ... |
A22378 | A21544 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | package com.jp.common;
import com.codejam.two12.tongue.Googlerese;
public class ExecutorApp {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// String inputFileName = "/Users/joekumar/Documents/workspace/CodeJam/src/com/jp/data/sample_input.txt";
... |
A20119 | A21866 | 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.*;
import java.util.*;
import java.lang.*;
public class Googlers {
private BufferedReader br;
private int numCases;
public Googlers(String input){
try{
FileInputStream fstream = new FileInputStream(input);
DataInputStream in = new DataInputStream(fstream);
br = new BufferedReader(new ... |
B12669 | B12254 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.*;
import java.util.*;
public class C {
private static void solve() throws IOException {
int testCases = nextInt();
for (int test = 1; test <= testCases; test++) {
out.print("Case #" + test + ": ");
solveOneTest();
}
}
private static void solveOneTest() throws IOException {
out.printl... |
B12115 | B11548 | 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.*;
import java.util.StringTokenizer;
public class RecycledNumbers {
static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner(String fileName) throws IOException {
br = new BufferedReader(new FileReader(new File(fileName)));
}
... |
B21790 | B20287 | 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... | package com.anuragkapur.jam2012.qr.C;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
im... |
A11135 | A10953 | 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 at.jaki.codejam.qr2012.B;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
private static final String TEMPLATE = "Case #%d: %d";
private static final String IN = "B-small-attempt0.in";
private static final String OUT = "B-s... |
B20006 | B21841 | 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.*;
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... |
A20382 | A21996 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class dancing {
public static void main(String[] args) {
dancing dance = new dancing();
dance.readFile("test.txt");
}
... |
B10155 | B10891 | 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 de.at.codejam.gui;
import java.awt.BorderLayout;
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
import de.at.codejam.util.CodeJamConstants;
import de.at.codejam.util.StatusListener;
import de.at.codejam.util.TaskStatus;
public clas... |
B11327 | B12048 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import j... |
B12085 | B12858 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.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 FileRW {
public static List<String> readFile(String fileName) throws IOException{
List<String> lines... |
B12074 | B11931 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.util.*;
import java.io.*;
public class C {
public static void main(String[] args) {
int n = 0;
int[] a = null;
int[] b = null;
try {
File file = new File(args[0]);
Scanner sc = new Scanner(file);
n = sc.nextInt();
a = new int[n];
b = new int[n];
for (int i=0;i<n;i++) {
a[i] =... |
A11135 | A11631 | 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 qualification;
import java.io.*;
public class Bsmall {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new FileReader("./src/qualification/B-small-attempt1.in"));
BufferedWriter bw = new BufferedWriter(new FileWriter("./src/qualification/B-small-attempt1... |
B20856 | B22231 | 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.*;
public class codejam {
/**
* @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;
int k;
int x;
int y;
int l;
int z;
for(i=1;i<=m;i++) {
int a=sc.nextInt();
i... |
A10996 | A11841 | 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.*;
class Googlers
{
public static void main(String args[]) throws IOException
{
FileInputStream fstream = new FileInputStream("B-small-attempt0.in");
DataInputStream dstream = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(dstream));
FileWriter fw = ... |
B12570 | B11459 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
public class MainImpl {
public static int numberOfLine... |
A10996 | A12871 | 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.FileWriter;
import java.util.Scanner;
public class B {
private static final String NAME = "B-small.txt";
private static final File input = new File("in", NAME);
private static final File output = new File("out", NAME);
public static void main(String[] args) throws Exception... |
B10702 | B10639 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
import java.util.Set;
public class GCJ3 {
public static int pow(int num, int p) {
int n = 1;
while (p > 0) {
p--;
n *= num;
}
return n;
}... |
B12082 | B11199 | 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.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 {
... |
B10231 | B12144 | 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 qualif.problem3;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class RecycledNumbers extends ProblemClass{
public RecycledNumbers(Scanner input) {
super(input);
}
protected String processLine(String line) {
String[] inputs = line.split(" ");
Integer lowNu... |
B12074 | B10950 | 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.IOException;
import java.util.InputMismatchException;
import java.util.Set;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.Writer;
import java.math.BigInteger;
import java.util.HashSet;
import java.io.InputStream;
... |
B10858 | B11632 | 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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
public class EagleProblemC {
public static vo... |
A10699 | A11933 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package com.sam.googlecodejam.dance;
import com.sam.googlecodejam.helper.InputReader;
public class DanceScore {
int iBestScore;
int iSuprize;
int iMean;
int iSetCount = 0;
class TripletScore {
public int judge1;
public int judge2;
public int judge3;
public void setValue(int j1, int j2, int j3) {
... |
A10699 | A11030 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package fixjava;
import java.util.ArrayList;
/**
* String splitter, this fixes the problem that String.split() has of losing the last token if it's empty. It also uses
* CharSequences rather than allocating new String objects.
*/
public class Split {
/**
* String splitter, this fixes the problem that String.sp... |
A12544 | A12563 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Problem2 {
public static void main(String arg[])
{
try{
FileInputStream fstream = new FileInputStream("... |
A10699 | A11562 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.*;
import java.util.*;
public class Launcher {
static int t, n, s, p, tcount, ncount, scount, pcount;
static int a, b, num, ans;
public static void main(String[] args){
String c;
int i,j;
try {
FileInputStream fin = new FileInputStream ("input.txt");
System.out.println("Input fi... |
A10699 | A11756 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
*
*/
/**
* @author Bryan
*
*/
public class problemB {
/**
* @param args
*/
public stat... |
A12570 | A11319 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.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;
... |
A21010 | A20802 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package be.mokarea.gcj.common;
import java.io.PrintWriter;
public abstract class Transformation<T extends TestCase> {
private TestCaseReader<T> caseReader;
private final PrintWriter outputWriter;
public Transformation(TestCaseReader<T> caseReader, PrintWriter outputWriter) {
this.caseReader = caseReader;
this... |
B20023 | B21307 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
public class gcj2012PBS {
public String recycle(String num, int cycle) {
if (cycle == 0) {
return num;
}
String s = String.valueOf(num);
int len = s.length();
String temp = s.substring(len-1,len);
Strin... |
A10699 | A10863 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package dancing;
import java.io.*;
public class DancingG {
private int N;
private String[] InputStringArray;
private String[] OutputStringArray;
public static void main(String[] args) {
try{
DancingG dg = new DancingG();
if (dg.GetDataFromInputFile())
if (dg.ProcestestData())
dg.WriteDatatoOutp... |
B21752 | B21872 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class C {
/**
* @param args
*/
public static String rest(ArrayList<String> list) {
String n = list.get(0);
list.remove(0);
return n;
};
public static void main... |
B12669 | B12611 | 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 sun.reflect.generics.tree.Tree;
import java.util.ArrayList;
import java.util.List;
public class MathUtil {
static List<Integer> convertToBase (int num, int base) {
ArrayList<Integer> integers = new ArrayList<>();
if (num == 0) {
integers.add(0);
return integers;
... |
A21010 | A20451 | 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 QualifiactionRound;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class DancingWiththeGooglers {
/**
* @param args
*/
public static ... |
B20424 | B21485 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
/**
*
* @author topik
*/
public class RecycledNumbers
{
/**
* @param args the command line arguments
... |
A12113 | A12849 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Dance {
static int no_Test_Cases =0; //number of test cases
static String input_Array[]; //to read input f... |
B10155 | B12514 | 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.*;
import java.math.*;
public class recycle
{
static int A=0;
static int B=0;
static int C=0;
static int T=0;
static int ans=0;
static HashSet<Integer> ansset= new HashSet<Integer>();
public static void main(String[] args)
{
Scanner scan= new Scanner(System.in);
T=scan.... |
B10149 | B11299 | 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 RecycledNumbers {
public static void main(String[] args) {
BufferedReader in;
BufferedWriter out;
int T, i;
String line;
try {
in = new BufferedReader(new FileReader("input.txt"));
out = new BufferedWriter(new FileWriter("output.txt"));
} catch (FileNotFoundExce... |
B20023 | B20237 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
public class C_RecycledNumbers {
static int a;
static int b;
static HashSet<String> set;
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = n... |
A10793 | A10967 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.util.*;
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()... |
B20734 | B20580 | 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.ArrayList;
import java.util.Scanner;
public class C {
public static void main(String[] argv){
Scanner in = new Scanner ( System.in );
int T=in.nextInt();
for(int i=0; i<T; i++){
int A=in.nextInt(); int B=in.nextInt();
//boolean[] have=new boolean[B+1];
int Rep=0;
fo... |
A21396 | A20192 | 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.*;
import static java.lang.Math.*;
public class BB {
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 res = 0;
for(int i = 0; i <... |
B11421 | B11746 | 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.*;
import java.util.*;
public class Recycle
{
static int total;
static Set<Integer> set;
public static void main(String[] codejam) throws Exception
{
BufferedReader br = new BufferedReader (new FileReader ("recycle.in"));
PrintStream ps = new PrintStream... |
A12273 | A12283 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | package com.brootdev.gcj2012.common;
import java.io.*;
public class Data {
public final BufferedReader in;
public final PrintWriter out;
public Data(String inFile, String outFile) throws IOException {
in = new BufferedReader(new FileReader(inFile));
out = new PrintWriter(new BufferedWrit... |
B10155 | B12010 | 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 Main {
private static IO io;
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
io = new IO(System.getProperty("ONLINE_JUDGE")!=null);//false->files; true->console
... |
B21752 | B21674 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.*;
import java.util.*;
public class CodeJamCLarge {
public static void main (String[] args) throws IOException {
int i, j, k;
long startTime = System.currentTimeMillis();
File inFile = new File("C-large.in"); // File to read from
File outFile = new File("C-large.out");
BufferedReader rea... |
B13196 | B10401 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class Test2 {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("in.txt"));
BufferedWriter bw = n... |
B10361 | B11559 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | import java.io.*;
import java.lang.*;
import java.util.*;
public class Recycle{
public static void main(String args []){
try{
FileInputStream fstream = new FileInputStream("C-small-attempt0.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new B... |
A10699 | A11495 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package com.google.jam.eaque.stub;
import java.io.IOException;
public abstract class Stub {
private String outputFileName;
public String getOutputFileName() {
return outputFileName;
}
public void setOutputFileName(String outputFileName) {
this.outputFileName = outputFileName;
}
public abstract String ru... |
A11502 | A10382 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.*;
import java.util.*;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
try {
FileReader fileReader = new FileReader("B-small-attempt0.in.txt");
FileWriter fileWriter = new FileWriter("out.txt");
BufferedReader reader = new BufferedRe... |
B13196 | B10251 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//package codejam.practice;
/**
*
* @author Saikat Roy
*/
import java.io.*;
public class Main2 {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
public void input() throws IOExce... |
B10231 | B12818 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.util.*;
import java.io.*;
public class RecycledNumbers
{
public RecycledNumbers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("input.txt"));
}
catch(Exception e)
{
System.out.println("Problem opening input file... |
B10702 | B10163 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Scanner;
/**
* @author Paul LaMotte
*
*/
public class RecycledNumbers {
public static void main(String[] args) {
Scanner in;
try {
System.setOut(new PrintStream(new File("qualC... |
A22360 | A21576 | 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 uk.co.epii.codejam.common;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author jim
*/
public class FileLoader {
public F... |
B12762 | B10373 | 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.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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.