Search found 10 matches

by milesstevenson
Wed Oct 28, 2015 4:33 am
Forum: Volume 102 (10200-10299)
Topic: 10284 - Chessboard in FEN
Replies: 11
Views: 11950

Re: 10284 - Chessboard in FEN

Could anyone help me understand what I could be doing wrong in my code? It's a bit verbose, but as far as I understand I pass every test case.
Edit: Nvm AC

Code: Select all

// AC
by milesstevenson
Mon Jun 22, 2015 2:24 pm
Forum: Volume 101 (10100-10199)
Topic: 10141 - Request for Proposal
Replies: 44
Views: 15841

Re: 10141 - Request for Proposal

For some odd reason, my code is getting WA. Is there improper input in uDebug for this problem, also? This code passes on all cases, except for the uDebug generated input, where n is 0. The specs for the problem say 0 < n, though. Any help would be much appreciated. import java.io.InputStream; impor...
by milesstevenson
Fri Mar 13, 2015 1:47 am
Forum: Volume 3 (300-399)
Topic: 315 - Network
Replies: 68
Views: 21469

Re: 315 - Network

Hi. I'm getting Runtime Error for some odd reason. I pass many testcases. Can someone help me point out why I am getting this error? Is it an issue with the format of the problem or my code? Many thanks. import java.util.Arrays; import java.util.ArrayList; import java.io.InputStream; import java.io....
by milesstevenson
Wed Mar 04, 2015 9:31 am
Forum: Volume 124 (12400-12499)
Topic: 12442 - Forwarding Emails
Replies: 31
Views: 14026

Re: 12442 - Forwarding Emails

Hi. Could anyone please help me understand why I'm getting TLE for this problem when I pass all test data provided here. I am using Java and have done re-factoring on the code a few times now. Really starting to feel down about it. Any help would be appreciated. Thank you. import java.util.Arrays; i...
by milesstevenson
Mon Nov 03, 2014 5:43 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 38137

Re: 10226 - Hardwood Species

Getting TLE on this problem. At first I started with a TreeMap and thought that was the problem since all operations on the data structure were in O(logn). I then switched to a HashMap where operations are in O(1), but that seems to have not done anything to help. Atleast O(nlogn) is required for so...
by milesstevenson
Sun Oct 26, 2014 8:46 pm
Forum: Volume 5 (500-599)
Topic: 514 - Rails
Replies: 79
Views: 24559

Re: 514 - Rails

It seems I pass on all of the test cases in here, including the test cases from the previous post, but still get WA. :o import java.util.Scanner; import java.io.OutputStream; import java.io.IOException; import java.util.ArrayDeque; import java.io.PrintWriter; import java.util.Deque; import java.io.I...
by milesstevenson
Sun Oct 26, 2014 2:42 am
Forum: Volume 5 (500-599)
Topic: 514 - Rails
Replies: 79
Views: 24559

Re: 514 - Rails

Edit: Please see my post below for my updated code.
by milesstevenson
Sat Oct 18, 2014 12:20 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38816

Re: 101 - The Blocks Problem

Ahh. I was incorrectly reading the problem. My code below finally got AC. Thanks Brian!
by milesstevenson
Sat Oct 18, 2014 10:40 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38816

Re: 101 - The Blocks Problem

brianfry713 wrote:Input:

Code: Select all

3
move 0 onto 1
move 1 onto 2
quit
AC output:

Code: Select all

0: 0
1:
2: 2 1
How is it that this is a valid solution? Why isn't the valid solution the following:

Code: Select all

0:
1: 0
2: 2 1
by milesstevenson
Mon Oct 13, 2014 12:10 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79254

Re: 10038 - Jolly Jumpers

Can anyone help me understand why I'm not getting AC?

Code: Select all

// AC
Edit: Nevermind I found the error. isProperSequence should have been called with n instead of n-1.

Go to advanced search