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

×

Can people PLEASE stop asking others to look at your code and help you find the error?

First of all, try and improve your debugging skills. You surely can't ask others to look at your code in a contest, can you? Second of all, most of the codes I saw pasted out are formatted horribly, or are written so close to each other that makes it a pain to even look at them. Third of all, how are we supposed to understand what you are doing in your code and what to debug if you just leave the code there or say "I am getting correct answer on sample input case" and don't say anything about what the heck you are even doing in the code?

Sorry, I just HATE to see useless posts like those ones. For god's sake PLEASE just debug on your own. This forum is supposed to be for discussing, not spoonfeeding. Grab some guy's Accepted code, generate some tests on your own, anything BUT posting an useless post that contributes nothing to the community and sit there waiting to be spoonfed a test.

asked 26 Nov, 20:22

ducpro's gravatar image

6★ducpro
24017
accept rate: 0%

1

That is one of my biggest headaches. I just dont know how to make new users goto rules and tell that "In case you want help in your code, give a submission link and describe your logic." No one wants to read rules :/

(27 Nov, 00:16) vijju123 ♦♦5★

For me too.

I have seen many people just pasting their codes and asking to debug/find a test case to fail solution or explain the solution which is explained in the editorial itself.

(27 Nov, 00:42) taran_14076★

Can we do this if someone has reputation less than 50 this means he/she new to this community so when they try to ask some question, we can show a quick guide to them so that they can understand what is the proper way to ask a question and once the reputation becomes greater than 50 then no need to show quick guide.
Ask about this @admin if it can help :)

(28 Nov, 11:31) admin55★

I think the main problem arises when the coders start thinking that their code can't go wrong. This used to happen a lot in my earlier days of programming. Instead of finding why it is going wrong I focused on how to make it correct and give me points.

Let me tell you, do not ever trust your "intuitions" in algorithms. The solution is either correct or incorrect in competitive coding. There is nothing like "almost correct" solutions. Beginners, please focus on proving the correctness of your solution.

link

answered 28 Nov, 02:27

xariniov9's gravatar image

6★xariniov9
1.1k18
accept rate: 10%

TIL "finding where it is going wrong" and "making it correct" aren't synonyms :D

(28 Nov, 06:48) ducpro6★

LOL :D

I wanted to say "how to make the same solution correct and get AC somehow".

Sorry for wrong choice of words :D

(28 Nov, 07:01) xariniov96★
1

Pretty sure I'm guilty of that with November Challenge's RECIPES :P. Attempted random bits and all types of ways in order to try and get just that 35 points. Failed though :(

(28 Nov, 07:14) ducpro6★

Happens :D . Last year there was a very hard problem, but its brute force recursive solution was a simple recursion. Due to bad choice of input, it allowed precalculation of solution.

Few people ran the recursion overnight to precalculate and that gave AC and by AC I mean perfect 100. But, in this case it was a bad problem IMO.

(28 Nov, 07:21) xariniov96★
2

Reminds me of what I did in a contest a few months ago XD. The task was to calculate number if non - repeating walks with k steps. I still don't know how to do it, but since the limit was k <= 29, I just backtracked to find the answer. The contest was 3 hours, and my backtracking finished in 2.5 hours :D.

(28 Nov, 07:31) ducpro6★

Happened with me recently. It's tc are weak. My one soln passed some tc and other passed tc which failed on first but tle/wa on some tc. So, Possible option for me to correct it or choose some it else based on tcs and use both fns to get AC. I made 1 submission/75 sec to binary search on tcs and get AC.

(28 Nov, 07:57) aryanc4035★
showing 5 of 6 show all

Agreed. I don't mind people asking for help, provided they:
- link to the problem
- link to their code submission
- explain how they intend their code to work (describe the algorithm)
- describe the problems they have
- only quote code snippets they are specifically concerned with, and
- make sure that any such code formats correctly in the question.

link

answered 26 Nov, 23:18

joffan's gravatar image

5★joffan
9148
accept rate: 12%

Yeah, well said
They should debug their code for atleast basic test cases. I have seen a lot of code today failing in just basic test cases I don't know why this happens either they are getting problem wrong or they just don't want to understand the problem before implementing.

First you should try to understand the problem correctly then try to implement.
I am not saying we don't want to help, we want to help but you also have try to do your help by yourself.

link

answered 26 Nov, 21:03

admin5's gravatar image

5★admin5
2269
accept rate: 18%

edited 26 Nov, 22:24

I completely agree too , people just tend to ask for help without debugging or even trying to read others solution. Its posts like these that just take up pages on discuss and proper questions are sidelined hence. I asked this Question a while back Proc18c But it had no answers I tried to look for solutions couldnt understand any and hence posted this question. There were no answers but many people didnt get to see it either because of the " stupid wa in my code ".Its just frustrating at times . Thanks @ducpro for posting this. PS :- If anyone could please answer this it would be nice @joffan specially :P , PROC18C(Awkward pairs)

link

answered 27 Nov, 21:37

insanity_123's gravatar image

3★insanity_123
-83
accept rate: 0%

edited 27 Nov, 21:38

I have added a new answer to your original post. Hope you find it helpful. If not, feel free to ask there.

(28 Nov, 02:54) xariniov96★

I agree with you guys even I face these issues when I try to help people on discuss.
And mostly people who do not use this forum much, do these mistakes and eventually no one helps them.
And hence it is tough to make new people follow/understand these rules and problems

I need a help if anyone can help :

question link : PDELIV

link to my query : LINK (Don't worry , it's not link to my solution directly XD)

link

answered 28 Nov, 10:01

l_returns's gravatar image

4★l_returns
1.3k19
accept rate: 26%

edited 28 Nov, 10:04

Its TLE in only one subtask and not wrong answer

(28 Nov, 10:08) l_returns4★

I think @vivek_1998299 said that the TL was quite strict and that his solution using set failed. Try replacing it with a vector which is kept sorted. (Since deletion of lines was not supposed to happen afaik, the bad lines were just not inserted in first place.)

(28 Nov, 13:16) vijju123 ♦♦5★

Every programmer and developer should aware with STRESS TESTING.

link

answered 29 Nov, 00:42

sapjv's gravatar image

2★sapjv
613
accept rate: 0%

This site was made exactly for this purpose - codereview.orgfree.com.

As far as I know the development was stopped because of the lack of resources and the entire backend was in php. But I also read in some post that the developers were also planning to write the entire web application from scratch again with java backend and this time not just limited to codeforces users :D.

link

answered 05 Dec, 01:19

iammangod96's gravatar image

2★iammangod96
442
accept rate: 50%

i believe that everyone asked for their code review from someone and before asking for suggestions they must ask and think themselves about their solution and how did they get there and is it write or wrong based on problem they are solving and code must be clean so that whoever helping you understand the problem first

link

answered 07 Dec, 08:19

vinodl's gravatar image

0★vinodl
11
accept rate: 0%

i believe that everyone asked for their code review from someone and before asking for suggestions they must ask and think themselves about their solution and how did they get there and is it right or wrong based on problem they are solving and code must be clean so that whoever helping you understand the problem first

link

answered 07 Dec, 08:19

vinodl's gravatar image

0★vinodl
11
accept rate: 0%

edited 07 Dec, 13:11

chup bsdk mc

link

answered 08 Dec, 15:08

vt1809's gravatar image

2★vt1809
-3
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×71
×31
×31

question asked: 26 Nov, 20:22

question was seen: 4,748 times

last updated: 11 Dec, 00:32