Someone please look at my code and tell me why i get WA....
i have tried a lot....
// Ancient Village Sports 10451
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int ncase=0;
int n;
while(cin>>n)
{
ncase++;
long double area;
if(n<3) break;
cin>>area;
long double r ...
Search found 2 matches
- Sat Apr 12, 2008 9:47 am
- Forum: Volume 104 (10400-10499)
- Topic: 10451 - Ancient Village Sports
- Replies: 22
- Views: 13592
- Fri Dec 14, 2007 1:40 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10060 - A hole to catch a man
- Replies: 22
- Views: 8268
Getting WA pls help...
hey guys pls try to solve my problem... i m getting WA ...
i use this formula...
Volume1 = sum over all polygons(thickness * 0.5 * (sum over 0<=i<=n-1(mod(xi * y(i+1) - (x(i+1)*y(i)))))
Volume2 = 22.0/7.0 * r*r*t
Result = (int)Volume1/Volume2;
pls tell me my mistake...
here is my JAVA code ...
i use this formula...
Volume1 = sum over all polygons(thickness * 0.5 * (sum over 0<=i<=n-1(mod(xi * y(i+1) - (x(i+1)*y(i)))))
Volume2 = 22.0/7.0 * r*r*t
Result = (int)Volume1/Volume2;
pls tell me my mistake...
here is my JAVA code ...