Блог пользователя I_am_Heisenberg

Автор I_am_Heisenberg, история, 6 лет назад, По-английски

In the previous contests during the contest time if I kept any problem or dashboard window open, my internet data was constantly flowing at the rate of about 100-150 Kbps, though I was not doing anything at that window. Probably the constant background ranking updating caused the data loss. As a mobile data user it was a matter of concern for me and I used to keep data connection off during solving the problem and switch it on while submit solution to reduce the data loss.
However, in today's contest I noticed that there was no background data loss at all during contest time! Everything was normal and I felt free to keep my data connection all time. I don't know if it's caused by enhancement of Codeforces's server or something but I am happy about it. :)

Полный текст и комментарии »

  • Проголосовать: нравится
  • +31
  • Проголосовать: не нравится

Автор I_am_Heisenberg, история, 6 лет назад, По-английски

Hi! Suppose, I have several integer elements like this:

(3 9 1), (1 5 2), (2 8 3), (1 4 4), (1 6 5), (1 5 6).

Now I want to sort the elements like vector of pairs are sorted. Only difference is that instead of 2 keys we have 3 keys here. After sorting the elements will look like:

(1 4 4), (1 5 2), (1 5 6), (1 6 5), (2 8 3), (3 9 1).

Is there any STL or other techniques to achieve this? I found out about "Tuples" but having some problems to understand this well. Can you guys help me in any way please? May be by providing useful links or Explaining the process.

Thanks.. :)

UPD: I got my ans here: https://stackoverflow.com/a/50106878/6928946

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится