QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#731827#8334. GeneZhaoZiLongCompile Error//C++20923b2024-11-10 11:38:322024-11-10 11:38:33

Details

answer.code: In function ‘bool pd(int, int, int)’:
answer.code:7:63: error: reference to ‘hash’ is ambiguous
    7 |         return (hash1[r]-hash1[l-1]*pow26[r-l+1]%_mod)%_mod==(hash[x][r]-hash[x][l-1]*pow26[r-l+1]%_mod)%_mod;
      |                                                               ^~~~
In file included from /usr/include/c++/13/string_view:42,
                 from /usr/include/c++/13/bits/basic_string.h:47,
                 from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from answer.code:1:
/usr/include/c++/13/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
answer.code:5:26: note:                 ‘long long int hash [305][60005]’
    5 | long long pow26[1000005],hash[305][60005],hash1[60005],_mod=1e9+7;
      |                          ^~~~
answer.code:7:74: error: reference to ‘hash’ is ambiguous
    7 |         return (hash1[r]-hash1[l-1]*pow26[r-l+1]%_mod)%_mod==(hash[x][r]-hash[x][l-1]*pow26[r-l+1]%_mod)%_mod;
      |                                                                          ^~~~
/usr/include/c++/13/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
answer.code:5:26: note:                 ‘long long int hash [305][60005]’
    5 | long long pow26[1000005],hash[305][60005],hash1[60005],_mod=1e9+7;
      |                          ^~~~
answer.code: In function ‘int main()’:
answer.code:17:25: error: reference to ‘hash’ is ambiguous
   17 |                         hash[i][j]=(hash[i][j-1]*26%_mod+ch-'a')%_mod;
      |                         ^~~~
/usr/include/c++/13/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
answer.code:5:26: note:                 ‘long long int hash [305][60005]’
    5 | long long pow26[1000005],hash[305][60005],hash1[60005],_mod=1e9+7;
      |                          ^~~~
answer.code:17:37: error: reference to ‘hash’ is ambiguous
   17 |                         hash[i][j]=(hash[i][j-1]*26%_mod+ch-'a')%_mod;
      |                                     ^~~~
/usr/include/c++/13/bits/functional_hash.h:59:12: note: candidates are: ‘template<class _Tp> struct std::hash’
   59 |     struct hash;
      |            ^~~~
answer.code:5:26: note:                 ‘long long int hash [305][60005]’
    5 | long long pow26[1000005],hash[305][60005],hash1[60005],_mod=1e9+7;
      |                          ^~~~