Search found 11 matches
- 6 years ago
- Forum: Problem set
- Topic: 2537 - Assassins of the Three Kingdoms
- Replies: 4
- Views: 1144
The goal is to count the number of permutations in which Pavel chooses first than other players who wants the same card that him, right?
What i understand in this problem is that you must find the MST and the 2nd MST, in a weighted non-directed graph. I'm making a classic Kruskal, then i save in a vector the solution's edges. Finally a loop in that vector deactivating one edge at the time, and choosing the minor MST of that loop. But...
how can i read until EOF using cin, or any other way different than while( scanf("%s", cadena)!= EOF ). The objective is to use the string of the class string and read with iostream.
somebody knows how to use the priority queue of the stl, not with the data type int but with some other structure or class. I'm trying but i don't know how to indicate the priority order. I've already try with overloading operators but i'm having some troubles. Could anyone help me?