Computer Science Canada Tournament Help |
Author: | l0tt0 [ Thu Dec 04, 2003 10:56 pm ] | ||
Post subject: | Tournament Help | ||
Hey Everyone, I made this tournament code for my site to find out who's where in the tournament. I haven't learned how to do tony's proc to check to make sure two numbers are the same so i just used the big exit when line. What i want to know is if there's anyway to amke it run faster besides a better system of making sure no matches are the same? Thanks.
|
Author: | Tony [ Thu Dec 04, 2003 11:53 pm ] |
Post subject: | |
![]() wow man... could you do yourself a favor and take Data Managment in grade 12? When generating 8 random numbers (from 1 to 8), what are the chances of them to generate an unique list? well chances of first to not repeat are 1/1 second - 7/8 third - 6/8 ... eighth - 1/8... multiply all those numbers together... you get 0.0025 they translate into 1:400 odds of you generating a unique list ![]() |
Author: | l0tt0 [ Sun Dec 07, 2003 11:59 pm ] |
Post subject: | |
huh? im only in grade 10...but i think i understand what u said...almost taht there's practically no chance of gettin those numbers...? |
Author: | DanShadow [ Mon Dec 08, 2003 12:06 am ] | ||
Post subject: | .. | ||
ok....is this code s upposed to go through long random pointless (algorithyms) to find 1 person from each list to go against each other in a tournament? If so, its so much easier that that.
Just ask for the names of the tournament people under the variables. Hopefully I understood what your program was doing. (Maybe make a couple comments?) |
Author: | AsianSensation [ Mon Dec 08, 2003 12:09 am ] |
Post subject: | |
but with your code, a person could go against him or herself. Also, in a tournament, I think you only play each person once. Or something like that, so a bit of math is involved. just use the stuff you learned in data management. |
Author: | Tony [ Mon Dec 08, 2003 10:09 am ] |
Post subject: | |
the guy is not in data managment, he's in grade 10 ![]() anyways, here's the link to the source code for that random list generator. Try to understand how it works. |
Author: | DanShadow [ Mon Dec 08, 2003 12:05 pm ] | ||
Post subject: | .. | ||
Ok, just make a new array...like for people who already played. Like.....
|