Adibov's blog

By Adibov, history, 5 years ago, In English

What's wrong with unordered_map? Shouldn't be faster than map? I just submitted two solution with map and unordered_map and first one got TLE while second one got ACC. Could you please say why?

TLE: 48262291

ACC: 48262284

Even i reserved it: 48262508

Full text and comments »

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

By Adibov, history, 5 years ago, In English

Hello there :)

In past contest(Codeforces Round #519 by Botan Investments) in Problem D i wanted to hack a solution and i wrote a code that make a text file and when i submitted that file, I found that it can't be more than 256 KB so i wrote this (My code) code for generating test and i get this error Validator 'validator.exe' returns exit code 3 [FAIL Expected EOLN (stdin)]. I don't have any idea what is it, so could you help me?

Full text and comments »

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

By Adibov, history, 5 years ago, In English

I was thinking on a problem and i figure out an interesting problem that i can't solve it so could you help me?

We have an undirected weighted graph and Q queries. Each query has two vertices u and v. For each query erase all of edges between one of the path from v to u, so that sum of all weight of edges that has been erased from all queries become maximized.

I have no idea about time complexity, so there is no limit for n and Q. And if you have seen this problem before please give me the URL.

Thanks. :)

UPD : We want that sum of all queries become minimized.

Full text and comments »

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