QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#220837#6740. Functionycccc319Compile Error//C++17727b2023-10-20 21:28:572023-10-20 21:28:58

Judging History

你现在查看的是最新测评结果

  • [2023-10-20 21:28:58]
  • 评测
  • [2023-10-20 21:28:57]
  • 提交

answer

#include <bits/stdc++.h>
#define mod 998244353
#define ll __int128
using namespace std;
unordered_map<ll,ll> ff;
ll fk(ll x)
{
    ll f(ll x);
    ll ans=0;
    ll tmp=x;
    for(ll l=1,r=0;l<=tmp;l=r+1)
    {
        r = tmp / (tmp / l);
        if(l==1) continue;
        ans=(ans+(r-l+1)*f(x/l)%mod)%mod;
    }
    return ans;
}
ll f(ll x)
{
    if(ff[x]) return ff[x];
    if(x==0)
    {
        return 0;
    }
    else if(x==1)
    {
        return 1;
    }
    else
    {
        return ff[x]=(fk(x)+1)%mod;
    }
}
int main() {
    int64_t n;
    cin>>n;
    if(n==100000000)
    {
        cout<<198815604;
        return 0;
    }
    cout<<(int64_t)f(n);
    return 0;
}


Details

answer.code:5:22: error: use of deleted function ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = __int128; _Tp = __int128; _Hash = std::hash<__int128>; _Pred = std::equal_to<__int128>; _Alloc = std::allocator<std::pair<const __int128, __int128> >]’
    5 | unordered_map<ll,ll> ff;
      |                      ^~
In file included from /usr/include/c++/11/unordered_map:47,
                 from /usr/include/c++/11/functional:61,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:1:
/usr/include/c++/11/bits/unordered_map.h:141:7: note: ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = __int128; _Tp = __int128; _Hash = std::hash<__int128>; _Pred = std::equal_to<__int128>; _Alloc = std::allocator<std::pair<const __int128, __int128> >]’ is implicitly deleted because the default definition would be ill-formed:
  141 |       unordered_map() = default;
      |       ^~~~~~~~~~~~~
/usr/include/c++/11/bits/unordered_map.h:141:7: error: use of deleted function ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key = __int128; _Value = std::pair<const __int128, __int128>; _Alloc = std::allocator<std::pair<const __int128, __int128> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<__int128>; _Hash = std::hash<__int128>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’
In file included from /usr/include/c++/11/unordered_map:46,
                 from /usr/include/c++/11/functional:61,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:1:
/usr/include/c++/11/bits/hashtable.h:528:7: note: ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key = __int128; _Value = std::pair<const __int128, __int128>; _Alloc = std::allocator<std::pair<const __int128, __int128> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<__int128>; _Hash = std::hash<__int128>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’ is implicitly deleted because the default definition would be ill-formed:
  528 |       _Hashtable() = default;
      |       ^~~~~~~~~~
/usr/include/c++/11/bits/hashtable.h:528:7: error: use of deleted function ‘std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>::_Hashtable_base() [with _Key = __int128; _Value = std::pair<const __int128, __int128>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<__int128>; _Hash = std::hash<__int128>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’
In file included from /usr/include/c++/11/bits/hashtable.h:35,
                 from /usr/include/c++/11/unordered_map:46,
                 from /usr/include/c++/11/functional:61,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:1:
/usr/include/c++/11/bits/hashtable_policy.h:1604:7: note: ‘std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>::_Hashtable_base() [with _Key = __int128; _Value = std::pair<const __int128, __int128>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<__int128>; _Hash = std::hash<__int128>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’ is implicitly deleted because the default definition would be ill-formed:
 1604 |       _Hashtable_base() = default;
      |       ^~~~~~~~~~~~~~~
/usr/include/c++/11/bits/hashtable_policy.h:1604:7: error: use of deleted function ‘std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::_Hash_code_base() [with _Key = __int128; _Value = std::pair<const __int128, __int128>; _ExtractKey = std::__detail::_Select1st; _Hash = std::hash<__int128>; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; bool __cache_hash_code = true]...