Page 1 of 6
10344 - 23 out of 5
Posted: Mon Sep 16, 2002 11:35 am
I got Runtime Error for this problem 10344 with the following message:
Your program has died with signal 8 (SIGFPE). Meaning:
Floating point excepti
I think it is cause by divided by zero.
But I dont know how it happen.
Could it have zero input int the 5-tuples except the last one?
Posted: Tue Sep 17, 2002 8:28 am
you can check this type of questions using 'abort()' or some different technique (TLE,mem alloc,SIGFPE,SIGSEGV,output exceeds,...) to signal back when the problematical event occures (like specific input, example four zero and a non zero input)
Posted: Tue Sep 17, 2002 1:19 pm
maybe you divide zero or a very small real number, or sqrt(negative number)
Posted: Tue Sep 17, 2002 1:36 pm
i think neither float operation by FPU raise any SIGFPE with it's default control word (in i386 architecture). only integer division by zero does (by CPU).
Posted: Wed Sep 18, 2002 8:35 am
I use abort() to test if the input contain 0.
Yes, it does. The ACM tell a lie again.
The Problem description says:
The Input consists of 5-Tupels of positive Integers, each between 1 and 50.
But I solved this problem using another approch which no using / or %.
Posted: Mon Mar 24, 2003 1:39 pm
Can someone help me to find what wrong with my code,or give me some
void sh (int);
void change (int);
void change (int N)
else if (intOK==0)
for (intT=0 ;intT<5-N ; intT++)
for (intT2=N-1 ;intT2<4 ;intT2++)
void sh (int N)
for (intT=0 ;intT<4 ;intT++)
else if (intOK==0)
for (intT=1 ;intT<=3 ;intT++)
while (cin >> intIn >> intIn >> intIn >> intIn >> intIn)
if (intIn==0 && intIn==0 && intIn==0 && intIn==0 && intIn==0)
cout << "Impossible" << endl;
cout << "Possible" << endl;
Posted: Sat Jul 12, 2003 5:15 am
Can the 5 numbers be swapped?
If not, whhy 1 2 3 4 5 = possible?
Posted: Tue Jul 15, 2003 7:10 pm
i found some dis-similarity between the outputs that your program showed and those of mine;
some of those inputs are:
41 4 2 3 42
3 11 22 33 23
29 23 34 4 6
30 27 6 23 36
21 45 24 22 20
Posted: Wed Mar 03, 2004 1:21 pm
This is very sad that there is a mistake in the problem description of
of the problem number 10344(23 out of 5).
They said that there is no such an input data that contain 0.
That is, the input will be from 1 to 50.
But i found 0 in the input set.
This mistake spent my huge times and created frustration.
This should not be happened.
Posted: Wed Mar 03, 2004 3:55 pm
Now that so many fixing mistakes are going on, why don't they fix where fixing is really necessary. Misinforming problem statement can be very frustrating and time consuming.
Posted: Wed Mar 03, 2004 7:47 pm
You can write an email to firstname.lastname@example.org
if you notice any mistake in a problem description. Don't complain in the message board, it is not possible for the admins to read all threads (and likewise it is not possible to check every problem, so it is necessary that we, the users of this site, write emails to the admins if we notice a mistake).
Posted: Wed Sep 01, 2004 3:09 am
Can anybody show me how to get 23 from 1 2 3 4 5?
Posted: Wed Sep 01, 2004 9:39 am
minskcity wrote:Can anybody show me how to get 23 from 1 2 3 4 5?
(((3 * 5) - 4) * 2) + 1
Posted: Thu Sep 23, 2004 6:46 pm
I get WA on this problem again and again. Maybe I don't understand the problem description. Tell me if I am wrong:
1) There occurs 0 in the input
2) Could I use division, or only +, *, -? Maybe it's posible if there occurs 0 and you can use division -- that would be the reason for yatsen's runtime error? But in the problem description there is nothing said you can use division ...
Posted: Tue Aug 02, 2005 11:20 pm
I reported the fact to the judges that it looks like a 0 appears in the input, and they replied saying that there was, indeed, a single 0 in one of the test cases. He reported that the test case will be changed.