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

Автор epsilon_573, история, 2 года назад, По-английски

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.

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

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

Автор epsilon_573, история, 3 года назад, По-английски

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. :)

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

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

Автор epsilon_573, история, 4 года назад, По-английски

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.

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

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

Автор epsilon_573, история, 4 года назад, По-английски

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?

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

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

Автор epsilon_573, история, 4 года назад, По-английски

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.

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

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

Автор epsilon_573, история, 4 года назад, По-английски

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;
} 

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

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

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

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://mirror.codeforces.com/contest/1342/submission/78206445

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

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

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