ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1067. Disk Tree

If you have WA5
Posted by tproger 4 Mar 2018 23:08
If you use set<A*> or std::sort/std::stable_sort vector/array of pointers, your comparator won't work, because you need special comparator, like this

struct APtrCmp
{
  bool operator()(const A* lhs, const A* rhs) const  { /* implement logic here */ }
};
set<A*, APtrCmp> yourSet;

Good luck! ;)