vsanjay_nitdgp's blog

By vsanjay_nitdgp, history, 9 years ago, In English

Here, we share our doubts,problems.

Recently, Our group members had a chat and we made up a nice idea that would help every newbie to push up his preparation for ACM-ICPC.

We made list of all important topics for ACM-ICPC,and this is how it works:-

  • Either 1 or 2 members of the group make contest on a particular topic(problems may be from different websites) which is divided into 2 days.
  • First day problem set would be with easy,medium problems..
  • Second day,it would be tough.
  • Later after the contest,we discuss them in the group.

Fine,

This is how it is going to work.So,we would like to invite you for our first contest on the concept of binary search

Here is the link(day 1):- — https://www.hackerrank.com/codeforces-training-series-1-day-1-binary-search-tree

Here is the link(day-2): https://www.hackerrank.com/codeforces-training-series-1-day-2-binary-search-tree

Thanks, Happy coding.

Regards, codeforces training series.

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

Hi Coders :)-_

I wanna help all aspiring coders through this  "TRAINING SERIES" blog post.I will be posting problems from various sources topic wise along with clear cut hints,so that it would be easy for those who couldn't come up with AC solution.

         Also,Important resources,blogs would updated frequently in this post.Also,any kind of doubts to the problems which are to be posted in this post would be cleared with in 1-2 days.

        I hope this would help many coders.So,i want your support to continue updating this post with your UPVOTES.

         Thanks,,

        Hope you will support our work which is useful for many.

        "We will start updating this blog from this week."

NOTE: Also i would like to know your suggestions like,what else should be updated frequently in this post which would also be useful.Comment your suggestions down there.

FACEBOOK GROUP ON THIS "TRAINING SERIES";-(UPDATES OF THIS POST WILL BE NOTIFIED IN THIS GROUP)

Link: https://www.facebook.com/groups/1146117648755598/

Link to my blog(uva codes):- https://codersanjay.wordpress.com/

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

Recently,I solved a problem.

This is one of my step in my solution:

ans=ans-(2*b*c[n]);

ans is double variable,b is integer,c[n] is double; my answer was judged wrong.

when i changed the step to

double p=2*b*c[i];
ans=ans-p;

My solution got ACCEPTED.Could anyone say,why this occur,so that it would be very helpful for future problems of this kind.

Thanks.

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

could any one post code for the followong question.

PROBLEM :F ,GYM

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

Hello,

could anyone provide good source for understand and solving GSS1 of spoj.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By vsanjay_nitdgp, history, 9 years ago, In English

Could anyone please explain the logic behind this problem.

problem link: Three Families

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By vsanjay_nitdgp, history, 9 years ago, In English

PROBLEM LINK: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1099

could you please say the idea fo this problem in DISJOINT SET UNION.

Thank you.

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

Hello sir/mam,

i am an aspirant for being a RED coder.i work hard.i just solve problems every day and learn concepts if needed.

          But,i want to know from successful coders,what are the resourses that are very useful to become RED coder,

         i mean,resoures like:

         1.Books
         2.Online courses.
         3.Any online resourses.

          Thank you,

          YOUR'S SINCERELY
          SANJAY.

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

hello, Recently i was solving this problem below: http://mirror.codeforces.com/contest/540/problem/E

I made a survey in my college.Many couldn't do it.I have shown them EDITORIAL too.But many couldn't understand how to solve that finally.Many were confused in a lot ways.

So,Today i request GUYS who solved this problem,to spare some time on this QUERY which would be useful for many students who are breaking their heads on this problem's logic.

Please spare time and post nice explaination with example,so that it would be more clear.

AND i REQUEST not to give DOWNVOTE this post,Because this post is REALLY USEFUL for many CODERS....Many get stuck in this kind of problems,,and due to (some not better explaination)..they skip that problem having good concept...

SO,GUYS PLEASE POST NICE EXPLAINATION FOR THIS PROBLEM,,,

NOTE:IT IS NOT NEEDED THAT YOU UPVOTE THIS POST(BUT DONT DOWN VOTE).......WE NEED TO LEARN CONCEPT...

THANKS IN ADVANCE....HOPE I WOULD SEE MANY REPLIES HELPING MANY CODERS WHO FEEL THIS CONCEPT HARD....

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

Recently,i was solving the following problem: http://mirror.codeforces.com/problemset/problem/540/E

the following is the solution i am trying to understand: http://ideone.com/cKjRNr

In the last loop of solution there are two terms,1 is to find difference of initial and final position of that element.

what about second term.according to editorial ,second term is to delete the inversions that were already counted.

so,could any one help how did we get "num[i]-i" as our second term,,whats the proof behind it..

pls help,thanks in advance.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By vsanjay_nitdgp, history, 9 years ago, In English

SIR/MAM,'

TODAY I WAS SOLVING THIS QUESTION,,

HERE IS MY SUBMISSION.. >> http://mirror.codeforces.com/contest/199/submission/13427391 <<

I GOT WRONG ANSWER IN 84th TEST CASE FOR THIS PROBLEM >> http://mirror.codeforces.com/contest/199/problem/D <<

PLS HELP..THANKS IN ADVANCE...

THANK YOU..

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

good day sir, Today i was solving this problem,and got stuck,thinking what is the logic of the below problem.

https://www.codechef.com/KJCC2015/problems/WINNER


        could anyone please say logic for solvig this problem.thank you.

        thanks again..!!!

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

Sir/mam,

Today i wanna ask a question that many coders on CF might be thinking of.

   i am still a div-2 contestant.i solved not more than 2 problems for my last 7 contests.

   on averge i solve 2 problems in any contest.

   BUT HOW TO SOLVE 3 AND 4?

   I saw many coders who solve 3 and 4 always in every contest.even i wanna solve like them.

   so,today i ask this question to coders who solve more than 2 on an verage in every contest,

   that what extra-thing you did,or what was the way that made yourself to solve 3 easily everytime,

   and how should we appraoch to solve like you?

   I HOPE MNY CODERS  LIKE ME MIGHT BE INTERESTED TO SEE COMMENTS THAT HELPS A LOT.

   PLEASE REPLY.

   THANKS IN ADVANCE.

   please share some links,books etc,that you think that may be useful to crack 3.

   thanks in advance..........

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

could any one explain the logic for his problem.

i couldn't understand the editorial.

thanks in advance.

http://mirror.codeforces.com/problemset/problem/466/C

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

hello sir/mam,

i just started  learning graph theory from http://mirror.codeforces.com/blog/entry/3075  .

         i learnt dfs and bfs traversal.

         but ,i am still confused whether i am learning the things in right way one after other.


         could you pls say the steps or path or map for learning graph theory...

         i mean ,after traversal,which concpt should i learn.like that: :)

         ls provide some links for tutorials ,problems,,,,,,so that if a beginner could work out hard and master this concept.

thanks in advance.

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

hello sir/mam,

yesterday i started solving the following problem using stack..

https://www.hackerrank.com/challenges/largest-rectangle

this is my solution

http://ideone.com/SomZF4

i think my code is entirely correct,,,but dont know where it is going wrong.....answer has to be 9 for the sample input....but i am getting it as 5..

could any on pls say error in my code..

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By vsanjay_nitdgp, history, 9 years ago, In English

sir/mam, i solved this problem

https://www.codechef.com/problems/DIRTBYTE

this is my solution,,, http://ideone.com/dt6lxi

but i dont know why am i getting TLE.

couls anyone pls help me to get AC..

thank you.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By vsanjay_nitdgp, history, 9 years ago, In English

i did DQUERY problem in spoj----link http://www.spoj.com/problems/DQUERY/

this is my solution...after referring through some material and blog AND finally got AC....

http://ideone.com/8qZj1Z

but ...could any one pls explain what happened between (53-72) lines....i couldnt understand....

pls explain it clearly so tht a beginner of this ALGO could understand.....also pls say if we can write those lines without any confusion if possible..

i would be very thankful to you....

thank you..

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

sir/mam,,,

i tried the following problem using MO bu getting TLE........

question:http://www.spoj.com/problems/DQUERY/en/

my solution:http://ideone.com/MqzGnu

could anyone help me in getting AC

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

could anyone pls give clear explaination of using BIT in this problem..

i would be very thankful to you.

http://www.spoj.com/problems/CTRICK/

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

could anyone pls say how to get rid of TLE for this question.....

this is my solution https://www.codechef.com/viewsolution/7926715

for the question https://www.codechef.com/problems/SPREAD

i used BIT

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

hello sir/mam.

recently i learnt binary indexed tree.

i did two probelms now...

but i got stuck for the problem below.....

http://www.spoj.com/problems/INVCNT/

could any one give clear explaination of doing this problem....

i would be very thankful to you...

thanks in advance...

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

sir,,,i have just learnt how BIT works.....

i was trying to impliment the same for this problem :http://www.spoj.com/problems/HAYBALE/

but,i couldnt get idea how to do it,,,,,could anyone pls help me how to approach this problem using BIT..

thanks in advance.

Full text and comments »

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

By vsanjay_nitdgp, history, 9 years ago, In English

hello sir/mam.....

today i started binary indexed tree and couldnt fing good tutorial to master....

could any one pls provide ,,,,some links to tutorials and problems such tht a beginner could understand...

thanks in advance....

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By vsanjay_nitdgp, history, 9 years ago, In English

this is my solution http://ideone.com/5i1hV2 for the problem

https://www.codechef.com/LTIME16/problems/CHEFB

in this problem i am getting TLE whn n<=100000 and array size<=1000000

but when i removed memset and wrote that step normally by bruteforce ....i got AC........

what happened with that memset();

why?????????????????

this is my modified solution

http://ideone.com/G6t0fX

thanks in advance

Full text and comments »

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