F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B10899 | B10879 | 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(... | package de.at.codejam.util;
public class TaskStatus implements CodeJamConstants {
public static final int STATUS_WAITING = 0;
public static final int STATUS_RUNNING = 1;
public static final int STATUS_DONE = 2;
public static final int STATUS_ERROR = 3;
private int currentTaskStatus = STATUS_WAITING;
private i... |
B12762 | B12222 | 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.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class RecycledNumbers {
public static void main(String[] args) {
List<String> lines = getline("C:\\Users\\Ami\\Downloads\\C-smal... |
B21790 | B20169 | 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.BufferedWriter;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
public class RecycledNumbers {
public static void main(String[] args) {
try {
run();
} catch (Exception e) {
e.printStackTrace();
}
}
private static voi... |
A10996 | A12947 | 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);
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Madu
*/
import java.io.*;
public class Ex2 {
public static void main(String[] args) {
try{
FileInputStream fstream = new FileInputStream("C:/Users/Madu/Documents/NetBe... |
A10793 | A11951 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.util.Arrays;
import java.util.Scanner;
public class B {
int N;
int S;
int p;
int[] A = new int[100];
int[][] memo = new int[100][100];
boolean[][] normal = new boolean[11][31];
boolean[][] surprise = new boolean[11][31];
B() {
for (int a=0; a<=10; ++a) {
for (int b=a; b<=10 && b<=a+2; ... |
A12460 | A10609 | 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.InputStreamReader;
/**
*
* @author andy
*/
public class DancingWithGooglers {
public static void main(String[] args) throws Exception {
//char sd = '1';
//int[] sdf = new int[ 10 ];
//System.out.println( Math.ceil( 17 / 3.0... |
B21968 | B20035 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
/**
* template class for code jam Contest
*
* @author Tudor
*
*/
public ... |
B21227 | B21594 | 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.awt.geom.Point2D;
import java.text.*;
import java.math.*;
import java.util.*;
public class Main implements Runnable {
final String problem = "C";
// final String filename = problem + "-sample";
// final String filename= problem+"-small-attempt0";
// final String filename= problem+"-s... |
A20934 | A21101 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... |
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;
public class DancingGooglers {
public static void main(String[] args) throws FileNotFoundException {
int T;
//Scanner sc = new Scanner(System.in);
Scanner sc = new Scanner(new File... |
A11201 | A10549 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | package gcj2012;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
/**
* Google Code Jam 2012 B - Dancing With the Googlers
*
* @author Ruli Manurung (maruli@cs.ui.ac.id)
*/
public class QB
{
public stati... |
A11502 | A13174 | 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... | public class Googler {
private int totalScore;
private int[] scores;
private boolean isWeird; // scores of the judge
public Googler(int totalScore) {
scores = new int[3];
this.totalScore = totalScore;
isWeird = false;
setMins();
}
private void setMins() {
int copyTotal = this.totalScore;
int i = 0; ... |
A12846 | A12335 | 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... | /**
* Program : Test for google code jam
* Author : jenogg
* Since : 2012.04.14
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class Subject0102 {
/** Mapping map */
private Map<String, String> mapper;
... |
B20006 | B21736 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class QC {
static final String TASK_ID = "qc";
static BufferedReader reader;
static PrintWriter writer;
public static void main(String[] args) {
... |
A13029 | A12906 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | package org.sooo;
import java.io.File;
import java.io.OutputStreamWriter;
import java.util.List;
import com.google.common.base.Charsets;
import com.google.common.base.Function;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.google.common.io.CharStreams;
import com.google.co... |
B12570 | B12317 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator... |
A12460 | A12820 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Googlers {
static int judgeGooglersNum(String input) {
int result = 0;
String[] s = input.split(" ");
int N = Integer.parseInt(s[0]);
int S = Integer.p... |
A22360 | A22139 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | package codeJam;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
/**
* Created by IntelliJ IDEA.
* User: vsaurabh
* Date: 4/14/12
* Time: 6:10 AM
* To change this template use File | Settings | File Templates.
*/
public class DancingWithTheGooglers {
public static void main(String ar... |
B12085 | B11144 | 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.FileReader;
public class RecycledNumbers {
public static void main(String[] args) {
RecycledNumbers temp = new RecycledNumbers();
temp.findPairs();
}
void findPairs(){
String myFileName = "D:\\testcase.txt";
try {
BufferedReader myReader = new BufferedRea... |
B11421 | B10571 | 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 CodeJam;
import java.io.*;
import java.util.Scanner;
public class C_2012 {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("test.out")));
int c = in.nextInt();
for(int cases=0;c... |
B12570 | B11212 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
static String shift(String s) {
return s.charAt(s.length() - 1) + s.substring(0, s.length() - 1);
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.ne... |
B20006 | B22064 | 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 {
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Madu
*/
import java.io.*;
public class Ex3 {
int m_000000(){
return 0;
}
public static void main(String[] args) {
try {
Fi... |
A10996 | A11251 | 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);
... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
public class SolutionWriter extends PrintWriter {
private static final String FORMAT = "Case #%1$s: %2$s%n";
private String... |
A12211 | A13186 | 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 qualification.b;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Core {
public static void main(String[] args) {
int t, n, s, p;
try {
Scanner scan = new Scanner(new File(args[0]));
... |
B20566 | B21626 | 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 gcj.cases.competition.qualification_round_2012;
import gcj.main.Case;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.util.HashSet;
import java.util.Set;
public class CaseC implements Case{
private int caseNum;
private long min;
private long max;
private long solution;
@Ov... |
B21049 | B21277 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.BufferedReader;
import java.io.IOException;
public class CaseReader {
public static String[][] getCases(String s, int linesPerCase) {
int cases = Integer.parseInt(s.split("\n")[0]);
String[][] ret = new String[cases][linesPerCase];
String[] v = s.split("\n");
for (int i = 0;i < cases;i++)
{
... |
A12544 | A10165 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
/**
* @author Paul LaMotte
*
*/
public class GooglerDance {
public static void main(String[] args) {
Scanner in;
try {
System.setOut(new PrintStream(new File("qua... |
B20023 | B20700 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | package org.moriraaca.codejam;
public enum DebugOutputLevel {
SOLUTION, IMPORTANT, ALL;
}
|
B10149 | B12305 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package com.mademoisellegeek.googlecodejam;
import com.mademoisellegeek.googlecodejam.y2012.qualround.DancingWithTheGooglers;
import com.mademoisellegeek.googlecodejam.y2012.qualround.RecycledNumbers;
import com.mademoisellegeek.googlecodejam.y2012.qualround.SpeakingInTongues;
public class GoogleCodeJam {
public... |
A21396 | A21449 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.io.*;
/**
* ***************************************************************************
* Created by IntelliJ IDEA.
* User: Narender Singh Pal
* Date: 4/14/12
* Time: 8:32 AM
* <p/>
* ***************************************************************************
* <p/>
* Copyright (c) 2012 All Rights... |
A11502 | A12237 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingScores {
private static final String fname = "B-small-attempt1.in";
public static void main(String[] args) throws Exception {
new DancingScores().run(... |
B20856 | B21209 | 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.util.*;
public class Main {
public static void main(String args[]) {
(new Main()).solve();
}
void solve() {
Scanner cin = new Scanner(System.in);
int T = cin.nextInt();
for(int C=1; C<=T; ++C) {
int A = cin.nextInt();
int B = cin.nextInt();
int n = ("" + A).len... |
A21557 | A21109 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... |
import java.util.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... |
B10858 | B11539 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package template;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.util.ArrayList;
public class TestCaseIO {
public static ArrayList<TestCase> loadFromFile(String infile) {
//inc checks on #lines, length of splits, etc.
BufferedReader br = Utils.newBufferedReader(infile);... |
A20261 | A21819 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancinggooglers;
import java.io.*;
/**
*
* @author Ruben
*/
public class DancingGooglers {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
... |
B10149 | B11691 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.util.Scanner;
public class ProblemC {
public static int rotate(int x) {
int y = x % 10;
x /= 10;
int cd = (x + "").length();
if (x == 0) {
cd = 0;
}
y *= Math.pow(10, cd);
y += x;
return y;
}
public static String rotate(String x) {
String r = x.substring(0, 1);
if (x.length() ... |
B20856 | B22226 | 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 probs;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class Problem3 {
public static void main(String[] args) {
try {
String filePath = "in-large-3.txt";
... |
A22992 | A22983 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
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.ArrayList;
/**
*
*... |
B11361 | B11759 | 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 be.tim.recycled;
/**
*
* @author Tim Boeckstaens
* @version 1.0
*/
public class Recycler {
public String process(String line) {
String[] split = line.split(" ");
if(split.length != 2){
throw new IllegalArgumentException("Foute regel");
}
int a = Integer.par... |
A20382 | A21449 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.io.*;
/**
* ***************************************************************************
* Created by IntelliJ IDEA.
* User: Narender Singh Pal
* Date: 4/14/12
* Time: 8:32 AM
* <p/>
* ***************************************************************************
* <p/>
* Copyright (c) 2012 All Rights... |
B21752 | B20075 | 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 ... | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.io.File;
import java.io.PrintWriter;
public class C {
public static void main(String args[]){
try{
File ifile = new File(args[0]);
File ofile = new File(args[1]);
//Scanner in = new Scanner(System.in);
//PrintWriter... |
B20734 | B20474 | 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.PrintWriter;
import java.util.Scanner;
public class ProblemC {
public static void main(String[] args) {
final Scanner in = new Scanner(System.in);
final PrintWriter out = new PrintWriter(System.out);
final int t = in.nextInt();
for (int tt = 0; tt < t; tt++) {
final int a = in.nextInt... |
A11201 | A10374 | 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.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
public class BQ {
public static void main(String[] args) {
BufferedReader reader = null;
... |
A11135 | A11387 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication4;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;
im... |
B10149 | B11585 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package br.com.codejam.qualification;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
St... |
A12570 | A13023 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | package codeJam;
import java.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();
... |
B12085 | B13261 | 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.IOException;
class Round1C {
private int Case;
public Round1C(int Case, int A, int B) {
this.Case = Case;
int result = this.Computer(A, B);
this.outPut(result);
}
/*
* N±qA¨ìB
* §â¨CӼƦrN§@±ÛÂà«áªºµ²ªG¡A
* §PÂ_¡A¬O§_¤j©óN¥B¤p©óµ¥©óB
* ¬Oresult++
*
* */
private int Computer(in... |
A11135 | A10033 | 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 com.code;
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.io.Writer;
public class ReadWriteInputFile
{
public BufferedReader readInputFi... |
A12273 | A11215 | 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.google.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
public class Utils {
static final Strin... |
B20023 | B20896 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | import java.io.*;
import java.util.StringTokenizer;
public class CodeJam1 {
static BufferedReader br;
static PrintWriter pw;
static int a,b,count;
public static void main(String[] args)throws Exception{
br=new BufferedReader (new FileReader ("in.txt"));
pw=new PrintWriter (new FileWriter("out.txt"));
... |
A12211 | A11742 | 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 com.google.code;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public abstract class GCJ {
private BufferedReader input;
private BufferedWriter output;
String inputLine;
String[] brokenU... |
A20490 | A20592 | 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 a2012;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.nio.file.FileSystem;
import java.nio.file.FileSyste... |
B10245 | B12095 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class main {
/**
* @param args
*/
public static void main(String[] args) {
try {
System.setOut(new PrintStream(new File("C-small-attempt0.... |
B10858 | B12271 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package QualificationRound2012.C.RecycledNumbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class RecycledNumbers {
static final String _DIR = "src/QualificationRound2012/C/RecycledNumber... |
A12273 | A10969 | 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.*;
import java.util.*;
public class DancingGooglers {
static class InputReader {
BufferedReader bin;
StringTokenizer tokenizer;
public InputReader(InputStream in) {
bin = new BufferedReader(new InputStreamReader(in));
tokenizer = null;
}
public InputReader(String fname) {
try... |
B20006 | B21996 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Recycled {
static int no_Test_Cases =0; //number of test cases
static String input_Array[]; //to read inpu... |
A12273 | A10250 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj2012;
/**
*
* @author allegea
*/
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintW... |
B21207 | B20044 | 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.*;
import java.util.*;
public class CodeJamC
{
private static int noOfDigits(int number)
{
int noOfDigits = 0;
while (number > 0)
{
number /= 10;
noOfDigits++;
}
return noOfDigits;
}
private static int pow(int exponent)
{
int power = 1;
for (int mulitply = 1; mulitply <= expon... |
B10155 | B12545 | 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 contest;
import java.io.BufferedReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Input {
BufferedReader in;
public Input(BufferedReader in) {
this.in = in;
}
//
public String readStr() {
return readStr(in);
}
public int readInt() {
return readIn... |
A22191 | A20770 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
public class Fattom2012B {
private final S... |
B20856 | B20603 | 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 twentytwelve.qualification.c;
import java.util.Scanner;
public final class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();
for (int no = 1; no <= cases; no++) {
System.out.print("Case #" +... |
A12113 | A12034 | 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"... | 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... |
A12460 | A11606 | 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.PrintWriter;
import java.io.FileWriter;
import java.io.BufferedReader;
import java.io.FileReader;
/**
* Base class to provide a framework for Google Code Jam type of problems and avoid redundant tasks
* @author nitin
*/
public class BaseSolution {
/**
* Used to write log for debugging
... |
B21049 | B21544 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.*;
import java.util.*;
public class QualiC_Naive
{
static void sop(String str)
{
System.out.println(str);
}
static void sop1(String str)
{
System.out.print(str);
}
public static void main(String args[])
{
long tstart = System.currentTimeMillis();
if(args.length < 1)... |
B10149 | B12158 | 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 googlecodejam_recyclingnumbers;
import java.io.*;
/**
*
* @author Ulyss
*/
public class GoogleCodeJam_RecyclingNumbers {
/**
* @param args the command line arguments
*/
public static void ... |
A12113 | A11575 | 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.File;
import java.util.StringTokenizer;
import java.io.FileReader;
public class B {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
BufferedReader reader = null;
String fileName = "B-small-attempt0.in";
String outputFileName=file... |
A20382 | A22335 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.io.*;
import java.util.*;
/**
* @author OleGG
*/
public class QualTaskB {
public static void main(String[] args) throws Throwable {
StreamTokenizer st = new StreamTokenizer(new BufferedReader(new FileReader("B-large.in.txt")));
PrintWriter pw = new PrintWriter(new FileWriter("B-large.... |
A22078 | A21030 | 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.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
public class dancing{
public static void main(String args[]){
try{
PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
Scanner sc = new Scanner(new File(args[0]));
int n, s, p, y;
int t =... |
B21968 | B20749 | 0 | import java.util.*;
import java.io.*;
public class recycled_numbers {
public static void main(String[]a) throws Exception{
Scanner f = new Scanner(new File(a[0]));
int result=0;
int A,B;
String n,m;
HashSet<String> s=new HashSet<String>();
int T=f.nextInt(); //T total case count
for (int t=1; t<=T... | package fixjava;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Get the index of the given key if this key has been assigned an index before, and if not, allocate a new index for it by
* incrementing a counter that starts at zero, and return the new index.
*/
public class UniqueIndexAllocator<T> {
p... |
B21207 | B20924 | 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.*;
import java.io.*;
import java.lang.*;
import static java.lang.System.*;
public class RecycledNumbers{
static HashSet<Integer> set;
static int ctr, low, high;
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(in));
int ii = I... |
B21207 | B21613 | 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.*;
public class Recycled {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int lines = sc.nextInt();
for (int i=0; i<lines; i++) {
int min = sc.nextInt();
int max = sc.nextInt();
int count = 0;
for (int n=min; n<=max; n++) {
int d = countDigi... |
B10361 | B12688 | 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 gcj2012;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class RecycledNumbers {
private static final class IntPair {
Integer a, b;
IntPair(Integer a,Integer b) {
t... |
B10361 | B10648 | 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.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Charsets;
import com.google.common.base.Predicate;
import com.g... |
B12115 | B12710 | 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.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class RecycledNumbers {
BufferedReader br;
StringTokenizer st = new StringTokenizer("");
private void solve() throws IOException {
// final String IO_FILE = null;
final String IO_FILE = "./C/C-smal... |
B13196 | B12194 | 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.*;
import java.util.*;
public class Solution {
private StringTokenizer st;
private BufferedReader in;
private PrintWriter out;
final String file = "C-small-attempt0";
public void solve() throws IOException {
int tests = nextInt();
int[] pows10 = {1, 10, 100, 1000, 10000, 100000, 1000000, 1... |
B11421 | B11037 | 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.*;
import java.util.*;
class Recycling {
static Scanner sc;
static ArrayList<Integer> found;
static void run()
{
int A = sc.nextInt();
int B = sc.nextInt();
found = new ArrayList<Integer>();
int total = 0;
for (int n = A; n < B; n++) {... |
B21270 | B20312 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... | package codejam;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
String fileNam... |
B21752 | B20447 | 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 ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.*;
/**
*
* @author wijebandara
*/
public class RecycledNumbers {
public static void main(String[] args) throws FileNotFoundException, IOException {
//java.io.BufferedRead... |
B20566 | B22118 | 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.util.*;
import java.io.*;
public class Recycle
{
public static boolean sameNumbers(int n, int m, int length, int i)
{
char[] nArray = (n + "").toCharArray();
char[] mArray = (m + "").toCharArray();
for (int j = 0; j < length; j++)
{
//System.out.println(j + " " + i + " " + m ... |
B21752 | B20407 | 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 ... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) throws IOException {
ArrayList<Pair> al = new ArrayList<Pair>... |
A10793 | A13218 | 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.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class dancers {
/**
* @param args
*/
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new File... |
B12669 | B12959 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | package google.loader;
import java.util.List;
public interface ChallengeReader {
List<Challenge> createChallenges(String[] lines);
}
|
B21270 | B21677 | 0 | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class CopyOfCopyOfMain {
static int ndigits(int n) {
return (int) (Math.log10(n) + 1);
}
static i... |
import java.io.*;
import java.util.HashSet;
public class code33 {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
FileWriter fos = new FileWriter("outfile",false);
BufferedWriter bw = new BufferedWriter(fo... |
B10858 | B10227 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package qualification;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedReader;
import java.... |
B20424 | B20132 | 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.InputStreamReader;
import java.io.PrintWriter;
import java.util.Date;
import java.util.HashSet;
import java.util.StringTokenizer;
public class GCJ2012QC {
static HashSet<Integer> set = new HashSet<Integer>();
static final int ZERO = 48;
public static void main(String[]... |
A11917 | A10212 | 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 com.code.jam;
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;
public class BDancingWithGooglers {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner (new File("C:/codeJam/ficheros2012/BDancingWithGooglers-practice.in"));
PrintStream ps = new Prin... |
B10899 | B11407 | 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(... | package codejam;
import java.util.ArrayList;
public class RecycledNumbers {
public static void recycled(String in,String out){
InOutTool iot = new InOutTool(in,out);
ArrayList<String> js = new ArrayList<String>();
for(int i=1;i<iot.size();i++){
int count = 0;
String s = iot.get(i).trim();
String[] nu... |
B11361 | B12287 | 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 codejam2012;
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.Arrays;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers {
public static v... |
B20023 | B21318 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | package recycledNumbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import... |
A12544 | A11775 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWiththeGooglers
{
private static final String INPUT_FILE = "input.txt";
private static final String OUTPUT_FILE = "output.txt";
//but not surpisin... |
B10702 | B10753 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Vector;
public class recycle {
public static void main(String arg[]) throws FileNotFoundException
{
Scanner in=new Scanner(new FileReader("rec.in"));
PrintWriter pw=new Prin... |
A12460 | A13189 | 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.*;
import java.text.*;
import java.math.*;
import java.util.*;
public class J12QB implements Runnable {
Scanner in;
PrintWriter out;
static String taskname = ".\\src\\B-small-attempt0";
int test, testn, i, j, k;
int N,S,p;
public static void main(String[] args) {
new Thread(new J12QB()).start(... |
A20261 | A20075 | 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 qualification;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Comparator;
public class B {
private static final char[] CASE = "Case #".toCharArray();
public static void main(String[] args) t... |
B12115 | B12676 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.util.Scanner;
public class C {
public static void main (String[] args)
{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int a, b;
int[] list;
for (int i = 1; i <= n; i++)
{
a = scan.nextInt();
if (a < 10)
a = 10;
b = scan.nextInt();
int count = 0;
for (int j... |
A20934 | A22092 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | package round1;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing {
private int noCases;
private ArrayList<Case> cases = new ArrayList<Case>();
private void readFile(String filepath) {
try {
S... |
A20934 | A22641 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class DancingGooglers {
public static void main(String[] args) throws IOException {
BufferedReader fInput = new Buf... |
B21752 | B22016 | 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 codeJam;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
@SuppressWarnings("serial")
public class Problem3 extends JFrame
{
//TODO Set file names
static final String INFILE = "codeJam/inFile3l.txt";
static final String OUTFILE = "codeJam/outFile3l.tx... |
B13196 | B10095 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | import java.util.Scanner;
import java.util.LinkedList;
public class ProblemC {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int T = scan.nextInt(); //number of cases
scan.nextLine();
for (int k = 1; k <= T; k++) {
int A = scan.nextInt();
int B = scan.nextInt();
i... |
B11318 | B11324 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Stack;
public class Main {
/**
* @param args
*/
static int recyclePair(int A, int B){
int pairCount =0;
Hash... |
A11201 | A12146 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | package codejam;
//--------------------------------------
//Systematically generate combinations.
//--------------------------------------
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
public class CombinationGenerator {
private int[] a;
private int n;
private int r;
private lo... |
A12544 | A12183 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.StringTokenizer;
public class GoogleDancers{
public static void main(String[] args) throws Exception{
FileReader fr = new FileReader("C:\\java projects\\learn\\src\\B-small-attempt0.in");
BufferedReader br = new... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.