Code: Show/Hide Subject: [..] Programming Contest Results
Dear [..] Programming Contest participants, I am pleased to announce the results of the contest held yesterday, October 13. The winners are as follows: First Place ($1,000 Amazon.com gift card): Sam Hu[..]ghes Number of successful submissions: 7 Time of last successful submission: 5:33 PM Second Place ($500 Amazon.com gift card): [...] Number of successful submissions: 7 Time of last successful submission: 6:25 PM Third Place ($250 Amazon.com gift card): [...] Number of successful submissions: 6 Time of last successful submission: 6:03 PM The winners will be contacted regarding their prizes via email. Thank you to all who participated, and we'll see you again next year. -- [...] |
| Quote: |
| Subject: ACM/UPE Programming Contest Results |
| Bak wrote: |
| Oh beardy's still around? I had programming languages with him and he argued with the professor and stormed out during lecture about 50% of the time. |
| Bak wrote: |
| For the first one, doesn't it amount to checking if the two nodes are in the same connected component? I'd probably make a vector of sets and add elements / merge sets as necessary and then see if the two elements are in the same set to see if there's a path between them. |
Code: Show/Hide void merge(char a, char b, std::vector<int>& groups) {
if (groups[a - 'A'] != groups[b - 'A']) { int aval = groups[a - 'A']; int bval = groups[b - 'A']; std::replace(groups.begin(), groups.end(), bval, aval); } } |
| Bak wrote: |
| wat! I won a programming contest at RPI and all I got was a mouse for my laptop! |