Search found 72 matches

by sith
Mon Sep 03, 2012 2:08 pm
Forum: Volume 123 (12300-12399)
Topic: 12390 - Distributing Ballot Boxes
Replies: 10
Views: 2836

12390 - Distributing Ballot Boxes - Time Limit Error

Hi guys.

I spent a lot of time to trying solve this porblem. And I always get TLE.
I use Java.
My benchmark says that my solution spend 1.5 sec to just read data( maximum available file size - 500000 cities).

So Is it posible to solve this problem by Java?
by sith
Sat Aug 04, 2012 2:40 pm
Forum: Volume 124 (12400-12499)
Topic: 12467 - Secret Word
Replies: 5
Views: 912

12467 - Secret Word

Hi,
I am trying to solve this problem on java. I have solution but I've got TLE. There is a lot of time spends on IO read operation, I am using BufferedReader .

Is it problem can be solved by Java?
by sith
Thu Jul 26, 2012 4:16 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30257

Re: 495 - Fibonacci Freeze

I've changed my code but still get RE import java.io.*; import java.util.Scanner; class Main { public static void main(String[] args) { String text = "5\n" + "7\n" + "11"; // BufferedReader reader = new BufferedReader(new StringReader(text)); BufferedReader reader = new BufferedReader(new InputStrea...
by sith
Fri Jul 20, 2012 4:29 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30257

Re: 495 - Fibonacci Freeze

Hello Why am I getting Runtime error? import java.io.*; import java.util.Scanner; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out)); Scanne...
by sith
Sat Jul 14, 2012 1:20 pm
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 21400

Re: 444 - Encoder and Decoder (runtime Error!)

Hello I've got Runtime error Why???? import java.io.*; import java.util.HashMap; import java.util.Map; class Main { public static void main(String[] args) { Map<Character, Integer> codes = new HashMap<Character, Integer>(); Map<Integer, Character> decodes = new HashMap<Integer, Character>(); for (in...
by sith
Sat Jul 14, 2012 11:49 am
Forum: Volume 100 (10000-10099)
Topic: 10010 - Where's Waldorf?
Replies: 42
Views: 18026

Re: 10010 - Where's Waldorf?

Hello
Can anybody explain, there is Waldorf(2 5) in the promblem example?
by sith
Sun Jul 08, 2012 3:07 pm
Forum: Volume 100 (10000-10099)
Topic: 10034 - Freckles
Replies: 101
Views: 32326

Re: 10034 - Freckles

Hello I've got WA I've used Kruskal's algorithm. Here is my solution It gives same result like a previous post. import java.io.*; import java.util.*; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter wri...
by sith
Sat Jul 07, 2012 6:07 pm
Forum: Volume 101 (10100-10199)
Topic: 10183 - How Many Fibs?
Replies: 66
Views: 23486

Re: 10183 - How many Fibs?

Same result!!! import java.io.*; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter writer = new B...
by sith
Wed Jul 04, 2012 11:21 pm
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 31044

Re: 401 palindromes WA help

Hello

I believe that my solution is correct but I've got WA.
Maybe the bad output formatting is the reason of WA?

Code: Select all

AC

by sith
Wed Jul 04, 2012 11:29 am
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 36373

Re: 10062 - Tell Me the Frequencies!

There is no extra line in my IDE(IntellijIDEa) for this solution, but I still get WA import java.io.*; import java.util.*; class Main { private static final char NEW_LINE = '\n'; public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Bu...
by sith
Wed Jul 04, 2012 9:52 am
Forum: Volume 101 (10100-10199)
Topic: 10183 - How Many Fibs?
Replies: 66
Views: 23486

Re: 10183 - How many Fibs?

Thanks for your case. I've updated my solution but sill get WA import java.io.*; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamR...
by sith
Tue Jul 03, 2012 2:56 pm
Forum: Volume 112 (11200-11299)
Topic: 11224 - Let's swim!
Replies: 17
Views: 7939

Re: 11224 - Let's Swim!

Hello I'we got WA :( My solution works properly for all cases from this thread. But I am getting WA :( import java.io.*; import java.util.*; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter writer = new...
by sith
Sun Jul 01, 2012 7:59 pm
Forum: Volume 101 (10100-10199)
Topic: 10183 - How Many Fibs?
Replies: 66
Views: 23486

Re: 10183 - How many Fibs?

Hello Why I'am getting WA import java.io.*; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter wri...
by sith
Sun Jul 01, 2012 10:50 am
Forum: Volume 10 (1000-1099)
Topic: 1067 - Tunnels
Replies: 1
Views: 1965

1067 - Tunnels

Hello
Could anybody explaine, why the answer for case
4 6
1 2
1 3
1 4
2 0
3 0
4 0
is 2
by sith
Sat Jun 30, 2012 8:07 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33577

Re: 11219 - How old are you?

Hello Why am I getting WA? Here is my solution import java.io.*; import java.util.Calendar; import java.util.Scanner; import java.util.StringTokenizer; class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter w...

Go to advanced search