khanaleemullah's blog

By khanaleemullah, 11 years ago, In English

Today I gave this competition and came upon this problem http://codeforces.com/contest/276/problem/B I have seen most of the coders used the same logic FOR(i,300) if (1 & cnt[i]) ++odd; if (odd == 0 || (1 & odd)) printf("First"); else printf("Second");

can any one of you explain to me this... thank you so much ..

Full text and comments »

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

By khanaleemullah, 11 years ago, In English

today i attended the codeforces division 2 169 and came across this question.. http://codeforces.com/contest/276/problem/C I saw most of the red and yellow coder used the logic..

for(int i=0;i<k;i++){ cin>>x1>>x2; arr[x1-1]++; arr[x2]--; } for(int i=0;i<n;i++) arr[i]+=arr[i-1];

I was really shocked and I am unable to understand how so many of people knew this technique.. Is this any standard algorihtm or something??..

Full text and comments »

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

By khanaleemullah, 11 years ago, In English

Guys...need some advice from you people... I am not able to solve problems related to trees, graphs, shortest path on Codeforces and Topcoder. Whenever I see any such problems I just skip them. What is the solution. I know I will get these problems through practises. But how should I move ahead. From where should I start I tried the topcoder tutorial but they explain it giving example of DIV1500 or 1000 pointer. So Obviously it becomes very difficult to move ahead with. I obviosly know the basics of Dfs Bfs algorithm and trees. But how should I implement. What is the best way to learn. Is it by exploring the question related to Dfs and Bfs on codeforces and starting with one which has the maximum number of solution and then looking other good people solutions./??...

Thank you. :)

Full text and comments »

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

By khanaleemullah, 11 years ago, In English

Hello friends.. I have been programming for quite a long time. I had few doubts I wish if some of you can clear it.

1.. Is programming in different places like codeforces , topcoder , spoj and codechef is it same . I mean if we practise on one of it will it affect the other in positive way?...

2.. I really want to become a good coder. But when I see problems which are related to topics like Geometry and some Math puzzle kind requiring constructive algorithm , It really demotivates me and I then don't feel like solving it. So should I solve only those problems which motivates and makes u feel good or also those which u don't like to solve.

3.. I want to know the best and most effective way of practising so that I can improve and learn fast. Is it by writing or noting some concept u leanred in diary or something.?..what is the best way....Is it by solving questions topic wise....

4.. Which are the best topics to sovle questions from which every GOOD I mean say Codforces RAting 1500+ should know ... like DP is one....Is there any..should I start learning the topics like MAX FLOW and SEGEMENT TREES and similar stuff.....?....

5.. I feel that I can write code very fast but I should know the algorithm or the way to solve the problem ...Is it the right time for me to move on and learn those algorithm and to practise more and more the tough question on codeforces. If yes then which problems should I solve and concentrate upon. Should It be DIv2 C and D?..or DIV1 A and B..

Thank you....

Full text and comments »

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

By khanaleemullah, 11 years ago, In English

please help me friends.. i want to multpliy a number say x=100000 and y=100000 ; and the result is to be modulo by 1000000007. how should i approach to this i tried everything ...

Full text and comments »

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