From 96af76f038f751b121d2ea40fd2fe4298ac37fc2 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sun, 13 Oct 2024 00:20:36 +0800 Subject: [PATCH] update --- src/P1219/P1219.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/P1219/P1219.cpp 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<