422 - Word-Search Wonder

All about problems in Volume 4. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 422 word search wonder

Post by brianfry713 » Thu Jul 24, 2014 9:05 pm

The output is wrong, CSID is found at: 4,2 1,2
Post or send me your code if you need help.
Check input and AC output for thousands of problems on uDebug!

mgavin2
New poster
Posts: 43
Joined: Sat Jul 28, 2012 6:29 pm

Re: 422 word search wonder

Post by mgavin2 » Sun Jul 27, 2014 7:51 pm

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
Last edited by mgavin2 on Tue Jul 29, 2014 6:21 am, edited 1 time in total.
all that matters is AC

lighted
Guru
Posts: 585
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 422 word search wonder

Post by lighted » Mon Jul 28, 2014 1:42 pm

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)
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman

mgavin2
New poster
Posts: 43
Joined: Sat Jul 28, 2012 6:29 pm

Re: 422 word search wonder

Post by mgavin2 » Tue Jul 29, 2014 6:23 am

lighted wrote:My advice to you -> always copy/paste output format from problem description or sample.
...thank you... :oops:
all that matters is AC

Post Reply

Return to “Volume 4 (400-499)”