Search found 4 matches

by Amir Faisal
Sat Nov 15, 2003 10:01 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 23187

444-WA

#include<stdio.h> #include<string.h> #include<math.h> #include<ctype.h> void main() { char input[10000],temp[200000],t[3]; int l,i,j,num,k,m,count; while(gets(input)) { if(isdigit(input[0])) { l = strlen(input)-1; for(i=0;i<l+1;i++) temp = input[l-i]; temp = 0; for(i=0;i<strlen(temp);) { num = 0,cou...
by Amir Faisal
Sat Nov 15, 2003 9:57 am
Forum: Volume 3 (300-399)
Topic: 392 - Polynomial Showdown
Replies: 93
Views: 18803

392--WA

#include<stdio.h> #include<math.h> void main() { int i,j,k,l,x[9],exp[9],flag; while((scanf("%d", &x[0]))==1) { for(i=1;i<9;i++) scanf("%d", &x ); flag=0; for(i=0,l=8;i<8;i++,l--) { if(x <0) { k=i+1; j=l-1; if(fabs(x )==1&&l!=1) printf("-x^%d",l); else if(fabs(x )!=1&&l!=1) printf("%dx^%d", x ,l); e...
by Amir Faisal
Sat Nov 15, 2003 9:53 am
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 11403

439--got output limit exit

#include<stdio.h> #define INF -1 int chessb[8][8]; int cost[8][8]; int queue[65]; int head = 0,tail = 0; int dr[] = {2,2,-2,-2,1,-1,1,-1}; int dc[] = {1,-1,1,-1,2,2,-2,-2}; void solve(char s1[],char s2[]); void enqueue(int r,int c); void dequeue(int &r,int &c); int row(char ch1); int column(char ch2...
by Amir Faisal
Fri Nov 14, 2003 4:01 pm
Forum: General
Topic: Help me i got Runtime error
Replies: 1
Views: 891

Help me i got Runtime error

//runtime error when increse arry size get Time limit #include<stdio.h> #define MAXSIZE 20 #define INF -1 char maze[MAXSIZE][MAXSIZE][MAXSIZE]; int cost[MAXSIZE][MAXSIZE][MAXSIZE]; int queue[MAXSIZE*MAXSIZE*MAXSIZE + 1]; int head = 0,tail = 0; int L,R,C; int dl[] = {-1,1,0,0,0,0}; int dr[] = {0,0,-1...

Go to advanced search