F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B10245 | B10013 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.util.*;
import java.io.*;
public class C {
public static void main(String[] args) throws Exception {
String inputfilename = args[0];
String outputfilename = args[1];
BufferedReader br = new BufferedReader(new FileReader(inputfilename));
BufferedWriter bw = new BufferedWriter(new FileWriter(outputf... |
B12762 | B10179 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gjam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
/**
*
* @author iNahoo
*/
public cla... |
A21010 | A21819 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancinggooglers;
import java.io.*;
/**
*
* @author Ruben
*/
public class DancingGooglers {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
... |
B12074 | B10349 | 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.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.StringTokenizer;
public class ProblemC {
/**
* @param args
*/
public static... |
B13196 | B12925 | 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 com.javanme.gcj.one.c;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.Charset;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.HashMap;
import java.uti... |
B10361 | B12245 | 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 codej;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class QualB {
Scanner scanner = null;
int caseLog = 0;
int A = 0;
int B = 0;
/**
* @param args
*/
public static void main(String[] args) {
QualB b = new QualB();
b.go();
}
public void go() {
... |
A10699 | A12803 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.File;
import java.io.FileOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
public class Solver {
private final static String DIR_PAT... |
A11917 | A12477 | 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.util.*;
import java.io.*;
class DancingWithTheGooglers{
Scanner input;
PrintWriter output;
StringBuilder answer = new StringBuilder();
public static void main(String[] args){
DancingWithTheGooglers app = new DancingWithTheGooglers();
app.openInput(args[0]+".in");
app.setOutput(args[0]+".out");
... |
B20291 | B21192 | 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[]... |
public interface ICounterZeroEvent {
public void fireEvent();
}
|
A10699 | A11639 | 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.*;
import java.math.*;
class B
{
private static final boolean DEBUG_ON = true;
private static final boolean ECHO_ON = true;
private static BufferedReader input;
private static BufferedWriter output;
private static final int INF = Integer.MAX_VALUE / 2;
private static final in... |
B20023 | B21276 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | package googlecodejam;
import java.io.*;
/**
*
* @author $Ruslan
*/
public class Recycled_numbers {
private static FileInputStream fileInputStream;
private static int testCaseNumber = -1;
public static void main(String[] args)
{
String filepath = "D:\\Programming\\NetBeansProjects\\" + ""
+ "GoogleCodeJam... |
A12846 | A10878 | 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.File;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class answer {
public static int solve(int N, int S, int P, int[] googler) {
int greater = 0;
int score;
for (int i = 0; i < N; i++) {
score = googler[i... |
A20934 | A20005 | 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.Scanner;
public class Main{
public static void main(String[] args) {
Scanner in= new Scanner(System.in);
int T= in.nextInt(); int n,t,s,answer=0;
for (int i = 0; i < T; i++) {
n=in.nextInt(); t=in.nextInt(); s=in.nextInt();
for (int j = 0; j < n; j++) {
int x=in.nextInt(); int nashti... |
A10996 | A10981 | 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);
... | package org.moriraaca.codejam;
public interface TestCase {
}
|
B10245 | B11374 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;
class Pair{
int x;
int y;
Pair(int x,int y){
this.x = x;
this.y = y;
}
public boolean equals(Pair p){
return this.x == p.x && this... |
A22771 | A21863 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.util.Scanner;
public class cj1 {
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int T = s.nextInt();
for (int i = 1; i<=T; i++) {
int N = s.nextInt();
int S = s.nextInt();
int p = s.nextInt();
int nc=0;
int nawt=0;
int nbwt=0;
int naw=0;
int nbw=0... |
B10361 | B12368 | 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());... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.*;
import java.util.*;
/**
*
* @author Alex
*/
public class ReduceReuseButDont
{
public static void main(String sArgs[]) throws IOException
{
Scanner oScan = new Scanner(n... |
A22771 | A20107 | 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 org.alaoui.googledance;
import java.io.IOException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName
* name of the te... |
B12074 | B10748 | 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... |
/*
ID: codeKNIGHT
LANG: JAVA
TASK:
*/
import java.util.*;
import java.math.*;
import java.io.*;
class recyledNumbers
{
public static void main(String args[])throws IOException
{
//Scanner in=new Scanner(System.in);
Scanner in=new Scanner(new FileReader("C:\\Users\\Lokesh\\Desktop\\C-small-atte... |
B10702 | B12706 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.util.*;
import java.math.*;
import java.io.*;
public class Main
{
public static void main(String args[]) throws IOException
{
Scanner c=new Scanner(System.in);
int T=c.nextInt();
for(int i=0;i<T;i++)
{
int ans=0;
int A=c.nextInt();
int B=c.nextInt();
for(int num=A;num<=B;num++)
... |
A21557 | A22298 | 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Result {
public boolean possible;
public int newSurprises;
public Result(int sur) {
possible = false;
newSurprises = sur;
}
public Result(boolean pos, int sur) {
possible = pos;
newSurprises = sur;
}
}
... |
A12113 | A10579 | 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.util.Scanner;
public class Main {
static int solve( Scanner in ) {
int N, S, p, ti, sol=0;
double div = 0.0;
N = in.nextInt();
S = in.nextInt();
p = in.nextInt();
double req = 0.0;
double min = 0.0;
if(p>0) {
req = (p*3-2)/3.0;
if(p==1)
min = 1.0/3.0;
else
min = (p*3-4)... |
A10996 | A12632 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class DancingGogglers {
static class Data{
int n,surprise,max;
int score [][];
int getNumberofNonMax(){
int max = 0;
for(int i = 0 ; i < score.length; i++){
if(score[i][1]... |
B11361 | B11303 | 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 q3{
public static int fact(int t){
int result = 1;
if(t < 1)
return 0;
for(int i = 1; i <= t; i++){
result *= i;
}
return result;
}
public static int choose(int n, int m){
if(m > n)
return 0;
if(m == n)
return 1;
... |
A10568 | A13016 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package googlejam;
import java.util.Scanner;
public class ProblemB {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numberOfCases = sc.nextInt();
for (int i = 0; i <= numberOfCases; i++) {
int googlers = sc.nextInt();
int suprisingTriplets = sc.nextInt();
int p = sc.... |
A20934 | A22494 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | package com.kiwien.google;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.A... |
B10858 | B11544 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Recycler {
public static void main(String[] args) {
// TODO Auto-generated method stub
String input;
BufferedReader br;
try{
br=new BufferedReader(new InputStreamReader(System.in));
int T=Integer.parseInt(br.readLine());
... |
A13029 | A10825 | 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.*;
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... |
B20023 | B21243 | 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.HashSet;
import java.util.Scanner;
public class problemC {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner cin = new Scanner(System.in);
int t = cin.nextInt(), a, b, c, i, ten, len, q, j = 0, ans, ts, k = 0;
while (t > 0) {
t--... |
A22360 | A22955 | 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 cj2012.qual;
import java.io.*;
import java.util.Arrays;
public class ProblemB extends PrintWriter {
private final static String PREFIX = "ProblemB_";
private final static String INPUT_FILE = PREFIX + "in.txt";
private final static String OUTPUT_FILE = PREFIX + "out.txt";
private static final... |
B10702 | B10936 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class qc {
public static void main(String [] args)
{
String fileName = "C-small-attempt0.in";
try{
FileReader fr = new FileReader(fileName);
BufferedReader br = new BufferedReader(fr... |
A11917 | A12981 | 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.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
public class GJ_QR_B {
public static int solve(int N, int S, int p, int[] t){
int[][] s = new int[31][2];
for (int i=0; i<31; i++){
... |
B12074 | B10001 | 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 numbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReade... |
A11502 | A12658 | 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 codejam2 {
static class triplet {
int a, b, c;
int maxdiff;
public triplet(int pa, int pb, int pc) {
a = pa;
b = pb;
c = pc;
maxdiff = maxdiff();
if (pa < 0 || pb < 0 || pc < 0) maxdiff = 3;
}
public boolean isSurprising() {
ret... |
A10699 | A10297 | 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.palantir;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Googlers {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int numTests = s.nextInt();
for (int i = 1; i <= numTests; ++i) {
System.out.p... |
A20261 | A20108 | 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 org.alaoui.googledance;
public class Dancer {
private int totalScore;
private Integer maxOrdinaryScore;
private Integer maxSurprisingScore;
public Dancer(int totalScore) {
this.totalScore = totalScore;
computeMaxScores();
}
private void computeMaxScores() {
int mod = totalScore % 3;
int floo... |
B10361 | B12259 | 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());... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.io.*;
/**
*
* @author Peter
*/
public class RecycledNumbers {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
... |
B13196 | B12207 | 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 hk.polyu.cslhu.codejam.solution.impl.qualificationround;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import hk.polyu.cslhu.codejam.solution.Solution;
import org.apache.log4j.Logger;
public class SpeakingInTongues extends Solution {
private Map<String, ... |
A12273 | A11933 | 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.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) {
... |
A12273 | A11030 | 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 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... |
A12273 | A11448 | 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 de.hg.codejam.tasks.dance.domain;
public class Case {
private final byte[] totalPoints;
private final int numberOfSurprisingTriplets;
private final int numberOfGooglers;
private final short bestResult;
public Case(short bestResult, int numberOfSurprisingTriplets,
byte[] totalPoints) {
this.totalPoin... |
A11277 | A10287 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | package Problem2;
import java.util.ArrayList;
import java.util.HashMap;
public class Main {
public static void main(String[] args){
ArrayList<String> ArS = new ArrayList<String>();
ArS = FileReader.Parsefile("input.txt");
int[] ArS2 = DancingGooglers.Count_List(ArS);
FileReader.writeconfig("output.txt", ... |
A11135 | A10394 | 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 googleCodeJam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class ProblemB {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
// Open the file that is t... |
A10793 | A10814 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
public class Scores
{
public static void main(String[] args) throws IOException
{
Scanner scan = new Scanner(new File("B-small-attempt0.in"));
FileWrite... |
A11277 | A10504 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | package gcj2012.qualification;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GooglerDance {
public static void main(String[] args) throws Exception {
GooglerDance main = new GooglerDance(args[0]);
main.solve();
... |
A22360 | A22574 | 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 es.saspelo.codejam.dancingwiththegooglers;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
imp... |
A22378 | A21533 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.util.*;
import static java.lang.Math.*;
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++) {
System.err.println(zz);
int N = in.nextInt();
int S = in.nextInt();
int P = in.nextInt();
int n... |
A12570 | A12679 | 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.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public class CodeJamQ2 {
public static String[] read(final String name) throws IOException {
final InputStreamReader reader = new FileReader(new File(name));
final char[]... |
B21790 | B20944 | 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 main;
import java.io.File;
import java.io.IOException;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;
import com.google.common.base.Charsets;
import com.google.common.ba... |
B11318 | B12807 | 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... | package com.evolve.codejam2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
class Pair {
private... |
A10568 | A10584 | 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.util.*;
import java.io.*;
public class B {
public static int solve(int T, int P) {
int[] score = new int[3];
score[0] = T/3;
score[1] = (T-score[0]) / 2;
score[2] = (T-score[0]-score[1]);
Arrays.sort(score);
int dif = score[2] - score[0];
if (dif > 2) {
System.err.println("ERROR"... |
A10996 | A12953 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;
public class ProblemB {
public static void main(String [] args) throws NumberFormatException, IOException... |
A10996 | A10312 | 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.io.PrintWriter;
import java.util.Scanner;
public class one {
public static void main(String[] args) {
try {
Scanner in = new Scanner(new File(args[0]));
PrintWriter out = new PrintWriter( new FileWriter(args[1]));
int T = in.nextInt();
for(int ... |
B10485 | B11470 | 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.HashMap;
import java.util.Scanner;
public class C1 {
public static void main(String arg[]){
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 count =0;
//System.out.println(A);
//System.ou... |
B11696 | B12479 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.io.BufferedWriter;
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.Scanner;
/**
*
*/
/**
* @author chuck.rolek
*
*/
public class Problem2 {
/**
* @param arg... |
A20119 | A21136 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
private static Map<Character,Character> mapa;
/**
* @param args
* @throws IOException
*/
public static void... |
A10793 | A12215 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithGoogler {
private static FileReader freader;
private static BufferedReader buffreader;
private static FileWriter fwriter;
private static Buffered... |
A12570 | A11318 | 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.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class ProblemB {
private void solve() {
Scanner in = new Scanner(new BufferedInputStream(System.in));
PrintWriter out = new PrintWriter(new Buff... |
B12115 | B11737 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
class Pair<L,R> {
private final L left;
private final R right;
public Pair(L left, R right) {
this.left = left;
this.right = right;
}
public L getLeft() { return left; ... |
A10793 | A10692 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
public class Dancing {
public static void main(String [] args) throws NumberFormatException, IOException
{
BufferedReader in = new BufferedReader(new StringReader(args[0]));
int rows = Integer.parseInt(in.readLine());
f... |
B12074 | B10309 | 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... | /*
* Anand Oza
* Apr 14, 2012
*/
import java.util.*;
import java.io.*;
public class C_RecycledNumbers {
public static void main(String[] args) throws IOException {
long startTime = System.nanoTime();
BufferedReader reader = new BufferedReader(new FileReader("C_RecycledNumbers.in"));
PrintWriter out = new Pr... |
A22642 | A22690 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | import java.io.BufferedReader;
import java.io.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... |
B12570 | B11832 | 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.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... |
B21790 | B22243 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | import java.util.Arrays;
import java.util.Scanner;
/**
* @author Dmitry Levshunov (levshunov.d@gmail.com)
*/
public class TaskC {
private static boolean[] used = new boolean[2000001];
private static int length;
private static int pow;
public static void main(String[] args) throws Exception {
... |
B12082 | B11950 | 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.*;
public class Recycler {
public static void main(String[] args) {
Recycler rec = new Recycler();
String line = "";
BufferedReader br;
BufferedWriter output;
FileWriter fstream;
int x;
int y;
try {
br = new BufferedReader(new FileReader("C-small-attempt0.in"));
li... |
B10245 | B10195 | 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... | // usage: java c infile > outfile
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Set;
import java.util.HashSet;
public class c
{
public static void main(String[] args) throws Exception
{
String infile = args[0];
BufferedReader reader = new BufferedReader(new FileReader(infile));
... |
A11917 | A12532 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
/... |
A12846 | A12742 | 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class ProblemB {
static Map<Integer, Score[]> scores;
public static void main(String[] args){
scores = new HashMap<Integer, Score[]>();
scores.put(0, new S... |
A11277 | A11142 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problem.b;
import java.util.Scanner;
import java.io.*;
/**
*
* @author Jason
*/
public class ProblemB {
/**
* @param args the command line arguments
*/
public static void main(String[] args... |
A22360 | A22283 | 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 googlers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
/**
*
* @author Floran
*/
p... |
B12085 | B10670 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... |
package recyclednumbers;
import java.io.*;
/**
*
* @author Kuzu
*/
public class RecycledNumbers {
public static void main(String[] args) {
try{
FileInputStream fstream = new FileInputStream("C-small-attempt3.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader... |
A21396 | A21239 | 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 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 B{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int n, s, p;
int[] ts;
void r... |
A10996 | A12522 | 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.*;
import java.util.*;
public class Main implements Runnable {
BufferedReader reader;
StringTokenizer tokenizer;
PrintStream writer;
Main() {
reader = new BufferedReader(new InputStreamReader(System.in));
tokenizer = new StringTokenizer("");
writer = new PrintStr... |
B12082 | B13178 | 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.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Scanner;
public class C {
static Scanner s;
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException {
// TODO Auto-generated method stub
... |
A12460 | A11322 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
Scanner scann... |
B10149 | B11262 | 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.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
int caseNum = 0;
while(caseNum++<T){
int A = sc.nextInt();
int B = sc.nextInt();
int ans = 0;
for(int i=A; i<B; i++){
for(int j=i+1; j<=B; j++){
... |
A20261 | A20561 | 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.File;
import java.io.FileReader;
import java.util.Scanner;
/**
*
* @author Gershom
*/
public class DancingWithGooglers {
public static void main(String[] args0) {
try {
File f = new File("example");
Scanner s = new Scanner(new FileReader(f));
int num... |
A22078 | A22288 | 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 qual;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class B {
public static void main(String[] args) throws Exception{
String in_file = "q/b/l_in.txt";
String out_file = in_file.replace("_in.txt", "_out.txt");
BufferedReader i... |
B12669 | B13040 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.util.*;
import java.io.*;
public class RecycledNumbers{
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Formatter formatter = new Formatter(System.out);
int T = Integer.parseInt(br.readLine());
int... |
B10702 | B10636 | 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.InputStreamReader;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author andy
*/
public class RecycledNumbers {
/**
* @param args the command line arguments
*/
public static void main(St... |
A12460 | A12174 | 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... | package hk.polyu.cslhu.codejam.solution.impl;
import hk.polyu.cslhu.codejam.solution.Solution;
import java.util.ArrayList;
import java.util.List;
public class StoreCredit extends Solution {
private int amountOfCredits, numOfItems;
private List<Integer> priceList;
@Override
public void setProblem(List<String> t... |
A10568 | A13123 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class B implements Runnable{
BufferedReader in;
BufferedWriter out;
static String inputFile="";
static String outputFile="";
static {
inputFile=B.class.getName()+".in";
outputFile=B.cla... |
B13196 | B11402 | 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 Round1;
/*
ID: kevinle7
LANG: JAVA
TASK: recycled
*/
import java.io.*;
import java.util.*;
class recycled
{
public static int[] pow = {1,10,100,1000,10000,100000,1000000,10000000,100000000};
public static void main(String[] args) throws IOException
{
BufferedReader f = new BufferedReader(new FileRea... |
B10245 | B12977 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.util.Scanner;
public class RecycledNum {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int i=0; i<T; i++)
{
boolean [] unused = new boolean[2000001];
int A = sc.nextInt();
int B = sc.nextInt();
int numPairs = 0;
int rot ... |
A21396 | A20262 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package com.gcj.main;
import java.util.ArrayList;
import com.gcj.parser.Parser;
import com.gcj.parser.MaxPoints;
public class Main {
public static void main(String[] args) {
Parser parser = new Parser("resource/InputData.txt");
ArrayList<Integer>[] datas = parser.toArray();
int index = 1;
for (ArrayList<... |
A20382 | A21239 | 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.*;
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 B{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int n, s, p;
int[] ts;
void r... |
A22642 | A20552 | 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 CodeJam;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
public class CodeJam {
public static void main(String[] args) throws IOException {
String outputFile = System.getenv("USERPROFILE") +
"\\Docume... |
B22190 | B20345 | 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 google.codejam;
import java.awt.Point;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.google.common.base.CharMatcher;
import com.google.common.base.Charsets;
import com.google.common.io.Closeables;
... |
B20856 | B22219 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | package tr0llhoehle.cakemix.googleCodeJam.recycledNumbers;
import java.text.ParseException;
import java.util.ArrayList;
import tr0llhoehle.cakemix.utility.googleCodeJam.Problem;
import tr0llhoehle.cakemix.utility.googleCodeJam.SupportedTypes;
public class RNProblem extends Problem {
private int lowerBorder;
priva... |
B11696 | B11474 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.io.*;
import java.math.*;
import java.util.*;
public class CodeJam {
void runCase(int caseNum) throws IOException {
int a = nextInt();
int b = nextInt();
Set<Long> res = new HashSet<Long>();
for (long i = a; i <= b; ++i) {
String s = Long.toString(i);
... |
B11696 | B12973 | 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 szarfos;
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 Main {
private static List<String[]> numbers;
public static void main(String[] args) thro... |
B21790 | B20855 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | import java.util.Scanner;
public class RecycledNumbers {
static int recycle(int n, int B) {
String nString = String.valueOf(n);
int out = 0;
for (int i = 0; i < nString.length(); i++) {
int cut = nString.length() - (i + 1);
String temp = nString.substring(cut) + nString.substring(0, cut);
in... |
B20856 | B20788 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | package com.codegem.zaidansari;
import java.io.File;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
class Pair {
int n, m;
public Pair(int n, int m) {
super();
this.n = n;
this.m = m;
}
@Override
public int hashCode() {... |
A13029 | A11147 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | package com.vlad;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(new File(args[0]));
FileWriter wr... |
A10568 | A11428 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package qualification;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
im... |
A11201 | A13003 | 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 codejam;
public class Dancer extends CodeJam{
public Dancer() {
super("B-small-attempt0");
}
public static void main(String[] args) {
new Dancer().run();
}
@Override
protected String solve() {
int n = scanner.nextInt();
int s = scanner.nextInt();
... |
B12082 | B11977 | 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... | /**
* @author Saifuddin Merchant
*
*/
package com.sam.googlecodejam.helper;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class InputReader {
BufferedReader iFileBuffer;
long iCurrentLineNumber;
public InputReader(String pF... |
A21010 | A21200 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.io.*;
public class Dancing{
public static void main(String args[]){
try{
FileInputStream fstream = new FileInputStream(args[0]);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
PrintWriter out = new PrintWrite... |
A22191 | A23069 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws FileNotFoundException {
Scanner scanner = new Scanner(new File("B-large.in"));
PrintWriter printer = new PrintWriter(new Fi... |
B20023 | B21141 | 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.*;
public class RecycledNumbers extends Thread
{
private int bottom;
private int top;
private static int numCases;
private static int caseIndex = 0;
private static int lower[];
private static int upper[];
private long thisCount = 0;
public static void main(String[] args)
{
int n = 1;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.