xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:13:57: error: class template argument deduction failed:
13 | for(int i=1;i<N;i++)edge.push_back(array{i,i+1,D1[i]});
| ^
xylophone.cpp:13:57: error: no matching function for call to 'array(int&, int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/10/array:94:12: note: candidate: 'template<class _Tp, long unsigned int _Nm> array()-> std::array<_Tp, _Nm>'
94 | struct array
| ^~~~~
/usr/include/c++/10/array:94:12: note: template argument deduction/substitution failed:
xylophone.cpp:13:57: note: candidate expects 0 arguments, 3 provided
13 | for(int i=1;i<N;i++)edge.push_back(array{i,i+1,D1[i]});
| ^
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/10/array:94:12: note: candidate: 'template<class _Tp, long unsigned int _Nm> array(std::array<_Tp, _Nm>)-> std::array<_Tp, _Nm>'
94 | struct array
| ^~~~~
/usr/include/c++/10/array:94:12: note: template argument deduction/substitution failed:
xylophone.cpp:13:57: note: mismatched types 'std::array<_Tp, _Nm>' and 'int'
13 | for(int i=1;i<N;i++)edge.push_back(array{i,i+1,D1[i]});
| ^
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/10/array:244:5: note: candidate: 'template<class _Tp, class ... _Up> std::array(_Tp, _Up ...)-> std::array<typename std::enable_if<(is_same_v<_Tp, _Up> && ...), _Tp>::type, (1 + sizeof... (_Up))>'
244 | array(_Tp, _Up...)
| ^~~~~
/usr/include/c++/10/array:244:5: note: template argument deduction/substitution failed:
/usr/include/c++/10/array: In substitution of 'template<class _Tp, class ... _Up> std::array(_Tp, _Up ...)-> std::array<typename std::enable_if<(is_same_v<_Tp, _Up> && ...), _Tp>::type, (1 + sizeof... (_Up))> [with _Tp = int; _Up = {int, long long int}]':
xylophone.cpp:13:57: required from here
/usr/include/c++/10/array:244:5: error: no type named 'type' in 'struct std::enable_if<false, int>'
xylophone.cpp:14:96: error: class template argument deduction failed:
14 | for(int i=2;i<N;i++)if(D2[i]!=D1[i-1]+D1[i])edge.push_back(array{i-1,i+1,abs(D1[i]-D1[i-1])});
| ^
xylophone.cpp:14:96: error: no matching function for call to 'array(int, int, long long int)'
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/10/array:94:12: note: candidate: 'template<class _Tp, long unsigned int _Nm> array()-> std::array<_Tp, _Nm>'
94 | struct array
| ^~~~~
/usr/include/c++/10/array:94:12: note: template argument deduction/substitution failed:
xylophone.cpp:14:96: note: candidate expects 0 arguments, 3 provided
14 | for(int i=2;i<N;i++)if(D2[i]!=D1[i-1]+D1[i])edge.push_back(array{i-1,i+1,abs(D1[i]-D1[i-1])});
| ^
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/10/array:94:12: note: candidate: 'template<class _Tp, long unsigned int _Nm> array(std::array<_Tp, _Nm>)-> std::array<_Tp, _Nm>'
94 | struct array
| ^~~~~
/usr/include/c++/10/array:94:12: note: template argument deduction/substitution failed:
xylophone.cpp:14:96: note: mismatched types 'std::array<_Tp, _Nm>' and 'int'
14 | for(int i=2;i<N;i++)if(D2[i]!=D1[i-1]+D1[i])edge.push_back(array{i-1,i+1,abs(D1[i]-D1[i-1])});
| ^
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from xylophone.cpp:1:
/usr/include/c++/10/array:244:5: note: candidate: 'template<class _Tp, class ... _Up> std::array(_Tp, _Up ...)-> std::array<typename std::enable_if<(is_same_v<_Tp, _Up> && ...), _Tp>::type, (1 + sizeof... (_Up))>'
244 | array(_Tp, _Up...)
| ^~~~~
/usr/include/c++/10/array:244:5: note: template argument deduction/substitution failed:
/usr/include/c++/10/array: In substitution of 'template<class _Tp, class ... _Up> std::array(_Tp, _Up ...)-> std::array<typename std::enable_if<(is_same_v<_Tp, _Up> && ...), _Tp>::type, (1 + sizeof... (_Up))> [with _Tp = int; _Up = {int, long long int}]':
xylophone.cpp:14:96: required from here
/usr/include/c++/10/array:244:5: error: no type named 'type' in 'struct std::enable_if<false, int>'