## Search found 18 matches

Sat Jul 07, 2012 5:09 pm
Forum: Volume 120 (12000-12099)
Topic: 12068 - Harmonic Mean
Replies: 1
Views: 1157

### 12068 - Harmonic Mean

:oops: I'm getting WA , but why? plz suggest me and provide me some critical i/p & o/p my code just like below: #include<stdio.h> int main() { int s, j, i, n, a[1000]; long long int mul, sum, lob, hor; while(scanf("%d", &s)==1) { for(i=1; i<=s; i++) { mul=1; sum=0; scanf("%d", &n); for(j=0; j<n; j++...
Fri Jul 06, 2012 4:29 pm
Forum: Volume 112 (11200-11299)
Topic: 11249 - Game
Replies: 32
Views: 12906

### Re: Why WA for 11249, please give me some critical i/p & o/p

:oops: Though I omit the possible error that said by U (brianfry713), I get WA yet, if U provide me some critical input ....thnx now my edited code is just like this: #include<stdio.h> int main() { long int i, j, a, b, t, k, q, sum, dif, res; while(scanf("%ld",&t)==1) { for(i=1; i<=t; i++) { scanf("...
Thu Jul 05, 2012 12:41 am
Forum: Volume 119 (11900-11999)
Topic: 11991 - Easy Problem from Rujia Liu?
Replies: 32
Views: 8506

### How can I improve time limit for 11991, help plzzzzz

:oops: I can't continue without WA or TL , I'm verily in downgrade. but I wanna solve problems, help me to this approach. Firstly see the code below: #include<stdio.h> int main() { long int i, j, s, count, n, m, k, v, a[100001]; while(scanf("%ld%ld",&n, &m)==2) { for(i=1; i<=n; i++) { scanf("%ld", &...
Thu Jul 05, 2012 12:34 am
Forum: Volume 100 (10000-10099)
Topic: 10093 - An Easy Problem!
Replies: 52
Views: 14545

### Why WA for 10093, am I wrong???

help me please if any one seeing my code below: #include<stdio.h> int main() { char ch; while(scanf("%c",&ch)==1) { if(ch>47 && ch<58) printf("%d\n", ch-47); else if(ch>64 && ch<91) printf("%d\n", ch-54); else if(ch>96 && ch<123) printf("%d\n", ch-60); } return 0; }
Wed Jul 04, 2012 5:22 pm
Forum: Volume 112 (11200-11299)
Topic: 11249 - Game
Replies: 32
Views: 12906

### Why WA for 11249, please give me some critical i/p & o/p

Lets see my code: #include <algorithm> #include <cstdio> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include<stdio.h> #include<stdlib.h...
Wed Jul 04, 2012 12:21 am
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 42080

### getting WA for 11340, help plz

#include<stdio.h> #include <string.h> int main() { long long int c, i, j, K, N, M, p, pos, sum, a[102]; double result; char nws[10002], b[105], ch; while(scanf("%lld",&N)==1) { for(i=1; i<=N; i++) { sum=0; scanf("%lld", &K); for(j=0; j<K; j++) { scanf("\n%c", &b[j]); scanf("%lld", &a[j]); } scanf("...
Thu Jun 28, 2012 4:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 75616

### Why WA for 10038, help me plz..

#include <algorithm> #include <cstdio> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include<stdio.h> #include<stdlib.h> #define N 3001 ...
Tue Jun 26, 2012 6:04 pm
Forum: Volume 119 (11900-11999)
Topic: 11909 - Soya Milk
Replies: 15
Views: 6124

### Re: Why 11909 is WA, help please

For double the problem gives o/p 0.000 but for long double gives correct answer at my compiler but UVA gives me WA. What can I do now?
Mon Jun 25, 2012 5:45 pm
Forum: Volume 123 (12300-12399)
Topic: 12342 - Tax Calculator
Replies: 33
Views: 14921

### Why WA 12342. help help....

I'm getting continuously WA, But why, help me please.. #include <algorithm> #include <cstdio> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector...
Mon Jun 25, 2012 5:34 pm
Forum: Volume 119 (11900-11999)
Topic: 11909 - Soya Milk
Replies: 15
Views: 6124

### Why 11909 is WA, help please

Hello all I'm getting WA. But Why :oops: , though I test the cases 9 6 19 20 & 89 5 10 80 , have any more critical input? or let see the code mine below: #include <algorithm> #include <cstdio> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <iostream> #include <list>...
Wed Jun 20, 2012 3:49 pm
Forum: Volume 122 (12200-12299)
Topic: 12250 - Language Detection
Replies: 6
Views: 2218

### Re: Why WA for the problem 12250

Thnx a lot. I've got AC finally, though the problem was submitted 23 times.
Tue Jun 19, 2012 10:33 pm
Forum: Volume 122 (12200-12299)
Topic: 12250 - Language Detection
Replies: 6
Views: 2218

### 12250 - Language Detection

:oops: #include<stdio.h> #include<string.h> #define max 16 int main() { int i=0; char str[max]; while(scanf("%s",&str)==1 && strcmp(str,"#")!=0) { if(strcmp(str,"HELLO")==0) printf("Case %d: ENGLISH\n",++i); else if(strcmp(str,"HOLA")==0) printf("Case %d: SPANISH\n",++i); else if(strcmp(str,"HALLO"...
Tue Jun 19, 2012 7:31 pm
Forum: Volume 119 (11900-11999)
Topic: 11962 - DNA II
Replies: 5
Views: 1772

### Re: why compile error in UVA compiler of 11962

Thnx a lot, it helped me to get just AC
Sat Jun 16, 2012 2:35 pm
Forum: Volume 119 (11900-11999)
Topic: 11962 - DNA II
Replies: 5
Views: 1772

### why compile error in UVA compiler of 11962

I'm getting continuously compile error. Though I'v replaced powr function to pow() function. UVA sent me mail as below: code.c: In function 'main': code.c:25:4: warning: format '%s' expects type 'char *', but argument 2 has type 'char (*)[32]' code.c:25:9: warning: ignoring return value of 'scanf', ...
Wed Jun 13, 2012 2:26 pm
Forum: Volume 117 (11700-11799)
Replies: 32
Views: 5810

i/p
900 90
32 8
52 2

o/p
9
3
25