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