__noob___'s blog

By __noob___, history, 6 years ago, In English

Can anybody tell me how to sort using Comparator in C++ in any specific order what are the condition required for such sorting and also what is the time complexity for sorting using comparator.
Example sort the pairs (1,2),(3,4),(6,10),(7,2) on the basis of if( ( a1 / b1 ) < ( a2 / b2 ) ) then (a1,b1) pair should come first in the order.

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By __noob___, history, 6 years ago, In English

Can anybody tell me how to solve the problem Extending Set of Points from Educational Codeforces Round 62. I have tried to read the editorial but still not getting the idea about how to solve that Problem.

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it