Codeforces Round #426 (Div. 1), problem: (E) Caramel Clouds Solution In C/C++

By |2017-08-04T12:34:07+00:00August 4th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include <algorithm> #include <cstdio> #include <cstring> #include <map> #include <set> #include <utility> #include <vector> const int N = 300000; struct Sum { int add(int id, int value) { if (a[0].second == id) { a[0].first = std::max(a[0].first, value); } else if (a[1].first < value) { [...]