/ XMU_ACM /

记录详情

Compile Error

foo.cc: In function 'void fn(ll)':
foo.cc:59:25: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
         printf("%d",a[i]);
                     ~~~~^
foo.cc:61:20: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
  printf("%d\n",a[1]);
                ~~~~^
foo.cc: In function 'int main()':
foo.cc:74:3: error: reference to 'next' is ambiguous
   next[i]=i+1;
   ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:77:2: error: reference to 'next' is ambiguous
  next[n]=0;
  ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:84:3: error: reference to 'next' is ambiguous
   next[fath[t[i]]]=next[t[i]];
   ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:84:20: error: reference to 'next' is ambiguous
   next[fath[t[i]]]=next[t[i]];
                    ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:85:8: error: reference to 'next' is ambiguous
   fath[next[t[i]]]=fath[t[i]];
        ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:86:12: error: reference to 'next' is ambiguous
   for(ll j=next[t[i]];j;j=next[j])  js[j]-=1;
            ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:86:27: error: reference to 'next' is ambiguous
   for(ll j=next[t[i]];j;j=next[j])  js[j]-=1;
                           ^~~~
foo.cc:22:59: note: candidates are: ll next [1000005]
 ll n,t[1000005],ans,jc[1000005],js[1000005],fath[1000005],next[1000005],la,flag;
                                                           ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1051 小丑的炸弹
比赛
厦大附中模拟赛第六场
语言
C++
递交时间
2021-03-14 17:28:25
评测时间
2021-03-14 17:28:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes