Search found 9 matches

by rifayat samee_du
Sat Apr 04, 2009 8:02 am
Forum: Volume 113 (11300-11399)
Topic: 11377 - Airport Setup
Replies: 24
Views: 11837

Re: 11377 - Airport Setup

Please any one tell me that what will be the output when x==y if x is a city and there is no willing route then d[x] should be -1 right?? and let , a b c thee cities and the willing routes are a->b and a->c and only a has airport then if the king wants setup a route from b to b then what will be the...
by rifayat samee_du
Fri Apr 03, 2009 8:47 pm
Forum: Volume 113 (11300-11399)
Topic: 11377 - Airport Setup
Replies: 24
Views: 11837

Re: 11377 - Airport Setup

Please give some input output
:-?
I cannot find my bug !! :( :( :( :( :(
by rifayat samee_du
Wed Apr 01, 2009 8:01 pm
Forum: Volume 3 (300-399)
Topic: 315 - Network
Replies: 68
Views: 21392

Re: 315 Network

I think the given graph can be disconnected !! :D
My code handled that and got AC.

try this case :

Code: Select all

input:
7
1 2 3
2 3
5 6
6 7
0
0

output :
2

by rifayat samee_du
Tue Mar 31, 2009 12:46 pm
Forum: Volume 5 (500-599)
Topic: 539 - The Settlers of Catan
Replies: 22
Views: 8063

Re: 539 why wa ..plz help

Hello rio??
there is no input like
2 2
0 1
1 0
by rifayat samee_du
Tue Mar 24, 2009 9:03 pm
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 14900

Re: 558 - Wormholes

Is everyone dead!!??!! please help me!!...... i am filling very bad......... Here is my code: //Autor: Muhammad Rifayat Samee // algorithm: 558(bellman-Ford) #include<cstdio> #include<cstring> #include<cctype> #include<cmath> #include<cstdlib> #include<queue> #include<stack> #include<algorithm> #inc...
by rifayat samee_du
Wed Mar 18, 2009 9:20 pm
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 14900

Re: 558 - Wormholes

I have used bellman ford for this
I am getting WA .......
plz help me with some I/O.....
I am getting mad :-?
by rifayat samee_du
Sun Mar 15, 2009 10:30 am
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 14900

PLZ Help Why run time error!!!

Why RTE!!??!! int graph[10005][10005]; void warshall(int v) { int i,j,k; for(k=0;k<v;k++) { for(i=0;i<v;i++) { for(j=0;j<v;j++) { if(graph[i][k] * graph[k][j]!=0) { if(graph[i][k]+graph[k][j]<graph[i][j]||graph[i][j] == 0) { graph[i][j] = graph[i][k] +graph[k][j]; } } } } } } int chk(int v) { int i;...
by rifayat samee_du
Sun Dec 30, 2007 5:31 pm
Forum: Volume 101 (10100-10199)
Topic: 10190 - Divide, But Not Quite Conquer!
Replies: 105
Views: 23818

why WA??

Why WA??? please help me #include<stdio.h> #include<string.h> #include<math.h> #define eps 0.0000001 int main() { int n,m,r,k,k1; double re; //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); while(scanf("%d %d",&n,&m)!=EOF) { if(n==1||m==1)printf("Boring!\n"); else if(n==0||m==0)printf...
by rifayat samee_du
Wed Jan 10, 2007 7:41 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 53531

10070 PE help

MY CODE: #include <stdio.h> #include <string.h> void main(void) { char year[1000000]; int i,leap,ord; while (scanf("%s",&year)!=EOF) { int mod4,mod100,mod400,mod15,mod55; mod4=mod100=mod400=mod15=mod55=0; ord=1;leap=0; printf("\n"); for (i=0;i<strlen(year);i++) { mod4=(mod4*10+year -'0')%4; mod100=(...

Go to advanced search