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_37751117_5509.cpp: In function 'void solve()':
0_0_37751117_5509.cpp:22:14: error: converting to 'std::tuple<int, int, int>' from initializer list would use explicit constructor 'constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {int&, int&, int&}; <template-parameter-2-2> = void; _Elements = {int, int, int}]'
         a[i] = {w, x, y};
              ^
0_0_37751117_5509.cpp:29:14: error: expected unqualified-id before '[' token
         auto [w, x, y] = a[i];
              ^
0_0_37751117_5509.cpp:30:38: error: 'x' was not declared in this scope
         mx[i][1] = max(mx[i + 1][1], x + y);
                                      ^
0_0_37751117_5509.cpp:30:42: error: 'y' was not declared in this scope
         mx[i][1] = max(mx[i + 1][1], x + y);
                                          ^
0_0_37751117_5509.cpp: In lambda function:
0_0_37751117_5509.cpp:36:14: error: expected unqualified-id before '[' token
         auto [w, x, y] = a[mid];
              ^
0_0_37751117_5509.cpp:37:18: error: 'x' was not declared in this scope
         if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                  ^
0_0_37751117_5509.cpp:37:22: error: 'y' was not declared in this scope
         if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                      ^
0_0_37751117_5509.cpp:37:99: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
         if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                                                                                                   ^
0_0_37751117_5509.cpp:37:99: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_37751117_5509.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:   template argument deduction/substitution failed:
0_0_37751117_5509.cpp:37:99: note:   candidate expects 2 arguments, 1 provided
         if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                                                                                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_37751117_5509.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:   template argument deduction/substitution failed:
0_0_37751117_5509.cpp:37:99: note:   candidate expects 3 arguments, 1 provided
         if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                                                                                                   ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37751117_5509.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3449:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)
     max(initializer_list<_Tp> __l)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3449:5: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note:   template argument deduction/substitution failed:
0_0_37751117_5509.cpp:37:104: error: 'w' was not declared in this scope
         if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                                                                                                        ^
0_0_37751117_5509.cpp: In lambda function:
0_0_37751117_5509.cpp:44:18: error: expected unqualified-id before '[' token
             auto [w, x1, y1] = a[mid];
                  ^
0_0_37751117_5509.cpp:45:108: error: 'w' was not declared in this scope
             if (max({x + y + mx[mid][4], x - y + mx[mid][3], -x + y + mx[mid][2], -x - y + mx[mid][1]}) >= w) return 1;
                                                                                                            ^
0_0_37751117_5509.cpp: In function 'void solve()':
0_0_37751117_5509.cpp:53:14: error: expected unqualified-id before '[' token
         auto [w1, x1, y1] = a[res];
              ^
0_0_37751117_5509.cpp:54:110: error: 'w1' was not declared in this scope
         cout << min(max({x + y + mx[res][4], x - y + mx[res][3], -x + y + mx[res][2], -x - y + mx[res][1]}), w1) << endl;
                                                                                                              ^


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-07-09 08:10:18, Gzip enabled