Search found 38 matches

by efr_shovo
Thu Dec 02, 2004 9:28 am
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 7872

263 - Number Chains

Here Is My Code.Please Help Me. It gives Runtime Error (SIGSEGV) #include<stdio.h> #define MAX 10 long nu,a[MAX],stor[1001]; int separet(long n) { long div,mod,i=0; div=n; while(div!=0) { a =div%10; div=div/10; i++; } return i; } int dsort(int n) { int i,j,temp; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++)...
by efr_shovo
Mon Nov 08, 2004 6:02 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 36705

/*I have changed my code but still W.A. Please Help*/ /* Here is my changed code*/ #include<stdio.h> #include<string.h> struct FREQUENCY { int ascii; long count; }freq[1000]; char ch[1000]; void Sort(int n) { struct FREQUENCY temp; for(int i=0;i<n-1;i++) for(int j=i+1;j<n;j++) { if(freq[j].count<fre...
by efr_shovo
Thu Oct 14, 2004 5:03 pm
Forum: Volume 104 (10400-10499)
Topic: 10407 - Simple division
Replies: 34
Views: 11792

10407

#include<iostream.h> #include<math.h> long data[1000],sub[1000],n,a,b; long gcd(long x,long y ) { if(y==0) return x; else return gcd(y,(x%y)); } void main() { while(1) { int i=0; int k=0; while(1) { cin>>n; if(n==0) break; data[i++]=n; } if(data[0]==0||i==1||i>1000) break; int j=0; for(j=0;j<i-1;j++...
by efr_shovo
Thu Oct 14, 2004 4:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10099 - The Tourist Guide
Replies: 91
Views: 28703

10099

/*Here Is My Code. Please Help*/ #include<stdio.h> long n,R,C1,C2,P,W[100][100],s,d,t; long min(long x,long y) { long mi; if(x<y) mi=x; else mi=y; return mi; } long max(long x,long y) { long mx; if(x>y) mx=x; else mx=y; return mx; } void F_W() { long k,i,j; for(k=1;k<=n;k++) for(i=1;i<=n;i++) for(j=...
by efr_shovo
Thu Oct 14, 2004 4:57 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 36705

10062 why w.A

Why This Got Wa? Plzz Help. Give Some Critical I/O #include<stdio.h> #include<string.h> #include<conio.h> struct FREQUENCY { int ascii; long count; }freq[1000]; char ch[1000]; void Sort(int n) { struct FREQUENCY temp; for(int i=0;i<n-1;i++) for(int j=i+1;j<n;j++) { if(freq[j].count<freq .count) { te...
by efr_shovo
Thu Oct 14, 2004 4:49 pm
Forum: Volume 1 (100-199)
Topic: 193 - Graph Coloring
Replies: 93
Views: 21253

193 why it gives worng ans? Pleazzz Help

#include<stdio.h> #define MAX 100 #define white 0 #define black 1 long m; long n,k; int AdjMat[MAX][MAX]; int Color[MAX]; int Visit[MAX]; int Node[MAX]; long i,g,j,l,a,b,ColorNum; int GraphColor(int u) { Visit =1; if(Color ) ColorNum++; if(u==n) return 0; for(int v=1;v<=n;v++) { if(AdjMat [v]!=0) { ...
by efr_shovo
Thu Oct 07, 2004 6:58 am
Forum: Volume 100 (10000-10099)
Topic: 10048 - Audiophobia
Replies: 27
Views: 9593

Thanks This Is worked. But Why Array limite 210 instead of 100? Please
Describe me.
by efr_shovo
Wed Oct 06, 2004 12:29 pm
Forum: Volume 2 (200-299)
Topic: 208 - Firetruck
Replies: 48
Views: 15166

How Can you use FW .Cozz.. There is No Weight. And What Is Prune.

Please Describe the Sentence That you say-----"... You can prune at certain nodes once you know that going through that node will not lead you to the destination."
by efr_shovo
Wed Oct 06, 2004 12:24 pm
Forum: Volume 100 (10000-10099)
Topic: 10048 - Audiophobia
Replies: 27
Views: 9593

10048 Why Run Time Error (SIGSEGV)

Here Is My Code #include<stdio.h> int Path[100][100]; int C,S,Q,c1,c2,d,q1,q2; int Min(int n1,int n2) { if(n1<n2) return n1; else return n2; } int Max(int n1,int n2) { if(n1>n2) return n1; else return n2; } void FW() { int k,i,j; for(i=1;i<=C;i++) Path =0; for(k=1;k<=C;k++) for(i=1;i<=C;i++) for(j=1...
by efr_shovo
Wed Oct 06, 2004 8:50 am
Forum: Volume 100 (10000-10099)
Topic: 10017 - The Never Ending Towers of Hanoi
Replies: 19
Views: 5449

10017 Why gives P.E

here is my code. #include<stdio.h> long n,m,i,j,m1; int a[10000],b[10000],c[10000],top=-1,top1=-1,u; void move(long n1,int a2,int b2,int c2); void print(int a1[],int b1[],int c1[]); void babul2(int a4[],int n3); void main() { while(1) { scanf("%ld %ld",&n,&m); m1=m; if(n==0&&m==0) break; u++; for(i=...
by efr_shovo
Wed Oct 06, 2004 8:42 am
Forum: Volume 100 (10000-10099)
Topic: 10017 - The Never Ending Towers of Hanoi
Replies: 19
Views: 5449

yes I got my problem.
now it is accepted(P.E).
Why?
by efr_shovo
Sat Oct 02, 2004 9:37 am
Forum: Volume 103 (10300-10399)
Topic: 10327 - Flip Sort
Replies: 81
Views: 22710

Thanks I have Now Accepted
by efr_shovo
Sat Oct 02, 2004 7:31 am
Forum: Volume 5 (500-599)
Topic: 579 - Clock Hands
Replies: 44
Views: 14020

Thanks Man I got Accepted Now
by efr_shovo
Sat Oct 02, 2004 7:25 am
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 19208

It is My Resolve Code.But Still P.E #include<stdio.h> long count,sum,n[100],d,mod,m,z; int input() { int i=0,f; do { scanf("%d",&n ); f=n ; i++; }while(f!=0); return i; } void space(int j) { if(n[j]<10) printf(" "); if(n[j]>=10&&n[j]<100) printf(" "); if(n[j]>=100&&n[j]<1000) printf(" "); if(n[j]>=1...
by efr_shovo
Sat Oct 02, 2004 6:54 am
Forum: Volume 2 (200-299)
Topic: 208 - Firetruck
Replies: 48
Views: 15166

208 Why Time Limit Exceeded

208 Gives Me TLE.Please Help me. This is My code #include<stdio.h> int FireCorner; int StreetCornerS=1,StreetCornerD=1; int AdjMat[100][100]; int Path[1000]; int mutex,mutex1; int max=0,i,j,PathNum; void DFS(int u,int z) { int k=0; Path[z]=u; z++; for(int j=1;j<=max;j++) { if(u==FireCorner) break; i...

Go to advanced search