F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39279297_20433.cpp:11:14: error: reference to 'size' is ambiguous
   11 | Node    list[size];
      |              ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/deque:68,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/stack:62,
                 from 0_0_39279297_20433.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
0_0_39279297_20433.cpp:10:11: note:                 'const int size'
   10 | const int size = 512 + 1;
      |           ^~~~
0_0_39279297_20433.cpp:12:11: error: reference to 'size' is ambiguous
   12 | int     X[size];
      |           ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
0_0_39279297_20433.cpp:10:11: note:                 'const int size'
   10 | const int size = 512 + 1;
      |           ^~~~
0_0_39279297_20433.cpp:13:11: error: reference to 'size' is ambiguous
   13 | int     Y[size];
      |           ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
0_0_39279297_20433.cpp:10:11: note:                 'const int size'
   10 | const int size = 512 + 1;
      |           ^~~~
0_0_39279297_20433.cpp:14:12: error: reference to 'size' is ambiguous
   14 | bool visit[size];
      |            ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:264:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
0_0_39279297_20433.cpp:10:11: note:                 'const int size'
   10 | const int size = 512 + 1;
      |           ^~~~
0_0_39279297_20433.cpp: In function 'void init()':
0_0_39279297_20433.cpp:21:17: error: 'list' was not declared in this scope
   21 |                 list[i].next=NULL;
      |                 ^~~~
0_0_39279297_20433.cpp:5:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
    4 | #include <iostream>
  +++ |+#include <list>
    5 | using namespace std;
0_0_39279297_20433.cpp:22:16: error: 'X' was not declared in this scope
   22 |         memset(X, 0,(size_x+1) * sizeof(int));
      |                ^
0_0_39279297_20433.cpp:23:16: error: 'Y' was not declared in this scope
   23 |         memset(Y, 0,(size_y+1) * sizeof(int));
      |                ^
0_0_39279297_20433.cpp: In function 'void input(int)':
0_0_39279297_20433.cpp:34:25: error: 'list' was not declared in this scope
   34 |                 p->next=list[x].next;
      |                         ^~~~
0_0_39279297_20433.cpp:34:25: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
0_0_39279297_20433.cpp: In function 'bool dfs(int)':
0_0_39279297_20433.cpp:41:15: error: 'list' was not declared in this scope
   41 |         for(p=list[x].next;p;p=p->next){
      |               ^~~~
0_0_39279297_20433.cpp:41:15: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?
0_0_39279297_20433.cpp:42:22: error: 'visit' was not declared in this scope
   42 |                 if (!visit[p->ord]){
      |                      ^~~~~
0_0_39279297_20433.cpp:5:1: note: 'std::visit' is defined in header '<variant>'; did you forget to '#include <variant>'?
    4 | #include <iostream>
  +++ |+#include <variant>
    5 | using namespace std;
0_0_39279297_20433.cpp:45:30: error: 'Y' was not declared in this scope
   45 |                         if (!Y[p->ord]||dfs(Y[p->ord]))
      |                              ^
0_0_39279297_20433.cpp: In function 'void solve()':
0_0_39279297_20433.cpp:59:24: error: 'visit' was not declared in this scope
   59 |                 memset(visit,false,size_y + 1);
      |                        ^~~~~
0_0_39279297_20433.cpp:59:24: note: 'std::visit' is defined in header '<variant>'; did you forget to '#include <variant>'?
0_0_39279297_20433.cpp:64:33: error: 'Y' was not declared in this scope
   64 |                                 Y[top]=stk.top();
      |                                 ^
0_0_39279297_20433.cpp:65:33: error: 'X' was not declared in this scope
   65 |                                 X[stk.top()]=top;
      |                                 ^
0_0_39279297_20433.cpp: In function 'void output()':
0_0_39279297_20433.cpp:76:20: error: 'X' was not declared in this scope
   76 |                 if(X[i])count++;
      |                    ^
0_0_39279297_20433.cpp:77:25: error: 'list' was not declared in this scope
   77 |                 while(p=list[i].next){
      |                         ^~~~
0_0_39279297_20433.cpp:77:25: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'?


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 05:16:10, Gzip enabled