Search found 374 matches

by Sedefcho
Sat Feb 03, 2007 5:22 pm
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14980

extended greedy

Thank you, A1 . I slightly modified my program to use your "extended greedy idea" and now I get ACC. So at each step we have 4 options to continue (put minValue on the left, put minValue on the right, put maxValue on the left, put maxValue on the right). And in my previous algorithm I used to try on...
by Sedefcho
Sat Feb 03, 2007 4:36 pm
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14980

OK, I see. So it is greedy at the end of the day. To rio: yes, I handle this test case as it exactly fits in the greedy approach: 1) Choose the biggest number ( 10 ) and add it to the permutation ---> 10 2) Choose the the smallest number ( 1 ) and add it on one side of the permutation formed so far:...
by Sedefcho
Sat Feb 03, 2007 3:11 am
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14980

After thinking a bit on this problem I invented absolutely the same greedy idea as mrahman suggested I implemented it and I got WA. So I read this thread and ... if the I/O posted above is from an ACC program then my program fails on test cases 12 and 8. So, paulmcvn, what do you mean by "sorry, you...
by Sedefcho
Wed Jan 03, 2007 3:42 pm
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 31886

the order matters of course

The order matters in my opinion. I am pretty sure actually. The problem is not talking about sets but about sequences. So any interpretations that we should rearrange or sort the sequence before even starting to process it are wrong. At least this is my opinion and this is what the common math sense...
by Sedefcho
Thu Nov 23, 2006 4:44 pm
Forum: Volume 111 (11100-11199)
Topic: 11122 - Tri Tri
Replies: 29
Views: 8852

un-precise algorithm

I got ACC with a not-always-exact solution. I take one of the triangles and start traversing its border by doing small steps - say 1/1000 of the length of the triangle side we are currently on. So in about 3000 steps I get 3000 points and for each such point I check if that point is internal for the...
by Sedefcho
Wed Nov 08, 2006 6:32 pm
Forum: Volume 111 (11100-11199)
Topic: 11108 - Tautology
Replies: 8
Views: 4652

I found my mistake. Thanks anyway.
by Sedefcho
Tue Nov 07, 2006 4:48 pm
Forum: Volume 111 (11100-11199)
Topic: 11108 - Tautology
Replies: 8
Views: 4652

I don't trim them. But anyway, I skip all chars in the input strings which are not part of the problem statement ('N', 'A', 'p', 'r' ... etc. ). INPUT p q r s A p Np ApNq ApN NNp ANNpNNNp EKCp qCqpEpq EpNNp EpNNNp EN ***** pN **** NNp NK ******* pN **** &&&& p *** CpCqp 0 OUTPUT not not not not taut...
by Sedefcho
Tue Nov 07, 2006 3:24 pm
Forum: Volume 111 (11100-11199)
Topic: 11108 - Tautology
Replies: 8
Views: 4652

Request for sample I/O

Here is some sample I/O from my WA program. INPUT p q r s ApNp ApNq ApNNNp ANNpNNNp EKCpqCqpEpq EpNNp EpNNNp ENpNNNp NKpNp CpCqp 0 OUTPUT not not not not tautology not tautology tautology tautology tautology not tautology tautology tautology Is this output OK? Could someone post several critical tes...
by Sedefcho
Tue Oct 10, 2006 4:00 pm
Forum: Volume 111 (11100-11199)
Topic: 11110 - Equidivisions
Replies: 33
Views: 18934

So what is the fix for this "no problem"-problem :)
by Sedefcho
Mon Sep 18, 2006 9:11 am
Forum: Algorithms
Topic: VERY CHALLENGING QUESTION OF NETWORK FLOW
Replies: 6
Views: 4553

What does "rearrangeable matrix" means?

Yes, unfortunately the PDF file does not define what
"rearrangeable matrix" means. If you can give me the
definition maybe I will be able to help you.

Regards,
Peter
by Sedefcho
Sat Aug 19, 2006 8:42 pm
Forum: Volume 110 (11000-11099)
Topic: 11070 - The Good Old Times
Replies: 42
Views: 14967

Thanks for the input, little joey. The first answer of my prog for your test cases was: -3966.-29 ( That's because I have a stupid custom Java method which rounds doubles up to three digits after the decimal point, and that method was not working for negative numbers at all ). Which explains the WA ...
by Sedefcho
Fri Aug 18, 2006 6:15 pm
Forum: Volume 110 (11000-11099)
Topic: 11070 - The Good Old Times
Replies: 42
Views: 14967

Yes, I also still get WA although my program
produces right answers for all tests posted here.

Some more test cases?

Peter
by Sedefcho
Fri Aug 18, 2006 12:28 pm
Forum: Volume 110 (11000-11099)
Topic: 11070 - The Good Old Times
Replies: 42
Views: 14967

Hi all, FOR THIS INPUT -1000/-3+-1000/-3+-1000/-3-1000/-3+-1000/-3+-1000/-3 -1000/-3+-1000/-3+-1000/-3-1000/-3+-1000/-3 -1000/-3+-1000/-3+-1000/-3-1000/-3 -1000/-3+-1000/-3+-1000/-3 -1000/-3+-1000/-3 -1000/-3 2*-0.5+-0.5*3+-15.5 1/2/2 -3.0 3 4.0+3.0/5.0 1*2*3+1+1*2+1*2*3*4 --9 -1-1+9/3 ---9 -9--+-9 ...
by Sedefcho
Tue Aug 01, 2006 11:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10061 - How many zero's and how many digits ?
Replies: 43
Views: 21325

To nymo: thanks a lot from me. I started attacking this problem today and your post was crucial for solving it. After about 15 submissions I got ACC. Here is some more input from me for anyone who might still be trying to solve it. Note: 1048575 = 2^20 - 1, this according to the problem statement is...
by Sedefcho
Wed Jun 21, 2006 2:23 pm
Forum: Volume 101 (10100-10199)
Topic: 10168 - Summation of Four Primes
Replies: 51
Views: 20053

What error do you get ?
If you are getting TLE then, well...
You should not do a sieve up to 10,000,000 but only
up to SQRT(10,000,000), otherwise I think it is normal
to get a TLE.

By the way, it's a bad idea to directly post
source code and to just say "please help me" :)

Go to advanced search