__BaD_mAn__'s blog

By __BaD_mAn__, history, 21 month(s) ago, In English

Today I participated in the coding competition Codegoda hosted by Agoda. I'm not going to talk about their weird rules and coding environment. I just want to share some of my experiences regarding the problemset. In a word, worst experience ever. I just want to mention some things here that seem annoying to me and make me feel it was a waste of time participating in the contest.

Most of the problems require no more than 30 seconds of thinking to get the idea. The problemset was not standard. Expected more quality problems in such a big competition. In the problem of probability, it was mentioned to print up to 5 digits after the decimal point. What does it mean actually? Is it exactly 5 digits? Or at most 5 digits? If it is, then printing more than 5 digits should give wrong answer, right? I printed 10 digits and it passed 3 tests and gave wrong in the 4-th test case. I was thinking my idea/solution is wrong. Then wrote the bruteforce solution and wasted almost 1 hour finding out the actual problem. Printing 5 digits after the decimal point got passed all the public tests. Why it didn't give wrong answer verdict in the first 3 cases? Isn't it weird? They could clearly mention that we have to print exactly 5 digits.

The problem of checking whether two companies are from the same group or not is a very common problem of DSU/DFS. Why such a common well-known problem in such a contest? Are they taking speed test?

The problem of digit mapping was so annoying as we cannot copy/paste into the contest editor. It requires writing some similar types of lines multiple times. All you have to type so fast.

The problem of finding the best hotel within a budget range had a confusing statement. It was mentioned nowhere what should be printed if there is no hotel in the budget range given in each query. If it is guaranteed that at least one hotel exists in the budget range, then why it was not mentioned in the statement? Is there any issue in the dataset of this problem or any corner case? My fresh solution didn't pass after 3rd test -_-

I tried these 4 problems and found none of them interesting. Didn't try the other two problems. The problems are so poor compared to their magnificent advertisement. Overall it feels like a waste of time.

UPD: I contacted them about their duplicate problemset. Here is their funny reply. They don't think it unfair xD

Full text and comments »

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

By __BaD_mAn__, 4 years ago, In English

We are given two integers N & K and a sequence of N non-negative integers a1 a2 ... aN. We want to divide these numbers into X groups such that the sum of numbers of each group does not exceed K. What is the minimum possible value of X?

Can anyone please describe the approach for this problem? Is it possible to solve this problem in O(N2) or O(NlogN) or O(N) complexity?

Full text and comments »

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