F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
A22191 | A20023 | 0 | package com.example;
import java.io.IOException;
import java.util.List;
public class ProblemB {
enum Result {
INSUFFICIENT,
SUFFICIENT,
SUFFICIENT_WHEN_SURPRISING
}
public static void main(String[] a) throws IOException {
List<String> lines = FileUtil.getLines("/B-large.in");
int cases = Int... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class InputReader {
private BufferedReader br = null;
public InputReader(String fileName) {
try {
br = new BufferedReader(new FileReader(fileName));
}... |
B20023 | B20587 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class GoogleC {
public String szamol(String input){
String result="";
String... | package knucle.y2012.C;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
import java.util.Set;
public class C {
public static void main(String[] args) throws Exception {
FileReader fr = new FileReader("C-large.in");
... |
A20490 | A20424 | 0 | /**
*
*/
package hu.herba.codejam;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... | import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.*;
public class Dance {
private static int raw_num;
private static int pot_num;
public static void main(String[] args) throws FileNotFoundException{
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter("dance_ou... |
B12941 | B11876 | 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 com.google.codejam;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;
import java.util.regex.Pattern;
public class CodeJam3 {
private static int testCase;
private static FileOutputStream fostream;
private static Data... |
A22360 | A22506 | 0 | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Scanner;
public class Dancing_With_the_Googlers {
/**
* The first line of the input gives the ... | package q2;
import java.util.Scanner;
public class DWG {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int _t = 0; _t < t; _t++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt();
int flo... |
B10155 | B11580 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
public class Q3 {
public static void main(String[] args) throws IOException {
Scanner reader=new Scanner(new File("D:\\C-small-attempt0 (1).in"));
int noOfCases=reader.nextI... |
A22642 | A22535 | 0 | import java.util.*;
import java.io.*;
public class DancingWithTheGooglers
{
public DancingWithTheGooglers()
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File("inputB.txt"));
}
catch(Exception e)
{
System.out.println("Problem ope... | package commons;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
public class FileUtilities {
public static void writeFile(List<String> strings, File file)
th... |
B20291 | B20253 | 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.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... |
A10699 | A11205 | 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;
public class b {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int numOfLines = new Integer(in.nextLine());
for (int i= 1; i<=numOfLines; i++){
String [] lineValues = in.nextLine().split(" ");
int numberOfPlayers = new Integer(lineValues[0]);
in... |
A22771 | A22894 | 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.*;
public class b {
public static void main (String[] args){
//settingup input and output
Scanner in = null;
PrintWriter out = null;
try{
in = new Scanner(new File("blarge.txt"));
out = new PrintWriter(new FileOutputStream("blargeout.txt"), true)... |
A11201 | A10694 | 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 codeJam2012;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
public class B {
public static void main(String[] args) throws IOException {
RandomAccessFile raf = new RandomA... |
A12544 | A11402 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Conny
*/
public class ProbQ2 {
public static void main(String[] args) {
String fileContent = CodeJamTools.readFileAsString("c:\\temp\\inputQ2.txt");
String[] rows = fileContent.split("\\n");
i... |
B21790 | B21962 | 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.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.*;
import javax.sql.rowset.Joinable;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.lang.Integer.*;
import static java.lang.Character.*;
public class C {
stati... |
A11135 | A10868 | 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.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.HashMap;
public class tongue {
static HashMap<Str... |
A20261 | A21165 | 0 | package com.gcj.parser;
public class MaxPoints {
public static int normal(int value){
int toReturn = 0;
switch (value) {
case 0 : toReturn = 0 ; break;
case 1 : toReturn = 1 ; break;
case 2 : toReturn = 1 ; break;
case 3 : toReturn = 1 ; break;
case 4 : toReturn = 2 ; break;
case 5 : toReturn = 2 ; b... | package qualification;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
static int surprise=0;
static int[] findMin(int[] a)
{
for(int i=0;i<a.length-1;i++)
for(int j=i+1;j<a.length;j++)
if(a[i]>a[j])
{
int t=a[i];
... |
A22360 | A21764 | 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.File;
import java.io.FileReader;
import java.io.IOException;
public class FileIn {
private StringBuilder sb = new StringBuilder("");
/**
* ã³ã³ã¹ãã©ã¯ã¿.
* @param filename èªã¿è¾¼ããã¡ã¤ã«å
*/
public FileIn(String filename) {
File f = new File(filename);
FileReader fr... |
B20856 | B21730 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.SortedSet;
import java.util.TreeSet;
public final class Recy... |
B12085 | B12246 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.util.Scanner;
public class C {
public static boolean recycled(int n, int m) {
if (n == m) {
return false;
} else {
String A = String.valueOf(n);
A += A;
String B = String.valueOf(m);
return A.contains(B);
}
}
public static void main(String[] args) {
Scanner s = new Scanner(Syst... |
A11135 | A11486 | 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.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Dancing {
public static void main(String[] args) throws IOException {
int count = 0;
int special = 0;
int googler = 0;
int best = 0;
int sp_co = 0;
int sat = 0;
... |
A10568 | A11008 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package dancing;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
File file = new File("B-small-attempt0.in");
FileReader fr = new FileReader(file);
BufferedReader in = new... |
A13029 | A10745 | 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.File;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
public class Dancing {
/**
* @param args
*/
public static void main(String[] args) {
new Dancing();
}
public Dancing ()
{
solve();
}
/**
* Solves Problem A. Speaki... |
B21049 | B21147 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.*;
import java.util.*;
public class RecycledNumbers {
public static void main(String[] args) {
try {
Scanner in = new Scanner(new File("C:/Users/Ross/Downloads/C-large.in"));
int T = in.nextInt();
String out = "";
for(int i = 0; i < T; i++) {
int A = in.nextInt();
int B = in.nextI... |
B12570 | B11541 | 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 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... |
A11277 | A10405 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | package codejam;
import java.io.*;
public class FileRead {
String fileName;
FileReader fr;
BufferedReader br;
FileRead(String fileName)
{
this.fileName=fileName;
File f=new File("K:\\CodeJam\\Input\\"+fileName);//Create a file object
FileReader fr;
try {
fr = new FileReader(f);
br=new Buffered... |
B20734 | B22261 | 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 com.eevoskos.codejam;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
private static final boolean DEBUG = false;
public static void main(String... args) {
RecycledNumbers instance = new RecycledNumbers();
... |
B10231 | B12732 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | import java.io.*;
public class googleJam3 {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
BufferedReader reader = null;
PrintWriter writer = null;
try{
reader = new BufferedReader(new FileReader("C-small-attempt0.in"));
writer = ne... |
A12544 | A10547 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
public class Dance {
static int getMaxGooglers(int N,int S, int p, int[] t) {
int count=0;
int surpriseCount=0;
int avg=p*3;
for(int i=0;i<N;i++) {
if(t[i]>=p) {
if(t[i]>=av... |
B20856 | B21590 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | package com.mohit.codejam;
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 RecycledNumbers {
public static void main(String[] args) {
try {
int noOfTests = 0;
... |
A12846 | A10232 | 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.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Dancers {
public static void main(String[] args) throws Exception {
BufferedReade... |
B12941 | B11068 | 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 fixjava;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Iterator;
/**
* Iterator that iterates over the lines of the file and then closes it after the last line has been read.
*
* e.g.
*
*... |
A10793 | A11045 | 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 fixjava;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import fixjava.ParallelWorkQueue.CallableFactory;
public class ParallelWorkQueueTest {
/**
* @param args
*/
public static void main(String[] ... |
B21227 | B20271 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | 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 RecycledNumbers {
public static void main(String[] args... |
A21010 | A21776 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
public class Main2
{
public static void main(String[] args) throws IOException
{
String line = " ";
String line2 = " ";
String line3 = " ";
FileReader reader = new FileReader("B-large.in");
Scanner in = new Scanner(reader);
ArrayList<... |
A21557 | A21799 | 0 | import java.io.*;
import java.util.*;
public class DancingWithGooglers {
public static class Googlers {
public int T;
public int surp;
public boolean surprising;
public boolean pSurprising;
public boolean antiSurprising;
public boolean pAntiSurprising;
public Googlers(int T, int surp) ... | import java.util.Scanner;
public class DWG
{
public static int[] SuspA = null;
public static int[] nonSuspA = null;
/**
* @param args
*/
public static void main(String[] args)
{
Scanner scnr = new Scanner(System.in);
int T = scnr.nextInt();
for (int t = 1; t <= T; t++)
{
int N = scnr.nextInt();
... |
B11318 | B12911 | 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 er.dream.codejam.helpers;
import java.io.File;
import java.util.List;
public abstract class ProblemSolver {
protected FileHandler fileHandler = new FileHandler();
protected abstract List<String> handleInput();
public void execute(){
File[] files = fileHandler.listFiles();
for(File f : files){
... |
B20856 | B21862 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... | import java.io.*;
import java.util.ArrayList;
public class RecycledNumbers {
static int caseNumber;
static int totalCases;
public static void main(String[] args) throws Exception {
caseNumber = 1;
File fileIn = new File("C:\\GCJ\\RecycledNumbers\\C-large.in");
FileInputStream fileInputStream = null;
Buf... |
A22771 | A22446 | 0 | package com.menzus.gcj._2012.qualification.b;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
public BProcessorFactory(Str... | import java.io.File;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(new File("input.in"));
int t, n, s, p, ans;
int scores[];
t = in.nextInt();
for (int tc = 1; tc <= t; tc++) {
n = in.nextInt();
s = in.nextInt();
p = in... |
B12085 | B12912 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | package er.dream.codejam.qual;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import er.dream.codejam.helpers.ProblemSolver;
public class RecycledNumbers extends ProblemSolver{
public static void main(String[] args) {
new RecycledNumbers().execute();
}
@Ove... |
A12211 | A11970 | 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.util.*;
import java.io.*;
public class B {
public static void main(String []args){
Scanner input = new Scanner(System.in);
int cases = input.nextInt();
int []result = new int[cases];
//input.nextLine();
for(int i = 0; i < cases ;i++){
int n = input.nextInt();
int s = input.nextInt();
... |
A11917 | A12931 | 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 google.loader;
import java.util.List;
public interface ChallengeReader {
List<Challenge> createChallenges(String[] lines);
}
|
B12085 | B10972 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.util.ArrayList;
import java.util.HashMap;
public class ProblemC {
static ArrayList<Integer> allTheNumbers = new ArrayList<Integer>();
static HashMap<Long, Long> binomCoeff = new HashMap<Long, Long>();
public static int solveC(int A, int B)
{
allTheNumbers = new ArrayList<Integer>();
int count =... |
B10361 | B11612 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
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 Recycled {
public static void main(String args[]) {
try ... |
B21049 | B20712 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.*;
import java.util.*;
class Recycling {
static Scanner sc;
static TreeMap<Integer,Integer> found;
static void run()
{
int A = sc.nextInt();
int B = sc.nextInt();
found = new TreeMap<Integer,Integer>();
int total = 0;
for (int n = A; n... |
A20934 | A21838 | 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.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.regex.Pattern;
public class ProblemB {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-gene... |
A11135 | A13149 | 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 dance;
import java.io.*;
import java.util.*;
/**
*
* @author karam.yaaqna
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
... |
A22642 | A22686 | 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.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;
public class Triplets {
/**
* @param args
*/
public static void main(String[] ... |
A22642 | A20497 | 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 static java.util.Arrays.sort;
import java.io.*;
import java.util.*;
public class ProblemB {
public static void main(String[] args) throws Throwable {
Scanner in = new Scanner(new File("b.in"));
PrintWriter out = new PrintWriter("b.out");
int testCount = Integer.parseInt(in.nextLine().trim());
for (int... |
B10899 | B11716 | 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(... | public class Result {
public String output;
public int i;
public Result(int i) {
this.i = i;
}
@Override
public String toString() {
return "Case #"+i+": " + output;
}
}
|
B22190 | B21030 | 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 qualification.C;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static void main(String[] args) {
int totalCase = 0;
int a = 0;
int b = 0;
FileInputStr... |
B12570 | B11166 | 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 jam;
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.io.Writer;
public class Recycled {
public static void main(String[] x)throws IOException{
File file=new File("A.in");... |
B20291 | B21813 | 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[]... | public abstract class JamCase {
int lineCount;
}
|
A20934 | A20736 | 0 | import java.util.*;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
B th = new B();
for (int i = 0; i < T; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt()... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
public abstract class TestCase {
public abstract void readInput(BufferedReader in) throws IOException, MalformedInputFileException;
public abstract void solve();
public abstract void writeOutput(PrintWriter out);
} |
B10702 | B11773 | 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.util.ArrayList;
import java.util.List;
public class RecycledNumbers {
/**
* @param args
*/
public static void main(String[] args) {
List<String> inputList = FileIO.readFile("C-small-attempt0.in");
List<String> outputList = new ArrayList<String>();
int caseNo = 1 ;
int testCaseCount = In... |
B21752 | B21166 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.epii.codejam.common;
/**
*
* @author jim
*/
public interface Processor {
public String processLine(String line);
}
|
A22191 | A23061 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googlecodejam;
/**
*
* @author Bhanu
*/
import java.util.*;
public class DancingGooglers {
public static void main(String arg[]) throws Exception
{
int s1[] = {0,1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,... |
B10899 | B11828 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | import java.text.*;
import java.io.*;
import java.util.*;
import java.lang.Math;
public class C
{
public static void main(String[] args) throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
int T = Integer.parseInt(br.readLine());
for(int t = 1; t <= ... |
B20291 | B20861 | 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 C {
public static int a;
public static int b;
public static void main(String[] args) throws Exception{
File f = new File("C-large.in");
Scanner sc = new Scanner(f);
BufferedWriter bw = new BufferedWriter(new FileWriter("output.txt"));
int n = sc.nextInt();
... |
A10568 | A10600 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | package Controller;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class IO {
private String fileName;
private BufferedReader reader;
public IO(String fileName) {
this.fileName = fileName;
createReader();
}
public String re... |
A22191 | A20527 | 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 practice;
import java.util.*;
public class GoogleDance {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int cases = Integer.parseInt(sc.nextLine());
for(int i = 0; i<cases; i++){
//Case starts here
int caseCounter = i+1;
String caseLine = sc.nextLine();
String[... |
A21396 | A21562 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class Dancing {
public static void main(String[] args){
Dancing d = new Dancing();
try{
// Open the file that is the first
// command line parameter
FileInputStr... |
A21557 | A21204 | 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) ... | // library In.java at http://introcs.cs.princeton.edu/stdlib/stdlib.jar
public class PB {
public static void main (String[] args) {
int t, n, s, p;
int num, mod, quot;
int maybe;
int counter;
int max;
In in = new In("input.txt");
t = Integer... |
B11318 | B11636 | 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 contest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.Set;
import java.util.HashSet;
public class RecycledNumb... |
B20424 | B20743 | 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 fixjava;
import java.util.ArrayList;
/**
* String splitter, this fixes the problem that String.split() has of losing the last token if it's empty. It also uses
* CharSequences rather than allocating new String objects.
*/
public class Split {
/**
* String splitter, this fixes the problem that String.sp... |
B10485 | B13039 | 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... |
public class RecycledNumbers {
public RecycledNumbers() {
}
public int sumOfDigit (int x)
{
int sum = 0;
while (x >0)
{
sum+=x%10;
x /=10;
}
return sum ;
}
String n ;
String m ;
String temp1_1 ;
public boolean Recycled(int x,int y,int begin) // y > x
{
if (x == y)
return false ;... |
B12941 | B10335 | 0 | package com.menzus.gcj._2012.qualification.c;
import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;
public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
public CProcessorFactory(Str... | import java.io.BufferedReader;
import java.io.IOException;
public abstract class SolverModule {
public StringBuilder process(BufferedReader in, StringBuilder builder)
throws IOException {
in.readLine();
String line = in.readLine();
int count = 1;
while (line != null) {
line = processLine(line);
appe... |
A13029 | A12304 | 0 | import java.util.List;
public class Case implements Runnable {
private int id;
private String output;
private int n;
private int s;
private int p;
private List<Integer> g;
public Case(int id) {
this.id = id;
}
public Case(int id, int n, int s, int p, List<Integer> g) {
super();
this.id = id;
this... | import java.util.*;
public class Dancing {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int lines = sc.nextInt();
for (int i=0; i<lines; i++) {
int n = sc.nextInt();
int s = sc.nextInt();
int p = sc.nextInt();
int rNormal = p;
int rSurprise = p;
if (p>1) {
... |
A20382 | A21562 | 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.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
public class Dancing {
public static void main(String[] args){
Dancing d = new Dancing();
try{
// Open the file that is the first
// command line parameter
FileInputStr... |
A21557 | A20422 | 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) ... | package ulohy;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Codejam_2 {
static byte cases;
static int[] googlers = new int[100];
static int[] supr_triplets = new int[100];... |
B21752 | B20982 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | //package com.GoogleCodeJam.y2012.Qualification.RecycledNumbers;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumbers {
public static void main(Stri... |
B10155 | B11711 | 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.google.codejam._2012;
import java.io.File;
import java.util.HashSet;
import java.util.Scanner;
public class RecycledNumbers
{
private void setup()
{
}
public void solveCases() throws Exception
{
setup();
Scanner s = new Scanner(new File("./input/C-small-atte... |
B21207 | B21325 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycle;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
/**
*
* @author ALEX
*/
public class Recycle {
/**
* @param args the com... |
B21049 | B21451 | 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.*;
public class Recycle {
public void cal(String filename) throws NumberFormatException, IOException
{
BufferedReader in = new BufferedReader(new FileReader(filename));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("bar.txt")));
int count = 1;
String s = in.readLine();
... |
A22992 | A21721 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | package qualification_round;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class A_sl_Dansing {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
Scanner inp = new Scanner(new FileInputStream("A... |
B12082 | B11460 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
/**
*
* @author Chadi
*/
class TestCase {
int A;
int B;
public TestCase() {
}
public in... |
A20119 | A20787 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | package quals;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Dancing {
public static void main(String args[]) {
try {
System.setIn(new FileInputStream("B-large.in"));
Scanner scanner = new Scanner(System.in);
int testCases = scanner.nextInt(... |
B21968 | B21734 | 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.*;
import java.util.*;
public class QualC {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int z = Integer.parseInt(br.readLine());
int[] ten = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000};
for(i... |
B21270 | B20146 | 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... | // usage: java c infile > outfile
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Set;
import java.util.HashSet;
public class c
{
public static void main(String[] args) throws Exception
{
String infile = args[0];
BufferedReader reader = new BufferedReader(new FileReader(infile));
... |
A22992 | A20370 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Dancing {
private static BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(System.in));
public static void main(String[] args) throws IOException {
String ... |
A20261 | A20477 | 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 dance;
import java.util.*;
public class dance {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int T = input.nextInt();
for(int l=0;l<T;l++){
int n = input.nextInt();
int s = input.nextInt();
int p = input.nextInt();
int t[] = new int[n];
int score[][] = ... |
B11696 | B11884 | 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.FileOutputStream;
import java.io.FileReader;
@SuppressWarnings("CallToThreadDumpStack")
public class Utils
{
private static FileOutputStream outStream;
private static BufferedReader reader;
private static boolean debug = false;
public static void openOutFi... |
B11696 | B10679 | 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.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Scanner;
public class GCJ12QRC
{
private static int a, b, d;
private static long c;
private static String output, newline = System.getProperty("line.separator");
public static void fun()... |
A20261 | A23083 | 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 codejam2012.qr.dancing;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author fedez
*/
public class DancerSolver
{
private static Logger logger = Logger.getLogger(DancerSolver.class.getName());
public static int solve(in... |
A12846 | A13218 | 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.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class dancers {
/**
* @param args
*/
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new File... |
B21968 | B22067 | 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.*;
import java.util.*;
public class ReNum {
static BufferedReader br;
static PrintWriter pw;
public static void main(String args[]) {
try {
br = new BufferedReader(new FileReader("C-large.in"));
pw = new PrintWriter(new File("ReNumAns.out"));
String no = br.readLine();... |
B20856 | B22164 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Happy;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;
import java.util.Arrays.*;
import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStreamReader;
//... |
import java.io.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-large.in");
Buffer... |
A11277 | A12290 | 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.*;
class QB{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int kase = sc.nextInt();
for(int k = 1; k<=kase; k++){
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt();
int[] tots = new int[N];
for(int i = 0; i<N; i++)tots[i] = sc.nextIn... |
A21557 | A20614 | 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.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;
//Importing Java.io package classes to perform file management operations
//DANCE OF GOOGLERS
public class Da... |
B21790 | B20384 | 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.File;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Scanner;
public class Recycled {
public static Integer reorder(int n) {
int newn = n, digits = 0, greatest = 0, scale = 1;
while (newn > 0) {
newn /= 10;
digits++;
scale *= 10;
}
scale /= 10;
int temp = 0... |
A10996 | A10267 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | import java.io.*;
import java.util.StringTokenizer;
public class Dancing {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new FileReader("B-small-attempt0.in"));
PrintWriter out = new PrintWriter(new FileWriter("B-small-attempt0.out"));
... |
B12941 | B12584 | 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 com.ignaciobona.codejam.practice.problema;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.HashMap;
public class Solver {
public s... |
B21968 | B20329 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import javax.security.auth.x500.X500Principal;
public class Recycl... |
A22191 | A22065 | 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 hk.polyu.cslhu.codejam.solution.impl;
public class AlienLanguage {
}
|
B10361 | B10265 | 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 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(... |
A22378 | A21716 | 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.ArrayList;
import java.util.List;
import java.util.Scanner;
public class DancingWithTheGooglers {
private int calc(){
return 0;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int total = in.nextInt();
int totGooglers = 0;
int totStriplets = 0;
int... |
A11277 | A12063 | 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 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;
public class MyUtil {
public static BufferedReader getReader(String filename){
try {
return new BufferedReader(ne... |
A22992 | A22169 | 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.awt.geom.Point2D;
import java.text.*;
import java.math.*;
import java.util.*;
public class Main implements Runnable {
final String problem = "B";
// final String filename = problem + "-sample";
// final String filename= problem+"-small-attempt0";
// final String filename= problem+"-... |
B10149 | B10326 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
public class CodeJam
{
private Set<Integer> generateCombination(Inte... |
B11696 | B10021 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class InputReader {
private BufferedReader br = null;
public InputReader(String fileName) {
try {
br = new BufferedReader(new FileReader(fileName));
}... |
A11201 | A10209 | 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.*;
public class gcj2 {
static int T; // tesztesetek száma
static int N[]; // Googlerek számai
static int S[]; // meglepŠtripletek száma
static int p[]; // pék
static int total[][]; // összpontszámok
static int tripletek[][];
static void beolvas (String f) throws IOException {
Buffer... |
B12115 | B10387 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class Prob3 {
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException {
Scanner scan = new Sc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.