Professional Documents
Culture Documents
Assign 002 (Required): Where is the love? | Programming Challenge | RNC Recario Page 1
Input:
Two inputs are provided: an input N (0 < N <= 10000) giving the size of the board (NxN) and a filename F
containing the NxN matrix of characters. Assume that F is a text file and that the length of the filename F
is no more than 30 characters (inclusive of “.txt”). Also assume that the C file and the text file are in the
same directory.
Output:
Indicate whether the word “love” (only in lowercase) can be found in the file in both horizontal and
vertical fashion. If “love” is not found, write “no love”. If board size is not within the acceptable range or
file name does not exist, write “error”.
Example:
Input File contains Output
0 sample.txt a error
4 love.txt love 2
olov
vlov
evol
Assign 002 (Required): Where is the love? | Programming Challenge | RNC Recario Page 2
Scoring:
TEN-ta-Cruel
● Be part of the first ten students who finishes the program correctly before 12:00 PM of
March 3 (Saturday) and earn a maximum of 15 points out of 10 points.
First Runner
● If you are not part of the first ten, submit the correct program until March 3 (Saturday) 5PM
and earn a maximum of 10 points out of 10 points.
ParaYouCanChill
● Submit the correct program March 3 (Saturday) 5:01:01 PM until March 5 (Monday) 5PM and
earn a maximum of 8 points out of 10 points.
AverageJuan
● Submit the correct program March 5 (Monday) 5:01:01 PM until March 7 (Wednesday) 5PM
and earn a maximum of 7 points out of 10 points.
BeatingTheRedLight
● Submit the correct program March 7 (Wednesday) 5:00:01 PM until March 9 (Friday) 7PM
and earn a maximum of 6 points out of 10 points.
Notes:
● Plagiarism will not be tolerated and will be dealt with.
● Do not share your code or solution with others.
● Document your work.
● Students with questionable codes will not receive the maximum points and will be asked by the
lecturer to explain their output.
● Multiple submission is not allowed. The first submission will be recognized.
● Assume for the inputs to be correct if not stated in the problem to be considered (e.g, N is not
negative or N is a number or the file contains the same numbers of characters per line).
● You are graded because of compliance with test cases, good coding practice and soundness of
solution (spot checks with your solutions will be done).
Assign 002 (Required): Where is the love? | Programming Challenge | RNC Recario Page 3