Search found 54 matches

by kolpobilashi
Mon Jun 19, 2006 4:50 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 22528

thanx a lot. i have done wat u told,increased the array size upto "244"
but this time got WA :(

wat's wrong in my code? :cry:
by kolpobilashi
Sun Jun 18, 2006 8:53 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 22528

444 RE!!! sumbuddy help meee....

may b my logic is wrong.but the code below gave the correct output for the sample input given in the problem. at 1st i use the "strrev" function in the "decoder" part and got CE and got the following msg [size=18]04657187_24.c: In function `void decoder(char *)': 04657187_24.c:43: implicit declarati...
by kolpobilashi
Sat Jun 03, 2006 11:31 am
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 20558

thanx a lottt!!! :D
Acc now :)
by kolpobilashi
Sat Jun 03, 2006 6:30 am
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 20558

10432 output limit xceed!!!

[code]

#include<stdio.h>
#include<math.h>

int main()
{
int r,n;
while(scanf("%d %d",&r,&n)!=EOF)
{
double s,f,PI;
PI=2*acos(0.0);
f=sin(2*PI/(double)n);
s=(double)(.5*r*r*f*n);
printf("%.3lf\n",s);
}
return 0;
}

:cry: [/code]
by kolpobilashi
Sun Mar 19, 2006 10:01 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 59386

10035 got WA!!!

:cry: [code]#include<stdio.h> int main() { while(1) { long a,b,r1=0,r2=0,y=0,x=0; scanf("%ld %ld",&a,&b); if(a==0&&b==0)break; while(a||b) { r1=a%10; r2=b%10; if(a&&b) { if(r1+r2+y>=10) {y++;x++;} else y=0; } if(!a&&b) { if(r2+y>=10) {y++;x++;} else y=0; } if(a&&!b) { if(r1+y>=10) {y++;x++;} else y=...
by kolpobilashi
Sun Mar 19, 2006 9:46 am
Forum: Volume 101 (10100-10199)
Topic: 10107 - What is the Median?
Replies: 74
Views: 19229

10107 got RE!!help!!

[code]#include<stdio.h> int main() { unsigned long n; int num=1,arr[1005]; while(scanf("%lu",&n)!=EOF) { int a=0,k,ptr; unsigned long med=0,temp=0; arr[num]=n; for(k=1;k<=num;k++) { for(ptr=1;ptr<=num-k;ptr++) { if(arr[ptr]>arr[ptr+1]) { temp=arr[ptr]; arr[ptr]=arr[ptr+1]; arr[ptr+1]=temp; } } } if(...
by kolpobilashi
Wed Jan 18, 2006 6:16 am
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 23556

thanx a lot, i was sooooo stupid!!! well i did the job well and now my ststus got a bit higher!!! i got PE!! :-? but at this moment i don care abt this PE, just when i know i did SOLVE the problem that's enough 4 STUPID like me!!! thanks again..... :D

Tonima
by kolpobilashi
Tue Jan 17, 2006 9:45 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 23556

hmmmm....now wat?!

well, i fixed that problem but now i got WA!!!! would plz check out if there is any mistake in my code or in my logic?! i got confused n tired..... :(
by kolpobilashi
Tue Jan 17, 2006 5:07 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 23556

406 got TLE,help me!!

i got TLE 4 dis code,and cant get the reason, anybody tell me y n wats de solution..... :( [/code]#include<stdio.h> int isPrime(int num) { int k,j; if(num==1||num==2) return num; if(num%2==0) return 0; j=sqrt(num); for(k=3;k<=j;k+=2) if(num%k==0) return 0; return num; } int main() { int input1,input...

Go to advanced search