src stringlengths 95 64.6k | complexity stringclasses 7
values | problem stringlengths 6 50 | from stringclasses 1
value |
|---|---|---|---|
import java.io.*;
import java.text.*;
import java.util.*;
public class CottageVillage {
static BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer st;
static String LINE() throws Exception { return stdin.readLine(); }
static String TOKEN() throws Exception {
whil... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class A {
static class Entity implements Comparable {
public Entity(int x, int a) {
this.x = x;
this.a = a;
}
public int x, a;
public int compareTo(Object t) {
... | nlogn | 15_A. Cottage Village | CODEFORCES |
/*
* Hello! You are trying to hack my solution, are you? =)
* Don't be afraid of the size, it's just a dump of useful methods like gcd, or n-th Fib number.
* And I'm just too lazy to create a new .java for every task.
* And if you were successful to hack my solution, please, send me this test as a message or to Abr... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class AA {
static class Pair implements Comparable<Pair> {
public int x, y;
public Pair(int x, int y) {
this.x = x;
this.y = y;
}
public int compareTo(Pair p) {
if (p.x != x)
return... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.fill;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.sort;
public class Main {
public static void main(String[] args) throws IOException {
try {
if (new File("input.txt").exists()) {
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import static java.lang.Math.*;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class CodeforcesA implements Runnable {
public static final String taskname = "A";
Buffer... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class CottageVillage {
class cl {
int x=0;
int a=0;
cl(int x, int a){
this.x=x;
this.a=a;
}
}
class cmp implements Comparator<cl> {
publ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
public class A {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int n = Integer.parseInt(st... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
public class Task15a {
public static class House implements Comparable<House>{
int x, s;
public House(int x, int s) {
super();
this.x = x;
this.s = s;
}
public int compareTo(House o) {
return x - o.x;
}
}
public static void main(S... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class _P015A{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-9;
int n, t;
int[][] a;
void run(){
n=sc.nextInt();
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class ProblemA {
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int t = s.nextInt();
TreeMap<Integer,Integer> map = new TreeMap<Integer,Integer>();
// int x = 0 ;
while(s.hasNextInt())
{
int i = s.nextInt();
int ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class CottageVillage {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int size=sc.nextInt();
int side=sc.nextInt();
ArrayList<Pair> lis=new ArrayList<Pair>();
for(int x=0;x<size;x++)
{
lis.add(new Pair(sc.nextInt(), sc.nextInt()));
}
Coll... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class Main {
// static Scanner in;
static PrintWriter out;
static StreamTokenizer in; static int next() throws Exception {in.nextToken(); return (int) in.nval;}
public static void main(String[] args) throws Exception {
// in = new Scanner(System.in);
out = new PrintW... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class Beta15PA {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Beta15PA temp = new Beta15PA();
temp.solve();
}
public void solve() {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt(), t = scan.nextInt();
Ho... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class ProblemA {
public static void main(String[] args) throws IOException {
BufferedReader s = new BufferedReade... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.Scanner;
import java.util.TreeMap;
/**
*
* @author camoroh13
*/
public class Solution {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
// Scanner sc = new Scanner(new FileInputStream("/home/camoroh13/NetBeansPro... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;
public class Solution15A {
final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
BufferedReader in;
PrintWriter ou... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Scanner;
/**
* @author Son-Huy TRAN
*
*/
public class P15A_CottageVillage {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int t = scanner.nextInt();
scanner.nextLine();
int[] x = new int[n];
i... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.util.Arrays;
import java.util.Scanner;
public class p15a {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int t = in.nextInt();
if(n == 1) {
System.out.println(2);
return... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class P015A {
public static void main(String[] args) {
Scanner inScanner = new Scanner(System.in);
int n = inScanner.nextInt();
int t = inScanner.nextInt();
House[] houses = new House[n];
for (int i = 0; i < n; i++)
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Scanner;
public class A015 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt(), t = in.nextInt();
int[] centers = new int[n], sides = new int[n];
for (int x = 0; x < n; x++) {
centers[x] = in.nextInt();
sides[x] = in.nextInt();
}
int... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class Main {
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
double [] left = new double[n];
double [] right = new double[n];
for (int i = 0; i<n; i++){
int ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class CottageVillage {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
int counter = 0;
int numbCottages = scan.nextInt();
int t = scan.nextInt();
House[] cottages = new House[numbCottage... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
/**
*
* @author epiZend
*/
public class Cottage {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
in... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Solution {
BufferedReader in;
PrintWriter out;
StringTokenizer st;
static class Pair implements Comparable<Pair> {
int x, a;
Pair(int x, int a) {
this.x = x;
this.a = a;
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class a {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
double w = in.nextDouble();
int tot = 2;
Interval[] houses = new Interval[n];
for(int i=0; i<n; i++) {
double center = in.nextDouble();
double wid = in.nextDouble(... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.text.ChoiceFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class A {
BufferedReader in;
StringTokenizer st;
PrintWriter out;
s... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class R015A {
final double EPS = 1e-9;
boolean isEqual(double x, double y) {
return Math.abs(x-y) <= EPS * Math.max(Math.abs(x), Math.ab... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class ProblemA {
static ArrayList<Point2> houses = new ArrayList<Point2>();
public static void main(String[] args) {
ProblemA a = new ProblemA();
Scanner in = new Scanner(Sys... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class House {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
ArrayList<HS> list = new ArrayList<HS>();
for (int i = 0; i < n; i++) {
list.add(new HS(sc.nextInt(),sc.nextInt()));
}
Collections.sor... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
Scanner in;
PrintWriter out;
static class House implements Comparable <House>{
int len;
int pos;
House(Scanner in){
pos = in.nextInt() * 2;
len = in.nextInt() * ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class CottageVillage {
public static void main(String... args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
TreeMap<Integer, Integer> tm = ne... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
StreamTokenizer in;
PrintWriter out;
static public void main(String[] args) throws IOException {
new Main().run();
}
int ni() throws IOException {
in.nextToken(); return (int) in.nval;
}
vo... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Solution {
static class Cottage implements Comparable<Cottage> {
public int x;
public double a;
public Cottage(int x, int a) {
this.x = x;
this.a = a;
}
publ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.io.*;
/**
* Created by HREN_VAM.
*/
public class A implements Runnable{
BufferedReader in;
PrintWriter out;
StringTokenizer st;
public static final String filename = "a";
class I implements Comparable<I>{
int x;
int a;
I(int x, int a){
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class Main implements Runnable {
private BufferedReader in;
private PrintWriter out;
private StringTokenizer st;
private void eat(String line)
{
st = new StringTokenizer(line);
}
private String next() throws IOException
{
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class Village{
static class House implements Comparable<House>{
public double center, length;
public House(double center, double length){
this.center = center;
this.length = length;
}
public double getRight(){
return center + length/2;
}
public double getLeft(){
re... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public Main() {
super();
}
public static void main(String... args) {
Main main = new Main();
main.start();
}
public void start() {
Scanner in = new Scanner(new B... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.awt.*;
public class A
{
static Comparator<Point> cmp = new Comparator<Point>()
{
public int compare(Point a, Point b)
{
if(a.x < b.x)
return -1;
else if(a.x > b.x)
return 1;
return 0;
}
};
public static void main(String args[])
{
Scanner scan = new Scanne... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class Main implements Runnable {
class Segment {
int l, r;
Segment(int l, int r) {
this.l = l;
this.r = r;
}
@Override
public boolean equals(Object obj) {
Segment o = (Segment)obj;
return l == o.l && r == o.r;
}
@Override
public int hashCode()... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class test
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int t=in.nextInt();
House[] houses=new House[n];
for(int i=0;i<n;i++)
{
houses[i]=new House(i... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
/**
* @author Alexander Grigoryev
* Created on 28.07.2011
*/
public
class Main {
static Scanner in = new Scanner(System.in);
public static
void main(String[] args) {
int n = in.nextInt();
int t = in.nextInt();
List<Integer> v = new ArrayList<Integer>... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.math.*;
import java.util.*;
public class Village
{
static Scanner in = new Scanner( new BufferedReader( new InputStreamReader( System.in ) ) );
public static void main( String[] args )
{
int n = in.nextInt(), t = 2*in.nextInt(), h[][] = new int[n][2], ans = 2;
for( int i = 0; i < ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
/**
*
*/
/**
* @author burdakovd
*
*/
public class A {
static class House {
int x, a;
}
/**
* @param args
*/
public static void main(final String[] args) {
final Scanner in = new Scanner(Sy... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Comparator;
public class Main {
private static StreamTokenizer in;
private static PrintWriter out;
private static int nextInt() throws Exception {... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collections;
public class A {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String[] s = in.re... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class village {
static int[] X, A;
public void solve()
{
Scanner in = new Scanner(System.in);
int N = in.nextInt(), T = in.nextInt();
X = new int[N];
A = new int[N];
for(int i = 0; i < N; i++) {
X[i] = in.nextInt(); A[i] = in.n... | nlogn | 15_A. Cottage Village | CODEFORCES |
import static java.util.Arrays.*;
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class A implements Runnable
{
public static void main(String [] args) throws IOException
{
new Thread(null, new A(), "", 1 << 20).start();
}
String file = "input";
BufferedReader input;
PrintWriter... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class A {
static class Sort implements Comparable<Sort> {
int x,a;
public int compareTo(Sort o) {
if (this.x==o.x)
return this.a-o.a;
return this.x-o.x;
}
}
public static void main(St... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.security.KeyException;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;
public class P15A
{
public static void main (String [] args)
{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt(), t = scan.nextInt();
TreeMap<Integer,Integer> ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Scanner;
public class A {
static InputStreamReader in = new InputStreamReader(System.in);
static BufferedReader bf = new BufferedReader(in);
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class CottageVillage
{
public Scanner in = new Scanner(System.in);
public PrintStream out = System.out;
public int n, t;
public Pair[] v;
public void main()
{
n = in.nextInt();
t = in.nextInt();
int i;
v = new Pair[n];
for(i=0;i<n;++i) v[i] = new Pair... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.awt.geom.Point2D;
import java.util.Arrays;
import java.util.Scanner;
public class A
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int t=in.nextInt();
pt[] P=new pt[n];
for (int i=0; i<n; ++i)
P[i]=new pt(in.nextInt(... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.io.*;
public class a {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
int[][] xa = new int[n][2];
for(int i=0; i<n; ++i) {
xa[i][0] = sc.nextInt();
xa[i][1] = sc.nextInt();
}
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
import static java.lang.System.out;
public class Flatville
{
public static void main( String args[] )
{
class SquareHouse implements Comparable<SquareHouse>
{
public SquareHouse( double posLeft, doub... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
/**
* @author Egor Kulikov (egor@egork.net)
* Created on 14.03.2010
*/
public class TaskA implements... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
/**
* Date 22.11.2011
* Time 17:49:45
* Author Woodey
* $
*/
public class A15 {
final double eps = 10e-9;
class Pair implements Comparable<Pair>{
int x;
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Prob015A
{
public static void main( String[] Args )
{
Scanner scan = new Scanner( System.in );
int numHouses = scan.nextInt();
int side = scan.nextInt() * 2;
ArrayList<Integer> sid... | nlogn | 15_A. Cottage Village | CODEFORCES |
//package round15;
import java.io.BufferedOutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringReader;
import java.util.Arrays;
import java.util.Scanner;
public class A {
private Scanner in;
private PrintWriter out;
public void solve()
{
int n = ni();
int t = ni();
P... | nlogn | 15_A. Cottage Village | CODEFORCES |
//package round15;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
public class A {
static StreamTokenizer in =
new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
static int nextInt(... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class Solution {
private BufferedReader in;
private PrintWriter out;
private StringTokenizer st;
static class House implements Comparable<House> {
int x, a;
@Override
public int compareTo(House o) {
return x - o.x;
}
public House(int x, int a) {
thi... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
static double eps = 1e-8;
public static void main(String[] args) {
Scanner r = new Scanner(System.in);
int n = r.nextInt();
int t = r.nextInt();
House[] a = new House[n];
for(int i ... | nlogn | 15_A. Cottage Village | CODEFORCES |
//~ 22:04:48
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
String out = "";
String[] p = br.... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class CottageVillage
{
Scanner in;
PrintWriter out;
CottageVillage()
{
in = new Scanner(System.in);
out = new PrintWriter(System.out);
}
public void finalize()
{
out.flush();
in.close();
out.close();
}
int ans(House a, House b, int t)
{
int diff... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class Main implements Runnable {
class House implements Comparable<House> {
int x;
int a;
public House(int x, int a) {
this.x = x;
this.a = a;
}
@Override
public int compareTo(House other) {
return x - other.x;
}
}
// private void solution() thr... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
public class a {
private void solve() throws Exception {
int n = nextInt(), t = nextInt();
int[] x = new int[n], a = new int[n];
for (int i = 0; i < n; ++i){
x[i] = nextInt();
a[i] = nextInt();
}
for (int i = 0; i < n; ++i)... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Main {
BufferedReader in;
PrintWriter out;
StringTokenizer st;
void solve() throws IOException {
int n=ni();//have bult yet
int t=ni();//new house
int[] center=new int[n];
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class ProblemA_15 {
final boolean ONLINE_JUDGE=System.getProperty("ONLINE_JUDGE")!=null;
BufferedReader in;
PrintWriter out;
StringTokenizer tok=new StringTokenizer("");
void init() throw... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
private static Node[] node;
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int ret = 2, del;
int n = cin.nextInt();
int t = cin.nextInt() * 2;
node = new Node[n];
for (int i = 0; i < ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.io.*;
public class Main
{
public static void main(String args[]) throws IOException
{
Scanner sc = new Scanner(System.in/*new File("input.txt")*/);
int n = sc.nextInt(), t = sc.nextInt(), x, a, kol = 2;
ArrayList<Double> al = new ArrayList<Double>();
for(int i=0;i<n;i++)
{
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class BetaRound15_A implements Runnable {
final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
BufferedReader in;
PrintWriter out;
StringTokenizer tok = new StringTokenizer("");
void init() throws IOException {
i... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import java.awt.*;
public class A
{
static Comparator<Point> cmp = new Comparator<Point>()
{
public int compare(Point a, Point b)
{
if(a.x < b.x)
return -1;
else if(a.x > b.x)
return 1;
return 0;
}
};
public static void main(String args[])
{
Scanner scan = new Scanne... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.text.*;
import java.util.*;
public class A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int t = scan.nextInt();
List<Double> coords = new ArrayList<Double>();
while (n-- > 0) {
double x = scan.nextDouble();
double a = scan.nextDo... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.awt.geom.Point2D;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int t = in.nextInt() * 2;
Point... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int houses = sc.nextInt();
int size = sc.nextInt();
hizzy[] array = new hizzy[houses];
long total =2;
for(int a=0;a<houses;a++)array[a]=new hi... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class Village {
private class House implements Comparable<House> {
Double Coordinate;
Double Sidelength;
private House(double coordinate, double sidelength) {
Coordinate = coordinate;
Sidelength = sidelength;
}
public int compareTo(House o) {
return Coordinate.compare... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class A
{
public static void main(String[] args)
{
new A(new Scanner(System.in));
}
public A(Scanner in)
{
int n = in.nextInt();
int t = in.nextInt();
int tt = 2*t;
rect[] rs = new rect[n];
for (int i=0; i<n; i++)
rs[i] = new re... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
public class Main implements Runnable {
class Home implements Comparable<Home> {
@Override
public int compareTo(Home arg0) {
return st - arg0.st;
}
int st, end;
}
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class A {
Scanner in = new Scanner(System.in);
public class Houses implements Comparable<Houses>{
double x;
double a;
public Houses(double xVal, double aVal){
x = xVal-aVal/2;
a = aVal;
}
@Override
public int compareTo(Houses o) {
return (int) (x - o.x);
}
}
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.math.*;
import java.util.*;
public class Village
{
static Scanner in = new Scanner( new BufferedReader( new InputStreamReader( System.in ) ) );
public static void main( String[] args )
{
int n = in.nextInt(), t = 2*in.nextInt(), h[][] = new int[n][2], ans = 2;
for( int i = 0; i < ... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class A implements Runnable {
public static void main(String[] args) {
new A().run();
}
class FastScanner {
BufferedReader br;
StringTokenizer st;
boolean eof;
String buf;
public FastScanner(String fileName) throws FileNotFoundException {
br = new Buffer... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.text.ChoiceFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.lang.*;
import java.io.*;
import java.util.*;
import java.math.*;
public class Solution implements Runnable{
private static BufferedReader br = null;
private static PrintWriter out = null;
private static StringTokenizer stk = null;
public static void main(String[] args) {
br =... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;
public class CodeForces {
public void solve() throws IOException {
int n=nextInt();
int t=nextInt();
double larr[]=new double [n];
double rarr[]=new double [n];
for(int i=0;i<n;i++){
double x=nextDouble();
double r=nextDou... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;
public class Solution implements Runnab... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.Arrays;
import java.util.Random;
import java.util.StringJoiner;
import java.util.StringTokenizer;
import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Function;
public class Main {
static int T;
public static void main(String[] args) {
FastScanne... | nlogn | 1027_C. Minimum Value Rectangle | CODEFORCES |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Sockets {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt(), m = in.nextInt(), socket = in.nextInt();
... | nlogn | 257_A. Sockets | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class A implements Runnable {
final boolean LOCAL = System.getProperty("ONLINE_JUDGE") == null;
BufferedReader in;
PrintWriter out;
StringTokenizer tok;
public static void main(String[] args) {
new Thread(null, new A(), "", 256*10... | nlogn | 257_A. Sockets | CODEFORCES |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class A
{
String line;
StringTokenizer inputParser;
BufferedReader is;
FileInputStream fstream;
DataInputStream in;
String FInput="";
void openInput(String file)
{
if(file==null)is = new BufferedReader(new InputStreamReader(System.i... | nlogn | 257_A. Sockets | CODEFORCES |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class A {
static StringTokenizer st;
static Buffered... | nlogn | 257_A. Sockets | CODEFORCES |
import java.util.*;
import java.io.*;
public class Sockets {
BufferedReader in;
PrintWriter out;
StringTokenizer st;
String nextToken() throws Exception {
while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(in.readLine());
return st.nextToken();
}
int n... | nlogn | 257_A. Sockets | CODEFORCES |
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author c0d... | nlogn | 257_A. Sockets | CODEFORCES |
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.*;
/**
* Generated by Contest helper plug-in
* Actual solution is at the bottom
*/
public class Main {
public static void main(String[] args) {
InputReader in = new StreamInputReader(System.in);
PrintWriter out = ne... | nlogn | 257_A. Sockets | CODEFORCES |
import java.io.*;
import java.util.*;
public class A {
BufferedReader in;
StringTokenizer st;
PrintWriter out;
String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(in.readLine());
return st.nextToken();
}
int nextInt() throws Exception {
return Integer... | nlogn | 257_A. Sockets | CODEFORCES |
//package Round_159;
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class a {
void solve() throws Exception {
int n = in.nextInt();
int m = in.nextInt();
int k = in.nextInt();
int a[] = new int[n];
for (int i = 0; i<n; i++){
a[i] = in.nextInt();
}
Arrays.sort(a);
in... | nlogn | 257_A. Sockets | CODEFORCES |
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStr... | nlogn | 257_A. Sockets | CODEFORCES |
import java.awt.Point;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;
public class Start {
final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
BufferedReader in;
PrintWriter out;
StringTokenizer... | nlogn | 257_A. Sockets | CODEFORCES |
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt(), m = in.nextInt(), k = in.nextInt();
int[] a = n... | nlogn | 257_A. Sockets | CODEFORCES |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.