Kuber's blog

By Kuber, history, 17 months ago, In English

Hi everyone,

I want to program computer to play games like connect 4, dots and squares and maybe eventually DoTA. I've started with applying algorithms like minimax etc to simple games.

With the onset of AI, there are many ways to do this now like AlphaZero etc. I am fascinated by these. The fact that the computer is able to find solutions that humans were unable to find in centuries makes me want to jump into this revolution.

However, I currently am just a pupil here.

I need help in figuring out a roadmap that I must follow to be able to program AI. I am willing to learn anything, but I also don't want to waste my time in doing things that are fancy in the short term but don't stack up to my goals. I request the learned people here to guide me what path I can take.

Full text and comments »

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

By Kuber, history, 17 months ago, In English

Please consider the following submission: https://codeforces.net/contest/1383/submission/216651569

My code is failing the below test case but by the question, it seems that my code is the right answer. 77 kijhomniljogijghgphipmhlmmkkkjimnmjnmlphnhnmoigoknopjgjpkompmhggkhohgolkoghhm klpnppoknlojilmpkpiopommmpolpjkmoonoplphnjnppikolopponppppnpoiomnloljpnkokmpo

My answer is 9 as there is a weak component that includes g to p. However, the expected answer is 13. Please find below the graph

acyclic graph

0 ||

1 ||

2 ||

3 ||

4 ||

5 ||

6 ||

7 ||

8 || 7 7

9 || 6 7 6

10 || 8 6 8 6 6

11 || 8 9 9 10 10 7 7

12 || 6 7 11 6 7

13 || 7 11 9 6 12 10 11

14 || 13 8 12 10 13 12 13 13 9 12 6 12

15 || 9 14 12 7 12 10 12 12 14 14 9 10 14 14 7

16 ||

17 ||

18 ||

19 ||

0 refers to a and 19 refers to t.

According to the algorithm, I can convert the relevant 6s to 7s, relevant 7s to 8s and so on. This makes it 9 moves. No other moves are required. Any assistance as to how the tester says the answer should be 13 is appreciated. TIA.

Full text and comments »

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

By Kuber, history, 17 months ago, In English

Hi everyone, please consider the following submission:

https://codeforces.net/problemset/submission/1467/215118514

The code is in O(n), yet I'm getting TLE. I changed cin to scanf. In that I got my answer different on CF server and local machine. So, I changed it back to cin.

I don't think I'm calling too many functions. They all run in O(1) time.

Full text and comments »

Tags tle
  • Vote: I like it
  • -3
  • Vote: I do not like it

By Kuber, history, 17 months ago, In English

Hi everyone, Please review my submission: https://codeforces.net/problemset/submission/546/213448834

The logic is exactly the same as that of the person who got the first position in the contest. I'm unable to understand how to change the solution to get AC.

Edit: Changed cout to printf and cin to scanf.

Full text and comments »

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

By Kuber, history, 2 years ago, In English

https://codeforces.net/contest/1734/submission/173209974

Hi

Please refer to the above submission. I gather it is O(n) solution but I'm getting TLE. When I put print command inside the recursive function, it grows linearly with n.

Can anyone help me understand why I'm getting TLE?

Full text and comments »

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

By Kuber, history, 2 years ago, In English

I'm stuck in test case #10 in D. The test case has n = 20000. Is there a way I can see the complete test case?

I'd be thankful if someone can review my solution: https://codeforces.net/contest/1272/submission/166760372

Full text and comments »

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

By Kuber, history, 2 years ago, In English

7 months back I had written this : https://codeforces.net/blog/entry/98229 In this I had talked about my percentile amongst Indian participants. I had calculated that I was ~81 percentile.

I have done relatively good in the last two contests. Now, my rating has improved. Amongst 46249 coders, I'm ranked 2597. This makes me jump to 94.4 %ile. So, target achieved from last blog.

The next goal seems obvious. To be in the top 5%, which means being ranked 2312 amongst the coders. That makes me target 1510 rating.

I took 7 months to get here. Let's see how much time before next blog. Thank you for reading.

Full text and comments »

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

By Kuber, history, 2 years ago, In English

I'm solving 50 problems at each level. Recently I moved up to 1500 rated problems. I realize that the problems in this level are significantly different from 1400 rated problems topic wise. Till 1400, problems could be done by vectors mostly, but now, there's dp and trees.

Can anyone share with me if there is any theory I must read to get through this level or should I just learn the concepts through editorials of the problems that come forth?

Full text and comments »

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

By Kuber, history, 3 years ago, In English

Codeforces gives plenty of metrics to set as goals. There's Pupil/Expert/Master etc.

After UGs recent video about being India number 1, I found another metric to chase. I'm currently 7411th in India and 36938th globally.

There are 39332 rated member from India in codeforces which makes me 81.16th percentile. Besides aiming at the specialist tag, I have also set eyes on being the 90th percentile.

That would make me a part of the top 10% Indian coders on codeforces.

Full text and comments »

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