F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A11135 | A11478 | 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... | /**
* Dancing With the Googlers
*/
package com.google.jam.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream... |
B10231 | B10080 | 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 qual2012.C;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigInteger;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers {
//private static String inputFileNam... |
B20023 | B20073 | 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.Scanner;
import java.util.LinkedList;
public class ProblemC {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int T = scan.nextInt(); //number of cases
scan.nextLine();
for (int k = 1; k <= T; k++) {
int A = scan.nextInt();
int B = scan.nextInt();
i... |
B10361 | B12555 | 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.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ClientC {
public static void main(String args[]) throws Exception {
ClientC client = new ClientC();
String[] inputLines... |
A21010 | A20133 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.io.*;
import java.util.*;
public class ProblemB {
public static void main(String[]args) {
Scanner f = new Scanner(System.in);
int T = f.nextInt();
for(int set=0;set<T;set++) {
int N = f.nextInt(), S = f.nextInt(), p = f.nextInt();
int[] t = new int[N];
int result = 0;
for(int c... |
A12544 | A11462 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | package it.simone.google.code.jam2012;
public class Dancer implements GoogleCodeExercise {
int surprise = 0;
int googlers = 0;
int p = 0;
@Override
public String execute(String line) {
int result = 0;
String[] data = line.split(" ");
googlers = Integer.parseInt(data[0]);
surprise = Integer.parseInt(da... |
B12669 | B12458 | 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.Scanner;
public class Problem3 {
public static void main(String[] args) {
try {
Scanner inputReader = new Scanner(new File("S:\\input.in"));
int inputCases = inputReader.nextInt();
PrintWriter outputWriter = new PrintWriter("S:\\output.... |
B13196 | B10218 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package googlecodejam2012_qualification;
/**
* @author neil
*/
import java.io.*;
import java.util.*;
public class NewMain {
/**
* @param args the command line arguments
*/
static boolean recycle(int n,int m)
{
String N = Integer.toString(n);
String M = Integer.toString(m);
... |
B10361 | B10139 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | import java.io.*;
import java.util.*;
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) {
... |
B10361 | B11514 | 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 Qualification.A.jam2011;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
/*
4
3 1 5 15 13 11
3 0 8 23 22 21
2 1 1 8 0
6 2 8 29 20 8 18 18 21
*/
public class test {
static int A = 0;
static int B = 0;
public static v... |
B10231 | B12064 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | package codejam;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Gedion Moyo
*/
public class recycler {
/**
* @param args the command line... |
B22190 | B21995 | 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.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.StringTokenizer;
public class Recycle
{
static String shiftRight( String s )
{
String res = "" + s.charAt(... |
A11917 | A10873 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... |
import java.io.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.regex.Pattern;
/** Parse the movie database.
*
* The format of this database is one movie per line, with movie fields
* separated by a ",". The format is:
*
* title,category
*
* Not... |
B20291 | B21909 | 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.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chamika
*/
public class GRecycle {
public static void main(String[] args) {
Scanner s = new Scanner(System... |
A22771 | A22845 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static int findX(int x, int y, int z, int score)
{
int a = -1;
a = (score - x-y-z)/3;
if(a+x + a+y + a+z == score)
return a+x;
else
return -1;
}
public stati... |
A20261 | A20796 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queu... |
B12082 | B10465 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.StringTokenizer;
public class ProblemC {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatEx... |
B21968 | B20260 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | package codejam.recycle;
import java.util.HashSet;
import java.util.Set;
public class Recycle {
public String solve(String s) {
String[] ss = s.split(" ");
int a = Integer.parseInt(ss[0]);
int b = Integer.parseInt(ss[1]);
int n = ("" + a).length();
int m = 0;
for (int i = a; i <= b; i++) {
int[] d... |
A11502 | A11122 | 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.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
FileInputStream fis = new FileInputStream(new File("in.txt"));
Fi... |
A22378 | A20490 | 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 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... |
A20934 | A20068 | 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 codejam;
import java.io.*;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class B {
static String str = "C:\\carl\\fbl.txt";
static String text = "";
static int N, S, P,T;
static int[][] list;
public static void main... |
B21968 | B20058 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.io.*;
import java.util.*;
/**
* @author Chris Dziemborowicz <chris@dziemborowicz.com>
* @version 2012.0414
*/
public class RecycledNumbers
{
public static void main(String[] args)
throws Exception
{
// Get input files
File dir = new File("/Users/Chris/Documents/UniSVN... |
A10793 | A11982 | 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.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;
public class B {
int[] mp=new int[33], sp=new int[33];
void start() {
for (int a=0; a<11; a++)
for (int b=a; b<11 && b<a+3; b++)
for (int c=b; c<11 && c<a+3; c++) {
int s=a+b+c;
if (c-a<2) mp[s]=Math.max(mp[s],c... |
B21270 | B21318 | 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... | package recycledNumbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import... |
B20734 | B21655 | 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.*;
public class QualC12 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for (int i = 1; i <= T; i++) {
int A = in.nextInt();
int B = in.nextInt();
int npairs = 0;
for (int j = A; j <= B; j++) {
String s = String.valueOf(j);... |
A12273 | A10234 | 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.ArrayList;
import java.util.Collections;
import java.util.List;
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 n = sc.nextInt();
int s = sc.nextInt();
... |
A10793 | A12578 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SpeakingTongues extends JamProblem {
Map<Character, Character> map = new HashMap<>();
public static void main(String[] args) throws IOException {
SpeakingTongues p = new SpeakingTongues();... |
B11361 | B10891 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | package 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... |
B22190 | B20823 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | package codejam.c;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import codejam.TestCaseReader;
public class Main {
public static void main(String[] args) {
TestCaseReader<int[]> reader = new TestCaseRea... |
A22771 | A22824 | 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... | package mgg.utils;
import java.util.List;
public class ListUtils {
public static String pureList(List<?> list) {
StringBuilder builder = new StringBuilder();
for (Object elem : list) {
builder.append(" " + elem);
}
return builder.substring(1).toString();
}
}
|
A20490 | A21429 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | package run;
import java.io.*;
public class Main
{
public static void main(String args[]) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int n = Integer.parseInt(s);
for(int i = 1;i<=n;i++)
{
s = br.readLine();
String []s_arr ... |
B13196 | B10558 | 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.FileReader;
import java.io.IOException;
import java.util.HashSet;
public class ProblemC {
public static int count(int A, int B) {
int count = 0;
for (int n = A; n < B; ++n) {
int l = (int) Math.log10(n) + 1;
int m = n;
HashSet<Integer> set = new HashS... |
A11135 | A12726 | 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.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class ProblemB {
static int numberOfSurprises;
static int atLeastP;
public st... |
A20490 | A21734 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... |
import java.io.*;
class ProblemB
{
public static void main(String[] args) throws IOException
{
FileReader fr = new FileReader(args[0]);
BufferedReader br = new BufferedReader(fr);
String[] splittArray;
int[] points;
int N,S,p,res;
int T = Integer.parseInt(br.readLine());
//System.out.println(T);
Stri... |
A20261 | A20981 | 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 fixjava;
/**
* Convenience class for declaring a method inside a method, so as to avoid code duplication without having to declare a new method
* in the class. This also keeps functions closer to where they are applied. It's butt-ugly but it's about the best you can do in
* Java.
*/
public interface Lambd... |
B11696 | B12967 | 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 qualification.recycled.numbers;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Rec... |
A11917 | A10796 | 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 dancing_with_googlers;
import java.io.*;
import java.util.*;
public class Start {
/** Requires two arguments - the file name, and the encoding to use. */
public static void main(String [] args) throws IOException {
ArrayList<String> input = ReadWriteTextFile.doReadTextFile("B-small-attempt4.i... |
B10231 | B13087 | 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 recycle;
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.util.ArrayList;
public class EnvironmentallyFriendly {
public static void main(String[] args) throws Exception
... |
A21010 | A21973 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package com.renoux.gael.codejam.utils;
/**
* Pour tests unitaires
*
* @author renouxg
*/
public final class ArrayUtils {
public static int[] parseInts(String[] strings) {
int[] res = new int[strings.length];
int i = 0;
for (String s : strings) {
res[i++] = Integer.parse... |
B21968 | B20600 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.util.*;
import static java.lang.System.*;
class C{
static public void main(String[] args){
Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine());
for(int c = 1; c<=cases; c++){
String[] s = sc.nextLine().split(" ");
int a = Integer.parseInt(s[0]);
int b = I... |
A12846 | A12942 | 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... | public class P {
public static void main(String[] arg) {
//greedyPossibleTuple(new int[] {29,20,8,18, 18,21},8,2);
//greedyPossibleTuple(new int[] {8,0}, 1,1);
//greedyPossibleTuple(new int[] {23, 22, 21, 20, 29}, 8, 0);
//System.out.println(parseLine("6 2 8 29 20 8 18 18 21"));
jav... |
A13029 | A13127 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
class IOSystem {
private String filePath;
private List<String> inputList = new ArrayList<String>... |
A22378 | A20895 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.util.Scanner;
import java.util.StringTokenizer;
public class DancingWiththeGooglers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in =new Scanner(System.in);
int cases=Integer.parseInt(in.nextLine())+1;
for(int tt=1;tt<cases;tt++)... |
A22771 | A20456 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
public class dancers {
public static void main(String[] args) {
try {
Scanner input = new Scanner(new File("c:\\files\\B-small-attempt0.in"));
FileWriter fw = new FileWriter("c:\\files\\douts.txt");
Print... |
A20934 | A21851 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | import java.util.ArrayList;
import java.util.List;
import Utils.FileHelper;
public class Gcj2012b {
private void solve(String inputPath, String filepath) {
FileHelper fHelper = new FileHelper(inputPath);
String[] inputStr= new String[fHelper.getTotalSize()];
List<String> rstList = new ArrayList<... |
A20261 | A22431 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.util.*;
import java.io.*;
public class Dancing {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int cases = in.nextInt();
for (int i = 1; i<=cases; i++) {
int n = in.nextInt(); // number of googlers
int s = in.nextInt(); // number of surprising triplets
int p... |
B12115 | B10790 | 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();
... | public class MalformedInputFileException extends Throwable {
private static final long serialVersionUID = -6714074599343669185L;
public MalformedInputFileException() {
super();
}
public MalformedInputFileException(String message) {
super(message);
}
public MalformedInputFileException(String message, Throw... |
A20382 | A21603 | 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.*;
public class B {
/**
* @param args
*/
private static boolean sup(int i,int j,int k) {
return (Math.abs(i-j)==2 || Math.abs(i-k)==2 || Math.abs(j-k)==2);
}
private static boolean[] analyze(int x, int p) {
int i,j,k;
boolean ret[] = new boolean[4];
for (i=0;i<=10;i++) {
for (j=0;... |
B22190 | B21518 | 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.*;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.InputMismatchException;
/**
* @author Mikeldi Latorre (mikeldi10@gmail.com)
*/
public class RecycledNumbers implements Runnable {
private InputReader in;
private PrintWriter out;
public static void main(String[] args) {
ne... |
B10485 | B13220 | 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.util.Scanner;
public class NumberRecycling {
public static void main( String args[] ) {
new NumberRecycling();
}
public NumberRecycling() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for( int j=1; j<=T; j++ ) {
System.out.println( "Case #"+ j + ": " + doCase(sc) );
}
}... |
A12273 | A12321 | 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 br.com.atama.google.jam.dancing;
public class TripletScore implements Comparable<TripletScore> {
private final int threshold = Context.INSTANCE.getThreshold();
private final int total;
private final int mod;
private final int gap;
private int potential = 0;
private int numGoodScore = 0;
private boolean... |
A21557 | A20809 | 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 be.mokarea.gcj.googledancers;
import java.io.PrintWriter;
import be.mokarea.gcj.common.TestCaseReader;
import be.mokarea.gcj.common.Transformation;
public class GoogleDancerTransformation extends
Transformation<GoogleDancerTestCase> {
public GoogleDancerTransformation(
TestCaseReader<GoogleDancerTestC... |
B21790 | B21508 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012pa;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
*
* @author Fred
*/
public class CodeJam2012PA
{
/**
* type entrada.txt | j... |
B13196 | B12568 | 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.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author JOSE
*... |
B21227 | B21254 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... |
import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;
public class ProblemC_Qual_2012 implements Runnable{
BufferedReader in;
PrintWriter out;
StringTokenizer tok = new StringTokenizer("");
void init() throws FileNotFoundException{
in = n... |
B11361 | B12010 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | import java.io.*;
import java.util.*;
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
... |
A22771 | A23058 | 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... | package codejam;
import java.io.*;
import java.util.Scanner;
public final class ReadWriteTextFile {
/** Constructor. */
ReadWriteTextFile(){
try {
out =new BufferedWriter(new FileWriter("output.in"));
scanner = new Scanner(new FileInputStre... |
A11135 | A11153 | 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.FileNotFoundException;
import java.io.FileReader;
public class Countscores {
public static int processLine(String data) {
int result = 0;
String[] info = data.split(" ");
// for (int i = 0; i < info.length; i++) {
// System.out.print(info[i] + " ");
// }
// Sys... |
A22191 | A22595 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Scanner;
public class Dancing {
public static void main(String args[]) {
try{
BufferedReader in = new BufferedReader(new FileReader("B-large.in"));
BufferedWriter out = new... |
A11502 | A10429 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | package MyAllgoritmicLib;
public class NOD {
public static int gcd (int a, int b)
{
if (b == 0)
return a;
else
return gcd (b, a % b);
}
public static long gcd (long a, long b)
{
if (b == 0)
return a;
else
return gcd (b, a % b);
}
public static double gcd (double a, double b)
{
if (b =... |
B12669 | B11332 | 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 quali2012;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import javax.swing.plaf.basic.BasicBorders.SplitPaneBorder;
public class C {
/**
* @param args
*/
public static void main(String[] args) {
Scanner in = new Scanner(... |
A11502 | A10030 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class GoogleB {
/**
* @param args
*/
public String szamol(String input){
String result="";
String a=input;
Integer c... |
B12570 | B10022 | 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.util.ArrayList;
import java.util.HashSet;
public class DancingWithTheGooglers {
private static String inputFile = "C:\\PERSONAL-WORKSPACE\\GCJ-2012\\src\\input-output\\Input.txt";
private static String outputFile = "C:\\PERSONAL-WORKSPACE\\GCJ-2012\\src\\input-output\\Output.txt";
public static void main(... |
A22360 | A20756 | 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.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Scanner;
public class Task2 {
private int parseLine(Scanner scanner) throws IOException {
int N = scanner.nextInt();
int S = scanner.nextInt();
int p = scanner.nextInt();
int[] table = new int[31];
for (int i =... |
B10485 | B11428 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author Suarabh Agarwal
*/
import java.io.*;
import java.util.Scanner;
public class Main3
{
public static void main(String args[])
{
try{
Scanner scan1 = new Scanner(new FileReader("... |
B10702 | B11599 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | package codeJam;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class RecycledNumbers {
private static int inputLength = 1;
/**
* @param args the command ... |
A12211 | A10834 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | package be.mokarea.gcj.common;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.Writer;
public abstract class GoogleCodeJamBase<T extends TestCase> {
protected abstract Transformation<T> createTransformation(TestCaseReader<T> testCaseReader, PrintWriter outputWriter) throws Exception;
protecte... |
B10361 | B10318 | 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());... | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GoogleCodeJam 2012
Qualifier
Problem 3 - Only for SMALL Input
1.0
by José Alberto Bonilla Vera (2012)
Mexico
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*~~~~~~~~~~~~~~~~~~~~... |
A22078 | A22487 | 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 qualification;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] Args) throws IOException {
Scanner sc = new Scanner(new FileReader("B-small.in"));
PrintWriter pw = new ... |
A12570 | A13056 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Dancing {
/**
* @param args
*/
public static void main(String[] args) {
try {
... |
B21968 | B21433 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | 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... |
B20023 | B21861 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.awt.print.Printable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws IOException {
Scanner scanner = null;
scanner = new Scanner(ne... |
B12074 | B12103 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | package com.renoux.gael.codejam.utils;
import java.io.Closeable;
import java.io.IOException;
/**
* <p>
* Cette classe comporte des méthodes utilitaires de gestion des flux d'entrée/sortie.
* </p>
*
* @author renouxg
*/
public class FluxUtils {
/**
* <p>
* Constructeur privé : cette classe ut... |
A22360 | A21247 | 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.Scanner;
public class B {
public static void main(String[] args) {
Scanner input = new Scanner( System.in );
int t = input.nextInt();
for( int i = 0; i < t; i++ ) {
int n = input.nextInt();
int s = input.nextInt();
int p = input.nextInt();
int minScore = ( p * 3 ) - 2;
int min... |
B12082 | B11826 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | package gcj.y2012.qual;
import java.io.*;
import java.util.*;
public class C {
private static String fileName = C.class.getSimpleName().replaceFirst("_.*", "").toLowerCase();
private static String inputFileName = fileName + ".in";
private static String outputFileName = fileName + ".out";
private static Scanner in;... |
A11201 | A10603 | 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 base;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import assignments.AssignmentB;
public class Solver {
public static void main(Strin... |
A12846 | A10186 | 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 CodeJam2012.Qualification;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
public class ProblemB {
private static final String DIRECTORIO = "D:\\CodeJam\\CodeJam2012\\Qualification\\ProblemB\... |
B10361 | B12363 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class RecycledNumbers {
static final String input_path = "data/input.c.txt";
private static Set<String> ans = new HashSet... |
A22360 | A20631 | 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.*;
public class DancingWithTheGooglers
{
public static void main(String [] args) throws Exception
{
BufferedReader br = new BufferedReader(new FileReader("BBI.txt"));
String write = "";
int i = Integer.parseInt(br.readLine());
for(int j = 1; j <= i; j++)
{
String ra = br.readLine();
i... |
A12570 | A11564 | 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... | package codeJam;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class DancingWithGooglers {
private static int inputLength = 1;
/**
* @param args the comm... |
A11201 | A12779 | 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 cj2;
import dancingwiththegooglers.ScoreAnalyzer;
import edu.uwec.cs.genacje.codejam.speakingintongues.GooglereseTranslator;
import edu.uwec.cs.genacje.codejam.utilities.objects.IoMgr;
import edu.uwec.cs.genacje.codejam.utilities.objects.StringFormatter;
/**
*
* @author James Genac
*/
public class Main {
... |
A22191 | A21594 | 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... |
public class kickClass {
public static void main(String[] args){
//testGraph.run();
//testCollection.run();
solutionRunner t1 = new solutionRunner();
}
}
|
B12074 | B11642 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package coba;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileW... |
B10245 | B10331 | 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 ProblemC;
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 Common {
static String filename="C:\\eclipse-jee-indigo-SR2-win32\\eclipse\\projects\\goole... |
A12273 | A12310 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import static java.lang.Math.abs;
public class B {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new FileReader("input.in"));
BufferedW... |
B12074 | B12804 | 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 Recycle {
public static void main(String[] args) throws FileNotFoundException, IOException {
Scanner sc = new Scanner(new File("input.in"));
FileWriter fstream = new FileWriter("out.txt");
BufferedWriter out = new BufferedWriter(fstream);
int T = sc.nextInt... |
B20424 | B21959 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Scanner;
public class E3 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = null;
sc = new Scanner(System... |
B12762 | B11434 | 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.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Ex... |
A10699 | A11439 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Main
{
public static HashMap<Chara... |
A12273 | A11403 | 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 dancingwiththegooglers;
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 DancingWithTheGooglers {
public static void main(String[] args) th... |
A22360 | A20091 | 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 ... | package com.codejam2012;
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 FileUtils {
public static String readFile(String fileName){
FileReader... |
B12941 | B11617 | 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.util.*;
public class permute
{
static LinkedList<Integer>[] build;
public static void Permute()
{
build = new LinkedList[1001];
for(int i=1 ; i<=1000 ; i++)
{
build[i] = new LinkedList();
String str = new String(i+"");
for(int j=0 ; j<str.length() ; j++)
{
char s2 = str.charAt(0);... |
A12460 | A11884 | 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.File;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class Dance implements Runnable {
public void run(){
try {
Scanner in = new Scanner(new File("B-small-attempt0.in"));
PrintWriter out = new Pri... |
A20261 | A20698 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.util.*;
public class googlers {
public static void main(String[] args){
int t;
Scanner s = new Scanner(System.in);
t=s.nextInt();
for(int k=0;k<t;k++){
int n,p,S;
n=s.nextInt();
S=s.nextInt();
p=s.nextInt();
int[] totals = new int[n];
int count=0;
for(int i=0;i<n;i++){
tota... |
B10149 | B13022 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.io.*;
import java.util.*;
public class RecycledNumbers {
String shift(String a) {
return a.substring(1) + a.charAt(0);
}
void solve() throws Exception {
int a = nextInt();
int b = nextInt();
int length = (b + "").length();
Set<Integer> set = new HashSet<Integer>();
int ans = 0, eq = 0;
... |
B21968 | B20422 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | package CodeJam;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
public class Recycled_Numbers {
/**
* @param args
*/
String rotation(String A, int nRot) {
String rotA = A.substring(0, nRot);
A = A.substri... |
A20490 | A22452 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | package util.graph;
public abstract class State implements Comparable{
}
|
A11201 | A10430 | 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 MyAllgoritmicLib;
public class SimpleNumbers {
public static boolean[] masInt;
public static void initSimpleInt(int n) { // âõîäíûå äàííûå
masInt = new boolean[n + 1];
for(int i=0; i<=n;i++){
masInt[i] = true;
}
masInt[0] = masInt[1] = false; // åñëè êòî-òî áóäåò èñïîëüçîâàòü ýòè
// çíà÷åíèÿ
... |
B13196 | B12281 | 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.util.*;
import static java.lang.Math.*;
import java.io.*;
public class C {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("C:/Users/Disha/Desktop/codejam/C-small.in"));
FileWriter fw = new FileWriter("C:/Users/Disha/Desktop/codejam/C... |
A21557 | A20042 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class GoogleDancers {
static BufferedWriter bw = null;
static long time = System.currentTimeMillis();
public static void main(String[] args) throws Exception {
try {
Scanner ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.