fork download
  1. #include <iostream>
  2. #define MIN(x, y) ((x) < (y) ? (x) : (y))
  3.  
  4. void Partition(int n, int high, int *count)
  5. {
  6. if (n)
  7. for (int i = 1; i <= high; i++)
  8. Partition(n - i, MIN(i, n - i), count);
  9. else
  10. (*count)++;
  11. }
  12.  
  13. int main()
  14. {
  15. int n, count = 0;
  16. std::cin » n;
  17. Partition(n, n - 1, &count);
  18. std::cout « count;
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:16:10: error: stray ‘\302’ in program
 std::cin » n;
          ^
prog.cpp:16:11: error: stray ‘\273’ in program
 std::cin » n;
           ^
prog.cpp:18:11: error: stray ‘\302’ in program
 std::cout « count;
           ^
prog.cpp:18:12: error: stray ‘\253’ in program
 std::cout « count;
            ^
prog.cpp: In function ‘int main()’:
prog.cpp:16:13: error: expected ‘;’ before ‘n’
 std::cin » n;
             ^
prog.cpp:18:14: error: expected ‘;’ before ‘count’
 std::cout « count;
              ^~~~~
stdout
Standard output is empty