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_39554203_14844.cpp:10:10: error: reference to 'size' is ambiguous
   10 | bool vis[size];
      |          ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:53,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39554203_14844.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_39554203_14844.cpp:9:11: note:                 'const int size'
    9 | const int size = 100010;
      |           ^~~~
0_0_39554203_14844.cpp:20:7: error: reference to 'size' is ambiguous
   20 | }task[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_39554203_14844.cpp:9:11: note:                 'const int size'
    9 | const int size = 100010;
      |           ^~~~
0_0_39554203_14844.cpp:30:7: error: reference to 'size' is ambiguous
   30 | }mach[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_39554203_14844.cpp:9:11: note:                 'const int size'
    9 | const int size = 100010;
      |           ^~~~
0_0_39554203_14844.cpp: In function 'void init()':
0_0_39554203_14844.cpp:34:13: error: 'vis' was not declared in this scope
   34 |     memset( vis , false , sizeof(vis) );
      |             ^~~
0_0_39554203_14844.cpp: In function 'int find(int)':
0_0_39554203_14844.cpp:44:13: error: 'mach' was not declared in this scope
   44 |         if( mach[M].L>=x )
      |             ^~~~
0_0_39554203_14844.cpp: In function 'void solve()':
0_0_39554203_14844.cpp:57:21: error: 'task' was not declared in this scope
   57 |         pos = find( task[i].L );
      |                     ^~~~
0_0_39554203_14844.cpp:60:18: error: 'vis' was not declared in this scope
   60 |             if( !vis[j] && mach[j].T>=task[i].T )
      |                  ^~~
0_0_39554203_14844.cpp:60:28: error: 'mach' was not declared in this scope
   60 |             if( !vis[j] && mach[j].T>=task[i].T )
      |                            ^~~~
0_0_39554203_14844.cpp: In function 'int main()':
0_0_39554203_14844.cpp:79:20: error: 'mach' was not declared in this scope
   79 |             cin >> mach[i].T >> mach[i].L;
      |                    ^~~~
0_0_39554203_14844.cpp:83:20: error: 'task' was not declared in this scope
   83 |             cin >> task[i].T >> task[i].L;
      |                    ^~~~
0_0_39554203_14844.cpp:85:15: error: 'mach' was not declared in this scope
   85 |         sort( mach , mach+n );
      |               ^~~~
0_0_39554203_14844.cpp:86:15: error: 'task' was not declared in this scope
   86 |         sort( task , task+m );
      |               ^~~~


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-09-28 15:26:25, Gzip enabled