anishde85's blog

By anishde85, history, 5 years ago, In English

isn't sortedcontainers not allowed in codeforces?

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Assuming you are talking about C++, I'm wondering how did you become an expert without using maps/sets even once. Strange :O

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i am talking about python. Sortedcontainers are in python only:|

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    normal sets are not sorted in python.

»
5 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Sorted Containers is an open-source project which can be installed as a separate package. Talking of Codeforces, no you cannot use it here. You may use heapq for that. If you want to compare objects then you need to define a separate comparator function for that purpose.