Page 1 of 1
10112 - Myacm Triangles
Posted: Thu Apr 14, 2005 9:13 am
by Raj Ariyan
Hi,
Please give me some input/output for the problem 10112 Myacm Triangle. I'm getting WA

. Thanks in advance.
Posted: Sat Apr 16, 2005 3:10 pm
by mohiul alam prince
Hi
Please mention your problem number.
Thanks
MAP
Pro
Posted: Sat Apr 16, 2005 3:15 pm
by Raj Ariyan
Hi prince,
Sorry, i've edited my previous post. If u can then plz send me some I/O. Thanks for ur look.
Posted: Sun Apr 17, 2005 1:36 pm
by mohiul alam prince
Hi Raj
I am also getting WA in this problem.
I have applied 478 problem's algorithm but it gives me WA
Thanks
MAP
Posted: Sun Apr 17, 2005 2:00 pm
by mf
Maybe you both get WA if you use floating-point variables?
This problem can be solved with integers - just don't divide by 2 when calculating areas.
Posted: Sun Apr 17, 2005 2:33 pm
by Raj Ariyan
Hi mf,
I'm not doing any double calculation. In my code there are all integer calculation. But i get WA. Thanx in advance.
Posted: Sun Apr 17, 2005 3:18 pm
by Raj Ariyan
Hi mf and prince,
I've just get ACC. There was a silly mistake

. Thanx for ur helps. Bye
Posted: Mon Apr 18, 2005 3:58 pm
by mohiul alam prince
Hi
I have got AC
Thanks mf and Raj.
MAP
Posted: Fri Jul 20, 2007 5:33 am
by gba356
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.
Code: Select all
Code deleted after AC, thanks for Jan's help!!!

Posted: Fri Jul 20, 2007 7:21 pm
by Jan
Replace the following part. Check it, hope you find your error

.
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]);
}
}
And use 'max_area' as int.
Posted: Tue Sep 11, 2007 5:17 pm
by rhsumon
Where is the problem??? Is there any compiletion error??????
Plz check somebody i cannot find .....plz........
plz help someone
Posted: Tue Sep 11, 2007 8:13 pm
by Jan
Dont know the new judge. Add 'stdlib.h'. May be the 'abs' is not in 'math.h'. Hope it helps.
Posted: Tue Sep 11, 2007 8:18 pm
by rhsumon
Thanx Jaan it workrd.
But what can we know about the new judge in the new system?
Re: 10112 - Myacm Triangles
Posted: Mon Aug 02, 2010 2:44 pm
by zhangfei
Use absolute when calculate the area!