infinitepro's blog

By infinitepro, history, 4 years ago, In English

The title states the problem — source. Constraints $$$N \le 25e4$$$

Full text and comments »

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

By infinitepro, history, 4 years ago, In English

The last post regarding the same on codeforces was quite some time back (and the one on codechef ended up trolling karangreat and being locked) and I think I need to revive it. Feel free to contribution farm post CP related memes down below (refrain from posting memes that doesn't involve cp; this is not r/ProgrammerHumor).

Some rules to be followed:

  • If you have multiple memes, post all of them under a single comment post them in a batch under one same comment.
  • If you wish to add more memes, create a new comment and post them. This is to prevent people from overlooking the new memes added.
  • Add spoilers to hide each meme, to not consume screen real estate.
  • Be friendly this is no place to troll karangreat.

Meme #1
Meme #2
Meme #3
Meme #4
Meme #5
Meme #6
Meme #7
Meme #8
Meme #9_1
Meme #9_2
Meme #10
Meme #11

Full text and comments »

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

By infinitepro, history, 5 years ago, In English

I recently found one site : https://codeforc.es/

Could someone please tell me if it's a phishing site or not?

Full text and comments »

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

By infinitepro, history, 5 years ago, In English

I was solving 877F today. My code kept TLE'ing on TC #11 while using both map<> and unordered_map<>. While skimming through the accepted solutions, I stumbled on this solution, which is exactly similar to my solution, but uses tr1::unordered_map<> instead of the regular std::unordered_map<>.

Unsurprisingly, changing my code to tr1::unordered_map<> gives an AC.

Now, I have some questions.

  • Is this relatively unknown implementation better than the regular unordered_map?
  • Can this ds be hacked similar to how unordered_map is hacked? If yes, how?
  • Are all the other variants like tr1::set<>, tr1::unordered_set<> etc better than the regular ones?

Full text and comments »

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

By infinitepro, history, 5 years ago, In English

Hello codeforces community, I want to present to you all my codeforces Virtual Contest Selector to find and participate in virtual contests with friends without any hassle.

Introduction

Have you ever wanted to participate in a virtual contest and compete along with friends? Have you faced the hassle of finding a common non-attempted contest to participate in?
This is the same problem I had while trying to find virtual contests and, like most other people, searched the net for a solution, but in vain(There was a bot on discord, but it has been discontinued.)
So finding no alternative, I decided to code my own finder. In any case, how hard could it be? Using the codeforces api, JS and random tutorials on the net, I made this simple, yet useful, virtual contest finder.

Usage

  • Enter the handle's of participants in the virtual contest. The handle's along with the rating will be added into a table.
  • Click on Show button on the right. All potential contests are displayed, along with the contest code.
  • Clicking on the name of the contest opens the contest dashboard on a new tab.

Points to be noted

  • A contest is excluded from the list only if a person has an AC solution in the contest.
  • For problems common to multiple divisions, only the division through which the problem was solved will be excluded.
  • If an invalid handle is added or a handle is repeated, no error messgase will be displayed, though the handle won't be counted or added to the table.

    Link to the Selector Github Link


Contributions and Feature Requests

  • As I learnt JS just a week back(for this project exclusively), my project is prone to inumerable bugs. Thus, if find any bugs, please don't file bug issues (as I don't know anything in JS, and I can't devote my time to learning it.) Instead, create a pull request addressing the issues.
  • This project was made using a CSS framework called — Semantic UI. You are free to use Bootstrap, if Semantic-UI can't accomplish the required implementation for new features.

Todo

  • Support Gym contests
  • Add colours to handle's added into the table(while maintaining the clean UI)
  • Extend contest participation criteria to problems common in multiple divisions.
  • Add alert messages for invalid handle inputs.

Update : Now you may filter contests on the basis of division. Select the option(s) corresponding to the divisions you wish to find and click on show! So, if you want to compete in a Div. 1 + Div. 2 combined round, select Div. 1 and Div. 2

Full text and comments »

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