daftcoder's blog

By daftcoder, 11 years ago, In English
If you write on Java and still don't have a good template with most of needed algorithms, I recommend you to pay attention to a template by Abrackadabra.

You can find his code on the standings page, finding him in a table, double-pressing to a cell of a problem and finally clicking on a submit id.

But I don't give a guaranties that all code is correct.

GL & HF ;-)
 
 
 
 
  • Vote: I like it
  • +2
  • Vote: I do not like it

11 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I'm not sure if it is allowed to use code not written by yourself
  • 11 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Moreover using another's code is disallowed. But maybe it can help somebody to start his own algo template.

    BTW, did you look at the code? :)
    • 11 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      Yep. I'm currently trying to write some "packer" that will automatically append classes from my prewritten library before submit
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I think using any code that differs from input/output template is a kind of cheating (prewritten algorithm libraries, e-maxx.ru/algo/). Contestant must write any line of solution by yourself and during the contest.
  • 11 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it
    There is nothing about "during the contest" in the rules
    Also I think using code that is generated by IDE is ok
    • 11 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it
      It's not about rules, it's about fair play.
      "any line of solution" - except i/o template, of course
      • 11 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it
        I don't see anything "fair" in writing, say, Dijcstra algo for 100500th time
        • 11 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it
          You're red and always stay in the top-10 in the rankings on Codeforces. You know all these algorithms for a long time, and so you don't like to write them again and again. It's explainable.
          But look around - there are many green, blue, violet, orange programmers. And it would not be good, if they start to copy and paste code that they don't understand.
          • 11 years ago, # ^ |
              Vote: I like it +3 Vote: I do not like it
            If they wrote it by themselves they must understand it
          • 11 years ago, # ^ |
              Vote: I like it -6 Vote: I do not like it
            in your previous post, you mentioned about "fair play"... here you started to talk about colours? those who are coloured red can do everything and "many other remaining colours" cannot do? you wanted to say this..or?
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I think people must be punished for such a big amount of unused code, as it is done in TopCoder (for more than 30% of unused code).
11 years ago, # |
  Vote: I like it +5 Vote: I do not like it
O_o and I don't know about that discussion =)
I see that it's unfair to use not yours code, but what's wrong in using your own code just written some time ago?
  • 11 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it
    Your programs have lots of unused code and it makes difficult to hack it. x_X
    • 11 years ago, # ^ |
        Vote: I like it -10 Vote: I do not like it
      =D That's the trick. I also thought to hide solve() somewhere in the code, but then even I cannot find it quickly.
      • 11 years ago, # ^ |
          Vote: I like it +5 Vote: I do not like it
        Unused code should not be allowed. Especially in this big amount.
      • 10 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        If the code is affected by some bugs it's useless to prevent other users from hacking... It will fail at final tests anyway :)
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I think without understanding a code is not fare to copy and paste that. That will be a loss of himself. Because solving problem by copying only, is not required. To be a good programmer means a man who have a lot knowledge and can solve problems not only submitting code....