Search found 3 matches

by abyss
Wed Aug 24, 2005 12:47 pm
Forum: Volume 2 (200-299)
Topic: 294 - Divisors
Replies: 91
Views: 39717

finally got accepted
by abyss
Wed Aug 24, 2005 11:59 am
Forum: Volume 2 (200-299)
Topic: 294 - Divisors
Replies: 91
Views: 39717

294 WA

why do i keep getting WA's
#include<stdio.h>
#include<math.h>




int main()
{
int no,i,nodiv,total=1,max=0;
long int n1,n2,k,n,j,number,numbers;
scanf("%d",&no);

for(i=0;i<no;i++)
{
scanf("%ld %ld",&n1,&n2);
max=0;
for(k=n1;k<=n2;k++)
{
n=k;
total=1;

for(j=2;j<=sqrt(n)+1;j ...
by abyss
Wed Aug 24, 2005 8:07 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 117726

why WA

pls help me with this


#include<stdio.h>



int bin[3][3],total[6]={0};
char color[4]="BGC";

void seq(char str[4],int index)
{
int i,j;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
if(color[j]!=str[i])
total[index]+=bin[i][j];
}
}

}

int main()
{
int i,j,index,min=0;

char str[6][4]={"BCG ...

Go to advanced search