You are not logged in. Please login at www.codechef.com to post your questions!

×

Please help me in SPOONS

https://ideone.com/gEwkxk

https://www.codechef.com/problems/SPOON <--question

I have used straight forward approach- check rows then column. any idea?

asked 11 Feb '18, 18:03

llgokull_007's gravatar image

2★llgokull_007
144
accept rate: 0%

converted to question 11 Feb '18, 22:28

vijju123's gravatar image

5★vijju123 ♦♦
15.5k12066

Can you share the link of your solution on codechef? ideone is giving me problems in opening. Also, the word must be contiguous, make sure you are checking that thing.

(12 Feb '18, 12:54) vijju123 ♦♦5★

Note that in your code in Line 14, j[0+i:6+i] is a list of length 6 (5 when i==col-5). If a spoon is in the middle of a row, for instance, this case:

sspoonn

Your code can't find the spoon. To avoid it, simply change j[0+i:6+i] to j[0+i:5+i] and you will get Accepted.

Your Code: https://www.codechef.com/viewsolution/17406291

Accepted Code: https://www.codechef.com/viewsolution/17651706

The only difference between these two codes are mentioned above.

link

answered 05 Mar '18, 07:53

wangrq's gravatar image

5★wangrq
1928
accept rate: 0%

edited 05 Mar '18, 07:55

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,738
×1,070
×862
×10

question asked: 11 Feb '18, 18:03

question was seen: 271 times

last updated: 05 Mar '18, 07:55