F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A12846 | A12396 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... |
public class possible {
int Anom;
int High;
int count = 0;
possible(int anom, int high){
Anom = anom;
High = high;
}
public void canDo(int score){
int Score = score;
if(High > 0 && Score - High - (2 * (High- 1 )) >= 0){
++count;
}else if( Anom > 0 && High > 1 && Score - High - (2 * (High-... |
B22190 | B20319 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... |
import java.io.*;
import java.util.StringTokenizer;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Hamada
*/
public class Recylced {
public static void main(String [] args) {
String [] [] s= TextLines("C:\\C-small-attem... |
A11277 | A11256 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | package codeJam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Dance {
public static void main(String[] args) {
BufferedReader in = new Buffered... |
A12846 | A11090 | 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 DancingWithTheGooglers;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Collections;
import java.util.Scanner;
import java.util.ArrayList;
public class DancingWithTheGooglers {
public static void main(String[]... |
B12762 | B10225 | 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 me.stapel.kai.google.codejam2012.quali;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Sort... |
B21207 | B21058 | 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) ... | /**
* Recycled Numbers
*/
package com.google.jam.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import j... |
A21010 | A22673 | 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... | /*
ID: 14vikra1
LANG: JAVA
TASK: dancescore
*/
import java.io.*;
import java.util.*;
class dancescore {
public static void main (String [] args) throws IOException {
BufferedReader br = new BufferedReader(new FileReader("dancescore.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("dances... |
A21396 | A20391 | 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 codejam2012;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
*
* @author devashish
*/
public class ProblemB {
public static void main(String[] args) {... |
B20023 | B21278 | 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... |
public class Recycled {
static String test = "4\n1 9\n10 40\n100 500\n1111 2222";
static String val = "50\n1049802 1946314\n1019242 1999787\n332841 815293\n1443938 1907548\n5125 9748\n1037227 1960407\n1053187 1952673\n1043225 1910832\n100000 100000\n351349 556470\n68 80\n116204 961036\n504 844\n1086291 1964681\n1000... |
B21207 | B20852 | 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.util.Scanner;
public class Recyclers {
private static int countRecycled(int a, int b) {
int recycled = 0;
for (int i = a; i <= b; i++) {
String s = new Integer(i).toString();
for (int j = 0; j < s.length() - 1; j++) {
String o = s.substring(s.length() - j - 1, s.length()).concat(
s.su... |
A12113 | A11649 | 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"... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.common;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author jim
*/
public class FileLoader {
public F... |
B10231 | B10566 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | package code;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
public class C {
final static String CASE_NO = "Case #";
final static String SUFFIX = ": ";
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
int... |
B21207 | B20040 | 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 google.code.jam.recycled.numbers;
/**
*
* @author Lucas
*/
public class GoogleCodeJamRecycledNumbers {
/**
* @param args the command line arguments
*/
public static void main(String[] args)... |
A20382 | A20391 | 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 codejam2012;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
*
* @author devashish
*/
public class ProblemB {
public static void main(String[] args) {... |
A10699 | A13194 | 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.File;
import java.io.FileReader;
import java.io.IOException;
public class ProblemB {
public static void main(String[] args) throws NumberFormatException, IOException{
BufferedReader reader=new BufferedReader(new FileReader(new File(args[0])));
int numTestCases=Inte... |
B10702 | B10541 | 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 ProblemC {
public static void main(String[] args) throws Throwable {
Scanner in = new Scanner(new File("c.in"));
PrintWriter out = new PrintWriter("c.out");
int testCount = Integer.parseInt(in.nextLine().trim());
for (int i = 0; i < testCount; i++) {
out.p... |
B10155 | B11209 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public static void main(String[] args) {
try {
Scanner in = new Scanner(new File("C.in"));
BufferedWriter writer = new BufferedW... |
B12570 | B10523 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | package gcj2012qr;
import java.io.*;
import java.util.*;
import java.util.concurrent.*;
import com.google.*;
/**
* @author Roman Kosenko <madkite@gmail.com>
*/
public class RecycledNumbers extends SingleThreadSolution<Object> {
public static void main(String[] args) throws Exception {
solve(new SolutionFactory<... |
A20490 | A20204 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.util.*;
import java.io.*;
public class DancingWithGooglers {
public static void main(String[] args) throws Exception
{
Scanner input = new Scanner(new File("C:\\temp\\B-large.... |
B10245 | B11194 | 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... | /*
* 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)
{
... |
A22992 | A22796 | 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.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Dance {
private static final int[] maxBestResult = { 0, 1, 2 };
private static final int[] maxBestResultSurprise ... |
A20490 | A21986 | 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 dancers;
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;
public class Dancers {
public static int SURPRISE = 0;
public static int ATENDEE = ... |
B20006 | B21015 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public static int factorial(int x) {
int fact = 1;
for (int i = 2; i <= x; i++) {
fact *= i;
}
return fact;
}
/**
* @param args
*/
public static void main(S... |
A12211 | A12039 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | package jp.funnything.competition.util;
import java.util.List;
import com.google.common.collect.Lists;
public class Lists2 {
public static < T > List< T > newArrayListAsArray( final int length ) {
final List< T > list = Lists.newArrayListWithCapacity( length );
for ( int index = 0 ; index < leng... |
B13196 | B10168 | 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.IOException;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class RecycledNumbers {
public static void main(Stri... |
A11201 | A11191 | 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.util.*;
import java.io.*;
public class B {
public static void main(String[]args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(in.readLine());
for(int x=1;x<T+1;x++) {
StringTokenizer st = new StringTokenizer(in.readLine());... |
A10793 | A12280 | 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) {
... | package com.mademoisellegeek.googlecodejam;
import com.mademoisellegeek.googlecodejam.y2012.qualround.DancingWithTheGooglers;
import com.mademoisellegeek.googlecodejam.y2012.qualround.SpeakingInTongues;
public class GoogleCodeJam {
public static void main(String[] args) {
new Thread(new DancingWithTheGoo... |
B11318 | B12135 | 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.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class RecycledNumber {
private int numCase;
public void calc() throws FileNotFoundException, IOException {
Fil... |
B13196 | B11310 | 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 ... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib;
import java.io.File;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class Utils {
private static final String FILE_IN_EXTENSION = ".... |
B20856 | B22091 | 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;
//... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google_jamp_c;
import java.io.*;
import java.util.*;
/**
*
* @author sabri
*/
public class Google_jamp_c {
/**
* @param args the command line arguments
*/
public static int recycled (int A, in... |
B20291 | B20569 | 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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main_Recycled {
static int a,b;
public static void main(String[] args)throws Exception {
File _=new File("recycled.in");
BufferedReader br=_.exists()? n... |
B11361 | B10606 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | import java.io.*;
import java.util.*;
public class Prob3
{
public static void main (String[] args) throws IOException
{
BufferedReader in = new BufferedReader (new FileReader ("C-small-attempt0.in"));
PrintWriter out = new PrintWriter (new FileWriter ("OUT3.txt"));
int T = Integer.parseInt (in.readLine ().tr... |
A11201 | A11535 | 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.... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj_b;
/**
*
* @author kay
*/
public class Gcj_B {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Generate app = new Generate();
ap... |
B21790 | B21601 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.*;
/**
*
* @author virginia
*
*/
public class RecycledNumbers {
public static Long countn(Long v)
{
Long count=0L;
whil... |
B12085 | B10959 | 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.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;
public class RecycledNumbers {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int cases=Integer.parseInt(in.nextLine())+1;
Boolean[] arr=new Boolean[2000001];
Arrays.fill(arr,false);
for(int ... |
B11318 | B11552 | 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.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
/**
*
*/
/**
* @author alfonzzz
*
*/
public class RecycledNumbersSolver {
/**
* @param args
*/
public static void main(String[] args) {
Scanner in = new Scann... |
A22992 | A20386 | 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.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
public static void main(String ... args) throws Exception{
Scanner in = new Scanner(new File("B-large.in"));
PrintStream out = new PrintStream(new File("B-large.out"));
int[] max1 =... |
B21790 | B20836 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
public class C {
public static void main(String[] args) {
try {
Scanner in = new Scanner(new File("C.in"));
BufferedWriter writer = new BufferedW... |
B20566 | B21468 | 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 + "";
... | package com.renoux.gael.codejam.fwk;
import java.io.File;
import com.renoux.gael.codejam.utils.FluxUtils;
import com.renoux.gael.codejam.utils.Input;
import com.renoux.gael.codejam.utils.Output;
import com.renoux.gael.codejam.utils.Timer;
public abstract class Solver {
public void run() {
Timer.start();
if (!d... |
A10699 | A11135 | 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) ... | /**
* 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... |
A11201 | A11848 | 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.util.Scanner;
public abstract class ProgrammingProblem
{
protected static final Scanner sc = new Scanner(System.in);
protected static boolean DEBUG = false;
protected abstract void print();
protected abstract void readInput();
protected abstract String execute();
protected static void main(@Sup... |
A22771 | A22159 | 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... | /**
* Created by IntelliJ IDEA.
* User: SONY
* Date: 19.02.12
* Time: 13:12
* To change this template use File | Settings | File Templates.
*/
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Main extends Thread {
public Main(String inputFileName, String outputFileName) {
... |
B11421 | B10332 | 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.PrintStream;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static int f(int x, int min, int max) {
String s = Integer.toString(x);
String s2 = null;
Set<Integer> set = new HashSet<Integer>();
for (int i = 1; i < s.length(); i++) {
s2 = s.... |
A22992 | A20000 | 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.io.*;
class goodance
{
static int wc;
static int best;
public static void main(String args[])
throws IOException
{
FileReader fin=new FileReader("B-large.in");
BufferedReader bin=new BufferedReader(fin);
FileWriter fout=new FileWriter("Output.txt");
BufferedWriter bout=new BufferedWriter(fout);
PrintWr... |
B20424 | B21856 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class RecycledNumbers {
public static void main(String[] args) throws IOException
{
//BufferedR... |
A11135 | A10309 | 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 org.cb.projectb.dancingwiththegooglers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Contest {
public static void main(String[] args) throws FileNotFoundException {
Fi... |
B12115 | B13036 | 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 qualification.q2;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 18:47
* To change this template use File | Settings | File Templates.
*/
public class Q2Solver {
public int solve(int n,int s,int p, int[] sums){
int res = 0;
int surprisesLeft = s;
... |
B10231 | B10986 | 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.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
{
... |
A11277 | A10843 | 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.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class ProblemB {
private String line = "";
private String fileContents = "";
private String delim = "\r\n";
private S... |
A10699 | A10614 | 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.File;
import java.io.FileReader;
import java.io.FileWriter;
public class GCJ2 {
public GCJ2() {
}
public static void main(String[] args) {
GCJ2 gcj = new GCJ2();
try {
BufferedReader br = new BufferedReader(new FileReader(ne... |
B22190 | B21007 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//c prob
import java.io.*;
import java.util.StringTokenizer;
/**
*
* @author abood
*/
public class test {
static int count =0,s=0;
public static void main(String[] args) throws IOException {
BufferedR... |
A13029 | A10255 | 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.util.Scanner;
/**
* Google Code Jam 2012
*
* @author 7henick
*/
public class ProblemB {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
sc.nextLine();
for (int i = 0; i < T; i++) {
in... |
B21207 | B21945 | 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.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner r = new Scanner(System.in);
int T = r.nextInt();
int caseNumber = 1;
while(T-- > 0){
int A = r.nextInt();
int B = r.nextInt();
int ret = 0;
for(int x = A; x <= B; x++){
... |
A20261 | A20628 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.io.*;
import java.util.*;
class Problems
{
public static void main (String [] args) throws Exception
{
BufferedReader f = new BufferedReader(new FileReader("input.java"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.java")));
StringTokenizer ... |
B12941 | B13194 | 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.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
public class Numbers{
public static ArrayList<Triplet> scores;
public static void main(String arg[]){
Syst... |
B11327 | B11818 | 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]);
}
}
}
| /**
* Google CodeJam 2012
* General framework that takes care of the similar and repetitive tasks for all the problems.
* E.g. managing case input and output.
*
* By Üllar Soon <positivew@gmail.com>
*/
package eu.positivew.codejam.framework;
/**
* CodeJam input case (string).
*
* @author Üllar Soon <positi... |
B20734 | B21174 | 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.File;
import java.io.FileNotFoundException;
import java.util.Formatter;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers {
private static String solve(int A, int B) {
int count = 0;
final HashSet<Integer> seen = new HashSet<Integer>(10);
for (int n = A; n < B; n++... |
A22992 | A20804 | 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 be.mokarea.gcj.common;
public abstract class TestCase {
private final int caseNumber;
protected TestCase(int caseNumber) {
this.caseNumber = caseNumber;
}
public int getCaseNumber() {
return caseNumber;
}
}
|
B12074 | B10928 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.y12.round0;
import java.util.HashMap;
import utils.Jam;
import utils.JamCase;
/**
*
* @author fabien
*/
public class SpeakingInTongues extends Jam {
private static final String g1 = "ejp mysljylc ... |
A12273 | A12323 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | package com.wonyoung.codejam.qualificationround;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
public class DancingWithTheGooglers {
private Integer testCasesT;
private DancingWithTheGooglersDa... |
A10996 | A12737 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class BMain {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws IOExc... |
B12082 | B10233 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.io.*;
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... |
B20291 | B20069 | 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[]... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Recycle;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;
/**
*
* @author hemal
*/... |
B12074 | B12408 | 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 de.pat.dev.y2012.qualification.c;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
/**
* @author pat.dev@alice.de
* @since 17.04.12
*/
public class Main {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new FileReader(a... |
A22992 | A20044 | 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.Scanner;
import java.util.ArrayList;
public class dancing {
public static void main(String [] args){
Scanner Keyboard = new Scanner(System.in);
int testCases;
ArrayList<String> input = new ArrayList<String>();
ArrayList<Integer> totalPoints = new ArrayList<Integer>();
int whitespaceNumber =... |
A12273 | A12092 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Dancing {
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(new File("dancing.in"));
System.setOut(new Pr... |
B10858 | B12250 | 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.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Read {
int noOfTestCases;
int []nums;
public void Read(String name) {
File file = new File(name);
try {
Scanner scanner ... |
B12115 | B13049 | 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 googleCodeJam;
import java.io.*;
import java.util.*;
public class firstExercise {
/**
* @param args
*/
public static void main(String[] args) {
try{
FileInputStream fstream = new FileInputStream("C-small-attempt3.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = n... |
A22191 | A22429 | 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... | package com.ignaciobona.codejam.practice.problema;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Solver {
public static String PROBLEM_NUMBE... |
B22190 | B21843 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static void main(String[] args) {
try {
// so eclipse can read file from system in
System.setIn(new FileInputStream(new File("lar... |
A22771 | A20340 | 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 codejam2012;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
impo... |
B10899 | B10822 | 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(... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.S... |
B20856 | B20884 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | package com.google.codejam;
public class RecycledNumbers {
public int solve(int[] n){
int res = 0;
int len = getLen(n[0]);
int[] sh = new int[len-1];
for (int i = n[0]; i <= n[1]; i++) {
for (int j = 1; j < len; j++) {
int ni = shift(i, j, len);
sh[j-1] = ni;
if(ni > i && ni <= n[1]) {
bo... |
B12082 | B11119 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | package gcj2012;
import java.io.FileInputStream;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class C {
public static void main(String[] args) throws Exception {
new C().run();
}
void run() throws Exception {
Scanner in = new Scanner(System.in);... |
A21010 | A20366 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.io.*;
import java.util.*;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
try {
FileReader fileReader = new FileReader("B-large.in.txt");
FileWriter fileWriter = new FileWriter("out.txt");
BufferedReader reader = new BufferedReader(file... |
A22642 | A20970 | 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... | /*
ID: t.lam1
LANG: JAVA
TASK: codejam
*/
import java.io.*;
import java.util.*;
import java.text.*;
import static java.lang.System.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import static java.lang.Character.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
import st... |
A20119 | A20743 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class Qual2 {
private static BufferedReader r;
private static PrintStream outFile;
private static PrintStream o... |
B12669 | B11667 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.*;
public class Recycled{
public static void main(String args[])
{
try{
File myFile = new File("C-small-attempt0.in");
FileReader fileReader = new FileReader(myFile);
BufferedReader reader = new BufferedReader(fileReader);
FileWriter fileWriter = new FileWriter("C-small-attempt0.out");
BufferedWriter w... |
A21010 | A21501 | 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 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 ... |
A11201 | A11985 | 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.File;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class CodejamB {
public static final String TEST = "test.in", SMALL = "B-small-attempt0.in", LARGE = "B-large... |
B21207 | B20921 | 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) ... | package recycledNumbers;
import java.util.ArrayList;
public class test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int a = 1111;
int b = 2222;
int result = 0;
for(int i=a;i<b+1;i++){
ArrayList<Integer> number = new ArrayList<Integer>();
Ar... |
A12113 | A11365 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.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... |
B21227 | B20099 | 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.*;
import java.util.*;
import java.math.*;
public class Main
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer tokenizer=null;
public static void main(String[] args) throws IOException
{
new Main().execute();
}
void debug(Object...os)
{
System.out.p... |
B10155 | B10262 | 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 core;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public abstract class Template {
/************* TO BE IMPLEMENTED ******************************************/
public abstract void feedData(ExtendedBufferedReader iR)... |
B10149 | B12117 | 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.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Locale;
import java.util.Scanner;
import java.util.Set;
public class QuestionC {
//final static String FNAME = "C:\\CodeJam\\RecycledNumbers";
final static String FNAME = "C:\\CodeJam\\C-small-at... |
B11696 | B10310 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.io.BufferedReader;
import java.io.FileReader;
public class C {
private static final String head = "Case #";
public static void main(String[] args) {
try{
FileReader f = new FileReader(args[0]);
BufferedReader b = new BufferedReader(f);
String s;
... |
B11318 | B12976 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.* ;
import java.text.DecimalFormat;
import java.util.*;
import static java.lang.Math.* ;
import static java.util.Arrays.* ;
public class C {
public static void main(String[] args) throws FileNotFoundException {
in = new Scanner(new InputStreamReader(new FileInputStream("c_in.txt")));
out = new... |
B12115 | B10287 | 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.Scanner;
public class jam3Rec {
public static void main(String args[]) throws java.lang.Exception
{
int a,b,n,m, cnt=0,len=0;
//a=1111;b=2222;
int t,cas=1;
//System.out.println();
//Scanner scan=new Scanner(System.in);
//Scanner scan=new Scanner(new FileReader("i... |
B20856 | B22095 | 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 qualification.q3;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 20:31
* To change this template use File | Settings | File Templates.
*/
public class Q3Solver {
private Set<S... |
A20119 | A20443 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithTheGooglers {
static int surprise;
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new FileRe... |
B12570 | B10090 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | package codeJam;
import java.util.Scanner;
public class C {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int testCases = s.nextInt();
for(int i=1; i<=testCases; i++)
{
int lowerBound = s.nextInt();
int upperBound = s.nextInt();
int midway = (upperBound+lowerBound)/2;... |
B12115 | B13066 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
public class Recycled {
private static boolean contains(Li... |
B10485 | B12592 | 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 googlers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Mainclass {
String line[];
int bv=1;
Mainclass(){
line=new String[50];
F... |
B20006 | B21743 | 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.util.Scanner;
import java.util.HashSet;
public class Recycle
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int nums = in.nextInt();
for (int p = 0; p < nums; p++)
{
int a = in.nextInt();
int b = in.nextInt();
in... |
B20006 | B22246 | 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.util.LinkedList;
import java.util.Scanner;
public class Recycle {
private static int[] total(int r) {
int i=1, t=10;
while(r/t > 0) {
i++;
t*=10;
}
return new int[] {i,t/10};
}
private static int pow(int c) {
int t=1;
while(c-->0)
t*=10;
return t;
}
private static int recy... |
B20424 | B21085 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... |
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class C {
int INF = 1 << 28;
void run() {
Scanner sc;
FileOutputStre... |
B21227 | B21668 | 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.*;
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-large";
br = new BufferedReader(new FileReader("... |
A22191 | A22872 | 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... | package googlejam;
import java.util.Scanner;
public class ProblemB {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numberOfCases = sc.nextInt();
for (int i = 0; i <= numberOfCases; i++) {
int googlers = sc.nextInt();
int suprisingTriplets = sc.nextInt();
int p = sc.... |
A22771 | A23011 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
public class Dancers{
public static ArrayList<Triplet> scores;
public static void main(String arg[]){
Syst... |
A12211 | A12298 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.lang.Math;
import java.util.Arrays;
public class DancingWithTheGooglers {
public static int testSi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.