:evil: :evil: :roll: :roll: :( :(
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
int n,num[3100],i,diff;
int flag;
while(cin>>n)
{
flag=1;
for(i=1;i<=n;i++)
scanf("%d",&num );
if(n!=1)
{
for(i=1;i<n;i++)
{
diff=fabs(num -num[i+1]);
if(diff>=n ...
Search found 7 matches
- Mon Jan 30, 2012 5:02 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 153623
- Mon Jan 30, 2012 4:25 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10035 - Primary Arithmetic
- Replies: 328
- Views: 102550
Re: why WA........to 10035????????/////
thank's a lotttttttt...........i got AC 

- Wed Jan 04, 2012 2:08 pm
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37583
Re: please help me .....Why i got WA to 190?
thank you... i got AC
- Thu Dec 08, 2011 12:18 pm
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37583
why wa ........190...........????????????
#include<stdio.h>
#include<math.h>
int main()
{
double x1,x2,x3,y1,y2,y3,a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,D,g,f,c,G,F,r;
while(scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3)==6)
{a1=2.0*x1; a2=2.0*x2; a3=2.0*x3;
b1=2.0*y1; b2=2.0*y2; b3=2.0*y3;
c1=c2=c3=1.0;
d1=(x1*x1)+(y1*y1); d2 ...
#include<math.h>
int main()
{
double x1,x2,x3,y1,y2,y3,a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,D,g,f,c,G,F,r;
while(scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3)==6)
{a1=2.0*x1; a2=2.0*x2; a3=2.0*x3;
b1=2.0*y1; b2=2.0*y2; b3=2.0*y3;
c1=c2=c3=1.0;
d1=(x1*x1)+(y1*y1); d2 ...
- Thu Dec 08, 2011 12:16 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10035 - Primary Arithmetic
- Replies: 328
- Views: 102550
why WA........to 10035????????/////
#include<stdio.h>
int main()
{
int a,b,count,carry,sum;
while(scanf("%d %d",&a,&b)==2&&(a||b!=0))
{count=0;carry=0;sum=0;
while(a>0||b>0)
{ sum=(a%10)+(b%10)+carry;
if(sum>=10) count+=1;
carry=((a%10)+(b%10)+carry)/10;
a=a/10;b=b/10;
}
if(count==0) printf("No carry operation.\n");
else if ...
int main()
{
int a,b,count,carry,sum;
while(scanf("%d %d",&a,&b)==2&&(a||b!=0))
{count=0;carry=0;sum=0;
while(a>0||b>0)
{ sum=(a%10)+(b%10)+carry;
if(sum>=10) count+=1;
carry=((a%10)+(b%10)+carry)/10;
a=a/10;b=b/10;
}
if(count==0) printf("No carry operation.\n");
else if ...
- Sat Dec 03, 2011 7:25 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 65238
why i am getting WA?(for 488)
#include<stdio.h>
int main()
{
int t,a,f,i,j,k,l,m;
while(scanf("%d",&t)==1)
{for(m=1;m<=t;m++)
{scanf("%d %d",&a,&f);
for(l=1;l<=f;l++)
{ for(j=1;j<=a;j++)
{for(k=0;k<j;k++)
printf("%d",j);
printf("\n");
}
for(j=a-1;j>0;j--)
{for(k=j;k>0;k--)
printf("%d",j);
printf("\n");
}
if(m!=t ...
int main()
{
int t,a,f,i,j,k,l,m;
while(scanf("%d",&t)==1)
{for(m=1;m<=t;m++)
{scanf("%d %d",&a,&f);
for(l=1;l<=f;l++)
{ for(j=1;j<=a;j++)
{for(k=0;k<j;k++)
printf("%d",j);
printf("\n");
}
for(j=a-1;j>0;j--)
{for(k=j;k>0;k--)
printf("%d",j);
printf("\n");
}
if(m!=t ...
- Sat Dec 03, 2011 7:20 pm
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37583
please help me .....Why i got WA to 190?
:roll:
#include<stdio.h>
#include<math.h>
int main()
{
double x1,x2,x3,y1,y2,y3,a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,D,g,f,c,G,F,r;
while(scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3)==6)
{a1=2*x1;
a2=2*x2;
a3=2*x3;
b1=2*y1;
b2=2*y2;
b3=2*y3;
c1=c2=c3=1.0;
d1=(x1*x1)+(y1*y1 ...
#include<stdio.h>
#include<math.h>
int main()
{
double x1,x2,x3,y1,y2,y3,a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,D,g,f,c,G,F,r;
while(scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3)==6)
{a1=2*x1;
a2=2*x2;
a3=2*x3;
b1=2*y1;
b2=2*y2;
b3=2*y3;
c1=c2=c3=1.0;
d1=(x1*x1)+(y1*y1 ...