Search found 3 matches

by sami001
Tue Dec 14, 2010 3:58 pm
Forum: Volume 107 (10700-10799)
Topic: 10793 - The Orc Attack
Replies: 35
Views: 24939

Re: 10793 - The Orc Attack

WA...pls help me... :cry:
#include <stdio.h>

int main(){

int loc,cost,n1,n2,c,A[105][105],CASE;
int i,j,k,n,MAX,MIN,m=1,p;
scanf("%d",&CASE);

for(p=0;p<CASE;p++){

scanf("%d%d",&loc,&cost);

for(i=1;i<=loc;i++){
for(j=1;j<=loc;j++){
A[i][j]=-1;
}
}

for(i=1;i<=loc;i++)A[i][i]=0 ...
by sami001
Tue Nov 23, 2010 10:32 pm
Forum: Volume 3 (300-399)
Topic: 302 - John's trip
Replies: 20
Views: 8722

Re: 302 (John's trip) test cases

i'm getting RTE... :cry: pls... somebody help me::

#include <stdio.h>

int main()
{

int j1,j2,r,i,k,a,b,c,H,m,n,p,p1,sum,j,q,l,s,t,u,junc[50][2],result[2000],search,flag,mem;

while(1){

int g[50][2000]={0},g1[50][2000]={0};
a=0;
b=0;
n=0;
flag=0;

for(i=0;;i++)
{

scanf("%d %d",&j1 ...
by sami001
Fri Jun 25, 2010 8:52 pm
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 45438

Re: 10101 - Bangla Numbers

WHY MY CODE is taken as WA when it generates all correct answers?? :cry:

#include <stdio.h>

int main()
{
int l,k[16],j;
unsigned long long i,p,a,b,c,x,y,z;

while(scanf("%llu",&i)==1)
{
l=0;

p=i;

for(j=0;j<15;j++)
{
k[j]=i%10;
l++;
i/=10;
if(i==0)break;
}

a=p-(p%100000);
b=p ...

Go to advanced search