## Search found 17 matches

Thu Jan 24, 2013 8:24 am
Forum: Volume 114 (11400-11499)
Topic: 11428 - Cubes
Replies: 64
Views: 16908

### Re: 11428 - Cubes

tnx acceptep..
Wed Jan 23, 2013 10:51 pm
Forum: Volume 114 (11400-11499)
Topic: 11428 - Cubes
Replies: 64
Views: 16908

### Re: 11428 - Cubes

i've got wa many times.but i check the sample test cases here .can anyone help? #include <stdio.h> int main () { long long int n,i,x2,y2,x2y2,flag,alert,j; scanf ("%lld",&n); while (n!=0){ j=1; flag=0; alert=0; while (1){ for (i=0;i<j;i++){ x2=j*j; y2=i*i; x2y2=x2+y2; if (x2y2>n){ alert=1; break; } ...
Mon Dec 17, 2012 10:58 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 35895

### Re: 10062 - Tell Me the Frequencies!

tnx shuvo kr
Sun Dec 16, 2012 11:07 am
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 35895

### Re: 10062 - Tell Me the Frequencies!

i think my output is ok of the given input @shuvokr. i think your output of 1st line will be 52 1
Sat Dec 15, 2012 9:43 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 35895

### Re: 10062 - Tell Me the Frequencies!

still wa :( #include <stdio.h> #include <string.h> #include <ctype.h> #define N 99999 char str[N],asci[N],freq[N]; int len,l; void bubsort(char str[]); void mulbubsort(); int main () { int i,j,f=1,flag,count; while (gets(str)){ if (f>1) printf ("\n"); len=strlen(str); bubsort(str); j=0; for (i=0;i<l...
Sat Dec 15, 2012 9:03 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 35895

### Re: 10062 - Tell Me the Frequencies!

getting wa.why? #include <stdio.h> #include <string.h> #include <ctype.h> #define N 99999 char str[N],asci[N],freq[N]; int len,l; void bubsort(char str[]); void mulbubsort(); int main () { int i,j,flag,count; while (gets(str)){ len=strlen(str); bubsort(str); j=0; for (i=0;i<len;i++){ count=0; flag=0...
Thu Nov 15, 2012 2:50 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 25812

### Re: 10110 - Light, More Light

runtime error...why??? (also tried with long long ) :( #include <stdio.h> #include <math.h> #define N 70000 unsigned int status[N+1]={0},prime[N+1]; void list_prime(); unsigned int primefactor(unsigned int n); int main () { unsigned int n; list_prime(); scanf ("%u",&n); while (n!=0){ if (n%2==0) pri...
Fri Oct 26, 2012 9:13 pm
Forum: Volume 111 (11100-11199)
Topic: 11185 - Ternary
Replies: 34
Views: 13729

### Re: 11185 - Ternary

Tnx sir.....
Thu Oct 25, 2012 9:28 am
Forum: Volume 111 (11100-11199)
Topic: 11185 - Ternary
Replies: 34
Views: 13729

### Re: 11185 - Ternary

I've accepted this problem after 3 times compiler error.But i can't find out the problem why the code is compiled error. For this I ignore the string.h function and do the task manually and got accepted . But still now I am in fix why I can't use strrev() function ? my previous code given below: #in...
Tue Oct 16, 2012 5:07 pm
Forum: Volume 124 (12400-12499)
Topic: 12455 - Bars
Replies: 4
Views: 4283

### Re: 12455 Bars

wa.>>>> #include <stdio.h> int a[20]; void sort_des(int p); int result (int n,int p,int a[]); int main () { int t,n,p,i,j,x; scanf ("%d",&t); for (j=0;j<t;j++) { scanf ("%d%d",&n,&p); for (i=0;i<p;i++) scanf ("%d",&a[i]); if (n!=0){ sort_des(p); x=result(n,p,a); if (x==1) printf ("NO\n"); } else pri...
Tue Oct 09, 2012 9:13 pm
Forum: Volume 100 (10000-10099)
Topic: 10050 - Hartals
Replies: 59
Views: 18728

### Re: 10050 - Hartals

tnx, that is really silly mistake always done by me>>>
anyway, how can i delete my previous post??
Tue Oct 09, 2012 6:55 pm
Forum: Volume 100 (10000-10099)
Topic: 10050 - Hartals
Replies: 59
Views: 18728

### Re: 10050 - Hartals

why wa? i check the given input & output and it's ok..but getting wa.. #include <stdio.h> int main () { int i,j,n,N,P,d,t,k,count; scanf ("%d",&t); for (j=0;j<t;j++) { scanf ("%d",&N); scanf ("%d",&P); count=0; int a[3651]={0}; for (i=0;i<P;i++) { scanf ("%d",&d); n=d; k=2; while (d<=N) { if (d%7!=6...
Sat Sep 22, 2012 7:09 am
Forum: Volume 117 (11700-11799)
Topic: 11777 - Automate the Grades
Replies: 32
Views: 5561

### Re: uva=11777 getting wa...why?

But I can't understand what the wrong is???? plz give me any hints....
Fri Sep 21, 2012 8:31 pm
Forum: Volume 117 (11700-11799)
Topic: 11777 - Automate the Grades
Replies: 32
Views: 5561

### Re: uva=11777 getting wa...why?

wa :-? #include <stdio.h> int main () { int t,j,i,a[7],total,x=0,ct; scanf ("%d",&t); for (j=0;j<t;j++) {total=0; scanf ("%d%d%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6]); if ( a[4]+a[5]>a[4]+a[6]&&a[4]+a[5]>a[5]+a[6] ) total+=a[4]+a[5]/2; else if ( a[5]+a[6]>a[4]+a[5]&&a[5]+a[6]>a[4]+a[6]...
Wed Sep 12, 2012 1:29 pm
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21471

### Re: 494 WA

Can anyone help to find out my problem. My code gives the correct answer but i get wa.The code iven below: #include <stdio.h> #include <string.h> int main () { char str[999999]; int i,count; while (gets (str)){ count=0; for (i=0;str !='\0';i++) {if (str ==' '&&((str[i+1]>=65&&str[i+1]<=90)||str[i+1]...