leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE | |
2745.cpp (175B)
1 class Solution { 2 public: 3 int longestString(int x, int y, int z) const { 4 if (x == y) return (x + y + z) * 2; 5 return (min(x, y) * 2 + z + 1) * 2; 6 } 7 };