Basic course on object-oriented programming space lighting in C + +. Classes and objects, encapsulation, methods, plymorfismus. Abstract data types, overloading. Containers, iterators, space lighting algorithms. Templates, generic programming, compilation of polymorphism. Exceptions. Safe and portable programming, links to the OS.
Motivation: Today, the task to check whether conversion from one data type to another does not cause a compiler error. The problem is that the compiler can not decide how to do the conversion, if after award, how much are converting from one data type to another career, there are two (or more) ways to perform conversion -> therefore causes compiler error ( is confused) Award (inaccurate): However, the real goal was to report such a path in the graph that have the same first peak and the last peak of the same and these paths have the same cost. Test input: That was the one test chart Code: T1 -> T2 -> T3 | | | vvv T4 -> T5 -> T6 | | | vvv T7 -> T8 -> T9 input was specified as follows: Code: All T1: T2, T4 T2 T5, T3 T3: T4 T6: T5, T7 T5, T8, T6 T6: T7 T9: T8 T8: T9 input: The input above shows that each line was: <identifier top> <dvojtečka> <identifier peaks separated Details čárkami> line input: if the line is empty, then ignore it and continue on to the next peak identifier could be using a regular expression can be written as: [a-zA-Z] [a- zA-Z0-9] * --- So at the beginning of one character and then any number (even zero) characters consisting of alfanum characters around the identifiers of vertices can be any number of spaces (eg T1: T2, T4) - you need to write something for trimming the identifier can be in parenthesis price edge: Code: T1: T2 (5), T4, T18 (2) So from the top T1 to T2 leading edge with the price of 5 from T1 to T4 with an edge price of 1 (default is 1, unless otherwise specified by writing with parentheses) from T1 to T18 edge with a price on Line 2, which would contain the list of neighbors itself is not allowed and has to throw an error message and quit, eg Code: Select all T1 ... T1 ... the lines that contain only the name of the top and there are no neighbors space lighting is also prohibited (same solution as above). The output (in the example above): T1, T5 (T4) (T2) T1, T6: (T2, T3), (T4, T5) ... The first two peaks indicate the first and last vertex path, followed by a colon and parenthesis is always space lighting given way without the initial and final peak. In a statement appears only routes that have the same total cost - BUT - if there were four such paths with the same start and end vertices, the two would have a weight of 10 and two 20, then advertise only those with a weight of 10 - ie the minimum weight. Time: 3 hours I had it done for 2.5hs that I too did not look at efficiency. While browsing the code I've come up with a simple modification, which drastically reduced the amount of memory needed - when I fix this, so I was satisfied. I left exactly three hours after the first, subjective feeling space lighting is that the previous round was easier .. rate statistics do not know, maybe someone added ..
I tried to do so, how they work routing table and I completely entangled space lighting in it. (I had better pull Dijkstra). I gave up after less than three and a half hours and at the moment the number of people roughly equivalent to the number of fingers of one hand pretending that they just moment and will be able to check in, however fellow Him was at that moment still single, DKO successfully handed. Cabroušek Matfyz (AA | AAA) Level I Posts: 16 Joined: 24th First 2008 23:16 Location: Kladno Study: Information Mgr. ICQ
Although many were set about 30 minutes but I managed to watch so successfully handed over a total of 4 people which is not much. For my taste the award was quite overshoot 3hr was very little tentacle Matfyz (AA | AAA) Level I Posts: 12 Joined: 17th First 2007 12:36 PM
Back to NPRG041 Programming in C + + Jump to: Select a forum ------------------ Current Information Studies Library Student Chamber of the Academic Senate (UCAS) and the Options. year 2013/2014 All Work Lounge This forum State Final Examination space lighting Bachelor's Master FSE FSE Info for foreign students Events Football Tournament space lighting 2008 Science space lighting Teaching ZS ZS first year DMI002 Discrete Mathematics 2007 2006 2005 2004 MAI054 Mathematical Analysis I &
No comments:
Post a Comment