You are not logged in. Please login at to post your questions!


How to figure out what the question is actually asking??

Can someone please help me, sometimes I read the problem question and can't figure out what the problem asking me to do. Like with the recent contest's question "Chef and mover", I got 2 subtask AC but rest of them all wrong. After the competition, I read comments like people over-complicated or misunderstood this problem. Same with the problem "Rainbow". Are there any techniques to tackle the problems like that? Sometimes, I feel like there are not enough input and output explanations to tackle the question but then I see people are actually getting that question right in just one attempt!! Can someone please suggest a good way to figure out what the problem actually asking to do? I believe it will help people who just started Codechef like me.

asked 18 Aug '17, 20:56

kunnu120's gravatar image

accept rate: 5%

Hey Kunal,

Don't get disheartened by seeing other people solving the question in just one attempt. At first all the question seems tough. If you will practice well you'll get the question AC in just first attempt.

> Please go through my answer on how to get good at problem solving.

Hope it helped!


answered 18 Aug '17, 21:04

sandeep_007's gravatar image

accept rate: 16%

Thank you, I'll try my best and can you suggest me how to learn algorithms. Do you know any YouTuber who teach algorithms? since I'm a visual learner. Thank you!!

(18 Aug '17, 21:09) kunnu1201★

YouTube videos by mycodeschool really helped me alot learning new algorithms. you can follow them.

(18 Aug '17, 21:15) sandeep_0074★

@sandeep_007 thank you so much for the help, I will check out the videos

(18 Aug '17, 21:16) kunnu1201★

It depends on many factors, most dominantly how exposed you are to competitive coding.

There exists a category of setters (lmao include me if i start setting problems) who make sure to twist the problem statements thoroughly, to make sure the contestant isnt able to make head or tail of it and has to go by his confidence and intuition on what is going on.

If you look at Q of STRINGRA, the setter left no stone unturned to give people a tough job. Else, the problem is very easy but for the difficulty in untangling it.

It will come by practice.

Rainbow array and chef and mover were simple statements, they werent complicated or hard to understand. If you feel that they werent clear, then please discuss them here so we can help you. More often than not, I find that its a "one directional" or lopsided thinking of contestant which makes things complicated for him.

Also, give a look to good coders solution, sometimes that really helps!


answered 18 Aug '17, 21:18

vijju123's gravatar image

5★vijju123 ♦
accept rate: 18%

edited 18 Aug '17, 21:19

I was able to solve the "rainbow" question but wasn't able to solve the "chef and mover problem Can you please look at my code and tell me what was wrong? If you don't have time that's okay I know it takes time to understand someone's code. But thank you so much for the help!!

(18 Aug '17, 21:30) kunnu1201★

I will, just wait for 30min plz, there is a contest going on atm

(18 Aug '17, 21:46) vijju123 ♦5★

Check how your code is doing for this test case-

1 5 1 1 1 1 1 6

The answer is 10 but you are printing only 1.

(18 Aug '17, 22:16) vijju123 ♦5★

Thank you so much @vijju123

(18 Aug '17, 23:14) kunnu1201★

@vijju123 can you please tell me what atm is? the contest?? where? at codechef? Thanks

(19 Aug '17, 05:59) kunnu1201★

Atm is a short form for "at this moment". The contest was on codeforces

(19 Aug '17, 09:44) vijju123 ♦5★
showing 5 of 6 show all
Answer is hidden as author is suspended. Click here to view.

answered 19 Aug '17, 10:04

raj79's gravatar image

accept rate: 10%

@raj79 thank you for the advice. I will try it. Thanks again

(19 Aug '17, 11:52) kunnu1201★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 18 Aug '17, 20:56

question was seen: 341 times

last updated: 19 Aug '17, 11:52