From 76e6a85b44269ffe2d8c843dee172d8eb4dada85 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Fri, 11 Oct 2024 05:34:41 +0000 Subject: [PATCH] update --- src/P8093/P8093.cpp | 26 ++++++++++++++++++++++++-- test.txt | 6 ++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 test.txt diff --git a/src/P8093/P8093.cpp b/src/P8093/P8093.cpp index 197a266..37ded02 100644 --- a/src/P8093/P8093.cpp +++ b/src/P8093/P8093.cpp @@ -1,11 +1,12 @@ #include +#include using ull = unsigned long long; auto &is = std::cin; auto &os = std::cout; -ull n, a, b; +ull n, a, b, depth; /* cal(a,b) @@ -16,7 +17,28 @@ cal(a,b) 5)ab){ + if(a&1)return cal(a+1,b)+1; + else return cal(a/2,b)+1; + }else if(a>b/2){ + if(a*2-b>n; + for(ull i {0};i>a>>b; + os<