From 6063b65fdab177ebfbbcc8257bc438e75b0bb453 Mon Sep 17 00:00:00 2001 From: Matuush Date: Sun, 20 Apr 2025 11:58:38 +0200 Subject: [PATCH] Simplify min+max --- main.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index 183cea0..f3f2310 100644 --- a/main.cpp +++ b/main.cpp @@ -19,16 +19,8 @@ struct position { }; // Utilities -count_type min(count_type a, count_type b) { - if(a <= b) - return a; - return b; -} -count_type max(count_type a, count_type b) { - if(a >= b) - return a; - return b; -} +count_type min(count_type a, count_type b) { return (a <= b) ? a : b; } +count_type max(count_type a, count_type b) { return (a >= b) ? a : b; } // Global variables treap file;