Page 2 of 2

Re: 422 word search wonder

Posted: Thu Jul 24, 2014 9:05 pm
by brianfry713
The output is wrong, CSID is found at: 4,2 1,2
Post or send me your code if you need help.

Re: 422 word search wonder

Posted: Sun Jul 27, 2014 7:51 pm
by mgavin2
WA code:

Code: Select all

//facepalm

prune() or not, it doesn't get the right answer... there's probably a small problem in reading the input or something, and not in the algorithm

Re: 422 word search wonder

Posted: Mon Jul 28, 2014 1:42 pm
by lighted
My advice to you -> always copy/paste output format from problem description or sample.
If a word is not found, the string ``Not found'' should be output instead of a pair of coordinates.
1,2 4,2
2,1 2,4
Not found
This is your output part

Code: Select all

//output coords
        if (is_match)
            printf("%d,%d %d,%d", j, k, l, m);
        else
            printf("Not Found");
Don't forget to remove your code after getting accepted. 8)

Re: 422 word search wonder

Posted: Tue Jul 29, 2014 6:23 am
by mgavin2
lighted wrote:My advice to you -> always copy/paste output format from problem description or sample.
...thank you... :oops: