negative heights ??? what the hell does that mean?
and when two of ha, hb, and hc are zero, then we have no triangle but something like a line, which obviously has are 0.000. I don't think it is invalid input. However, when only one of ha, hb, hc is zero, then the input is invalid.
Am I right here ...
Search found 14 matches
- Fri Oct 24, 2003 10:44 am
- Forum: Volume 105 (10500-10599)
- Topic: 10522 - Height to Area
- Replies: 32
- Views: 21783
- Tue Oct 21, 2003 8:38 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10522 - Height to Area
- Replies: 32
- Views: 21783
...
[quote="Maarten"]did you consider the case where either one of a,b,c is equal to zero
int AC = 2*area/b;
int BC =2*area/a;
my invalid condition is : AC<a,b,c && BC<a,b,c
and one of a,b,c equal to 0;
please give me more hints.....thank you!!
int AC = 2*area/b;
int BC =2*area/a;
my invalid condition is : AC<a,b,c && BC<a,b,c
and one of a,b,c equal to 0;
please give me more hints.....thank you!!
- Mon Oct 20, 2003 8:49 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10522 - Height to Area
- Replies: 32
- Views: 21783
10522
in 10522
i carculate :
area=(a*b*c*a*b*c)/sqrt((a*b+b*c+a*c)*(a*b+b*c-a*c)*(a*b+a*c-b*c)
*(b*c+a*c-a*b))
am i wrong???
it execuate correctly when using acm's sample
what's the condition 'invalid' ???
please tell me~~ thank you very much!!!
i carculate :
area=(a*b*c*a*b*c)/sqrt((a*b+b*c+a*c)*(a*b+b*c-a*c)*(a*b+a*c-b*c)
*(b*c+a*c-a*b))
am i wrong???
it execuate correctly when using acm's sample
what's the condition 'invalid' ???
please tell me~~ thank you very much!!!
- Wed Oct 15, 2003 2:11 pm
- Forum: Algorithms
- Topic: Reverse Problem.....can somebody give me hints.
- Replies: 4
- Views: 2969
about alorithm 2
as the algorithm 2 mentioned in http://www.ioi2003.org/ioitasks/data-reverse.pdf
i still can't understand it's spirit completely.
for the case of N=44,i initialize the registers' value as :
register 1 2 3 4 5 6 7 8 9
N N-2 N-5 N-9 N-14 N-20 N-27 N-35 0
and i know no matter what value N is, the ...
i still can't understand it's spirit completely.
for the case of N=44,i initialize the registers' value as :
register 1 2 3 4 5 6 7 8 9
N N-2 N-5 N-9 N-14 N-20 N-27 N-35 0
and i know no matter what value N is, the ...
- Tue Oct 14, 2003 3:47 pm
- Forum: Algorithms
- Topic: Reverse Problem.....can somebody give me hints.
- Replies: 4
- Views: 2969
thanx
thanks...
the information is useful~~~
thank you many much!!!
the information is useful~~~
thank you many much!!!
- Mon Oct 13, 2003 12:57 pm
- Forum: Algorithms
- Topic: Reverse Problem.....can somebody give me hints.
- Replies: 4
- Views: 2969
Reverse Problem.....can somebody give me hints.
Consider a Two-Operation Machine (TOM for short) with nine registers, numbered 1
- Sun Oct 05, 2003 8:21 pm
- Forum: Volume 2 (200-299)
- Topic: 294 - Divisors
- Replies: 91
- Views: 39528
294 WA.....i don't know why!!!.........
[cpp]
#include<iostream.h>
#include<math.h>
struct divisor{
int factor;
int num;
};
bool prime(int X)
{
int i;
i=0;
for(i=2;i<X;i++)
if((X%i)==0)
return false;
return true;
}
int division(int div[],int X,int div_num)
{
int i=0,N=1,t=0;
int X2=X;
if(X==1)
return 1;
for(i=0;i<div_num;i ...
#include<iostream.h>
#include<math.h>
struct divisor{
int factor;
int num;
};
bool prime(int X)
{
int i;
i=0;
for(i=2;i<X;i++)
if((X%i)==0)
return false;
return true;
}
int division(int div[],int X,int div_num)
{
int i=0,N=1,t=0;
int X2=X;
if(X==1)
return 1;
for(i=0;i<div_num;i ...
- Sun Oct 05, 2003 4:58 pm
- Forum: Algorithms
- Topic: a problem similar to Graph....can somebody help me
- Replies: 6
- Views: 3068
- Sun Oct 05, 2003 8:55 am
- Forum: Volume 2 (200-299)
- Topic: 294 - Divisors
- Replies: 91
- Views: 39528
...
As the number growing up, i need more time to get result.
But I have used the prime's method....
So,Is there any aspect i have not notice???
But I have used the prime's method....
So,Is there any aspect i have not notice???
- Sun Oct 05, 2003 8:20 am
- Forum: Algorithms
- Topic: a problem similar to Graph....can somebody help me
- Replies: 6
- Views: 3068
hmn..
I guess it's not MST problem.
Because there may be one or more node connect to one node.
Just let all nodes be in a connected componet.
Because there may be one or more node connect to one node.
Just let all nodes be in a connected componet.
- Sat Oct 04, 2003 3:03 pm
- Forum: Volume 2 (200-299)
- Topic: 294 - Divisors
- Replies: 91
- Views: 39528
In 294,if two numbers have the same number of divisors....
how should i output my result???
thanks!
thanks!
- Sat Oct 04, 2003 1:36 pm
- Forum: Algorithms
- Topic: a problem similar to Graph....can somebody help me
- Replies: 6
- Views: 3068
a problem similar to Graph....can somebody help me
There's N vertices.
And between two vertice,there may exist path(s) or non.
each path between two vertices are not same in length.
How could I find the shortest length if these vertices construct a complete graph? in this problem,you don't need to care ablut the start and end point.Just calculate ...
And between two vertice,there may exist path(s) or non.
each path between two vertices are not same in length.
How could I find the shortest length if these vertices construct a complete graph? in this problem,you don't need to care ablut the start and end point.Just calculate ...
- Fri Oct 03, 2003 10:42 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110252
3Q
so,this situation i mentioned is invalid.
I can ignore that.....right?
I can ignore that.....right?
- Fri Oct 03, 2003 5:18 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110252
I got crazy about 101.....please help me
what's the result alfter "pile 4 onto 1":
0:0 1 2 3
1:
2:5
3:
4:4 6
5:
6:
I am not sure where 5,2 wll perform.....
0:0 1 2 3
1:
2:5
3:
4:4 6
5:
6:
I am not sure where 5,2 wll perform.....