epsilon_573's blog

By epsilon_573, history, 2 years ago, In English

I recently watched a video by Matt Parker, who you might have seen a lot on the Numberphile Channel.

He shared an interesting problem in the video, which has attracted many coders to come up with faster solutions for the same or you can say speedrun?

He also made another video detailing the problem. Here's the podcast for the same.

For those of you lazy enough to go through the videos, here is the text version.

Problem:
Example:

I would like to see how the CP Community tackles this. As for the accepted wordlist, you can use any famous ones you can find such as this one.

Feel free to discuss approaches, and share your codes/times.

Full text and comments »

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

By epsilon_573, history, 3 years ago, In English

There have been moments when I just submit my solutions during the last minutes of the contest. But today was one of the best adrenaline rushes I have had while giving a contest. I didn't really like today's problem D because it was just "guessy", so I was struggling to find some pattern that worked. I thought of a solution in the last minutes and with my heart rushing went to coding it. My hands were trembling and I was struggling to implement the solution as my thoughts were all jumbled up. At around 1 minute, I took a look at the timer and the pressure was exhilarating. With just 15-20 seconds left, I finished the implementation and tested the samples. At around 11 secs, I opened the browser and clicked on the 'Submit Code' button. And at almost 1 sec, I submitted my solution. This was a great feeling, but I still hate the problem. :)

Full text and comments »

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

By epsilon_573, history, 4 years ago, In English

I made a Test Case Parser and it can parse test cases for your problem in just one keystroke.

Update : Contest Parser was also added

Download the github repo from here : AutomateOlympicCoding.

Video Walkthrough

How to Setup :

Video Walkthrough just explains parsing test cases for a single problem. Contest Parser was added later.

  • Install all the required dependencies.
  • Clone the github repo
  • Place the build file in Packages->User
  • Place automate.py and contest.py in the same folder as your main cpp solution file
  • In the latest version you don't need to rename anything, it will generate test cases with the same name as your working file

Parsing single problem :

  • Open your cpp solution file ( must be in the same directory as automate and contest.py )
  • Open the problem page on Chrome ( only works on chrome )
  • Open sublime text and build using automate build system ( Ctrl + Shift + B)
  • This plugin will create a test file with the same name as your solution file
  • Now just run your solution using FastOlympicCoding

Parsing a complete contest :

  • Create a template.cpp file ( must be in the same directory as automate and contest.py ) .
  • This file will be copied to all solution files when parsing the contest
  • Open any cpp file in the same directory ( preferably template.cpp )
  • Open the contest page on Chrome ( only works on chrome )
  • Open sublime text and build using automate-contest build system ( Ctrl + Shift + B)
  • This plugin will create a directory with the contest ID and it will contain cpp files for all problems with template copied into them and corresponding test files will be parsed with them.
  • Just open them and start solving.
  • Now just run your solution using FastOlympicCoding

Dependencies :

  • Install Python3.
  • pip install bs4
  • pip install pywinauto

You can support me on my Youtube Channel here : GGxEpsilon

Support for more platforms like CodeChef and Atcoder will be added soon.

Thanks for reading and feedback will be appreciated.

Full text and comments »

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

By epsilon_573, history, 4 years ago, In English

How do you guys cope up with anxiety before or during a round? I get really anxious in between rounds and usually stress eat snacks throughout the round. It helps me to stay calm and focus. How do you guys deal with your anxiety?

Full text and comments »

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

By epsilon_573, history, 4 years ago, In English

So I have been trying to read on some articles in attempt to solve the recent CodeChef Long. I came across this article but I cannot understand it. It asks us to build array $$$t[]$$$ using $$$d[]$$$ , and then tells us to find $$$d[]$$$ using maximum of a prefix of $$$t[]$$$ using segment tree. If we are already building $$$t[]$$$ using $$$d[]$$$ , why do we need to find $$$d[]$$$ again??

Thanks.

Full text and comments »

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

By epsilon_573, history, 4 years ago, In English

I have tried 20-30 times , using floor() and type casting but I can't seem to get AC. What is the problem here? Thanks for the help.

Problem : https://atcoder.jp/contests/abc169/tasks/abc169_c

// Author : Epsilon573
// If it works, don't touch it.

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

int main()
{
    ios_base :: sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll a; ld b;
    cin >> a >> b;

    ll c = b*100;

    cout << a*c/100LL;

    return 0;
} 

Full text and comments »

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

By epsilon_573, history, 5 years ago, In English

So I was looking through my WA verdict on today's Educational Round Problem C. It failed on the following case,

But when I run the test locally for the first 12 queries (couldnt access the full test case), It gives the expected output.

Submission : https://codeforces.me/contest/1342/submission/78206445

What is the problem here? I don't quite get it. Thanks for the help :)

Full text and comments »

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