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

Автор bansalarpan4, история, 23 месяца назад, По-английски

hlo , i m new to competitive programming . i have seen many pro competitive coders using sublime text (with input.txt , output.txt and error.txt files ) as in https://www.youtube.com/watch?v=r-ZoM2ex-uk&list=PLAj_13N2fk-SkD-A1cDAs-QpHGQcdnzoB&index=4

this setup really looks nice and useful does anyone know the steps to be taken o any tutorial for this set up ??

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

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится
Spoiler
»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

does anyone know what this line of code mean and how is this useful for competitive programming

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

  • »
    »
    23 месяца назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    It's a random number generater, constructed with seed chrono::steady_clock::now().time_since_epoch().count() . Random numbers are needed when we want to hash a string, and we need a seed changing rapidly by time to ensure it's randomness, otherwise the hash method can be easily hacked, just as what I'm doing these days on problem 1984D.

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I used this to configure it (for Linux, but is similar to Windows). As a build system I use this:

Linux
»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Use Notepad++ and all your problems will go away...