Please give me some input/output for the problem 10112 Myacm Triangle. I'm getting WA
10112 - Myacm Triangles
Moderator: Board moderators
-
Raj Ariyan
- Learning poster
- Posts: 70
- Joined: Sat Feb 05, 2005 9:38 am
- Location: Gurukul
10112 - Myacm Triangles
Hi,
Please give me some input/output for the problem 10112 Myacm Triangle. I'm getting WA
. Thanks in advance.
Please give me some input/output for the problem 10112 Myacm Triangle. I'm getting WA
Last edited by Raj Ariyan on Sat Apr 16, 2005 3:19 pm, edited 1 time in total.
Some Love Stories Live Forever ....
-
mohiul alam prince
- Experienced poster
- Posts: 120
- Joined: Sat Nov 01, 2003 6:16 am
- Location: Dhaka (EWU)
-
Raj Ariyan
- Learning poster
- Posts: 70
- Joined: Sat Feb 05, 2005 9:38 am
- Location: Gurukul
Pro
Hi prince,
Sorry, i've edited my previous post. If u can then plz send me some I/O. Thanks for ur look.
Sorry, i've edited my previous post. If u can then plz send me some I/O. Thanks for ur look.
Some Love Stories Live Forever ....
-
mohiul alam prince
- Experienced poster
- Posts: 120
- Joined: Sat Nov 01, 2003 6:16 am
- Location: Dhaka (EWU)
-
Raj Ariyan
- Learning poster
- Posts: 70
- Joined: Sat Feb 05, 2005 9:38 am
- Location: Gurukul
-
Raj Ariyan
- Learning poster
- Posts: 70
- Joined: Sat Feb 05, 2005 9:38 am
- Location: Gurukul
-
mohiul alam prince
- Experienced poster
- Posts: 120
- Joined: Sat Nov 01, 2003 6:16 am
- Location: Dhaka (EWU)
I got AC for problem 478, I'm using the same algo but it keeps WA, here's my code, it can't even pass the sample input, but it seems correct logically, can anyone help me??
Any comment is appreciated.

Any comment is appreciated.
Code: Select all
Code deleted after AC, thanks for Jan's help!!!
Last edited by gba356 on Sat Jul 21, 2007 6:34 am, edited 1 time in total.
Replace the following part. Check it, hope you find your error
.
And use 'max_area' as int.
Code: Select all
for(int k=j+1;k<n;k++)
{
bool flag=true;
for(int test=0;test<n;test++)
{
if( test==i || test==j || test==k )
continue;
if( InTri(s[test],s[i],s[j],s[k]) )
{
flag=false;
break;
}
}
if(flag && Area(s[i],s[j],s[k])>max_area )
{
max_tri[0]=s[i].name;
max_tri[1]=s[j].name;
max_tri[2]=s[k].name;
max_area=Area(s[i],s[j],s[k]);
}
}Ami ekhono shopno dekhi...
HomePage
HomePage
Where is the problem??? Is there any compiletion error??????
Plz check somebody i cannot find .....plz........
plz help someone
Plz check somebody i cannot find .....plz........
Code: Select all
Removed......
Last edited by rhsumon on Tue Sep 11, 2007 8:17 pm, edited 1 time in total.
Dont know the new judge. Add 'stdlib.h'. May be the 'abs' is not in 'math.h'. Hope it helps.
Ami ekhono shopno dekhi...
HomePage
HomePage
Re: 10112 - Myacm Triangles
Use absolute when calculate the area!