F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A21396 | A23035 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.util.Scanner;
public class DancingGooglers {
public static void main( String args[] ) {
new DancingGooglers();
}
public DancingGooglers() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for( int j=0; j<T; j++ ) {
System.out.println( "Case #"+ (j+1) + ": " + doCase(sc) );
}... |
A22642 | A21750 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | public class QualBDancingWithTheGooglers
{
static boolean debug = false;
public static void main(String[] args)
{
Utils.openInFile("B-large.in");
Utils.openOutFile("out.txt", debug);
String input = Utils.readFromFile();
int lineCount = Integer.parseInt(input);
//while ((input = ... |
B20424 | B21490 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
public class question3CodeJam {
public int MAX=0;
public int MIN=0;
public int COUNTERVALS = 0;
public int findInversions... |
A11502 | A12720 | 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.util.Scanner;
public class Dancing {
public static void main(String args[]) {
try{
BufferedReader in = new BufferedReader(new FileReader("B-small-attempt0.in"));
BufferedWriter ... |
B22190 | B22113 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... |
package googleCodeJam;
import java.io.*;
import java.util.*;
public class firstExercise {
/**
* @param args
*/
public static void main(String[] args) {
try{
FileInputStream fstream = new FileInputStream("C-large.in");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new Buffer... |
A10699 | A12483 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author JY
*/
public class ProblemB4Test {
private static int testNum;
private static int[][] scores;
... |
B20291 | B22036 | 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 com.menzus.gcj._2012.qualification.c;
import java.util.Iterator;
import com.menzus.gcj.common.InputBlockParser;
public class CInputBlockParser implements InputBlockParser<CInput> {
@Override
public CInput parseLineIterator(Iterator<String> lineIterator) {
String[] lineParts = lineIterator.next().spl... |
A20382 | A23035 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | import java.util.Scanner;
public class DancingGooglers {
public static void main( String args[] ) {
new DancingGooglers();
}
public DancingGooglers() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for( int j=0; j<T; j++ ) {
System.out.println( "Case #"+ (j+1) + ": " + doCase(sc) );
}... |
B12074 | B11570 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlecodejam2012;
import java.io.FileNotFoundException;
import java.util.*;
/**
*
* @author Pavlos
*/
public class ProblemC {
public static void main(String[] args) throws FileNotFoundException {... |
B21270 | B20533 | 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.*;
public class ProblemC {
public static void main(String[] args) {
/*
try {
System.setIn(new FileInputStream("c-example.in"));
} catch (Exception e) {}
*/
new ProblemC();
}
public ProblemC() {
Scanner input = new Scanner(System.in);
int cases = input.nextInt(... |
B21968 | B21510 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class RecycledNumbers {
static Scanner sc;
public static void main(String a[]) throws FileNotFoundException
{
int n,i;
int res;
sc= new Scanner(n... |
B11421 | B11704 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package jam_c;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection... |
B12762 | B13220 | 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.Scanner;
public class NumberRecycling {
public static void main( String args[] ) {
new NumberRecycling();
}
public NumberRecycling() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for( int j=1; j<=T; j++ ) {
System.out.println( "Case #"+ j + ": " + doCase(sc) );
}
}... |
A11201 | A11946 | 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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.Writer;
import java.util.Scanner;
public class DancingWithTheGooglers {
private String mInputFileName;
private String mOutputFileName;
private int N;
private int S;
private int P;
private i... |
A12460 | A12413 | 0 | /**
*
*/
package pandit.codejam;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Scanner;
/**
* @author Manu Ram Pandit
*
*/
public class DancingWithGoogle... |
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Scanner;
//Using the Google Collections library.
public class B {
public static void main(String [] args) throws IOException {
String inputFile = "src/B-small-attempt0.in";
Scanner in = new Scanner(new File(inputFile)... |
B10245 | B10865 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | package student;
import java.io.*;
import java.util.*;
public class test {
public static int getShift(String t, int pos)
{
int len = t.length()/2;
return Integer.parseInt(t.substring(pos,pos+len));
}
public static void main(String[] args) throws FileNotFoundException
{
Scanner fin = new Scanner(new ... |
B20006 | B20430 | 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 {
... | package base;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import assignments.AssignmentC;
public class Solver {
public static void main(Strin... |
A22771 | A20208 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.util.*;
import java.io.*;
class probB {
public static void main(String[] args) throws IOException {
Scanner input = new Scanner(new File("probB.in"));
PrintWriter output = new PrintWriter(new File("probB.txt"));
int lines = input.nextInt();
for (int onl = 0; onl<lines; onl++) {
int googlers = in... |
B21207 | B21509 | 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.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
public class recycle {
public static void rec() throws NumberFormatException, IOException {
BufferedReader in = new BufferedReader(new FileReader("src... |
B10702 | B10312 | 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... | package qualification.c;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import common.ClockWatch;
import common.ISolver;
import common.QuestionHandler;
public class RecycledNumbers implements ISolver {
private int addCountSign(Set<Integer> signatures, Set<Integer> tmpSig,
int val, int... |
B10245 | B12680 | 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.*;
public class recycled_numbers {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int T = scanner.nextInt();
int[] answers = new int[T];
for (int c = 0; c < T; c++) {
int A = scanner.nextInt();
int B = scanner.nextInt();
int numdigits;
... |
B12941 | B10778 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | package gcj2012qual;
import java.io.*;
import java.util.*;
public class RecycleNum {
/**
* @param args
*/
HashMap<String, String> map = new HashMap<String, String>();
int totalpair(int start, int end){
int num = 0;
for(int i = start; i <= end; i++){
String s = String.valueOf(i);
//System.out.... |
A12570 | A11260 | 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.*;
public class Dancing{
public static void main(String args[]){
try{
FileInputStream fstream = new FileInputStream(args[0]);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
PrintWriter out = new PrintWrite... |
B20023 | B20220 | 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.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... |
A20934 | A20789 | 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.*;
import java.util.*;
public class dancing
{
public static void main(String[] args) throws Exception
{
BufferedReader reader = new BufferedReader(new FileReader("B-large.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("B-large.out")));... |
A10996 | A10795 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | package dancing_with_googlers;
import java.io.IOException;
import java.util.ArrayList;
public class FindNumber {
public static Integer start (String casus) {
String[] splitInput = casus.split(" ");
ArrayList<Integer> intinput = new ArrayList<Integer>();
for (String s: spli... |
B13196 | B10631 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package base;
public interface Assignment {
String solve();
}
|
A13029 | A12148 | 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 codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import ... |
A12846 | A11937 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class B_Small {
static int[] resu;
/**
* @param args
*/
public static void main(String[] args) {
File input=new File("D:\\Users\\xiaog... |
A10793 | A11965 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | package cj2012;
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 CJ2012QB {
public static void main(String[] args) {
BufferedReader bf = null;
BufferedWriter bw = nul... |
B10361 | B13225 | 0 | package codejam;
import java.util.*;
import java.io.*;
public class RecycledNumbers {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new File("out.txt"));
int T = Integer.parseInt(in.readLine());... |
import java.io.*;
import java.text.*;
import java.math.*;
import java.util.*;
public class J12QC implements Runnable {
Scanner in;
PrintWriter out;
static String taskname = ".\\src\\C-small-attempt0";
int test, testn, i, j, k;
public static void main(String[] args) {
new Thread(new J12QC()).start();
}
publ... |
A11277 | A10499 | 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 ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
*
* @author Sagar
*/
public class Dancing_With_the_Googlers
{
Map m;
int no_of_test_cases = 0;
StringBuff... |
B12762 | B11428 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author Suarabh Agarwal
*/
import java.io.*;
import java.util.Scanner;
public class Main3
{
public static void main(String args[])
{
try{
Scanner scan1 = new Scanner(new FileReader("... |
B22190 | B20185 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | package com.codejam.practice;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class Recycled {
public static void main(String[] args) {
/... |
A12273 | A11472 | 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.awt.*;
import java.lang.*;
import java.util.*;
public class SolutionTwo {
public static void main(String[] args) {
String fileName = null;
if (args.length > 0) {
fileName = args[0];
}
File file = null;
Scanner fileScanner = null;
Scanner lineScanner;
try {
file = new ... |
A12846 | A12397 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | package com.jam.google;
public class DancingWithTheGooglers {
public int count(int n, int s, int p, String ts) {
int count = 0;
String[] split = ts.split(" ");
for (String st : split) {
int t = Integer.parseInt(st);
int base = t / 3;
if (base < p-2) continue;
if (base>=p ||
... |
B12762 | B10419 | 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.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class MainClass {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Scanner sc = new Scanner(new File("C-small-attempt0.in"));
Pri... |
A11917 | A12199 | 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 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... |
B13196 | B11285 | 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.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
new RecycledNumbers().fun();
}
private void fun()
{
String file = "D:/CodeJam/input.in";
int r... |
A20261 | A21199 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | import java.util.Scanner;
/*
* el resto es 0 --> puede ser caso especial y no
* 15 --> 5 5 5 ó 4 5 6
* el resto es 1 --> puede ser caso especial y no
* 16 --> 4 6 6 ó 5 5 6
* el resto es 2 --> puede ser caso especial y no
* 17 --> 5 7 7 ó 5 6 6
*/
public class B {
public static void main(String[] ar... |
A21396 | A22119 | 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++){
... |
public class Problem {
public int googlers;
public int surprisingTriplets;
public int bestResult;
public int[] totals;
public Problem(int googlers, int suprisingTriplets, int bestResult, int[] totals) {
super();
this.googlers = googlers;
this.surprisingTriplets = suprisingTriplets;
this.bestResult = be... |
A12211 | A13233 | 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 codejam2012.util;
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;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Log... |
A22191 | A22203 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | package br.com.atama.google.jam;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import br.com.atama.google.jam.dancing.ScoreCalculator;
public class Solver {
public static void main(String[] args) throws IOException {
FileReader reader = new FileReader("src/input-small.txt"... |
B13196 | B13198 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... | package tr0llhoehle.cakemix.utility.googleCodeJam;
import java.text.ParseException;
/**
* This class is a base class for all concrete problems. It is used to define
* some methods necessary for the IOManager to work. It is crucial that the
* addValue-Method gets extended and called (super.addValue(o)) by the exten... |
B10702 | B11271 | 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... | package google.code.jam.problem.c;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
public class MainClass {
public static final String PATH_FILE = "C:... |
A10699 | A10736 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Dancing {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) ... | package test;
import java.io.*;
public class Test {
static public void magic(String tmp, int Result [],int index ){
int N=0,S=0,P=0,size;
char Carr []= new char[300];
size=tmp.length();
tmp.getChars(0, size, Carr, 0);
int i=0,j=0,spc=0;
String bom;
while (spc<3){
if(Carr[j]!=' '){
j++;
... |
A20119 | A20019 | 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.*;
import java.util.*;
import java.math.*;
public class Main
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer tokenizer=null;
public static void main(String[] args) throws IOException
{
new Main().execute();
}
void debug(Object...os)
{
System.out.p... |
A12113 | A10157 | 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"... |
public class Triplet {
private int fFirst;
private int fSecond;
private int fThird;
public Triplet( int aFirst, int aSecond, int aThird ) {
fFirst = aFirst;
fSecond = aSecond;
fThird = aThird;
}
public boolean isSurprising() {
if( Math.abs( fFirst - fSecond ) >= 2 ) {
re... |
A11201 | A12335 | 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.... | /**
* 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;
... |
A11277 | A11478 | 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 ... | /**
* Dancing With the Googlers
*/
package com.google.jam.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream... |
A12211 | A10486 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class dancing {
static int surprising;
/**
* @param args
*/
public static final int regexOccur(String text, String regex) {
Matcher matcher = Pattern.compile(regex).matcher(text);
int occur = 0;
while(ma... |
A20261 | A21733 | 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 googlecodejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import ja... |
A12273 | A12202 | 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author Westy92
*/
public class Dancing
{
private BufferedReader stdin;
/**
* This method reads lines of input and sends them to a process method.
* @throws IOExce... |
B11421 | B12879 | 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 codejam2012.qr;
import codejam.common.CodeHelper;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Chen Ling
*/
public class ProblemC {
private static String SMALL_IN_FILE_NAME = "/codejam2012/qr/C-small.in";
private static String LARGE_IN_FILE_NAME = "/codejam2012/qr/C-large.in"... |
B10361 | B11603 | 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 recyclednumbers;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;
public class Helper {
public static void main(String[] str) {
System.out.println(rotateDigits(345, 2, true));
}
public static int rotateDigits(int number, int noOfDigitesToBeMoved, boolean toLeft){
String str = I... |
B22190 | B20085 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.util.*;
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... |
B12115 | B10373 | 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.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class Recycled {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String li... |
A20730 | A21024 | 0 | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int zz = 1; zz <= T;zz++){
int N = in.nextInt();
int S = in.nextInt();
int p = in.nextInt();
int x = 0;
for(int i = 0; i < N;i++){
int score = in.n... | import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Googlers {
public static void main(String args[]) throws NumberFormatException, IOException
{
solve();
}
public static void ... |
B20023 | B21428 | 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.security.SecureRandom;
import java.util.*;
import java.math.*;
import java.awt.geom.*;
import static java.lang.Math.*;
public class Solution implements Runnable {
int solve(int a, int b) {
HashSet<Long> set = new HashSet<>();
for (int i = a; i < b; ++ i) {
Stri... |
B12669 | B11321 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.*;
public class Numbers{
public static void main(String args[]){
try{
FileInputStream fstream = new FileInputStream(args[0]);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
PrintWriter out = new PrintWrite... |
B20424 | B21660 | 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... | package taskc;
import java.io.FileNotFoundException;
import java.util.*;
import java.io.File;
import java.io.PrintWriter;
public class TaskC {
private long[] tenPowers = new long[10];
private long[]prevPairs = new long[10];
private void prepareTenPowers(){
tenPowers[0] = 1;
for(int i ... |
A10793 | A12195 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | package test;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.FileWriter;
import java.io.IOException;
import java.math.*;
public class case2 {
public static void main(String[] args){
try {
FileReader is_reader= new FileReader("C:\\Users\\Paul\\Downloads\... |
A22642 | A22531 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | import java.io.*;
public class DancingWithGooglers {
static int caseNumber;
static int totalCases;
public static void main(String[] args) throws Exception {
caseNumber = 1;
File fileIn = new File("C:\\GCJ\\DancingWithGooglers\\B-large.in");
FileInputStream fileInputStream = null;
BufferedInputStream ... |
B12115 | B12555 | 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.FileReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ClientC {
public static void main(String args[]) throws Exception {
ClientC client = new ClientC();
String[] inputLines... |
B11327 | B10540 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| package _2012_qual;
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class C {
boolean showDebug = true;
static boolean fromFile = false;
static String filePath = "E:/AAA/_gcj/";
static boolean intoFile = !false;
public void solve() throws Exception {
int testCasesCnt = nextInt(... |
B12115 | B13104 | 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();
... | /*
round 1
*/
package cj.qr;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
import java.math.BigInteger;
public class recy extends codejam {
public static void main(String[] av) throws Exception {
recy t = new recy();
t.solve(av, false);
... |
B12115 | B11514 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | package Qualification.A.jam2011;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
/*
4
3 1 5 15 13 11
3 0 8 23 22 21
2 1 1 8 0
6 2 8 29 20 8 18 18 21
*/
public class test {
static int A = 0;
static int B = 0;
public static v... |
A22378 | A21240 | 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.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int T = scanner.nextInt();
for(int j = 1; j<T+1; j++) {
int N = scanner.nextInt();
int S = scanner.nextInt();
int p = scanner.nextInt();
int minS = p>2? (p-2)*2+p : p;
... |
A12273 | A12012 | 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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintStream;
import java.util.StringTokenizer;
public class B {
private B() {
}
public static void main(final String[] args) throws Exception {
final B a = new B();
a.solve();
}
public v... |
A20490 | A22697 | 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 static java.lang.Double.parseDouble;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
... |
A12544 | A12647 | 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... | package net.mauhiz.contest.codejam.qual2012;
import java.io.IOException;
import net.mauhiz.contest.codejam.CodejamLineChunkSolver;
public class DancingGoogler extends CodejamLineChunkSolver {
public static void main(String... args) throws IOException {
new DancingGoogler().run(args);
}
@Override
protected St... |
A10793 | A12868 | 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) {
... | public class JudgeScores{
int jc1;
int jc2;
int jc3;
private boolean isSurprising = false;
public JudgeScores(int jc1, int jc2, int jc3) {
this.jc1 = jc1;
this.jc2 = jc2;
this.jc3 = jc3;
}
public JudgeScores(int jc1, int jc2, int jc3, boolean isSurprising) {
this.jc1 = jc1;
this.jc2 = jc2;
this.jc3... |
B12570 | B10581 | 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.codejam;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
public class CodeJam13 {
char map[];
public static void main(String[] args) {
Scanner fileIn = null;
FileWriter fileOut = null;
try {
fileIn = new Scanner(n... |
B11696 | B10023 | 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 problemC;
import java.io.IOException;
import java.util.HashSet;
import java.util.LinkedList;
import utils.InputReader;
public class SolverC {
public static void main(String[] args) throws IOException {
LinkedList<String> input = InputReader.read("C:/Users/Danielle/Desktop/C-small-attempt0.in");
int num ... |
A13029 | A11317 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Dancing {
static int s;
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System... |
B12762 | B12530 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package RecycledNumbers;
import java.io.*;
import java.util.ArrayList;
/**
*
* @author Himeshi
*/
public class RecycledNumbers {
public static void main(String[] args) {
int A, B, N, pairs;
Str... |
B12074 | B12150 | 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;
import java.io.OutputStream;
import java.io.IOException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author Prabu
*/
public class Main {
publi... |
B10702 | B11405 | 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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class C {
public static void main (String [] args) throws FileNotFoundException {
Scanner input = new Scanner(new File("csmall.in"));
int count = input.nextInt();
for (int i = 0; i < count; i++) {
... |
A11277 | A12726 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | package qualification;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class ProblemB {
static int numberOfSurprises;
static int atLeastP;
public st... |
A22642 | A22399 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | import java.util.*;
public class Dance {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t = 1; t <= T; t++) {
int num = 0, ptp = 0;
int n = sc.nextInt(), S = sc.nextInt(), p = sc.nextInt();
for(int i = 0; i < n; i++) {
int score = sc.n... |
B12941 | B12764 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... |
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chamika
*/
public class GRecycle {
public static void main(String[] args) {
Scanner s = new Scanner(System... |
B12669 | B11401 | 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.*;
import java.util.HashMap;
import java.util.Map;
public class Task3 {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(new File("t.txt")));
BufferedWriter writer = new BufferedWriter(new FileWriter(new File("out.t... |
B12074 | B10113 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class ProblemC {
public void write(String m){
try{
FileWriter fstream = new FileWriter("out.txt");
BufferedWriter o... |
B11327 | B10063 | 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.util.*;
import java.io.*;
public class recycled {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("input"));
int size = sc.nextInt();
for (int x = 0; x < size; x++) {
TreeSet<String> set = new TreeSet<String>();
TreeSet<String> set1 = new TreeSet<S... |
B12669 | B13047 | 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 gcj2012Q;
import java.io.*;
import java.util.*;
public class C {
public static void main(String[] args) {
new C().run(new Scanner(System.in));
}
void run(Scanner sc) {
int n = sc.nextInt();
for(int i = 1; n-- > 0; i++)
solve(sc, i);
}
int solve(int a, int b) {
if(b < 10 || a == b) return 0;... |
A20934 | A21585 | 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.util.Scanner;
public class Dancing_with_the_googlers {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int input = sc.nextInt();
for (int i = 1; i <= input; i++){
int googlers = sc.nextInt();
int surprises = sc.nextInt();
... |
B10149 | B11592 | 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 cj2012;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class c {
static PrintWriter pw;
static int testOut = 1;
/**
* @param args
* @throws IOException
... |
B21790 | B21421 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.TreeSet;
public class prob2 {
private static long oneTest(int a, int b){
boolean [] bool=... |
B21207 | B22053 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | package google.loader;
import java.util.List;
public interface ChallengeReader {
List<Challenge> createChallenges(String[] lines);
}
|
B20566 | B21882 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class CodeJamQ3 {
public static String[] read(final String name) throws IOException {
final InputStreamReader reader = new FileReader(new Fil... |
B10361 | B11308 | 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());... | /**
* Copyright 2012 Christopher Schmitz. All Rights Reserved.
*/
package com.isotopeent.codejam.lib.converters;
import com.isotopeent.codejam.lib.InputConverter;
public class IntLine implements InputConverter<Integer> {
private int input;
@Override
public boolean readLine(String data) {
input = Integer.pa... |
B21270 | B20645 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Q3 {
public static Problem[] probs;
static class Problem {
public int A;
public int B;
}
public static void ma... |
A12211 | A10497 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Dancing_improved {
static int f_Superan_limites(String params){
int superan_limite=0;
String[] para... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
CaseB[] cases = read("B-small-attempt0.in");
/*
// test reading
for (Case... |
A13029 | A11509 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package adream;
import java.util.Scanner;
/**
*
* @author sarah
*/
public class GoogleDancers {
public int max(int[] googs , int p , int s){
int surp = 0;
int max = 0;
if(p == 0)
... |
B10702 | B11141 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.falidae;
import java.util.*;
import java.io.*;
/**
*
* @author LittleRock
*/
public class RecycledNumbers {
public RecycledNumbers() {
}
public void init() {
}
public long s... |
B22190 | B21718 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;
public class EasyNumbers {
public static void main(String[] args) throws Exception{
PrintWriter out =new PrintWriter(new File("../easyNumbers/src/numberrr.out"));
Scanner s =new Scanner(new File("../easyNumbers/src/number.in"));
int ans... |
B10155 | B12188 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.io.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;
public class RecycledNumbers {
ArrayList<String> result = new ArrayList<>();
public void solve(int A, int B){
HashSet<Str... |
B11318 | B12005 | 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 recycledNumbers;
public class RecycledPair {
private int n;
private int m;
public RecycledPair(int n, int m) {
this.n = n;
this.m = m;
}
/**
* @return the n
*/
public int getN() {
return n;
}
/**
* @return the m
*/
public int getM() {
return m;
}
@Override
public boolean equals... |
B11327 | B13024 | 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.util.*;
import java.io.*;
public class template {
private StringBuilder result = new StringBuilder();
public static void main(String[] args) {
new template().go();
}
public void go() {
File inputFile = new File("/Users/amornchaikanokpullwad/Documents/input.in");
... |
A22992 | A20936 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.io.*;
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.