Editorial for Bedao Mini Contest 08 - WORDSEARCH
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Với mỗi truy vấn, ta chỉ cần thử mọi vị trí có thể của xâu ~S~ rồi kiểm tra. Cần code cẩn thận để tránh truy cập tràn mảng.
Độ phức tạp: ~\mathcal{O}(n \times m \times q \times max(n, m))~.
Comments