LIAR - Truth or not
Professor Millman hates us, and worse, characterizes us as liars. We don’t care if he means it or not, but we (more professional that him!) planned to give the lower and upper bound on the number of liars in the class (so that you know what happens the next time he scolds us! ).
To start with we took a survey of all students in the class. Each student gave a reply about every student saying whether that student is a liar or not. These answers are in the form of a Matrix A, where A[i][j] represents the reply given by the i-th student about the j-th student. If that character is ‘L’ – it means he/she is a liar; if it’s ‘T’ – then it means that, that student is a truth speaker.
We take the following as our definition of the terms Truth-Speaker, and Liar:
Truth-Speaker (‘T’): All his/her replies are true.
Liar (‘L’) : (S)he has made at least one false reply.
T – the number of test cases; For each test case :
N – total number of students in the class
Matrix A of NxN characters, without space separation;
For i-th test case output one line of the form “Class Room#i contains atleast A and atmost B liars”, where A and B are the lower and the upper bounds on the number of liars respectively. If there is a paradoxical class room, instead of the above line, print “Class Room#i is paradoxical”.
T<=50; Our class rooms contain atmost 70 students.
Class Room#1 is paradoxical
Class Room#2 contains atleast 0 and atmost 3 liars
Class Room#3 contains atleast 3 and atmost 4 liars
Class Room#4 contains atleast 4 and atmost 4 liars
Here a paradox occurs if a person can't be classified as a liar or a truth-speaker.