A0Paper Time : O(n) Space : O(1) 1234567891011class A0Paper {public: string canBuild(vi& A) { if(A[0]) return "Possible"; ll n = A.size(); for(ll i = n - 1; i >= 1; i--) { A[i-1] += A[i] / 2; } return A[0] ? "Possible" : "Impossible"; }};