Search found 9 matches

by nayimsust
Sun Mar 21, 2010 8:47 am
Forum: Volume 113 (11300-11399)
Topic: 11377 - Airport Setup
Replies: 24
Views: 15791

Re: 11377 - Airport Setup

is it possible to solve this problem using bfs.
if not possible then pls give me some critical input :(
by nayimsust
Mon Mar 15, 2010 12:28 pm
Forum: Volume 116 (11600-11699)
Topic: 11624 - Fire!
Replies: 54
Views: 23872

Re: 11624 - Fire!

thank u frnd i became foolish when i got accepted after changing data type int instead of long
by nayimsust
Sun Mar 14, 2010 2:18 pm
Forum: Volume 116 (11600-11699)
Topic: 11624 - Fire!
Replies: 54
Views: 23872

why i got RTE in fire 11624

#include <stdio.h>
#include <string.h>
#define inf 99999999
#define sz 1100
#define SZ 1100110
long r[]={0,0,-1,1},c[]={-1,1,0,0},dist_joe[sz][sz],dist_fire[sz][sz];
long cur_x,cur_y,que_x[SZ],que_y[SZ],head,tail;
long m,n,test,row,col,i,j,no_fire,joe_x,joe_y,cost;
char array[sz][sz];

void bfs ...
by nayimsust
Mon Mar 08, 2010 7:43 am
Forum: Volume 107 (10700-10799)
Topic: 10719 - Quotient Polynomial
Replies: 51
Views: 25031

please help me why i got wa

i got ac now i used pow function for interger variable :)
by nayimsust
Sat Jan 30, 2010 2:51 pm
Forum: Volume 117 (11700-11799)
Topic: 11760 - Brother Arif, Please feed us!
Replies: 15
Views: 7410

pls help me why i got wa

this my code
#include <stdio.h>
int main()
{
long row,col,man,set[2050][4],r,c,t=0,mat[6][4],i,n,temp,j;
while(scanf("%ld %ld %ld",&row,&col,&man)==3 && ( row !=0 || col !=0 || man!=0) )
{
for(i=1;i<=man;++i)
scanf("%ld %ld",&set[i][1],&set[i][2]);

scanf("%ld %ld",&r,&c);

mat[1][1]=r; mat ...
by nayimsust
Wed Oct 28, 2009 7:51 pm
Forum: Volume 110 (11000-11099)
Topic: 11015 - 05-2 Rendezvous
Replies: 48
Views: 23978

Re: 11015 - 05-2 Rendezvous

i got wa many times pls help anybody :(


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define min(a,b)(a<b?a:b)
#define max(a,b)(a>b?a:b)
#define inf 99999999

char name[1001][1001];
long d[1000][1000],t=0,c,c1,c2,s,q,cost,k,i,j,flag[1001],fat,place;

int main()
{
while( scanf ...
by nayimsust
Sat Sep 12, 2009 4:32 pm
Forum: Volume 5 (500-599)
Topic: 549 - Evaluating an Equations Board
Replies: 13
Views: 7279

pls give me critical input for 459 graph connectivity :-?

this is my code if any one have time then try to find my bug please :
i used straight forward mst algorithm :

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <algorithm>
#include <string>
using namespace std;

long array[100001][4],test,number,i,rank[100001 ...
by nayimsust
Wed Jan 28, 2009 4:35 pm
Forum: Volume 113 (11300-11399)
Topic: 11398 - The Base-1 Number System
Replies: 23
Views: 13167

Re: 11398 - The Base-1 Number System

you must get inputs by using either scanf("%s") or scanf("%c")
because input may be given in the following format

input:
0000 0 0000 00
000 0 0000 #

output:
27

may it helps you
:D
by nayimsust
Fri Aug 29, 2008 9:04 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 44443

444 is easy prob but when i submit my code its show RTE

my code



#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
int main()
{
long long i,j,k,p,q,h;
char a[1000000],b[10],c;
while(gets(a))
{
if(!isdigit(a[0]))
{
for(i=strlen(a)-1;i>=0;--i)
{
j=a ;
sprintf(b,"%lld",j);
for(k=strlen(b)-1;k>=0;--k)
printf("%c",b ...

Go to advanced search