Seriously, man, I hate these precision problems
Thank you, suneast. Got AC after printing doubles properly.
Search found 46 matches
- Thu Feb 10, 2011 2:48 pm
- Forum: Volume 119 (11900-11999)
- Topic: 11910 - Closest Fractions
- Replies: 8
- Views: 4092
- Thu Feb 10, 2011 2:10 pm
- Forum: Volume 119 (11900-11999)
- Topic: 11910 - Closest Fractions
- Replies: 8
- Views: 4092
Re: 11910 - Closest Fractions
Can somebody help me with this? Here is some I/O from my WA program: Input 3.141592654 00000000001 1000.000000 999.9999999 -2.00000000 -0.11111111 0.000000000 123456789 984.12331 33.000000 Output Input : 3.141592654 1 : 3.141592920 = 355 / 113 2 : 3.141630901 = 732 / 233 3 : 3.141552511 = 688 / 219 ...
- Wed Feb 09, 2011 10:55 am
- Forum: Other words
- Topic: Sixth Contest of Newbies
- Replies: 10
- Views: 8024
Re: Sixth Contest of Newbies
Thank you, Observer. Very good point.
I didn't know children could be so smart at guessing games. AC after fixing that.
I didn't know children could be so smart at guessing games. AC after fixing that.
- Tue Feb 08, 2011 2:23 pm
- Forum: Other words
- Topic: Sixth Contest of Newbies
- Replies: 10
- Views: 8024
Re: Sixth Contest of Newbies
C: Yes the statement is long... but this may be the easiest problem in the whole set~ It must be, but I can't get it right. Can you give me the output for: 36 15 49 18 100 10 Mine is: 1? - CLOSER 36? - FARTHER 2? - CLOSER 26? - SAME 13? - CLOSER 19? - FARTHER 3? - CLOSER 30? - FARTHER 4? - CLOSER 2...
- Wed Nov 10, 2010 3:09 pm
- Forum: Volume 116 (11600-11699)
- Topic: 11610 - Reverse Prime
- Replies: 7
- Views: 4119
Re: 11610 - Reverse Prime
There's something weird about this problem. After getting WA I went to the UVA toolkit site and checked several queries to see what my mistake was. This is what I found: Input: q 39283 q 39284 My output: 200580 200584 UVA Toolkit output: 200580 200593 It turns out that reversed prime no. 39283 is 70...
- Thu Sep 02, 2010 10:48 am
- Forum: Volume 102 (10200-10299)
- Topic: 10283 - The Kissing Circles
- Replies: 13
- Views: 7123
Re: 10283 - The Kissing Circles
For those stuck in this problem: The input file will contain several lines of inputs. Each line contains non-negative integers R(R<=10000) and N (1<=N<=100) as described before. Input is terminated by end of file. It's quite obvious that N is positive but what about R? Do you handle R=0? Well, I did...
- Thu Sep 02, 2010 9:30 am
- Forum: Volume 101 (10100-10199)
- Topic: 10142 - Australian Voting
- Replies: 82
- Views: 43762
Re: 10142 - Australian Voting
After several tries, I finally found this random test case: 12 A B C D E F G H I J K L 10 9 12 4 5 2 6 3 8 1 7 11 1 7 2 11 4 3 12 10 8 6 9 5 7 10 11 8 6 2 5 1 12 3 4 9 10 4 9 6 12 1 11 8 5 3 2 7 1 4 6 12 2 11 8 10 7 5 3 9 8 4 9 3 11 7 12 2 5 10 1 6 4 1 7 5 9 12 3 6 8 10 11 2 9 6 12 3 1 11 8 2 7 10 5...
- Fri Aug 13, 2010 2:58 pm
- Forum: Volume 5 (500-599)
- Topic: 558 - Wormholes
- Replies: 30
- Views: 19868
Re:
Hi all.... My algorithm is: 1) Run DFS(0) if there is a cycle then calculate the total cost of the cycle. if it is negative return What is the problem i got TLE.... I also used this approach at first. But then I came up with this test case: 1 4 6 0 1 10 1 2 20 2 3 30 3 1 50 3 0 15 0 2 -46 Here, the...
- Fri Aug 06, 2010 1:19 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10142 - Australian Voting
- Replies: 82
- Views: 43762
Re: 10142 - Australian Voting
Thanks sohel. Very useful tool. I managed to find an error: I wasn't marking all the new eliminated candidates before giving away their ballots, so I could give a ballot to a candidate who was going to be eliminated later in the same iteration :oops: Anyway, I'm still getting WA, don't know why and ...
- Thu Aug 05, 2010 12:40 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10142 - Australian Voting
- Replies: 82
- Views: 43762
Re: 10142 - Australian Voting
Hi everybody I've been trying to get this problem AC for a few days now and there is no way. My solution is really simple, as I think the problem is too, but no matter how hard I try I can't find out what I'm doing wrong. What if there's no ballots? I guess all the candidates tie with 0 votes and yo...
- Sun May 25, 2008 5:45 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11454 - Very well informed domino player
- Replies: 9
- Views: 4423
Re: 11454 - Very well informed domino player
My output is the same as LayCurse for (2,0), that is, 13322980 + 18554528
I don't think the i/o is wrong, otherwise it couldn't have been solved by Alberto.
I don't think the i/o is wrong, otherwise it couldn't have been solved by Alberto.
- Mon May 12, 2008 3:41 pm
- Forum: Volume 8 (800-899)
- Topic: 848 - Fmt
- Replies: 16
- Views: 14108
Re: 848 - FMT
Thanks Jan for the I/O files. They really helped me a lot!
However, I must say that my AC program doesn't produce *exactly* the same output as the sample output file, so it's not necessary to make them match perfectly. You can use them as a guide, though.
However, I must say that my AC program doesn't produce *exactly* the same output as the sample output file, so it's not necessary to make them match perfectly. You can use them as a guide, though.
- Sun Apr 06, 2008 11:28 pm
- Forum: Bugs and suggestions
- Topic: 11087 - Divisibility Testing
- Replies: 18
- Views: 8434
Re: 11087 - Divisibility Testing
I tried this problem a few weeks ago. Same problem.
- Sun Apr 06, 2008 9:06 pm
- Forum: Bugs and suggestions
- Topic: 216, WA after changing the judge
- Replies: 4
- Views: 2909
Re: 216, WA after changing the judge
I'm also stuck with this problem. I have dozens of WA's and my algorithm is just a simple backtracking. Anyone have got AC in the last few months? The success rate for this problem is surprisingly low for such an easy task.
P.S.: I've tried float, double and long double
P.S.: I've tried float, double and long double
- Wed Mar 12, 2008 2:07 pm
- Forum: Bugs and suggestions
- Topic: Anybody out there?
- Replies: 2
- Views: 1516
Anybody out there?
Hi guys, Don't know if i'm the only one that think like this but, anyway, i must say it! The new system is up for almost a year now and we haven't seen any of the "amazing" features devised for it yet. I was wondering if the OJ site is still under development or if it's frozen for some rea...