text: Split first N natural numbers into two sets with minimum absolute difference of their sums | C ++ program to implement the above approach ; Function to split the first N natural numbers into two sets having minimum absolute difference of their sums ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int minAbsDiff ( int N ) { if ( N % 4 == 0 N % 4 == 3 ) { return 0 ; } return 1 ; } int main ( ) { int N = 6 ; cout << minAbsDiff ( N ) ; }