TooDumbToWin's blog

By TooDumbToWin, history, 6 years ago, In English

Hello Everyone!

I would like to invite you to participate in HackerEarth's August Easy '18. It will begin at 13:30 UTC, August 4, 2018

The problems have been prepared by me (TooDumbToWin) and vntshh. The problems have been tested by Lewin. I hope you'll find the problemset to be interesting.

You will be given 6 algorithmic problems to solve in 3 hours. Partial scoring will be used (you get points for passing each test case). Although the contest is targeted towards beginners, we hope even experienced problem-solvers find one or two problems to be interesting. The contest is rated.

As usual, the prizes will be awarded to the top 5 beginners (that is, programmers with a rating less than 1600 before the challenge starts):

  1. $100 Amazon gift card + HE t-shirt.
  2. $75 Amazon gift card + HE t-shirt.
  3. $50 Amazon gift card + HE t-shirt.
  4. HE t-shirt.
  5. HE t-shirt.

Good luck and have fun!

Edit: Contest begins in 15 minutes.

Edit2: The contest has ended. Congratulations to the winners. You can discuss the problems now.

Full text and comments »

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

By TooDumbToWin, 7 years ago, In English
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...

Thanks to radoslav11 for nice and short editorial in comments.

Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code 1
Code 2

Full text and comments »

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

By TooDumbToWin, 7 years ago, In English

Hello, Codeforces!

I would like to invite you all to the International Coding Marathon 2018, under the banner of Technex'18, IIT (BHU) Varanasi. It will take place on Thursday 15th February 2018, 20:05 IST. The contest will be held as a combined Div.1+Div.2 round which will be rated for participants from both divisions.

The problemset has been prepared by me (TooDumbToWin), DeshiBasara, hitman623, dhirajfx3, karansiwach360 and Enigma27. We would like to express our heartiest thanks to vintage_Vlad_Makeev and KAN for their constant help in preparing the contest and MikeMirzayanov for the amazing Codeforces and Polygon platforms. We also thank AlexFetisov and winger for their invaluable help in testing the problems.

Prizes

  • Overall 1st place: INR 35,000
  • Overall 2nd place: INR 25,000
  • Overall 3rd place: INR 15,000
  • 1st place in India: INR 10,000
  • 2nd place in India: INR 8,000
  • 3rd place in India: INR 6,000
  • 1st place among IIT (BHU) Varanasi freshmen: INR 1,000

Participants will have 2 hours to solve 7 problems. The scoring distribution will be announced soon.

Good luck everyone! Hope to see you on the leaderboard.

Update: Scoring is 500 — 1000 — 1500 — 2000 — 2500 — 2500 — 3000

Update 2: Thanks to all participants and congratulations to all the winners. The winners, who are eligible for prizes, will soon be contacted regarding the same.

Overall top 10

  1. Radewoosh
  2. fateice
  3. Um_nik
  4. laofudasuan
  5. dotorya
  6. 300iq
  7. LHiC
  8. ksun48
  9. wxh010910
  10. chemthan

Indian top 5

  1. PrashantM
  2. rajat1603
  3. Baba
  4. jtnydv25
  5. adkroxx

Some problem statements were not clear. We deeply regret the inconvenience caused.

The editorial has been posted here. This was first contest set by most of us, so please help us do better next time by filling this form.

Full text and comments »

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

By TooDumbToWin, history, 7 years ago, In English

I've been trying to solve this problem from Timus OJ using max flow. Since the constraints are small, it can be brute-forced easily (checking all subsets of teams). Can there be any possible solution using max flow?

Full text and comments »

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

By TooDumbToWin, history, 8 years ago, In English

Can anyone help me with this?

I've tried clearing Java cache and clearing problems in practice section and writing submission again.

I'm using Arena Applet version 7.1.3, KawigiEdit 2.1, Java(TM) Web Start 11.121.2.13-fcs with Java 1.8.0 on Ubuntu 16.04, 64-bit trying to submit SRM 506 Div 1 Easy.

Full text and comments »

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

By TooDumbToWin, history, 8 years ago, In English

Problem Statement: https://www.codechef.com/COOK73/problems/MADHAT

My implementation: http://ideone.com/u9Av7q

Here's what I did:

First, I assigned temp[i] to the index of kid with just higher IQ than IQ of kid at index i (as per the given data). filltemp is the recursive function to assign temp[i] to each i. (temp[i] for kid with maximum IQ is n) (Check example below for details)

Then, the answer should be the number of topological orderings in tree with directed edges from temp[i] to i, starting from kid with with maximum IQ.

To find the number of topological orderings, I used dfs as each branch of tree is independent.

I'm getting WA for this implementation, can anyone explain the test case that'll give WA on this?

Example:

n=4 x=[0,2,1,0]

I know following relations using x.

  • IQ[1]>IQ[0] since x[0]=0
  • IQ[2]<IQ[1] and IQ[3]<IQ[1] since x[1]=2
  • IQ[3]<IQ[2] since x[2]=1

So my temp becomes [1,4,1,2] and the edges in tree are 4->1, 1->0, 1->2, 2->3

The number of topological sorts are 3, which is the right answer for this test case.

Why number of topological orderings is the answer? Because, suppose I traverse the tree in this order: 1,2,0,3. Now I'll assign IQ of kids in decreasing order from n to 1 as per the sorting. That is, IQ[1]=4, IQ[2]=3, IQ[0]=2, IQ[3]=1.

Other topological orderings for this example are 1,2,3,0 and 1,0,2,3 which generates two other respective IQ array.

Full text and comments »

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

By TooDumbToWin, history, 8 years ago, In English

I ran these codes in custom invocation and got weird running times.


#include<bits/stdc++.h> using namespace std; int main(){ //Hi for(int i=0;i<5000000;i++)cout<<i<<" "; return 0; }

Run time: 2448 ms


#include<bits/stdc++.h> using namespace std; int main(){ for(int i=0;i<5000000;i++)cout<<i<<" "; return 0; }

Run time: 2901 ms

Can anyone explain why adding comment is having significant impact on running times?

PS: Changing comment affected run time slightly as well.

Full text and comments »

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

By TooDumbToWin, history, 8 years ago, In English

Hello Codeforces!

I noticed a Python script on github a few days back to email me when the ratings are updated just after a round (here). It just used to store rating before rating updation and check continuously if it has changed. It had an obvious bug. If there is no rating change after contest, it'll keep running.

So, it was changed and the number of contests was used to check if there has been any extra round with participation.

The idea is perfect but there is some bug due to which the newRating in latest contest is returned same as oldRating. Although after some time, it changes to actual new rating.

Email Screenshots:

Full text and comments »

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