Skip to content

Commit a34c139

Browse files
authored
Merge pull request #7 from tkzzzzzz6/auto-fix-missing-headers-20260408
Auto fix missing headers 20260408
2 parents ab43f9e + c0deccb commit a34c139

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

leetcode/Study Plan/3432. 统计元素和差值为偶数的分区方案/1.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
#include <vector>
2+
#include <numeric>
13
class Solution {
24
public:
5+
/**
6+
* @brief Compute a partition-count value determined by whether the sum of `nums` is odd or even.
7+
*
8+
* @param nums Input vector of integers whose elements are summed.
9+
* @return int `0` if the total sum of `nums` is odd; otherwise `nums.size() - 1` (which is `-1` for an empty vector).
10+
*/
311
int countPartitions(vector<int>& nums) {
412
int sum = reduce(nums.begin(),nums.end());
513
return sum % 2 ? 0 : nums.size() - 1;

luogu/入门/P1035/tempCodeRunnerFile.cpp

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)