Search found 16 matches

by rlatif119
Fri May 28, 2004 7:21 pm
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27790

Well Well Well..........This problem is really a sily one. I am going to give you a hint, may be it will help you.
when "right on" is found (i don't care how you handle this string) just check that number for which right on is found is still untouched.
if yes-------->then stan is truthful.
by rlatif119
Fri May 28, 2004 6:46 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27560

You are right......This code seems to be wrong for some very big inputs. But i also used this sqrtl() function and got accepted.....parhaps judges don't use such bignumbers as the problem says....10^100.
But i am surprised how you got accepted using file fuctions?????? :o
by rlatif119
Mon May 24, 2004 10:01 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 14732

10583....WA.....sample input needed

I think my algorithm to solve this problem is very simple and correct (i hope). :roll: but it generates WA. :roll: can someone please help me finding the problem or giving me more sample input so i can check. Here is my code [c] #include<stdio.h> void religion_count(long n,long m); long tot; main() ...
by rlatif119
Fri May 07, 2004 5:28 pm
Forum: Volume 101 (10100-10199)
Topic: 10131 - Is Bigger Smarter?
Replies: 93
Views: 64690

10131.....WA

The same old problem.......WA :roll: Can somebody help me? Here is my code: [c] #include<stdio.h> struct list{ int w; int s; int c; }; void Longest_sequence(void); void Qsort(int p, int r); int Partition(int p, int r); void display(int i); int total,count; int length[1100],predecessor[1100]; struct ...
by rlatif119
Fri Apr 23, 2004 7:35 pm
Forum: Volume 4 (400-499)
Topic: 497 - Strategic Defense Initiative
Replies: 144
Views: 21201

497......RTE(SIGSEGV)

My code generates Run Time Error (SIGSEGV). Very common error for this problem, i know. I think i've used sufficiently large array. Can someone please help me to get rid of this problem? I am just fadeup :cry: :roll: :x Here is my code [c] #include<stdio.h> #include<string.h> #include<stdlib.h> void...
by rlatif119
Wed Apr 21, 2004 12:03 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 38110

Well Larry.......you adviced me to check the input portion....well, but it works fine with my sample input file and generates correct output. If you see carefully, you can realize it can handle more than one blang line between two dataset. Well.......thanks for your reply......i am trying to take in...
by rlatif119
Tue Apr 20, 2004 5:26 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 38110

10226......TLE

My code causes TLE. I cannot find out the reason. I used Quick sort algorithm to sort the tree names and then start scan though the list and keep counting. It doesn't require any searching algorithm. But it causes mysterious TLE. Can somebody find out the problem? :o My code is given below [c] #incl...
by rlatif119
Sat Apr 03, 2004 9:15 am
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 17947

412.....WA

[c] #include<stdio.h> #include<math.h> int gcd(int x,int y); main() { int n,i,j,pair,count,ratio,val[100]; float pi; while(1) { scanf("%d",&n); if(n==0) break; for(i=0;i<n;++i) scanf("%d",&val ); pair=0;count=0; for(i=0;i<n-1;++i) for(j=i+1;j<n;++j) { ratio=gcd(val ,val[j]); if(ratio==1) ++count; ++...
by rlatif119
Thu Apr 01, 2004 5:29 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30599

I've found the problem. The outer loop
for(n=2;n<=5000;++n) at module calculate_and_store is totally unnecessary. :lol: I GOT AC 8)
Thanks anyway Shamim for you reply
by rlatif119
Wed Mar 31, 2004 12:19 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30599

495.....TLE...PLEASE HELP

I got TLE....i think my addition is correct. i check for many outputs including 5000.....and i found it correct....but l got TLE. I precalculate the numbers and store it and then just ouput according to the input. Can anybody find out the problem please. Better copy this code and run and figure out ...
by rlatif119
Fri Mar 26, 2004 10:11 am
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 27917

Thanks dpitts for your reply.
All of your sample input generates correct answer.......but still got WA
:o :roll:
by rlatif119
Wed Mar 24, 2004 7:54 pm
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 26114

Thanks a lot Subeen.......Oh i can't imagine i had done a silly mistake like this........i didn't change the format........oh.....i can't imagine......isn't it a silly mistake.

Any way.......Thanks again.
by rlatif119
Tue Mar 23, 2004 11:20 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 26114

I've changed my datatype to unsigned long......but its still WA.....anyway thanks for your reply.
by rlatif119
Tue Mar 23, 2004 7:23 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 26114

10110....WA

This is one of the easy problem as far as i know........is it really????.....hmmmmm......but it always gives me wrong answer.......why???[c] #include<stdio.h> #include<math.h> main() { long n,s; while(1) { scanf("%ld",&n); if(n==0) break; s = (long)sqrt(n); if(s*s==n) printf("yes\n"); else printf("n...
by rlatif119
Tue Mar 23, 2004 7:13 am
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 27917

10101...WA...please help

This code generates wrong answer......but i don't know why.......i think its ok......is there any input which include white space between two digits of a number???? please help.[c] #include<stdio.h> #include<string.h> void generate_string(char *num, char ch); char str[100],temp[100]; int count; main...

Go to advanced search