Search found 7 matches

by Gazi Shaheen Hossain
Mon Sep 13, 2004 1:10 pm
Forum: Volume 1 (100-199)
Topic: 191 - Intersection
Replies: 103
Views: 33414

191 WA

why this gives WA?
help me plz.
[cpp]#include <stdio.h>

void main()
{
long double xstart,ystart,xend,yend,xleft,ytop,xright,ybottom;
long double x,x1,x2,y,y1,y2,xmax,xmin,ymax,ymin;

while(scanf("%Lf %Lf %Lf %Lf %Lf %Lf %Lf %Lf",
&xstart,&ystart,&xend,&yend,&xleft,&ytop,&xright,&ybottom)==8)
{
x1 ...
by Gazi Shaheen Hossain
Mon Sep 13, 2004 1:05 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51197

105 WA

Why this gives WA?
help me.
[cpp]
#include "stdio.h"

void main()
{

int arr[10000]={0},i,L,H,R,Rm=0;
while(scanf("%d %d %d",&L,&H,&R)==3)
{
if(Rm<R)Rm=R;
for(i=2*L;i<=2*R;i++)
if(arr <H)
arr =H;
}
i=0;
if(arr[0]!=0)printf("0 %d ",arr[0]);
char flag=0;
for(i=1;i<=2*(Rm+1);i++)
{

if(arr >arr ...
by Gazi Shaheen Hossain
Mon Sep 13, 2004 12:54 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 23932

299 (c++)WA

Why it gives me WA?
some one help me.plz.
[cpp]
#include<stdio.h>
void main()
{
unsigned long N,i;
unsigned long j,x,y,L,carrage[50],temp,swap;
scanf("%lu",&N);
for(i=1;i<=N;i++)
{
scanf("%lu",&L);
for(j=0;j<L;j++)
scanf("%lu",&carrage[j]);
swap=0;
for(x=0;x<L-1;x++)
for(y=0;y<L-x-1;y ...
by Gazi Shaheen Hossain
Mon Sep 06, 2004 5:38 pm
Forum: Volume 8 (800-899)
Topic: 815 - Flooded!
Replies: 20
Views: 14638

815 compile error

Can anyone help me?
the code given below (for 815 in c++) gives me compile error
[cpp]
#include <stdio.h>

void main()
{

int m,n,squr;
unsigned long i,j,region=1;

char flag=0;
double sqr[900],water,dif,under,count,lebel;

while(1)
{
scanf("%d %d",&m,&n);
if(m==0&&n==0)break;
if(flag)printf("\n ...
by Gazi Shaheen Hossain
Mon Sep 06, 2004 5:29 pm
Forum: Volume 103 (10300-10399)
Topic: 10338 - Mischievous Children
Replies: 56
Views: 31368

10338 compile error

[cpp]
why it gives me compile error?
tell me please

#include <stdio.h>
#include <string.h>
void main()
{
long double fact[21],f=1,i,ans;
char word[22];
int l;
unsigned long set=1;
for(i=1;i<=20;i++)
{
f=f*i;
fact =f;
}

while(scanf("%s",word)==1)
{
int frec[26]={0};
l=strlen(word);
i=-1 ...
by Gazi Shaheen Hossain
Mon Sep 06, 2004 5:24 pm
Forum: Volume 103 (10300-10399)
Topic: 10323 - Factorial! You Must be Kidding!!!
Replies: 106
Views: 47367

10323 compile error

why it gives me compile error

#include <stdio.h>

void main()
{
long double fact[6],f=5040,i,j;
long num;

for(i=8;i<=13;i++)
{
f=f*i;
fact[i-8]=f;
}

while(scanf("%ld",&num)==1)
{
if(num<8)
printf("Underflow!\n");
else if(num>13)
printf("Overflow!\n");

else printf("%.0Lf\n",fact[num-8 ...
by Gazi Shaheen Hossain
Mon Sep 06, 2004 5:14 pm
Forum: C++
Topic: use of qsort for one dimentional array
Replies: 2
Views: 2222

use of qsort for one dimentional array

how can we use built-in qsort() function in c++ for sorting one-dimentional array?[/cpp]

Go to advanced search