F1 stringlengths 6 6 | F2 stringlengths 6 6 | label stringclasses 2
values | text_1 stringlengths 149 20.2k | text_2 stringlengths 48 42.7k |
|---|---|---|---|---|
B12762 | B12102 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
/**
*
* @author imgps
*/
public class C {
public static void main(String args[]) throws Exception{
int A,B;
int ctr ... | import java.util.Scanner;
import java.io.*;
public class Recycled {
public static void main(String[] args) throws FileNotFoundException, IOException {
Scanner input = new Scanner(new File(args[0]));
Scanner lin;
int lines = 0;
if (input.hasNextInt()) {
lines = input.nextInt();
input... |
A20119 | A20710 | 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.*;
import java.io.*;
public class ProblemB {
final long MOD = 1000003;
final int MAX_LEN = 500000;
long pow(long x, long y) {
if (y == 0) return 1;
long res = pow(x, y/2);
res = (res * res) % MOD;
if (y % 2 == 1) res = (res * x) % MOD;
return res;
}
long inv(long x) {
return pow(x, ... |
B21752 | B20091 | 0 | package Main;
import com.sun.deploy.util.ArrayUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
/**
* Created with IntelliJ IDEA.
* User: arran
* Date: 14/04/12
* Time: 3:12 PM
* To change ... | import java.io.*;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;
public class C implements Runnable {
private static final String PROBLEM_ID = "C";
private class TestCaseRunner {
int answer(int a, int b) {
int result =... |
A10996 | A11997 | 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.util.Scanner;
import java.io.*;
public class Dancing {
public static void main(String [ ] args) throws Exception{
Scanner in = new Scanner(new File(args[0]));
PrintStream Output = new PrintStream(new FileOutputStream("soluzione.txt"));
int n = in.nextInt();
for(int i = 1; i <= n; i++){
int tot,... |
B10361 | B13037 | 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());... | public class Recycle extends CodeJam{
public Recycle() {
super("C-small-attempt0");
}
public static void main(String[] args) {
//long t = System.currentTimeMillis();
new Recycle().run();
//System.out.println(System.currentTimeMillis() - t);
}
private int[][] nm... |
A11135 | A12479 | 0 | /**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 3/3/12
* Time: 11:00 AM
* To change this template use File | Settings | File Templates.
*/
import SRMLib.MathLibrary;
import SRMLib.TestSRMLib;
import com.sun.org.apache.bcel.internal.generic.F2D;
import java.io.*;
import java.util.*;
import java.uti... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Dancing {
public static void main(String[] ar... |
B10858 | B10183 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| import java.io.*;
import java.util.StringTokenizer;
import java.lang.Math;
public class qualifycodejamC{
public static int checkNum(int num, int m, int n){
String snum = Integer.toString(num);
int[] array = new int[snum.length()];
int min = num;
int count = 0;
for(int i=0;i<array.length;i++){
boo... |
A22191 | A21668 | 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 codejam.dancing;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static int suprising, minScore;
public static void main(String[] args){
try {
// ... |
B10245 | B12344 | 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.*;
public class recycled {
private boolean compare(String s1, String s2){
String s3 = s2+s2;
boolean result = s3.contains(s1);
return result;
}
private void go() throws Exception {
File infile = new File("C-small-attempt1.in");
BufferedReader br = new BufferedReader(new InputStreamReader(
... |
B12115 | B12776 | 0 | package qual;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) {
new RecycledNumbers().run();
}
private void run() {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int t = 0; t < T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class CMain {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[... |
B13196 | B12764 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Q3M {
public static void main(String[] args) throws Exception {
compute();
}
private ... |
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chamika
*/
public class GRecycle {
public static void main(String[] args) {
Scanner s = new Scanner(System... |
B12085 | B11267 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.lang.String;
public class D
{
public static void solve() throws Exception
{
int I,c=0;
int l=0;
String y="";
String cmp ="";
... |
B11327 | B11923 | 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 net.jbirch.gcj12qual.util;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Scanner;
/**
*
* @author Birch
*/
public class FileLoader {
protected String filename;
protected InputStream stream;
protected Scanner scanner;
pub... |
A22771 | A22248 | 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.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
public class Prob1B {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("B-large.in"));
PrintWriter pw = new PrintWriter(new FileWriter("... |
B10899 | B10240 | 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.io.*;
public class RecycledNumbers {
public static void main(String[] args) {
BufferedReader reader = null;
PrintWriter writer = null;
try {
reader = new BufferedReader(new FileReader(new File("src/C-small-attempt0.in")));
writer = new PrintWriter(new B... |
B21049 | B21996 | 0 | package it.simone.google.code.jam2012;
import java.util.HashSet;
import java.util.Set;
public class RecycledNumber implements GoogleCodeExercise {
int a = 0;
int b = 0;
Set<Couple> distinctCouple = null;
long maxTime = 0;
private class Couple {
int x = 0;
int y = 0;
public Couple(int x, int y) {
this... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
public class Recycled {
static int no_Test_Cases =0; //number of test cases
static String input_Array[]; //to read inpu... |
B21207 | B20607 | 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.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws Exception{
long tIni=System.currentTimeMillis();
Scanner s=new Scanner(new File("./data/C.txt"));
PrintWriter pw=new PrintWriter(new File("./data/C_... |
B10702 | B10200 | 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.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Q3 {
public static void main (String[] args)
{
Scanner s = new Scanner(System.in);
int numTests = s.nextInt();
for (int test = 0; test < numTests; test++)
{
int a = s.nextInt();
int b = s.nextInt();
int count = ... |
A10793 | A12168 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class DancingWithTheGooglers {
/**
* @param args
*/
public static void main(String[] args) {
File file = new File("data/B-small-attempt0.in");
try {
Scanner ... |
B10858 | B13099 | 0 | package be.mokarea.gcj.common;
public abstract class TestCaseReader<T extends TestCase> {
public abstract T nextCase() throws Exception;
public abstract int getMaxCaseNumber();
}
| import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.LinkedList;
import java.util.Scanner;
public class Recycled {
public static void main(String[] args) throws IOException {
Scanner s = new Scanner(new File("io/recycled-biga.in"));
FileWriter fw = new FileWriter(new File(... |
B12570 | B12189 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package google;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Set;
import java.util.StringTokeniz... |
B11327 | B13228 | 0 | package recycledNumbers;
public class OutputData {
private int[] Steps;
public int[] getSteps() {
return Steps;
}
public OutputData(int [] Steps){
this.Steps = Steps;
for(int i=0;i<this.Steps.length;i++){
System.out.println("Test "+(i+1)+": "+Steps[i]);
}
}
}
| import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
public class ProblemC {
/**
* @param args
*/
public static void main(String[] args) {
BufferedReader br = null;
BufferedWriter bw = null;
Str... |
B11327 | B11801 | 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 util;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author bohmd
*/
public abstract class BaseResolver {
private final Stri... |
A22078 | A21722 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.*;
import java.util.Arrays;
import java.util.Comparator;
public class Qualify {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new FileReader(new File("B-small-attempt3.in")));
int cases = Integer.parseInt(reader.readLine());
for (int d = 0; d < ca... |
A10793 | A12270 | 0 | import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
public class b {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int T = sc.nextInt();
for (int casenumber = 1; casenumber <= T; ++casenumber) {
... | import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;
public class Solution {
static final boolean DBG = false;
// x x x s= 3x
// x x x+1 s= 3x +1
// x x x-1 s= 3x -1
// x x+1 x+1 s= 3x +2
// x x-1 x-1 s= 3x-2
public static void main(String[] args) {
... |
A20730 | A21524 | 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.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
public class Dancers {
/**
* @param args
*/
private static Hashtable<Integer, int[]> ns = new Hashtable<Integer, int[]>();
private static Hashtable<Integer, int[]> s = new Hashtable<Integer, int[]>();
p... |
B10485 | B11740 | 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.util.*;
import java.io.*;
public class recycle {
public static int[] pow10 = {1,10,100,1000,10000,100000,1000000,10000000};
public static void main(String[] args) throws Throwable {
Scanner input=new Scanner(new File("recycle.in"));
PrintWriter out=new PrintWriter(new File("recycle.out"));
int ... |
B12074 | B13025 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
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 QualificationC {
public static void main(String[] args... |
A11502 | A11904 | 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 qualitfy;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Test {
public static void main (String args[]) throws FileNotFoundException {
Scanner in = new Scanner(new File ("src//qualitfy/input.in"));
int T = in.nextInt();
for (int i = 0; i < T; i++) {
... |
B12085 | B11067 | 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 fixjava;
public class IntegerMutable {
int value;
public IntegerMutable(int value) {
this.value = value;
}
public IntegerMutable() {
this(0);
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
/** Inc and return new value (threadsafe) */
p... |
B10245 | B11060 | 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 fixjava;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.Map.Entry;
public class HashMapDualKey<K1, K2, V> extends HashMap<K1, HashMap<K2, V>> {
private static final long serialVersionUID = 1L;
/** Returns whether the dual map contains ... |
B10149 | B10020 | 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.ArrayList;
public class SpeakingInToungues {
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(String[] args) {
InputReader ... |
B10899 | B11220 | 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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.*;
public class jam3 {
/**
* @param args
*/
static int chuli(String s)
{
in... |
B20424 | B20077 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
try {
inputStream = new FileInputStream("c.in");
outputStream = new FileOutputStream("c.out");
} catch (File... |
A20119 | A21013 | 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 qualifiers.dancing;
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
{
public static void main(String[] args)
{
try
{
FileReader fileR... |
A12570 | A10732 | 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 dancingWithTheGooglers;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
import java.util.Arrays;
import java.util.Scanner;
public class DancingWithTheGooglers {
public static String processa... |
A12570 | A12825 | 0 | package util.graph;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Set;
public class DynDjikstra {
public static State FindShortest(Node start, Node target) {
PriorityQueue<Node> openSet = new PriorityQueue<>();
Set<Node> closedSet = new HashSet<>();
openSet.add... | import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Second {
int surprises;
boolean isSurprisesLeft = false;
int min;
int[] scores;
int result;
public Second(String[] input) {
scores = new int[Integer.valueOf(input[0])];
surprises = Integer.valueOf(input[1]);
if... |
B20424 | B20084 | 0 | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
// static int MAX = 10000;
static int MAX = 2000000;
static Object[] All = new Object[MAX+1];
static int size( int x ) {
if(x>999999) return 7;
if(x>99999) return 6;
if(x>9999) return 5;
if(x>999) retu... | import java.util.*;
class Main
{
public static void main(String[] arg)
{
Scanner in = new Scanner(System.in);
int trials = in.nextInt();
int tt = 0;
while(tt < trials)
{
int ret = 0;
int A = in.nextInt();
int B = in.nextInt();
for(int i=A; i<B; ++i)
{
String num = Integer.toString... |
A22078 | A20589 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class B{
public static void main(String []args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t, x = 0, n, s, p, ans;
t = Integer.parseInt(br.readLine());
while(t>0) {t--; x++;... |
A22378 | A22917 | 0 | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
public class CodeJam {
// public static final String INPUT_FILE_PATH = "D://CodeJamInput.txt";
public static final String INP... |
import java.io.*;
import java.util.*;
public class Dancing {
public enum Category {containsHighNotSupprising, containsHighOnlyIfSupprising, doesNotContainHigh};
public class Score {
public Score(int p, int score) {
this.score = score;
this.category = getCategoryFo... |
B11421 | B10969 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package gcj2012;
import java.io.File;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Scanner;
public class C {
static String BASEPATH = "x:\\gcj\\";
static boolean LARGE = false;
static String INPATH = BASEPATH + C.class.getSimpleName(... |
A10996 | A10841 | 0 | import java.util.Scanner;
import java.io.*;
class dance
{
public static void main (String[] args) throws IOException
{
File inputData = new File("B-small-attempt0.in");
File outputData= new File("Boutput.txt");
Scanner scan = new Scanner( inputData );
PrintStream print= new PrintStream(outputData);
... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
/**
*
* @author VISHAL
*/
public class Googlers {
public static... |
A22642 | A22180 | 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.*;
import java.util.*;
public class Java{
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new FileReader("B-large.in"));
int cases = Integer.parseInt(in.readLine());
for (int i = 1; i <= cases; i ++){
String[] temp = (in.readLine()).split(" ");
... |
B21968 | B21885 | 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.util.HashSet;
import java.util.Scanner;
public class C_Recycled {
static boolean recycled (String n, String B, String i) {
return (n.compareTo(i) < 0) && (i.compareTo(B) <= 0);
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for (int cas ... |
B11327 | B12275 | 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]);
}
}
}
| /*************************************************************************
* Compilation: javac StdOut.java
* Execution: java StdOut
*
* Writes data of various types to standard output.
*
*************************************************************************/
import java.io.OutputStreamWriter;
import j... |
B10702 | B12439 | 0 | import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Recycle {
private static HashMap<Integer, HashSet<Integer>> map = new HashMap<Integer, HashSet<Integer>>();
private static HashSet<Integer> toSkip = new HashSet<Integer>();
/**
* @param args
*/
public static void main(S... |
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Eunice
*/
public class Recycled_Numbers {
static Scanner scanner = new Scanner(System.in);
static PrintWrite... |
B20734 | B20709 | 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 ch.socaciu.andrei.codejam;
import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author Andrei Socaciu
*/
public class Recycled {
public static void main(String[] args) throws Exception {
String in = "data/Recycled-large.in.t... |
A11201 | A12826 | 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.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 FileRW {
public static List<String> readFile(String fileName) throws IOException{
List<String> lines... |
B11318 | B10477 | 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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class RecycledNumbers {
public static int len(int A){
int k = 1 ;
int r = 0;
while( k < A){
k = k * 10;
r = r + 1;
}
return r;
... |
B11696 | B11033 | 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.FileWriter;
import java.util.Scanner;
public class B {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Scanner a = new Scanner(new File("/Users/anurag/Dev/Java/workspace/CodeJam/src/input"));
FileWriter w = new FileWriter(new File("/Users/a... |
B20291 | B20137 | 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.StringTokenizer;
import java.lang.Math;
public class qualifycodejamC{
public static int checkNum(int num, int m, int n){
String snum = Integer.toString(num);
int[] array = new int[snum.length()];
int min = num;
int count = 0;
for(int i=0;i<array.length;i++){
boo... |
B10149 | B12681 | 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.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
public class main {
/**
* @param args
* @throws Exception
*/
public static int[] flag;
public static ArrayList[] array;
public static void main(String[] args) throws Exce... |
B10231 | B12776 | 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class CMain {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[... |
A11201 | A11459 | 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.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
public class source {
public static void main(String args[ ]) throws IOException {
FileInputStream fstream = new ... |
B20291 | B20735 | 0 | import java.io.*;
import java.util.*;
class B
{
public static void main(String[] args)
{
try
{
BufferedReader br = new BufferedReader(new FileReader("B.in"));
PrintWriter pw = new PrintWriter(new FileWriter("B.out"));
int X = Integer.parseInt(br.readLine());
for(int i=0; i<X; i++)
{
String[]... | package fixjava;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.util.Map.Entry;
public class CountedSet<T> implements Set<T> {
HashMap<T, Integer> map = new HashMap<T, Integer>();
private static final Integer ONE = new... |
A22360 | A22615 | 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.*;
import java.util.*;
public class Solve {
public static void main ( String[] args ) throws FileNotFoundException, IOException {
BufferedReader in = new BufferedReader( new FileReader ( args[0] ) );
BufferedWriter out = new BufferedWriter( new FileWriter ( "outfile.txt" ) );
int cases = Integer.... |
A11502 | A11852 | 0 | package template;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class TestCase {
private boolean isSolved;
private Object solution;
private Map<String, Integer> intProperties;
private Map<String, ArrayList<Integer>> intArrayProperties;
private Map<String, Arra... | import java.io.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... |
A12544 | A10985 | 0 | package problem1;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
public class Problem1 {
public static void main(String[] args) throws FileNotFoundException, IOException{
try {
TextIO... | package org.moriraaca.codejam;
import java.io.File;
import java.io.InputStream;
import java.io.PrintStream;
public abstract class AbstractSolver<TC extends TestCase> {
protected final String RESOURCE_FOLDER = "src/main/resources/";
/* Config */
protected final String defaultInputFileName;
protected final Output... |
B12669 | B12155 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package year_2012.qualification;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.File;
import java.util.Map;
import java.util.HashMap;
public class GCJ_qr_c {
/**
* @param args
*/
public static void main(String[] args) {
GCJReader in = new GCJReader(args[0]... |
A13029 | A10362 | 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.*;
import java.io.*;
import java.math.*;
import java.awt.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Double.parseDouble;
import static java.lang.Long.parseLong;
import static java.lang.System.*;
import static java.util.Arrays.*;
import static jav... |
B11421 | B13033 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | package qualification.q1;
import com.sun.deploy.net.proxy.StaticProxyManager;
import qualification.common.InputReader;
import qualification.common.OutputWriter;
/**
* Created by IntelliJ IDEA.
* User: ofer
* Date: 14/04/12
* Time: 17:36
* To change this template use File | Settings | File Templates.
*/
public c... |
B21968 | B21961 | 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... | /**
* @(#)test.java
*
* test application
*
* @author
* @version 1.00 2012/4/13
*/
import java.io.*;
import java.util.*;
import java.lang.*;
public class test {
public static void main(String[] args) {
try
{
FileInputStream fstream = new FileInputStream ("B-small-attempt1.in");
DataI... |
B10485 | B12797 | 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 com.problemC;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class RecycledNumber {
private static int A = 1111;
private static int B = 2222;
public static int count = 0;
public static void main(String[] args) {
String[] s... |
A12113 | A10645 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... |
package b;
import java.io.*;
public class Main {
public static void main(String[] args) {
new Main().go();
}
public void go() {
BufferedReader in = null;
BufferedWriter out = null;
try{
in = new BufferedReader(new FileReader("B-small-attempt0.in"));
... |
B21968 | B22211 | 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.*;
import java.math.*;
public class Timus implements Runnable {
BufferedReader in;
PrintWriter out;
StringTokenizer st;
Random rnd;
final int limit = 2000000;
ArrayList<Integer>[] sets;
void addShifts(int number) {
String numStr = Integer.toString(number);
int totalShi... |
B11318 | B12532 | 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.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
public class RecycledNumbers {
String inputFilePath = "C:\\Temp\\Google\\C-sm... |
A11917 | A12599 | 0 | package com.silverduner.codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
public class Dancing {
public static void main(String[] args) throws Exception {
File input = new File("B-small-attempt... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
try{
int no, i, valuemax, surprise, p, n, j, temp;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
B10149 | B12771 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | import java.util.Scanner;
public class Main {
static int move(int n, int p){
return (n%10)*(int)Math.pow(10, p) + n/10;
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t=1; t<=T; t++){
int out=0;
int A=sc.nextInt();
int B=sc.nextInt()... |
A10793 | A12037 | 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 jp.funnything.competition.util;
import java.util.Arrays;
import java.util.List;
import com.google.common.collect.Lists;
import com.google.common.primitives.Ints;
import com.google.common.primitives.Longs;
public class Prime {
public static class PrimeData {
public int[] list;
public boole... |
A10793 | A11256 | 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 codeJam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Dance {
public static void main(String[] args) {
BufferedReader in = new Buffered... |
B12085 | B10695 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.PrintWriter;
import java.util.Scanner;
public class ProblemC {
public static void main(String[] args) {
final Scanner in = new Scanner(System.in);
final PrintWriter out = new PrintWriter(System.out);
final int t = in.nextInt();
for (int tt = 0; tt < t; tt++) {
final int a = in.nextInt... |
A21557 | A21391 | 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 de.hg.codejam.tasks.dance.help;
public abstract class Converter {
public static String[] convert(int[] input) {
String[] output = new String[input.length];
for (int i = 0; i < input.length; i++)
output[i] = String.valueOf(input[i]);
return output;
}
}
|
B10149 | B11210 | 0 | import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeSet;
// Recycled Numbers
// https://code.google.com/codejam/contest/1460488/dashboard#s=p2
public class C {
private static String process(Scanner in) {
int A = in.nextInt();
int B = in.nextInt();
int res =... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication11;
import java.io.*;
import java.util.ArrayList;
/**
*
* @author karthik
*/
public class JavaApplication11 {
/**
* @param args the command line arguments
*/
public static i... |
A20119 | A21829 | 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.*;
import java.io.*;
public class B {
public static void main (String [] args) {
try {
BufferedReader br = new BufferedReader(new FileReader("B-large-0.in"));
PrintWriter pw = new PrintWriter("B-large-0.out");
int inputNo;
inputNo = Integer.parseInt(br.readLine());
for (int i = 1; ... |
B12669 | B11128 | 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 com.codegem.zaidansari;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class CodeGemUtil {
publi... |
B10485 | B10594 | 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... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codejam;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashSet;
import java.util.StringTokenizer... |
A11201 | A10652 | 0 | package CodeJam.c2012.clasificacion;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* Problem
*
* You're watching a show where Googlers (employees of Google) dance, and then
* each dancer is given a triplet of scores by three judges.... | import java.io.*;
import java.util.*;
class Problems
{
public static void main (String [] args) throws Exception
{
BufferedReader f = new BufferedReader(new FileReader("input.java"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.java")));
StringTokenizer ... |
A11277 | A12013 | 0 | package googlers;
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Comparator;
public class Googlers {
public static void main(String[] args) {
int n,s,p,count=0,t;
Scanner sin=new Scanner(System.in);
t=Integer.parseInt(sin.nextLine());
int result[]=new int[t];
int ... | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
class Case1 extends Question{
public Ca... |
A12113 | A13194 | 0 | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class B {
static int[][] memo;
static int[] nums;
static int p;
public static void main(String[] args)throws IOException
{
Scanner br=new Scanner(new File("B-small-attempt0.in"... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class ProblemB {
public static void main(String[] args) throws NumberFormatException, IOException{
BufferedReader reader=new BufferedReader(new FileReader(new File(args[0])));
int numTestCases=Inte... |
A21396 | A21563 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package com.qual2;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;
public class qual2 {
public static void main(String[] args) {
cNums h = new ... |
A11201 | A11829 | 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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Arrays;
/**
* Created with IntelliJ IDEA.
* User: vikash
* Date: 14/04/12
* Time: 9:51 AM
* To change this template use File | Settings | File Templates.
*/
public class DancingGoo... |
B11361 | B11356 | 0 | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class C{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int caze, T;
int A, B;
void run(){
T=sc.n... | package ponder.CodeJamQualify;
import java.io.*;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
/**
* @author: sg Date: 15.04.12
*/
public class TaskC
{
static Set<Integer> rotations(int x, int min, int max)
{
Set<Integer> rotations = new HashSet<Integer>();
String s = Inte... |
A11917 | A13237 | 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.*;
import java.io.*;
public class B {
public B(Scanner in, PrintWriter out) {
int T = in.nextInt();
in.nextLine();
for (int t=0; t<T; t++) {
int N = in.nextInt();
int S = in.nextInt();
int P = in.nextInt();
int[] vals = new int[31];
for (int i=0; i<N; i++)
vals[in.nextInt()]++... |
B11421 | B12413 | 0 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Recycled {
public static void main(String[] args) throws Exception{
String inputFile = "C-small-attempt0.in... | import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.Writer;
import java.util.StringTokenizer;
import java.util.HashSet;
import java.io.InputSt... |
A12273 | A10680 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Dancing
* Jason Bradley Nel
* 16287398
*/
import java.io.*;
public class Dancing {
public static void main(String[] args) {
In input = new In("input.txt");
int T = Integer.parseInt(input.... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class DancingWithGooglers {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// BufferedInputStream in... |
A22078 | A23070 | 0 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
public class GooglersDancer {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated metho... | import java.io.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... |
A13029 | A12663 | 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.IOException;
import java.util.ArrayList;
import java.util.Collections;
public class B {
/**
* @param args
*/
public static String rest(ArrayList<String> list)
{
String n = list.get(0);
list.remove(0);
retu... |
A21396 | A22787 | 0 | import java.util.*;
public class Test {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for(int i = 1; i<=T; i++) {
int n = in.nextInt();
int s = in.nextInt();
int p = in.nextInt();
int result = 0;
for(int j = 0; j<n; j++){
... | package google.contest.B;
import google.loader.Challenge;
import google.problems.AbstractReader;
public class BReader extends AbstractReader {
@Override
protected Challenge createChallenge(int number) {
int theLine = getActualLine();
String[] lines = getLines();
BChallenge chal = new BChallenge(number, lines... |
B12762 | B12292 | 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.*;
import java.util.Scanner;
public class C {
public static void main(String[] args) throws FileNotFoundException, IOException {
Scanner sc = new Scanner(new FileReader("input.txt"));
PrintWriter pw = new PrintWriter(new FileWriter("output.txt"));
int noOfCases = sc.nextInt();
for (... |
B10155 | B12435 | 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.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class RecycledNumbers {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(new File("resource/input.in"));
int T = sc.nextInt();
int i = 1;
while (i<=T) {
int A = sc.nex... |
B21227 | B21654 | 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.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.HashSet;
public class Prob1C {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("C-large.in"));
PrintWriter pw = new Pr... |
B12085 | B10758 | 0 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author daniele
*/
public class GCJ_C {
public static void main(String[] args) thro... | import java.io.*;
import java.util.*;
import java.lang.*;
public class Recycled {
public static int cases = 0;
public static int min[] = new int[50];
public static int max[] = new int[50];
public static int answer[] = new int[50];
public static ArrayList<Integer> results = new ArrayList<Integer>();
public stati... |
B10231 | B12910 | 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 er.dream.codejam.helpers;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
public class FileHandler {
BufferedReader read;
BufferedWriter write;
public File[] listFi... |
A12273 | A12069 | 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.*;
/**
* Created with IntelliJ IDEA.
* User: Frederick
* Date: 4/14/12
* Time: 8:36 AM
* To change this template use File | Settings | File Templates.
*/
public class DancingWithTheGooglers {
private static int solve(int number, int surprising, int p, int[] totalPoints) {
int count = ... |
A12211 | A10598 | 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 CaseSolvers;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import Controller.IO;
public class WiresCase extends CaseSolver {
private ArrayList<Short[]> lines;
private int numOfIntersections;
public WiresCase(int order, int numberOfLines, ... |
A20382 | A22787 | 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 google.contest.B;
import google.loader.Challenge;
import google.problems.AbstractReader;
public class BReader extends AbstractReader {
@Override
protected Challenge createChallenge(int number) {
int theLine = getActualLine();
String[] lines = getLines();
BChallenge chal = new BChallenge(number, lines... |
A10568 | A12790 | 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.Scanner;
public class GooglersDancing {
public static int[][] array = new int[11][4];
public void generateArray() {
for (int i=0;i<=10; i++) {
array[i][0] = Integer.MAX_VALUE;
array[i][2] = Integer.MAX_VALUE;
array[i][1] = Integer.MIN_VALUE;
array[i][3]... |
A22191 | A21899 | 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... |
public class Dancing_With_the_Googlers {
public int solve1(int s, int p, int[] t)
{
int ans=0;
for (int i=0;i<t.length;i++)
{
boolean next=false;
for(int a0=0;a0<=t[i];a0++)
{
for(int a1=0;a0+a1<=t[i];a1++)
{
int a2=t[i]-a1-a0;
if(a2<0)
continue;
if(Math.abs(a0-a1)<... |
A20119 | A21758 | 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 Dancing;
import java.io.FileWriter;
import java.io.FileReader;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.lang.Character;
import java.util.ArrayList;
public class DancingWithGooglers
{
static String path = "C:\\Users\\hao\\Docum... |
B12074 | B11233 | 0 | package jp.funnything.competition.util;
import java.math.BigInteger;
/**
* Utility for BigInteger
*/
public class BI {
public static BigInteger ZERO = BigInteger.ZERO;
public static BigInteger ONE = BigInteger.ONE;
public static BigInteger add( final BigInteger x , final BigInteger y ) {
return... | import java.io.*;
import java.util.*;
public class CSmall {
public static Set set = new HashSet();
public static int counter = 0;
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(new File("C-small-attempt0.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new File... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.