Maarten, you're right. I removed that lines, and change fabs(ft) by fabs(a - b) > 1e-15 and now I get Wrong Answer ... Here some sample input/output for my program ... Input: 30 40 10 12.619429 8.163332 3 10 10 3 10 10 1 300 400 100 126.19429 81.63332 30 100 100 30 100 100 10 3000 4000 1000 1261.942...
Hi all, I don't understand why I get WA on my code: [c] #include <stdio.h> void main () { int i, j, c = 0, vetor[256], vetor1[256], temp1; char str[1000], temp; while (gets(str) != NULL) { for (i = 0; i < 256; i++) { vetor = vetor1 = 0; } temp1 = 0; str[1000]='\0'; for (i = 1; str != '\0'; i++) { fo...
Is there something special about this problem ? I think it's not difficult, and besides there is only one path, right ?? But I don't know why I get TLE !!!
What's wrong with my code ? [c] #include <stdio.h> #include <math.h> #define Pi 3.1415926535897932384626433832795029L int main() { long double ang; int r, n; while(scanf("%d %d",&r,&n)==2) { ang = 180 - ((double)180*(n-2)/n); printf("%.3lf\n",(sin(Pi/180*ang)*r*r*n)/2); }...