@Dan: see, that is not the point. We are just looking for a better
solution not just an algorithm which fetches us 0.00 time given the
SPOJ conditions. Actually we are not worried about the compiler stuff
because its all relative. Some other person on this SPOJ platform has
submitted the code which runs in 0.00 sec so we want to think of the
optimizations he might have employed which made his code to run
faster.

Another plus point is- the difference in the time might be covered by
exploiting the SPOJ platform but in the meanwhile, we get to think, we
might get a new approach to the problem or may be an inprovement in
the algorithm being deployed. Thats the whole point. Its just
relative. Someone has used some optimizations and got a better time so
we are looking for it.

People do write their functions to multiply, take modulus etc We skip
the printf scanf calls instead switch to fread etc just to achieve the
speedup. The purpose is not just to solve the problem but to solve it
efficiently. Say we are just sorting an array, the way we do it, the
memory we use etc. it all matters and SPOJ helps to measure the same
relatively. The problem given might be trivial but the competition
among thousands of coders trying to achieve the best time for the same
builds the spirit and helps to explore new techniques, new algorithms.
It all comes with an urge to make our code run faster.

Regarding the 1.6M, I don't really kno what it means but if one is
interested, you can look for it on the forums etc and you'll have your
answer. Some addicted user must be knowing this stuff actually. At the
end, its all about the competition after you discover the logic to
solve the problem.
When you don't have the urge to improve upon it, you won't discover
something new, something efficient.

These are my views. I am not an addicted SPOJ user. I might be
mistaken but this is what i feel.

Doom

On Jun 26, 11:59 pm, Dan <dant...@aol.com> wrote:
> I found the problem statement on the web page link to be a bit
> "weak".   Nothing in the problem statement says that you must do
> anything other than read in two lines of integers and multiply them in
> pairs and sum the results  ( ie.  Dot Product ).
>
> People seem to think that you should sort the data first  ( an
> assumption that is NOT in the problem statement ).   Does that mean
> that you get the problem wrong if you don't sort the data first?
>
> Also...  it looks as if you have to write the code in one of the
> listed languages.  Is that true?
> You then submit your "text" code and it is compiled somewhere else?
> What compiler(s) is/are used and with what settings?  This can affect
> both speed and memory (by large amounts).
> Also...  exactly what does  1.6M  for  memory mean?
>
> For the moment,  let's assume that you ARE supposed to sort the data
> first.
> Then...  at best,  all this test really does is check to see if you
> can read and sort data quickly.  Multiplying pairs of numbers is
> trivial and I doubt many individuals are writing much code to speed up
> this simple Dot Product calculation.   So...  unless you write your
> own integer sorting algorithm that you are very proud of,  what's the
> point of this test (other than it might be worthwhile as a homework
> assignment to new coders).
>
> Have I missed something?
>
> Dan   :-)
>
> On Jun 24, 9:53 am, prathimzn <prathi...@gmail.com> wrote:
>
>
>
> >http://www.spoj.pl/problems/FASHION/
>
> > i summit this question and my time is 0.02 as i used sorting and then
> > multiply corresponding index value and sum them to get ans.
>
> > but best time is 0.00 and 1.6M in C.
> > can anyone tell me what is the best algo to solve this problem in 0.00 i.e.
> > best algo
>
> > *
>
> > - - - - -
> > WITH REGARDS,
> > PRAMENDRA RATHI
> > *
> > **
> > *B.TECH 2ND YEAR*
> > *COMPUTER SCIENCE AND ENGINEERING*
> > *NIT ALLAHABAD*- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to