Solusi gw: #include <stdio.h> char f (int r, int c, int n) { \tif (c < 0 || c >= (1 << n) + 1 + r) return ' '; \tif (n == 1) { \t\tif (r + c == 0) return ' '; \t\tif (r + c == 1) return '/'; \t\tif (c - r == 2) retu...
Solusi alternatif dari gw, time complexity per input nya O(n * 3^n) dan space complexity O(1): #include <stdio.h> int main () { \tint n; \t \twhile (scanf ("%d", &n) == 1) { \t\tint amount = 1; \t\tfor (int i = 0; i < n; i++) \t\t\tamoun...