Comments
On wituaCodeforces Beta Round #91, 7 months ago
0
My solution passes your test and works on all other tests
Proof: 8·109 / (3·109) < 4 :)

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.

On RizvanovUsing C++0x, 13 months ago
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?

On RizvanovUsing C++0x, 13 months ago
+5
Look below (I posted the answer in wrong branch :( )
On RizvanovUsing C++0x, 13 months ago
+7

In C++0x you don’t need to put spaces between right angle brackets >.

vector<vector<pair<intint>>> v;

you could initialize containers in convenient way

vector<int> a = {1, 2, 3};

there is auto-typed variables

for (auto i = a.begin(); i != a.end(); ++i)
       cout << *i << endl;

lambdas

sort(a.begin(), a.end(), [](int x, int y) { return x > y; });

range for statement

for (int x : a)
       cout << x << endl;

and as you mentioned there is unordered_map (unordered_set) which is a standardized hash table.

unordered_map<int, string> f = {
       {1, "one"},
       {2, "two"},
       {3, "three"},
};
for (auto p : f)
       cout << p.first << " -> " << p.second << endl;

Also some useful functions were added to <algorithm>, <functional> and other header files. See 1, 2 for more details.

On yeputonsOne more GCC bug (#323), 16 months ago
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.