Search found 26 matches
- Fri Aug 22, 2003 3:09 am
- Forum: Volume 105 (10500-10599)
- Topic: 10535 - Shooter
- Replies: 25
- Views: 56006
can anyone see any problem with this? I get WA and I don''t know why. :cry: [cpp] int N, c[501][4], x, y; bool check(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) { int x = (y1-y3)*(x4-x3) - (x1-x3)*(y4-y3); int y = (x3-x1)*(y2-y1) - (y3-y1)*(x2-x1); int z = (y4-y3)*(x2-x1) - (x4-x...
- Wed Jul 31, 2002 5:35 am
- Forum: Volume 1 (100-199)
- Topic: 144 - Student Grants
- Replies: 21
- Views: 6344
Re: Could somebody give me sample input/output for 144 ?
I keep getting WA for 144.... It would be very helpful, if somebody could provide me a sample set of input/output. or if somebody could give me his ACCEPTED program for 144, so that I can compare my outputs. Thanks. I didn't test my solution much, so I'll just post the code. Enjoy... [cpp] #include...
- Sun Jul 28, 2002 1:25 am
- Forum: Volume 1 (100-199)
- Topic: 114 - Simulation Wizardry
- Replies: 80
- Views: 15468
- Fri Jul 26, 2002 5:34 am
- Forum: Volume 1 (100-199)
- Topic: 114 - Simulation Wizardry
- Replies: 80
- Views: 15468
114 Simulation Wizardry (infinite loop)
I'm getting an infinite loop on this one. The problem statement is totally unclear. It's easy to see how an infinite loop could be caused... but since I can't understand the problem description, I have no idea what's wrong. Is it possible to have a bumper on the edge, where I'm assuming there's a wa...
- Mon Jul 22, 2002 5:57 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10327 - Flip Sort
- Replies: 81
- Views: 33359
Re: i fix my code... but ....
i fix my code but it still WA!! can you say more clear??? i find the smallest number and change Is there any thing i didn't consider??? [cpp] #include<stdio.h> int in[5000],input,time=0,ins,min=0; main() { int i,j; while(scanf(" %d",&input)==1) { time=0; for(i=0;i<input;i++) scanf(&qu...
- Mon Jul 22, 2002 5:38 pm
- Forum: Volume 1 (100-199)
- Topic: 188 - Perfect Hash
- Replies: 9
- Views: 7088
188 - Perfect Hash
I don't understand why I'm getting WA here. The problem desc. says exactly what to do and it works on all the input i've tried. Can anyone see the problem? (I know my split function is fine, and i added the long long just as an extra precaution.) [cpp] while (gets(buf)) { printf("%s\n", bu...
- Sun Jul 21, 2002 11:36 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10319 - Manhattan
- Replies: 9
- Views: 6638
I'm working with this problem now. I did use method similar with 2-SAT problem, (snip) I first construct a graph use following way: after that, I'll compute all reachbillity for all pair (i, j) then the final process is just to check whether each route can be assigned without any contridictions, if...
- Tue Jul 16, 2002 9:37 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10325 - The Lottery
- Replies: 14
- Views: 9060
A few things, dunno if these will help: 1. Shouldn't you be reading from stdin/stdout instead of those files? (I don't know, I don't use Pascal for my solutions.) 2. Your algorithm doesn't look correct to me, but I don't think I really understand what you're trying to do in it. There was a good hint...
- Tue Jul 16, 2002 8:59 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10323 - Factorial! You Must be Kidding!!!
- Replies: 106
- Views: 45193
f(-1) is just undefined, period. It's not infinity, gogolplex, or anything; just undefined, period. That's because the factorial function f(n) is only defined for n={0,1,2,3,...}. The reasoning that f(-1) should be infinity, because C(4,5) should be 0 is faulty, because C(4,5) is undefined, not zer...
- Tue Jul 09, 2002 6:43 am
- Forum: Volume 101 (10100-10199)
- Topic: 10101 - Bangla Numbers
- Replies: 122
- Views: 42964
Re: What is wrong? HELP NEEDED
Could someone tell me what are the proper answers for the followin input data: 1000000 10000000000 1000000000000101 I have the following answers: 1. 10 lakh (3 spaces before '1.', no spaces after lakh) 2. 1 hajar kuti 3. 10 kuti kuti 1 shata 1 is this wrong? I got WA :( PLEASE HELP!!!!! :cry: No, t...
- Sat Jul 06, 2002 5:31 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10319 - Manhattan
- Replies: 9
- Views: 6638
Re: 10319 - Manhattan
I try to formulate this problem as a two-coloring problem. My idea is that I treat each pair of input point as a single node. And for each pair of node, if their desired paths may conflict, they are joined by an edge. Then I just check this graph to see if it is two-colorable. But this idea seems n...
- Sat Jul 06, 2002 5:08 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10316 - Airline Hub
- Replies: 25
- Views: 9951
Re: No
Compare the problem statement of Waterloo contest and 50th contest. There is a slight difference :) Thanks. The problem was a roundoff error... I added an epsilon check and got AC. But I don't understand why floating point tricks like this have to be introduced, they have nothing to do with the ori...
- Sat Jul 06, 2002 7:45 am
- Forum: Volume 103 (10300-10399)
- Topic: 10316 - Airline Hub
- Replies: 25
- Views: 9951
10316 - Airline Hub
I keep getting WA and this is such a simple problem. My solution works fine on the judge's data from the original Waterloo contest, and my solution is basically identical to theirs (modified to take multiple cases and return the last airport if there's a tie).
- Sat Jul 06, 2002 3:00 am
- Forum: Volume 103 (10300-10399)
- Topic: 10320 - Cow Trouble! Help Please!!
- Replies: 27
- Views: 12868
are you sure it's not just a compile error because of redefining M_PI (if you include math.h). this is a good solution and it's very much a spoiler This is strange -- I get AC now. The only thing I remember changing from my most recent WA was I factored out a M_PI... but maybe that did it. Or maybe...
- Fri Jul 05, 2002 5:57 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10320 - Cow Trouble! Help Please!!
- Replies: 27
- Views: 12868
Does anyone see anything obviously wrong with this, or do you think it's floating point fuzz? I'm getting WA, but all the test cases I've tried including the ones posted here come out correct to all 10 decimal places. [cpp] #define M_PI 2.0*acos(0) int main() { double l, w, R, x, y, a, b, c, d; whil...