CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
[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)
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 ...
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...
There are N star systems in the space, connected by M wormholes. Each wormhole can teleport you from a system A to system B (you cannot teleport in the opposite direction).
Each wormhole has a fixed time shift T (negative or positive). If it's positive it will take you from system A to system B and you will land T years after. If T is negative, it will take you from A to B and land T years before (in the past).
You are asked to determine the star systems such that for each of them, you can start a journey there and keep traveling in the past (via wormholes) infinitely, so you can watch the Big Bang :)
Shiv Pratap Singh asked me a bunch of questions about the Facebook internship application. I can't be 100% sure about the application specifics, but 95% certain based on my past experiences.
Shiv: I am in 2nd year in my college and next semester I will be looking for internships. I saw from your linkedin profile you interned at FB. I gave FB Hacker Cup first time and qualified upto 2nd round. Can you help me for that in any way?
Keshav: FB likes people who are active in CP and perform well. Just submit your resume on their website. If you know anyone in FB (same college, etc), contact them and tell them you submitted your resume. But you don't need to do more than that. Just need to submit resume and tell someone inside the company to make sure it gets looked at. If they come to your campus, that would be the better place to do it.
Shiv: So, you also performed in hackercup to get internship? I have 1856 rating on CF just -44 from purple. I think my CP skills are good because CodeNation organized their Internship challeng...