Search found 54 matches

by kolpobilashi
Mon Oct 23, 2006 8:37 am
Forum: Volume 103 (10300-10399)
Topic: 10311 - Goldbach and Euler
Replies: 98
Views: 23527

:( yes i understood the problem...but the thing is what should i do then.??
if i don't generate the primes before.....and each time check... that will certainly give TLE.
plz suggest me..
by kolpobilashi
Thu Oct 19, 2006 6:39 pm
Forum: Volume 103 (10300-10399)
Topic: 10311 - Goldbach and Euler
Replies: 98
Views: 23527

why getting MLE??

plz tell wht this code's giving me MLE??? :(

Code: Select all

cut
thanx in advance..
by kolpobilashi
Fri Sep 15, 2006 6:27 am
Forum: Volume 110 (11000-11099)
Topic: 11076 - Add Again
Replies: 34
Views: 16631

Why WA?? would anyone explain me plz.....thanx in advance. #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #define MAX 50 typedef long long ul; double test(char *str) { int de[MAX]={0}; int ss[300] = {0}; int pp= strlen(str); int i,j=0; double c=1,d=1; for(i=0;i<pp;i++) { ss...
by kolpobilashi
Mon Aug 28, 2006 9:13 pm
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 33040

Dear Iffat you used 2 big size long long array,which certainly caused MLE.here the thing you can do, 1. for prime generating use seive algo with a bool array of max 20000000 size.by taking bool type array you can save enough memory. 2.you can then take your 2nd array to store the twin primes of long...
by kolpobilashi
Sun Aug 27, 2006 12:19 pm
Forum: Volume 5 (500-599)
Topic: 591 - Box of Bricks
Replies: 80
Views: 11706

your mistake is:you take all the inputs together and then print their outputs, but actually this is not the usual style for uva problems. here you'll have to take an input, then print its output,then take another input........this process will go on until the end of the file. you can have a look on ...
by kolpobilashi
Fri Aug 25, 2006 10:49 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25984

check your code for input greater than 52. your output format doesn't match with sample output.
change :

Code: Select all

if(k>15) printf("\n "); 
to:

Code: Select all

if(k>15) printf("\n      "); 
and also you forget to check another thing.
change:

Code: Select all

for(i=0;a[i]<=n;i++) 
to:

Code: Select all

for(i=0;a[i]<=n&&i<25;i++) 
best regards. :)
by kolpobilashi
Wed Aug 23, 2006 2:22 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 19422

since your return type in main() function is int so you need to return a value.so change your code to: return 0; and you should print a % after each output according to the problem's output format, but your code fails to print this.chage your code printf("%.3f%\n",percent); to: printf("%.3f%c\n",per...
by kolpobilashi
Tue Aug 22, 2006 6:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10082 - WERTYU
Replies: 57
Views: 7458

check your code for the following input:

1
4
5

and as you declared main() function as int type,you should return a value(0 in this case), otherwise u'll get CE.
best regards. :)
by kolpobilashi
Mon Aug 21, 2006 1:00 pm
Forum: Volume 104 (10400-10499)
Topic: 10450 - World Cup Noise
Replies: 42
Views: 20246

you need to change following things:

Code: Select all

for (int j=3;j<=x+2;j++) 
{ 
    int t; 
    t=a; 
    a=a+b; 
    b=t; 
} 
in the above part declare j and t as long long.
moreover, for

Code: Select all

x=0
a=0
but yours one gives 1.

hope you'll get AC :)
by kolpobilashi
Sat Aug 19, 2006 10:31 pm
Forum: Volume 110 (11000-11099)
Topic: 11068 - An Easy Task
Replies: 16
Views: 7327

:D thanx a lot.....i was really stupid...got AC now.
by kolpobilashi
Sat Aug 19, 2006 9:20 pm
Forum: Volume 110 (11000-11099)
Topic: 11068 - An Easy Task
Replies: 16
Views: 7327

:( what's wrong in my code.......why i'm getting WA???

Code: Select all

 removed fOOlish code!!
by kolpobilashi
Sat Aug 19, 2006 6:18 pm
Forum: Volume 106 (10600-10699)
Topic: 10611 - The Playboy Chimp
Replies: 44
Views: 17753

can any one tell me what will be the output for the following inputs :roll:

Code: Select all

1
1
1
1

4
1 5 5 7
1
5
thanx in advance
by kolpobilashi
Fri Aug 18, 2006 5:18 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 26691

i got PE....i didn't print any blank line after the last case.
any one can say why????

thanx in advance.
by kolpobilashi
Fri Aug 18, 2006 12:50 pm
Forum: Volume 105 (10500-10599)
Topic: 10591 - Happy Number
Replies: 61
Views: 21171

thanks a lot guys :D
btw....i have already spectacles....seems the power got increased :-?
by kolpobilashi
Wed Aug 16, 2006 6:18 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 189532

i think you are "xtremely" new!! when there is a sticky about any problem then creating a new thread is a kind of crime..besides you should read all the previous posts before posting a new one.if you want to find previous posts go to the search option. and for this problem just look at the top of th...

Go to advanced search