Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

SPOON - Editorial

$
0
0

PROBLEM LINKS

Practice
Contest

DIFFICULTY

HARD!! // Actually it is CAKEWALK !! Nice Scare :D

EXPLANATION

This was the easiest problem of the set. All one had to do is to examine all start positions (i,j) and make one horizontal check for 5 consecutive characters and one vertical scan. Refer to setter's or testers solution for a reference. Somethings to take care of :

  • Match performed should be case-insensitive.
  • Beware of boundaries. Check (i,j) for horizontal match only if there are 5 or more characters. Same for vertical.
  • Be sure not to go out of the boundary - off by 1 errors are common.

SETTER'S SOLUTION

Can be found here.

TESTER'S SOLUTION

Can be found here.


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>