diff --git a/src/P1219/P1219.cpp b/src/P1219/P1219.cpp new file mode 100644 index 0000000..cffd85d --- /dev/null +++ b/src/P1219/P1219.cpp @@ -0,0 +1,48 @@ +#include +#include + +using ll = long long; + +auto &is = std::cin; +auto &os = std::cout; + +template +struct greater_array{ + T arr[size*2]; + T&operator[](ll n)noexcept{ + return arr[n+size]; + } +}; + +const ll max_n {13+5}; +ll n; +greater_array l,zx,yx; +ll ans[max_n], sum; + + +void dfs(const ll x)noexcept{ + if(x>n){ + sum++; + if(sum<=3){ + for(ll i{1};i<=n;i++){ + os<>n; + dfs(1); + os<