Thread: Xmas competitions

  1. #16
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > does the amount of sections on the base of the tree equal the order?
    order + 1

    Since order 0 is just
    /\
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #17
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    I must say, #1 is a fun little problem. Not too involved, but a few tricky areas. Thanks, it helped to kill a little bit of time. I look forward to seeing the entries for these competitions, it should be interesting.
    My best code is written with the delete key.

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Boost libraries not allowed?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    CornedBee:
    yep, only standard C/C++, and STL is allowed for C++, check out the bottom of Salem's post.

    Prelude:
    I got it working right yesterday moving to problem #2.
    Last edited by glUser3f; 12-02-2003 at 04:49 AM.

  5. #20
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Damn, those would have been really helpful in obfuscating...
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #21
    .........
    Join Date
    Nov 2002
    Posts
    303
    Contest looks cool, I might enter if I can avoid procrastinating hehe.
    Last edited by SourceCode; 12-02-2003 at 07:26 AM.

  7. #22
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > I might enter if I can avoid procrastinating
    Well if you want to enter something for the most procrastinated program, I look forward to your submission sometime in 2010
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #23
    .........
    Join Date
    Nov 2002
    Posts
    303
    Originally posted by Salem
    > I might enter if I can avoid procrastinating
    Well if you want to enter something for the most procrastinated program, I look forward to your submission sometime in 2010
    ROFL

  9. #24
    Registered User
    Join Date
    Jul 2003
    Posts
    450
    Can we submit more than one solution to an entry?

  10. #25
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > Can we submit more than one solution to an entry?
    Mmm, a couple of entries would be OK so long as they're sufficiently distinct, say an iterative C solution and an STL-based C++ solution.

    Spamming minor variations may get you disqualified.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  11. #26
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    No one should have this solution for #2 (less'n they a cheater)
    Code:
    #include <stdio.h>
    int mmain
    (int t,int 
    _,
    char*a
    ){return!
    0<t?
    t<3?
    mmain(-79,-13,a+mmain(-87,1-_,mmain(-86, 0, a+1 )+a)):
    1,
    t<_?
    mmain( t+1, _, a )
    :3,
    mmain ( -94, -27+t, a )
    &&t == 2 ?_
    <13 ?
    mmain ( 2, _+1, "%s %d %d\n" )
    :9:16:
    t<0?
    t<-72?
    mmain( _, t,
    "@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
    :
    t<-50?
    _==*a ?
    putchar(31[a]):
    mmain(-65,_,a+1)
    :
    mmain((*a == '/') + t, _, a + 1 )
    :
    0<t?
    mmain ( 2, 2 , "%s")
    :*a=='/'||
    mmain(0,
    mmain(-61,*a, "!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry")
    ,a+1);}
    int
    main(
    ){
    mmain(
    1,1,"phillipps"
    )
    ;return 0;}
    gg

  12. #27
    WTF, did you come up with that?

    that is great

    edit:
    I wouldn't even dare enter the contest after seeing this
    Last edited by maes; 12-03-2003 at 05:54 PM.

  13. #28
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Interesting, very interesting.

  14. #29
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Originally posted by maes
    WTF, did you come up with that?
    Hell No!! Do I look like a robot?!

    I did make it standards compliant however.

    I got it from the same place where Salem probably got the idea for it.
    It's not a submission into the contest, just an example.

    gg

  15. #30
    >>Hell No!! Do I look like a robot?!
    pfew, you scared me there for a moment. Don't you ever do that again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The Xmas Tree competition results
    By Salem in forum Contests Board
    Replies: 10
    Last Post: 12-30-2003, 05:26 AM
  2. Xmas
    By Stoned_Coder in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 12-25-2002, 04:58 AM
  3. Competitions
    By Shakespeare in forum C++ Programming
    Replies: 2
    Last Post: 03-11-2002, 05:00 AM