Search found 9 matches

by LanceHAOH
Sun Dec 25, 2016 6:08 pm
Forum: Volume 108 (10800-10899)
Topic: UVA10827 Maximum sum on a torus WA
Replies: 1
Views: 1824

UVA10827 Maximum sum on a torus WA

I wrote a O(n^4) solution for UVA10827. It passes all the tests on udebug and the ones that I can find from past threads on this problem. Unfortunately, I am still getting WA. Is anyone able to come up with a counterexample for my algorithm?

#include <iostream>
#include <algorithm>
using namespace ...
by LanceHAOH
Sun Jan 11, 2015 11:05 am
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 27434

11479 - WA

I have researched this forums for possible hints to why my code is wrong. But I cannot find any. Could someone please help me?

class Main {

public static void main(String[] args) {
java.util.Scanner in = new java.util.Scanner(System.in);
long[] sides = new long[3];
long cases = in.nextLong ...
by LanceHAOH
Thu Jun 12, 2014 9:52 am
Forum: Volume 5 (500-599)
Topic: 514 - Rails
Replies: 79
Views: 38062

Re: 514 Rails: WA

After thinking it through, there is apparently nothing wrong with my logic. It is just that I used the wrong method to determine whether a number was in a reversed position or not.

The following is the offending block of code:


/* process the configuration */
for(index = 0; index < num_trains ...
by LanceHAOH
Thu Jun 12, 2014 8:53 am
Forum: Volume 5 (500-599)
Topic: 514 - Rails
Replies: 79
Views: 38062

Re: 514 Rails: WA

Yeah. All the other solutions that I saw also used a Stack. But why is my logic wrong?
by LanceHAOH
Wed Jun 11, 2014 5:29 pm
Forum: Volume 5 (500-599)
Topic: 514 - Rails
Replies: 79
Views: 38062

514 Rails: WA

I did this problem in a different way from the rest. I saw that others were using stack to simulate the process but I used a general observation that I made to solve this problem (which is, if there is a larger preceding number in front of a later number, then the later number and its consecutive ...
by LanceHAOH
Tue Apr 15, 2014 4:02 pm
Forum: Volume 2 (200-299)
Topic: 220 - Othello
Replies: 9
Views: 8128

Re: 220 - Othello

Hi. I have edited my code. But it is still getting WA.



import java.util.*;

class Main {
static int black = 0;
static int white = 0;
public static void main(String[] args) {
boolean debug = false;
char[][] board = new char[8][8];
Scanner in = new Scanner(System.in);
char[] players = { 'W ...
by LanceHAOH
Sat Apr 12, 2014 8:54 pm
Forum: Volume 2 (200-299)
Topic: 220 - Othello
Replies: 9
Views: 8128

220 - Othello

Hi. I am getting WA for this problem no matter how hard I try. I have tried the other test cases that have been posted on this forum. My output matches exactly. I don't see why my code is still not getting AC. Could someone please help? My code is listed below:



import java.util.*;

class Main ...
by LanceHAOH
Thu Apr 10, 2014 7:21 pm
Forum: Volume 4 (400-499)
Topic: 462 - Bridge Hand Evaluator
Replies: 32
Views: 16500

Re: 462 - Bridge Hand Evaluator

Hi. Thanks for your help. I managed to get AC at last! Yeah, I know that the there is another thread regarding the same problem already. But I just could not spot any logic errors. So I though that maybe someone could help me with debugging. I collected all the test cases and I checked the input ...
by LanceHAOH
Thu Apr 10, 2014 9:13 am
Forum: Volume 4 (400-499)
Topic: 462 - Bridge Hand Evaluator
Replies: 32
Views: 16500

462 - Bridge Hand Evaluator

Hi all. I have carefully crafted and refined my algorithm many times. But I can''t seem to see where the error lies. I just keep getting WA. See my code below:



import java.util.*;

class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
LinkedList<Card> arr ...

Go to advanced search