TooDumbToWin's blog

By TooDumbToWin, history, 3 years ago,

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.

• +84

By TooDumbToWin, 4 years ago,
Code
Code
Code

Code
Code
Code
Code 1
Code 2

• +102

By TooDumbToWin, 4 years ago,

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

Indian top 5

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.

• +261

By TooDumbToWin, history, 4 years ago,

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?

• +3

By TooDumbToWin, history, 4 years ago,

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.

• +32

By TooDumbToWin, history, 5 years ago,

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.

• +7

By TooDumbToWin, history, 5 years ago,

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.

• +32

By TooDumbToWin, history, 5 years ago,

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: