|
0
My solution passes your test and works on all other tests Proof: 8·109 / (3·109) < 4 :) |
|
+10
Each connected component in the graph has exactly one cycle. Pick any edge from the cycle and remove it from the graph, now we should consider two cases: a picked edge is in the answer and it isn’t there. Both cases can be easily solved with dp on tree. |
|
0
Let discuss it in a private order, I’ve sent some questions to you. Has anyone else had a problem with updating MinGW on Dev-CPP? |
|
+5
Look below (I posted the answer in wrong branch :( )
|
|
+7
In C++0x you don’t need to put spaces between right angle brackets >.
you could initialize containers in convenient way
there is auto-typed variables
lambdas
range for statement
and as you mentioned there is unordered_map (unordered_set) which is a standardized hash table.
Also some useful functions were added to <algorithm>, <functional> and other header files. See 1, 2 for more details. |
|
0
Maybe on Ubuntu 10.10 x86_64 gcc generates x64-binaries. Could someone run it on 32-bit linux? On mingw-w64 it also works fine. |



