1 / 33
Dec 2014

I was wondering whether there is a page dedicated to the set of protocols to be followed on SPOJ that details some obvious and not so obvious Do's and Don'ts and also the ideal way to do SPOJ, for example -

  1. Don't cheat/copy

  2. Give time to question/algorithm thinking(approach philosophy).

3.Don't take hints from comments,etc unless extremely stuck or if you find some flaw in the question

  1. Don't offer Spoilers/hints in comments unless there is some bug/flaw in question or some inadvertent complexity added by the author.

  2. This point is for those who actually think SPOJ = Google search the algorithm + ability to code that algorithm. Some people give the links to the explanation to the algorithm in the comments section. I saw a very interesting one -"Hey Guys, go to this site < ......bla bla.com> first before thinking of an algorithm to this question. It helped me a lot. Solved it with the best algorithm. O(n) complexity. Yippie !! My 50th AC smile" (Not exactly quoting).
    One can do an exhaustive mathematical study of the question/concept but don't directly search/google for the direct algorithm for the question at hand. Defeats the purpose. It is not merely a "Code implementation", but an "Algorithm+Code implementation site". The number of users who have solved should be nearly equal to the number of people who have managed to crack the algorithm/have in-depth knowledge of the algorithm behind it.

  3. For discussing solutions/approach, be more active on Forums than on comments section, etc .......
    .....

In case there is some links regarding the above, please share. Otherwise, can we make one ?

Good idea. I have suggested this to my collegues, pointing most of your suggestions and some of other users I've heard.
I've set priority to critical so perhaps it will be implemented soon.

Thanks for your suggestion!

That's great! Thanks a lot. Please let me know if my help is required in writing/elaborating the points,etc. Would be more than happy to help.

Please use this thread, why not use public space. The forum is done for that in particular.

My opinions about more informations.

A) There's too many useless comments. They are for inform on problem description, give a link to another problem, few other cases.

Not that:
"Divide Conquer & Segment Tree smiley ", -> It's a hint.
"my 40th smile ", -> Useless.
"can we use math.h on spoj..?? " -> The forum is the place for that question.
"log function not accepting confused " -> I's a hint.
"AC in 0.0 sec yepieee " -> If you are the first, why not !
"Somebody please provide a solid test case! frowning " -> No more test should be provided.
"plz check my code why wrong answer.? ideone.com/XMjze7 plz reply " -> I don't think links to code, should be set in comments. Please use forum for that purpose, not comments !
"quite easy prob..1 WA coz of silly mistake.. " -> What if every body did the same !!!

But rather:
"O(N) is possible. " -> nice challenge for some people
"strict^strict timelimit " -> sometimes psetter don't allow enough time for slow language... it's not easy to block fast_language+slow_method.
"Here is the link in the forum for this problem : link_is_here.com" -> If you are the first to put this comment for any problem.
...

B) Recommendations to AC_psolvers for not sharing their AC code : nor in forum, nor in other public space.
Giving a link in it's profile for his solutions shouldn't be allowed.
Those who are doing this kill the problem, and destroy points of first psolvers.
Moreover most of cheaters don't learn anything in copy/paste code.

C) Recommendations to psolvers: do not copy/paste a public code ; your account can be set to unranked, and invisible, or you can be banned. Regular psolver will appreciate. In the real life : what do you think about cheaters ? They are the best politicians, maybe true ! Is it your way of life ?

===

We are waiting for your suggestions too. Here is a good place.

I'm happy to see this thread and am in agreement with the points brought up.

I've spent many hours cleaning up the comments, but it can feel a little discouraging, and hard to keep up with the new ones being added all the time.

On a few occasions I've written some guidelines for writing comments; most recently I wrote this comment on UCV2013H1 in reply to someone who gave a hint and then tried to justify it with "Sorry, but if you are reading the comments, then you are looking for hints":

I've also written a FAQ for comments like "My code runs fine until the 9th case. Is there something tricky about the 9th case?" (seen over and over again, and based on a misconception of how the judge works) and also my philosophy on things like asking the problem setter for debugging help, at the bottom of my SPOJ profile page here since I didn't know where else to put it. The first one deals with people who use "SMS language" and could maybe be rewritten to be more politically correct (?) -- although to my mind it really captures the flavor of very many comments that can be seen "in the wild".

I've already suggested points written by Francky. I've added Mitch's "WA on 9 test case!!" and link to this topic and Mitch's FAQ.
Thank you all for sharing! I really hope it will be added soon.

Yes, point B is very valid.
I have seen some people sharing links to their sites/blogs in order to increase traffic to their sites. But, the worst part is that they are posting solutions as well as detailed explanations to problems solved by them on a daily basis. . And they are posting advertisements beside them.

Point C - This is esentially 'Spirit of SPOJ' point. I feel that this point should not get weakened among the other "factual" points as against this philosophical point. One should lay ample stress on this. And this point is the one which would influence people the most.

P.S. - And lesser would be affected those who would go on the seventh heaven after cracking a 2000 user problem in 1st attempt or share their silly mistakes as if it were a marked historical event of importance smiley .

Yeah, I don't understand why make such comments as well.
They're probably motivated by the fact that there are many such comments (so it seems natural).

That's I'm in the slow process of removing comments on Polish SPOJ - to discourage posting meaningless comments by new users.
After that, I'll start even slower process of removing them from main SPOJ. But frankly, I think it will take a year to do that. Because it's extremely boring and I'm doing only few problems at a time.

And as for posting posts on blogs with solution to problems on SPOJ, I can understand it and even relate to it as I do that myself (but in Polish and describing problems from SPOJPL). So I think it's ok if you describe the algorithm and thus teach people the way of thinking. But of course providing a bare code allows only few users to learn as they have to understand the code reading it line by line.

I beg your pardon sir, but I seem not to concur with this idea smile .
Let us take an example -
Say, a guy is struggling on a problem, for about 3-4 days, which has only been successfully done by 10 users(or may be 1000, doesn't hamper the point of argument).
Now, some other guy comes across a blog which explains that "algorithm". He reads it and codes the problem in 15 minutes(Not to mention the side effects - got AC in 1st attempt, in 15 min, 10 line code .... bla bla in comments smiley ).
So, do you allow me to imply from your statement that this scenario is perfectly ok? And what would those 10 geniuses have to their kitty?
Yeah, one can claim that the guy who spend 3-4 days had a REAL learning and what not ! But does that not defeat the purpose of SPOJ. One of the consequence that I saw during my short stint at practicing SPOJ is that some tougher problems have been cracked by more number of people and the easier ones by much lesser. Why? Because the algorithm/solution is easily available.
And on "learning" - there are a 1000 more websites with each having 10000 questions with each question having 1000s of different solutions(the order of billions !). One can learn there. Let SPOJ remain the unique "SPOJ" and not become CODECHEF or GCJ or something else.
At SPOJ, the user can resist the temptation of not peeking into the solution because of its sheer unavailability. That's the uniqueness. In case the creators of SPOJ want it to be like that, somebody else must not overrule it !

Just a take ! smile

Watsay?

29 days later

Sorry for answering so late. I wanted to think about the problem for some time and then I had other things to do.

Anyway, in my opinion the most important thing is to learn as much as you can. And editorials help with that. So if one of these 10 geniuses you mentioned decides to reveal the algorithm, many others will benefit as problems with only 10 ACs contain probably much knowledgde compressed. So also users from TOP100 can benefit and they can learn from editorials less often.

But I understand your argument that there should be a judge where user have to solve every problem on his own. I don't know if I'd like SPOJ to be that judge. It certainly would be a good idea if there were a few problems. But there are many of them. Anyway, we can't forbid users to share their solutions and even post codes as they can always post it under another name. So it can't be stopped. We could only forbid it and threaten to ban them. But I don't think it's a good idea. And even if I did, my opinion matters only a little as the policy states that it's possible to post whatever one want and when I asked about these publishers as I call them, the answer was to (shortened) 1) ban cheaters 2) leave publishers 3) maybe even allow to publish codes or editorials inside SPOJ. So it won't happen.

I hate to disappoint others so I've fortunately came up with an idea. It probably won't satisfy you but in my opinion it has potential. So, we can't implement your idea on SPOJ but... SPOJ unlike other online judges (I think) allows to create separate contests! So we can create a contest where the rule is not to publish your solutions anyway and if you do, you'll be banned from the contest (and your Problem Setters and Contest Setters rights will be taken if you do so as you're unfair). So Problem Setters would have a choice - add a problem to main SPOJ or add it to my(?) contest NO_PUBLI. Maybe there won't be many PSs that would like to add there problem or perhaps there would be many.

What do you think about my idea? I haven't made the contest yet and I'm not promising I will as perhaps some users will make some strong arguments against it.

==/!\ This message may contain some errors or approximations ; it's a quick answer to give my sentiments.==
==

I don't think publish solution is a good idea.
I think we can't stop people who want publish, but we can forbid links in signatures, moto, to solutions blog...

==

But democracy will speak, and if it would happen that publishing is allowed or promoted, then, if it's spoj_inside, here my 'recommendations' :
* Only after solved a problem we should be able to see editorials, not before, else solve a task is a non sens.
* The psetter "solution" should strongly be the first to be "visible", it could be a part of rule for setting a problem : to publish an official solution by psetter. (Visible by all when the problem is first solved)
* Other "solutions" could be published in a kind of forum thread like there is at Project_Euler. (PE is a great reference!!!)
* It is important to give rules about license on those publishing ; I strongly vote for Creative Commons ones that could be enhanced by other in the spirit of author, completed, ... and such that no commercial use can be made with.
* Anyway I prefer not to see that!

==

Publishing solutions will kill classical as it is one of the only remaining coding place where you can find lot of (easy or moderate or hard) problems without any available solution so that you can search on those that suit the best for you and solve it and can be proud of solving it by your own.
In contrast Project_Euler (excellent quality) have very few problems with non available solutions, and those ones are often way too hard for me (or I suppose that), I really would like no publishers have spoiled them. I remember the time where I struggled to solve my first ones and I saw some known people massively cheat... The good answer of Project_Euler was to give credits only to solvers who solved fast recent tasks : excellent answer ; but way too hard for me. The funny part was the Eulerians absent from new ranking table!
After I found in SPOJ a way to practice my poor skills, and I tried (very often) to solve tasks with a very fast method so that mine was truly mine, and to continuously experiment new ideas : it was a vector of progress for me. I never progress as much as when I tried to time like numerix or Mitch ; many thanks to them by the way. (I hope some users will follow some similar experiments to understand by their-self so many coding tricks). There's maybe other reasons whom I'm not sure, and I'm not the only psolver to do that, each of us have its own reasons maybe different.
For me a problem with an available solution that can be googled have (and it's a shame) no value at my eyes.
I'm proud when I can solve a new uspoiled task, and I feel bad when a beautiful problem fall by the fault of an irresponsible publisher.
It is maybe rude to qualify them of irresponsible, but I just note that I don't think any high ranked user have published his solutions ; we massively find middle skilled psolver. kokosek is maybe the only known exception of a talented psolver that publish some solutions.

I think the only way to learn something is to search methods by our own, read unrelated papers for general methods.
Read a solution won't profit to anybody. If you think you need that : just go to codechef tutorials or other sites (I don't know them, but there's maybe a lot of similar as pointed previously).

If SPOJ should become a place with published solutions, I will maybe solve no more tasks, and only work on setting new problems. (I yet work more on setting new tasks than solve others, but I like both, and I've too a full time job unrelated to coding.)

Edit : There's challenge section too with lot of good remaining tasks, Mitch is the boss here and I understand well why it is a good investment.
(and I write 'no value', it's too hard word ; sorry).

Sorry, but I didn't see your opinion about my idea of a contest where it's forbidden to publish solutions. Isn't that a solution for the problem. Problem Setters who don't want their problems to be described in a contest would be able to add them in a safe place where users can solve them on their own. As I recall, you'd like that, Francky. So these Problem Setters would provide problems for this contest and users like jbourne who doesn't want the editorials would have a place where there are none of them.

The more I think about it, the better solution is seems. Of course at first the number of problems wouldn't be big but in time...

Or instead create a new section where it is allowed to publish solutions ; classical should be the one with grand father clause and no publishing should have been the rule for classical. Are the psetter historically thought spoj will allow publishing solutions? I doubt.
(We can move spoiled and killed problems to that new section, maybe or maybe not.)

== or symmetric attitude

But we can create as you proposed a section without publishing (name ??? say WP), and move classical problems that have been 'protected from spoil' for now and that will benefit of a new official protection. This would give a great amount of good challenging problems to this section ; but in the same time some job (choose them and move them). But is it fair ??? It's a big question. Do nothing isn't fair anymore. Abandon of old good classical in publish_allow_section is a crime too. For the problems killed by publishers the crime is yet done...

==== What do others think about publishing ? Is it really need ?

In any case, for the sake of the ranking system, can a problem with published solution give points ??? I doubt !
Or you can make several ranking tables ; at least one that don't take spoiled problems into account. For me it would become the only valid rank, but if others want to see more points it would be possible...
eg : Table 1 : (points of challenge + WP) . Table 2 : (points of 'spoiled problems').

====
Please note that I have nothing special against publishing as I provide some posts in PE threads and I was proud to be one of the first with enough kudos to get all 'Forum Post Awards' in particular "Esteemed Journalist".
But those posts didn't spoil the problems as there are available only when the problem is solved ; that makes all the difference.
(please note that it was mainly on some 'easy' problems and as I provided some new little tricks, I got lot of kudos on some easy problems with lot of visitors. There are many much more valuable contributions by some solvers in some way harder problems that merits much more than my poor posts)

I like quality problems, and I hope the best for the spoj problem set.

I'm not a friend of the "another new sub-SPOJ contest". It would split the one and only SPOJ into parts and take something away from its "spirit".
I would be prefer not to change too much. Of course, it is unsatisfying as it is, but maybe there is not so much that can be done to generate a satisfying state.

Changing old classical problems into a kind of "published and thus worthless/pointless etc." problem is not fair for all those, that solved the problem either before
they were published or nevertheless completetly on their own. I do not believe that the main interest of all new problemsolvers is to find a published solution and get their points for submitting that. Of course, there are such "problemsolvers" (which in fact are not what the name says), and whenever one of those is detected, he/she should be banned.

What could be done in my opinion without too much effort is:
1. If problemsolvers have a link on there user side that leads directly to published solutions, explain to them the effect of that action and ask them friendly to remove that link. I they do not react, ask them again (not so friendly), set a time limit and ban that user after time is over.
2. If problemsolvers do not have a link on the user side, but a blog/site or whatever with published solutions that is connected to the user name, explain to them the effect of that action and ask them ... see above.

Maybe in some cases it would help to offer those publishing users an alternative, as they seem to like telling the world about their solved problems.
instead of publishing the solution, they could explain the/one idea that is behind the problem and an approach for solving it. Even this is a kind of spoiling, but it is by far better than a complete AC code, that has only to be copied and pasted to get a green SPOJ-light. Anyway a link even to those publications shouldn't be allowed on the user page.

My experience: I tried item 1 of my above suggestions upto the "ask friendly" part. Result was, that this user (with link to published solutions on the user page) apologized and removed that link immediately. He was not aware of what was done with his publications.

I concur very much with @Francky and partly with @numerix.
@Kokosek - Some points would be a repetition of above to press harder on the fact.
My main concern was the vulnerability & futility of the ranking system.
I mean, apart from practicing well, we also get an appreciation from SPOJ by our ranks and points by which we can assess/rate ourselves( and may be boast to our employer stuck_out_tongue, in some cases !).
The points is a big aberration from reality in many cases frowning .

And as they said, a new category(WP) would be a diversion to say the least. And let's look-up to the formidable pool of the order 15000 or so Classical questions. Agree with "the Grand Father clause" thing smile
Although, I, personally, like the idea of 2 types of rankings(2 tables as mentioned) -
1. all problems solved(this can help resolve the issue of tutorials too. Give score for all solved problems, including tutorials. And you see that is why the tutorial section suffers from lack of participation. No motivation to do it.
2. all problems whose solution is not to be found anywhere. I think, this would make people refrain from posting solutions just as a show-off. Because cheaters and solution-inspiration seekers would not refrain from copying because for some of the users the take-away is the rank and not the learning.

But, it is very difficult to implement frowning . And many won't agree to this.

Although, the ones posting links to blogs should be strictly dealt with. I would press on the fact again, that there is no dearth of Programming sites. Millions of questions and solutions. "The sake of Learning" is no excuse at SPOJ. I come to SPOJ when I wanna practice the "no solution" problems. Otherwise, I would go to codechef or codeforces or GCJ practice set.

I can even absorb the fact that some people have "public-git-repos"(I had this earlier, have taken corrective measures), hence, their solutions are exposed. But, not able to digest the idea of explicitly creating blogs, putting advertisements. This is kinda invitation in itself to exploit SPOJ and make a mockery of its ranking system(and earn money & popularity in return ! Wow,I would also love to do that.The spirit goes to hell ).

The idea of a new ranking system can 'solve' all problems about clones, spoiled, published, etc, problems.

No new section would be create, clones* could come back to classical, BUT
only unspoiled problems are taken into account in the ranking system.
ie spoiled problems are 0.00 valued problems, but as they are sometimes great can be placed in classical.

It's not a perfect system, as it is always possible to find some weaknesses but it seems quite fair. What do you think about that ?

Maybe I missed something or misunderstood, but as I see it (please correct me, if I'm wrong), that would lead to the following situation:
I solve a problem of the "unspoiled section", I am happy (maybe proud) about solving it and getting some points as regard.
Then, maybe weeks, months or years later, an EB member notices, that someone published a solution for that problem.
As a result of that, it is moved to the "you get no point for that problem"-spoiled / classical or whatever it will be called section and all honest, hard working problem solvers lose their points because of a single user that published that solution.

Yes, the publisher kill the problem.
So it's a bad idea ; it's true.
What to do ?

To be honest (and you know that), the actual situation is : when a publisher kill a problem, some new 'psolvers' (sic!) will decrease the number of points of the problem, and with the time put it to near 0.

@numerix is right on nullifying marks. Although, I would not mind giving a fresh start to SPOJ, but the MASTERS & GRANDMASTERS would be at a great loss(esp. those who have left SPOJ and still manage to be in top 100, say).

I think, taking strict action against the solution publishers is a good and stable thing to start with. SPOJ is very weak on that part.
And you see the trade-off - nobody would want their account to be banned or say points-made-zero in lieu of one's blog advertisements. One would have to protect the chicken to keep getting the eggs stuck_out_tongue .
Why can't we start with this? Some publishers don't even know/realize that it is incorrect. Many of those might stop doing it in "Spirit".

There's a news:

The here link is goo.gl/forms/VsktGdeRPx2

I don't want to use any google account. How can I see the survey and answers ?

I thought a survey could be launched in the forum ; phpBB should do that. Why the use of an (evil?) external tool ?