CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
Q&A Session with Sumeet Varma
Codeforces India #1
This Q&A Session has now ended but
Sumeet may still answer new questions
Hey there! I’m Sumeet Varma. I am extremely interested in Algorithms and Data Structures and so I do a lot of competitive programming. I am also a big fan of Counter-Strike, Politics and reading random answers on Quora.
My team (FruitSalad) came 1st in ACM ICPC ‘17 Kharagpur Regionals, 2nd in Kolkata Regionals and 7th in India Finals and we have qualified for World Finals. Also, I have been Red on Codeforces and the highest rated Indian programmer on Codeforces, Hackerrank and Topcoder in the past.
Currently, I am doing an internship at Directi (Bangalore) as a part of my project for final semester at DA-IICT, Gandhinagar.
Ask me anything!
Moderator note: We are very excited to host Sumeet for a Q&A session! He has a max rating of 2515 on Codeforces and 2173 on TopCoder, and you can see the graph going up consistently over the last 2.5 years. It's time to find out more about the person behind ...
How to find total numbers having frequency=kin a particular range(l,r) in a given array. There are total 10^5 queries of formatl,rand each query is built on the basis of previous query's answer. In particular, after each query we incrementlby the result of the query, swappinglandrifl>r. Note that0<=a[i]<=10^9. Total elements in array isn=10^5.
Thoughts on better platform for beginners: TopCoder vs CodeChef
CodeChef is probably better than TopCoder for beginners. Although there are enough practice problems of all difficulty levels on both the websites,
the Long CodeChef contest is quite a nice format. However, I’m not sure about how difficult the long contest problems are. The last time I checked (quite a while ago) they were increasing in difficulty quite rapidly.
Immediate feedback is also really nice when you are beginning. However, don’t let this get you into bad habits such as not testing your code thoroughly on your own. Everyone at TopCoder learns that skill. I did, and I appreciate it to date.
CodeChef is also a growing platform, whereas I think TopCoder SRMs is a dying platform. I owe a lot of what I have learnt to TopCoder, but it is what it is.
I would rather vote for commonlounge's CP community.
Best of all the worlds XOXO
Read more… (14 words)
Read (14 words)
[Codechef COOK82C] Hussain Set
Problem in short:
Hussain has a multiset of integers. In every move Hussain removes a maximum number from this multiset and divides it by 2 (integer division, which is rounded down) , and re-inserts it into the multiset.
Answer Q Queries, i-th query denoted by Q[i]. You must tell the number Hussain will be dividing in the Q[i]-th move (after Q[i]-1 moves in particular).
Constraints: N, Q <= 10^6. Elements of multiset are less than 2^63 (signed long long)
I have been trying hard to get AC for python solution following the same implementation of C++ codes cited here, but every time the judge returns TLE. Are there any insights to using python for this problem??
Hello everyone! I am Md Mahbubul Hasan from Bangladesh. I entered competitive programming world probably back in 2003 when I was in class 10. Unfortunately tutorials, editorials etc was not much available back then. Even there was not much of online competitions, except some regular monthly or bi-weekly contest at UVa, specially during the end of a year. It was difficult to access TopCoder from our country, even in 2005, because of slow internet and load shedding issues. We went to ACM ICPC World Finals in 2008 and 2009. Since then I am no longer devoted in programming contest as full time. But somehow I managed to float around in the same level through out the time. It was wonderful to compete with/against multi generation of contestants from our country. Nowadays I mostly take part in annual competitions where there is tshirt as prize. Even if it is not by performance, my luck does not disappoint me winning them in lottery!
Personally I have very low capacity hard disk (can't recognize people, can't recall names, even if you give me some problem which I solved a few days ago there is high probability that I would...