/ Vijos /

记录详情

Compile Error

/in/foo.cc:22:1: error: reference to 'rank' is ambiguous
 rank p[100001],q[100001];
 ^~~~
/in/foo.cc:18:8: note: candidates are: struct rank
 struct rank
        ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:24:10: error: reference to 'rank' is ambiguous
 bool cmp(rank u,rank v)
          ^~~~
/in/foo.cc:18:8: note: candidates are: struct rank
 struct rank
        ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:24:17: error: reference to 'rank' is ambiguous
 bool cmp(rank u,rank v)
                 ^~~~
/in/foo.cc:18:8: note: candidates are: struct rank
 struct rank
        ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:24:23: error: expression list treated as compound expression in initializer [-fpermissive]
 bool cmp(rank u,rank v)
                       ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:61:3: error: 'p' was not declared in this scope
   p[a[i].status].num=a[i].num;
   ^
/in/foo.cc:68:3: error: 'q' was not declared in this scope
   q[b[i].status].num=b[i].num;
   ^
/in/foo.cc:71:7: error: 'p' was not declared in this scope
  sort(p+1,p+n+1,cmp);
       ^
/in/foo.cc:72:7: error: 'q' was not declared in this scope
  sort(q+1,q+n+1,cmp);
       ^

信息

递交者
类型
递交
题目
P1842 火柴排队
语言
C++
递交时间
2018-10-06 18:09:28
评测时间
2018-10-06 18:09:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes