Ccc2013
Author |
Message |
ishiney
|
Posted: Sat Mar 02, 2013 8:43 am Post subject: Re: Ccc2013 |
|
|
bbi5291 @ Fri Mar 01, 2013 11:18 pm wrote: coolgod @ Fri Mar 01, 2013 10:46 pm wrote: Guide to getting high scores on CCC.
learn c and use c inputs instead of C++. This is the only contest I've seen where a c++ solution does not run in time but a c one does.
Then you haven't seen a lot of contests.
I personally think there's nothing inherently unfair with the fact that i/o with scanf/printf is faster than their cin/cout counterparts, or BufferedReader vs. Scanner, or just Python, etc. Though it would have been nice if there were a note about this on the instructions somewhere on the site. In comparison, USACO tells you bluntly that C-styled i/o is faster than C++ streams; to use BufferedReader rather than Scanner; and that Python should not be used for large inputs. I guess this is just something that comes with experience. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
ishiney
|
Posted: Sat Mar 02, 2013 9:55 am Post subject: RE:Ccc2013 |
|
|
Are we allowed to talk about the problems/solutions yet? |
|
|
|
|
|
linuxp
|
Posted: Sat Mar 02, 2013 11:02 am Post subject: Re: RE:Ccc2013 |
|
|
ishiney @ Sat Mar 02, 2013 9:55 am wrote: Are we allowed to talk about the problems/solutions yet?
mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what |
|
|
|
|
|
nullptr
|
Posted: Sat Mar 02, 2013 12:02 pm Post subject: Re: RE:Ccc2013 |
|
|
linuxp @ Sat Mar 02, 2013 11:02 am wrote: ishiney @ Sat Mar 02, 2013 9:55 am wrote: Are we allowed to talk about the problems/solutions yet?
mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what
Do you mean http://access.mmhs.ca/ccc/index.htm ? Cause I can't find it anywhere.. |
|
|
|
|
|
ishiney
|
Posted: Sat Mar 02, 2013 12:25 pm Post subject: Re: RE:Ccc2013 |
|
|
linuxp @ Sat Mar 02, 2013 11:02 am wrote: ishiney @ Sat Mar 02, 2013 9:55 am wrote: Are we allowed to talk about the problems/solutions yet?
mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what
That seems to be true. I re-coded S4 in Python, with all the optimizations I know - can't get more than 8/15. Python really need an efficient vector or ArrayList equivalent ... but since it's dynamically typed, it probably wouldn't |
|
|
|
|
|
azneye
|
Posted: Sat Mar 02, 2013 12:52 pm Post subject: Re: RE:Ccc2013 |
|
|
nullptr @ Sat Mar 02, 2013 12:02 pm wrote: linuxp @ Sat Mar 02, 2013 11:02 am wrote: ishiney @ Sat Mar 02, 2013 9:55 am wrote: Are we allowed to talk about the problems/solutions yet?
mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what
Do you mean http://access.mmhs.ca/ccc/index.htm ? Cause I can't find it anywhere..
My school website was moved here: http://mmhs.ca/ccc/index.htm |
|
|
|
|
|
Raknarg
|
Posted: Sat Mar 02, 2013 1:04 pm Post subject: RE:Ccc2013 |
|
|
Did you guys do the junior or senior questions? |
|
|
|
|
|
nullptr
|
Posted: Sat Mar 02, 2013 1:25 pm Post subject: Re: RE:Ccc2013 |
|
|
azneye @ Sat Mar 02, 2013 12:52 pm wrote: nullptr @ Sat Mar 02, 2013 12:02 pm wrote: linuxp @ Sat Mar 02, 2013 11:02 am wrote: ishiney @ Sat Mar 02, 2013 9:55 am wrote: Are we allowed to talk about the problems/solutions yet?
mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what
Do you mean http://access.mmhs.ca/ccc/index.htm ? Cause I can't find it anywhere..
My school website was moved here: http://mmhs.ca/ccc/index.htm
Thanks a lot!! Any reason why there's no S5 solution? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
linuxp
|
Posted: Sat Mar 02, 2013 1:27 pm Post subject: Re: RE:Ccc2013 |
|
|
ishiney @ Sat Mar 02, 2013 12:25 pm wrote: linuxp @ Sat Mar 02, 2013 11:02 am wrote: ishiney @ Sat Mar 02, 2013 9:55 am wrote: Are we allowed to talk about the problems/solutions yet?
mmhs.ca already posted solution for s1-4 in python
The funny thing is python cannot solve s4 perfectly no matter what
That seems to be true. I re-coded S4 in Python, with all the optimizations I know - can't get more than 8/15. Python really need an efficient vector or ArrayList equivalent ... but since it's dynamically typed, it probably wouldn't
NO! you are wrong. The real suck point of S4 is input.
CCC should consider some languages have slow input.
for example: python input(), c++ cin, turing, ruby etc...
Python solution only need less than 0.1 second for solving largest cases
But it took more than 5s to get input.
It's just ridiculous.
Log files:
unknown
case: s4.6-1.in
reading :5.623000
solving: 0.088000
all: 5.711000
unknown
case: s4.6-2.in
reading :5.722000
solving: 0.054000
all: 5.776000
yes
case: s4.6-3.in
reading :5.691000
solving: 0.214000
all: 5.905000
no
case: s4.6-4.in
reading :5.753000
solving: 0.094000
all: 5.847000
no
case: s4.6-5.in
reading :5.656000
solving: 0.272000
all: 5.928000 |
|
|
|
|
|
bbi5291
|
Posted: Sat Mar 02, 2013 2:33 pm Post subject: Re: Ccc2013 |
|
|
So what do you expect them to do? Give you a longer time limit for C++ than for C? That would be ridiculous, because then you could just use C input functions in C++, and then you'd have an unfair advantage over the C people.
Giving all programming languages equal execution time is the least evil of all choices.
Also, did any of you actually bother to test your programs on huge cases, to be sure they wouldn't time out? If you had, you would've known that cin wouldn't cut it. |
|
|
|
|
|
ishiney
|
Posted: Sat Mar 02, 2013 5:13 pm Post subject: Re: Ccc2013 |
|
|
bbi5291 @ Sat Mar 02, 2013 2:33 pm wrote: So what do you expect them to do? Give you a longer time limit for C++ than for C? That would be ridiculous, because then you could just use C input functions in C++, and then you'd have an unfair advantage over the C people.
Giving all programming languages equal execution time is the least evil of all choices.
Also, did any of you actually bother to test your programs on huge cases, to be sure they wouldn't time out? If you had, you would've known that cin wouldn't cut it.
I agree. Besides, Python/Java had lots of other "unfair" advantages*, one might say, in their standard libraries. Should we allow C++ contestants to use the Boost libraries or such as well? It's a slippery slope...
Edit: advantages such as BigInteger, built-in Geometry libraries (for Java at least), regex, even GregorianCalendar, HASHMAPS/SETS ... it's actually unfair. D: |
|
|
|
|
|
ishiney
|
Posted: Sat Mar 02, 2013 5:30 pm Post subject: RE:Ccc2013 |
|
|
So, maybe some actual discussions about the questions now?
I think S1 and 2 were adhoc, 3 was a simulation/complete search, 4 was a simple DFS/BFS, and 5 was a DP + Dijkstra (I only got 13/15 even after optimizing like crazy though =__=)
I know 1 person who did get a perfect score on S5. I'll ask for his code/algorithm.... |
|
|
|
|
|
linuxp
|
Posted: Sat Mar 02, 2013 5:37 pm Post subject: RE:Ccc2013 |
|
|
My friend got perfect on S5 using Java.
He said its some kind of Math approach.
For 5000000 his program only used 0.x second. |
|
|
|
|
|
Unnamed
|
Posted: Sat Mar 02, 2013 5:40 pm Post subject: Re: Ccc2013 |
|
|
S5: I know someone with a 15/15 C++ solution that runs in 0.00X s or 0 s for all cases. |
|
|
|
|
|
Halls McSmurfin
|
Posted: Sat Mar 02, 2013 5:43 pm Post subject: Re: Ccc2013 |
|
|
I know someone with a < 1.7s run time for the largest cases in S4 with Python, too bad it doesn't pass the grader. lol... |
|
|
|
|
|
|
|