src stringlengths 95 64.6k | complexity stringclasses 7
values | problem stringlengths 6 50 | from stringclasses 1
value |
|---|---|---|---|
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.Locale;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.RandomAccess;
import java.util.AbstractList;
import java.io.Writer;
import java.util.List;
import java.io.IOException;
import java.math.BigDecimal;
import ... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;
public class A {
final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
BufferedReader in;
PrintWriter out;
StringTokenizer tok = new StringTokenizer("");
cl... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.util.*;
public class r220a {
public static void main(String args[]) {
Scanner in =new Scanner(System.in);
int N = in.nextInt();
ArrayList<Integer> list = new ArrayList<Integer>();
ArrayList<Integer> sort = new ArrayList<Integer>();
for(int i = 0; i < N; i++) {
int k = in.nextInt();
list.add... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.util.ArrayLi... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.util.*;
public class Solution{
void solve()throws Exception
{
int n=nextInt();
int[]a=new int[n];
for(int i=0;i<n;i++)
a[i]=nextInt();
ArrayList<Integer>list=new ArrayList<Integer>();
for(int i=0;i<n;i++)
list.ad... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class test1
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int a[]=new int[n];
int b[]=new int[n];
for(int i=0;i<n;i++)
{
a[i]=in.nextInt... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Problem220A {
static int[] numbers;
static int[] numbersCopy;
public static void main(String[] args) throws IOException {
BufferedRe... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class LittleElephant {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int temp;
ArrayList<Integer> a2 = new ArrayList<Integer>();
ArrayList<Integer> a1 = new... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.math.BigInteger;
import static java.math.BigInteger.*;
import java.util.*;
public class Solution{
void solve()throws Exception
{
int n=nextInt();
int[]a=new int[n];
for(int i=0;i<n;i++)
a[i]=nextInt();
int[]b=a.clone();
Arr... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.util.*;
public class Main {
static class Scanner {
StreamTokenizer in;
boolean forceMode = false;
Scanner(InputStream is, String codePage, boolean forceMode) {
in = new StreamTokenizer(new BufferedReader(new InputStreamReader(is)));
if (!forceMode)... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
public class A {
static BufferedReader in;
static PrintWriter out;
static StringTokenizer st;
static Random rnd;
void solve() throws IOException {
int n = nextInt();
int[] arr = new int[n];
Integer[] arrCopy = new I... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arr... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.IOException;
import java.util.Arrays;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.util.NoSuchElementException;
import java.util.TreeSet;
import java.util.Collection;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at ... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author Sunits789
*/
public class M... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class A {
BufferedReader br;
StringTokenizer st;
PrintWriter out;
void solve() throws IOException {
int n = nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
int[] b = a.clone();
Arrays.sor... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.util.*;
public class Solution{
void solve()throws Exception
{
int n=nextInt();
int[]a=new int[n];
for(int i=0;i<n;i++)
a[i]=nextInt();
int[]b=a.clone();
mySort(b);
int cnt=0;
for(int i=0;i<n;i++)
... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
//package round136;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
public class A2 {
InputStream is;
PrintWriter out;
String INPUT = "";
void solve()
{
int n = ni();
int[] a = new int[n];
int[] b = new int[n... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
Scanner in;
static PrintWriter out;
static class Scanner {
StreamTokenizer in;
Scanner(InputStream is) {
in = new StreamTokenizer(new BufferedReader(new InputStreamReader(is)));
in.resetSyntax();
in.... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.util.*;
import java.io.*;
import java.awt.Point;
import static java.lang.Math.*;
public class CF220A {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(in.readLine());
Str... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
/**
* User: serparamon
*/
public class Codeforces_2012_08_31_A {
public static void main(String[] args) throws IOException {
//Scanner in = new Scanner(System.in);
StreamTokenizer in = new StreamTokenizer(new BufferedReader(new... | nlogn | 220_A. Little Elephant and Problem | CODEFORCES |
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
static int n;
static long TotalTime;
static Problem[] problems;
static StringBuilder sb;
public static void main(String[] args) {
FastScanner sc = new FastScanner();
sb = new StringBuilder();... | nlogn | 913_D. Too Easy Problems | CODEFORCES |
import java.math.BigInteger;
import java.util.Scanner;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Andy Phan
*/
public class p1096f {
static long MOD = 9... | nlogn | 1096_F. Inversion Expectation | CODEFORCES |
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args){
try {
new Main().solve();
} catch (Exception e) {
e.printStackTrace();
}
}
ArrayList<Edge>[]edge;
int n,m,cnt=0;
int ord;
int[]order;int[]vis;
Edg... | nlogn | 1100_E. Andrew and Taxi | CODEFORCES |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Map;
import java.util.HashMap;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**... | nlogn | 1029_D. Concatenated Multiples | CODEFORCES |
import java.io.*;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int N = sc.nextInt();
long dest = sc.nextLong();
long max = (long)... | nlogn | 1098_C. Construct a tree | CODEFORCES |
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int[] arr = new int[n];
HashMap<Integer, Integer> m... | nlogn | 1005_C. Summarize to the Power of Two | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
public class pr988B {
public static void main(String[] args) throws IOException {
BufferedReader b... | nlogn | 988_B. Substrings Sort | CODEFORCES |
import java.io.*;
import java.util.StringTokenizer;
public class Main {
static int[] a;
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = sc.nextInt();
a = sc.nextIntArray(n);... | nlogn | 986_B. Petr and Permutations | CODEFORCES |
import java.io.*;
import java.util.*;
public class Solution {
static class Data{
int x,i;
Data(int x,int i){
this.x = x;
this.i = i;
}
}
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStream... | nlogn | 1006_B. Polycarp's Practice | CODEFORCES |
import java.util.*;
import java.io.*;
public class D {
static final boolean stdin = true;
static final String filename = "";
static FastScanner br;
static PrintWriter pw;
public static void main(String[] args) throws IOException {
if (stdin) {
br = new FastScanner();
pw = new PrintWriter(new OutputStre... | nlogn | 988_D. Points and Powers of Two | CODEFORCES |
import java.util.*;
import java.io.*;
public class Chores
{
public static void main(String args[])throws IOException
{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String[] line = br.readLine().split("\\W");
int n = Integer.parseInt(line[0]);
int... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Scanner;
public class A {
public static void main(String[] args) {
A problem = new A();
problem.solve();
}
private void solve() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int p = sc.nextInt();
int v =... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class A {
/**
* @param args
*/
public static void main(String[] args) {
HomeWorks hw = new HomeWorks();
hw.sol();
hw.print();
}
}
class HomeWorks {
HomeWorks(){
Scanner sc... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;
public class A {
public static void main(String[] args) throws Exception {
int n = nex... | nlogn | 169_A. Chores | CODEFORCES |
/**
* Write a description of class VK2A here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.util.*;
public class VK2A
{
public static void main(String args[])
{
Scanner S = new Scanner(System.in);
int n = S.nextInt();
int a = S.nextInt();
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class A {
private void solve() throws IOException {
int n = nextInt();
int a = nextInt();
int b = nextInt();
... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String [] args){
Scanner in= new Scanner(System.in);
int n=in.nextInt();
int a=in.nextInt();
int b=in.nextInt();
int []deals=new int[n];
for(int i=0; i<n; i++){
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-gene... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class VKRound2Div2Task1 {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader ... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.*;
// VK Cup 2012 Round2 Unofficial Div2 Edition
public class Main {
void A(){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int[] h = new int[n];
for(int i=0; i<n; i++){
h[i] = sc.nextInt();
}
Arrays.sort(h);
System.out.... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class r114 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
ArrayList<Integer... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.Arrays;
public class Main{
public static void main(String[] args) throws Exception {
int n = nextInt();
int a = nextInt();
int b = nextInt();
int[] tasks = new int[n];
for(int i = 0; i < n; i++){
tasks[i] = nextInt();
}
Arrays.sort(tasks);
exit(tasks[b] - task... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class Success {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int a = scan.nextInt();
int b=scan.nextInt();
int[] t=new int[n];
for(int i=0;i<n;i++)
{
t[i]=s... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
public class test
{
public static void main(String[] args)
{
new test().run();
}
PrintWriter out = null;
void run()
{
Scanner in = new Scanner(System.in);
out = new PrintWriter(System.out);
int n = in.nextInt();
int a = in.nextInt();
int b = in.nextInt();
... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by IntelliJ IDEA.
* User: Михаил
* Date: 25.03.12
* Time: 19:03
* To change this template use File | Settings | File Templates.
*/
public class ProblemOne {
public static void main(String [] args) {
Scanner scanner = new Scanner(System.... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by IntelliJ IDEA.
* User: Mirza
* Date: 25.03.12
* Time: 18:51
* To change this template use File | Settings | File Template... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int n = sc.nextInt();
int a = ... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author hheng
*/
public class Main {
public static void main(String[] args) {
In... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
public class Contest169ProblemA implements Runnable {
void solve() throws NumberFormatException, IOException {
int n = nextInt(), a = nextInt(), b = nextInt();
ArrayList<Integer> tasks= new ArrayList<Integer>();
for (int i = 0; i < n; ++i){
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class A {
int INF = 1 << 28;
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
long[] chores = new long[n];
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
/**
* @author Vaibhav Mittal
*/
public class Main {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int testCases = 1;
Task solver = new Task();
... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int a = in.nextInt();
int b = in.nextInt();
int[] h = new int[3000];
for(int i = 0; i<n; i++)
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Solution {
//<editor-fold desc="input parse" defaultstate="collapsed">
private static StringTokenizer st;
private static BufferedReader reader = new BufferedReader(new I... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
public class Main {
publi... | nlogn | 169_A. Chores | 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 t... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author codeKNIGHT
*/
public class Main {
public static void main(String[] args) {... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.security.SecureRandom;
import java.util.*;
import java.math.*;
import java.awt.geom.*;
import static java.lang.Math.*;
public class Solution implements Runnable {
public void solve() throws Exception {
int n = sc.nextInt();
int a = sc.next... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
int a = kb.nextInt();
int b = kb.nextInt();
int array[] = new int[n];
for (int i = 0; i < n; i+... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.io.PrintWriter;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author @zhendeaini6001
*/
public class Main {
public static void main(String[] ar... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class VkR2A{
static BufferedReader br;
public static void main(String args[])throws Exception{
br=new BufferedReader(new InputStreamReader(System.in));
int nm[] = toIntArray();
int n = nm[0];
int a = nm[1]... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args)throws Exception {
File _=new File("chores.... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class problemA {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int[] hs = new int[n];
for(int i = 0; i < n; i++... | nlogn | 169_A. Chores | CODEFORCES |
import sun.reflect.generics.tree.Tree;
import java.io.*;
import java.util.*;
public class A2 {
static Scanner in; static int next() throws Exception {return in.nextInt();};
// static StreamTokenizer in; static int next() throws Exception {in.nextToken(); return (int) in.nval;}
// static BufferedReader in;
static Pr... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
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 BufferedReader(new InputStreamRea... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.InputMismatchException;
public class R2_D2_A {
public static void main(String[] args) {
// BufferedReader in = new BufferedReader(new
//... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class Train_A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int [] h = new int[n];
for (int i = 0; i < n; i... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
public class Main {
private static IO io;
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
io = new IO(System.getProperty("O... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class SolA {
private static InputReader in;
private static PrintWriter out;
public static void main(String[] args) throws IOException {
in = new InputReade... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
public class Solver {
StringTokeniz... | nlogn | 169_A. Chores | CODEFORCES |
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 a = in.nextInt();
int b = in.nextInt();
int[] ar = new int[n];
for (int i = 0; i < n; i++)
... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class CF_Chores {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int a = s.nextInt();
int b = s.nextInt();
long ar[] = new long[n];
f... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.*;
import java.math.*;
import java.io.*;
public class Main
{
public static void main(String args[]) throws IOException
{
Scanner c=new Scanner(System.in);
int n=c.nextInt();
int a=c.nextInt(); //higher
int b=c.nextInt(); //lower
int C[]=new int[n];
for(int i=0;i<n;i++)
C[i]=c.next... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
public class Main
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer tokenizer=null;
public static void main(String[] args) throws IOException
{
new Main().execute();
}
void debug(Object...os)
{
System.out... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.Arrays;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int[] ar = new int[n];
for (int i = 0; i < n; i++) {
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
public class Solution
{
public static void main(String[] args) throws IOException
{
new Solution().run();
}
StreamTokenizer in;
Scanner ins;
PrintWriter out;
int nextInt() throws IOException
{
in.nextToken(... | nlogn | 169_A. Chores | CODEFORCES |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int a = input.nextInt();
int b = input.nextInt();
int x[] = new int[n];
for (int i=0; i<n; i++) x[i]=input.nextInt();
... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
import java.math.*;
public class A {
@SuppressWarnings("unchecked")
private static void solve() throws IOException {
ArrayList<Num> c = new ArrayList<Num>();
n = nextInt();
a = nextInt();
b = nextInt();
for(int i = 0; i < n; i++) {
int next = nextInt();
boolean f... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual s... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
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.in));//stdin
else
{
try... | nlogn | 169_A. Chores | CODEFORCES |
import java.io.*;
import java.util.*;
public class ayyyyyy
{
public static void main(String[] args) { new ayyyyyy(); }
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int t, n;
int[] a;
ayyyyyy()
{
t = in.nextInt();
while (t --> 0)
{
a = new int[n = in.nextInt()]... | nlogn | 1197_A. DIY Wooden Ladder | CODEFORCES |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class A {
static MyScanner sc;
static PrintWriter pw;
public static void main(String[] args) throws Throwable {
sc = new MyScanner();
pw = new PrintWriter(System.out);
n = sc.nextInt();
T = sc.nextLo... | nlogn | 1099_F. Cookies | CODEFORCES |
import java.util.*;
import java.math.*;
public class Split {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int k= sc.nextInt();
int a[] = new int[n];
int d[] = new int[n-1];
for(int i=0;i<n;i++) {
a[i] = sc.nextInt();
if(i>0)
d[i-1] = a[i-1] -... | nlogn | 1197_C. Array Splitting | CODEFORCES |
import java.io.*;
import java.util.*;
import javax.lang.model.util.ElementScanner6;
public class codef
{
public static void main(String ar[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer nk=new StringTokenizer(br.readLine());
... | nlogn | 1197_C. Array Splitting | CODEFORCES |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
int n = in.nextInt();
int k = in.nextInt();
int[] arr = new int[n];
for(int i = 0; i < n; i++)
arr[i] = in.nextInt();
for(int i = n-1; i > 0; i--)
arr[i] -= arr[i-1];
arr[0] = 0;
A... | nlogn | 1197_C. Array Splitting | CODEFORCES |
import java.io.*;
import java.util.*;
import static java.lang.System.out;
public class Main {
private FastScanner scanner = new FastScanner();
public static void main(String[] args) {
new Main().solve();
}
private List<Integer>[] gr = new ArrayList[1000_000+5];
private int dp[][] = new ... | nlogn | 980_E. The Number Games | CODEFORCES |
import java.util.*;
import java.io.*;
public class a {
static long mod = 1000000007;
static boolean[][] blacks;
public static void main(String[] args) throws IOException
{
input.init(System.in);
PrintWriter out = new PrintWriter(new PrintStream(System.out));
//Scanner input = new Scanner(new File("input.txt")... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Random;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.Pr... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.awt.Point;
import java.io.*;
import java.text.*;
import java.util.*;
import java.util.regex.*;
public class Main{
static class Run implements Runnable{
//TODO parameters
final boolean consoleIO = true;
final String inFile = "input.txt";
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class A {
public static double EPS = .001;
public class House implements Comparable<House> {
int x;
int a;
public House(int mx, int ma) {
x = mx;
a = ma;
}
public int compareTo(House o) {
return x - o.x;
}
public double right() {
return (double)x + ((d... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class Village {
private class House implements Comparable<House>{
Double Coordinate;
Double Sidelength;
public House(double coordinate, double sidelength) {
Coordinate = coordinate;
Sidelength = sidelength;
}
public int compareTo(House o) {
return Coordinate.compareTo(o.C... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
public class A15 {
static StreamTokenizer in;
static PrintWriter out;
static int nextInt() throws IOException {
in.nextToken();
return (int)in.nval;
}
s... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author madi
*/
public class CottageTown {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] in = sc.nextLine().split(" ")... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Scanner;
public class Flatwile {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
int[] c = new int[n];
int[] a = new int[n];
for (int i=0; i<n; i++){
c[i] = sc.n... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.Scanner;
public class A {
public static void main(String[] args) {
new A().solve();
}
public void solve() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
float[] left = new float[n];
float[] right = new... | 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.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class Houses implements Runnable {
private void solve() throws IOException {
int n = nextInt();
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
public class C15A {
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int t=sc.nextInt();
double nm[][]=new double[n][2];
int a=0;
int b=0;
for(int i=0;i<n;i++){
a=sc.nextInt();
... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.util.*;
import static java.lang.Math.*;
public class Main{
public static void main(String[] args){
new Main().run();
}
void run(){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt() * 2;
H[] tbl = new H[n];
for(int i = 0; i < n; i++)tbl[i] = new... | nlogn | 15_A. Cottage Village | CODEFORCES |
import java.io.*;
import java.util.*;
public class j
{
public static void main(String a[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int k=0,i=0,j=0,n=0,p=0,t=0;
String s;
s=b.readLine();
StringTokenizer c=new StringTokenizer(s);
n=Integer.parseInt(c.nextToken());
k=Inte... | nlogn | 15_A. Cottage Village | CODEFORCES |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.