F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A22378 | A21243 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.io.*;
import java.util.*;
import java.text.*;
public class ProblemB {
int N, S, P;
int[] scores;
Map<Integer, ArrayList<Triplet>> ts = new TreeMap<Integer, ArrayList<Triplet>>();
int[] surprisecount = new int[31];
int[][] bestsurprise = new int[31][11];
int[][] notbestsurprise = new int[31][11];
... |
A21396 | A21109 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... |
import java.util.Arrays;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author alvin
*/
public class DancingWithTheGooglers implements Comparable<DancingWithTheGooglers> {
public int a, b, c;
public static vo... |
B12570 | B12181 | 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.*;
import java.util.*;
public class C {
static int N = 2000001;
static int[][] pair = new int[N][6];
static int[] np = new int[N];
public static void main (String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
for (int i = 1; i <= 6; ... |
A22378 | A20478 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
CaseB[] cases = read("B-large.in");
/*
// test reading
for (CaseB c : cas... |
A21010 | A22104 | 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 dancewithgoogle;
import java.util.*;
import java.io.*;
/**
*
* @author Aaron
*/
public class DanceWithGoogle {
/**
* @param args the command line arguments
*/
public static void main(Stri... |
A22642 | A21842 | 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... | /**
* @author Saifuddin Merchant
*
*/
package com.sam.googlecodejam.helper;
public class StringHelper {
}
|
B12762 | B12343 | 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 gcodejam2012;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.math.BigInteger;
import java.util.LinkedList;
import java.util.Scanner;
/**
*
* @aut... |
B21790 | B22137 | 0 | import java.io.*;
import java.util.*;
public class C {
void solve() throws IOException {
in("C-large.in"); out("C-large.out");
long tm = System.currentTimeMillis();
boolean[] mask = new boolean[2000000];
int[] r = new int[10];
int t = readInt();
for (int cs = 1; cs... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashSet;
... |
A12846 | A11563 | 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 qualificationRound;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int ncases = sc.nextInt();
StringBuilder sb = new ... |
B12941 | B12062 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | /**
*
*/
package code.google.codejam;
import java.util.HashSet;
/**
* @author sunilkumarp
*
*/
public class RecycledNumbers extends Template {
int A = 0;
int B = 0;
int digits = 0;
int[] n = null;
int m = 0;
/* (non-Javadoc)
* @see code.google.codejam.Template#doSolveProblem()
*/
@Overri... |
A12460 | A11842 | 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 gcj2012.qualification;
import java.io.File;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
public class B_Dancing_With_the_Googlers {
private static boolean SMALL = true;
private static String PROBLEM = "B";
public static void main... |
B21049 | B20161 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | package com.google.codejam.recyclednumbers;
import java.io.*;
import java.util.*;
public class RecycledNumbers {
private static String filename = "large";
public static void main(String[] args) throws Exception {
RandomAccessFile input = new RandomAccessFile(filename + "_in.txt", "r");
RandomAccessFile outpu... |
B10149 | B12511 | 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.Scanner;
public class ProblemC {
public static void main(String args[]){
Scanner scanner = new Scanner(System.in);
int noTestCases = Integer.parseInt(scanner.nextLine());
for(int i=0;i<noTestCases;i++){
String inputString = scanner.nextLine();
String[] temp;
temp = inputString.spli... |
A20382 | A21109 | 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.Arrays;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author alvin
*/
public class DancingWithTheGooglers implements Comparable<DancingWithTheGooglers> {
public int a, b, c;
public static vo... |
B11696 | B12944 | 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 lt.kasrud.gcj.common;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class IO {
public static Data readFile(String filename) throws IOException {
Data results = new Data();
BufferedReader reader = new BufferedReader(new FileReader(filename));
... |
B20006 | B21204 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | import java.awt.datatransfer.*;
import java.awt.Toolkit;
public class Repeat
{
private static String inp;
public Repeat()
{
}
public static void main(String[] args)
{
Transferable temp = (Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null));
try {
... |
B12941 | B10673 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | package C;
import java.io.*;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
new Main().go();
}
public void go() {
BufferedReader in = null;
BufferedWriter out = null;
try{
in = new BufferedReader(new FileReader("C-sma... |
A20261 | A20317 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class SecondQuestion {
public static int findBestScore(double[] scores, int surprise, int p){
int count = 0;
for(int... |
B20566 | B20259 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
public void solve() throws IOException {
int tests = nextInt();
HashSet<Long> hs = new HashSet<Long>();
for (int test=1; test<=tests; test++) {
out.print("Case #"+test+": ");
int a = nextI... |
B10858 | B12368 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| /*
* 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... |
B10899 | B11771 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... |
public class Number {
int A ;
int B ;
int length ;
public Number(String str) {
String[] tmpArr = str.split(" ");
A = Integer.parseInt(tmpArr[0]);
B = Integer.parseInt(tmpArr[1]);
length = tmpArr[0].length();
}
public int getRecycledPairCount() {
int count = 0 ;
for (int i=A; i<B; i++) { // i... |
A13029 | A11155 | 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 dance_comp;
import java.io.*;
public class Dance_Comp {
int N,count=0;
String s="",temp[];
public Dance_Comp() {
try {
FileInputStream fis=new FileInputStream("B-small-attempt0.in");
DataInputStream dis=new DataInputStream(fis);
FileOutputStream fos = ne... |
A20261 | A21948 | 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 qualB;
import java.util.*;
public class Dancing {
private static int cases;
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
if (input.hasNextInt()) {
cases = input.nextInt();
}
for (int i = 0; i < cases; i++) {
System.out.println("Cas... |
A11201 | A10014 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | package com.codejam.solution;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
public class GoogleDance {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader ... |
B20856 | B21625 | 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 gcj.main;
import gcj.cases.competition.qualification_round_2012.CaseC;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class Main {
public static final void main (String[] args) throws Exception{
// doTask("t... |
A12460 | A11761 | 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 gcj2012.qr;
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 ProblemB {
public static void main(String[] args) throws FileNotFoundException, IOException{
Buffe... |
A10568 | A11470 | 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.*;
class P2 {
public static void main(String[] Args) throws IOException{
InputStreamReader in = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(in);
int s, p, total, t = Integer.parseInt(br.readLine());
String tmp;
String[] tmp2 = new String[10];
... |
B10485 | B10783 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... |
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.ObjectInputStream.GetField;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.math.BigInteger;
public class C {
private static char[] alph;
p... |
B20566 | B21131 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class Recycled {
public static void main(String[] args) {
try {
File input = new F... |
A12846 | A11948 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | import java.io.*;
import java.util.*;
import java.awt.Point;
import java.lang.Math;
class Case{
int num0,num1,num2,num3;
String result="";
public Case(File aFile) {
try{
StringBuilder contents = new StringBuilder();
BufferedReader input = new BufferedReader(new FileReader(aFile));
String line = input... |
A13029 | A10733 | 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 Blank {
public static int cases = 0;
public static void main(String args[]) {
File input = new File("Input.txt");
File output = new File("Output.txt");
saveGame(output, convertString(loadGame(input)));
}
public static String[] loadGame(File input){
Scan... |
B10245 | B12991 | 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.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.StringTokenizer;
public class Main {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(S... |
B12570 | B12043 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.*;
public class Main
{
public static void main(String[] args)
throws Exception
{
BufferedReader in = new BufferedReader(new FileReader(args[0]));
FileWriter out = new FileWriter(arg... |
B10149 | B10662 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package com.google.codejam.qualification.recycled;
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.Arrays;
... |
A12544 | A10471 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
scan.nextLine();
int c = 1;
while(scan.hasNextLine()) {
Scanner ls = new Scanner(scan.nextLine());
ls.nextInt();
int s = ls.nextInt();
int p = ls.nextInt();
... |
A22771 | A21646 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class ProblemB
{
public static void main(String[] args) throws FileNotFoundException
{
Scanner sc = new Scanner(new File("B-large.in"));
sc.nextLine(); // input size
int cases =... |
A12544 | A11648 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
public class LaDanceGoogler {
public static void main(String[] args) throws IOException {
Path input = Paths.get("/Users/mdymczyk/google-codejam/To... |
A12460 | A11141 | 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 CodeJam2;
import java.io.*;
import java.util.HashMap;
import java.util.Scanner;
/**
*
* @author Ivan du Toit <s29363412>
*/
public class CodeJam2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
BufferedReader fIn = null;
PrintWrit... |
A21557 | A22954 | 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.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class b {
public static void main(String[] args){
new b().go();
}
private void go() {
Scanner in=new Scanner(System.in);
int numc=in.nextInt();
for(int cnum=1;cnum<=numc;cnum++){
int n=in.nextInt(),s=in.nextInt()... |
B12115 | B12088 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | package codejam;
import java.io.*;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class RecycledNumbers {
public static final String LINE_SEPARATOR = System.getProperty("line.separator");
public static int recycleNum(int a, int b) {
Map... |
A12273 | A11736 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//package dancinggooglers;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Scanner;
import java.util.regex.Pattern;
/**
*
* @author nasir
*/... |
B20006 | B21265 | 0 | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import org.jfree.data.function.PowerFunction2D;
public class r2a
{
Map numMap = new HashMap();
int output = 0;
/**
* @param args
*/
public static void main(String[] args)
{
r2a mk = new r2a();
try {
... | import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
File file = new File("in.txt");
Scanner sca... |
A22378 | A22296 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... |
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;
//Using the Google Collections library.
public class B {
public static void main(String [] args) throws IOException {
String inputFile = "src/B-large.in";
Scanner in = new Scanner(new File(inputFile));
Prin... |
B21049 | B20986 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | /**
* Written By Kylin
* Last modified: 2012-4-15
* State: Pending
*/
package me.kylin.gcj.c2012Q;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class RecycledNumbers {
String file;
Scanner sc;
PrintWri... |
B20023 | B20812 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.io.File;
import java.io.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... |
B20023 | B20784 | 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 package03;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class... |
A21557 | A21406 | 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) ... |
public class Triplet implements Comparable<Triplet> {
private int s1;
private int s2;
private int s3;
public Triplet(int _s1,int _s2,int _s3){
s1=_s1;
s2=_s2;
s3=_s3;
}
@Override
public int compareTo(Triplet o) {
return new Integer(o.getMax()).compareTo(this.getMax());
}
public boolean isSurpr... |
B10858 | B12259 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| /*
* 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) {
... |
B10361 | B10136 | 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.awt.Point;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
public class Prob2 {
private static String doAlgorithm(String[] lines) {
StringBui... |
A21010 | A23044 | 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 problemb;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
public class ProblemB {
public static void main(String args[]){
List<String> inputs = readInput();
int googlers = 0;
int specialCases = 0;
int bestScore = 0;... |
A10699 | A11619 | 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.sakthi.demo;
import java.io.File;
import java.util.Scanner;
/**
* @author Balaji
*
*/
public class GooglersDance {
/**
* @param args
*/
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
// System.out.println("check");
Scanner in = new Sc... |
A22078 | A20854 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.util.Scanner;
public class B {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int nCases = sc.nextInt();
for (int i = 1; i <= nCases; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt();
int y = 0;
for (int zz = 0; zz < n; zz++) {
... |
A11277 | A12842 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | import java.io.*;
import java.util.*;
public class ProblemB
{
public static void main(String[] args)
{
String txtfile="B-small-attempt1.in";
try
{
Scanner scan = new Scanner(new FileInputStream(txtfile));
FileWriter fstream = new FileWriter("B-small-attempt1.out");
BufferedWriter out = new BufferedWri... |
A11135 | A10240 | 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... | /**
ID: jerryma1
LANG: JAVA
PROG: B
*/
import java.io.*;
import java.util.*;
public class B {
static BufferedReader cin, in;
static StringTokenizer tk;
static PrintWriter out;
static int [] d = {0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28};
static int [] m = {100, 100, 2, 5, 8, 11, 14, 17, 20, 23, 26};
sta... |
A13029 | A12071 | 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.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... |
B13196 | B12046 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
public class RecyledNumbers {
public static void main(String[] args) {
String filename = "C:\\Users\\maheswaran\\Desktop\\C-small-attempt0.in"... |
A11201 | A12011 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | import java.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;
import java.util.List;
public class Main {
/**
* @param args
*/
public static void main(String[]... |
A12544 | A10344 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package b;
import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;
/**
*
* @author Leo
*/
public class B {
public static void main(String[] args) throws Fi... |
B10245 | B10724 | 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 wwu.quals2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lib.tuple.Pair;
impor... |
A22992 | A20242 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj2012;
/**
*
* @author allegea
*/
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintW... |
B10485 | B12996 | 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... | package mgg.utils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
public class CorrespondenceUtils {
public static String getT9Correspondence(char c) {
/** Generating code:
for(int i = 0; i<=25; i++){
System.out.println("case '"+((char)(i+((int)'a')))+"':");
System.ou... |
B10149 | B10444 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package qualification.taskA;
import java.util.HashMap;
import java.util.Map;
import Parser.MyReader;
import Parser.MyWriter;
public class Main {
public static void main(String[] args) {
MyReader myReader = new MyReader(
"/Users/shami13/Downloads/A-small-attempt0.in");
MyWriter myWriter = new MyWriter("/User... |
A22191 | A20700 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class googler {
public static void main(String args[]) throws FileNotFoundException
{
Scanner in=new Scanner(new FileReader("input.in"));
PrintWriter pw=new PrintWriter("ans.txt");... |
A20490 | A21247 | 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.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... |
A22642 | A22357 | 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.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");
... |
B21270 | B20292 | 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 R0;
import java.io.*;
import java.util.*;
public class C {
private static final int res[] = new int[8];
private static long check(int A, int B, int m, int c) {
long ret = 0;
for (int i = A; i < B; i++) {
int x = i;
for (int k = 0; k < c; k++) {
res[k] = x = x / 10 + m * (x % 10);
if ( x... |
A20490 | A20631 | 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.*;
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... |
A10568 | A12542 | 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 fr.lcwi.googlecodejam;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
* For Google Code Jam 2012
*/
public class ProblemB {
private static Scanner scanner;
private static int nbCases;
public static void main(String[] args) th... |
B11696 | B12657 | 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 qualifications2012;
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.Scanner;
public class ReycledNumbers {
public static int getReycled(int num, int upperBound) {
... |
A22360 | A20413 | 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 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 =... |
B10702 | B10092 | 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.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
final long MAX = 2000000;
try {
Scanner in = new Scanner(new FileReader("input.in"));
PrintWriter out = new PrintWriter("output.out");
int N=in.nextInt();
int[][] count=new int[10][(int)MAX];
List<Str... |
A10996 | A10922 | 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 codejam.qualification;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import codejam.Task;
public class B extends Task {
private int t;
private String[][] testCases;
private String[] resultset;
public B(String[] args) {
super(args);
}
public static void main(String[] a... |
A11135 | A11781 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.Scanner;
public class GooglerScores {
public static void main(String args[]) throws FileNotFoundException {
//////////////////////////////////////
// Begin Code Jam regular code //
///////////////... |
B13196 | B10249 | 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.FileWriter;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
public class RNumber extends Basic2
{
public static void main(String[] args) throws Exception
{
RNumber p3 = new RNumber();
p3.initializ... |
B10245 | B12066 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | package codeJam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
import java.util.Iterator;
/**
* http://code.google.com/codejam/contest/1460488/dashboard#s=p2
* @author Weiwei Cheng
*/
public class RecycledNumbers {
... |
A12544 | A11154 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintWriter;
public class DancingWiththeGooglers {
private static tripletOfScore[] triples;
private static void iniciarEscenario() {
triples=new tripletOfScore[31];
triples[0]=new t... |
A20382 | A21773 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author Shubham
*/
public class Dancers {
public static void main(String a[]) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integ... |
B12082 | B11707 | 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.util.*;
class Recycle
{
public static int[] combi = {0,0,1,3,6,10,16,21};
public static boolean[] bool;
public static int howMany(int x, int least, int greatest)
{
int rotate = x;
int pair = 1;
int i;
int j;
int dummy;
ArrayList<Integer> digit = new ArrayList<Integer>();
bool[rotate]=... |
B20023 | B21953 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
public class QualifiRound2012C {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
... |
B11327 | B13203 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| package tr0llhoehle.cakemix.googleCodeJam.recycledNumbers;
import java.util.ArrayList;
import tr0llhoehle.cakemix.utility.googleCodeJam.Solver;
public class RNSolver implements Solver<RNProblem> {
@Override
public String solve(RNProblem p) {
int amount = 0;
for (Integer i = p.getLowerBorder(); i < p.getUpper... |
A20261 | A20535 | 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 codejam.morl99.b;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
import codejam.morl99.a.ProblemA;
public class ProblemB {
pu... |
B12115 | B12265 | 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.File;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public static void main(String args[]) throws Exception {
final String PATH = "/home/goalboy/software installation/codejam-commandline-1.0-beta4/source/";
final String FILE = "C-s... |
B12941 | B12618 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import java.io.IOException;
import java.util.List;
public class ReverseWords extends JamProblem {
public static void main(String[] args) throws IOException {
ReverseWords p = new ReverseWords();
p.go();
}
@Override
String solveCase(JamCase jamCase) {
StringBuilder builder = new ... |
A11201 | A10871 | 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.... | /**
* Created by IntelliJ IDEA.
* User: Manish
* Date: 4/14/12
* Time: 9:30 PM
* To change this template use File | Settings | File Templates.
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
public class CodeJamProblemB {
public static void main(String args[]) throws Exception {
... |
B10361 | B12016 | 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.util.Scanner;
public class Recycle {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numLines = sc.nextInt();
int lineCounts = 1;
while (numLines > 0) {
String A = sc.next();
String B = sc.next();
// System.out.println(A + " ... |
A11201 | A11035 | 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 fixjava;
import java.awt.Adjustable;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.RenderingHints;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.ComponentAdapter;
... |
B10149 | B12400 | 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 =... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package inout;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
*
* @author Hasier Rodriguez
*/
public final class ... |
B12074 | B10650 | 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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class RecycledNumbers {
public static File input;... |
A11502 | A10370 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class DancingWithGooglers {
public static void main(String[] args) throws IOException {
File... |
A22078 | A20775 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package qualification.Dancing;
import java.util.*;
/**
*
* @author farshid
*/
public class Dancing {
public Dancing() {
}
public int solve(String problem) {
String[] arr = problem.split(" ");
... |
A22992 | A22822 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | package mgg.utils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
/**
* @author manolo
* @date 13/04/12
*/
public class CombinatoryUtils {
public static List<Integer> findAddingCombination(int total,
List<Integer> listOfNumbers) {
ArrayList<Integer> solution = new ArrayList<I... |
B12115 | B12319 | 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.util.*;
class QC{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int kase = sc.nextInt();
for(int k = 1; k<=kase; k++){
int A = sc.nextInt();
int B = sc.nextInt();
int count = 0;
for(int x= A; x<B; x++){
int[] cyc = new int[Integer.toString(x).length()]... |
A11917 | A12920 | 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 google.solver;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
public class ProblemPackageCreator implements ChallengeConstants{
private final String packageName;
private String directoryName;
private String challengeDef;
private String readerName;
private String challeng... |
B21049 | B20277 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class Recycled {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String li... |
B10858 | B10329 | 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.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Scanner;
public class G_3 {
static int a, b;
static HashMap<String, Integer> map;
static String change(int n) {
String s = "" + n;
int ... |
A22078 | A20730 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... |
A22992 | A21995 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancingwithgooglers;
import java.util.Scanner;
/**
*
* @author topik
*/
public class DancingWithGooglers
{
/**
* @param args the command line arguments
*/
public static void main(String[] ... |
A22771 | A20880 | 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... |
public class GooglersDance {
boolean surprising = true;
public int maxDancers(int n, int s,int p, int[] t) {
int len = t.length;
int winners = 0;
for(int i = 0; i < n; i++) {
if(checkWinner(p,t[i],!surprising)) {
winners++;
continue;
}
if(s > 0 && checkWinner(p,t[i],sur... |
B20291 | B21583 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | import java.io.*;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws FileNotFoundException, IOException {
Scanner sc = new Scanner(new FileReader("input.txt"));
PrintWriter pw = new PrintWriter(new FileWriter("output.txt"));
int noOfCases = sc.nextInt();
for (... |
A12570 | A10943 | 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.InputStreamReader;
import java.util.LinkedList;
public class Dancers {
static LinkedList<Integer> scores;
static int googlers = 0;
static int surprising = 0;
static int p;
public static void main(String[] args) {
String text = "";
int tests = 0;
int test_i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.