kingofnumbers's blog

By kingofnumbers, 5 years ago, In English

I invite you to experience 3 hours of uninterrupted coding experience at the January Lunchtime. This 3-hour contest will offer 5 challenging problems to solve. A showdown to reach the top spot. So sharpen your coding skills and get ready to pack your Lunchtime with a box of Code.

The problem statements of the contest will be available in English, Hindi, Bengali, Russian, Mandarin, and Vietnamese. Also, if you have some original and engaging problem ideas, and you’re interested in them being used in the CodeChef's contests, you can share them here: www.codechef.com/problemsetting/new-ideas.

I hope you will participate with your fellow programmers and enjoy the contest problems. Joining me on the problem setting panel are:

  • Setters:kingofnumbers (Hasan Jaddouh), Ashish (Ashish Lal), Farhod (Farhod Farmon), infinitepro (Adithya Dsilva), KharYusuf (Yusuf Kharodawala)

  • Tester: teja349 (Teja Vardhan Reddy)

  • Editorialist: taran_1407 (Taranpreet Singh)

  • Statement Verifier: Xellos (Jakub Safin)

  • Mandarin Translator: qingczha (Qingchuan Zhang)

  • Vietnamese Translator: Team VNOI

  • Russian Translator: Mediocrity (Fedor Korobeinikov)

  • Bengali Translator: solaimanope (Mohammad Solaiman)

  • Hindi Translator: Akash Shrivastava

Contest Details:

  • Time: 25th January 2020 (1930 hrs) to 25th January 2020 (2230 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.
  • Contest link: www.codechef.com/LTIME80
  • Registration: You just need to have a CodeChef handle to participate. For all those who are interested and do not have a CodeChef handle, are requested to register in order to participate.
  • Prizes: Top 10 Indian and top 10 Global school students from ranklist will receive certificates and CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here. Good Luck!
    Hope to see you participating!!
    Happy Programming!!

Full text and comments »

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

By kingofnumbers, 6 years ago, In English

Hello CodeForces Community!

We’re back with a new and exciting set of coding challenges with the July Cook-Off 2018 sponsored by ShareChat. Plus there are some exciting job/internship opportunities by ShareChat for participants. More details on the July Cook-Off contest page here:

Looking forward to seeing your participation in yet another exciting monthly contest! Joining me this time on the problem setting panel are:

  • Problem Setters: kefaa (Kirill Gulin), kingofnumbers (Hasan Jaddouh)
  • Problem Tester: isaf27 (Ivan Safonov)
  • Editorialist: vijju123 (Abhishek Pandey)
  • Statement verifier: Xellos (Jakub Šafin)
  • Russian Translator: Mediocrity (Fedor Korobeinikov)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Vietnamese Translator: (VNOI Team)

Contest Details:

Time: 22nd July 2018 (2130 hrs) to 23rd July 2018 (0000 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone

Contest link: codechef.com/COOK96

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://discuss.codechef.com/questions/51999/how-do-i-win-a-codechef-goodie
(For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck!

Full text and comments »

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

By kingofnumbers, history, 7 years ago, In English

CodeForces Community! We’re happy to announce the 60th edition of your beloved three-hour coding jam. Yes, it’s time for LTIME60 for the month of May. Looking forward to having you join in the fun! Joining me this time on the problem setting panel are:

  • Problem Setter: TianyiQ (Tianyi Qiu), kingofnumbers (Hasan Jaddouh)

  • Problem Tester and Statement Verifier: Xellos (Jakub Safin)

  • Problem Editorialist: vijju123 (Abhishek Pandey)

  • Russian Translator: CherryTree (Sergey Kulik)

  • Mandarin Translator: huzecong (Hu Zecong)

  • Vietnamese Translator: VNOI Team

Contest Details:

Time: 26th May 2018 (1930 hrs — 2230 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Contest link: https://www.codechef.com/LTIME60

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes:

Full text and comments »

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

By kingofnumbers, 7 years ago, In English

Hello CodeForces Community!

I hope the month of February was one filled with programming escapades for you! To provide you with more coding action, here is the February Lunchtime 2018 featuring 4 interesting programming challenges!

I hope you will join your fellow programmers and enjoy the contest problems. Joining me on the problem setting panel are:

  • Problem Setter: kingofnumbers (Hasan Jaddouh)
  • Problem Tester: mgch (Misha Chorniy)
  • Problem Editorialist: .o. (Suchan Park)
  • Statement verifier: Xellos ( Jakub Safin)
  • Russian Translator: CherryTree (Sergey Kulik)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Vietnamese Translator: VNOI Team

I hope you will enjoy solving them. Please give your feedback on the problem set in the comments below, after the contest.

Contest Details:

Time: 24th February 2018 (1930 hrs) to 24th February 2018 (2130 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Contest link: https://www.codechef.com/LTIME57

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://www.codechef.com/laddu.
(For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck!
Hope to see you participating!!
Happy Programming!!

Full text and comments »

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

By kingofnumbers, history, 7 years ago, In English

Hello CodeForces Community!

We hope you all had a great time participating in November Long Challenge. Now it’s time to buckle up again and compete in November Cook-Off. So hurry up, note down the details and be there. Joining me on the problem setting panel are:

  • Problem Setter and Admin: kingofnumbers (Hasan Jaddouh)
  • Problem Tester: RetiredAmrMahmoud (Amr Mahmoud)
  • Problem Editorialist:likecs (Bhuvnesh Jain)
  • Russian Translator: CherryTree (Sergey Kulik)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Vietnamese Translator: VNOI Team

I hope you will enjoy solving them. Please give your feedback on the problem set in the comments below, after the contest.

Contest Details:

Time: 19th November 2017 (2130 hrs) to 20th November 2017 (0000 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Contest link: https://www.codechef.com/COOK88

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes:

  • Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://www.codechef.com/laddu. (For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck! Hope to see you participating!!

UPD: 90 minutes to start!

Full text and comments »

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

By kingofnumbers, history, 7 years ago, In English

Hello CodeForces Community!

With ACM ICPC regionals round the corner, you surely wouldn’t want to miss the opportunity to learn and practice your coding skills. And, here, I would like to invite you all to CodeChef’s September Long Challenge. Get your brains working for ten days of coding. Joining me on the problem setting panel, we have:

I hope you will enjoy solving the problems. Please give your feedback on the problem set in the comments below after the contest.

Contest Details:

Time: 1st September 2017 (1500 hrs) to 11th September 2017 (1500 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Details: https://www.codechef.com/SEPT17

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: * Top 10 global and top 20 Indian winners get 300 Laddus each, with which the winners can claim cool CodeChef goodies. Know more here: https://www.codechef.com/laddu. (For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck! Hope to see you participating!!

Full text and comments »

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

By kingofnumbers, history, 7 years ago, In English

Hello CodeForces Community!

I would like to invite you to take part in August Challenge 2017 (https://www.codechef.com/AUG17). The contest promises to deliver on an interesting set of algorithmic problems with something for all. As always, the long contests will start on first Friday of every month and last for 10 days. This ensures that two weekends are covered. Joining me on the problem setting panel, we have:

I hope you will enjoy solving the problems. Please give your feedback on the problem set in the comments below after the contest.

Contest Details:

Time: 4th August 2017 (1500 hrs) to 14th August 2017 (1500 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Details: https://www.codechef.com/AUG17

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: * Top 10 global and top 20 Indian winners get 300 Laddus each, with which the winners can claim cool CodeChef goodies. To know more about Laddus, check here: https://www.codechef.com/laddu and to know more about New Prize Categories, check here: https://blog.codechef.com/2017/03/03/new-goodies-new-categories-new-prizes-every-contest/. (For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck! Hope to see you participating!!

Full text and comments »

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

By kingofnumbers, history, 7 years ago, In English

Hello everyone!

I would like to invite you to participate in Hackerearth July Circuits 2017. It's a long contest that will start on July 28, 2017, 09:00 PM IST (already started) (check your timezone). Contest will run for 9 days.

The problemset consists of 7 traditional algorithmic tasks of various difficulties and 1 approximate problem. For traditional algorithmic tasks, you will receive points for every test case your solution passes — so you can get some points with partial solutions as well. For the approximation task, your score depends on the best solution in the contest so far. Check contest page for more details about in-contest schedule and rules.

As usual, there will be some nice prizes for the top five competitors:

  • $100 Amazon gift card + HE t-shirt.
  • $75 Amazon gift card + HE t-shirt.
  • $50 Amazon gift card + HE t-shirt.
  • HE t-shirt.
  • HE t-shirt.

Good luck to everyone, and I hope to see you at the contest :)

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

Hello everybody,

Errichto has been inaccessible for a month now, not replying anyone on FB nor hangouts even though he become online sometimes (maybe he is not actually online?), he is also no logging into his account on CF.

The fact that he is a contest admin in codechef and he is no longer administrating the contests suggests that there's a strong reasons for his absence from the internet for this long period.

if anyone know about his circumstances please let us know, we hope he is fine!

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

Hello CodeForces community,

SnackDown 2017 Pre-Elimination Rounds have finally concluded. We saw over 12K teams joining us for the Pre-Elimination Rounds, out of which 3403 teams (who were in top 1000 ranks of each of the Pre-Elimination Rounds) have been qualified for the Elimination Round.

Now, while we prepare to step into the Elimination Round, I would like to introduce the problem setting panel for the contest.

Problem setters: arjunarul (Arjun Arul), kingofnumbers (Hasan Jaddouh),Pepe.Chess (Hussain Kara Fallah), nssprogrammer (Snighda Chandan), Mediocrity (Fedor Korobeinkov), mgch (Misha Chorniy), fudail225 (Fudail Hasan)

Problem testers: kingofnumbers (Hasan Jaddouh), mgch (Misha Chorniy), Mediocrity (Fedor Korobeinkov), Alex_2oo8 (Alexey Zayakin)

Translators: Mandarin : huzecong (Hu Zecong), Russian : CherryTree (Sergey Kulik), Vietnamese : VNOI team.

Contest Admin: PraveenDhinwa (Praveen Dhinwa)

I thank each and everyone of them for their contribution in preparing the problem set.

Given below are the details of the contest

Additionally, we are also conducting a replay round of the Elimination Round for the rest of the community. It will take place at https://www.codechef.com/SNEL17RP and the top three winners of the contest will win cool SnackDown 2017 t-shirts. I would take this opportunity to invite the entire community to come and join us for the Replay of SnackDown 2017 Elimination Round.

Details of the SnackDown 2017 Elimination Round Replay:

Accepted Languages: https://www.codechef.com/wiki/list-compilers

Note: The Elimination Round will follow ACM ICPC style ranklist.

We hope you will enjoy the problems and we welcome your feedback in the comments below.

Good Luck!

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

Hello CodeForces Community! I would like to take this opportunity to extend this invitation for CodeChef May Cook-Off. As usual it is scheduled for the second last Sunday of the month.

Joining me on the problem setting panel, we have:

  • Problem setter: Pepe.Chess (Hussain Kara Fallah)

  • Testers: kingofnumbers (Hasan Jaddouh) and iscsi (Istvan Nagy)

  • Editorialist: T1duS (Udit Sanghi)

  • Language Verifier : arjunarul (Arjun Arul)

  • Russian Translator : CherryTree (Sergey Kulik)

  • Mandarin Translator: huzecong (Hu Zecong)

  • Vietnamese Translator: VNOI Team

You will be provided by 5 problems of various difficulties to solve during 2 hours and 30 minutes, I have found the problemset very interesting and I recommend coders of various skills to participate especially GrandMasters, please feel free to provide your feedback in the comments section after the contest, I hope you will enjoy solving the problem set.

You can find the rest of the details about the contest below.

Time: Sunday, 21st May, 2017 at 21:30 HRS (IST) (Indian Standard Time — +5:30 GMT) — Check your timezone.

Details: https://www.codechef.com/COOK82

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://www.codechef.com/laddu. (For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck! Hope to see you participating!!

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

Hello everyone!

I would like to invite you to participate in Hackerearth May Circuits 2017. It's a long contest that will start on May 19, 2017, 09:00 PM IST (check your timezone). Contest will run for 9 days.

The problemset consists of 7 traditional algorithmic tasks of various difficulties and 1 approximate problem. For traditional algorithmic tasks, you will receive points for every test case your solution passes — so you can get some points with partial solutions as well. For the approximation task, your score depends on the best solution in the contest so far. Check contest page for more details about in-contest schedule and rules.

I'm the tester of the problemset — thanks to architrai, Arterm, harshil and imamit for preparing these tasks. Editorials will be provided to you by saatwik27

As usual, there will be some nice prizes for the top five competitors:

  • $100 Amazon gift card + HE t-shirt.
  • $75 Amazon gift card + HE t-shirt.
  • $50 Amazon gift card + HE t-shirt.
  • HE t-shirt.
  • HE t-shirt.

Good luck to everyone, and I hope to see you at the contest :)

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

Hello CodeForces Community! I would like to take this opportunity to extend this invitation for CodeChef February Cook-Off. As usual it is scheduled for the second last Sunday of the month.

Joining me on the problem setting panel, we have:

  • Problem setter and Editorialist: kingofnumbers (Hasan Jaddouh)

  • Contest Admin:PraveenDhinwa (Praveen Dhinwa)

  • Tester: Errichto (Kamil Debowski)

  • Language Verifier : arjunarul (Arjun Arul)

  • Russian Translator : CherryTree (Sergey Kulik)

  • Mandarin Translator: huzecong (Hu Zecong)

  • Vietnamese Translator: VNOI Team

I hope you will enjoy solving the problem set. Please feel free to provide your feedbacks in the comments section after the contest. You can find the rest of the details about the contest below.

Time: 19th February 2017 (2130 hrs) to 20th February 2017 (0000 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Details: https://www.codechef.com/COOK79

Registration: You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Prizes: Top 10 performers in Global and Indian category will get CodeChef laddus, with which the winners can claim cool CodeChef goodies. Know more here: https://www.codechef.com/laddu. (For those who have not yet got their previous winning, please send an email to winners@codechef.com)

Good Luck! Hope to see you participating!!

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

Hello CodeForces Community!

After a series of four ICPC regionals in India (Amritapuri, Chennai, Kharagpur, Kolkata), the top teams from the respective regionals have been shortlisted and they will now compete at the final leg of the ACM ICPC Asia India regionals — ACM ICPC India Final 2016. Over 90 top teams have geared for the Final which makes it an exciting battle to watch. My best wishes to all the teams who are competing tomorrow.

Further, I would like to invite you all to the parallel mirror contest which will be take place at ACM-ICPC Asia — India Final Onsite Mirror Contest.

For those who are preparing for the ICPC onsite regionals this would serve as an ideal platform to practice as it would simulate the real onsite contest.

Contest Details

Time: 30th December 2016 (1100 hrs) to 30th December 2016 (1600 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Contest link: https://www.codechef.com/INF16MOS

Registration: You just need to register as a Team on CodeChef. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Good Luck! Hope to see you participating!!

Note: The mirror contest will run in parallel to the main contest with an hour delay.

Full text and comments »

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

By kingofnumbers, history, 8 years ago, In English

note: this is just sarcastic blog

Here are the steps to follow in order to perform well in codeforces contests:

1- Have a fast internet connection: codeforces servers might be heavily loaded and be down, but during the down period the server might be up for short moments, and if you have fast connection you can catch theses moments and get chance to open the problems or submit your solution, also when you finsh coding a solution in the last minute you need fast connection to quickly submit

2- read all the old problems on codeforces: admins nowadays allow problems to be repeated or to be very similar to some old problem (or at least they don't take care to avoid that), so if you read all problems on codeforces (you don't have to solve them) you can know that a problem is repeated and copy/paste one of the solutions of the old problem, you might take some time to find the old problem but it can still be less time than to solve it.

3- practice your googling skills: sometimes the problem might be very classical and it can be found on google, sometimes it can be easily found and sometimes you need to try different wording to find it so you need to practice how to search on google.

4- don't forget about oeis.org: if the problem have a single integer in input you might find the solution in oeis.org

5- keep watching blogs and comments during the contest: admins nowadays don't remove comments and blogs (or at least they don't watch them) which spoil the solution of a problem, so if you keep watching the comments and blogs during the contest you might get a solution for free

6- try out brute force solutions before the contest end: it is very often that a contest contains at least one problem which allow brute force solution either because of genernous time limit or because of weak test data

7- get used to C++ if you are not: the time limit on codeforces is the same for all languages, so if you use fast language you will have advantage over the slow languages, specially when you try to write brute force solution as mentioned in previous step

8- keep with you templates of famous data structures and algorithms: sometimes a problem on codeforces is very easy to find the correct approach, but it just needs some well-known DS which takes a lot of time to implement so if you have it beforehand you might only need to do some trivial modifications before you are ready to submit

9- also you can practice your problem solving skills, but this is not very important step compared with all the steps above

Full text and comments »

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

By kingofnumbers, 8 years ago, In English

Hello Programmers!

I would like to invite you to participate in June Cook-off, it will start at Sunday, 26th June, 2016 at 21:30 HRS (IST), and will last for 2.5 hours, The contest will have 5 algorithmic problems of varying difficulties. the link to contest here.

  • Problem Setter: kingofnumbers (Hasan Jaddouh)
  • Problem Tester: mgch (Misha Chorniy)
  • Editorialist: pushkarmishra (Pushkar Mishra)
  • Mandarin Translator: huzecong (Hu Zecong)
  • Russian Translator: Antoniuk (Vasyl Antoniuk)
  • Vietnamese Translator: VNOI Team
  • Contest Admin: PraveenDhinwa (Praveen Dhinwa)

Top 10 international and top 10 Indians will get CodeChef laddu, find more about them here.

Feel free to discuss the problems after the contest, I hope you will find the problems interesting, looking forward to see you in the contest.

Full text and comments »

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

By kingofnumbers, history, 9 years ago, In English

Hi,

This is to remind you that Google Code Jam Round 1B will be tomorrow at this time, Top 1000 will advance to 2nd round.

let's discuss the problems after the contest.

Good luck.

Full text and comments »

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

By kingofnumbers, 9 years ago, In English

Hello,

I would like to seek help about the following problem because I find it helpful in many problems in CP:

You are given a circle and a function which takes a point on the circumference of that circle and returns a real number, you know that there's one point A on that circle which gives minimum returned value of that function and one point B which gives maximum returned value of that function, and you know that the function is increasing on the paths from point A to point B (from both direction).

You don't know where are points A and B, but you know they exist. you can call the function on whichever point you want and get the value of it, one call cost O(1) time complexity, you should find points A and B within a fixed allowed small error EPS in best complexity possible (perhaps O(log(accuracy)) ?? )

assume you don't know the exact formula of that function, and it's preferable that you don't compare the value of two points which are at distance EPS from each other because in practice sometimes it's hard to choose correct EPS.

as I mentioned before this problem can exist in many problems in CP so it's useful to know how to solve it.

thanks

Full text and comments »

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

By kingofnumbers, history, 9 years ago, In English

Did you notice that votes in all very old comments are disappeared (all comments now have 0 votes)?

is it a problem in the website or it's done intentionally ?

UPD: it's fixed now

Full text and comments »

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

By kingofnumbers, 9 years ago, In English

Hello!

I invite you to participate in the next code monk contest which will be about topic "Dynamic Programming II", if you are interested in learning new techniques of dynamic programming, then this is the right contest for you, the contest will have four problems related to dynamic programming, each one is solved by different dp technique, and the contest length is 3 hours and will start tomorrow Wednesday 11 Nov 2015, 03:30 PM UTC here's the link of contest.

I am(kingofnumbers) the problem setter, I_love_Tanya_Romanova is the tester of the contest, and editorials for the problems will be provided to you by Sokolov.

we hope you enjoy the contest and benefit from it.

looking forward to see you at the contest, good luck.

Full text and comments »

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

By kingofnumbers, 9 years ago, In English

Hello!

This is to remind you about second round of Croatian open competition in informatics will be held tomorrow Saturday 07.11.2015. 14:00 GMT/UTC

link for the contest: COCI

let's discuss the problems after the contest ends.

Good luck and have fun!

UPD: results are out!

Full text and comments »

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

By kingofnumbers, history, 9 years ago, In English

What is the next number of the sequence 1,3,5,7,... ?

when you have an answer check whether it's correct or not here

moral of story that all answers are correct for some polynomial function so such questions which majorly used in IQ tests are non sense

Full text and comments »

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

By kingofnumbers, 9 years ago, In English

Hello

I was trying to solve problem H in this gym contest , the problem shortly states:

given a connected graph you are required to add one edge so that the number of bridges in the graph is minimized, an edge is called bridge if and only if removing it makes the graph disconnected.

the solution is very simple , find bridges in O(n+m) then change every connected component of non-bridge edges into one node , then you will have a tree consisting of bridge edges only , then find the length of diameter of tree and subtract it from the number of bridges and this is the final answer

this algorithm is O(n+m) time and memory but when I coded it , it gave me Memory limit exceeded which is very strange since all arrays which I allocated can't be more than 256MB , here's my code which took MLE.

then I tried to code it without using structs or pointers but I used vectors, and it got AC with only 16MB memory , link to my AC code , as you can see there's big difference in memory and I have no idea what is happening.

I wrote a code that calculate the sum of number of nodes and the number of edges in all test cases of input file and the result was: sum of nodes=639884 , sum of edges=678426

any help explaining the MLE would be appreciated.

Full text and comments »

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

By kingofnumbers, 9 years ago, In English

If you want to understand recursion then follow the link

Full text and comments »

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

By kingofnumbers, 9 years ago, In English

Hello problem solvers!

I'm glad to invite you to participate in HackerEarth September Easy Challenge. it will start on September , 1st at 16:00 UTC, link of the contest: September Easy Challenge

There will be 6 algorithmic problems of varying difficulties (from easy to medium) and you will be given 3 hours to solve them, each problem is worth 100 points and partial points is allowed (you will be given points of each test case you pass). Top 5 beginners will receive HackerEarth T-shirts.

Problems are set by subway, Tested by Me kingofnumbers and the editorialist is ikbal

we did our best to prepare the contest so we hope you enjoy it and benefit from it.

looking forward to see you on the contest , Good luck!

Full text and comments »

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