From 27d3dd0aa395ff554460fcef22678c31cc375c44 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Thu, 14 Nov 2024 16:29:31 +0800 Subject: [PATCH] update --- src/20241113/T538697.cpp | 73 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/src/20241113/T538697.cpp b/src/20241113/T538697.cpp index bc48b24..6e80ecb 100644 --- a/src/20241113/T538697.cpp +++ b/src/20241113/T538697.cpp @@ -1,7 +1,12 @@ #include #include +#include #include +#include #include +#include +#include +#include using ll = int64_t; #define nv(v)#v<<": "<<(v)<<' ' @@ -9,7 +14,7 @@ auto &ci = std::cin; auto &co = std::cout; const ll mxn = 1e6+5; -ll *a{new ll[mxn]}, *fcts{new ll[mxn]}, *mnfct{new ll[mxn]}; + auto ispm = new bool[mxn]; ll lb(ll n){ @@ -19,7 +24,9 @@ ll lb(ll n){ int main(){ ll n; ci>>n; + // co<>a[i]; mxa = std::max(mxa, a[i]); @@ -40,23 +47,77 @@ int main(){ // for(ll i{1};i<=mxa;i++)co<[n+1]; + std::set usdfct; + // std::map sfs[n+1]; for(ll j{0};jinsert({mnfct[now], 1}); + sfs->emplace(mnfct[now], 1); + }else{ + (*it).second++; + } now/=mnfct[now]; } - } } + // ll ans{}; + + for(ll j:usdfct){ + ll sum{}; + ll srtn{}; + co<<"getting: "<first; + srts[++srtn]=0; + srts[srtn]=it->second; + // co<second)<<'\n'; + } + } + co<<'\n'; + // for(ll k{1};k<=srtn;k++)co<