Search found 22 matches

by thinker_bd
Thu Oct 06, 2005 8:42 pm
Forum: Volume 101 (10100-10199)
Topic: 10115 - Automatic Editing
Replies: 29
Views: 9868

thanks

ya thanx codemaker i got my error and got accepted
my correction is followings

while(pos!=-1)
{
s.replace(pos,f.length(),r);
pos=s.find(f);
}
by thinker_bd
Thu Sep 29, 2005 5:37 am
Forum: Volume 4 (400-499)
Topic: 450 - Little Black Book
Replies: 57
Views: 6778

dear friend, before submitting the 1st post i also try in following way and then wrong answer turns into memory limit excited and WA is better that MLE i tryed in following way #include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX 100 #define MAX2 10000 struct info { char t_name[MAX]; ...
by thinker_bd
Wed Sep 28, 2005 10:09 pm
Forum: Volume 101 (10100-10199)
Topic: 10115 - Automatic Editing
Replies: 29
Views: 9868

10115

hi whatz wrong with my 10115 please help , code is given below #include<iostream> #include<string> #include<stdio.h> #define MAX_F_R 1000 #define MAX_A 3600 using namespace std; char find[MAX_F_R][MAX_F_R]; char replace[MAX_F_R][MAX_F_R]; char array[MAX_A]; int main() { int no_of_replace; //freopen(...
by thinker_bd
Tue Sep 27, 2005 8:19 pm
Forum: Volume 4 (400-499)
Topic: 450 - Little Black Book
Replies: 57
Views: 6778

whatz wrong with 450 help please

whatz wrong with 450 help please code is given below ------------- #include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX 1000 struct info { char t_name[MAX]; char f_name[MAX]; char l_name[MAX]; char add[MAX]; char dept[MAX]; char h_phone[MAX]; char w_phone[MAX]; char cmp_box[MAX]; }; i...
by thinker_bd
Sat Jul 23, 2005 9:20 pm
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 21181

after some modification i avoid RTE but i am getting WA, the code given below. whats my wrong . if possible give me some sample input output. #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> #define MAX 1000 char val[MAX]; int array2intiger(char array[MAX],int count) { int i,...
by thinker_bd
Thu Jul 21, 2005 9:08 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 30368

371 why WA

thanx mr. raj i just make max=0 after every print and got accpted
code removed
by thinker_bd
Thu Jul 21, 2005 9:06 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 30368

371 why WA

whats wrong here i got WA #include<stdio.h> unsigned long fun(unsigned long i) { unsigned long count=0; while(i!=1||(count==0)) { if(((i%2)==0)) i=i/2; else i=(3*i)+1; count++; } return count; } int main() { unsigned long a, b,tmp,i,value; unsigned long print_a,print_b; unsigned long new_max=0,max=0...
by thinker_bd
Thu Jul 21, 2005 7:51 pm
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 21181

but still problem

hi raj, my modified code is given below i tried to avoid here divided by zero, my RTE IS Your program has died with signal 8 (SIGFPE). Meaning: Floating point exception Before crash, it ran during 0.000 seconds. ------ #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> #define ...
by thinker_bd
Sat Jul 16, 2005 8:17 pm
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 21181

332 - Rational Numbers from Repeating Fractions

pleae say me why i am getting RTE #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> #define MAX 1000 char val[MAX]; int array2intiger(char array[MAX],int count) { int i,p=count,intiger=0; for(i=2;i<count;i++) { p=p-1; intiger+=((val[i]-48)*((int)(pow(10,p)))); } return intiger...
by thinker_bd
Tue Jul 05, 2005 8:41 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 15199

10192 TLE : though i use DP solution i got TLE help PLZ

10192 TLE : though i use DP solution i got TLE help PLZ. my code is following #include <stdio.h> #include <string.h> #define SIZE 100 char X[SIZE],Y[SIZE]; int c[SIZE][SIZE]; int i,j,m,n; int LCSlength() { m=strlen(X); n=strlen(Y); for (i=1;i<=m;i++) c[i][0]=0; for (j=0;j<=n;j++) c[0][j]=0; for (i=1...
by thinker_bd
Tue Jul 05, 2005 8:11 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 15199

10192 TLE : though i did dp solution but got TLE Help please

10192 though i did dp solution but got TLE Help he please.my code is following. please say why i got TLE . #include <stdio.h> #include <string.h> #define SIZE 100 char X[SIZE],Y[SIZE]; int c[SIZE][SIZE]; int i,j,m,n; int LCSlength() { m=strlen(X); n=strlen(Y); for (i=1;i<=m;i++) c[i][0]=0; for (j=0;...
by thinker_bd
Mon Jul 04, 2005 7:56 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 20585

PLEASE HELP ME IN 382 , WHY I GETTING WA

PLEASE SAY ME WHAT IS MY WRONG WHY I GETTING WA. MY CODE IS GIVEN BELOW #include<stdio.h> int main() { long n,i; printf("PERFECTION OUTPUT\n"); freopen("328.txt","r",stdin); while(1) { scanf("%d",&n); if(n==0) { printf("END OF OUTPUT\n"); break; } long sum; for(i=1;i<=n/2;i++) { if(i==1)sum=1; else ...
by thinker_bd
Wed Jun 15, 2005 8:07 pm
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 8356

thanx i got accepted

thanx Mr. Rahman i got accpeted . just memeset my array with -1 and got accpted
by thinker_bd
Tue Jun 14, 2005 8:58 pm
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 8356

i modified it but still wrong answer

i modified it but still WA see my modified code #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> int num[10]; int cmp(const void *a,const void *b) { int *p=(int*)a; int *q=(int*)b; if(*p>*q) return 1; else if(*p<*q) return -1; else return 0; } int digit_counter(int intiger) {...
by thinker_bd
Mon Jun 13, 2005 4:35 am
Forum: Volume 2 (200-299)
Topic: 263 - Number Chains
Replies: 45
Views: 8356

for the test case my program is right but WA

for the input 123456789. it is in the sample input i test it. following output occur.

Original number was 123456789
987654321 - 123456789 = 864197532
987654321 - 123456789 = 864197532
Chain length 2

please check my prog throwly and say what is my wrong so that i got wrong answer.

Go to advanced search