From 6bae284fd358815af4d38d521394036ebb734359 Mon Sep 17 00:00:00 2001 From: kamyu Date: Thu, 11 Jun 2015 23:36:49 +0800 Subject: [PATCH] Update the-skyline-problem.cpp --- C++/the-skyline-problem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C++/the-skyline-problem.cpp b/C++/the-skyline-problem.cpp index ba4950638..3a1ff1142 100644 --- a/C++/the-skyline-problem.cpp +++ b/C++/the-skyline-problem.cpp @@ -37,8 +37,10 @@ class Solution { } } - if (height_to_count.empty() || curr_max != height_to_count.crbegin()->first) { - curr_max = height_to_count.empty() ? 0 : height_to_count.crbegin()->first; + if (height_to_count.empty() || + curr_max != height_to_count.crbegin()->first) { + curr_max = height_to_count.empty() ? + 0 : height_to_count.crbegin()->first; res.emplace_back(point, curr_max); } }