F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A12460 | A13097 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author ZuoZhong
*/
public class Dancer {
... |
A22992 | A22260 | 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... | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/**
* Created by IntelliJ IDEA.
* User: elbek
* Date: 4/13/12
* Time: 9:51 PM
* To change this template use File | Settings | File Templates.
*/
public class Task2 {
static Map<Character, Character> map = new HashMap<Character, Charac... |
B10858 | B10580 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package codejam.morl99.c;
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.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import jav... |
B12669 | B10718 | 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.*;
public class C {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
in.nextLine();
for(int line = 1; line <= T; line++){ // loop through lines
String numbers = in.nextLine();
int spaceIndex = numbers.indexOf(' ');
int low... |
B20734 | B21861 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.awt.print.Printable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws IOException {
Scanner scanner = null;
scanner = new Scanner(ne... |
B21207 | B20110 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
public class Recycled_Num {
public static void main(String[] args) {
//long currentTime = System.currentTimeMillis();
Scanner input_file = new Scanner(new InputStreamReader(System.in));
String input_line = null;
String[] nu... |
A21396 | A20335 | 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 codejam;
import java.util.*;
import java.io.*;
public class DancingWithTheGooglers {
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.readL... |
A12113 | A11158 | 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.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... |
A10568 | A12766 | 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 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.Arrays;
import java.util.StringTokenizer;
public class Dancing {
private static fina... |
B10231 | B11220 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.*;
public class jam3 {
/**
* @param args
*/
static int chuli(String s)
{
in... |
B21207 | B21169 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.common;
import java.util.ArrayList;
/**
*
* @author jim
*/
public class Input {
private final String[] header;
private final String[] data;
public Input(ArrayList<String>... |
A20261 | A21396 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.util.*;
public class 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++){
... |
A20382 | A20335 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | package codejam;
import java.util.*;
import java.io.*;
public class DancingWithTheGooglers {
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.readL... |
A10793 | A10553 | 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) {
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author ZAMAN
*/
import java.io.*;
public class test {
public static void main(String args[]) {
try {
BufferedReader a = new BufferedReader(new FileReader("B-small-attempt2.in"));
... |
A12273 | A13023 | 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 codeJam;
import java.util.Scanner;
import java.util.StringTokenizer;
public class DancingWiththeGooglers {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int cases = Integer.parseInt(scan.nextLine());
for (int i = 0; i < cases; i++) {
String temp = scan.nextLine();
... |
B10149 | B11194 | 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 javaapplication18;
/**
*
* @author USER-1
*/
import java.io.*;
public class Main {
/**
* @param args the command line arguments
*/
public static boolean check_recycled(int m,int n)
{
... |
A11502 | A10477 | 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 Q2
{
private static int max (int a, int b, int c)
{
return Math.max (a, Math.max (b, c));
}
public static void main (String[] args) throws IOException
{
BufferedReader reader = new BufferedReader (new FileReader ("input-q2.txt"));
PrintWriter writer = new... |
A10793 | A11132 | 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.File;
import java.io.FileReader;
import java.io.IOException;
public class GoogleDancing {
public static void solution(String fileName) throws IOException {
FileReader fileReader = new FileReader(new File(fileName));
BufferedReader bufferedReader = new BufferedReader(... |
B20856 | B21554 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | import java.io.*;
import java.util.*;
public class C {
private static void solve() throws IOException {
int testCases = nextInt();
for (int test = 1; test <= testCases; test++) {
out.print("Case #" + test + ": ");
solveOneTest();
System.out.println("solved "+test+"/"+testCases);
}
}
private static ... |
B12762 | B10672 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package net.anzix.learn.codejam.qr12;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class RecycledNumbers {
private Input... |
B10361 | B12421 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... |
import java.io.*;
import java.util.*;
/**
*
* @author Hilos
*/
public class ProblemC {
public static BufferedWriter bw;
public static BufferedReader br;
public static void main(String[] args) {
try {
String filename = "C-small-attempt0";
br = new BufferedReader(new Fil... |
B11421 | B12293 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package com.gnooo;
import java.util.HashMap;
import java.util.Scanner;
public class Solution {
static final boolean DBG = false;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
long dStart = System.currentTimeMillis();
StringBuilder sb = new StringBuild... |
A22378 | A21644 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | package round02;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
/**
* Problem B. Dancing... |
A21010 | A22288 | 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 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... |
A20490 | A22308 | 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 DancingGooglers {
private static final String IN_FILE = "B-large.in";
private static final String OUT_FILE = "B-large_output.txt";
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new FileReader(IN_FILE));
BufferedWriter bw = new Buffered... |
A11502 | A11039 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | package fixjava;
/**
* Convenience class for declaring a method inside a method, so as to avoid code duplication without having to declare a new method
* in the class. This also keeps functions closer to where they are applied. It's butt-ugly but it's about the best you can do in
* Java.
*
* <code>
final Hash... |
B12074 | B10452 | 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 MyAllgoritmicLib;
import java.util.ArrayList;
public class Dejkstra {
// ---------------------------------------------------------------------------
// Àëãîðèòì Äåéêñòðû.ïîèñêà êðàò÷àéøåãî ïóòè
int v;
int infinity=Integer.MAX_VALUE; // Áåñêîíå÷íîñòü
int p= 6; // Êîëè÷åñòâ... |
A10996 | A10277 | 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 qualifs;
public class Gcj2012 {
public static void main(String[] args) {
final B problem = new B("B-sample");
problem.run();
}
}
|
B11318 | B13000 | 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 mgg.problems;
import java.util.ArrayList;
import java.util.List;
import mgg.utils.CombinatoryUtils;
import mgg.utils.FileUtil;
import mgg.utils.StringUtils;
import mgg.utils.Triplet;
/**
* @author manolo
* @date 14/04/12
*/
public class ProblemB {
public final static String EXAMPLE_IN = "B-example.in";
... |
A22992 | A20437 | 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... | /*
ID: yourID
LANG: JAVA
TASK: Dancing_With_the_Googlers
*/
import java.io.*;
import java.math.*;
import java.util.*;
/*public class Dancing_With_the_Googlers {
}
*/
public class Dancing_With_the_Googlers implements Runnable {
// based on Petr's template
boolean localDebug = false;
private void solve() throws IOE... |
B10155 | B12910 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | package er.dream.codejam.helpers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
public class FileHandler {
BufferedReader read;
BufferedWriter write;
public File[] listFi... |
B10702 | B10986 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class ProbC {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException
{
... |
B11696 | B11784 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.util.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--... |
B20734 | B21063 | 0 | package fixjava;
public class StringUtils {
/** Repeat the given string the requested number of times. */
public static String repeat(String str, int numTimes) {
StringBuilder buf = new StringBuilder(Math.max(0, str.length() * numTimes));
for (int i = 0; i < numTimes; i++)
buf.append(str);
return buf.toStr... | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
import java.util.regex.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import static java.lang.Character.*;
pu... |
B10155 | B12662 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.io.*;
import java.util.*;
public class C_RecycledNumbers {
static String name = "C-small-attempt0";
static boolean been[];
static int f(int a, int b) {
//System.out.println(a + " " + b);
been[a] = true;
int c = a;
int num = 1, k = -1, ans = 1;
while (c != 0) {
c /= 10;
num *= 10;
k++... |
A11277 | A10971 | 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 dancing {
static String next() {
if (st == null || !st.hasMoreTokens())
nextLine();
return st.nextToken();
}
static int nextInt() {
return Integer.parseInt(next());
}
static void nextLine() {
try {
st = new StringTokenizer(f.readLine());
} catch... |
B11421 | B12714 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package ejera;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
String Lista1="abcdefghijklmnopqrstuvwxyz";
String Lista2="yhesocvxduiglbkrztnwjpfmaq";
char[] SourceList=Lista1.toCharArray();
Arrays.sort(SourceLis... |
A10699 | A13231 | 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 codejam2012.qr.dancing;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author fedez
*/
public class DancerSolver
{
private static Logger logger = Logger.getLogger(DancerSolver.class.getName());
public static int solve(in... |
A20730 | A20707 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | package test;
import java.io.*;
public class Test {
static public void magic(String tmp, int Result [],int index ){
int N=0,S=0,P=0,size;
char Carr []= new char[300];
size=tmp.length();
tmp.getChars(0, size, Carr, 0);
int i=0,j=0,spc=0;
String bom;
while (spc<3){
if(Carr[j]!=' '){
j++;
... |
A21557 | A21141 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | import java.io.File;
import java.util.*;
public class ProblemB {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("C:\\B-small-attempt0.in"));
//Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine().trim());
for (int i = 0; i < cases; i++)... |
B10361 | B10333 | 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 codejam.qual2012;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Set;
public class C {
public int count(int start, int end) {
int count = 0;
for (int... |
B10361 | B11278 | 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 Numbers;
import java.util.Scanner;
public class CountRecycle {
public static void main(String[] args)
{
Scanner r = new Scanner(System.in);
int n = r.nextInt();
for(int i = 1; i <= n; i++)
{
int x = r.nextInt();
int y = r.nextInt();
int f = getAmt(x, y);
System.out.println("Case #" + ... |
B21227 | B20238 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
public class RecycledNumbers {
public static void main(String args[]) throws IOException{
String inputFile = args[0];
String outputFile = args[1];
BufferedReader input = new BufferedReader(new File... |
A12846 | A10857 | 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 com.google.codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class ProblemC {
public ProblemC() ... |
A20261 | A20412 | 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 MyAllgoritmicLib;
public class Hungary {
int INF = 1000*1000*1000;
int n;
int[][] a;
int[] xy, yx;
boolean[] vx, vy;
int[] minrow, mincol;
public Hungary(int[][] a) {
// TODO Auto-generated constructor stub
this.a = a.clone();
}
private boolean dotry (int i) {
if (vx[i]) return false;
vx... |
A21010 | A20690 | 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 qualification;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;
public class DancingWithTheGoogler {
public static void main(String[] args) throws IOException {
String inputFile = "B-large.in";
Scanner input = new Scanner(new FileInput... |
B12570 | B10127 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlecodejam;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
/**
*
* @author Muhammad Zahran
*/
public class rec... |
A12460 | A10803 | 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 qualification.Dancing;
import java.io.*;
import qualification.Tongues.Tongues;
/**
*
* @author farshid
*/
public class Interface {
public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException, IOException {
String inPath, outPath;
IO.println("Ente... |
A22992 | A21236 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | package org.pokuri;
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;
/**
* @author Pokuri
* @since Apr 14, 2012
* org.pokuri.Googlers
*/
public class Googlers{
... |
B12669 | B10853 | 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.... | // Skeleton program used for reading and outputing the results
// Part3 program
import java.util.*;
public class part3
{
public static void main(String args[])
{
Scanner scanner = new Scanner(System.in);
int number = scanner.nextInt();
for (int i = 0; i < number; i++)
{
doMagic(scann... |
A20730 | A22224 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | package google.codejam2012.awanish;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;
public class GooglersDance {
private static int count = 0;
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
... |
B11361 | B11657 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | package googleCodeJam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class RecycledNumbers {
/**
* @param args
*/
pub... |
A11502 | A12823 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Dancing {
/**
* @param args
* @throws IOException
* @thr... |
B10361 | B11535 | 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 com.google.jam.eaque.stub;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import com.google.jam.eaque.qualif.c.StubImpl;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
if (args.length != 2) {
System.out.println("args lengt... |
B10155 | B10816 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.io.*;
import java.util.*;
public class C2012 {
public static void main(String[] args) throws IOException {
PrintWriter out;
BufferedReader f;
try {
f = new BufferedReader(new FileReader("C2012.in"));
out = new PrintWriter(new BufferedWriter(new FileWriter(
"C2012.out")));
} catch (Exce... |
B12085 | B11420 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
public class qualC {
public static void main(String[] args) {
String prblm="C"; boolean fl=!true;
String filein=prblm+"-"+((fl)?"large":"small")+".in.txt";
String fileout... |
A12460 | A13153 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.StringTokenizer;
public class B {
static String inner = "input.in";
static Scanner scan;
public static void main (String[]args) throws IOException
{
... |
A10568 | A13073 | 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 com.vp.common;
public class CommonUtility {
public static int[] convertStringArraytoIntArray(String[] sarray) {
if (sarray != null) {
int intarray[] = new int[sarray.length];
for (int i = 0; i < sarray.length; i++) {
intarray[i] = Integer.parseInt(sarray[i]);
}
return intarray;
}
retu... |
A11135 | A12919 | 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 google.solver;
import google.loader.ChallengeLoader;
import google.loader.ChallengeReader;
import java.io.FileInputStream;
import java.util.Properties;
public class Solver implements ChallengeConstants{
private ChallengeReader reader;
private String inputFileName;
private String result;
private final St... |
A11917 | A13169 | 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 probs;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Problem2 {
public static void main(String[] args) {
try {
String filePath = "in-small-2.txt";
... |
B12074 | B11954 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws IOException {
// Scanner in = new Scanner(new File("in/C/test.in"));
Scanner in = new Scanner(new File("in/C/small.in... |
A11277 | A10301 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B_DancingWiththeGooglers {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(new File("file1.in"));
PrintWriter writer = new PrintWriter(new Fi... |
B11421 | B10427 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
ArrayList<String> answer = read("/home/zehortigoza/Downloads/codejam/c/input.txt");
int tt = 0;
int amount = 1;
for (int i = 0; i < answe... |
B11327 | B11352 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.*;
import java.util.*;
public class dancing
{
public static void main(String[] args)throws Exception
{
BufferedReader br = new BufferedReader(new FileReader("dancing.in"));
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("dancing.out")));
int n = Integer.parseInt(br.readLin... |
B12762 | B12154 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;
public class C {
BufferedReader in;
StringTokenizer str;
PrintWriter out;
String SK;
String next() throws IOException {
while ((str == null) || (!str.hasMoreTokens())) {
SK = in.readLine();
if (SK == null)
return null;
st... |
B10245 | B12744 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.io.*;
import java.util.*;
public class q3
{
public static void main(String []args) throws IOException
{
PrintWriter pw=new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
BufferedReader br=new BufferedReader(new FileReader("input.txt"));
int arr[]=new int[2];
int limit=Inte... |
B10485 | B11217 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new File... |
A22771 | A22427 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Round0;
import custom.Output;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
*
* @author shyam
*/
publ... |
B12941 | B11167 | 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_jam_quali;
import java.util.HashSet;
import java.util.Scanner;
/**
*
* @author sansarun
*/
public class Recycled {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int caseNumber = sc.nextInt();
for(int currentCase=1; currentCase<=case... |
A20119 | A22366 | 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,... | package round0;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class Dance {
BufferedReader _in;
PrintWriter _out;
int _numTestCases;
Input[] _inputs;
public Dance(BufferedReader in) throws Exception {
this._in = in;
this._out = new... |
B12085 | B10786 | 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 jam_q_c_s;
import java.util.*;
public class Jam_Q_C_S {
public static void main(String[] args) {
int[] A = {116,144,168,240,165,169,170,142,202,162,15,171,10,164,135,169,120,10,125,177,142,135,146,180,160,142,156,183,173,158,103,11,164,1,144,190,110,146,158,6,100,122,187,823,123,319,100,248,115,18... |
B11327 | B11354 | 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 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... |
B12762 | B13103 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package QR2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
public class C
{
private static class Pair
{
final int n;
final int m;
public Pair(int n, int m)
{
this.n = n;
this.m = m;
}
@Override
public in... |
A11917 | A12684 | 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.*;
/*
*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. Each triplet of scores consists of three integer scores from 0 to 10 inclusive.
The judges have very similar standards, so it's surprising if a triplet ... |
B10485 | B10618 | 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 ProblemSolvers;
import CaseSolvers.WiresCase;
public class Wires extends ProblemSolver {
public Wires(String filePath) {
super(filePath);
}
@Override
public void process() {
cases = io.readInt();
for (int i = 1; i <= cases; i++) {
new WiresCase(i, io.readInt(), io).process().printSolution();
... |
B22190 | B20949 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.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... |
A12846 | A12613 | 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.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public abstract class FileReaderWriter {
FileInputStream in;
FileWriter out;
BufferedReader br... |
A12113 | A13060 | 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.*;
public class DanceGoogler {
public static void main(String[] args) {
DanceGoogler d = new DanceGoogler();
Scanner in = new Scanner(System.in);
int cases = in.nextInt();
for (int i = 0; i < cases; i++) {
System.out.printf("Case #%d: %d\n", i+1, d.solv... |
A11135 | A13104 | 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 static java.lang.System.out;
import java.io.BufferedReader;
import java.io.FileReader;
public class DancingWithTheGooglers {
private static final int MAXN = 128;
private static int inc0(int num, int p) {
if (num == 0) {
return (p == 0) ? 1 : 0;
}
int t = num / 3... |
A20490 | A22972 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | package org.weiwei.googlejam;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: ding
* Date: 12-4-14
* Time: ä¸å11:37
* To change this template use File | Settings | File Templates.
*/
public class Dancing {
List<Integer> scores;
... |
B10155 | B11085 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | package fixjava;
/** Adapted from http://www.johndcook.com/standard_deviation.html */
public class RunningStats {
int n = 0;
double oldM, newM, oldS, newS, min, max;
public void clear() {
n = 0;
}
public void add(double x) {
n++;
// See Knuth TAOCP vol 2, 3rd edition, page 232
if (n == 1) {
oldM = ... |
B10858 | B11417 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| /**
* 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... |
A22378 | A22788 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | package google.contest.B;
import google.loader.Challenge;
import google.problems.AbstractChallenge;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class BChallenge extends AbstractChallenge implements Challenge {
private int numberOfGooglers;
private int numberOfSurprise;
pri... |
A22992 | A20935 | 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 contests.GoogleCodejam.GCJ2012.qualification;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/**
* Created with IntelliJ IDEA.
* User: addepar
* Date: 4/14/12
* Time: 2:27 PM
* To change this template use File | Settings | File Templates.
... |
B11318 | B10061 | 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 qualification;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.BitSet;
import java.util.Scanner;
public class RecycledNumbers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Aut... |
B12762 | B12730 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package codejam;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args ) throws Exception
{
String input = FileUtils.readFileToString(new File("/Users/adilme... |
B10149 | B11509 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class RecycledNumbers {
private PrintWriter out;
private Scanner in;
private void init() {
}
private void solve() {
int A = in.nextInt();
int B = in.nextInt();
... |
A10699 | A12055 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.util.regex.Pattern;
/**
* @(#)DancingGoogler.java, 2012-4-14.
*
* Copyright 20... |
B11361 | B10455 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | package MyAllgoritmicLib;
public class SimpleNumbers {
public static boolean[] masInt;
public static void initSimpleInt(int n) { // âõîäíûå äàííûå
masInt = new boolean[n + 1];
for(int i=0; i<=n;i++){
masInt[i] = true;
}
masInt[0] = masInt[1] = false; // åñëè êòî-òî áóäåò èñïîëüçîâàòü ýòè
// çíà÷åíèÿ
... |
A22078 | A22919 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
int T = -1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)... |
B21752 | B21584 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | package com.gnooo;
import java.util.HashMap;
import java.util.Scanner;
public class Solution {
static final boolean DBG = false;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
long dStart = System.currentTimeMillis();
StringBuilder sb = new StringBuild... |
A12570 | A11365 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashMap;
public class Googlers {
public static void main(String[] args) throws Exception{
String inpu... |
A11502 | A12990 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws IOException {
String filename = "B-small-attempt3";
String inname = filename + ".in";
String outname = filename + ".out... |
B12085 | B12132 | 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... |
public class Pair {
int first;
int second;
public Pair(int first, int second) {
this.first = first;
this.second = second;
}
}
|
B11318 | B12782 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class ProblemC {
public static void main(String[] args){
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
try{
String line = in.readLine();
in... |
B20566 | B21076 | 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.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.TreeMap;
public class Recycler {
public static void main(String[] args) {
// TODO Auto-generated method stub
String input;
BufferedReader br;
HashSet<String> set;
try{
b... |
A22642 | A22943 | 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 com.jedruch.dancing;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import com.jedruch.utils.Files;
import com.jedruch.utils.Files.LineReader;
public class Dancing {
public static void main(String[] args) {
if (args.length == 0) {
System.out.println("missing file name");
... |
B12115 | B10233 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.*;
import java.util.*;
public class PracticeC
{
/* ±±©çÒW */
private static final String fname = "C-small-attempt3.in"; // üÍpÌt@C¼
// private static final int N = 10000;
// private static void search(int v)
// {
// if (v < 21)
// return;
// String in = Integer.toString(v);
// f... |
B11327 | B10507 | 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 br.com.google.codejam.one.small;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class RecNumber {
public static void main(String[] args) {
try {
read... |
B11318 | B11319 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.File;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Scanner;
public class C
{
public static void main(String[] args)
{
try
{
Scanner reader = new Scanner(new File("c:\\codejam\\Csmall.txt"));
PrintWriter writer = new PrintWriter(new File("c:\\codejam\\Csmallout"));
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.