[Solution] Segmentation Fault CodeChef Solution | Codechef Solution
There are people numbered from to such that:
- Exactly one of these people is a thief and always lies;
- All the others are honest and always tell the truth.
If the person claims that the thief is one person out of , determine how many people could be the thief.
It is guaranteed that at least one person can be the thief.
Input Format
- First line will contain , the number of test cases. Then the test cases follow.
👇👇👇👇👇
- First line of each test case will contain , the number of people. lines follow.
- The line contains two space-separated integers - and , the range of people amongst
Enough Space CodeChef Solution
Chef Drinks Tea CodeChef Solution
High Accuracy CodeChef Solution
Xor Permutation CodeChef Solution
- which the person claims the thief is.
Output Format
- For each test case, in the first line, output , the number of possible thieves.
- In the next lines, output the list of people that could be the thieves, in ascending order.
Constraints
- Sum of over all test cases does not exceed .
- It is guaranteed that at least one person can be the thief.
No comments:
Post a Comment