F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B21207 | B22008 | 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.BufferedWriter;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
pu... |
A11502 | A12105 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | package Googlers;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.LinkedList;
import java.util.Scanner;
import exoD.Ray;
public class googlers {
static void print(int nbCases, int N, int S, int P, int[] T) {
System.out.print(N + " ");
System.out.print(S + " ");
System.out.print(P)... |
B21207 | B20542 | 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.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
class Factory implements TestCaseFactory {
@Override
public TestCase getInstance(int number) {
return new RecycledNumbers(number);
}
}
public class RecycledNumbers extends TestC... |
B11361 | B11146 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
class Solution {
private final String FILE_IN = "C-small-attempt0.in";
private final String FILE_OUT = "C-small-attempt0.out";
private final Scan... |
A10699 | A12930 | 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 google.loader;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
public class ChallengeLoader {
private List<Challenge> challenges;
private final ChallengeReader reader;
public ChallengeLoader(ChallengeReader reade... |
B10231 | B12918 | 0 | import java.io.*;
class code1
{
public static void main(String args[]) throws Exception
{
File ii = new File ("C-small-attempt1.in");
FileInputStream fis = new FileInputStream(ii);
BufferedReader br = new BufferedReader(new InputStreamReader (fis));
int cases = Integer.parseInt(br.readLine());
FileOutput... | package com.google.code.p_c;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Main {
private static final String fromFile = "D:\\hobbies & work\\programing\\CodeJamT... |
B21752 | B21257 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.qualification.recyclednumbers;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import util.BaseResolver;
import util.Util;
/**
*
* @author bohmd
*/
public class RecycledNumbers... |
B22190 | B20569 | 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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main_Recycled {
static int a,b;
public static void main(String[] args)throws Exception {
File _=new File("recycled.in");
BufferedReader br=_.exists()? n... |
B10245 | B10951 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C {
public static void readFile() throws FileNotFoundException {
File f = new File("C-small.in");
Scanner in = new Scanner(f);
PrintWrite... |
A20261 | A21772 | 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.*;
public class B
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int test = 1, cases = sc.nextInt();
int n, s, p, g, score, count, even, extra;
while(test <= cases)
{
count = 0;
n = sc.nextInt();
s = sc.nextInt();
p = sc.nextInt();
for(g = ... |
B21207 | B21291 | 0 | /*
* Problem C. Recycled Numbers
*
* Do you ever become frustrated with television because you keep seeing the
* same things, recycled over and over again? Well I personally don't care about
* television, but I do sometimes feel that way about numbers.
*
* Let's say a pair of distinct positive integers (n, m) ... | import java.io.File;
import java.io.IOException;
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(new File("c:\\eclipse\\3\\C-large.in"));
int numTc = scanner.nextInt();
for (int index = 0; index < n... |
B21968 | B20263 | 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.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;
class IntegerPair implements Comparable<IntegerPair> {
int a, b;
IntegerPair(int a, int b) {
this.a = ... |
B10149 | B12588 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.util.*;
import java.io.*;
public class Recycled {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int cases = in.nextInt();
for (int i = 1; i<=cases; i++) {
int n = in.nextInt();
int m = in.nextInt();
int count = 0;
for (int b = m; b>n; b--) {
for (int... |
B11696 | B10234 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.util.Scanner;
public class C2 {
/**
* @param args
*/
public static void main(String[] args) {
new C2();
}
int a, b, nbrDigits;
// All numbers that we have already seen
boolean[] seen;
C2() {
Scanner sc = new Scanner(System.in);
int nbrCases = sc.nextInt();
for (int i ... |
A20261 | A20634 | 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 google2012;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
*... |
A21010 | A22045 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
public class Codejam2Test {
static BufferedReader stdin;
static BufferedWriter stdout;
ArrayList<String> list;
public static void main(Stri... |
A10699 | A13000 | 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 qualification.q2;
import qualification.common.InputReader;
import qualification.common.OutputWriter;
import qualification.q1.Q1Solver;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 18:55
* To change this template use File | Settings | File Templates.
*/
public class Q2Sim {
... |
A13029 | A11640 | 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 exercicio.b;
import java.awt.List;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class ExerciocioB {
public static void main(String args[]) throws IOException {
... |
B12085 | B11528 | 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 qualification;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class ProblemC {
public static int solve(int A, int B){
int count = 0;
for (int i = A; i <= B; i++){
String number = String.valueOf(i);
String s = number... |
B10899 | B11734 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
public class ReadFile {
public static void main(... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test3;
import java.io.*;
import java.util.LinkedList;
import java.util.Scanner;
/**
*
* @author Student
*/
public class Test3 {
public static int rotations(int number, int max) {
int l = 0;
... |
A11135 | A13090 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | package y2012.quals;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class B {
public static void main(String[] args) throws FileNotFoundException {
Scanner in = new Scanner(new File("B.in"));
PrintWriter out = new PrintWriter(new File("B.ou... |
A12846 | A12099 | 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.*;
class Main
{
public static int dance(int ll,int spp,int maxx,int g[])
{
int c=0;
int l=ll;
long result[][]=new long[l][4];
int max=maxx;
//int g[]={15,13,11};
int s=0;
int i=0;
int sum=0;
int flag=0;
int t=2;
int presp=spp;
int special=0;
int sp=0;
int sol=0;int maxsol=0;int row=0;
int sum2=0;
boolea... |
A12570 | A12043 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | package jp.funnything.competition.util;
import java.util.Arrays;
import java.util.Iterator;
/**
* Do NOT change the element in iteration
*/
public class Permutation implements Iterable< int[] > , Iterator< int[] > {
public static int[] fromNumber( long value , final int n ) {
final int[] data = new int[... |
B10361 | B12732 | 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.*;
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... |
B10155 | B13193 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
/**
*
* @author eblanco
*/
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
impo... | import java.util.ArrayList;
import java.util.Scanner;
public class Prob3 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
scan.nextLine();
for(int... |
A11917 | A12438 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | import java.util.Scanner;
public class dance {
public static void main(String... args){
Scanner in = new Scanner(System.in);
int cases = in.nextInt();
int[] counts = new int[cases];
for(int i = 0;i<cases;i++){
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int sUsed = 0; // ... |
B11327 | B12349 | 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 googlecodejam;
import java.io.*;
import java.util.HashSet;
public class Qualification_C {
private static String inFile = "C://CodeJam/QCin.txt";
private static String outFile = "C://CodeJam/QCout.txt";
private static BufferedWriter writer;
public static void main(String[] args) {
try{
writer = new ... |
A21557 | A22851 | 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.awt.Polygon;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
... |
B12941 | B11253 | 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.*;
import java.util.*;
class CodejamC {
public static int power[];
public static void main (String [] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("E:/C-small-attempt0.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("... |
A10568 | A10327 | 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 codejam.dancing_with_the_googlers;
import java.io.IOException;
import java.util.ArrayList;
import codejam.filestuff.FileStuff;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
FileStuff fs = new FileStuff("B-small-attempt2.in","B-small.out","dancing_with_... |
B21968 | B20127 | 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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class RecycledNumbers {
public static void main(Stri... |
A12846 | A10850 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Collections;
import java.util.Scanner;
import java.util.Vector;
public class pbB {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(new FileReader("test.in"));... |
B10485 | B11370 | 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... | import java.io.*;
public class C {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int T;
T = Integer.parseInt(reader.readLine());
for (int i = 1; i <= T; i++) {
String[] input = reader.rea... |
B12941 | B13253 | 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.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
class Algorithm{
int A;
int B;
int half;
ArrayList<Key> map;
int counter;
public Algorithm(String line){
Scanner scan = new Scanner(line);
A = scan.ne... |
B12762 | B12688 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package gcj2012;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class RecycledNumbers {
private static final class IntPair {
Integer a, b;
IntPair(Integer a,Integer b) {
t... |
B12762 | B10648 | 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.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Charsets;
import com.google.common.base.Predicate;
import com.g... |
B21968 | B20509 | 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.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.HashSet;
import java.util.Set;
p... |
A11201 | A12919 | 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 google.solver;
import google.loader.ChallengeLoader;
import google.loader.ChallengeReader;
import java.io.FileInputStream;
import java.util.Properties;
public class Solver implements ChallengeConstants{
private ChallengeReader reader;
private String inputFileName;
private String result;
private final St... |
B12669 | B11691 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.util.Scanner;
public class ProblemC {
public static int rotate(int x) {
int y = x % 10;
x /= 10;
int cd = (x + "").length();
if (x == 0) {
cd = 0;
}
y *= Math.pow(10, cd);
y += x;
return y;
}
public static String rotate(String x) {
String r = x.substring(0, 1);
if (x.length() ... |
A22378 | A20005 | 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 Main{
public static void main(String[] args) {
Scanner in= new Scanner(System.in);
int T= in.nextInt(); int n,t,s,answer=0;
for (int i = 0; i < T; i++) {
n=in.nextInt(); t=in.nextInt(); s=in.nextInt();
for (int j = 0; j < n; j++) {
int x=in.nextInt(); int nashti... |
B22190 | B20069 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
public class Recycled {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Recycle;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;
/**
*
* @author hemal
*/... |
A10699 | A10037 | 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.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Unsuppo... |
A12273 | A10695 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.text.MessageFormat;
import java.util.Map;
import java.util.Scanner;
public class QualQ2 {
private final Scanner inputScanner = new Scanner(System.in);
private Scanner testCaseScanner;
private int answe... |
A22642 | A20692 | 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.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
public class DancingWithTheGooglers {
private Da... |
A21010 | A20927 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package main;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader... |
B12941 | B10655 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeSet;
/*
* To change this template, choose Tools | Templates and open the template in
* the editor.
*/
/**
*
* @author Charles
*/
public class Recycled... |
A11135 | A10956 | 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.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Scanner;
public class QB2012 {
public static void main(String[] args) th... |
A22642 | A22344 | 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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chung Lee
*/
public class DanceGoog... |
A22378 | A22494 | 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... | package com.kiwien.google;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.A... |
B12082 | B10859 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | package be.mokarea.gcj.recyclednumbers;
import be.mokarea.gcj.common.TestCase;
public class RecycledNumbersTestCase extends TestCase {
private final int a;
private final int b;
protected RecycledNumbersTestCase(int caseNumber, int a, int b) {
super(caseNumber);
this.a = a;
this.b = b;
}
public int getA(... |
A22360 | A21293 | 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 ... |
public class DeTerminator {
public DeTerminator(){ }
public int determine(String[] inputArray){
int numGooglers = Integer.parseInt(inputArray[0]);
int allowableSurprising = Integer.parseInt(inputArray[1]);
int bestScore = Integer.parseInt(inputArray[2]);
int surprising = 0;
int notSurprising = 0;
int ... |
B12570 | B11843 | 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 info.m3o.gcj2012.recyclednumber;
import java.util.TreeSet;
//import java.util.HashSet;
public class MyNumberStringPairSet extends TreeSet<MyNumberStringPair> {
/**
*
*/
private static final long serialVersionUID = 1L;
}
|
A10793 | A11229 | 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 qualifyingRound;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class DancingWithGooglers {
public static void main (String [] args) throws FileNotFoundException
{
Scanner in = new Scanner (new File ("input.txt"));
int numLines = Integer.parseInt(in.nextLine(... |
A20261 | A21661 | 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 com.google.code;
import java.io.IOException;
public class B extends GCJ {
protected B() throws IOException {
super();
}
@Override
protected void code(int count) throws IOException {
readLine();
int N = getIntInput(0);
int S = getIntInput(1);
int p = getIntInput(2);
int limitForOrdinary = ... |
B21207 | B20294 | 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.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Scanner;
import java.util.Set;
public class Numbers {
public stat... |
B10485 | B10881 | 0 |
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
import java.io.File;
import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter;
public class Recycle
{
public static void main(String[] args)
{
/* Set<Integer> perms = getPermutations(123456);
for(Integer i: p... | package de.at.codejam.util;
public interface CaseSolver<CASE> extends StatusListener {
String solveCase(TaskStatus taskStatus, CASE caseToSolve);
void addStatusListener(StatusListener statusListener);
void removeStatusListener(StatusListener statusListener);
}
|
A22992 | A21612 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package IO;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
/**
*
* @author dannocz
*/
public class InputReader {
public static Input r... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class CodeJamWriter implements ICounterZeroEvent{
//public static String inputFile = "C:\\Users\\user\\Desktop\\coejam\\2012-Qualificaton\\A-test";
//public stat... |
B11421 | B10146 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | import java.util.Scanner;
public class RecycledNumbers {
public static int Recycled(int k,int begin,int end){
int length =String.valueOf(k).length();
int inc=0;
int con=(int) Math.pow(10,length);
int div=1;
int temp;
for(int i=1;i<length;i++){
div*=10;
con/=10;
temp=(k%div)*con+(k/div);
if(t... |
A12544 | A11052 | 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.*;
import java.util.*;
public class B {
BufferedReader ins;
PrintStream outs;
static String INPUT = "B-small-attempt0.in";
static String OUTPUT;
static {
OUTPUT = "B.out";
}
public B(BufferedReader ins, PrintStream outs) {
this.ins = ins;
this.outs ... |
B11318 | B10336 | 0 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
int casos=1, a, b, n, m, cont;
while(t!=0){
a=sc.nextInt();
b=sc.nextInt();
if(a>b){
int aux=a;
a=b;
b=aux;
}
System.out.printf("Case #%d: ",casos... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class CodeJam {
private static final String FILE_NAME = "E:/workspace/codejam_module/C-small-attempt0.in";
public static void main(String[] args) throws IOException {
File f... |
A11201 | A13104 | 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 googleCodeJam;
import static java.lang.System.out;
import java.io.BufferedReader;
import java.io.FileReader;
public class DancingWithTheGooglers {
private static final int MAXN = 128;
private static int inc0(int num, int p) {
if (num == 0) {
return (p == 0) ? 1 : 0;
}
int t = num / 3... |
B12085 | B12831 | 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 com.cj.rn;
import com.cj.utils.*;
import java.io.*;
import java.util.Scanner;
public class RecycledNumbers {
int from;
int to;
public String getResult(int caseNo, int from, int to){
int tempFrom = from;
int result = 0;
while(tempFrom<to){
for(int count=1;(tempFrom+count)<=to;count++){
int n =... |
A12211 | A12543 | 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 problem1;
import java.io.*;
import java.util.IllegalFormatException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
/**
* TextIO provides a set of static methods for reading and writing text. By default, it reads
* from st... |
B20023 | B20139 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author GERALD
*/
publi... |
A10568 | A10024 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class DancingWithTheGooglers {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader (new... | import java.util.ArrayList;
import java.util.HashSet;
public class DancingWithTheGooglers {
private static String inputFile = "C:\\PERSONAL-WORKSPACE\\GCJ-2012\\src\\input-output\\Input.txt";
private static String outputFile = "C:\\PERSONAL-WORKSPACE\\GCJ-2012\\src\\input-output\\Output.txt";
public static void main(... |
A11917 | A13021 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | package com.google.codejam.googlers;
import java.util.List;
/**
* Main class used for DancingWithGooglers.
* @author Sushant
*/
public class DancingWithGooglers {
/**
* Main method from where application start execution.
*
* @param args String []
*/
public static void main(final String[... |
B12570 | B10497 | 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 QualifiactionRound;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class RecycledNumbers {
/**
* @param args
*/
public static void wr... |
A12846 | A12858 | 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.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.Arrays;
public class Dancing {
public static void main(String[] args) throws IOException {
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
String x... |
A12460 | A10402 | 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.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class B {
public static void main(String ... args) throws Exception{
Scanner in = new Scanner(new File("B-small-attempt0.in"));
PrintStream out = new PrintStream(new File("B-small-attempt0.out"));
... |
A21557 | A21781 | 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.*;
import java.util.*;
public class b{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int tc = 1; tc <= t; tc++){
int n = sc.nextInt(), s = sc.nextInt(), p = sc.nextInt(), r = 0;
int mn = p + (Math.max(0,p-1)<<1), ms = p + (Math.max(0,p... |
A11917 | A10515 | 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 _2012_qual;
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class B {
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(... |
A11135 | A10405 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | package 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... |
B20006 | B21346 | 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 codejam2012.qualification;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class ProblemC {
public static void main(String[] args) throws Exception {
System.setIn(new File... |
B10155 | B12339 | 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 test;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class testapp {
/**
* @param args
*/
public static void main(String[] args) {
StringBuilder contents = new StringBuilder();
int totalCase=0;
int aVar[]=null,bVar[... |
A10996 | A10427 | 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 MyAllgoritmicLib;
import java.util.ArrayList;
public class Dejkstra {
// ---------------------------------------------------------------------------
// Àëãîðèòì Äåéêñòðû.ïîèñêà êðàò÷àéøåãî ïóòè
int v;
int infinity=Integer.MAX_VALUE; // Áåñêîíå÷íîñòü
int p= 6; // Êîëè÷åñòâ... |
A10699 | A10217 | 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) ... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj.base;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamRe... |
A21010 | A22663 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | package birgit.vera.schmidt.googlecodejam2012.qual;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
public class B {
public static void main(String[] args) {
try {
String filename = "B-l... |
B12669 | B12993 | 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 mgg.utils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
/**
* @author manolo
* @date 13/04/12
*/
public class CombinatoryUtils {
public static List<Integer> findAddingCombination(int total,
List<Integer> listOfNumbers) {
ArrayList<Integer> solution = new ArrayList<I... |
B21790 | B22201 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
/**
*
*... |
B20023 | B21531 | 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.*;
public class QC {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[][] ROT = new int[2000001][7];
for(int i=1; i<=2000000; i++) {
int A = i;
int pow10 = 1;
while(A > 0) { pow10*=10; A/=10; }
pow10 /= 10;
A = i;
int ix = 0;
do {
if(A <... |
B11696 | B10252 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recycled;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util... | import java.util.Scanner;
import java.io.File;
public class Main{
public static void main(String[] args) throws Exception{
Scanner s = new Scanner(new File("C-small-attempt0.in"));
int test = Integer.parseInt(s.nextLine());
for(int i=1; i<=test; i++){
int a = s.nextInt();
... |
B12570 | B11524 | 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 wangshu.codejam.google.com;
import java.io.File;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.Scanner;
import java.lang.*;
public class QC {
public static long calculateNumber(int A, int B){
int size = B-A+1; // Number of integers between A and B
int A1; // Auxiliary variabl... |
A20730 | A22286 | 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.BufferedInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
public class Main {
public static void solve() throws Exception{
int T = in.readInt(),t = 0;
String format = "Case #%d: ";
int N,S,p,a,count;
while(t++<T){
... |
A20382 | A22566 | 0 | package dancinggooglers;
import java.io.File;
import java.util.Scanner;
public class DanceScoreCalculator {
public static void main(String[] args) {
if(args.length <= 0 || args[0] == null) {
System.out.println("You must enter a file to read");
System.out.println("Usage: blah <fil... | package qualifying;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class B {
public static String solve(int N, int S, int p, int[] t) {
int cnt = 0;
for(int i=0; i<t.length; i++) {
if(t[i]>=2*Math.max(p-1,0)+p) cnt++;
if(t[i... |
A21396 | A21980 | 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.*;
class B{
public static void main(String... arg){
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();
for(int caseNo = 1; caseNo <= cases; caseNo++ ){
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt();
int[] t = new int[N];
int n = 0;
for(... |
B20006 | B21751 | 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 qualification.p3;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashSet;
public class RecycledNumbers
{
private static void calculate( String testCase, BufferedWriter bw, int n ) throws Exception
{
... |
B21227 | B20107 | 0 | import java.util.HashSet;
import java.util.Scanner;
public class C {
static HashSet p = new HashSet();
static int low;
static int high;
int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int no = sc.nextInt();
for (int i = 1; i <= no; i++) {
p.clear();
lo... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;... |
B20566 | B21597 | 0 | import java.util.Scanner;
import java.io.*;
import java.lang.Math;
public class C{
public static int recycle(String str){
String[] numbers = str.split(" ");
int min = Integer.parseInt(numbers[0]);
int max = Integer.parseInt(numbers[1]);
int ret = 0;
for(int i = min; i < max; i++){
String num = i + "";
... | package com.brootdev.gcj2012.common;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
public class DataUtils {
public static long readLongLine(BufferedReader in) throws IOException {
return Long.valueOf(in.readLine());
}
public static long[] readLongsArrayLi... |
B12082 | B10619 | 0 | package jp.funnything.competition.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.apache.commons.io.IOUtils;
public class QuestionReader {
pr... | package ProblemSolvers;
import CaseSolvers.RecycledNumbersCase;
public class RecycledNumbers extends ProblemSolver {
public RecycledNumbers(String filePath) {
super(filePath);
}
@Override
public void process() {
cases = io.readInt();
for (int i = 1; i <= cases; i++) {
new RecycledNumbersCase(i, 1, io)... |
A13029 | A12111 | 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 code12;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.List;
public class Googlers {
public static void main(String[] args) {
try {
BufferedReader fileGoo = new BufferedReader(new FileReader("B-small-attempt5.in"));
... |
A21010 | A20140 | 0 | package codejam;
import fixjava.Pair;
public class Utils {
public static long minLong(long firstVal, long... otherVals) {
long minVal = firstVal;
for (int i = 0; i < otherVals.length; i++)
minVal = Math.min(firstVal, otherVals[i]);
return minVal;
}
public static int minInt(int firstVal, int... otherVals... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/*
* Google Code Jam 2012
* Qualification 2012
* raguenets@gmail.com
* Usage : java DancingWi... |
B12762 | B12212 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | package hk.polyu.cslhu.codejam.lib;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
public class ResultCollector {
public static Logger logger = Logger.getLogger(ResultCollector.class);
public static S... |
B21790 | B21137 | 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.util.*;
import java.io.*;
public class qualC
{
public static void main(String[] args) throws IOException
{
Scanner sin = new Scanner(new File("/Users/G/Documents/Programming/Java/CodeJam2012/C-large.in"));
int t = sin.nextInt(), a, b;
for(int i = 1; i <= t; ++i)
{
a = sin.nextInt();
b = ... |
A20119 | A21554 | 0 | package code12.qualification;
import java.io.File;
import java.io.FileWriter;
import java.util.Scanner;
public class B {
public static String solve(int N, int S, int p, int[] t) {
// 3a -> (a, a, a), *(a - 1, a, a + 1)
// 3a + 1 -> (a, a, a + 1), *(a - 1, a + 1, a + 1)
// 3a + 2 -> (a, a + 1, a + 1), *(a,... | import java.util.Scanner;
import java.io.File;
public class ScoreAnalyzer
{
public void analyzeInputFile(String fileName) throws Exception
{
Scanner fileScanner = new Scanner (new File (fileName) );
String line;
line = fileScanner.nextLine();
int numberOfTestCases = Inte... |
B10245 | B11258 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package recyclednumbers;
import java.util.HashSet;
/**
*
* @author vandit
*/
public class RecycleNumbers {
private HashSet<String> numbers = new HashSet<String>();
private HashSet<String> initialTempNumbers... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam2012;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWr... |
B10245 | B12027 | 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 codejam2012;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintStream;
public class ProblemC
{
public static void main(String[] args) throws Exception
{
BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintStream out = System.out;
out = new PrintStream("ou... |
B12115 | B10354 | 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();
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.File;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeMap;
/**
*
* @author Ben
*/
public class Main {
public static Scann... |
A12846 | A12583 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam.common;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Lance Chen
*/
public class CodeHelper {
private static String FILE_ROOT = "D:/workspace/googlecodejam/meta";
publi... | public abstract class JamCase {
int lineCount;
}
|
A12273 | A10883 | 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.util.ArrayList;
import java.util.List;
public class Dancers implements Solver {
int N;
int S;
int p;
List<Integer> dan = new ArrayList<Integer>();
public Dancers(List<String> lineas) {
String[] cosa = lineas.get(0).split(" ");
N=Integer.parseInt(cosa[0]);
S=Integer.parseInt(cosa[1]);
p=Int... |
A20382 | A21980 | 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.*;
class B{
public static void main(String... arg){
Scanner sc = new Scanner(System.in);
int cases = sc.nextInt();
for(int caseNo = 1; caseNo <= cases; caseNo++ ){
int N = sc.nextInt();
int S = sc.nextInt();
int p = sc.nextInt();
int[] t = new int[N];
int n = 0;
for(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.