Hello everyone!
Problem B of last round (Educational 141) was a nightmare for me. And it was not the first time that I'm not able to solve the questions where we have to find an array or matrix based on certain conditions given in the problem statement.
Well the moment I see such questions I feel like:
Now my approach for solving such questions was pretty random and inefficient. But thanks to BledDest and MikeMirzyanov's post, I now have a better understanding to approach such problems. As I went to find out more problems based on this pattern to practice, I couldn't find many. Hence this blog!
I'm trying to compile the questions where we have to generate arrays/permutation/matrix based on certain conditions. If you have come across such question and feel that it's worth mentioning here, please comment down their links. It would really help me and others who are struggling with such pattern of questions.
PS: Feel free to comment down if you have your own way(apart from what BledDest and others mentioned) of solving such questions.
Few problems that I found on this pattern are:-
https://codeforces.com/contest/1758/problem/B
https://www.codechef.com/problems/POSPREFS