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

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

What is this for?

It pains to see so many people struggling due to covid and even dying because of lack of help in our country. I find myself guilty and helpless every night thinking about it, being so far away and not being able to contribute in any way. People need help, they really do. If you are a student and looking for job opportunities, I can hear you out, provide some counselling and give you tips that might be useful in your career.

Who am I?

My name is Lokesh Khandelwal and I am a software engineer at Facebook. I was born and brought up in a small town, and did my undergrad in not so reputed university. Therefore, I can understand your situation if you come from a similar background. I have cracked interviews of famous companies like Amazon, Facebook, Google and have also been an interviewee myself. I have also gone offbeat and completed my Masters in Astronomy. I am a good listener and have traveled and lived in multiple countries, so I am aware of different and diverse cultures and work environments.

What can you ask?

Anything. It could be as simple as helping you decide your future goals or choosing career paths. If you are preparing for an interview, I could give you tips or could even do a mock round for you. Or if you want to know about what is it like to work in these big tech companies, I can reveal some inside setups, team structures, compensations to expect etc. If you are stuck in some problem, I can help solve that, especially if it is related to mathematics, physics or computer science. If you are thinking to moving to a place and wondering what is life like in Tokyo, or Singapore or Amsterdam or London, I can help you there too. In short, I will give you my 30 minutes, and you can Ask Me Anything.

What will I get in return?

In exchange for my time and service, all I am asking from you is to help with Rs.1000 or its equivalent to any LOCAL charity or club or organisation in your city. Local is important here, because looking at the situation, it feels like the help does not reach at the root level in proper and timely manner. There are many people around you who need help. If you are medically aware and equipped, you can help / donate oxygen cylinders or concentrators or medicines. People have lost jobs in covid and cannot get treatments or feed themselves, you could help them financially. Or you could give away that old gaming laptop / mobile phone to a child who cannot attend school anymore because of digital education. Look around yourself, you will surely find someone who needs help in your neighbourhood itself.

How does it work?

Once you have helped someone, book a time slot in my calendar here [ https://doodle.com/mm/lokeshkhandelwal/ask-me-anything ]. Send me a personal message with the proof of your help (receipt of local charity / picture of you helping someone needy) and I will then give you a zoom link and password to connect with me. In your message also mention what you are looking out for from me, so that I am prepared. The world needs us right now, and it is time we step up, help each other. Looking forward to meet you guys.

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

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

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

My roommates and me are planning a house party. Because of covid, the Dutch rules says that we can have a party as long as social distancing is maintained — each individual has to be at least 1.5m away from each other. This brings me to a cool real life problem — what is the minimum area required to fit N people such that each one maintains social distancing with everyone else. N > 2, since we are already 3 roommates :)

My guessed solution is to make everyone stand on the vertices of equilateral triangle, and then join these triangles to form hexagonal lattice (just like a cellular network). Hence the answer would be (N — 2) * area of equilateral triangle of side 1.5m. Is this correct?

If yes, a follow up question would be : What if I wanted to minimise the distance between the farthest people as well? Would I try to fit these triangles inside a square?

Will be nice to hear out solutions to both these problems, for any number of people (N).

 Quick Image for reference

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

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

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

Most probably, smart people here might have already thought about this, but still..

During the system test phase of Codecraft' 20, I observed many submissions failing around the 100th test case or so. To me, this seems like waste of processing power, to let the codes run till 100 submission and then figure out its failing.

Isn't it possible to sort the test cases by: - decreasing order of number of non-ac submissions - in case of tie, increasing order of average time spent in judging it.

There could be an evaluator thread (for example), which does this after every 100 submissions or so (or something better)?

Is this something too difficult to achieve with the current codeforces infrastructure? One possible difficulty I can imagine is the scenario to show test cases to users. Are there more issues?

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

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

Автор phantom11, 10 лет назад, По-английски

Hello All,

I invite you to participate in monthly medium contest of HackerEarth — November Rain (this time). There will be 5 problems in total and you will have 2.5 hours to solve them. The problems are comparable to Div-2 difficulty, though you won't find any cake walk problem. All you need is a HackerEarth account to participate in the contest.

Date & Time
Contest Link
Prizes — Top 3 winners to get HackerEarth T-shirts!

The problems have been prepared by me, and I thank the testers and editorialist for their contribution.

Problem Testers — Bidhan(4 problems), akashdeep(1 problem).
Problem Editorialist — ashish1610

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

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

Автор phantom11, 10 лет назад, По-английски

There are so many blogs coming up on codeforces everyday and we sometimes loose the blog which we are following which have got new comments. One of my friends, xorfire wanted something like this in his recent blog yesterday, in which I have also commented my idea, and so I decided to write a script to automate the procedure. Firstly thanks to xorfire for coming up with this idea.

You can download the zipped folder from here. Extract it to some folder name of your choice. Inside it you will find many files which are actually dependencies, but you need to open just notification.exe file. I will describe the the functionality now.

  • Username / Password fields -> Update them once in the beginning or whenever you want to change your username password. You do not need to write it every time.

  • Add Favorite Blog -> Add the complete URL of the blog you want to follow. Example -> "http://codeforces.me/blog/entry/12727" (quotes for clarity). You can add as many as you want one by one.

  • Manage stored blogs -> If you want to delete some blogs, click this button and it will show your complete list in a new window. There will be delete option beneath every URL. You can delete any number of them, and then close the popped up window.

  • Run Notifier -> This is the main thing. It will search all your favorite blogs and notify you for those which have new comments. It takes around 10 second for each blog (depends on your internet) . So run it and forget it for a minute (I assume you will not have more than 6-7 fav blogs, otherwise it will take more time). A new window will open where you will find the blogs which have new comments. These are click-able links and on clicking will redirect you to the concerned blogs.

I have made this in 8-9 hours and have given absolutely no time to beautify it. Also it was my first time to use GUI in python. So you may find it ugly, but it works well and that is what is important. Also I have made it for personal use of everyone. So don't try to be smart and do unnecessary things to hack it like writing some blogs which do not exist at all (It might fail & I don't mind it). I made it for the welfare and personal use of the community and also in quick time, so use it in the right spirit. There are no security measures , (your username and password are stored in a file in the same directory) , so do not use it in public systems. I have tested in on Windows 7 and Windows XP and it works fine on both.

I hope you all will like it!!!

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

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

Автор phantom11, 10 лет назад, По-английски

UPDATE : Version 2.0
Rewrote whole code (frontend + parser) from scratch. Here are the changes made(in order of importance in my view) :
- Fixed bugs in parser.
- Div 2 Rounds Unofficial find their place in the standings. (this and this. You can now see Div 2 standings of ONLY Officials, ONLY UnOfficals, as well as both.
- Added some internal securities
- Now have a about us page too. :)
- Much neater and a modular code.

Very often we are interested in knowing our position in our country for a contest. Unfortunately, Codeforces does not provide this feature. An ugly way to do it is to make friends with all your country people. But ofcourse that is ugly, and programmers are supposed to be smart.

So I decided to write a scraper and do it on my own. When I graduated this year, and had some time in my pocket, franky and I made this feature. Now that the script is ready, you can find all the contest's country wise standings here.

EDIT: I forgot to mention that those who have not filled in their countries here on codeforces, come under "Alien" in the country-wise standings. I request these people to fill in their correct nationality.

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

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

Автор phantom11, 11 лет назад, По-английски

I saw no blog on TCO Round 1A in codeforces.

So here are the information :

EDIT : UPDATED INFORMATION

  • Start time of the contest
  • Registrations begins 3 hours prior to start time and closes 5 minutes before.
  • Top 750 from this round will advance to round 2. There will 2 more rounds like this 1B and 1C.
  • Registrations are limited to first 2500 participants only.

Lets discuss problems here once the contest is completely finished.

UPDATE — The editorial of this round has been released. link

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

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

Автор phantom11, 12 лет назад, По-английски

TOP CAREER Virtual Study Abroad Fair -2013 Spring-” From Jan.23-Mar.31!

http://vf.topcareer.jp/?referrer=2712

Register and Participate from the URL above and win a great prize such as flight tickets to/from Japan, hotel coupons, online shopping cards, etc.!

You can also win an opportunity of internship offer from Fourth Valley Concierge Corporation, after you pass the screening process.

*Prize winners are chosen randomly from registered participants.

Participate in an online fair where you can find information about scholarship, admission, and etc.), virtually visit schools all around the world, and directly chat with schools’ representatives without actually flying all the way.

Join anytime (24hrs/day!), anywhere!

[Fair Information]

Name: TOP CAREER Virtual Study Abroad Fair -2013 spring-

Date: January 23, 2013 (Wed) – March 31, 2013 (Fri)

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

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

Автор phantom11, 12 лет назад, По-английски

Firstly a very happy new year to all coders here :) Hope this year brings lots of Accepted to you.

I have written this blog to help people who ask questions regarding how to change the handle. If you decide to change the handle, (and you thought twice about it, because it is irreversible and can be done only once) , this blog might help you.

This is a new year gift from codeforces and only valid for the first ten days.

Follow the mouse pointer and you are done!!!

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

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

Автор phantom11, 12 лет назад, По-английски

This is to remind you that the USACO December 2012 Contest is going to take place from tomorrow.The duration of the contest is 4 days.You can appear in the maximum of any of the 4 hour window during the contest.

Link to Contest Page .(to be updated before the contest starts )

Your Timezone.

You can use this blog space to discuss problems NOT during the contest but ONLY after the contest is complete.

UPD -> [Results]

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

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

Автор phantom11, 12 лет назад, По-английски

I am going to participate in the IIT, Kharagpur regional finals next week. Due to my semester exams , I could not devote much time to programming in the last 2 weeks. So I seek your help and advice.

How to go for it from now. Should I keep solving problems like I did for the whole year , or learn some new algorithms and practice them , or sit for 5 hours in an ICPC like environment and take practice tests ?? I personally want to learn new algorithms but I dont know if I am too late now.Your take ??

Also I have to make a 25 side reference material. I dont want to waste my time building it from scratch .So if any one has it ready , please share it with me .I promise not to duplicate it (in case you dont want it too , you can send me a message here .)I will make suitable edits to make it good for myself so it not wastes time.

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

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

Автор phantom11, 12 лет назад, По-английски

I was trying to solve the Problem H of the last contest.[problem link]

But I keep on getting Memory Limit Exceeded.Please some one tell me why this is happening .I am bringing here 3 codes. One from which I have learnt which gets accepted and the other two are mine. Please tell me why I get MLE in both cases and why 'B' got passed in test case 5 by making small change in 'A' (only change is made during the last for loop where printing is done) .

mfv code -> [link] accepted

case A ->[Link] fails on test case 5

case B ->[Link] fails on test 15

Please clear my concepts so that I dont face these issues in future.Thank You

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

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

Автор phantom11, 12 лет назад, По-английски

Topcoder SRM 559 is going to be held on Tuesday , 30th October 2012 at 21:00 EDT (your timezone)

The registration starts 3 hours prior to the match in the arena and is restricted to the first 2500 contestants .

You can discuss about the SRM here once it is over.(and also on the topcoder forum here).

Also , there is going to be a test round 2 from 2 hours from now in the arena (your timezone)

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

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

Автор phantom11, 12 лет назад, По-английски

Hi friends, During my practice I face this problem regularly. Some of the SRM's (and I practice on old SRM's) does not open for practice .It keeps on loading and loading , until I have to close it manually. For eg. SRM 355Div2,SRM 356Div 2 although SRM 354Div 2 opens up quickly. Is this problem that only I face?? How to get through it ?? Any other alternatives ??

This has also happened a lot in previous SRM's . But today I got really frustated and thought of asking help from you

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

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

Автор phantom11, 12 лет назад, По-английски

Here is the topcoder account of the founder and CEO of Facebook.[Link] .(courtesy red_coder ) .So all those rated above him, you cannot imagine how much potential you have . So never lose hope :)

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

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

Автор phantom11, 12 лет назад, По-английски

From Two days I am facing a lot of difficulties..Please help me out..

  • As usual I was training myself @topcoder problems but I was not able to enter the practice rooms although I was able to login into the chat arena.Is anyone facing the same problem/What is the solution then??.I posted in the topcoder forums but got no replies[link]..So I thought of posting it here in codeforces which I feel has more active community.
  • I was solving the USACO problem Mother's Milk[link].I solved it but I am getting TLE in the test case 20 10 9 which passes in my system in 2ms .I checked the number of times the recursive function is executed and it is only 24 for that case..Link to code..Please tell me why this is happeneing??

UPD: I had also reported the problem to the USACO team and after a few e-mail exchanges they came to the conclusion that the java grader was broken.They have fixed it now.And the above solution passes now :)

UPD2: Contacted [email protected] and mystic_tc fixed the issue.Thanks to him :)

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

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

Автор phantom11, 12 лет назад, По-английски

After this round my rating increased and I was back to blue with a rating of 1568 I think.. But in my profile it is showing the old rating of 1470 although they made me blue .. Is this only with me .??Or is this a bug in the system?? You can see the screenshot here

EDIT : I think it is with all ..They have shifted back to the old ratings for unknown reasons but forgot to change the color back..First time with less than 1500 and blue ;)

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

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

Автор phantom11, 12 лет назад, По-английски

I am organising a multiplayer event where each player has a rating (new player is assigned a rating of 1500) ..I want to have a good formula for calculating the new ratings after a competition..I searched the net and found the Elo rating system.This is what I have worked out thus far from the internet resources..:

From The ELo formula let P(B,A[i]) refer to the probablity that B defeats A[i] for all i.
Then total[B]=summation of all P(B,A[i]) for all i's 
Let n=number of participants..
Then Expected Rank[B]=n-total[B]
new rating=old rating+ k* (ExpectedRank[B] - ActualRank[B])

Now the issues:

1)I want to know what value of k should be employed .

2)I want to have a regualrity factor also so that a player who is consistently performing well and if some day performs badly his rating does not go too down .ie.ratings dont change drastically on good /bad performance in one match..

3)If this is not the best method to calclate ratigs in a multiplayer competition then which one should be used??Please give details , formulas also

Please help me out .Statistics is not my subject yet I need to get this thing done to complete my project

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

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

Автор phantom11, 12 лет назад, По-английски

The TopCoder Open 2013 registrations have begun.. The final will be held in Washington DC next year. You can register yourselves here.The logo and website designing competitions is going to start soon..

Also I take this blog to remind you of the SRM 548 whose registeration closes 15 mins from now..So those who have not registered please do it ASAP.

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

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

Автор phantom11, 12 лет назад, По-английски

Wishing Sir Alan Turing , the father of Computer Science and Artificial Intelligence a very happy birthday... And what a doodle in this warm occassion ..

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

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

Автор phantom11, 12 лет назад, По-английски

Got a very inspirational quote today which I wish to share with all my fellow coders:

"**Darkness is just the absence of light , it is not that light does not exist.**

Similarly a problem is just an absence of an idea , it is not that its solution does not exist."

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

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

Автор phantom11, 13 лет назад, По-английски

Hi!!I am not able to go to the handle option in the settings tab...I want to check that out Just for curiosity ,but its blocked by the system admin since a week or so...Or perhaps they have forgotten to unblock it....Anyone else facing the same problem??

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

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

Автор phantom11, 13 лет назад, По-английски

I was the lucky one to win the T-shirt of the lucky draw of SRM-528.I contacted topcoder services team and they told me that they had released it on 6th Jan 2012 and that the t-shirt would come to me within 10 weeks.But I have not received it till now...Could anyone tell me as to :

1) how will it reach me??(eg- registered post,courier ,or some contracted person etc.)

2)How do I claim for it??(For eg it comes through post then I have to show some docket number or some other document to claim it directly from the post office )Then how do I claim it??

I am an Indian Citizen...Apart from this ,I am also due for the NASA USPTO challenge T-shirt and the Accenture Mobile Survey T-shirt from topcoder...I wrote this in the topcoder forum but got no reply and I dont want to lose my special gifts ...Someone Please help???

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

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

Автор phantom11, 13 лет назад, По-английски

I submitted this code and the verdict was TLE. I just removed my printing statement which ran O(len(a)) times and it was accepted .Code . Strange behaviour and very strict time constarints. Could anyone explain why such thing happened...

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

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

Автор phantom11, 13 лет назад, По-английски

This is a gentle reminder to all coders that SRM 537 is going to happen on the coming Saturday i.e. 17th March.This round is sponsered by CITI ,so there is a total purse of 5000 USD.So gear up and get ready for the challenge.You can find the round details and timings here. You can get the exact prize divisions and a bit of discussion on the SRM on vexorian blog here.

A couple of SRM's back ,the registeration limit of 2500 members was reached some 5 minutes before the closing time.So dont be late or else you may miss a chance to grab some money. Good Luck and Best wishes to all :-)

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

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