F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A11502 | A10651 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dancingwiththegooglers;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
/**
*
* @author Kholoud
*/
public class DancingWithThe... |
A22378 | A20344 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package solution;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Vector;
/**
*
* @author Aditya
*/
//A simple observation is... |
A20261 | A20248 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
public class Dancers {
@SuppressWarnings("deprecation")
private static void solveProblem() {
// Stream to read file
FileInputStream fin;
// Stream to wri... |
A12544 | A13110 | 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.*;
public class better {
public static void main(String[] args) throws Exception
{
int i=0;
FileReader fin=new FileReader("B-small-attempt0.in");
BufferedReader br=new BufferedReader(fin);
FileWriter fout=new FileWriter("Output12.in");
BufferedWriter bw=new BufferedWriter(fout);
int test=I... |
B10899 | B10889 | 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.gui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.J... |
B20291 | B20823 | 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[]... | package codejam.c;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import codejam.TestCaseReader;
public class Main {
public static void main(String[] args) {
TestCaseReader<int[]> reader = new TestCaseRea... |
A12570 | A10277 | 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 qualifs;
public class Gcj2012 {
public static void main(String[] args) {
final B problem = new B("B-sample");
problem.run();
}
}
|
B21049 | B20878 | 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.util.*;
import java.io.*;
public class Recycle
{
public static void main(String[] args)
{
Scanner in = new Scanner(new BufferedInputStream(System.in));
int T = in.nextInt();
for(int i=0; i <T;i++)
{
int A = in.nextInt();
int B = in.nextInt();
int x = A;
in... |
B11327 | B11144 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.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... |
A12570 | A13112 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class Googlers {
/**
* @param args... |
B10155 | B11718 | 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.util.Scanner;
public abstract class Question extends Thread{
protected Result result;
protected Counter counter;
public Question(Result result, Counter counter)
{
super();
this.result = result;
this.counter = counter;
}
public abstract void readInput(Scanner scanner);
public void solve... |
B20006 | B20509 | 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.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.HashSet;
import java.util.Set;
p... |
A12544 | A12375 | 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.*;
public class DancingGooglers {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int T = 0;
int N = 0;
int S = 0;
int p = 0;
int ptr = 0;
int maxCount = 0;
int scoreSum = 0;
int score1 = 0;
int score2 = 0;
int score3 = 0;
... |
A20382 | A21780 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String args[]){
try {
Scanner scanner = new Scanner(new File("B-large.in"));
int noOfCase = scanner.nextInt();
scanner.nextLine();
// System.out.println(noOf... |
B11318 | B10193 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.*;
import java.util.*;
/**
*
* @author maheshgupta
*/
public class Recycled {
/**
* @param args the command line arguments
*/
public static void main(String[] args... |
B21968 | B21140 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io... |
A12544 | A13170 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashMap;
public class Dancing {
/**
* @param args
*/
public static void main(String[] args) {
try {
// Open the file that is the first
... |
B12669 | B10337 | 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.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author megaterik
*/
public cl... |
B10899 | B10265 | 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(... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package C;
import java.io.*;
import java.util.Scanner;
/**
*
* @author Novin Pendar
*/
public class C {
public static void main(String[] args) throws FileNotFoundException, IOException{
File fi=new File(... |
B12669 | B11038 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.util.*;
public class c{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
long[] powers = new long[10];
for(int j = 0; j<10; j++){
powers[j]=(long)Math.pow(10,j);
}
for(int tt = 1; tt<=T; tt++){
int a =sc.nextInt();
int b =sc.nextInt();
... |
A22378 | A22998 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class B {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new FileReader("B-large.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B-large-output.txt"));
int T = sc.nextInt(); // n... |
B11696 | B10376 | 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.InputStreamReader;
import java.io.IOException;
import java.util.HashSet;
public class RecycledPairs {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
HashSet<Integer> seen = new HashSet<In... |
A11135 | A10633 | 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 codejam;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
*
* @author sarwar
*/
public class problemB {
static... |
A11201 | A12941 | 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.*;
import java.util.*;
public class dance
{
public static void main(String[] args) throws Exception
{
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(new File("dance.in"))));
PrintStream out = new PrintStream(new File("dance.out"));
int cases = Integer.parseInt(in... |
A10568 | A11075 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package b;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author mrzk
*/
public class Main
{
/**
* @param args the command line arguments
... |
B10149 | B10801 | 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 googlecodejam2012;
import java.io.*;
import java.util.HashSet;
/**
*
* @author Stephen
*/
public class GoogleCodeJam2012Num3 {
/**
* @param args the command line arguments
*/
public static... |
A20261 | A22913 | 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 actual;
import java.io.*;
import java.util.*;
public class B
{
String line;
StringTokenizer inputParser;
BufferedReader is;
FileInputStream fstream;
DataInputStream in;
void openInput(String file)
{
//is = new BufferedReader(new InputStreamReader(System.in));//stdin
try{
fstream = new FileInpu... |
A12113 | A12342 | 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 teardrop.jam2012.qr.dancing;
import org.testng.annotations.Test;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
public class SetSolverTest {
private static final String testInput =
"4\n" +
"3 1 5 15 13 11\n" +
"3 0 8 23 22 21\n" +
... |
B12082 | B10117 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.util.*;
public class Recycle {
private static Scanner s = new Scanner(System.in);
public static void main(String[] args) {
int T = s.nextInt();
List<Integer> ms = new LinkedList<Integer>();
for (int t = 0; t < T; t++) {
int A = s.nextInt();
int B = s.nextInt();
int digits = String.valu... |
B12074 | B11886 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.util.Scanner;
public class CodeJam3
{
public static void main(String[] args)
{
Scanner kb=new Scanner(System.in);
int testCases=kb.nextInt();
for(int i=0;i<testCases;i++)
{
long countValue=0;
long x1=kb.nextInt();
long x2=kb.nextInt();
for(long k=x1;k<x2;k++)
{
String s1=new L... |
B20291 | B21518 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | import java.io.*;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.InputMismatchException;
/**
* @author Mikeldi Latorre (mikeldi10@gmail.com)
*/
public class RecycledNumbers implements Runnable {
private InputReader in;
private PrintWriter out;
public static void main(String[] args) {
ne... |
A13029 | A12731 | 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... | public class ProblemB extends FileWrapper {
private int N[] = null;
private int S[] = null;
private int P[] = null;
private int t[][] = null;
public ProblemB(String fileName) {
this.processInput(fileName);
this.calculate();
this.processOutput(OUTPUT);
}
private int getResult(int caseNum) {
int total ... |
A11135 | A12122 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Main {
/**
* @param args
*/
public static void main(String[] args)
{
try{
// Open the file that is the ... |
B10485 | B11058 | 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 fixjava;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
/**
* Pair: typed 2-tuple
*/
public class Pair<L, R> {
private final L left;
private final R right;
p... |
B12570 | B11279 | 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 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... |
B10155 | B12244 | 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 com.lily.acm.googleCodeJam;
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.util.HashSet;
public class RecycledNumbers
{
public static int getRecyleCount(int n,int ... |
A10699 | A12185 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithGoolers {
public static void main(String args[]) {
try {
BufferedReader inputReader = new... |
A21557 | A22623 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Dancing
{
public static void main(String[] args) throws FileNotFoundException
{
Scanner sc = new Scanner(new File("inputs/dancing.in"));
int cases = sc.nextInt();
for (int... |
B12115 | B10300 | 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.FileInputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
public class C {
static int[] a = { 1, 10, 100, 1000, 10... |
B11327 | B13261 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.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... |
A11502 | A11182 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
public class DancingGooglers {
/**
* @param args
*/
pu... |
B12762 | B12847 | 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.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... |
B10155 | B10379 | 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... |
public class ValuePairs {
int value1;
int value2;
public ValuePairs(int a,int b){
value1 = a;
value2 = b;
}
@Override
public boolean equals(Object vp){
if(!(vp instanceof ValuePairs))
return false;
return value1 == ((ValuePairs)vp).value1 && value2 == ((ValuePairs)vp).value2;
}
@Override... |
B10858 | B12674 | 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 RecycledNumbersSmall {
public static void main(String[] args) {
File file = new File("/Users/NoK/Desktop/C-small-attempt0.in");
int... |
B12074 | B10212 | 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.
*/
/**
*
* @author Dimitris
*/
import java.io.*;
public class trito {
File ffff;
FileReader fr;
BufferedReader br;
File fout;
FileWriter fw;
BufferedWriter bw;
public static void main(... |
B11318 | B11655 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | package com.quosco.codejam.pre;
import static java.lang.Math.*;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
public class Main {
private static final String OUT_FORMAT = "Case #%d: %d\n";
private static void solve() thro... |
B11361 | B13120 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class RecycledNo {
Scanner in;
BufferedWriter out;
RecycledNo(String input, String output) throws Exception {
... |
A10568 | A11793 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static void main(String[] args) {
int cases = 0, googlers = 0, ... |
A21396 | A20406 | 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 MyAllgoritmicLib;
public class CodeGray {
public static int grayEncode (int n) {
return n ^ (n >> 1);
}
public static int grayDecode (int g) {
int n = 0;
for (; g > 0; g>>=1)
n ^= g;
return n;
}
}
|
B11696 | B12219 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.util.*;
import java.io.*;
class B
{
public static void main(String[]args)
{
try
{
Scanner sc=new Scanner(new File("C-small-attempt0.in"));
int count=sc.nextInt();
String blank=sc.nextLine();
PrintWriter pr=new PrintWriter(new FileWriter("BAnswer0.in"));
for(int i=1; i<=coun... |
B13196 | B12414 | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
/**
* @param args
*/
public static void main(String[] args)
{
try
{
// Open the file that is the first
// command lin... |
A20934 | A21981 | 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.util.Scanner;
public class DancingGooglers {
public static void calculate(File file){
String output="";
int cases = 0;
String singleLine = "";
try{
Scanner scanner = new Scanner(file);
cases = Integer.parseInt(scanner.nextLine());
int []result = new int[cases];
... |
A12273 | A10261 | 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.*;
public class MySolution {
public MySolution() {
}
public static void main(String[] a) throws IOException {
sumfile("B-small-attempt0.in");
}
static void sumfile(String filename) throws IOException {
int tests=0;
int N=0;
int S=0;
int p=0;
int ti=0;
int count=0;
Reader r = new ... |
A20490 | A21603 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | import java.util.*;
public class B {
/**
* @param args
*/
private static boolean sup(int i,int j,int k) {
return (Math.abs(i-j)==2 || Math.abs(i-k)==2 || Math.abs(j-k)==2);
}
private static boolean[] analyze(int x, int p) {
int i,j,k;
boolean ret[] = new boolean[4];
for (i=0;i<=10;i++) {
for (j=0;... |
B12762 | B10632 | 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 assignments;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import base.Assignment;
public class AssignmentC implements Assignment {
private int min;
private int max;
@Override
public String solve() {
int total = 0;
int length = (int) Math.log10(min) + 1;
for (int i ... |
A11201 | A11081 | 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;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Second {
public static void main(String[] args) throws FileNotFoundException {
String path = ClassLoader.getSystemClassLoader().getResource("codejam/").getPath();... |
A11917 | A10425 | 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 MyAllgoritmicLib;
public class NOK {
public static int lcm (int a, int b)
{
return a * b / NOD.gcd (a, b);
}
public static long lcm (long a, long b)
{
return a * b / NOD.gcd (a, b);
}
public static double lcm (double a, double b)
{
return a * b / NOD.gcd (a, b);
}
}
|
A11135 | A12096 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.io.*;
import java.util.*;
public class Pilot {
public static void main(String[] args) {
Pilot my = new Pilot();
Calendar cal1 = Calendar.getInstance();
my.doAll();
Calendar cal2 = Calendar.getInstance();
// System.out.println("\nseconds : " + (cal2.getTimeInMillis() -
// cal1.getTimeInMillis... |
A20382 | A20406 | 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 MyAllgoritmicLib;
public class CodeGray {
public static int grayEncode (int n) {
return n ^ (n >> 1);
}
public static int grayDecode (int g) {
int n = 0;
for (; g > 0; g>>=1)
n ^= g;
return n;
}
}
|
B12115 | B10704 | 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.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.HashSet;
public class ProblemB {
static int A;
static int B;
static HashSet<Integer> set;
... |
B11318 | B10042 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | package c;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
sc.nextLine();
int nbr = 1;
while (t-- > 0) {
int a = sc.nextInt();
int b = sc.nextInt();
i... |
B10245 | B10301 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class CodeJam {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
try {
int testCaseCount = scanner.nextInt();
for (int i = 0; i < testCaseCount; i++) {
int A = scanner.nextInt();
int B... |
B20291 | B22107 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | import java.io.*;
import java.util.*;
public class QualificationRoundC {
public static int power(int i, int p){
int k = 1;
for(int j = 0; j < p; j++)
k *= i;
return k;
}
public static int recycle(int n, int k){
int d = power(10, k);
int e = power(10, numD... |
B21270 | B22059 | 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 qualification.recycled.numbers;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Rec... |
A11277 | A10947 | 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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class ProblemB {
public int[] deriveScores(int totalScore) {
if (totalScore < 0 || totalScore > 30) {
throw new IllegalArgumentException("invalid totalScore passed: " +... |
A11201 | A10426 | 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 MyAllgoritmicLib;
public class BinnomNeutona {
public static int C(int k, int n){
return factorial(n)/(factorial(k)*factorial(n-k));
}
public static int factorial(int n){
int result = 1;
for(int i = n; i > 1; i--){
result *= i;
}
return result;
}
}
|
A11917 | A11323 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... |
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
InputStream in... |
A20934 | A22541 | 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.FileNotFoundException;
import java.io.FileReader;
import java.util.Iterator;
import java.util.Scanner;
public class DancingWithGooglers {
public static class Scores {
public final int S;
public final int p;
public final int[] t;
public Scores(int S, int p, int[] t) ... |
B12570 | B10712 | 0 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class RecycledNumbers{
int getcount(int small,int large){
int count = 0;
for(int currnum = small; currnum < large; currnum++){
int permut = currnum;
int no_of_digits = 0;
while(permut > 0){
permut... | import java.io.*;
import java.util.*;
public class Main{
String inputFile = "C-small-attempt0.in";
String outputFile = "";
PrintStream output;
Scanner fileScanner;
int outputLine = 0;
double start = System.currentTimeMillis();
public Main(){
newCodeJam();
fileScanner.next... |
B12082 | B12088 | 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 codejam;
import java.io.*;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class RecycledNumbers {
public static final String LINE_SEPARATOR = System.getProperty("line.separator");
public static int recycleNum(int a, int b) {
Map... |
B20734 | B21306 | 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... | package main;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
p... |
B12570 | B13085 | 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.*;
public class RecycledNo
{
public static void main (String arg[]) throws Exception
{
BufferedReader ob=new BufferedReader (new FileReader("C-small-attempt2.in"));
PrintWriter pw=new PrintWriter ("output.txt");
String temp="";
temp=ob.readLine();
int t=Integer.parseInt(temp);
int a=0,b=0;
for(int l=1... |
B11696 | B12304 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | /**
*
*/
package GoogleCodeJam2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* @author MArunkumar
*
*/
public class RecycledNumbers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOE... |
A20119 | A22398 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class mainclass {
public static void main(String args[]) throws IOException {
int cases;
int n;
int s;
int p;
int t;
int flag;
int counter;
int[] data;... |
A11917 | A12424 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | import static java.util.Arrays.deepToString;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.Callable;
import java.util.concurrent.... |
B21207 | B21727 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chung Lee
*/
public class RecycleNumbe... |
B10149 | B10904 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | package qualification;
import java.io.FileInputStream;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
/**
* Created by IntelliJ IDEA.
* User: Yuri
* Date: 14.04.12
* Time: 12:18
* To change this template use File | Settings | File Templates.
*/
public class Task3 {
static int div... |
B21049 | B21200 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | package codejam.network172.com;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.LinkedList;
public class CodeJam {
public static void main(String[] args) {
try {
B... |
A11277 | A12668 | 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.util.Scanner;
public class Surp {
/**
* @param args
*/
public static void main(String[] args) {
int T,S,p,N=0;
String L="";
Scanner b = new Scanner(System.in);
T=b.nextInt();
L=b.nextLine();
for(int i=0;i<T;i++){
L=b.nextLine();
String F[]=L.split(" ");
N=0;
S=Integer.parse... |
B10245 | B13117 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... |
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
/**
* Problem C
*
* @author thomas
*/
public class RecycledNumbers {
public static void main(String[] args) {
String linea;
try {
FileReader fis = new FileReader("C-small-attempt0.in");
... |
B21049 | B21822 | 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.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanne... |
B10245 | B12051 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
class Recycle extends Question{
public Recycle(String in, String out) {
super(in, out);
}
public void solve(){
ArrayLis... |
B10245 | B12506 | 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.PrintWriter;
import java.util.Scanner;
public class ProblemC {
public static void main(String[] args) throws FileNotFoundException {
String test = "4\n" + "1 9\n" + "10 40\n" + "100 500\n" + "1111 2222\n";
Scanner sc = new Scanner(new Fi... |
B12085 | B13089 | 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.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author viswas
*/
public class Recycled {
pub... |
A20934 | A20228 | 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 nl.bertjesapps.googlecodejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class ProblemTwo {
enum Result { NOT_POSSIBLE,POSS... |
B12669 | B11763 | 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 de.johanneslauber.codejam;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import de.johanneslauber.codejam.model.ICase;
import de.johanneslauber.code... |
B20291 | B20238 | 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.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
public class RecycledNumbers {
public static void main(String args[]) throws IOException{
String inputFile = args[0];
String outputFile = args[1];
BufferedReader input = new BufferedReader(new File... |
A21396 | A20113 | 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 source;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DancingGooglers {
/**
* @param args
*/
public static void main(String[] args) throws IOException{
S... |
A10699 | A10443 | 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.util.Scanner;
import java.io.*;
public class Prob2 {
public static void main(String[] args) throws IOException{
Scanner in = new Scanner(new File("D:/B-small-attempt0.in"));
PrintStream out = new PrintStream(new File("D:/outputProb2.txt"));
int lineAmount = Integer.parseInt(in.nextLine()... |
A20119 | A21119 | 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.util.*;
public class ProblemB {
public static void main(String[] args) {
System.out.println("Enter input for case:");
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
sc.nextLine();
int[] nt = new int[T];
int[] st = new int[T];
int[] pt = new int[T];
int[][] ni = new int[T]... |
A20934 | A23038 | 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 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]));
... |
A11502 | A11596 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | package quals;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
BufferedReader reader =... |
B10858 | B11649 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| package com.codejam.two12.RecyledNumbers;
import java.util.HashSet;
import com.jp.common.Puzzle;
public class RecycledNumbers implements Puzzle {
private HashSet<Integer> checkedElementSet = new HashSet<Integer>();
private HashSet<Pair> ListOfPairs = new HashSet<Pair>();
private int startNumber;
private int... |
A13029 | A11352 | 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 googlejam.qualification2012;
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;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Arrays;
imp... |
B11421 | B11871 | 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.Scanner;
import java.util.*;
public class B {
public static int reverse(int a, int b) {
Vector vec = new Vector();
Vector vec2 = new Vector();
int result = 0;
if(a > 9) {
for(int i=a; i <= b; i++) {
String x=i+"";
for(int j = 1; j < x.length();j++) {
int stat... |
A22360 | A21773 | 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 ... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author Shubham
*/
public class Dancers {
public static void main(String a[]) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integ... |
A12460 | A11687 | 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.util.Scanner;
public abstract class Question extends Thread{
protected Result result;
protected Counter counter;
public Question(Result result, Counter counter)
{
super();
this.result = result;
this.counter = counter;
}
public abstract void readInput(Scanner scanner);
public void solve... |
A20382 | A20113 | 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 source;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DancingGooglers {
/**
* @param args
*/
public static void main(String[] args) throws IOException{
S... |
A10996 | A10999 | 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);
... |
public class Code2DataStructure {
private int noOfGooglers;
private int surprisingTrplets;
private int p;
private int[] marks;
private int result;
public int getNoOfGooglers() {
return noOfGooglers;
}
public void setNoOfGooglers(int noOfGooglers) {
this.noOfGooglers = noOfGooglers;
}
public int getSurp... |
B10361 | B12372 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.*;
/**
*
* @author Ka
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws FileNotFoundException, IO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.