diff --git a/2202/220218-CN.cpp b/2202/220218-CN.cpp new file mode 100644 index 0000000..22acc5f --- /dev/null +++ b/2202/220218-CN.cpp @@ -0,0 +1,8 @@ +#include + +class Solution { +public: + static int findCenter(const std::vector>& edges) { + return edges[0][(edges[0][0] == edges[1][0] || edges[0][0] == edges[1][1]) ? 0 : 1]; + } +}; \ No newline at end of file diff --git a/2202/CMakeLists.txt b/2202/CMakeLists.txt index ea4aeaa..4bda13e 100644 --- a/2202/CMakeLists.txt +++ b/2202/CMakeLists.txt @@ -3,4 +3,4 @@ PROJECT(2202) SET(CMAKE_CXX_STANDARD 23) -ADD_EXECUTABLE(2202 220217-CN.cpp) +ADD_EXECUTABLE(2202 220218-CN.cpp)