newbie_forever_at_cp's blog

By newbie_forever_at_cp, history, 3 years ago, In English

Hi, Sorry for another boring & asked multiple times blog. But I seriously want to know where I am lacking. I have been coding for the past five years. But still cant cross Expert — candidate master. I have solved much more than 2,5K problems (yes including multiple hard problems ( > 2100 Rating)). (code_kit is also my account although now i am not using it) . But still I seem to suck. And not sure why, but for the past 3 months my solvability is continuously decreasing ( I had 2090+ rating in september) but dropped to 1800 range now. Similarly in April I had 2080+ rating but again dropped for some time to ~1800. Could you guys explain me why this happens and the last 3 months is the longest amount of time I am in 1700 — 1800 range. I am not able to solve a problem unless i have seen an extremely similar one before. How to improve this skill ?

Plus I see so many people who solves very less problems like < 1000 but become master. Could you guys give me tips ?. Surely eager to know where i am lacking. I have read most of the tutorials blog on how to become CM / master and They are telling to practice very less than what i did. Any tips would be highly appreciated. Also will playing video games like for 3 — 5 hours a day negatively affect problem solving ? Thanks.

Full text and comments »

By newbie_forever_at_cp, history, 3 years ago, In English

Hi Guys,

Many times, when we look at the solution for an unsolved problem or love a specific problem, we might want to try out a problem similar to it. Currently we can only search problems only based on tags. But from now on we can just input a problem and get a list of problems similar to it. We can query here similar_problems

Example :

Input

After Submitting,

Output

Here,

  • Problem Name is just the contestId + index. eg (1389A),

  • We can also specify the rating range which is the problem difficulty rating range within which we want out similar problems to be. If nothing is specified, by default it will consider problems rating between -500 to +500.

Currently, I am computing cosine similarity between two problem's tags. Yes, this is the most basic method which we can think of and obviously there are many false positives, but this is just the first version.

Any suggestions for reducing false positives is absolutely welcomed.

Please do checkout and let me know how you feel.

Full text and comments »

By newbie_forever_at_cp, history, 3 years ago, In English

Hi Guys, I think the 10 minutes penalty for educational and div3 rounds is somewhat higher. In normal rounds the penalty for wrong submission is 50 points. If we take middle — high scoring problems such as C, D or E, then the amount of time it takes for the points to reduce by 50 is much less than 10 minutes. For eg, on most cases, the penalty for C problem is about 8 minutes, for D, its 6 minutes and for E its 5 minutes and for F its about 4 minutes. Hence if someone makes wrong submission and since the penalty is constant, it can be considered as making wrong submission on the highest scoring problem. So I think the penalty for wrong submission can be about 5 minutes as 1. It is the amount used in atcoder and 2. Just because when someone made a careless mistake or some error, they wont be penalised much than someone who did now know how to implement fast or who found the idea later and 3. Considering people (who are in rated bucket) rarely solve F, it does not make much difference switching penalty from 5 to 4 minutes. What do you guys think ? Pls share your thoughts.

Update : Including div3 rounds too.

Full text and comments »

By newbie_forever_at_cp, history, 4 years ago, In English

Hi Guys, Shall we reduce the contests on week days and increase the contests on weekends ? For example if there are three contests in a particular week, we can keep two contests on that week's saturday and sunday and the other one in some week day. Suppose if there are only two, can we keep it on saturday and sunday ?. I feel like this because many of us are working professionals (including me) and do not have great mood after a long work day. Please comment on your thoughts.

Full text and comments »

By newbie_forever_at_cp, history, 4 years ago, In English

Hi all, As the definition of virtual contest is being as close as possible to the real contest, shall we have pretests in virtual contest ? After the end, let it run on whole test set and then determine the rank. I feel that this feature is nice to have because many times I / we fail system tests. So I feel that while doing practice, if we have this feature, then it will be lot helpful. What do you guys think ?

Full text and comments »

By newbie_forever_at_cp, history, 7 years ago, In English

hi guys, Am trying to solve this problem (http://codeforces.me/problemset/problem/526/C). My approach is find the lcm of w1 and w2. Now on reaching lcm(w1, w2) if(lcm/w1*h1 > lcm/w2*h2) then we prefer h1 upto the lcm. else we prefer h2 Now for the remaining i.e from c/lcm to c, Just iterate and check which is the optimal answer. My code is https://ide.geeksforgeeks.org/zh4C5tHJPG . But i get wrong answer on test 3. I couldnot figure out what is wrong. Could you help me.

Full text and comments »

By newbie_forever_at_cp, history, 7 years ago, In English

Hi guys, Am trying to solve the problem 492 D. http://codeforces.me/problemset/problem/492/D. My approach is use binary search, to find the index at which the monster dies. My solution is https://ide.geeksforgeeks.org/Dcs5Fn6w2S. But i got wrong answer in test 7. so i changed the equal function to compare upto 10^-6. Then i got wrong answer on test 6. Can someone plz tell me why this method fails.

Full text and comments »

By newbie_forever_at_cp, history, 7 years ago, In English

hi every one. im having a doubt in codeforces problem 440 C. here is the link http://codeforces.me/problemset/problem/440/C. My approach was

A number x can be represented by having the number with only ones which is less than the given number. for eg if number is 40 one approach is taking 11. 

     Another is having the number with only ones which is greater than the given number. i.e. 111 for 40 then take absolute difference between the number and the given number i.e abs(11 – 40) = 29 and abs(111 – 40) which is 71.

     Now call the function again for the new n. in this case fun(29) and fun(49).

     Now added with the number of ones take the min of these two i.e min(fun(29) + 2, fun(71) + 3). that is the answer. Also if we can represent the number with the ones alone. for eg 11 then return 2 just. i.e without computing min(fun(11-11) + 2, fun(111- 11) + 3);

 But i got wrong answer in test 14. the input is 81924761239462. and the expected output is 321. And my output is 395. Can you please tell me what is wrong.

here is the link: http://ide.geeksforgeeks.org/kRLASR. And even in diagnostics it is not showing anything.

Full text and comments »

By newbie_forever_at_cp, history, 7 years ago, In English

hi every one. im having a doubt in codeforces problem 440 C. here is the link http://codeforces.me/problemset/problem/440/C. My approach was

A number x can be represented by having the number with only ones which is less than the given number. for eg if number is 40 one approach is taking 11.

Another is having the number with only ones which is greater than the given number. i.e. 111 for 40 then take absolute difference between the number and the given number i.e abs(11 – 40) = 29 and abs(111 – 40) which is 71.

Now call the function again for the new n. in this case fun(29) and fun(49).

Now added with the number of ones take the min of these two i.e min(fun(29) + 2, fun(71) + 3). that is the answer. Also if we can represent the number with the ones alone. for eg 11 then return 2 just. i.e without computing min(fun(11-11) + 2, fun(111- 11) + 3);

But i got wrong answer in test 14. the input is 81924761239462. and the expected output is 321. And my output is 395. Can you please tell me what is wrong.

here is the link: http://ide.geeksforgeeks.org/kRLASR. THanks in advance

Full text and comments »

By newbie_forever_at_cp, history, 7 years ago, In English

hi everyone. I'm having a doubt in problem 839D. The link is here http://codeforces.me/problemset/problem/839/D
I submitted a solution which gives me wrong answer on test 44. The link is here. https://ideone.com/tJhWMt

But i just modified the line number 57 from ans[i] = gcd[i] * p2[max(gcd[i] — 1, (int)0)]; to
ans[i] = (gcd[i] * p2[max(gcd[i] — 1, (int)0)]) % mod; where mod is 10^9 + 7. And it got accepted

My question is even though we don't take the mod value in line 59, in line number 60 after the execution of the 1st inner for on line 59, it will automatically take modulus and by any means ans[i*j], on line 60 wont be greater than 10^9 + 6. So why is the mod on line 57 even necessary. Plz help. Thanks in advance

Full text and comments »