diff --git "a/leetcode/Study Plan/3432. \347\273\237\350\256\241\345\205\203\347\264\240\345\222\214\345\267\256\345\200\274\344\270\272\345\201\266\346\225\260\347\232\204\345\210\206\345\214\272\346\226\271\346\241\210/1.cpp" "b/leetcode/Study Plan/3432. \347\273\237\350\256\241\345\205\203\347\264\240\345\222\214\345\267\256\345\200\274\344\270\272\345\201\266\346\225\260\347\232\204\345\210\206\345\214\272\346\226\271\346\241\210/1.cpp" index f950f211..52c74681 100644 --- "a/leetcode/Study Plan/3432. \347\273\237\350\256\241\345\205\203\347\264\240\345\222\214\345\267\256\345\200\274\344\270\272\345\201\266\346\225\260\347\232\204\345\210\206\345\214\272\346\226\271\346\241\210/1.cpp" +++ "b/leetcode/Study Plan/3432. \347\273\237\350\256\241\345\205\203\347\264\240\345\222\214\345\267\256\345\200\274\344\270\272\345\201\266\346\225\260\347\232\204\345\210\206\345\214\272\346\226\271\346\241\210/1.cpp" @@ -1,5 +1,13 @@ +#include +#include class Solution { public: + /** + * @brief Compute a partition-count value determined by whether the sum of `nums` is odd or even. + * + * @param nums Input vector of integers whose elements are summed. + * @return int `0` if the total sum of `nums` is odd; otherwise `nums.size() - 1` (which is `-1` for an empty vector). + */ int countPartitions(vector& nums) { int sum = reduce(nums.begin(),nums.end()); return sum % 2 ? 0 : nums.size() - 1; diff --git "a/luogu/\345\205\245\351\227\250/P1035/tempCodeRunnerFile.cpp" "b/luogu/\345\205\245\351\227\250/P1035/tempCodeRunnerFile.cpp" deleted file mode 100644 index fac57903..00000000 --- "a/luogu/\345\205\245\351\227\250/P1035/tempCodeRunnerFile.cpp" +++ /dev/null @@ -1,2 +0,0 @@ - - return 0; \ No newline at end of file