Search found 127 matches
- Tue Sep 14, 2004 8:55 am
- Forum: Volume 106 (10600-10699)
- Topic: 10637 - Coprimes
- Replies: 16
- Views: 6898
getting WA
I got WA with this problem but tested with several inputs and failed to find the bug. Please help me to identify what's wrong in my code. Here it is: [cpp]#include <stdio.h> int X[50]; int s, t; void recurse(int k, int n, int sum) { int i, j, a, b, c; X[k] = n; if(k==t && sum==s) { printf(&q...
- Sat Aug 14, 2004 5:55 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10479 - The Hendrie Sequence
- Replies: 14
- Views: 5850
- Sat Aug 14, 2004 5:21 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10111 - Find the Winning Move
- Replies: 16
- Views: 5540
- Mon Jul 26, 2004 5:03 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10479 - The Hendrie Sequence
- Replies: 14
- Views: 5850
I think the input is not a valid one.
Code: Select all
Each test case consists of a single line containing the integer n ( 0 < n < 2^63)
- Tue Jul 20, 2004 1:34 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10479 - The Hendrie Sequence
- Replies: 14
- Views: 5850
I got WA with this problem. Please help me to find my bug. [cpp]#include <stdio.h> #include <math.h> int depth, ans; long long int serial, current; int recurse(int n, int d) { int i, tempDepth; long long int tempCurrent; if(d==depth) { if(serial==current+1) { ans = n; return 1; } else return 0; } fo...
- Thu Mar 25, 2004 7:33 am
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 35243
If judge gives your program output limit exceeded. then change
into
and after that you may get answers other the OLE 
Code: Select all
while(scanf("%d",&n))
Code: Select all
while(1==scanf("%d",&n))

- Wed Mar 24, 2004 10:40 am
- Forum: Volume 101 (10100-10199)
- Topic: 10110 - Light, more light
- Replies: 76
- Views: 28714
- Sat Mar 20, 2004 11:34 am
- Forum: Volume 100 (10000-10099)
- Topic: 10015 - Joseph's Cousin
- Replies: 23
- Views: 5769
- Sat Mar 20, 2004 9:49 am
- Forum: Volume 104 (10400-10499)
- Topic: 10446 - The Marriage Interview :-)
- Replies: 17
- Views: 10135
- Sat Mar 20, 2004 9:46 am
- Forum: Volume 104 (10400-10499)
- Topic: 10446 - The Marriage Interview :-)
- Replies: 17
- Views: 10135
- Sat Mar 20, 2004 9:25 am
- Forum: Volume 101 (10100-10199)
- Topic: 10199 - Tourist Guide
- Replies: 57
- Views: 32742
I also got WA. My program passed all previous sample in/out s in this thread. Please help me to identify my problem. here is the code: [c]#include <stdio.h> #include <string.h> #include <stdlib.h> #define min(a, b) (a < b) ? a : b #define MAXV 105 #define MAXE 5100 int adj[MAXV][MAXV], dfn[MAXV], L[...
- Fri Mar 19, 2004 8:32 am
- Forum: Volume 6 (600-699)
- Topic: 623 - 500!
- Replies: 187
- Views: 49363
- Wed Mar 17, 2004 2:22 pm
- Forum: Volume 3 (300-399)
- Topic: 332 - Rational Numbers from Repeating Fractions
- Replies: 83
- Views: 22637
My code got WA. Please help me to find the bug in my code:- [c]#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> long gcd(long a, long b) { if(!b) return a; else return gcd(b, a%b); } void main() { int j, k, len, kase=1; long num, denom, g; double x, a, b; char ara[20]; wh...
- Sun Mar 14, 2004 1:16 pm
- Forum: Off topic (General chit-chat)
- Topic: Are you an ACM member?
- Replies: 10
- Views: 4842
- Thu Mar 11, 2004 12:22 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10034 - Freckles
- Replies: 101
- Views: 35431
jandujar, my acepted program prints the following output for your given input:
Code: Select all
0.41
0.00
23.94
0.00
20.06
18.22
9.62
12.42
0.00
9.52