Memory limit exceeded on test 4

Revision en1, by cercatrova, 2020-09-24 23:22:29

https://codeforces.me/contest/977/problem/D I am getting error in this problem. I have been trying to fix the error, but still getting "Memory limit exceeded on test 4" message. Please, help me to fix this problem. Here is my submission. https://codeforces.me/contest/977/submission/93731036 Thank you.

Tags #dfs and similar, #math, #sorting, *1400

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English cercatrova 2020-09-24 23:22:29 446 Initial revision (published)